@acorex/platform 19.1.6 → 19.1.8

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 (274) hide show
  1. package/auth/lib/permission/index.d.ts +4 -3
  2. package/auth/lib/permission/permission.service.d.ts +18 -0
  3. package/auth/lib/permission/permission.types.d.ts +5 -0
  4. package/common/index.d.ts +3 -2
  5. package/common/lib/app/application.types.d.ts +16 -4
  6. package/common/lib/common.module.d.ts +6 -7
  7. package/common/lib/layout/menu/index.d.ts +4 -2
  8. package/common/lib/layout/menu/menu.types.d.ts +2 -2
  9. package/common/lib/layout/menu/search-definition.provider.d.ts +4 -0
  10. package/common/lib/layout/menu/search.provider.d.ts +20 -0
  11. package/common/lib/search/index.d.ts +5 -0
  12. package/common/lib/search/search-definition.builder.d.ts +23 -0
  13. package/common/lib/search/search-definition.provider.d.ts +18 -0
  14. package/common/lib/search/search.provider.d.ts +8 -0
  15. package/common/lib/search/search.service.d.ts +12 -0
  16. package/common/lib/search/search.types.d.ts +42 -0
  17. package/common/lib/settings/search-definition.provider.d.ts +4 -0
  18. package/common/lib/settings/search.provider.d.ts +10 -0
  19. package/common/lib/store/common.actions.d.ts +0 -12
  20. package/common/lib/store/index.d.ts +0 -1
  21. package/common/lib/workflows/index.d.ts +1 -0
  22. package/common/lib/workflows/navigate.workflow.d.ts +9 -0
  23. package/core/lib/types.d.ts +19 -0
  24. package/fesm2022/acorex-platform-auth.mjs +78 -43
  25. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  26. package/fesm2022/acorex-platform-common.mjs +1452 -2235
  27. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  29. package/fesm2022/acorex-platform-layout-builder.mjs +1 -0
  30. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  31. package/fesm2022/acorex-platform-layout-entity.mjs +106 -10
  32. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  33. package/fesm2022/acorex-platform-layout-search.mjs +196 -0
  34. package/fesm2022/acorex-platform-layout-search.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-layout-setting.mjs +21 -20
  36. package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
  37. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs → acorex-platform-themes-default-entity-master-create-view.component-DpWOMxW9.mjs} +5 -5
  38. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-DpWOMxW9.mjs.map} +1 -1
  39. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CtpkzjOm.mjs → acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs} +12 -12
  40. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CtpkzjOm.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs.map} +1 -1
  41. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs → acorex-platform-themes-default-entity-master-modify-view.component-C1kGZwYp.mjs} +3 -3
  42. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs.map → acorex-platform-themes-default-entity-master-modify-view.component-C1kGZwYp.mjs.map} +1 -1
  43. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs → acorex-platform-themes-default-entity-master-single-view.component-CAgt5S3B.mjs} +4 -4
  44. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-CAgt5S3B.mjs.map} +1 -1
  45. package/fesm2022/acorex-platform-themes-default-search-popup.component-BiKt6Mvr.mjs +84 -0
  46. package/fesm2022/acorex-platform-themes-default-search-popup.component-BiKt6Mvr.mjs.map +1 -0
  47. package/fesm2022/{acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs → acorex-platform-themes-default-setting-page.component-BXwdFLy4.mjs} +3 -3
  48. package/fesm2022/{acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs.map → acorex-platform-themes-default-setting-page.component-BXwdFLy4.mjs.map} +1 -1
  49. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs → acorex-platform-themes-default-setting-view.component-BXsmvaIi.mjs} +5 -5
  50. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs.map → acorex-platform-themes-default-setting-view.component-BXsmvaIi.mjs.map} +1 -1
  51. package/fesm2022/acorex-platform-themes-default.mjs +28 -15
  52. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  53. package/fesm2022/acorex-platform-themes-shared.mjs +2 -2
  54. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  55. package/fesm2022/acorex-platform-widgets.mjs +379 -115
  56. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  57. package/layout/builder/lib/builder/widget-map.d.ts +1 -0
  58. package/layout/entity/lib/entity-registery.service.d.ts +16 -0
  59. package/layout/entity/lib/entity.config.d.ts +2 -2
  60. package/layout/entity/lib/entity.module.d.ts +3 -0
  61. package/layout/entity/lib/search-definition.provider.d.ts +6 -0
  62. package/layout/entity/lib/search.provider.d.ts +4 -0
  63. package/layout/search/README.md +3 -0
  64. package/layout/search/index.d.ts +1 -0
  65. package/layout/search/lib/index.d.ts +3 -0
  66. package/layout/search/lib/search-slot.component.d.ts +9 -0
  67. package/layout/search/lib/search.config.d.ts +5 -0
  68. package/layout/search/lib/search.module.d.ts +11 -0
  69. package/layout/search/lib/search.viewmodel.d.ts +17 -0
  70. package/layout/search/lib/workflows/search.workflow.d.ts +11 -0
  71. package/layout/setting/lib/setting.viewmodel.d.ts +1 -1
  72. package/package.json +19 -15
  73. package/themes/default/lib/layouts/search-layout/search-popup.component.d.ts +13 -0
  74. package/themes/shared/index.d.ts +1 -1
  75. package/themes/shared/lib/components/layout-elements/layout-list.component.d.ts +1 -1
  76. package/themes/shared/lib/components/{theme-slot.component.d.ts → slots/theme-slot.component.d.ts} +7 -7
  77. package/widgets/lib/properties/layout.props.d.ts +1 -0
  78. package/widgets/lib/widgets/index.d.ts +1 -0
  79. package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +0 -1
  80. package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +3 -1
  81. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +6 -4
  82. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +39 -0
  83. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.config.d.ts +7 -0
  84. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.type.d.ts +19 -0
  85. package/widgets/lib/widgets/property-editors/grid-options/index.d.ts +3 -0
  86. package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +21 -5
  87. package/common/lib/schema/component-loader.d.ts +0 -24
  88. package/common/lib/schema/entity/entity-registery.service.d.ts +0 -34
  89. package/common/lib/schema/entity/entity.class.d.ts +0 -161
  90. package/common/lib/schema/entity/entity.loader.d.ts +0 -9
  91. package/common/lib/schema/entity/index.d.ts +0 -3
  92. package/common/lib/schema/formats.d.ts +0 -8
  93. package/common/lib/schema/index.d.ts +0 -8
  94. package/common/lib/schema/schema-registery.service.d.ts +0 -20
  95. package/common/lib/schema/schema.module.d.ts +0 -12
  96. package/common/lib/schema/schema.types.d.ts +0 -16
  97. package/common/lib/schema/widget/index.d.ts +0 -5
  98. package/common/lib/schema/widget/widget-base.d.ts +0 -45
  99. package/common/lib/schema/widget/widget-column-renderer.d.ts +0 -34
  100. package/common/lib/schema/widget/widget-filter-renderer.d.ts +0 -30
  101. package/common/lib/schema/widget/widget-renderer.d.ts +0 -27
  102. package/common/lib/schema/widget/widget-token.d.ts +0 -16
  103. package/common/lib/schema/widgets/avatar/avatar-widget-edit.component.d.ts +0 -16
  104. package/common/lib/schema/widgets/avatar/avatar-widget-view.component.d.ts +0 -13
  105. package/common/lib/schema/widgets/checkbox/checkbox-widget-column.component.d.ts +0 -11
  106. package/common/lib/schema/widgets/checkbox/checkbox-widget-edit.component.d.ts +0 -6
  107. package/common/lib/schema/widgets/checkbox/checkbox-widget-view.component.d.ts +0 -11
  108. package/common/lib/schema/widgets/common-widget-filter/boolean-widget-filter.component.d.ts +0 -18
  109. package/common/lib/schema/widgets/common-widget-filter/number-widget-filter.component.d.ts +0 -12
  110. package/common/lib/schema/widgets/common-widget-filter/string-widget-filter.component.d.ts +0 -12
  111. package/common/lib/schema/widgets/common-widgets.module.d.ts +0 -32
  112. package/common/lib/schema/widgets/dateTime/dateTime-widget-column.component.d.ts +0 -11
  113. package/common/lib/schema/widgets/dateTime/dateTime-widget-edit.component.d.ts +0 -24
  114. package/common/lib/schema/widgets/dateTime/dateTime-widget-filter.component.d.ts +0 -19
  115. package/common/lib/schema/widgets/dateTime/dateTime-widget-view.component.d.ts +0 -11
  116. package/common/lib/schema/widgets/email/email-widget-column.component.d.ts +0 -16
  117. package/common/lib/schema/widgets/email/email-widget-edit.component.d.ts +0 -26
  118. package/common/lib/schema/widgets/email/email-widget-view.component.d.ts +0 -16
  119. package/common/lib/schema/widgets/file/file-widget-column.component.d.ts +0 -8
  120. package/common/lib/schema/widgets/file/file-widget-edit.component.d.ts +0 -17
  121. package/common/lib/schema/widgets/file/file-widget-filter.component.d.ts +0 -6
  122. package/common/lib/schema/widgets/file/file-widget-view.component.d.ts +0 -17
  123. package/common/lib/schema/widgets/gallery/gallery-widget-edit.component.d.ts +0 -15
  124. package/common/lib/schema/widgets/gallery/gallery-widget-filter.component.d.ts +0 -6
  125. package/common/lib/schema/widgets/gallery/gallery-widget-types.d.ts +0 -10
  126. package/common/lib/schema/widgets/gallery/gallery-widget-view.component.d.ts +0 -16
  127. package/common/lib/schema/widgets/index.d.ts +0 -1
  128. package/common/lib/schema/widgets/lookup/lookup-widget-column.component.d.ts +0 -17
  129. package/common/lib/schema/widgets/lookup/lookup-widget-edit.component.d.ts +0 -18
  130. package/common/lib/schema/widgets/lookup/lookup-widget-filter.component.d.ts +0 -17
  131. package/common/lib/schema/widgets/lookup/lookup-widget-view.component.d.ts +0 -18
  132. package/common/lib/schema/widgets/map/map-widget-edit.component.d.ts +0 -15
  133. package/common/lib/schema/widgets/map/map-widget-view.component.d.ts +0 -17
  134. package/common/lib/schema/widgets/messenger/messenger-widget-column.component.d.ts +0 -15
  135. package/common/lib/schema/widgets/messenger/messenger-widget-edit.component.d.ts +0 -14
  136. package/common/lib/schema/widgets/messenger/messenger-widget-view.component.d.ts +0 -17
  137. package/common/lib/schema/widgets/number/number-widget-edit.component.d.ts +0 -7
  138. package/common/lib/schema/widgets/number/number-widget-view.component.d.ts +0 -8
  139. package/common/lib/schema/widgets/password/change-password.component.d.ts +0 -16
  140. package/common/lib/schema/widgets/password/password-widget-column.component.d.ts +0 -14
  141. package/common/lib/schema/widgets/password/password-widget-edit.component.d.ts +0 -6
  142. package/common/lib/schema/widgets/password/password-widget-view.component.d.ts +0 -18
  143. package/common/lib/schema/widgets/phone/phone-widget-column.component.d.ts +0 -15
  144. package/common/lib/schema/widgets/phone/phone-widget-edit.component.d.ts +0 -29
  145. package/common/lib/schema/widgets/phone/phone-widget-view.component.d.ts +0 -18
  146. package/common/lib/schema/widgets/rich-text/rich-text-widget-column.component.d.ts +0 -11
  147. package/common/lib/schema/widgets/rich-text/rich-text-widget-edit.component.d.ts +0 -33
  148. package/common/lib/schema/widgets/rich-text/rich-text-widget-view.component.d.ts +0 -10
  149. package/common/lib/schema/widgets/selection-list/selection-list-widget-column.component.d.ts +0 -16
  150. package/common/lib/schema/widgets/selection-list/selection-list-widget-edit.component.d.ts +0 -12
  151. package/common/lib/schema/widgets/selection-list/selection-list-widget-filter.component.d.ts +0 -9
  152. package/common/lib/schema/widgets/selection-list/selection-list-widget-view.component.d.ts +0 -15
  153. package/common/lib/schema/widgets/signature-pad/signature-pad-widget-edit.component.d.ts +0 -19
  154. package/common/lib/schema/widgets/signature-pad/signature-pad-widget-view.component.d.ts +0 -8
  155. package/common/lib/schema/widgets/text/largetext-widget-edit.component.d.ts +0 -6
  156. package/common/lib/schema/widgets/text/text-widget-column.component.d.ts +0 -12
  157. package/common/lib/schema/widgets/text/text-widget-edit.component.d.ts +0 -21
  158. package/common/lib/schema/widgets/text/text-widget-view.component.d.ts +0 -11
  159. package/common/lib/schema/widgets/toggle/toggle-widget-column.component.d.ts +0 -11
  160. package/common/lib/schema/widgets/toggle/toggle-widget-edit.component.d.ts +0 -6
  161. package/common/lib/schema/widgets/toggle/toggle-widget-view.component.d.ts +0 -11
  162. package/common/lib/store/common.effects.d.ts +0 -13
  163. package/fesm2022/acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs +0 -166
  164. package/fesm2022/acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs.map +0 -1
  165. package/fesm2022/acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs +0 -64
  166. package/fesm2022/acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs.map +0 -1
  167. package/fesm2022/acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs +0 -155
  168. package/fesm2022/acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs.map +0 -1
  169. package/fesm2022/acorex-platform-common-change-password.component-DFoC5nP2.mjs +0 -176
  170. package/fesm2022/acorex-platform-common-change-password.component-DFoC5nP2.mjs.map +0 -1
  171. package/fesm2022/acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs +0 -55
  172. package/fesm2022/acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs.map +0 -1
  173. package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs +0 -24
  174. package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs.map +0 -1
  175. package/fesm2022/acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs +0 -49
  176. package/fesm2022/acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs.map +0 -1
  177. package/fesm2022/acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs +0 -46
  178. package/fesm2022/acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs.map +0 -1
  179. package/fesm2022/acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs +0 -178
  180. package/fesm2022/acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs.map +0 -1
  181. package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs +0 -286
  182. package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs.map +0 -1
  183. package/fesm2022/acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs +0 -73
  184. package/fesm2022/acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs.map +0 -1
  185. package/fesm2022/acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs +0 -75
  186. package/fesm2022/acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs.map +0 -1
  187. package/fesm2022/acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs +0 -249
  188. package/fesm2022/acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs.map +0 -1
  189. package/fesm2022/acorex-platform-common-email-widget-view.component-dMByK5bc.mjs +0 -109
  190. package/fesm2022/acorex-platform-common-email-widget-view.component-dMByK5bc.mjs.map +0 -1
  191. package/fesm2022/acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs +0 -29
  192. package/fesm2022/acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs.map +0 -1
  193. package/fesm2022/acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs +0 -202
  194. package/fesm2022/acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs.map +0 -1
  195. package/fesm2022/acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs +0 -29
  196. package/fesm2022/acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs.map +0 -1
  197. package/fesm2022/acorex-platform-common-file-widget-view.component-T3r6musY.mjs +0 -155
  198. package/fesm2022/acorex-platform-common-file-widget-view.component-T3r6musY.mjs.map +0 -1
  199. package/fesm2022/acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs +0 -191
  200. package/fesm2022/acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs.map +0 -1
  201. package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs +0 -29
  202. package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs.map +0 -1
  203. package/fesm2022/acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs +0 -175
  204. package/fesm2022/acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs.map +0 -1
  205. package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs +0 -38
  206. package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs.map +0 -1
  207. package/fesm2022/acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs +0 -45
  208. package/fesm2022/acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs.map +0 -1
  209. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs +0 -96
  210. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs.map +0 -1
  211. package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs +0 -161
  212. package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs.map +0 -1
  213. package/fesm2022/acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs +0 -56
  214. package/fesm2022/acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs.map +0 -1
  215. package/fesm2022/acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs +0 -94
  216. package/fesm2022/acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs.map +0 -1
  217. package/fesm2022/acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs +0 -66
  218. package/fesm2022/acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs.map +0 -1
  219. package/fesm2022/acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs +0 -73
  220. package/fesm2022/acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs.map +0 -1
  221. package/fesm2022/acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs +0 -138
  222. package/fesm2022/acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs.map +0 -1
  223. package/fesm2022/acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs +0 -133
  224. package/fesm2022/acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs.map +0 -1
  225. package/fesm2022/acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs +0 -48
  226. package/fesm2022/acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs.map +0 -1
  227. package/fesm2022/acorex-platform-common-number-widget-filter.component-womVAhSr.mjs +0 -137
  228. package/fesm2022/acorex-platform-common-number-widget-filter.component-womVAhSr.mjs.map +0 -1
  229. package/fesm2022/acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs +0 -33
  230. package/fesm2022/acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs.map +0 -1
  231. package/fesm2022/acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs +0 -68
  232. package/fesm2022/acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs.map +0 -1
  233. package/fesm2022/acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs +0 -43
  234. package/fesm2022/acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs.map +0 -1
  235. package/fesm2022/acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs +0 -110
  236. package/fesm2022/acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs.map +0 -1
  237. package/fesm2022/acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs +0 -93
  238. package/fesm2022/acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs.map +0 -1
  239. package/fesm2022/acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs +0 -249
  240. package/fesm2022/acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs.map +0 -1
  241. package/fesm2022/acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs +0 -124
  242. package/fesm2022/acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs.map +0 -1
  243. package/fesm2022/acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs +0 -63
  244. package/fesm2022/acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs.map +0 -1
  245. package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs +0 -69
  246. package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs.map +0 -1
  247. package/fesm2022/acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs +0 -37
  248. package/fesm2022/acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs.map +0 -1
  249. package/fesm2022/acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs +0 -47
  250. package/fesm2022/acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs.map +0 -1
  251. package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs +0 -55
  252. package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs.map +0 -1
  253. package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs +0 -47
  254. package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs.map +0 -1
  255. package/fesm2022/acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs +0 -47
  256. package/fesm2022/acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs.map +0 -1
  257. package/fesm2022/acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs +0 -130
  258. package/fesm2022/acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs.map +0 -1
  259. package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs +0 -43
  260. package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs.map +0 -1
  261. package/fesm2022/acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs +0 -127
  262. package/fesm2022/acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs.map +0 -1
  263. package/fesm2022/acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs +0 -49
  264. package/fesm2022/acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs.map +0 -1
  265. package/fesm2022/acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs +0 -162
  266. package/fesm2022/acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs.map +0 -1
  267. package/fesm2022/acorex-platform-common-text-widget-view.component-BH0LTD80.mjs +0 -69
  268. package/fesm2022/acorex-platform-common-text-widget-view.component-BH0LTD80.mjs.map +0 -1
  269. package/fesm2022/acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs +0 -59
  270. package/fesm2022/acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs.map +0 -1
  271. package/fesm2022/acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs +0 -27
  272. package/fesm2022/acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs.map +0 -1
  273. package/fesm2022/acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs +0 -51
  274. package/fesm2022/acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs.map +0 -1
@@ -1,35 +1,25 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, provideAppInitializer, inject, RendererFactory2, InjectionToken, Injector, ErrorHandler, NgModule, Inject, Directive, Input, EventEmitter, Output, runInInjectionContext, Optional, Component, ViewEncapsulation, ChangeDetectorRef, ChangeDetectionStrategy, ViewChild } from '@angular/core';
3
- import { kebabCase, merge, cloneDeep, get, sortBy, assign, isEqual, set } from 'lodash-es';
2
+ import { Injectable, provideAppInitializer, inject, RendererFactory2, InjectionToken, Injector, ErrorHandler, Directive, Input, EventEmitter, Output, runInInjectionContext, NgModule, Optional, Inject, Component, ViewEncapsulation } from '@angular/core';
3
+ import { kebabCase, sortBy, omit, merge, cloneDeep, get } from 'lodash-es';
4
4
  import { AXPopupModule } from '@acorex/components/popup';
5
5
  import { AXToastService, AXToastModule } from '@acorex/components/toast';
6
6
  import { AXDateTimeModule } from '@acorex/core/date-time';
7
- import * as i5 from '@acorex/platform/workflow';
8
- import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
9
- import * as i2 from '@angular/router';
7
+ import * as i4 from '@acorex/platform/workflow';
8
+ import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
10
9
  import { Router, RouterModule } from '@angular/router';
11
- import * as i1 from '@ngrx/effects';
12
- import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
13
10
  import { applySortArray, applyFilterArray } from '@acorex/platform/core';
14
11
  import Dexie from 'dexie';
15
- import { Subject, switchMap, of } from 'rxjs';
16
- import { createAction, props, Store } from '@ngrx/store';
17
- import { AXDialogService } from '@acorex/components/dialog';
18
- import { AXTranslationService } from '@acorex/core/translation';
19
- import * as i5$1 from '@acorex/components/decorators';
12
+ import * as i3 from '@acorex/components/decorators';
20
13
  import { AXDecoratorModule } from '@acorex/components/decorators';
21
- import * as i2$1 from '@acorex/components/image';
14
+ import * as i2 from '@acorex/components/image';
22
15
  import { AXImageModule } from '@acorex/components/image';
23
- import * as i1$1 from '@angular/common';
16
+ import * as i1 from '@angular/common';
24
17
  import { CommonModule } from '@angular/common';
25
18
  import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
26
- import * as i2$2 from '@acorex/components/skeleton';
27
- import { AXSkeletonModule } from '@acorex/components/skeleton';
28
- import * as i1$2 from '@angular/cdk/portal';
29
- import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
30
- import { AXDataTableColumnComponent } from '@acorex/components/data-table';
31
- import { AXUnsubscriber } from '@acorex/core/utils';
32
- import { AXFormatService } from '@acorex/core/format';
19
+ import { AXTranslationService } from '@acorex/core/translation';
20
+ import { Store, createAction } from '@ngrx/store';
21
+ import { Subject } from 'rxjs';
22
+ import { AXDialogService } from '@acorex/components/dialog';
33
23
 
34
24
  class AXPAppStartUpService {
35
25
  constructor() {
@@ -764,1141 +754,411 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
764
754
  args: [{ providedIn: 'root' }]
765
755
  }], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
766
756
 
767
- var AXPSettingScope;
768
- (function (AXPSettingScope) {
769
- AXPSettingScope["Environment"] = "C";
770
- AXPSettingScope["Global"] = "G";
771
- AXPSettingScope["Tenant"] = "T";
772
- AXPSettingScope["User"] = "U";
773
- })(AXPSettingScope || (AXPSettingScope = {}));
774
- ;
775
-
776
- class AXPSettingDefinitionProviderContext {
777
- constructor() {
778
- this.rootGroups = [];
779
- this.groupMap = new Map();
780
- }
781
- addGroup(name, title, description, icon) {
782
- const newGroup = {
783
- name,
784
- title,
785
- description,
786
- icon,
787
- groups: [],
788
- sections: [],
789
- };
790
- this.rootGroups.push(newGroup);
791
- this.groupMap.set(name, newGroup); // Index by name
792
- return new AXPSettingDefinitionGroupBuilder(this, newGroup);
757
+ // src/app/directives/grid-layout.directive.ts
758
+ class AXPGridLayoutDirective {
759
+ constructor(el, renderer) {
760
+ this.el = el;
761
+ this.renderer = renderer;
793
762
  }
794
- group(name) {
795
- const foundGroup = this.groupMap.get(name);
796
- if (!foundGroup) {
797
- throw new Error(`Group with name "${name}" not found.`);
763
+ ngOnChanges(changes) {
764
+ if (changes['options']) {
765
+ this.applyTailwindClasses();
798
766
  }
799
- return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
800
767
  }
801
- getGroups() {
802
- return this.rootGroups;
768
+ applyTailwindClasses() {
769
+ // Clear existing grid classes
770
+ this.clearClasses();
771
+ // Apply new grid classes based on the input options
772
+ this.setClasses(this.options.positions?.default, '');
773
+ this.setClasses(this.options.positions?.md, 'md:');
774
+ this.setClasses(this.options.positions?.lg, 'lg:');
775
+ this.setClasses(this.options.positions?.xl, 'xl:');
776
+ this.setClasses(this.options.positions?.xxl, '2xl:');
803
777
  }
804
- // Expose groupMap for controlled access
805
- hasGroup(name) {
806
- return this.groupMap.has(name);
778
+ setClasses(positions, prefix) {
779
+ if (positions == null)
780
+ return;
781
+ const colStart = positions.colStart ? `${prefix}ax-col-start-${positions.colStart}` : '';
782
+ const colEnd = positions.colEnd ? `${prefix}ax-col-end-${positions.colEnd}` : '';
783
+ const colSpan = positions.colSpan ? `${prefix}ax-col-span-${positions.colSpan}` : '';
784
+ const rowStart = positions.rowStart ? `${prefix}ax-row-start-${positions.rowStart}` : '';
785
+ const rowEnd = positions.rowEnd ? `${prefix}ax-row-end-${positions.rowEnd}` : '';
786
+ const rowSpan = positions.rowSpan ? `${prefix}ax-row-span-${positions.rowSpan}` : '';
787
+ const order = positions.order ? `${prefix}ax-order-${positions.order}` : ''; // Handling order
788
+ [colStart, colEnd, colSpan, rowStart, rowEnd, rowSpan, order].forEach(cls => {
789
+ if (cls) {
790
+ this.renderer.addClass(this.el.nativeElement, cls);
791
+ }
792
+ });
807
793
  }
808
- getGroup(name) {
809
- return this.groupMap.get(name);
794
+ clearClasses() {
795
+ const currentClasses = this.el.nativeElement.className.split(' ');
796
+ currentClasses.forEach((className) => {
797
+ if (className.startsWith('ax-col-') || className.startsWith('ax-row-') || className.startsWith('ax-order-')) {
798
+ this.renderer.removeClass(this.el.nativeElement, className);
799
+ }
800
+ });
810
801
  }
802
+ 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 }); }
803
+ 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 }); }
811
804
  }
812
- class AXPSettingDefinitionGroupBuilder {
813
- constructor(context, group) {
814
- this.context = context;
815
- this.group = group;
816
- }
817
- addSection(name, title, description) {
818
- const newSection = {
819
- name,
820
- title,
821
- description: description,
822
- settings: [],
823
- };
824
- this.group.sections.push(newSection);
825
- return new AXPSettingDefinitionSectionBuilder(this, newSection);
805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
806
+ type: Directive,
807
+ args: [{
808
+ selector: '[gridLayout]',
809
+ standalone: true,
810
+ }]
811
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{
812
+ type: Input,
813
+ args: ['gridLayout']
814
+ }] } });
815
+
816
+ class AXPStickyDirective {
817
+ get isSticky() {
818
+ return this._isSticky;
826
819
  }
827
- section(name) {
828
- const foundSection = this.group.sections.find((section) => section.name === name);
829
- if (!foundSection) {
830
- throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
820
+ set isSticky(value) {
821
+ if (this._isSticky !== value) {
822
+ this._isSticky = value;
823
+ this.isStickyChange.emit(value);
831
824
  }
832
- return new AXPSettingDefinitionSectionBuilder(this, foundSection);
833
825
  }
834
- addGroup(name, title, description, icon) {
835
- const newGroup = {
836
- name,
837
- title,
838
- description: description,
839
- icon,
840
- groups: [],
841
- sections: [],
826
+ constructor(element, renderer, zone, cdr) {
827
+ this.element = element;
828
+ this.renderer = renderer;
829
+ this.zone = zone;
830
+ this.cdr = cdr;
831
+ this.stickyOffset = 100;
832
+ this.isStickyChange = new EventEmitter();
833
+ this._isSticky = false;
834
+ this.onParentScroll = () => {
835
+ this.zone.runOutsideAngular(() => {
836
+ const scrollTop = this.parentElement === window
837
+ ? window.scrollY
838
+ : this.parentElement.scrollTop;
839
+ const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
840
+ if (shouldStick !== this.isSticky) {
841
+ this.zone.run(() => {
842
+ this.isSticky = shouldStick;
843
+ this.toggleStickyClasses(shouldStick);
844
+ this.cdr.markForCheck();
845
+ });
846
+ }
847
+ });
842
848
  };
843
- this.group.groups.push(newGroup);
844
- if (this.context.hasGroup(name)) {
845
- throw new Error(`Group with name "${name}" already exists.`);
846
- }
847
- this.context['groupMap'].set(name, newGroup);
848
- return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
849
- }
850
- endGroup() {
851
- return this.context;
852
- }
853
- }
854
- class AXPSettingDefinitionSectionBuilder {
855
- constructor(groupBuilder, section) {
856
- this.groupBuilder = groupBuilder;
857
- this.section = section;
858
849
  }
859
- addSetting(setting) {
860
- const newSetting = {
861
- name: setting.key,
862
- title: setting.title,
863
- description: setting.description,
864
- isRequired: setting.isRequired ?? false,
865
- isInherited: setting.isInherited ?? false,
866
- isEncrypted: setting.isEncrypted ?? false,
867
- defaultValue: setting.defaultValue,
868
- scope: setting.scope ?? 'G',
869
- widget: {
870
- type: setting.widget.type,
871
- name: setting.key,
872
- path: setting.key,
873
- defaultValue: setting.defaultValue,
874
- options: merge(setting.widget.options ?? {}, {
875
- label: setting.widget.options?.['label'] ?? setting.title,
876
- validationRules: setting.validationRules ?? [],
877
- }),
878
- valueTransforms: setting.valueTransforms,
879
- triggers: setting.widget.triggers,
880
- },
881
- };
882
- this.section.settings.push(newSetting);
883
- return this;
850
+ ngAfterViewInit() {
851
+ this.initSticky();
852
+ // Add mutation observer for dynamic content
853
+ this.mutationObserver = new MutationObserver(() => {
854
+ this.updateTopOffset();
855
+ });
856
+ this.mutationObserver.observe(this.element.nativeElement, {
857
+ childList: true,
858
+ subtree: true,
859
+ });
860
+ // Add resize event listener
861
+ window.addEventListener('resize', this.updateTopOffset.bind(this));
884
862
  }
885
- endSection() {
886
- return this.groupBuilder;
863
+ initSticky() {
864
+ if (this.stickyParent instanceof HTMLElement) {
865
+ this.parentElement = this.stickyParent;
866
+ }
867
+ else {
868
+ this.parentElement =
869
+ document.querySelector(this.stickyParent) || window;
870
+ }
871
+ this.targetElement =
872
+ document.querySelector(this.stickyTarget) ||
873
+ this.element.nativeElement;
874
+ this.updateTopOffset();
875
+ this.parentElement.addEventListener('scroll', this.onParentScroll);
887
876
  }
888
- }
889
-
890
- // Injection token for setting providers
891
- const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
892
- class AXPSettingDefinitionProviderService {
893
- constructor() {
894
- this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
895
- this.cache = null;
877
+ updateTopOffset() {
878
+ this.zone.runOutsideAngular(() => {
879
+ const rect = this.targetElement.getBoundingClientRect();
880
+ this.topOffset = rect.top + (window.scrollY || 0);
881
+ });
896
882
  }
897
- async load() {
898
- if (this.cache) {
899
- return;
900
- }
901
- const context = new AXPSettingDefinitionProviderContext();
902
- if (Array.isArray(this.providers)) {
903
- for (const provider of this.providers) {
904
- await provider.provide(context);
883
+ toggleStickyClasses(isSticky) {
884
+ const classes = this.stickyClass.split(' ').filter(Boolean);
885
+ classes.forEach((className) => {
886
+ if (isSticky) {
887
+ this.renderer.addClass(this.targetElement, className);
888
+ }
889
+ else {
890
+ this.renderer.removeClass(this.targetElement, className);
905
891
  }
892
+ });
893
+ }
894
+ ngOnDestroy() {
895
+ this.parentElement.removeEventListener('scroll', this.onParentScroll);
896
+ window.removeEventListener('resize', this.updateTopOffset.bind(this));
897
+ if (this.mutationObserver) {
898
+ this.mutationObserver.disconnect();
906
899
  }
907
- this.cache = context.getGroups();
908
900
  }
909
- async getListAsync(scope) {
910
- await this.load();
911
- return this.getList(scope);
912
- }
913
- getList(scope) {
914
- if (!this.cache) {
915
- return [];
916
- }
917
- const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
918
- const filterByScope = (groups, currentScope) => {
919
- const currentScopeIndex = scopeOrder.indexOf(currentScope);
920
- return groups
921
- .map((group) => ({
922
- ...group,
923
- sections: group.sections.map((section) => ({
924
- ...section,
925
- settings: section.settings.filter((setting) => {
926
- const settingScopeIndex = scopeOrder.indexOf(setting.scope);
927
- // Include settings where:
928
- // 1. The scope matches the requested scope.
929
- if (setting.scope === currentScope)
930
- return true;
931
- // 2. The setting scope is higher (closer to 'U') and is inherited.
932
- if (setting.isInherited &&
933
- settingScopeIndex > currentScopeIndex // Higher scope
934
- ) {
935
- return true;
936
- }
937
- // 3. Exclude settings with a lower or irrelevant scope.
938
- return false;
939
- }),
940
- })).filter((section) => section.settings.length > 0), // Keep only sections with settings
941
- groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
942
- }))
943
- .filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
944
- };
945
- return filterByScope(this.cache, scope);
901
+ 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 }); }
902
+ 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 }); }
903
+ }
904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, decorators: [{
905
+ type: Directive,
906
+ args: [{
907
+ selector: '[axpSticky]',
908
+ exportAs: 'axpSticky',
909
+ standalone: true,
910
+ }]
911
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { stickyClass: [{
912
+ type: Input,
913
+ args: ['axpSticky']
914
+ }], stickyOffset: [{
915
+ type: Input,
916
+ args: ['stickyOffset']
917
+ }], isStickyChange: [{
918
+ type: Output
919
+ }], stickyParent: [{
920
+ type: Input
921
+ }], stickyTarget: [{
922
+ type: Input
923
+ }] } });
924
+
925
+ class AXPComponentSlotRegistryService {
926
+ constructor() {
927
+ this.registry = new Map();
946
928
  }
947
- async defaultValues() {
948
- const defaults = {};
949
- const collectDefaults = (groups) => {
950
- groups.forEach((group) => {
951
- group.sections.forEach((section) => {
952
- section.settings.forEach((setting) => {
953
- if (setting.defaultValue !== undefined) {
954
- defaults[setting.name] = setting.defaultValue;
955
- }
956
- });
957
- });
958
- collectDefaults(group.groups);
959
- });
960
- };
961
- if (!this.cache) {
962
- await this.load();
929
+ register(slotName, config) {
930
+ let configs = this.registry.get(slotName) || [];
931
+ // Check if the component is already registered in this slot
932
+ const isDuplicate = configs.some(existingConfig => existingConfig.name === config.name);
933
+ if (!isDuplicate) {
934
+ configs = [...configs, config]; // Add the new configuration
935
+ this.registry.set(slotName, configs);
963
936
  }
964
- collectDefaults(this.cache);
965
- return defaults;
966
- }
967
- findGroup(scope, groupName) {
968
- return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
969
937
  }
970
- searchRecursive(groups, groupName, breadcrumb) {
971
- for (const group of groups) {
972
- const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
973
- // If the group name matches, return its details
974
- if (group.name === groupName) {
975
- return {
976
- breadcrumb: currentBreadcrumb,
977
- sections: group.sections.length > 0 ? group.sections : null,
978
- groups: group.groups.length > 0 ? group.groups : null,
979
- };
980
- }
981
- // Recursively search in nested groups
982
- const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
983
- if (nestedResult.breadcrumb.length > 0) {
984
- return nestedResult;
985
- }
986
- }
987
- // If no matching group is found
988
- return {
989
- breadcrumb: [],
990
- groups: [],
991
- sections: []
992
- };
938
+ get(slotName) {
939
+ return this.registry.get(slotName) || [];
993
940
  }
994
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
995
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
941
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
942
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
996
943
  }
997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
998
945
  type: Injectable,
999
- args: [{ providedIn: 'root' }]
946
+ args: [{
947
+ providedIn: 'root'
948
+ }]
1000
949
  }] });
1001
- class AXPSettingDefaultValueProvider {
1002
- constructor() {
1003
- this.definitionProvider = inject(AXPSettingDefinitionProviderService);
1004
- }
1005
- get scope() {
1006
- return AXPSettingScope.Global;
1007
- }
1008
- async load() {
1009
- return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
1010
- }
1011
- set(key, value) {
1012
- throw new Error('Method not implemented.');
1013
- }
1014
- }
1015
950
 
1016
- const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
1017
- providedIn: 'root',
1018
- factory: () => {
1019
- return [
1020
- //new AXPSettingDefaultValueProvider(),
1021
- new AXPSettingValueProviderDefault(AXPSettingScope.Tenant),
1022
- new AXPSettingValueProviderDefault(AXPSettingScope.User)
1023
- ];
1024
- }
1025
- });
1026
- class AXPSettingValueProviderDefault {
1027
- get scope() {
1028
- return this._scope;
1029
- }
1030
- constructor(_scope) {
1031
- this._scope = _scope;
1032
- this.cache = new Map();
1033
- this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
951
+ class AXPComponentSlotLoaderService {
952
+ constructor(registryService, injector) {
953
+ this.registryService = registryService;
954
+ this.injector = injector;
1034
955
  }
1035
- async load() {
1036
- // Load settings from localStorage as a single key
1037
- const storedSettings = localStorage.getItem(this.localStorageKey);
1038
- if (storedSettings) {
1039
- const parsedSettings = JSON.parse(storedSettings);
1040
- Object.entries(parsedSettings).forEach(([key, value]) => {
1041
- this.cache.set(key, value);
956
+ loadComponent(slotName, viewContainerRef) {
957
+ const configs = sortBy(this.registryService.get(slotName), (c) => c.priority ?? 0);
958
+ if (configs) {
959
+ viewContainerRef.clear();
960
+ configs.forEach(async (config) => {
961
+ let component;
962
+ let options = {};
963
+ if (typeof config.loadComponent === 'function') {
964
+ // If component is a function
965
+ runInInjectionContext(this.injector, () => {
966
+ component = config.loadComponent?.();
967
+ });
968
+ }
969
+ else if (config.component) {
970
+ // If component is a Type
971
+ component = config.component;
972
+ }
973
+ //
974
+ if (typeof config.options === 'function') {
975
+ // If options is a function
976
+ runInInjectionContext(this.injector, () => {
977
+ const fun = config.options;
978
+ options = fun();
979
+ });
980
+ }
981
+ else if (config.options) {
982
+ // If options is a object
983
+ options = config.options;
984
+ }
985
+ //
986
+ if (component != null) {
987
+ const componentRef = viewContainerRef.createComponent(component);
988
+ Object.assign(componentRef.instance, options);
989
+ }
1042
990
  });
1043
- return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
1044
991
  }
1045
- return Promise.resolve([]);
1046
992
  }
1047
- async set(keyOrValues, value) {
1048
- if (typeof keyOrValues === 'string') {
1049
- // Single value update
1050
- this.cache.set(keyOrValues, value);
1051
- }
1052
- else {
1053
- // Bulk update
1054
- for (const [key, val] of Object.entries(keyOrValues)) {
1055
- this.cache.set(key, val);
1056
- }
1057
- }
1058
- await this.saveToLocalStorage();
993
+ 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 }); }
994
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, providedIn: 'root' }); }
995
+ }
996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, decorators: [{
997
+ type: Injectable,
998
+ args: [{
999
+ providedIn: 'root',
1000
+ }]
1001
+ }], ctorParameters: () => [{ type: AXPComponentSlotRegistryService }, { type: i0.Injector }] });
1002
+
1003
+ class AXPComponentSlotDirective {
1004
+ constructor(dynamicLoaderService, viewContainerRef) {
1005
+ this.dynamicLoaderService = dynamicLoaderService;
1006
+ this.viewContainerRef = viewContainerRef;
1059
1007
  }
1060
- async saveToLocalStorage() {
1061
- const settingsObject = {};
1062
- this.cache.forEach((value, key) => {
1063
- settingsObject[key] = value;
1064
- });
1065
- localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
1008
+ ngOnInit() {
1009
+ this.dynamicLoaderService.loadComponent(this.name, this.viewContainerRef);
1066
1010
  }
1011
+ 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 }); }
1012
+ 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 }); }
1067
1013
  }
1014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
1015
+ type: Directive,
1016
+ args: [{
1017
+ selector: 'axp-component-slot',
1018
+ standalone: false
1019
+ }]
1020
+ }], ctorParameters: () => [{ type: AXPComponentSlotLoaderService }, { type: i0.ViewContainerRef }], propDecorators: { name: [{
1021
+ type: Input
1022
+ }] } });
1068
1023
 
1069
- class AXPSettingValueProviderService {
1070
- constructor() {
1071
- this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
1072
- this.definitionService = inject(AXPSettingDefinitionProviderService);
1073
- this.scopedSettingsCache = new Map();
1074
- this.onChanged = new Subject();
1075
- // Initialize scoped caches for dynamic scopes
1076
- const staticScopes = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User];
1077
- staticScopes.forEach((scope) => {
1078
- if (!this.scopedSettingsCache.has(scope)) {
1079
- this.scopedSettingsCache.set(scope, new Map());
1080
- }
1081
- });
1082
- }
1083
- async load() {
1084
- try {
1085
- const settingsList = [];
1086
- for (const provider of this.providers) {
1087
- const scopeCache = this.scopedSettingsCache.get(provider.scope);
1088
- const providerSettings = await provider.load();
1089
- providerSettings.forEach((setting) => {
1090
- scopeCache.set(setting.key, setting.value);
1091
- });
1092
- settingsList.push(...providerSettings);
1093
- }
1094
- return settingsList;
1095
- }
1096
- catch (error) {
1097
- console.error('Error loading settings', error);
1098
- throw error;
1099
- }
1100
- }
1101
- async get(key) {
1102
- if (this.scopedSettingsCache.size === 0) {
1103
- await this.load();
1104
- }
1105
- const scopeOrder = [AXPSettingScope.User, AXPSettingScope.Tenant, AXPSettingScope.Global, AXPSettingScope.Environment];
1106
- for (const scope of scopeOrder) {
1107
- const scopeCache = this.scopedSettingsCache.get(scope);
1108
- if (scopeCache && scopeCache.has(key)) {
1109
- const value = scopeCache.get(key);
1110
- if (value !== undefined && value !== null) {
1111
- return cloneDeep(value);
1024
+ class AXPComponentSlotModule {
1025
+ static forRoot(configs) {
1026
+ return {
1027
+ ngModule: AXPComponentSlotModule,
1028
+ providers: [
1029
+ {
1030
+ provide: 'AXPComponentSlotModuleFactory',
1031
+ useFactory: (registry) => () => {
1032
+ if (configs) {
1033
+ for (const [key, value] of Object.entries(configs)) {
1034
+ value.forEach(v => {
1035
+ registry.register(key, v);
1036
+ });
1037
+ }
1038
+ }
1039
+ },
1040
+ deps: [AXPComponentSlotRegistryService],
1041
+ multi: true
1112
1042
  }
1113
- }
1114
- }
1115
- const defaults = await this.definitionService.defaultValues();
1116
- return get(defaults, key); // Fallback if no value is found
1043
+ ]
1044
+ };
1117
1045
  }
1118
- async defaultValues(scope) {
1119
- let scopeOrder = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User].reverse();
1120
- const scopeIndex = scopeOrder.indexOf(scope);
1121
- if (scopeIndex === -1) {
1122
- throw new Error(`Invalid scope: ${scope}`);
1123
- }
1124
- scopeOrder = scopeOrder.slice(scopeIndex + 1);
1125
- // Accumulate defaults from the current scope and higher scopes
1126
- const accumulatedDefaults = {};
1127
- for (let i = scopeIndex; i < scopeOrder.length; i++) {
1128
- const currentScope = scopeOrder[i];
1129
- const scopeCache = this.scopedSettingsCache.get(currentScope);
1130
- if (scopeCache) {
1131
- scopeCache.forEach((value, key) => {
1132
- if (!(key in accumulatedDefaults)) {
1133
- accumulatedDefaults[key] = value;
1134
- }
1135
- });
1136
- }
1137
- }
1138
- // Merge with global default values from the definition service
1139
- const globalDefaults = await this.definitionService.defaultValues();
1140
- return { ...globalDefaults, ...accumulatedDefaults };
1046
+ static forChild(configs) {
1047
+ return {
1048
+ ngModule: AXPComponentSlotModule,
1049
+ providers: [
1050
+ {
1051
+ provide: 'AXPComponentSlotModuleFactory',
1052
+ useFactory: (registry) => () => {
1053
+ if (configs) {
1054
+ for (const [key, value] of Object.entries(configs)) {
1055
+ value.forEach(v => {
1056
+ registry.register(key, v);
1057
+ });
1058
+ }
1059
+ }
1060
+ },
1061
+ deps: [AXPComponentSlotRegistryService],
1062
+ multi: true
1063
+ }
1064
+ ]
1065
+ };
1141
1066
  }
1142
- scope(scope) {
1143
- const provider = this.providers.find((p) => p.scope === scope);
1144
- if (!provider) {
1145
- throw new Error(`No provider found for scope: ${scope}`);
1146
- }
1147
- return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
1067
+ /**
1068
+ * @ignore
1069
+ */
1070
+ constructor(instances) {
1071
+ instances?.forEach(f => {
1072
+ f();
1073
+ });
1148
1074
  }
1149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1150
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, providedIn: 'root' }); }
1075
+ 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 }); }
1076
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
1077
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule }); }
1151
1078
  }
1152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, decorators: [{
1153
- type: Injectable,
1079
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
1080
+ type: NgModule,
1154
1081
  args: [{
1155
- providedIn: 'root',
1082
+ declarations: [AXPComponentSlotDirective],
1083
+ exports: [AXPComponentSlotDirective]
1156
1084
  }]
1157
- }], ctorParameters: () => [] });
1158
- class ScopedSettingService {
1159
- constructor(parent, provider, onChanged, scopeCache) {
1160
- this.parent = parent;
1161
- this.provider = provider;
1162
- this.onChanged = onChanged;
1163
- this.scopeCache = scopeCache;
1164
- }
1165
- async get(key) {
1166
- const settings = await this.provider.load();
1167
- const setting = settings.find((s) => s.key === key);
1168
- return setting ? cloneDeep(setting.value) : undefined;
1085
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1086
+ type: Optional
1087
+ }, {
1088
+ type: Inject,
1089
+ args: ['AXPComponentSlotModuleFactory']
1090
+ }] }] });
1091
+
1092
+ class AXPTextLogoConfig {
1093
+ constructor(text) {
1094
+ this.text = text;
1169
1095
  }
1170
- async all() {
1171
- const settings = await this.provider.load();
1172
- return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
1096
+ }
1097
+ class AXPImageUrlLogoConfig {
1098
+ constructor(url) {
1099
+ this.url = url;
1173
1100
  }
1174
- async defaultValues() {
1175
- return this.parent.defaultValues(this.provider.scope);
1101
+ }
1102
+ class AXPFontIconLogoConfig {
1103
+ constructor(iconClass) {
1104
+ this.iconClass = iconClass;
1176
1105
  }
1177
- async set(keyOrValues, value) {
1178
- if (typeof keyOrValues === 'string') {
1179
- // Single key-value pair
1180
- await this.provider.set(keyOrValues, value);
1181
- this.scopeCache.set(keyOrValues, value); // Sync the cache
1182
- this.onChanged.next({
1183
- scope: this.provider.scope,
1184
- keys: [keyOrValues],
1185
- values: { [keyOrValues]: value },
1186
- entries: [{ key: keyOrValues, value }],
1187
- });
1188
- }
1189
- else {
1190
- // Multiple key-value pairs
1191
- await this.provider.set(keyOrValues);
1192
- Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
1193
- const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
1194
- this.onChanged.next({
1195
- scope: this.provider.scope,
1196
- keys: Object.keys(keyOrValues),
1197
- values: keyOrValues,
1198
- entries,
1199
- });
1200
- }
1106
+ }
1107
+ class AXPComponentLogoConfig {
1108
+ constructor(component) {
1109
+ this.component = component;
1201
1110
  }
1202
1111
  }
1203
1112
 
1204
- const AXPNavigateAction = createAction('[Navigate] Action', props());
1205
- const AXPSignOutAction = createAction('[SignOut] Action');
1206
- const AXPSignInAction = createAction('[SignIn] Action');
1207
-
1208
- class AXPCommonEffects {
1209
- constructor(actions$, router, settingService) {
1210
- this.actions$ = actions$;
1211
- this.router = router;
1212
- this.settingService = settingService;
1213
- this.command$ = createEffect(() => this.actions$.pipe(ofType(AXPNavigateAction), switchMap((action) => {
1214
- if (Array.isArray(action.payload.commands))
1215
- this.router.navigate(action.payload.commands, action.payload.extras);
1216
- else {
1217
- if (action.payload.commands.toLowerCase().startsWith('http'))
1218
- window.open(action.payload.commands, '_blank');
1219
- else
1220
- this.router.navigate([action.payload.commands], action.payload.extras);
1221
- }
1222
- return of();
1223
- })), { dispatch: false });
1113
+ class AXPLogoComponent {
1114
+ ngOnInit() {
1115
+ switch (true) {
1116
+ case this.source instanceof AXPTextLogoConfig:
1117
+ this.logoType = 'text';
1118
+ break;
1119
+ case this.source instanceof AXPImageUrlLogoConfig:
1120
+ this.logoType = 'url';
1121
+ break;
1122
+ case this.source instanceof AXPFontIconLogoConfig:
1123
+ this.logoType = 'iconClass';
1124
+ break;
1125
+ case this.source instanceof AXPComponentLogoConfig:
1126
+ this.logoType = 'component';
1127
+ break;
1128
+ default:
1129
+ break;
1130
+ }
1224
1131
  }
1225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects, deps: [{ token: i1.Actions }, { token: i2.Router }, { token: AXPSettingValueProviderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1226
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects }); }
1132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1133
+ 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: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
1227
1134
  }
1228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects, decorators: [{
1229
- type: Injectable
1230
- }], ctorParameters: () => [{ type: i1.Actions }, { type: i2.Router }, { type: AXPSettingValueProviderService }] });
1135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, decorators: [{
1136
+ type: Component,
1137
+ 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}" }]
1138
+ }], propDecorators: { source: [{
1139
+ type: Input
1140
+ }] } });
1231
1141
 
1232
- //TODO Loading, Redirect, Drawer, Show toast
1233
- const AXPRedirectEvent = createWorkFlowEvent('Redirect Event Fired');
1234
- const AXPRefreshEvent = createWorkFlowEvent('Refresh Event Fired');
1235
- class AXPWorkflowNavigateAction extends AXPWorkflowAction {
1142
+ const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
1143
+ class AXPMenuProviderService {
1236
1144
  constructor() {
1237
- super(...arguments);
1238
- this.router = inject(Router);
1145
+ this.providers = inject(AXP_MENU_PROVIDER, { optional: true });
1146
+ this.cache = null;
1147
+ this.pendingInserts = [];
1148
+ this.pendingRemovals = [];
1149
+ this.pendingUpdates = [];
1150
+ this.pendingAdditions = [];
1239
1151
  }
1240
- async execute(context) {
1241
- const payload = context.getVariable('payload');
1242
- if (Array.isArray(payload.commands)) {
1243
- this.router.navigate(payload.commands, payload.extras);
1152
+ async items() {
1153
+ // Return cached items if available
1154
+ if (this.cache) {
1155
+ return this.cache;
1244
1156
  }
1245
- else {
1246
- if (payload.commands.toLowerCase().startsWith('http') || payload.target == 'blank') {
1247
- window.open(payload.commands, '_blank');
1248
- }
1249
- else
1250
- this.router.navigate([payload.commands], payload.extras);
1251
- }
1252
- }
1253
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1254
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction }); }
1255
- }
1256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
1257
- type: Injectable
1258
- }] });
1259
- class AXPDialogConfirmAction extends AXPWorkflowAction {
1260
- constructor() {
1261
- super(...arguments);
1262
- this.dialogService = inject(AXDialogService);
1263
- this.translationService = inject(AXTranslationService);
1264
- }
1265
- async execute(context) {
1266
- context.setOutput('result', false);
1267
- const dialogResult = await this.dialogService.confirm(await this.translationService.translateAsync(this.title), await this.translationService.translateAsync(this.message), (await this.translationService.translateAsync(this.type)));
1268
- context.setOutput('result', dialogResult.result);
1269
- }
1270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1271
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction }); }
1272
- }
1273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
1274
- type: Injectable
1275
- }] });
1276
- class AXPToastAction extends AXPWorkflowAction {
1277
- constructor() {
1278
- super(...arguments);
1279
- this.toastService = inject(AXToastService);
1280
- this.translationService = inject(AXTranslationService);
1281
- }
1282
- async execute(context) {
1283
- this.toastService.show({
1284
- color: this.color,
1285
- title: await this.translationService.translateAsync(this.title),
1286
- content: await this.translationService.translateAsync(this.content),
1287
- closeButton: true,
1288
- timeOut: 3000,
1289
- timeOutProgress: true,
1290
- });
1291
- }
1292
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1293
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction }); }
1294
- }
1295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction, decorators: [{
1296
- type: Injectable
1297
- }] });
1298
-
1299
- class AXMWorkflowErrorHandler {
1300
- constructor() {
1301
- this.dialog = inject(AXDialogService);
1302
- }
1303
- handleError(error, next) {
1304
- if (error instanceof AXPWorkflowError) {
1305
- this.dialog.alert("Somthing is wrong!", error.inner ? error.inner.message : error.message, 'danger');
1306
- next(error);
1307
- }
1308
- else {
1309
- next(error);
1310
- }
1311
- }
1312
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1313
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler }); }
1314
- }
1315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
1316
- type: Injectable
1317
- }] });
1318
-
1319
- class AXPCommonModule {
1320
- static forRoot(configs) {
1321
- return {
1322
- ngModule: AXPCommonModule,
1323
- providers: [
1324
- ...(configs?.errorHandlers || []),
1325
- {
1326
- provide: 'AXPCommonModuleFactory',
1327
- useFactory: (registry) => () => {
1328
- registry.register(...(configs?.errorHandlers || []));
1329
- },
1330
- deps: [AXPErrorHandlerRegistryService],
1331
- multi: true,
1332
- },
1333
- ],
1334
- };
1335
- }
1336
- static forChild(configs) {
1337
- return {
1338
- ngModule: AXPCommonModule,
1339
- providers: [
1340
- ...(configs?.errorHandlers || []),
1341
- {
1342
- provide: 'AXPCommonModuleFactory',
1343
- useFactory: (registry) => () => {
1344
- registry.register(...(configs?.errorHandlers || []));
1345
- },
1346
- deps: [AXPErrorHandlerRegistryService],
1347
- multi: true,
1348
- },
1349
- ],
1350
- };
1351
- }
1352
- /**
1353
- * @ignore
1354
- */
1355
- constructor(instances, appInitService, settingsService, seederService) {
1356
- instances.forEach((f) => {
1357
- f();
1358
- });
1359
- // appInitService.registerTask({
1360
- // name: 'Modules',
1361
- // statusText: 'Initializing Modules ...',
1362
- // run: () =>
1363
- // new Promise<void>((resolve) => {
1364
- // setTimeout(() => {
1365
- // resolve();
1366
- // }, 250);
1367
- // }),
1368
- // });
1369
- //
1370
- appInitService.registerTask({
1371
- name: 'Settings',
1372
- statusText: 'Loading Settings ...',
1373
- run: async () => {
1374
- await settingsService.load();
1375
- },
1376
- });
1377
- //
1378
- //
1379
- appInitService.registerTask({
1380
- name: 'Seeder',
1381
- statusText: 'Seed Data ...',
1382
- run: async () => {
1383
- await seederService.seed();
1384
- },
1385
- });
1386
- }
1387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }, { token: AXPAppStartUpService }, { token: AXPSettingValueProviderService }, { token: AXPDataSeederService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1388
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, imports: [i1.EffectsFeatureModule, i5.AXPWorkflowModule, AXPopupModule,
1389
- AXDateTimeModule,
1390
- AXToastModule], exports: [RouterModule] }); }
1391
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, providers: [
1392
- AXPAppStartUpProvider,
1393
- {
1394
- provide: ErrorHandler,
1395
- useClass: AXPGlobalErrorHandler,
1396
- },
1397
- {
1398
- provide: AXPCustomOperatorService,
1399
- useClass: AXPCustomOperatorServiceImpl,
1400
- },
1401
- {
1402
- provide: AXPFilterOperatorMiddlewareService,
1403
- useClass: AXPFilterOperatorMiddlewareServiceImpl,
1404
- },
1405
- ], imports: [EffectsModule.forFeature([AXPCommonEffects]),
1406
- AXPWorkflowModule.forChild({
1407
- actions: {
1408
- navigate: AXPDialogConfirmAction,
1409
- 'show-prompt-dialog': AXPDialogConfirmAction,
1410
- 'show-toast': AXPToastAction,
1411
- },
1412
- }),
1413
- AXPopupModule,
1414
- AXDateTimeModule,
1415
- AXToastModule, RouterModule] }); }
1416
- }
1417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, decorators: [{
1418
- type: NgModule,
1419
- args: [{
1420
- imports: [
1421
- EffectsModule.forFeature([AXPCommonEffects]),
1422
- AXPWorkflowModule.forChild({
1423
- actions: {
1424
- navigate: AXPDialogConfirmAction,
1425
- 'show-prompt-dialog': AXPDialogConfirmAction,
1426
- 'show-toast': AXPToastAction,
1427
- },
1428
- }),
1429
- AXPopupModule,
1430
- AXDateTimeModule,
1431
- AXToastModule,
1432
- ],
1433
- exports: [RouterModule],
1434
- providers: [
1435
- AXPAppStartUpProvider,
1436
- {
1437
- provide: ErrorHandler,
1438
- useClass: AXPGlobalErrorHandler,
1439
- },
1440
- {
1441
- provide: AXPCustomOperatorService,
1442
- useClass: AXPCustomOperatorServiceImpl,
1443
- },
1444
- {
1445
- provide: AXPFilterOperatorMiddlewareService,
1446
- useClass: AXPFilterOperatorMiddlewareServiceImpl,
1447
- },
1448
- ],
1449
- }]
1450
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1451
- type: Inject,
1452
- args: ['AXPCommonModuleFactory']
1453
- }] }, { type: AXPAppStartUpService }, { type: AXPSettingValueProviderService }, { type: AXPDataSeederService }] });
1454
-
1455
- class AXPTextLogoConfig {
1456
- constructor(text) {
1457
- this.text = text;
1458
- }
1459
- }
1460
- class AXPImageUrlLogoConfig {
1461
- constructor(url) {
1462
- this.url = url;
1463
- }
1464
- }
1465
- class AXPFontIconLogoConfig {
1466
- constructor(iconClass) {
1467
- this.iconClass = iconClass;
1468
- }
1469
- }
1470
- class AXPComponentLogoConfig {
1471
- constructor(component) {
1472
- this.component = component;
1473
- }
1474
- }
1475
-
1476
- const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
1477
- const AXP_PLATFORM_CONFIG_TOKEN = new InjectionToken('AXP_PLATFORM_CONFIG_TOKEN', {
1478
- providedIn: 'root',
1479
- factory: () => {
1480
- return AXPPlatformDefaultConfigs;
1481
- },
1482
- });
1483
- const AXPPlatformDefaultConfigs = {
1484
- copyright: 'ACoreX @ 2024',
1485
- title: 'ACoreX Platform',
1486
- logo: {
1487
- dark: new AXPTextLogoConfig('ACoreX'),
1488
- light: new AXPTextLogoConfig('ACoreX'),
1489
- colored: new AXPTextLogoConfig('ACoreX'),
1490
- },
1491
- network: {
1492
- timeOut: 5000,
1493
- }
1494
- };
1495
- function configPlatform(config = AXPPlatformDefaultConfigs) {
1496
- return merge(AXPPlatformDefaultConfigs, config);
1497
- }
1498
-
1499
- const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
1500
-
1501
- class AXPFiltersProviderService {
1502
- async getAll() {
1503
- return Promise.resolve('');
1504
- }
1505
- async execute() {
1506
- return Promise.resolve('');
1507
- }
1508
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1509
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, providedIn: 'root' }); }
1510
- }
1511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, decorators: [{
1512
- type: Injectable,
1513
- args: [{
1514
- providedIn: 'root',
1515
- }]
1516
- }] });
1517
-
1518
- // src/app/directives/grid-layout.directive.ts
1519
- class AXPGridLayoutDirective {
1520
- constructor(el, renderer) {
1521
- this.el = el;
1522
- this.renderer = renderer;
1523
- }
1524
- ngOnChanges(changes) {
1525
- if (changes['options']) {
1526
- this.applyTailwindClasses();
1527
- }
1528
- }
1529
- applyTailwindClasses() {
1530
- // Clear existing grid classes
1531
- this.clearClasses();
1532
- // Apply new grid classes based on the input options
1533
- this.setClasses(this.options.positions?.default, '');
1534
- this.setClasses(this.options.positions?.md, 'md:');
1535
- this.setClasses(this.options.positions?.lg, 'lg:');
1536
- this.setClasses(this.options.positions?.xl, 'xl:');
1537
- this.setClasses(this.options.positions?.xxl, '2xl:');
1538
- }
1539
- setClasses(positions, prefix) {
1540
- if (positions == null)
1541
- return;
1542
- const colStart = positions.colStart ? `${prefix}ax-col-start-${positions.colStart}` : '';
1543
- const colEnd = positions.colEnd ? `${prefix}ax-col-end-${positions.colEnd}` : '';
1544
- const colSpan = positions.colSpan ? `${prefix}ax-col-span-${positions.colSpan}` : '';
1545
- const rowStart = positions.rowStart ? `${prefix}ax-row-start-${positions.rowStart}` : '';
1546
- const rowEnd = positions.rowEnd ? `${prefix}ax-row-end-${positions.rowEnd}` : '';
1547
- const rowSpan = positions.rowSpan ? `${prefix}ax-row-span-${positions.rowSpan}` : '';
1548
- const order = positions.order ? `${prefix}ax-order-${positions.order}` : ''; // Handling order
1549
- [colStart, colEnd, colSpan, rowStart, rowEnd, rowSpan, order].forEach(cls => {
1550
- if (cls) {
1551
- this.renderer.addClass(this.el.nativeElement, cls);
1552
- }
1553
- });
1554
- }
1555
- clearClasses() {
1556
- const currentClasses = this.el.nativeElement.className.split(' ');
1557
- currentClasses.forEach((className) => {
1558
- if (className.startsWith('ax-col-') || className.startsWith('ax-row-') || className.startsWith('ax-order-')) {
1559
- this.renderer.removeClass(this.el.nativeElement, className);
1560
- }
1561
- });
1562
- }
1563
- 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 }); }
1564
- 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 }); }
1565
- }
1566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
1567
- type: Directive,
1568
- args: [{
1569
- selector: '[gridLayout]',
1570
- standalone: true,
1571
- }]
1572
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{
1573
- type: Input,
1574
- args: ['gridLayout']
1575
- }] } });
1576
-
1577
- class AXPStickyDirective {
1578
- get isSticky() {
1579
- return this._isSticky;
1580
- }
1581
- set isSticky(value) {
1582
- if (this._isSticky !== value) {
1583
- this._isSticky = value;
1584
- this.isStickyChange.emit(value);
1585
- }
1586
- }
1587
- constructor(element, renderer, zone, cdr) {
1588
- this.element = element;
1589
- this.renderer = renderer;
1590
- this.zone = zone;
1591
- this.cdr = cdr;
1592
- this.stickyOffset = 100;
1593
- this.isStickyChange = new EventEmitter();
1594
- this._isSticky = false;
1595
- this.onParentScroll = () => {
1596
- this.zone.runOutsideAngular(() => {
1597
- const scrollTop = this.parentElement === window
1598
- ? window.scrollY
1599
- : this.parentElement.scrollTop;
1600
- const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
1601
- if (shouldStick !== this.isSticky) {
1602
- this.zone.run(() => {
1603
- this.isSticky = shouldStick;
1604
- this.toggleStickyClasses(shouldStick);
1605
- this.cdr.markForCheck();
1606
- });
1607
- }
1608
- });
1609
- };
1610
- }
1611
- ngAfterViewInit() {
1612
- this.initSticky();
1613
- // Add mutation observer for dynamic content
1614
- this.mutationObserver = new MutationObserver(() => {
1615
- this.updateTopOffset();
1616
- });
1617
- this.mutationObserver.observe(this.element.nativeElement, {
1618
- childList: true,
1619
- subtree: true,
1620
- });
1621
- // Add resize event listener
1622
- window.addEventListener('resize', this.updateTopOffset.bind(this));
1623
- }
1624
- initSticky() {
1625
- if (this.stickyParent instanceof HTMLElement) {
1626
- this.parentElement = this.stickyParent;
1627
- }
1628
- else {
1629
- this.parentElement =
1630
- document.querySelector(this.stickyParent) || window;
1631
- }
1632
- this.targetElement =
1633
- document.querySelector(this.stickyTarget) ||
1634
- this.element.nativeElement;
1635
- this.updateTopOffset();
1636
- this.parentElement.addEventListener('scroll', this.onParentScroll);
1637
- }
1638
- updateTopOffset() {
1639
- this.zone.runOutsideAngular(() => {
1640
- const rect = this.targetElement.getBoundingClientRect();
1641
- this.topOffset = rect.top + (window.scrollY || 0);
1642
- });
1643
- }
1644
- toggleStickyClasses(isSticky) {
1645
- const classes = this.stickyClass.split(' ').filter(Boolean);
1646
- classes.forEach((className) => {
1647
- if (isSticky) {
1648
- this.renderer.addClass(this.targetElement, className);
1649
- }
1650
- else {
1651
- this.renderer.removeClass(this.targetElement, className);
1652
- }
1653
- });
1654
- }
1655
- ngOnDestroy() {
1656
- this.parentElement.removeEventListener('scroll', this.onParentScroll);
1657
- window.removeEventListener('resize', this.updateTopOffset.bind(this));
1658
- if (this.mutationObserver) {
1659
- this.mutationObserver.disconnect();
1660
- }
1661
- }
1662
- 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 }); }
1663
- 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 }); }
1664
- }
1665
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, decorators: [{
1666
- type: Directive,
1667
- args: [{
1668
- selector: '[axpSticky]',
1669
- exportAs: 'axpSticky',
1670
- standalone: true,
1671
- }]
1672
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { stickyClass: [{
1673
- type: Input,
1674
- args: ['axpSticky']
1675
- }], stickyOffset: [{
1676
- type: Input,
1677
- args: ['stickyOffset']
1678
- }], isStickyChange: [{
1679
- type: Output
1680
- }], stickyParent: [{
1681
- type: Input
1682
- }], stickyTarget: [{
1683
- type: Input
1684
- }] } });
1685
-
1686
- class AXPComponentSlotRegistryService {
1687
- constructor() {
1688
- this.registry = new Map();
1689
- }
1690
- register(slotName, config) {
1691
- let configs = this.registry.get(slotName) || [];
1692
- // Check if the component is already registered in this slot
1693
- const isDuplicate = configs.some(existingConfig => existingConfig.name === config.name);
1694
- if (!isDuplicate) {
1695
- configs = [...configs, config]; // Add the new configuration
1696
- this.registry.set(slotName, configs);
1697
- }
1698
- }
1699
- get(slotName) {
1700
- return this.registry.get(slotName) || [];
1701
- }
1702
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1703
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
1704
- }
1705
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
1706
- type: Injectable,
1707
- args: [{
1708
- providedIn: 'root'
1709
- }]
1710
- }] });
1711
-
1712
- class AXPComponentSlotLoaderService {
1713
- constructor(registryService, injector) {
1714
- this.registryService = registryService;
1715
- this.injector = injector;
1716
- }
1717
- loadComponent(slotName, viewContainerRef) {
1718
- const configs = sortBy(this.registryService.get(slotName), (c) => c.priority ?? 0);
1719
- if (configs) {
1720
- viewContainerRef.clear();
1721
- configs.forEach(async (config) => {
1722
- let component;
1723
- let options = {};
1724
- if (typeof config.loadComponent === 'function') {
1725
- // If component is a function
1726
- runInInjectionContext(this.injector, () => {
1727
- component = config.loadComponent?.();
1728
- });
1729
- }
1730
- else if (config.component) {
1731
- // If component is a Type
1732
- component = config.component;
1733
- }
1734
- //
1735
- if (typeof config.options === 'function') {
1736
- // If options is a function
1737
- runInInjectionContext(this.injector, () => {
1738
- const fun = config.options;
1739
- options = fun();
1740
- });
1741
- }
1742
- else if (config.options) {
1743
- // If options is a object
1744
- options = config.options;
1745
- }
1746
- //
1747
- if (component != null) {
1748
- const componentRef = viewContainerRef.createComponent(component);
1749
- Object.assign(componentRef.instance, options);
1750
- }
1751
- });
1752
- }
1753
- }
1754
- 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 }); }
1755
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, providedIn: 'root' }); }
1756
- }
1757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, decorators: [{
1758
- type: Injectable,
1759
- args: [{
1760
- providedIn: 'root',
1761
- }]
1762
- }], ctorParameters: () => [{ type: AXPComponentSlotRegistryService }, { type: i0.Injector }] });
1763
-
1764
- class AXPComponentSlotDirective {
1765
- constructor(dynamicLoaderService, viewContainerRef) {
1766
- this.dynamicLoaderService = dynamicLoaderService;
1767
- this.viewContainerRef = viewContainerRef;
1768
- }
1769
- ngOnInit() {
1770
- this.dynamicLoaderService.loadComponent(this.name, this.viewContainerRef);
1771
- }
1772
- 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 }); }
1773
- 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 }); }
1774
- }
1775
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
1776
- type: Directive,
1777
- args: [{
1778
- selector: 'axp-component-slot',
1779
- standalone: false
1780
- }]
1781
- }], ctorParameters: () => [{ type: AXPComponentSlotLoaderService }, { type: i0.ViewContainerRef }], propDecorators: { name: [{
1782
- type: Input
1783
- }] } });
1784
-
1785
- class AXPComponentSlotModule {
1786
- static forRoot(configs) {
1787
- return {
1788
- ngModule: AXPComponentSlotModule,
1789
- providers: [
1790
- {
1791
- provide: 'AXPComponentSlotModuleFactory',
1792
- useFactory: (registry) => () => {
1793
- if (configs) {
1794
- for (const [key, value] of Object.entries(configs)) {
1795
- value.forEach(v => {
1796
- registry.register(key, v);
1797
- });
1798
- }
1799
- }
1800
- },
1801
- deps: [AXPComponentSlotRegistryService],
1802
- multi: true
1803
- }
1804
- ]
1805
- };
1806
- }
1807
- static forChild(configs) {
1808
- return {
1809
- ngModule: AXPComponentSlotModule,
1810
- providers: [
1811
- {
1812
- provide: 'AXPComponentSlotModuleFactory',
1813
- useFactory: (registry) => () => {
1814
- if (configs) {
1815
- for (const [key, value] of Object.entries(configs)) {
1816
- value.forEach(v => {
1817
- registry.register(key, v);
1818
- });
1819
- }
1820
- }
1821
- },
1822
- deps: [AXPComponentSlotRegistryService],
1823
- multi: true
1824
- }
1825
- ]
1826
- };
1827
- }
1828
- /**
1829
- * @ignore
1830
- */
1831
- constructor(instances) {
1832
- instances?.forEach(f => {
1833
- f();
1834
- });
1835
- }
1836
- 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 }); }
1837
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
1838
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule }); }
1839
- }
1840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
1841
- type: NgModule,
1842
- args: [{
1843
- declarations: [AXPComponentSlotDirective],
1844
- exports: [AXPComponentSlotDirective]
1845
- }]
1846
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1847
- type: Optional
1848
- }, {
1849
- type: Inject,
1850
- args: ['AXPComponentSlotModuleFactory']
1851
- }] }] });
1852
-
1853
- class AXPLogoComponent {
1854
- ngOnInit() {
1855
- switch (true) {
1856
- case this.source instanceof AXPTextLogoConfig:
1857
- this.logoType = 'text';
1858
- break;
1859
- case this.source instanceof AXPImageUrlLogoConfig:
1860
- this.logoType = 'url';
1861
- break;
1862
- case this.source instanceof AXPFontIconLogoConfig:
1863
- this.logoType = 'iconClass';
1864
- break;
1865
- case this.source instanceof AXPComponentLogoConfig:
1866
- this.logoType = 'component';
1867
- break;
1868
- default:
1869
- break;
1870
- }
1871
- }
1872
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1873
- 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$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "component", type: i2$1.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
1874
- }
1875
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, decorators: [{
1876
- type: Component,
1877
- 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}" }]
1878
- }], propDecorators: { source: [{
1879
- type: Input
1880
- }] } });
1881
-
1882
- const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
1883
- class AXPMenuProviderService {
1884
- constructor() {
1885
- this.providers = inject(AXP_MENU_PROVIDER, { optional: true });
1886
- this.cache = null;
1887
- this.pendingInserts = [];
1888
- this.pendingRemovals = [];
1889
- this.pendingUpdates = [];
1890
- this.pendingAdditions = [];
1891
- }
1892
- async items() {
1893
- // Return cached items if available
1894
- if (this.cache) {
1895
- return this.cache;
1896
- }
1897
- const items = [];
1898
- const context = this.createMenuProviderContext(items);
1899
- if (Array.isArray(this.providers)) {
1900
- for (const provider of this.providers) {
1901
- await provider.provide(context);
1157
+ const items = [];
1158
+ const context = this.createMenuProviderContext(items);
1159
+ if (Array.isArray(this.providers)) {
1160
+ for (const provider of this.providers) {
1161
+ await provider.provide(context);
1902
1162
  }
1903
1163
  }
1904
1164
  // Apply pending operations
@@ -2026,7 +1286,7 @@ withState((router = inject(Router)) => {
2026
1286
  };
2027
1287
  }),
2028
1288
  // Methods for State Management
2029
- withMethods((store, router = inject(Router), globalStore = inject(Store)) => {
1289
+ withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowService)) => {
2030
1290
  return {
2031
1291
  setMenuItems(items) {
2032
1292
  patchState(store, { items: items });
@@ -2084,1227 +1344,1164 @@ withMethods((store, router = inject(Router), globalStore = inject(Store)) => {
2084
1344
  patchState(store, { selectedMenuItem: { item, isFullMatch: !isPartialMatch } });
2085
1345
  },
2086
1346
  executeCommand(item) {
1347
+ if (item.path) {
1348
+ workflow.execute('navigate', { command: { type: 'router', options: { path: item.path } } });
1349
+ }
2087
1350
  if (item.command) {
2088
- globalStore.dispatch(item.command);
1351
+ workflow.execute('navigate', { command: item.command });
1352
+ }
1353
+ patchState(store, { selectedMenuItem: { item, isFullMatch: true } });
1354
+ },
1355
+ isItemOpen(item) {
1356
+ const selectedItem = store.selectedMenuItem();
1357
+ if (!selectedItem) {
1358
+ return false;
1359
+ }
1360
+ const findParent = (currentItem, targetItem) => {
1361
+ if (currentItem.children?.includes(targetItem)) {
1362
+ return true;
1363
+ }
1364
+ return currentItem.children?.some(child => findParent(child, targetItem)) ?? false;
1365
+ };
1366
+ return item === selectedItem?.item || findParent(item, selectedItem.item);
1367
+ }
1368
+ };
1369
+ }), withHooks((store, menuProviderService = inject(AXPMenuProviderService)) => ({
1370
+ onInit() {
1371
+ (async () => {
1372
+ const items = await menuProviderService.items();
1373
+ patchState(store, { items: items });
1374
+ })();
1375
+ },
1376
+ onDestroy() {
1377
+ },
1378
+ })));
1379
+
1380
+ class AXPMenuSearchDefinitionProvider {
1381
+ async provide(context) {
1382
+ context.addDefinition('menu', 'Menu', 'fa-thin fa-bars', [
1383
+ {
1384
+ name: 'open',
1385
+ command: {
1386
+ name: 'view',
1387
+ options: {},
1388
+ },
1389
+ type: 'view',
1390
+ priority: 'primary',
1391
+ },
1392
+ ]);
1393
+ }
1394
+ }
1395
+
1396
+ class AXPMenuSearchProvider {
1397
+ constructor() {
1398
+ this.menuService = inject(AXPMenuProviderService);
1399
+ this.translateService = inject(AXTranslationService);
1400
+ }
1401
+ async search(text) {
1402
+ const menuItems = await this.searchMenuItems(await this.menuService.items(), text);
1403
+ return sortBy(menuItems.map((item) => ({
1404
+ name: 'menu', // Use `name` or empty string if undefined
1405
+ title: item.text, // Use `text` for the `title`
1406
+ icon: item.icon, // Include the `icon` if present
1407
+ data: {
1408
+ command: {
1409
+ name: 'navigate',
1410
+ options: {
1411
+ command: item.command ?? {
1412
+ type: 'router',
1413
+ options: {
1414
+ path: item.path
1415
+ }
1416
+ }
1417
+ }
1418
+ },
1419
+ },
1420
+ parent: item.parent
1421
+ ? {
1422
+ title: item.parent.text,
1423
+ data: item.parent,
1424
+ }
1425
+ : undefined,
1426
+ })), [(o) => this.translateService.translateSync(o.title)]);
1427
+ }
1428
+ /**
1429
+ * Recursively searches AXPMenuItem and its children for a matching text.
1430
+ *
1431
+ * @param menuItems - The array of AXPMenuItem to search in.
1432
+ * @param searchText - The text to search for (case-insensitive).
1433
+ * @returns An array of AXPMenuItem that match the search text.
1434
+ */
1435
+ async searchMenuItems(menuItems, searchText) {
1436
+ const result = [];
1437
+ for (const item of menuItems) {
1438
+ // Check if the current item's text matches the search text
1439
+ if (item.type != 'group' &&
1440
+ (item.children?.length ?? 0) == 0 &&
1441
+ (await this.translateService.translateAsync(item.text)).toLowerCase().includes(searchText.toLowerCase())) {
1442
+ result.push(item);
1443
+ }
1444
+ // Recursively search in children if they exist
1445
+ if (item.children && item.children.length > 0) {
1446
+ const childResults = await this.searchMenuItems(item.children, searchText);
1447
+ result.push(...childResults.map((x) => ({ ...x, parent: item })));
1448
+ }
1449
+ }
1450
+ return result;
1451
+ }
1452
+ }
1453
+
1454
+ class AXPFooterTextSlotComponent {
1455
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1456
+ 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: `
1457
+ <small class="ax-text-sm" [innerHTML]="text"></small>
1458
+ `, isInline: true }); }
1459
+ }
1460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
1461
+ type: Component,
1462
+ args: [{
1463
+ template: `
1464
+ <small class="ax-text-sm" [innerHTML]="text"></small>
1465
+ `,
1466
+ standalone: true
1467
+ }]
1468
+ }], propDecorators: { text: [{
1469
+ type: Input
1470
+ }] } });
1471
+
1472
+ class AXPNavBarSlotComponent {
1473
+ constructor() {
1474
+ this.store = inject(Store);
1475
+ }
1476
+ handleCommand(action) {
1477
+ if (action)
1478
+ this.store.dispatch(action);
1479
+ }
1480
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1481
+ 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: `
1482
+ <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
1483
+ <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
1484
+ </div>
1485
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None }); }
1486
+ }
1487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
1488
+ type: Component,
1489
+ args: [{
1490
+ template: `
1491
+ <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
1492
+ <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
1493
+ </div>
1494
+ `,
1495
+ imports: [CommonModule],
1496
+ encapsulation: ViewEncapsulation.None
1497
+ }]
1498
+ }], propDecorators: { items: [{
1499
+ type: Input
1500
+ }] } });
1501
+
1502
+ class AXPSearchDefinitionProviderContext {
1503
+ constructor() {
1504
+ this.definitions = [];
1505
+ this.definitionMap = new Map();
1506
+ }
1507
+ addDefinition(name, title, icon, actions) {
1508
+ const definitionSearch = {
1509
+ name,
1510
+ title,
1511
+ icon,
1512
+ actions: actions ?? [],
1513
+ };
1514
+ this.definitions.push(definitionSearch);
1515
+ this.definitionMap.set(name, definitionSearch); // Index by name
1516
+ return new AXPSearchDefinitionBuilder(this, definitionSearch);
1517
+ }
1518
+ definition(name) {
1519
+ const foundDefinition = this.definitionMap.get(name);
1520
+ if (!foundDefinition) {
1521
+ throw new Error(`definition with name "${name}" not found.`);
1522
+ }
1523
+ return new AXPSearchDefinitionBuilder(this, foundDefinition);
1524
+ }
1525
+ getDefinitions() {
1526
+ return this.definitions;
1527
+ }
1528
+ // Expose groupMap for controlled access
1529
+ hasEntity(name) {
1530
+ return this.definitionMap.has(name);
1531
+ }
1532
+ getDefinition(name) {
1533
+ return this.definitionMap.get(name);
1534
+ }
1535
+ }
1536
+ class AXPSearchDefinitionBuilder {
1537
+ constructor(context, definition) {
1538
+ this.context = context;
1539
+ this.definition = definition;
1540
+ }
1541
+ addAction(name) {
1542
+ const newAction = {
1543
+ name,
1544
+ type: 'view',
1545
+ command: '',
1546
+ priority: 'primary',
1547
+ };
1548
+ this.definition.actions.push(newAction);
1549
+ return new AXPSearchDefinitionActionBuilder(this);
1550
+ }
1551
+ action(name) {
1552
+ const foundAction = this.definition.actions.find((action) => action.name === name);
1553
+ if (!foundAction) {
1554
+ throw new Error(`action with name "${name}" not found in entity "${this.definition.name}".`);
1555
+ }
1556
+ return new AXPSearchDefinitionActionBuilder(this);
1557
+ }
1558
+ // addGroup(name: string, title: string, description?: string, icon?: string): AXPTextSearchEntityBuilder {
1559
+ // const newGroup: AXPTextSearchEntity = {
1560
+ // name,
1561
+ // title,
1562
+ // description: description,
1563
+ // icon,
1564
+ // groups: [],
1565
+ // sections: [],
1566
+ // };
1567
+ // this.entity.groups.push(newGroup);
1568
+ // if (this.context.hasGroup(name)) {
1569
+ // throw new Error(`Group with name "${name}" already exists.`);
1570
+ // }
1571
+ // this.context['groupMap'].set(name, newGroup);
1572
+ // return new AXPTextSearchEntityBuilder(this.context, newGroup);
1573
+ // }
1574
+ endEntity() {
1575
+ return this.context;
1576
+ }
1577
+ }
1578
+ class AXPSearchDefinitionActionBuilder {
1579
+ constructor(entityBuilder) {
1580
+ this.entityBuilder = entityBuilder;
1581
+ }
1582
+ endAction() {
1583
+ return this.entityBuilder;
1584
+ }
1585
+ }
1586
+
1587
+ // Injection token for setting providers
1588
+ const AXP_SEARCH_DEFINITION_PROVIDER = new InjectionToken('AXP_SEARCH_DEFINITION_PROVIDER');
1589
+ class AXPSearchDefinitionProviderService {
1590
+ constructor() {
1591
+ this.providers = inject(AXP_SEARCH_DEFINITION_PROVIDER, { optional: true });
1592
+ this.cache = null;
1593
+ }
1594
+ async load() {
1595
+ if (this.cache) {
1596
+ return;
1597
+ }
1598
+ const context = new AXPSearchDefinitionProviderContext();
1599
+ if (Array.isArray(this.providers)) {
1600
+ for (const provider of this.providers) {
1601
+ await provider.provide(context);
2089
1602
  }
2090
- else if (item.path) {
2091
- globalStore.dispatch(AXPNavigateAction({ payload: { commands: item.path } }));
1603
+ }
1604
+ this.cache = context.getDefinitions();
1605
+ }
1606
+ async getListAsync() {
1607
+ await this.load();
1608
+ return this.getList();
1609
+ }
1610
+ getList() {
1611
+ if (!this.cache) {
1612
+ return [];
1613
+ }
1614
+ else {
1615
+ return this.cache;
1616
+ }
1617
+ }
1618
+ findDefinition(definitionName) {
1619
+ const definition = this.getList().find((definition) => definition.name === definitionName);
1620
+ if (!definition) {
1621
+ throw new Error(`Definition with name ${definitionName} not found`);
1622
+ }
1623
+ return definition;
1624
+ }
1625
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1626
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
1627
+ }
1628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
1629
+ type: Injectable,
1630
+ args: [{ providedIn: 'root' }]
1631
+ }] });
1632
+
1633
+ class AXPCommandSearchProvider {
1634
+ async search(text) {
1635
+ return this.commands.filter((command) => command.title.toLowerCase().includes(text.toLowerCase()));
1636
+ }
1637
+ }
1638
+
1639
+ // Injection token for setting providers
1640
+ const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
1641
+ class AXPSearchService {
1642
+ constructor() {
1643
+ this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
1644
+ this.definitionService = inject(AXPSearchDefinitionProviderService);
1645
+ }
1646
+ async search(text) {
1647
+ //TODO better handle this
1648
+ if (this.definitionService.getList().length == 0) {
1649
+ await this.definitionService.getListAsync();
1650
+ }
1651
+ if (!this.providers || (this.providers?.length || 0) === 0) {
1652
+ throw new Error('No search providers available'); // No providers available
1653
+ }
1654
+ const mergeData = [];
1655
+ const promises = this.providers.map((provider) => provider.search(text));
1656
+ const results = await Promise.all(promises);
1657
+ for (const resultArray of results) {
1658
+ for (const result of resultArray) {
1659
+ try {
1660
+ const definition = this.definitionService.findDefinition(result.name);
1661
+ mergeData.push({
1662
+ definitionName: definition.name,
1663
+ definitionTitle: definition.title,
1664
+ name: result.name,
1665
+ title: result.title,
1666
+ icon: result.icon ?? definition.icon,
1667
+ data: result.data,
1668
+ actions: definition.actions,
1669
+ description: result.description,
1670
+ parent: result.parent,
1671
+ });
1672
+ }
1673
+ catch (e) {
1674
+ console.error(e);
1675
+ }
2092
1676
  }
2093
- patchState(store, { selectedMenuItem: { item, isFullMatch: true } });
2094
- },
2095
- isItemOpen(item) {
2096
- const selectedItem = store.selectedMenuItem();
2097
- if (!selectedItem) {
2098
- return false;
1677
+ }
1678
+ // Group data
1679
+ const groupedData = [];
1680
+ const groupMap = {};
1681
+ // Create groups
1682
+ for (const item of mergeData) {
1683
+ const groupName = item.definitionName; // Change this to the property you want to group by
1684
+ if (!groupMap[groupName]) {
1685
+ groupMap[groupName] = {
1686
+ name: groupName,
1687
+ title: item.definitionTitle, // You can adjust the title logic if needed
1688
+ children: [],
1689
+ };
1690
+ groupedData.push(groupMap[groupName]);
2099
1691
  }
2100
- const findParent = (currentItem, targetItem) => {
2101
- if (currentItem.children?.includes(targetItem)) {
2102
- return true;
2103
- }
2104
- return currentItem.children?.some(child => findParent(child, targetItem)) ?? false;
2105
- };
2106
- return item === selectedItem?.item || findParent(item, selectedItem.item);
1692
+ groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle']));
2107
1693
  }
2108
- };
2109
- }), withHooks((store, menuProviderService = inject(AXPMenuProviderService)) => ({
2110
- onInit() {
2111
- (async () => {
2112
- const items = await menuProviderService.items();
2113
- patchState(store, { items: items });
2114
- })();
2115
- },
2116
- onDestroy() {
2117
- },
2118
- })));
2119
-
2120
- class AXPFooterTextSlotComponent {
2121
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2122
- 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: `
2123
- <small class="ax-text-sm" [innerHTML]="text"></small>
2124
- `, isInline: true }); }
1694
+ return groupedData;
1695
+ }
1696
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1697
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
2125
1698
  }
2126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
2127
- type: Component,
2128
- args: [{
2129
- template: `
2130
- <small class="ax-text-sm" [innerHTML]="text"></small>
2131
- `,
2132
- standalone: true
2133
- }]
2134
- }], propDecorators: { text: [{
2135
- type: Input
2136
- }] } });
1699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, decorators: [{
1700
+ type: Injectable,
1701
+ args: [{ providedIn: 'root' }]
1702
+ }] });
2137
1703
 
2138
- class AXPNavBarSlotComponent {
1704
+ var AXPSettingScope;
1705
+ (function (AXPSettingScope) {
1706
+ AXPSettingScope["Environment"] = "C";
1707
+ AXPSettingScope["Global"] = "G";
1708
+ AXPSettingScope["Tenant"] = "T";
1709
+ AXPSettingScope["User"] = "U";
1710
+ })(AXPSettingScope || (AXPSettingScope = {}));
1711
+ ;
1712
+
1713
+ class AXPSettingDefinitionProviderContext {
2139
1714
  constructor() {
2140
- this.store = inject(Store);
1715
+ this.rootGroups = [];
1716
+ this.groupMap = new Map();
2141
1717
  }
2142
- handleCommand(action) {
2143
- if (action)
2144
- this.store.dispatch(action);
1718
+ addGroup(name, title, description, icon) {
1719
+ const newGroup = {
1720
+ name,
1721
+ title,
1722
+ description,
1723
+ icon,
1724
+ groups: [],
1725
+ sections: [],
1726
+ };
1727
+ this.rootGroups.push(newGroup);
1728
+ this.groupMap.set(name, newGroup); // Index by name
1729
+ return new AXPSettingDefinitionGroupBuilder(this, newGroup);
1730
+ }
1731
+ group(name) {
1732
+ const foundGroup = this.groupMap.get(name);
1733
+ if (!foundGroup) {
1734
+ throw new Error(`Group with name "${name}" not found.`);
1735
+ }
1736
+ return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
1737
+ }
1738
+ getGroups() {
1739
+ return this.rootGroups;
1740
+ }
1741
+ // Expose groupMap for controlled access
1742
+ hasGroup(name) {
1743
+ return this.groupMap.has(name);
1744
+ }
1745
+ getGroup(name) {
1746
+ return this.groupMap.get(name);
1747
+ }
1748
+ }
1749
+ class AXPSettingDefinitionGroupBuilder {
1750
+ constructor(context, group) {
1751
+ this.context = context;
1752
+ this.group = group;
1753
+ }
1754
+ addSection(name, title, description) {
1755
+ const newSection = {
1756
+ name,
1757
+ title,
1758
+ description: description,
1759
+ settings: [],
1760
+ };
1761
+ this.group.sections.push(newSection);
1762
+ return new AXPSettingDefinitionSectionBuilder(this, newSection);
1763
+ }
1764
+ section(name) {
1765
+ const foundSection = this.group.sections.find((section) => section.name === name);
1766
+ if (!foundSection) {
1767
+ throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
1768
+ }
1769
+ return new AXPSettingDefinitionSectionBuilder(this, foundSection);
1770
+ }
1771
+ addGroup(name, title, description, icon) {
1772
+ const newGroup = {
1773
+ name,
1774
+ title,
1775
+ description: description,
1776
+ icon,
1777
+ groups: [],
1778
+ sections: [],
1779
+ };
1780
+ this.group.groups.push(newGroup);
1781
+ if (this.context.hasGroup(name)) {
1782
+ throw new Error(`Group with name "${name}" already exists.`);
1783
+ }
1784
+ this.context['groupMap'].set(name, newGroup);
1785
+ return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
1786
+ }
1787
+ endGroup() {
1788
+ return this.context;
1789
+ }
1790
+ }
1791
+ class AXPSettingDefinitionSectionBuilder {
1792
+ constructor(groupBuilder, section) {
1793
+ this.groupBuilder = groupBuilder;
1794
+ this.section = section;
1795
+ }
1796
+ addSetting(setting) {
1797
+ const newSetting = {
1798
+ name: setting.key,
1799
+ title: setting.title,
1800
+ description: setting.description,
1801
+ isRequired: setting.isRequired ?? false,
1802
+ isInherited: setting.isInherited ?? false,
1803
+ isEncrypted: setting.isEncrypted ?? false,
1804
+ defaultValue: setting.defaultValue,
1805
+ scope: setting.scope ?? 'G',
1806
+ widget: {
1807
+ type: setting.widget.type,
1808
+ name: setting.key,
1809
+ path: setting.key,
1810
+ defaultValue: setting.defaultValue,
1811
+ options: merge(setting.widget.options ?? {}, {
1812
+ label: setting.widget.options?.['label'] ?? setting.title,
1813
+ validationRules: setting.validationRules ?? [],
1814
+ }),
1815
+ valueTransforms: setting.valueTransforms,
1816
+ triggers: setting.widget.triggers,
1817
+ },
1818
+ };
1819
+ this.section.settings.push(newSetting);
1820
+ return this;
1821
+ }
1822
+ endSection() {
1823
+ return this.groupBuilder;
2145
1824
  }
2146
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2147
- 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: `
2148
- <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
2149
- <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
2150
- </div>
2151
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None }); }
2152
1825
  }
2153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
2154
- type: Component,
2155
- args: [{
2156
- template: `
2157
- <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
2158
- <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
2159
- </div>
2160
- `,
2161
- imports: [CommonModule],
2162
- encapsulation: ViewEncapsulation.None
2163
- }]
2164
- }], propDecorators: { items: [{
2165
- type: Input
2166
- }] } });
2167
1826
 
2168
- class AXPSchemaRegistryService {
1827
+ // Injection token for setting providers
1828
+ const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
1829
+ class AXPSettingDefinitionProviderService {
2169
1830
  constructor() {
2170
- this.types = new Map();
1831
+ this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
1832
+ this.cache = null;
1833
+ }
1834
+ async load() {
1835
+ if (this.cache) {
1836
+ return;
1837
+ }
1838
+ const context = new AXPSettingDefinitionProviderContext();
1839
+ if (Array.isArray(this.providers)) {
1840
+ for (const provider of this.providers) {
1841
+ await provider.provide(context);
1842
+ }
1843
+ }
1844
+ this.cache = context.getGroups();
1845
+ }
1846
+ async getListAsync(scope) {
1847
+ await this.load();
1848
+ return this.getList(scope);
1849
+ }
1850
+ getList(scope) {
1851
+ if (!this.cache) {
1852
+ return [];
1853
+ }
1854
+ const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
1855
+ const filterByScope = (groups, currentScope) => {
1856
+ const currentScopeIndex = scopeOrder.indexOf(currentScope);
1857
+ return groups
1858
+ .map((group) => ({
1859
+ ...group,
1860
+ sections: group.sections.map((section) => ({
1861
+ ...section,
1862
+ settings: section.settings.filter((setting) => {
1863
+ const settingScopeIndex = scopeOrder.indexOf(setting.scope);
1864
+ // Include settings where:
1865
+ // 1. The scope matches the requested scope.
1866
+ if (setting.scope === currentScope)
1867
+ return true;
1868
+ // 2. The setting scope is higher (closer to 'U') and is inherited.
1869
+ if (setting.isInherited &&
1870
+ settingScopeIndex > currentScopeIndex // Higher scope
1871
+ ) {
1872
+ return true;
1873
+ }
1874
+ // 3. Exclude settings with a lower or irrelevant scope.
1875
+ return false;
1876
+ }),
1877
+ })).filter((section) => section.settings.length > 0), // Keep only sections with settings
1878
+ groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
1879
+ }))
1880
+ .filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
1881
+ };
1882
+ return filterByScope(this.cache, scope);
2171
1883
  }
2172
- register(schema) {
2173
- this.types.set(schema.name, schema);
1884
+ async defaultValues() {
1885
+ const defaults = {};
1886
+ const collectDefaults = (groups) => {
1887
+ groups.forEach((group) => {
1888
+ group.sections.forEach((section) => {
1889
+ section.settings.forEach((setting) => {
1890
+ if (setting.defaultValue !== undefined) {
1891
+ defaults[setting.name] = setting.defaultValue;
1892
+ }
1893
+ });
1894
+ });
1895
+ collectDefaults(group.groups);
1896
+ });
1897
+ };
1898
+ if (!this.cache) {
1899
+ await this.load();
1900
+ }
1901
+ collectDefaults(this.cache);
1902
+ return defaults;
2174
1903
  }
2175
- extend(parentName, schema) {
2176
- const parentSchema = this.resolve(parentName);
2177
- const newSchema = merge({}, parentSchema, schema);
2178
- newSchema.name = schema.name;
2179
- this.register(newSchema);
1904
+ findGroup(scope, groupName) {
1905
+ return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
2180
1906
  }
2181
- resolve(name) {
2182
- const schema = this.types.get(name);
2183
- if (!schema) {
2184
- throw new Error(`Parent schema with name ${schema} does not exist.`);
1907
+ searchRecursive(groups, groupName, breadcrumb) {
1908
+ for (const group of groups) {
1909
+ const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
1910
+ // If the group name matches, return its details
1911
+ if (group.name === groupName) {
1912
+ return {
1913
+ breadcrumb: currentBreadcrumb,
1914
+ sections: group.sections.length > 0 ? group.sections : null,
1915
+ groups: group.groups.length > 0 ? group.groups : null,
1916
+ };
1917
+ }
1918
+ // Recursively search in nested groups
1919
+ const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
1920
+ if (nestedResult.breadcrumb.length > 0) {
1921
+ return nestedResult;
1922
+ }
2185
1923
  }
2186
- return schema;
1924
+ // If no matching group is found
1925
+ return {
1926
+ breadcrumb: [],
1927
+ groups: [],
1928
+ sections: []
1929
+ };
2187
1930
  }
2188
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2189
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaRegistryService, providedIn: 'root' }); }
1931
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1932
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
2190
1933
  }
2191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaRegistryService, decorators: [{
1934
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
2192
1935
  type: Injectable,
2193
- args: [{
2194
- providedIn: 'root',
2195
- }]
1936
+ args: [{ providedIn: 'root' }]
2196
1937
  }] });
2197
-
2198
- const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
2199
-
2200
- class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1938
+ class AXPSettingDefaultValueProvider {
2201
1939
  constructor() {
2202
- super(...arguments);
2203
- this.widgetRegistery = inject(AXPSchemaRegistryService);
2204
- this.mergedOptions = {};
2205
- this.injector = inject(Injector);
2206
- this.cdr = inject(ChangeDetectorRef);
1940
+ this.definitionProvider = inject(AXPSettingDefinitionProviderService);
1941
+ }
1942
+ get scope() {
1943
+ return AXPSettingScope.Global;
2207
1944
  }
2208
- get renderFooterTemplate() {
2209
- return this.footerTemplate ?? this._contentFooterTemplate;
1945
+ async load() {
1946
+ return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
2210
1947
  }
2211
- get renderCellTemplate() {
2212
- return this.cellTemplate ?? this._contentCellTemplate;
1948
+ set(key, value) {
1949
+ throw new Error('Method not implemented.');
2213
1950
  }
2214
- get renderHeaderTemplate() {
2215
- return this.headerTemplate ?? this._contentHeaderTemplate;
1951
+ }
1952
+
1953
+ const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
1954
+ providedIn: 'root',
1955
+ factory: () => {
1956
+ return [
1957
+ //new AXPSettingDefaultValueProvider(),
1958
+ new AXPSettingValueProviderDefault(AXPSettingScope.Tenant),
1959
+ new AXPSettingValueProviderDefault(AXPSettingScope.User)
1960
+ ];
2216
1961
  }
2217
- get loadingEnabled() {
2218
- return true;
1962
+ });
1963
+ class AXPSettingValueProviderDefault {
1964
+ get scope() {
1965
+ return this._scope;
2219
1966
  }
2220
- get name() {
2221
- return `col-${this.dataField}`;
1967
+ constructor(_scope) {
1968
+ this._scope = _scope;
1969
+ this.cache = new Map();
1970
+ this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
2222
1971
  }
2223
- get schemaName() {
2224
- return this._schemaName;
1972
+ async load() {
1973
+ // Load settings from localStorage as a single key
1974
+ const storedSettings = localStorage.getItem(this.localStorageKey);
1975
+ if (storedSettings) {
1976
+ const parsedSettings = JSON.parse(storedSettings);
1977
+ Object.entries(parsedSettings).forEach(([key, value]) => {
1978
+ this.cache.set(key, value);
1979
+ });
1980
+ return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
1981
+ }
1982
+ return Promise.resolve([]);
2225
1983
  }
2226
- set schemaName(v) {
2227
- this._schemaName = v;
1984
+ async set(keyOrValues, value) {
1985
+ if (typeof keyOrValues === 'string') {
1986
+ // Single value update
1987
+ this.cache.set(keyOrValues, value);
1988
+ }
1989
+ else {
1990
+ // Bulk update
1991
+ for (const [key, val] of Object.entries(keyOrValues)) {
1992
+ this.cache.set(key, val);
1993
+ }
1994
+ }
1995
+ await this.saveToLocalStorage();
2228
1996
  }
2229
- async ngOnInit() {
2230
- const schema = this.widgetRegistery.resolve(this.schemaName);
2231
- if (schema?.component?.column)
2232
- this.component = await schema?.component?.column.component();
2233
- this.mergedOptions = merge(cloneDeep(schema?.component.column?.options), this.options) || {};
2234
- const tokenValue = {
2235
- prop: {
2236
- name: this.dataField,
2237
- formats: { default: this.displayFormat },
2238
- },
2239
- schema: schema,
2240
- };
2241
- this.widgetInjector = Injector.create({
2242
- parent: this.injector,
2243
- providers: [
2244
- {
2245
- provide: AXP_WIDGET_TOKEN,
2246
- useValue: tokenValue,
2247
- },
2248
- ],
1997
+ async saveToLocalStorage() {
1998
+ const settingsObject = {};
1999
+ this.cache.forEach((value, key) => {
2000
+ settingsObject[key] = value;
2249
2001
  });
2250
- this.width = this.mergedOptions.width ?? '200px';
2251
- this.allowResizing = this.mergedOptions.allowResizing || false;
2252
- this.cdr.markForCheck();
2253
- }
2254
- getInputs(data) {
2255
- return assign(this.mergedOptions, { context: data });
2256
- }
2257
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2258
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPWidgetColumnRendererComponent, isStandalone: false, selector: "axp-widget-column-renderer", inputs: { width: "width", caption: "caption", headerTemplate: "headerTemplate", allowSorting: "allowSorting", fixed: "fixed", footerTemplate: "footerTemplate", cellTemplate: "cellTemplate", options: "options", dataField: "dataField", displayFormat: "displayFormat", schemaName: ["schema", "schemaName"] }, providers: [{ provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent }], viewQueries: [{ propertyName: "_contentFooterTemplate", first: true, predicate: ["footer"], descendants: true }, { propertyName: "_contentCellTemplate", first: true, predicate: ["cell"], descendants: true }, { propertyName: "_contentHeaderTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
2259
- <ng-template #header>{{ caption }}</ng-template>
2260
- <ng-template #cell let-row>
2261
- @if(component && widgetInjector && row?.data) {
2262
- <ng-container *ngComponentOutlet="component; injector: widgetInjector; inputs: getInputs(row.data)"></ng-container>
2263
- }
2264
- </ng-template>
2265
- <ng-template #footer></ng-template>
2266
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2002
+ localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
2003
+ }
2267
2004
  }
2268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
2269
- type: Component,
2270
- args: [{
2271
- selector: 'axp-widget-column-renderer',
2272
- template: `
2273
- <ng-template #header>{{ caption }}</ng-template>
2274
- <ng-template #cell let-row>
2275
- @if(component && widgetInjector && row?.data) {
2276
- <ng-container *ngComponentOutlet="component; injector: widgetInjector; inputs: getInputs(row.data)"></ng-container>
2277
- }
2278
- </ng-template>
2279
- <ng-template #footer></ng-template>
2280
- `,
2281
- providers: [{ provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent }],
2282
- changeDetection: ChangeDetectionStrategy.OnPush,
2283
- inputs: ['width', 'caption', 'headerTemplate', 'allowSorting', 'fixed'],
2284
- standalone: false
2285
- }]
2286
- }], propDecorators: { footerTemplate: [{
2287
- type: Input
2288
- }], _contentFooterTemplate: [{
2289
- type: ViewChild,
2290
- args: ['footer']
2291
- }], cellTemplate: [{
2292
- type: Input
2293
- }], _contentCellTemplate: [{
2294
- type: ViewChild,
2295
- args: ['cell']
2296
- }], headerTemplate: [{
2297
- type: Input
2298
- }], _contentHeaderTemplate: [{
2299
- type: ViewChild,
2300
- args: ['header']
2301
- }], options: [{
2302
- type: Input
2303
- }], dataField: [{
2304
- type: Input
2305
- }], displayFormat: [{
2306
- type: Input
2307
- }], schemaName: [{
2308
- type: Input,
2309
- args: ['schema']
2310
- }] } });
2311
2005
 
2312
- class AXPWidgetFilterRendererComponent {
2006
+ class AXPSettingValueProviderService {
2313
2007
  constructor() {
2314
- this.widgetRegistery = inject(AXPSchemaRegistryService);
2315
- this.isLoading = true;
2316
- this.valueChange = new EventEmitter();
2317
- this.operatorChange = new EventEmitter();
2318
- this.injector = inject(Injector);
2319
- this.cdr = inject(ChangeDetectorRef);
2320
- this.options = {};
2321
- }
2322
- get value() {
2323
- return this._value;
2324
- }
2325
- set value(v) {
2326
- this._value = v;
2327
- this.updateValue();
2328
- this.valueChange.emit(v);
2329
- }
2330
- get operator() {
2331
- return this._operator;
2332
- }
2333
- set operator(op) {
2334
- this._operator = op;
2335
- this.updateOperator();
2336
- this.operatorChange.emit(op);
2337
- }
2338
- get schemaName() {
2339
- return this._schemaName;
2340
- }
2341
- set schemaName(v) {
2342
- this._schemaName = v;
2343
- setTimeout(async () => {
2344
- await this.render();
2008
+ this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
2009
+ this.definitionService = inject(AXPSettingDefinitionProviderService);
2010
+ this.scopedSettingsCache = new Map();
2011
+ this.onChanged = new Subject();
2012
+ // Initialize scoped caches for dynamic scopes
2013
+ const staticScopes = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User];
2014
+ staticScopes.forEach((scope) => {
2015
+ if (!this.scopedSettingsCache.has(scope)) {
2016
+ this.scopedSettingsCache.set(scope, new Map());
2017
+ }
2345
2018
  });
2346
2019
  }
2347
- async render() {
2348
- const schema = this.widgetRegistery.resolve(this.schemaName);
2349
- this.options =
2350
- merge(cloneDeep(this.prop?.component?.common?.options), cloneDeep(this.prop?.component?.filter?.options), schema?.component?.filter?.options) || {};
2351
- const tokenValue = {
2352
- prop: this.prop,
2353
- schema: schema,
2354
- };
2355
- const token = Injector.create({
2356
- parent: this.injector,
2357
- providers: [
2358
- {
2359
- provide: AXP_WIDGET_TOKEN,
2360
- useValue: tokenValue,
2361
- },
2362
- ],
2363
- });
2364
- if (schema?.component && schema.component.filter?.component) {
2365
- var com = await schema.component.filter?.component();
2366
- this.portal = new ComponentPortal(com, null, token);
2367
- this.isLoading = false;
2368
- this.cdr.markForCheck();
2020
+ async load() {
2021
+ try {
2022
+ const settingsList = [];
2023
+ for (const provider of this.providers) {
2024
+ const scopeCache = this.scopedSettingsCache.get(provider.scope);
2025
+ const providerSettings = await provider.load();
2026
+ providerSettings.forEach((setting) => {
2027
+ scopeCache.set(setting.key, setting.value);
2028
+ });
2029
+ settingsList.push(...providerSettings);
2030
+ }
2031
+ return settingsList;
2369
2032
  }
2370
- }
2371
- updateValue() {
2372
- if (this.instance) {
2373
- this.instance.value = this.value;
2033
+ catch (error) {
2034
+ console.error('Error loading settings', error);
2035
+ throw error;
2374
2036
  }
2375
2037
  }
2376
- updateOperator() {
2377
- if (this.instance) {
2378
- this.instance.operator = this.operator;
2038
+ async get(key) {
2039
+ if (this.scopedSettingsCache.size === 0) {
2040
+ await this.load();
2379
2041
  }
2380
- }
2381
- handleAttached(portalOutletRef) {
2382
- portalOutletRef = portalOutletRef;
2383
- this.instance = portalOutletRef.instance;
2384
- // console.log(this.schemaName, this.instance);
2385
- assign(this.instance, this.options);
2386
- this.updateValue();
2387
- this.updateOperator();
2388
- this.instance.valueChange.subscribe((v) => {
2389
- if (!isEqual(v, this.value)) {
2390
- this.value = v;
2042
+ const scopeOrder = [AXPSettingScope.User, AXPSettingScope.Tenant, AXPSettingScope.Global, AXPSettingScope.Environment];
2043
+ for (const scope of scopeOrder) {
2044
+ const scopeCache = this.scopedSettingsCache.get(scope);
2045
+ if (scopeCache && scopeCache.has(key)) {
2046
+ const value = scopeCache.get(key);
2047
+ if (value !== undefined && value !== null) {
2048
+ return cloneDeep(value);
2049
+ }
2391
2050
  }
2392
- });
2393
- this.instance.operatorChange.subscribe((op) => {
2394
- if (!isEqual(op, this.operator)) {
2395
- this.operator = op;
2051
+ }
2052
+ const defaults = await this.definitionService.defaultValues();
2053
+ return get(defaults, key); // Fallback if no value is found
2054
+ }
2055
+ async defaultValues(scope) {
2056
+ let scopeOrder = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User].reverse();
2057
+ const scopeIndex = scopeOrder.indexOf(scope);
2058
+ if (scopeIndex === -1) {
2059
+ throw new Error(`Invalid scope: ${scope}`);
2060
+ }
2061
+ scopeOrder = scopeOrder.slice(scopeIndex + 1);
2062
+ // Accumulate defaults from the current scope and higher scopes
2063
+ const accumulatedDefaults = {};
2064
+ for (let i = scopeIndex; i < scopeOrder.length; i++) {
2065
+ const currentScope = scopeOrder[i];
2066
+ const scopeCache = this.scopedSettingsCache.get(currentScope);
2067
+ if (scopeCache) {
2068
+ scopeCache.forEach((value, key) => {
2069
+ if (!(key in accumulatedDefaults)) {
2070
+ accumulatedDefaults[key] = value;
2071
+ }
2072
+ });
2396
2073
  }
2397
- });
2074
+ }
2075
+ // Merge with global default values from the definition service
2076
+ const globalDefaults = await this.definitionService.defaultValues();
2077
+ return { ...globalDefaults, ...accumulatedDefaults };
2398
2078
  }
2399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetFilterRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2400
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPWidgetFilterRendererComponent, isStandalone: false, selector: "axp-widget-filter-renderer", inputs: { value: "value", operator: "operator", prop: "prop", schemaName: ["schema", "schemaName"] }, outputs: { valueChange: "valueChange", operatorChange: "operatorChange" }, host: { styleAttribute: "display: contents;" }, ngImport: i0, template: `
2401
- @if(isLoading){
2402
- <ax-skeleton [animated]="true" class="ax-w-full ax-h-8 ax-rounded"></ax-skeleton>
2403
- } @else {
2404
- <ng-template [cdkPortalOutlet]="portal" (attached)="handleAttached($event)"></ng-template>
2079
+ scope(scope) {
2080
+ const provider = this.providers.find((p) => p.scope === scope);
2081
+ if (!provider) {
2082
+ throw new Error(`No provider found for scope: ${scope}`);
2083
+ }
2084
+ return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
2405
2085
  }
2406
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i2$2.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2086
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2087
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, providedIn: 'root' }); }
2407
2088
  }
2408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetFilterRendererComponent, decorators: [{
2409
- type: Component,
2089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, decorators: [{
2090
+ type: Injectable,
2410
2091
  args: [{
2411
- selector: 'axp-widget-filter-renderer',
2412
- template: `
2413
- @if(isLoading){
2414
- <ax-skeleton [animated]="true" class="ax-w-full ax-h-8 ax-rounded"></ax-skeleton>
2415
- } @else {
2416
- <ng-template [cdkPortalOutlet]="portal" (attached)="handleAttached($event)"></ng-template>
2417
- }
2418
- `,
2419
- changeDetection: ChangeDetectionStrategy.OnPush,
2420
- host: { style: 'display: contents;' },
2421
- standalone: false
2422
- }]
2423
- }], propDecorators: { valueChange: [{
2424
- type: Output
2425
- }], operatorChange: [{
2426
- type: Output
2427
- }], value: [{
2428
- type: Input
2429
- }], operator: [{
2430
- type: Input
2431
- }], prop: [{
2432
- type: Input
2433
- }], schemaName: [{
2434
- type: Input,
2435
- args: ['schema']
2436
- }] } });
2437
-
2438
- class AXPWidgetBase {
2439
- constructor() {
2440
- this.cdr = inject(ChangeDetectorRef);
2441
- this.token = inject(AXP_WIDGET_TOKEN);
2442
- this.formatService = inject(AXFormatService);
2443
- this.markForCheck = inject(ChangeDetectorRef).markForCheck;
2444
- }
2445
- get schema() {
2446
- return this.token.schema;
2447
- }
2448
- get prop() {
2449
- return this.token.prop;
2450
- }
2451
- get rawValue() {
2452
- return get(this.context, this.token.prop.name);
2453
- }
2454
- // protected get multiple(): boolean {
2455
- // return this.token.prop.multiple ?? false;
2456
- // }
2457
- get formats() {
2458
- return merge(cloneDeep(this.schema.formats), this.token.prop.formats);
2459
- }
2460
- get context() {
2461
- return this._context;
2462
- }
2463
- set context(v) {
2464
- this._context = v;
2465
- this.render();
2466
- this.cdr.markForCheck();
2467
- }
2468
- render() { }
2469
- setOption(name, value) {
2470
- }
2471
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetBase, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2472
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetBase }); }
2473
- }
2474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetBase, decorators: [{
2475
- type: Injectable
2476
- }], propDecorators: { context: [{
2477
- type: Input
2478
- }] } });
2479
- class AXPWidgetEditBase extends AXPWidgetBase {
2480
- constructor() {
2481
- super(...arguments);
2482
- this.valueChange = new EventEmitter();
2483
- }
2484
- get value() {
2485
- return this._value;
2486
- }
2487
- set value(v) {
2488
- this._value = v;
2489
- this.valueChange.emit(v);
2490
- this.render();
2491
- this.cdr.markForCheck();
2492
- }
2493
- get validations() {
2494
- const merged = [...(this.schema.validationRules ?? []), ...(this.token.prop.validationRules ?? [])];
2495
- return merged;
2496
- }
2497
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetEditBase, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2498
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetEditBase }); }
2499
- }
2500
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetEditBase, decorators: [{
2501
- type: Injectable
2502
- }], propDecorators: { valueChange: [{
2503
- type: Output
2504
- }], value: [{
2505
- type: Input
2506
- }] } });
2507
- class AXPWidgetFilterBase extends AXPWidgetBase {
2508
- constructor() {
2509
- super(...arguments);
2510
- this.operatorChange = new EventEmitter();
2511
- this.valueChange = new EventEmitter();
2512
- }
2513
- get operator() {
2514
- return this._operator;
2515
- }
2516
- set operator(op) {
2517
- this._operator = op;
2518
- this.operatorChange.emit(op);
2519
- this.render();
2520
- this.cdr.markForCheck();
2521
- }
2522
- get value() {
2523
- return this._value;
2524
- }
2525
- set value(v) {
2526
- this._value = v;
2527
- this.valueChange.emit(v);
2528
- this.render();
2529
- this.cdr.markForCheck();
2530
- }
2531
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetFilterBase, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2532
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetFilterBase }); }
2533
- }
2534
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetFilterBase, decorators: [{
2535
- type: Injectable
2536
- }], propDecorators: { operatorChange: [{
2537
- type: Output
2538
- }], operator: [{
2539
- type: Input
2540
- }], valueChange: [{
2541
- type: Output
2542
- }], value: [{
2543
- type: Input
2544
- }] } });
2545
-
2546
- class AXPWidgetRendererComponent {
2547
- constructor() {
2548
- this.widgetRegistery = inject(AXPSchemaRegistryService);
2549
- this.subscriber = inject(AXUnsubscriber);
2550
- this.mode = 'view';
2551
- this.isLoading = true;
2552
- this.injector = inject(Injector);
2553
- this.cdr = inject(ChangeDetectorRef);
2554
- this.options = {};
2555
- }
2556
- get context() {
2557
- return this._context;
2558
- }
2559
- set context(v) {
2560
- this._context = v;
2561
- if (this.instance) {
2562
- this.instance.context = v;
2563
- }
2564
- this.updateValue();
2565
- }
2566
- get schemaName() {
2567
- return this._schemaName;
2568
- }
2569
- set schemaName(v) {
2570
- this._schemaName = v;
2571
- setTimeout(async () => {
2572
- //TODO: move to better place
2573
- await this.render();
2574
- });
2092
+ providedIn: 'root',
2093
+ }]
2094
+ }], ctorParameters: () => [] });
2095
+ class ScopedSettingService {
2096
+ constructor(parent, provider, onChanged, scopeCache) {
2097
+ this.parent = parent;
2098
+ this.provider = provider;
2099
+ this.onChanged = onChanged;
2100
+ this.scopeCache = scopeCache;
2575
2101
  }
2576
- async render() {
2577
- const schema = this.widgetRegistery.resolve(this.schemaName);
2578
- this.options =
2579
- merge(cloneDeep(this.prop?.component?.common?.options), cloneDeep(this.prop?.component?.[this.mode]?.options), schema?.component?.[this.mode]?.options) || {};
2580
- const tokenValue = {
2581
- prop: this.prop,
2582
- schema: schema,
2583
- };
2584
- const token = Injector.create({
2585
- parent: this.injector,
2586
- providers: [
2587
- {
2588
- provide: AXP_WIDGET_TOKEN,
2589
- useValue: tokenValue,
2590
- },
2591
- ],
2592
- });
2593
- if (schema?.component && schema.component[this.mode]?.component) {
2594
- var com = await schema.component[this.mode]?.component();
2595
- this.portal = new ComponentPortal(com, null, token);
2596
- this.isLoading = false;
2597
- this.cdr.markForCheck();
2598
- }
2102
+ async get(key) {
2103
+ const settings = await this.provider.load();
2104
+ const setting = settings.find((s) => s.key === key);
2105
+ return setting ? cloneDeep(setting.value) : undefined;
2599
2106
  }
2600
- updateValue() {
2601
- if (this.instance && this.context && this.instance instanceof AXPWidgetEditBase) {
2602
- this.instance.value = get(this.context, this.prop.name);
2603
- }
2107
+ async all() {
2108
+ const settings = await this.provider.load();
2109
+ return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
2604
2110
  }
2605
- updateProps() {
2606
- if (this.instance) {
2607
- assign(this.instance, this.options);
2608
- }
2111
+ async defaultValues() {
2112
+ return this.parent.defaultValues(this.provider.scope);
2609
2113
  }
2610
- attachReferenceField(v) {
2611
- if (this.options['reference']) {
2612
- const valueField = this.prop.component?.common?.options?.valueField || 'id';
2613
- const referenceField = this.options['referenceField'];
2614
- if (referenceField) {
2615
- if (Array.isArray(v)) {
2616
- this.context[referenceField] = v.map((item) => item[valueField]);
2617
- }
2618
- else {
2619
- this.context[referenceField] = v?.[valueField];
2620
- }
2621
- }
2622
- else {
2623
- this.context[`${this.prop.name}Id`] = v?.[valueField];
2624
- }
2114
+ async set(keyOrValues, value) {
2115
+ if (typeof keyOrValues === 'string') {
2116
+ // Single key-value pair
2117
+ await this.provider.set(keyOrValues, value);
2118
+ this.scopeCache.set(keyOrValues, value); // Sync the cache
2119
+ this.onChanged.next({
2120
+ scope: this.provider.scope,
2121
+ keys: [keyOrValues],
2122
+ values: { [keyOrValues]: value },
2123
+ entries: [{ key: keyOrValues, value }],
2124
+ });
2625
2125
  }
2626
- }
2627
- handleAttached(portalOutletRef) {
2628
- portalOutletRef = portalOutletRef;
2629
- this.instance = portalOutletRef.instance;
2630
- this.instance.context = this.context;
2631
- this.updateProps();
2632
- this.updateValue();
2633
- if (this.instance instanceof AXPWidgetEditBase) {
2634
- this.attachReferenceField(this.instance.value);
2635
- this.instance.valueChange.pipe(this.subscriber.takeUntilDestroy).subscribe((v) => {
2636
- this.attachReferenceField(v);
2637
- set(this.context, this.prop.name, v);
2126
+ else {
2127
+ // Multiple key-value pairs
2128
+ await this.provider.set(keyOrValues);
2129
+ Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
2130
+ const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
2131
+ this.onChanged.next({
2132
+ scope: this.provider.scope,
2133
+ keys: Object.keys(keyOrValues),
2134
+ values: keyOrValues,
2135
+ entries,
2638
2136
  });
2639
2137
  }
2640
2138
  }
2641
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2642
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPWidgetRendererComponent, isStandalone: false, selector: "axp-widget-renderer", inputs: { context: "context", prop: "prop", mode: "mode", schemaName: ["schema", "schemaName"] }, host: { styleAttribute: "display: contents;" }, providers: [
2139
+ }
2140
+
2141
+ class AXPSettingSearchDefinitionProvider {
2142
+ async provide(context) {
2143
+ context.addDefinition('setting', 'Setting', 'fa-solid fa-gear', [
2643
2144
  {
2644
- provide: AXUnsubscriber,
2145
+ name: 'open',
2146
+ command: {
2147
+ name: 'view',
2148
+ options: {},
2149
+ },
2150
+ type: 'view',
2151
+ priority: 'primary',
2645
2152
  },
2646
- ], ngImport: i0, template: `
2647
- @if(isLoading){
2648
- <ax-skeleton [animated]="true" class="ax-w-full lg:ax-w-[50%] ax-h-8 ax-rounded"></ax-skeleton>
2649
- } @else {
2650
- <ng-template [cdkPortalOutlet]="portal" (attached)="handleAttached($event)"></ng-template>
2153
+ ]);
2651
2154
  }
2652
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i2$2.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2653
- }
2654
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRendererComponent, decorators: [{
2655
- type: Component,
2656
- args: [{
2657
- selector: 'axp-widget-renderer',
2658
- template: `
2659
- @if(isLoading){
2660
- <ax-skeleton [animated]="true" class="ax-w-full lg:ax-w-[50%] ax-h-8 ax-rounded"></ax-skeleton>
2661
- } @else {
2662
- <ng-template [cdkPortalOutlet]="portal" (attached)="handleAttached($event)"></ng-template>
2663
- }
2664
- `,
2665
- changeDetection: ChangeDetectionStrategy.OnPush,
2666
- host: { style: 'display: contents;' },
2667
- providers: [
2668
- {
2669
- provide: AXUnsubscriber,
2670
- },
2671
- ],
2672
- standalone: false
2673
- }]
2674
- }], propDecorators: { context: [{
2675
- type: Input
2676
- }], prop: [{
2677
- type: Input
2678
- }], mode: [{
2679
- type: Input
2680
- }], schemaName: [{
2681
- type: Input,
2682
- args: ['schema']
2683
- }] } });
2684
-
2685
- class AXPSchemaModule {
2686
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2687
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaModule, declarations: [AXPWidgetRendererComponent, AXPWidgetColumnRendererComponent, AXPWidgetFilterRendererComponent], imports: [PortalModule, AXSkeletonModule, CommonModule], exports: [AXPWidgetRendererComponent, AXPWidgetFilterRendererComponent, AXPWidgetColumnRendererComponent] }); }
2688
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaModule, imports: [PortalModule, AXSkeletonModule, CommonModule] }); }
2689
- }
2690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaModule, decorators: [{
2691
- type: NgModule,
2692
- args: [{
2693
- imports: [PortalModule, AXSkeletonModule, CommonModule],
2694
- exports: [AXPWidgetRendererComponent, AXPWidgetFilterRendererComponent, AXPWidgetColumnRendererComponent],
2695
- declarations: [AXPWidgetRendererComponent, AXPWidgetColumnRendererComponent, AXPWidgetFilterRendererComponent],
2696
- providers: [],
2697
- }]
2698
- }] });
2699
-
2700
- const AXPEntityListViewConfigEmpty = {
2701
- fixed: false,
2702
- columns: [],
2703
- conditions: [],
2704
- sorts: [],
2705
- name: 'empty',
2706
- title: 'Empty',
2707
- };
2708
- function convertPropertyToColumn(property) {
2709
- return {
2710
- //TODO: merge format function
2711
- schema: property.schema,
2712
- name: property.name,
2713
- title: property.title,
2714
- visible: true,
2715
- displayFormat: property.formats?.list ?? property.formats?.default,
2716
- sortOptions: {
2717
- enabled: property.canSort,
2718
- property: property.name,
2719
- },
2720
- filterOptions: {
2721
- enabled: property.canFilter,
2722
- property: property.name,
2723
- },
2724
- options: merge(cloneDeep(property.component?.common?.options), property.component?.column?.options),
2725
- };
2726
- }
2727
- function convertPropertiesToColumns(...propertis) {
2728
- return propertis.map((p) => convertPropertyToColumn(p));
2729
2155
  }
2730
2156
 
2731
- class AXEntityLoaderDefault {
2732
- async get(moduleName, entityName) {
2733
- return null;
2157
+ class AXPSettingSearchProvider {
2158
+ constructor() {
2159
+ this.settingService = inject(AXPSettingDefinitionProviderService);
2160
+ }
2161
+ async search(text) {
2162
+ const groupsSetting = this.settingService.getList(AXPSettingScope.User);
2163
+ if (groupsSetting.length == 0) {
2164
+ groupsSetting.push(...(await this.settingService.getListAsync(AXPSettingScope.User)));
2165
+ }
2166
+ // Step 2: Flatten settings from groups
2167
+ const allSettings = [];
2168
+ const extractSettings = (group) => {
2169
+ for (const section of group.sections) {
2170
+ allSettings.push(...section.settings.map((x) => ({ ...x, group })));
2171
+ }
2172
+ for (const subGroup of group.groups) {
2173
+ extractSettings(subGroup); // Recursive extraction
2174
+ }
2175
+ };
2176
+ for (const group of groupsSetting) {
2177
+ extractSettings(group);
2178
+ }
2179
+ // Step 3: Search settings by title
2180
+ const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));
2181
+ return sortBy(searchResults.map((setting) => ({
2182
+ title: setting.title,
2183
+ description: setting.description,
2184
+ name: 'setting',
2185
+ data: setting,
2186
+ parent: setting.group
2187
+ ? {
2188
+ title: setting.group.title,
2189
+ data: setting.group,
2190
+ }
2191
+ : undefined,
2192
+ })), ['title']);
2734
2193
  }
2735
2194
  }
2736
- const AXP_ENTITY_LOADER = new InjectionToken('AXP_ENTITY_LOADER', {
2737
- providedIn: 'root',
2738
- factory: () => {
2739
- return new AXEntityLoaderDefault();
2740
- },
2741
- });
2742
2195
 
2743
- class AXPEntityRegistryService {
2196
+ //TODO Loading, Redirect, Drawer, Show toast
2197
+ const AXPRedirectEvent = createWorkFlowEvent('Redirect Event Fired');
2198
+ const AXPRefreshEvent = createWorkFlowEvent('Refresh Event Fired');
2199
+ class AXPWorkflowNavigateAction extends AXPWorkflowAction {
2744
2200
  constructor() {
2745
- // Stores AXPEntityConfig objects, keyed by a combination of module and entity name.
2746
- this.entities = new Map();
2747
- // Entity loader service for dynamically loading entity configurations.
2748
- this.loader = inject(AXP_ENTITY_LOADER); // Assuming AXPEntityLoader is the correct type
2749
- }
2750
- /**
2751
- * Registers a new entity configuration. Entities are identified uniquely by a combination
2752
- * of their module and name.
2753
- *
2754
- * @param config The configuration object of the entity to be registered.
2755
- */
2756
- register(config) {
2757
- const key = this.createEntityKey(config.module, config.name);
2758
- this.entities.set(key, config);
2201
+ super(...arguments);
2202
+ this.router = inject(Router);
2759
2203
  }
2760
- /**
2761
- * Resolves an entity configuration based on module and entity name. If the configuration
2762
- * is not already registered, attempts to load it dynamically. Throws an error if the
2763
- * entity cannot be found or loaded.
2764
- *
2765
- * @param moduleName The module name of the entity.
2766
- * @param entityName The name of the entity.
2767
- * @returns A promise resolving to the entity configuration.
2768
- * @throws Error if the entity configuration cannot be resolved.
2769
- */
2770
- async resolve(moduleName, entityName) {
2771
- const key = this.createEntityKey(moduleName, entityName);
2772
- let config = this.entities.get(key) ?? null;
2773
- if (!config) {
2774
- try {
2775
- config = await this.loader.get(moduleName, entityName);
2776
- if (config) {
2777
- this.register(config);
2778
- }
2779
- }
2780
- catch (error) {
2781
- console.error(`Error loading entity '${key}':`, error);
2782
- throw error; // Rethrow to allow error handling by caller
2783
- }
2784
- if (!config) {
2785
- throw new Error(`Invalid entity name: ${key}`);
2204
+ async execute(context) {
2205
+ const payload = context.getVariable('payload');
2206
+ if (Array.isArray(payload.commands)) {
2207
+ this.router.navigate(payload.commands, payload.extras);
2208
+ }
2209
+ else {
2210
+ if (payload.commands.toLowerCase().startsWith('http') || payload.target == 'blank') {
2211
+ window.open(payload.commands, '_blank');
2786
2212
  }
2213
+ else
2214
+ this.router.navigate([payload.commands], payload.extras);
2787
2215
  }
2788
- return config;
2789
2216
  }
2790
- /**
2791
- * Creates a unique key for an entity based on its module and name.
2792
- *
2793
- * @param moduleName The module name of the entity.
2794
- * @param entityName The name of the entity.
2795
- * @returns The unique key for the entity.
2796
- */
2797
- createEntityKey(moduleName, entityName) {
2798
- return `${moduleName}.${entityName}`;
2217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2218
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction }); }
2219
+ }
2220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
2221
+ type: Injectable
2222
+ }] });
2223
+ class AXPDialogConfirmAction extends AXPWorkflowAction {
2224
+ constructor() {
2225
+ super(...arguments);
2226
+ this.dialogService = inject(AXDialogService);
2227
+ this.translationService = inject(AXTranslationService);
2799
2228
  }
2800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2801
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityRegistryService, providedIn: 'root' }); }
2229
+ async execute(context) {
2230
+ context.setOutput('result', false);
2231
+ const dialogResult = await this.dialogService.confirm(await this.translationService.translateAsync(this.title), await this.translationService.translateAsync(this.message), (await this.translationService.translateAsync(this.type)));
2232
+ context.setOutput('result', dialogResult.result);
2233
+ }
2234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2235
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction }); }
2802
2236
  }
2803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityRegistryService, decorators: [{
2804
- type: Injectable,
2805
- args: [{
2806
- providedIn: 'root',
2807
- }]
2237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
2238
+ type: Injectable
2808
2239
  }] });
2809
-
2810
- const widgetSchemas = {
2811
- //*Sharing schema list with other modules
2812
- text: 'text',
2813
- largetext: 'largetext',
2814
- number: 'number',
2815
- currency: 'currency',
2816
- phone: 'phone',
2817
- email: 'email',
2818
- dateTime: 'dateTime',
2819
- date: 'date',
2820
- time: 'time',
2821
- toggle: 'toggle',
2822
- checkbox: 'checkbox',
2823
- password: 'password',
2824
- file: 'file',
2825
- lookup: 'lookup',
2826
- selectionList: 'selection-list',
2827
- richText: 'rich-text',
2828
- map: 'map',
2829
- avatar: 'avatar',
2830
- messenger: 'messenger',
2831
- gallery: 'gallery',
2832
- signaturePad: 'signature-pad',
2833
- };
2834
- class AXPCommonWidgetModule {
2835
- constructor(service) {
2836
- //text
2837
- service.register({
2838
- component: {
2839
- view: {
2840
- component: () => import('./acorex-platform-common-text-widget-view.component-BH0LTD80.mjs').then((c) => c.AXPTextWidgetViewComponent),
2841
- },
2842
- filter: {
2843
- component: () => import('./acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs').then((c) => c.AXPStringWidgetFilterComponent),
2844
- },
2845
- edit: {
2846
- component: () => import('./acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs').then((c) => c.AXPTextWidgetEditComponent),
2847
- },
2848
- column: {
2849
- component: () => import('./acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs').then((c) => c.AXPTextWidgetColumnComponent),
2850
- options: { allowResizing: true },
2851
- },
2852
- },
2853
- filterOptions: {
2854
- operators: [...STRING_OPERATORS],
2855
- default: EQ_OPER,
2856
- },
2857
- name: widgetSchemas.text,
2858
- dataType: 'string',
2859
- });
2860
- service.extend('text', {
2861
- name: widgetSchemas.largetext,
2862
- component: {
2863
- edit: {
2864
- component: () => import('./acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs').then((c) => c.AXPLargeTextWidgetEditComponent),
2865
- },
2866
- column: {
2867
- options: {
2868
- width: '400px',
2869
- },
2870
- },
2871
- },
2872
- });
2873
- //
2874
- service.register({
2875
- component: {
2876
- view: {
2877
- component: () => import('./acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs').then((c) => c.AXPNumberWidgetViewComponent),
2878
- },
2879
- filter: {
2880
- component: () => import('./acorex-platform-common-number-widget-filter.component-womVAhSr.mjs').then((c) => c.AXPNumberWidgetFilterComponent),
2881
- },
2882
- edit: {
2883
- component: () => import('./acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs').then((c) => c.AXPNumberWidgetEditComponent),
2884
- },
2885
- column: {
2886
- component: () => import('./acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs').then((c) => c.AXPNumberWidgetViewComponent),
2887
- options: { allowResizing: true },
2888
- },
2889
- },
2890
- name: widgetSchemas.number,
2891
- filterOptions: {
2892
- operators: [...NUMBER_OPERATORS],
2893
- default: BETWEEN_OPER,
2894
- },
2895
- dataType: 'number',
2896
- });
2897
- service.extend('number', {
2898
- name: widgetSchemas.currency,
2899
- formats: {
2900
- default: 'EN-GB',
2901
- },
2902
- component: {
2903
- edit: {
2904
- options: {
2905
- clearButton: false,
2906
- },
2907
- },
2908
- },
2909
- });
2910
- //phone
2911
- service.register({
2912
- component: {
2913
- view: {
2914
- component: () => import('./acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs').then((c) => c.AXPPhoneWidgetViewComponent),
2915
- },
2916
- column: {
2917
- component: () => import('./acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs').then((c) => c.AXPPhoneWidgetColumnComponent),
2918
- options: { allowResizing: true },
2919
- },
2920
- edit: {
2921
- component: () => import('./acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs').then((c) => c.AXPPhoneWidgetEditComponent),
2922
- },
2923
- filter: {
2924
- component: () => import('./acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs').then((c) => c.AXPStringWidgetFilterComponent),
2925
- },
2926
- },
2927
- name: widgetSchemas.phone,
2928
- filterOptions: {
2929
- operators: [...STRING_OPERATORS],
2930
- default: EQ_OPER,
2931
- },
2932
- dataType: 'object',
2933
- });
2934
- //email
2935
- service.register({
2936
- component: {
2937
- view: {
2938
- component: () => import('./acorex-platform-common-email-widget-view.component-dMByK5bc.mjs').then((c) => c.AXPEmailWidgetViewComponent),
2939
- },
2940
- edit: {
2941
- component: () => import('./acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs').then((c) => c.AXPEmailWidgetEditComponent),
2942
- },
2943
- filter: {
2944
- component: () => import('./acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs').then((c) => c.AXPStringWidgetFilterComponent),
2945
- },
2946
- column: {
2947
- component: () => import('./acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs').then((c) => c.AXPEmailWidgetColumnComponent),
2948
- options: { allowResizing: true },
2949
- },
2950
- },
2951
- name: widgetSchemas.email,
2952
- filterOptions: {
2953
- operators: [...STRING_OPERATORS],
2954
- default: EQ_OPER,
2955
- },
2956
- dataType: 'object',
2957
- });
2958
- // dateTime
2959
- service.register({
2960
- component: {
2961
- view: {
2962
- component: () => import('./acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs').then((c) => c.AXPDateTimeWidgetViewComponent),
2963
- },
2964
- edit: {
2965
- component: () => import('./acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs').then((c) => c.AXPDateTimeWidgetEditComponent),
2966
- },
2967
- filter: {
2968
- component: () => import('./acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs').then((c) => c.AXPDateTimeWidgetFilterComponent),
2969
- },
2970
- column: {
2971
- component: () => import('./acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs').then((c) => c.AXPDateTimeWidgetColumnComponent),
2972
- options: {
2973
- width: '200px',
2974
- allowResizing: true,
2975
- },
2976
- },
2977
- },
2978
- formats: {
2979
- default: 'date',
2980
- },
2981
- filterOptions: {
2982
- operators: [...DATE_OPERATORS],
2983
- default: BETWEEN_OPER,
2984
- },
2985
- name: widgetSchemas.dateTime,
2986
- dataType: 'date',
2987
- });
2988
- service.extend(widgetSchemas.dateTime, {
2989
- name: widgetSchemas.date,
2990
- formats: {
2991
- default: 'date',
2992
- },
2993
- component: {
2994
- column: {
2995
- options: {
2996
- width: '120px',
2997
- },
2998
- },
2999
- },
3000
- });
3001
- service.extend(widgetSchemas.dateTime, {
3002
- name: widgetSchemas.time,
3003
- formats: {
3004
- default: 'time',
3005
- },
3006
- component: {
3007
- column: {
3008
- options: {
3009
- width: '80px',
3010
- },
3011
- },
3012
- },
3013
- });
3014
- //toggle
3015
- service.register({
3016
- component: {
3017
- view: {
3018
- component: () => import('./acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs').then((c) => c.AXPToggleWidgetViewComponent),
3019
- },
3020
- edit: {
3021
- component: () => import('./acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs').then((c) => c.AXPToggleWidgetEditComponent),
3022
- },
3023
- filter: {
3024
- component: () => import('./acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs').then((c) => c.AXPBooleanWidgetFilterComponent),
3025
- },
3026
- column: {
3027
- component: () => import('./acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs').then((c) => c.AXPToggleWidgetColumnComponent),
3028
- options: {
3029
- width: '100px',
3030
- allowResizing: true,
3031
- },
3032
- },
3033
- },
3034
- filterOptions: {
3035
- operators: [],
3036
- default: EQ_OPER,
3037
- },
3038
- name: widgetSchemas.toggle,
3039
- dataType: 'boolean',
3040
- });
3041
- //checkbox
3042
- service.register({
3043
- component: {
3044
- view: {
3045
- component: () => import('./acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs').then((c) => c.AXPCheckboxWidgetViewComponent),
3046
- },
3047
- edit: {
3048
- component: () => import('./acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs').then((c) => c.AXPCheckboxWidgetEditComponent),
3049
- },
3050
- filter: {
3051
- component: () => import('./acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs').then((c) => c.AXPBooleanWidgetFilterComponent),
3052
- },
3053
- column: {
3054
- component: () => import('./acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs').then((c) => c.AXPCheckboxWidgetColumnComponent),
3055
- options: {
3056
- width: '100px',
3057
- allowResizing: true,
3058
- },
3059
- },
3060
- },
3061
- filterOptions: {
3062
- operators: [],
3063
- default: EQ_OPER,
3064
- },
3065
- name: widgetSchemas.checkbox,
3066
- dataType: 'boolean',
3067
- });
3068
- //password
3069
- service.register({
3070
- component: {
3071
- view: {
3072
- component: () => import('./acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs').then((c) => c.AXPPasswordWidgetViewComponent),
3073
- },
3074
- column: {
3075
- component: () => import('./acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs').then((c) => c.AXPPasswordWidgetColumnComponent),
3076
- options: {
3077
- allowResizing: true,
3078
- },
3079
- },
3080
- edit: {
3081
- component: () => import('./acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs').then((c) => c.AXPPasswordWidgetEditComponent),
3082
- },
3083
- },
3084
- filterOptions: {
3085
- operators: [],
3086
- default: EQ_OPER,
3087
- },
3088
- name: widgetSchemas.password,
3089
- dataType: 'string',
3090
- });
3091
- //file
3092
- service.register({
3093
- component: {
3094
- view: {
3095
- component: () => import('./acorex-platform-common-file-widget-view.component-T3r6musY.mjs').then((c) => c.AXPFileWidgetViewComponent),
3096
- },
3097
- column: {
3098
- component: () => import('./acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs').then((c) => c.AXPFileWidgetColumnComponent),
3099
- options: {
3100
- allowResizing: true,
3101
- },
3102
- },
3103
- edit: {
3104
- component: () => import('./acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs').then((c) => c.AXPFileWidgetEditComponent),
3105
- },
3106
- filter: {
3107
- component: () => import('./acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs').then((c) => c.AXPFileWidgetFilterComponent),
3108
- },
3109
- },
3110
- filterOptions: {
3111
- operators: [],
3112
- default: EQ_OPER,
3113
- },
3114
- name: widgetSchemas.file,
3115
- dataType: 'object',
2240
+ class AXPToastAction extends AXPWorkflowAction {
2241
+ constructor() {
2242
+ super(...arguments);
2243
+ this.toastService = inject(AXToastService);
2244
+ this.translationService = inject(AXTranslationService);
2245
+ }
2246
+ async execute(context) {
2247
+ this.toastService.show({
2248
+ color: this.color,
2249
+ title: await this.translationService.translateAsync(this.title),
2250
+ content: await this.translationService.translateAsync(this.content),
2251
+ closeButton: true,
2252
+ timeOut: 3000,
2253
+ timeOutProgress: true,
3116
2254
  });
3117
- // look up
3118
- service.register({
3119
- component: {
3120
- view: {
3121
- component: () => import('./acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs').then((c) => c.AXPLookupWidgetViewComponent),
3122
- },
3123
- edit: {
3124
- component: () => import('./acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs').then((c) => c.AXPLookupWidgetEditComponent),
3125
- },
3126
- filter: {
3127
- component: () => import('./acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs').then((c) => c.AXPLookupWidgetFilterComponent),
3128
- },
3129
- column: {
3130
- component: () => import('./acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs').then((c) => c.AXPLookupWidgetColumnComponent),
3131
- options: {
3132
- allowResizing: true,
2255
+ }
2256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2257
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction }); }
2258
+ }
2259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction, decorators: [{
2260
+ type: Injectable
2261
+ }] });
2262
+
2263
+ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
2264
+ constructor() {
2265
+ super(...arguments);
2266
+ this.router = inject(Router);
2267
+ }
2268
+ async execute(context) {
2269
+ const command = context.getVariable('command');
2270
+ if (command.options.path.toLowerCase().startsWith('http') || command.options?.extras?.target == 'blank') {
2271
+ window.open(command.options.path, '_blank');
2272
+ }
2273
+ else {
2274
+ this.router.navigate([command.options.path], command.options.extras);
2275
+ }
2276
+ }
2277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2278
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
2279
+ }
2280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction, decorators: [{
2281
+ type: Injectable
2282
+ }] });
2283
+ const AXPNavigateWorkflow = {
2284
+ startStepId: 'start',
2285
+ steps: {
2286
+ 'start': {
2287
+ action: 'navigate-router',
2288
+ },
2289
+ },
2290
+ };
2291
+
2292
+ class AXMWorkflowErrorHandler {
2293
+ constructor() {
2294
+ this.dialog = inject(AXDialogService);
2295
+ }
2296
+ handleError(error, next) {
2297
+ if (error instanceof AXPWorkflowError) {
2298
+ this.dialog.alert("Somthing is wrong!", error.inner ? error.inner.message : error.message, 'danger');
2299
+ next(error);
2300
+ }
2301
+ else {
2302
+ next(error);
2303
+ }
2304
+ }
2305
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2306
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler }); }
2307
+ }
2308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
2309
+ type: Injectable
2310
+ }] });
2311
+
2312
+ class AXPCommonModule {
2313
+ static forRoot(configs) {
2314
+ return {
2315
+ ngModule: AXPCommonModule,
2316
+ providers: [
2317
+ ...(configs?.errorHandlers || []),
2318
+ {
2319
+ provide: 'AXPCommonModuleFactory',
2320
+ useFactory: (registry) => () => {
2321
+ registry.register(...(configs?.errorHandlers || []));
3133
2322
  },
2323
+ deps: [AXPErrorHandlerRegistryService],
2324
+ multi: true,
3134
2325
  },
3135
- },
3136
- filterOptions: {
3137
- operators: [],
3138
- default: EQ_OPER,
3139
- },
3140
- name: widgetSchemas.lookup,
3141
- dataType: 'object',
3142
- });
3143
- // selection list
3144
- service.register({
3145
- component: {
3146
- view: {
3147
- component: () => import('./acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs').then((c) => c.AXPSelectionListWidgetViewComponent),
3148
- },
3149
- edit: {
3150
- component: () => import('./acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs').then((c) => c.AXPSelectionListWidgetEditComponent),
3151
- },
3152
- column: {
3153
- component: () => import('./acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs').then((c) => c.AXPSelectionListWidgetColumnComponent),
3154
- options: {
3155
- allowResizing: true,
2326
+ ],
2327
+ };
2328
+ }
2329
+ static forChild(configs) {
2330
+ return {
2331
+ ngModule: AXPCommonModule,
2332
+ providers: [
2333
+ ...(configs?.errorHandlers || []),
2334
+ {
2335
+ provide: 'AXPCommonModuleFactory',
2336
+ useFactory: (registry) => () => {
2337
+ registry.register(...(configs?.errorHandlers || []));
3156
2338
  },
2339
+ deps: [AXPErrorHandlerRegistryService],
2340
+ multi: true,
3157
2341
  },
3158
- filter: {
3159
- component: () => import('./acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs').then((c) => c.AXPSelectionListWidgetFilterComponent),
3160
- },
3161
- },
3162
- filterOptions: {
3163
- operators: [],
3164
- default: EQ_OPER,
3165
- },
3166
- name: widgetSchemas.selectionList,
3167
- dataType: 'object',
2342
+ ],
2343
+ };
2344
+ }
2345
+ /**
2346
+ * @ignore
2347
+ */
2348
+ constructor(instances, appInitService, settingsService, seederService) {
2349
+ instances.forEach((f) => {
2350
+ f();
3168
2351
  });
3169
- // rich text
3170
- service.register({
3171
- component: {
3172
- view: {
3173
- component: () => import('./acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs').then((c) => c.AXPRichTextWidgetViewComponent),
3174
- },
3175
- edit: {
3176
- component: () => import('./acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs').then((c) => c.AXPRichTextWidgetEditComponent),
3177
- options: {
3178
- allowResizing: true,
3179
- },
3180
- },
3181
- column: {
3182
- component: () => import('./acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs').then((c) => c.AXPRichTextWidgetColumnComponent),
3183
- options: {
3184
- width: '400px',
3185
- },
3186
- },
3187
- filter: {
3188
- component: () => import('./acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs').then((c) => c.AXPStringWidgetFilterComponent),
3189
- },
3190
- },
3191
- filterOptions: {
3192
- operators: [...STRING_OPERATORS],
3193
- default: EQ_OPER,
2352
+ appInitService.registerTask({
2353
+ name: 'Settings',
2354
+ statusText: 'Loading Settings ...',
2355
+ run: async () => {
2356
+ await settingsService.load();
3194
2357
  },
3195
- name: widgetSchemas.richText,
3196
- dataType: 'object',
3197
2358
  });
3198
- // map
3199
- service.register({
3200
- component: {
3201
- view: {
3202
- component: () => import('./acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs').then((c) => c.AXPMapWidgetViewComponent),
3203
- },
3204
- edit: {
3205
- component: () => import('./acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs').then((c) => c.AXPMapWidgetEditComponent),
3206
- },
3207
- },
3208
- filterOptions: {
3209
- operators: [],
3210
- default: EQ_OPER,
2359
+ //
2360
+ //
2361
+ appInitService.registerTask({
2362
+ name: 'Seeder',
2363
+ statusText: 'Seed Data ...',
2364
+ run: async () => {
2365
+ await seederService.seed();
3211
2366
  },
3212
- name: widgetSchemas.map,
3213
- dataType: 'object',
3214
2367
  });
3215
- // avatar
3216
- service.register({
3217
- component: {
3218
- view: {
3219
- component: () => import('./acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs').then((c) => c.AXPAvatarWidgetViewComponent),
3220
- },
3221
- edit: {
3222
- component: () => import('./acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs').then((c) => c.AXPAvatarWidgetEditComponent),
3223
- },
3224
- },
3225
- filterOptions: {
3226
- operators: [],
3227
- default: EQ_OPER,
2368
+ }
2369
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }, { token: AXPAppStartUpService }, { token: AXPSettingValueProviderService }, { token: AXPDataSeederService }], target: i0.ɵɵFactoryTarget.NgModule }); }
2370
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, imports: [i4.AXPWorkflowModule, AXPopupModule,
2371
+ AXDateTimeModule,
2372
+ AXToastModule], exports: [RouterModule] }); }
2373
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, providers: [
2374
+ AXPAppStartUpProvider,
2375
+ {
2376
+ provide: ErrorHandler,
2377
+ useClass: AXPGlobalErrorHandler,
3228
2378
  },
3229
- name: widgetSchemas.avatar,
3230
- dataType: 'object',
3231
- });
3232
- // messenger
3233
- service.register({
3234
- component: {
3235
- view: {
3236
- component: () => import('./acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs').then((c) => c.AXPMessengerWidgetViewComponent),
3237
- },
3238
- edit: {
3239
- component: () => import('./acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs').then((c) => c.AXPMessengerWidgetEditComponent),
3240
- },
3241
- column: {
3242
- component: () => import('./acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs').then((c) => c.AXPMessengerWidgetColumnComponent),
3243
- options: {
3244
- allowResizing: true,
3245
- },
3246
- },
2379
+ {
2380
+ provide: AXPCustomOperatorService,
2381
+ useClass: AXPCustomOperatorServiceImpl,
3247
2382
  },
3248
- filterOptions: {
3249
- operators: [],
3250
- default: EQ_OPER,
2383
+ {
2384
+ provide: AXPFilterOperatorMiddlewareService,
2385
+ useClass: AXPFilterOperatorMiddlewareServiceImpl,
3251
2386
  },
3252
- name: widgetSchemas.messenger,
3253
- dataType: 'object',
3254
- });
3255
- //
3256
- // gallery
3257
- service.register({
3258
- component: {
3259
- view: {
3260
- component: () => import('./acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs').then((c) => c.AXPGalleryWidgetViewComponent),
3261
- },
3262
- edit: {
3263
- component: () => import('./acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs').then((c) => c.AXPGalleryWidgetEditComponent),
3264
- },
3265
- filter: {
3266
- component: () => import('./acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs').then((c) => c.AXPGalleryWidgetFilterComponent),
3267
- },
2387
+ {
2388
+ provide: AXP_SEARCH_PROVIDER,
2389
+ useClass: AXPSettingSearchProvider,
2390
+ multi: true,
3268
2391
  },
3269
- filterOptions: {
3270
- operators: [],
3271
- default: EQ_OPER,
2392
+ {
2393
+ provide: AXP_SEARCH_PROVIDER,
2394
+ useClass: AXPMenuSearchProvider,
2395
+ multi: true,
3272
2396
  },
3273
- name: widgetSchemas.gallery,
3274
- dataType: 'object',
3275
- });
3276
- // signature-pad
3277
- service.register({
3278
- component: {
3279
- view: {
3280
- component: () => import('./acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs').then((c) => c.AXPSignaturePadWidgetViewComponent),
3281
- },
3282
- edit: {
3283
- component: () => import('./acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs').then((c) => c.AXPSignaturePadWidgetEditComponent),
3284
- },
2397
+ {
2398
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2399
+ useClass: AXPSettingSearchDefinitionProvider,
2400
+ multi: true,
3285
2401
  },
3286
- filterOptions: {
3287
- operators: [],
3288
- default: EQ_OPER,
2402
+ {
2403
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2404
+ useClass: AXPMenuSearchDefinitionProvider,
2405
+ multi: true,
3289
2406
  },
3290
- name: widgetSchemas.signaturePad,
3291
- dataType: 'object',
3292
- });
3293
- //
3294
- }
3295
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonWidgetModule, deps: [{ token: AXPSchemaRegistryService }], target: i0.ɵɵFactoryTarget.NgModule }); }
3296
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonWidgetModule, imports: [AXToastModule] }); }
3297
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonWidgetModule, imports: [AXToastModule] }); }
2407
+ ], imports: [AXPWorkflowModule.forChild({
2408
+ actions: {
2409
+ 'navigate-router': AXPWorkflowRouterNavigateAction,
2410
+ 'show-prompt-dialog': AXPDialogConfirmAction,
2411
+ 'show-toast': AXPToastAction,
2412
+ },
2413
+ workflows: {
2414
+ 'navigate': AXPNavigateWorkflow
2415
+ }
2416
+ }),
2417
+ AXPopupModule,
2418
+ AXDateTimeModule,
2419
+ AXToastModule, RouterModule] }); }
3298
2420
  }
3299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonWidgetModule, decorators: [{
2421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, decorators: [{
3300
2422
  type: NgModule,
3301
2423
  args: [{
3302
- imports: [AXToastModule],
3303
- exports: [],
3304
- declarations: [],
3305
- providers: [],
2424
+ imports: [
2425
+ AXPWorkflowModule.forChild({
2426
+ actions: {
2427
+ 'navigate-router': AXPWorkflowRouterNavigateAction,
2428
+ 'show-prompt-dialog': AXPDialogConfirmAction,
2429
+ 'show-toast': AXPToastAction,
2430
+ },
2431
+ workflows: {
2432
+ 'navigate': AXPNavigateWorkflow
2433
+ }
2434
+ }),
2435
+ AXPopupModule,
2436
+ AXDateTimeModule,
2437
+ AXToastModule,
2438
+ ],
2439
+ exports: [RouterModule],
2440
+ providers: [
2441
+ AXPAppStartUpProvider,
2442
+ {
2443
+ provide: ErrorHandler,
2444
+ useClass: AXPGlobalErrorHandler,
2445
+ },
2446
+ {
2447
+ provide: AXPCustomOperatorService,
2448
+ useClass: AXPCustomOperatorServiceImpl,
2449
+ },
2450
+ {
2451
+ provide: AXPFilterOperatorMiddlewareService,
2452
+ useClass: AXPFilterOperatorMiddlewareServiceImpl,
2453
+ },
2454
+ {
2455
+ provide: AXP_SEARCH_PROVIDER,
2456
+ useClass: AXPSettingSearchProvider,
2457
+ multi: true,
2458
+ },
2459
+ {
2460
+ provide: AXP_SEARCH_PROVIDER,
2461
+ useClass: AXPMenuSearchProvider,
2462
+ multi: true,
2463
+ },
2464
+ {
2465
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2466
+ useClass: AXPSettingSearchDefinitionProvider,
2467
+ multi: true,
2468
+ },
2469
+ {
2470
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2471
+ useClass: AXPMenuSearchDefinitionProvider,
2472
+ multi: true,
2473
+ },
2474
+ ],
3306
2475
  }]
3307
- }], ctorParameters: () => [{ type: AXPSchemaRegistryService }] });
2476
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2477
+ type: Inject,
2478
+ args: ['AXPCommonModuleFactory']
2479
+ }] }, { type: AXPAppStartUpService }, { type: AXPSettingValueProviderService }, { type: AXPDataSeederService }] });
2480
+
2481
+ const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
2482
+ const AXP_PLATFORM_CONFIG_TOKEN = new InjectionToken('AXP_PLATFORM_CONFIG_TOKEN', {
2483
+ providedIn: 'root',
2484
+ factory: () => {
2485
+ return AXPPlatformDefaultConfigs;
2486
+ },
2487
+ });
2488
+ const AXPPlatformDefaultConfigs = {
2489
+ copyright: 'ACoreX @ 2024',
2490
+ title: 'ACoreX Platform',
2491
+ logo: {
2492
+ dark: new AXPTextLogoConfig('ACoreX'),
2493
+ light: new AXPTextLogoConfig('ACoreX'),
2494
+ colored: new AXPTextLogoConfig('ACoreX'),
2495
+ },
2496
+ network: {
2497
+ timeOut: 5000,
2498
+ }
2499
+ };
2500
+ function configPlatform(config = AXPPlatformDefaultConfigs) {
2501
+ return merge(AXPPlatformDefaultConfigs, config);
2502
+ }
2503
+
2504
+ const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
3308
2505
 
3309
2506
  class AXPFileStorageService {
3310
2507
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -3323,9 +2520,29 @@ var AXPFileStorageStatus;
3323
2520
  AXPFileStorageStatus["Error"] = "error";
3324
2521
  })(AXPFileStorageStatus || (AXPFileStorageStatus = {}));
3325
2522
 
2523
+ class AXPFiltersProviderService {
2524
+ async getAll() {
2525
+ return Promise.resolve('');
2526
+ }
2527
+ async execute() {
2528
+ return Promise.resolve('');
2529
+ }
2530
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2531
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, providedIn: 'root' }); }
2532
+ }
2533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, decorators: [{
2534
+ type: Injectable,
2535
+ args: [{
2536
+ providedIn: 'root',
2537
+ }]
2538
+ }] });
2539
+
2540
+ const AXPSignOutAction = createAction('[SignOut] Action');
2541
+ const AXPSignInAction = createAction('[SignIn] Action');
2542
+
3326
2543
  /**
3327
2544
  * Generated bundle index. Do not edit.
3328
2545
  */
3329
2546
 
3330
- export { ALL_DEFAULT_OPERATORS, AXEntityLoaderDefault, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService, AXPCommonEffects, AXPCommonModule, AXPCommonWidgetModule, AXPComponentLogoConfig, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDataSeederService, AXPDexieEntityStorageService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityListViewConfigEmpty, AXPEntityQueryType, AXPEntityRegistryService, AXPEntityStorageService, AXPErrorHandlerRegistryService, AXPFileStorageService, AXPFileStorageStatus, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFontIconLogoConfig, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPLogoComponent, AXPMenuProviderService, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateAction, AXPPdfPageSize, AXPPdfService, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRelationshipCardinality, AXPRelationshipKind, AXPSchemaModule, AXPSchemaRegistryService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingScope, AXPSettingValueProviderService, AXPSignInAction, AXPSignOutAction, AXPStickyDirective, AXPTextLogoConfig, AXPToastAction, AXPWidgetBase, AXPWidgetColumnRendererComponent, AXPWidgetEditBase, AXPWidgetFilterBase, AXPWidgetFilterRendererComponent, AXPWidgetRendererComponent, AXPWorkflowNavigateAction, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_LOADER, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_WIDGET_TOKEN, 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, convertPropertiesToColumns, convertPropertyToColumn, getEntityInfo, resolveActionLook, widgetSchemas };
2547
+ export { ALL_DEFAULT_OPERATORS, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService, AXPCommandSearchProvider, AXPCommonModule, AXPComponentLogoConfig, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDataSeederService, AXPDexieEntityStorageService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityQueryType, AXPEntityStorageService, AXPErrorHandlerRegistryService, AXPFileStorageService, AXPFileStorageStatus, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFontIconLogoConfig, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPdfPageSize, AXPPdfService, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRelationshipCardinality, AXPRelationshipKind, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingScope, AXPSettingValueProviderService, AXPSignInAction, AXPSignOutAction, AXPStickyDirective, AXPTextLogoConfig, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_DATA_SEEDER_TOKEN, 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, 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, getEntityInfo, resolveActionLook };
3331
2548
  //# sourceMappingURL=acorex-platform-common.mjs.map