@acorex/platform 19.1.6 → 19.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) 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/layout/menu/index.d.ts +4 -2
  7. package/common/lib/layout/menu/search-definition.provider.d.ts +4 -0
  8. package/common/lib/layout/menu/search.provider.d.ts +20 -0
  9. package/common/lib/search/index.d.ts +5 -0
  10. package/common/lib/search/search-definition.builder.d.ts +23 -0
  11. package/common/lib/search/search-definition.provider.d.ts +18 -0
  12. package/common/lib/search/search.provider.d.ts +4 -0
  13. package/common/lib/search/search.service.d.ts +12 -0
  14. package/common/lib/search/search.types.d.ts +42 -0
  15. package/common/lib/settings/search-definition.provider.d.ts +4 -0
  16. package/common/lib/settings/search.provider.d.ts +10 -0
  17. package/fesm2022/acorex-platform-auth.mjs +78 -43
  18. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-common.mjs +1439 -2234
  20. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-entity.mjs +14 -5
  22. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-layout-search.mjs +183 -0
  24. package/fesm2022/acorex-platform-layout-search.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-layout-setting.mjs +21 -20
  26. package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs +62 -0
  36. package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs → acorex-platform-themes-default-setting-page.component-BXwdFLy4.mjs} +3 -3
  38. package/fesm2022/{acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs.map → acorex-platform-themes-default-setting-page.component-BXwdFLy4.mjs.map} +1 -1
  39. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs → acorex-platform-themes-default-setting-view.component-BXsmvaIi.mjs} +5 -5
  40. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs.map → acorex-platform-themes-default-setting-view.component-BXsmvaIi.mjs.map} +1 -1
  41. package/fesm2022/acorex-platform-themes-default.mjs +28 -15
  42. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  43. package/fesm2022/acorex-platform-themes-shared.mjs +2 -2
  44. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  45. package/fesm2022/acorex-platform-widgets.mjs +74 -85
  46. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  47. package/layout/search/README.md +3 -0
  48. package/layout/search/index.d.ts +1 -0
  49. package/layout/search/lib/index.d.ts +3 -0
  50. package/layout/search/lib/search-slot.component.d.ts +9 -0
  51. package/layout/search/lib/search.config.d.ts +5 -0
  52. package/layout/search/lib/search.module.d.ts +11 -0
  53. package/layout/search/lib/search.viewmodel.d.ts +13 -0
  54. package/layout/search/lib/workflows/search.workflow.d.ts +10 -0
  55. package/layout/setting/lib/setting.viewmodel.d.ts +1 -1
  56. package/package.json +12 -8
  57. package/themes/default/lib/layouts/search-layout/search-popup.component.d.ts +11 -0
  58. package/themes/shared/index.d.ts +1 -1
  59. package/themes/shared/lib/components/layout-elements/layout-list.component.d.ts +1 -1
  60. package/themes/shared/lib/components/{theme-slot.component.d.ts → slots/theme-slot.component.d.ts} +7 -7
  61. package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +0 -1
  62. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +6 -4
  63. package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +6 -5
  64. package/common/lib/schema/component-loader.d.ts +0 -24
  65. package/common/lib/schema/entity/entity-registery.service.d.ts +0 -34
  66. package/common/lib/schema/entity/entity.class.d.ts +0 -161
  67. package/common/lib/schema/entity/entity.loader.d.ts +0 -9
  68. package/common/lib/schema/entity/index.d.ts +0 -3
  69. package/common/lib/schema/formats.d.ts +0 -8
  70. package/common/lib/schema/index.d.ts +0 -8
  71. package/common/lib/schema/schema-registery.service.d.ts +0 -20
  72. package/common/lib/schema/schema.module.d.ts +0 -12
  73. package/common/lib/schema/schema.types.d.ts +0 -16
  74. package/common/lib/schema/widget/index.d.ts +0 -5
  75. package/common/lib/schema/widget/widget-base.d.ts +0 -45
  76. package/common/lib/schema/widget/widget-column-renderer.d.ts +0 -34
  77. package/common/lib/schema/widget/widget-filter-renderer.d.ts +0 -30
  78. package/common/lib/schema/widget/widget-renderer.d.ts +0 -27
  79. package/common/lib/schema/widget/widget-token.d.ts +0 -16
  80. package/common/lib/schema/widgets/avatar/avatar-widget-edit.component.d.ts +0 -16
  81. package/common/lib/schema/widgets/avatar/avatar-widget-view.component.d.ts +0 -13
  82. package/common/lib/schema/widgets/checkbox/checkbox-widget-column.component.d.ts +0 -11
  83. package/common/lib/schema/widgets/checkbox/checkbox-widget-edit.component.d.ts +0 -6
  84. package/common/lib/schema/widgets/checkbox/checkbox-widget-view.component.d.ts +0 -11
  85. package/common/lib/schema/widgets/common-widget-filter/boolean-widget-filter.component.d.ts +0 -18
  86. package/common/lib/schema/widgets/common-widget-filter/number-widget-filter.component.d.ts +0 -12
  87. package/common/lib/schema/widgets/common-widget-filter/string-widget-filter.component.d.ts +0 -12
  88. package/common/lib/schema/widgets/common-widgets.module.d.ts +0 -32
  89. package/common/lib/schema/widgets/dateTime/dateTime-widget-column.component.d.ts +0 -11
  90. package/common/lib/schema/widgets/dateTime/dateTime-widget-edit.component.d.ts +0 -24
  91. package/common/lib/schema/widgets/dateTime/dateTime-widget-filter.component.d.ts +0 -19
  92. package/common/lib/schema/widgets/dateTime/dateTime-widget-view.component.d.ts +0 -11
  93. package/common/lib/schema/widgets/email/email-widget-column.component.d.ts +0 -16
  94. package/common/lib/schema/widgets/email/email-widget-edit.component.d.ts +0 -26
  95. package/common/lib/schema/widgets/email/email-widget-view.component.d.ts +0 -16
  96. package/common/lib/schema/widgets/file/file-widget-column.component.d.ts +0 -8
  97. package/common/lib/schema/widgets/file/file-widget-edit.component.d.ts +0 -17
  98. package/common/lib/schema/widgets/file/file-widget-filter.component.d.ts +0 -6
  99. package/common/lib/schema/widgets/file/file-widget-view.component.d.ts +0 -17
  100. package/common/lib/schema/widgets/gallery/gallery-widget-edit.component.d.ts +0 -15
  101. package/common/lib/schema/widgets/gallery/gallery-widget-filter.component.d.ts +0 -6
  102. package/common/lib/schema/widgets/gallery/gallery-widget-types.d.ts +0 -10
  103. package/common/lib/schema/widgets/gallery/gallery-widget-view.component.d.ts +0 -16
  104. package/common/lib/schema/widgets/index.d.ts +0 -1
  105. package/common/lib/schema/widgets/lookup/lookup-widget-column.component.d.ts +0 -17
  106. package/common/lib/schema/widgets/lookup/lookup-widget-edit.component.d.ts +0 -18
  107. package/common/lib/schema/widgets/lookup/lookup-widget-filter.component.d.ts +0 -17
  108. package/common/lib/schema/widgets/lookup/lookup-widget-view.component.d.ts +0 -18
  109. package/common/lib/schema/widgets/map/map-widget-edit.component.d.ts +0 -15
  110. package/common/lib/schema/widgets/map/map-widget-view.component.d.ts +0 -17
  111. package/common/lib/schema/widgets/messenger/messenger-widget-column.component.d.ts +0 -15
  112. package/common/lib/schema/widgets/messenger/messenger-widget-edit.component.d.ts +0 -14
  113. package/common/lib/schema/widgets/messenger/messenger-widget-view.component.d.ts +0 -17
  114. package/common/lib/schema/widgets/number/number-widget-edit.component.d.ts +0 -7
  115. package/common/lib/schema/widgets/number/number-widget-view.component.d.ts +0 -8
  116. package/common/lib/schema/widgets/password/change-password.component.d.ts +0 -16
  117. package/common/lib/schema/widgets/password/password-widget-column.component.d.ts +0 -14
  118. package/common/lib/schema/widgets/password/password-widget-edit.component.d.ts +0 -6
  119. package/common/lib/schema/widgets/password/password-widget-view.component.d.ts +0 -18
  120. package/common/lib/schema/widgets/phone/phone-widget-column.component.d.ts +0 -15
  121. package/common/lib/schema/widgets/phone/phone-widget-edit.component.d.ts +0 -29
  122. package/common/lib/schema/widgets/phone/phone-widget-view.component.d.ts +0 -18
  123. package/common/lib/schema/widgets/rich-text/rich-text-widget-column.component.d.ts +0 -11
  124. package/common/lib/schema/widgets/rich-text/rich-text-widget-edit.component.d.ts +0 -33
  125. package/common/lib/schema/widgets/rich-text/rich-text-widget-view.component.d.ts +0 -10
  126. package/common/lib/schema/widgets/selection-list/selection-list-widget-column.component.d.ts +0 -16
  127. package/common/lib/schema/widgets/selection-list/selection-list-widget-edit.component.d.ts +0 -12
  128. package/common/lib/schema/widgets/selection-list/selection-list-widget-filter.component.d.ts +0 -9
  129. package/common/lib/schema/widgets/selection-list/selection-list-widget-view.component.d.ts +0 -15
  130. package/common/lib/schema/widgets/signature-pad/signature-pad-widget-edit.component.d.ts +0 -19
  131. package/common/lib/schema/widgets/signature-pad/signature-pad-widget-view.component.d.ts +0 -8
  132. package/common/lib/schema/widgets/text/largetext-widget-edit.component.d.ts +0 -6
  133. package/common/lib/schema/widgets/text/text-widget-column.component.d.ts +0 -12
  134. package/common/lib/schema/widgets/text/text-widget-edit.component.d.ts +0 -21
  135. package/common/lib/schema/widgets/text/text-widget-view.component.d.ts +0 -11
  136. package/common/lib/schema/widgets/toggle/toggle-widget-column.component.d.ts +0 -11
  137. package/common/lib/schema/widgets/toggle/toggle-widget-edit.component.d.ts +0 -6
  138. package/common/lib/schema/widgets/toggle/toggle-widget-view.component.d.ts +0 -11
  139. package/fesm2022/acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs +0 -166
  140. package/fesm2022/acorex-platform-common-avatar-widget-edit.component-syRKKn21.mjs.map +0 -1
  141. package/fesm2022/acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs +0 -64
  142. package/fesm2022/acorex-platform-common-avatar-widget-view.component-DSju_bgg.mjs.map +0 -1
  143. package/fesm2022/acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs +0 -155
  144. package/fesm2022/acorex-platform-common-boolean-widget-filter.component-aaKT0FyC.mjs.map +0 -1
  145. package/fesm2022/acorex-platform-common-change-password.component-DFoC5nP2.mjs +0 -176
  146. package/fesm2022/acorex-platform-common-change-password.component-DFoC5nP2.mjs.map +0 -1
  147. package/fesm2022/acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs +0 -55
  148. package/fesm2022/acorex-platform-common-checkbox-widget-column.component-DZxykkVr.mjs.map +0 -1
  149. package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs +0 -24
  150. package/fesm2022/acorex-platform-common-checkbox-widget-edit.component-CNmYVpMu.mjs.map +0 -1
  151. package/fesm2022/acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs +0 -49
  152. package/fesm2022/acorex-platform-common-checkbox-widget-view.component-3XLnJx9A.mjs.map +0 -1
  153. package/fesm2022/acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs +0 -46
  154. package/fesm2022/acorex-platform-common-dateTime-widget-column.component-CKaMC189.mjs.map +0 -1
  155. package/fesm2022/acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs +0 -178
  156. package/fesm2022/acorex-platform-common-dateTime-widget-edit.component-B50J-bwp.mjs.map +0 -1
  157. package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs +0 -286
  158. package/fesm2022/acorex-platform-common-dateTime-widget-filter.component-CTV2a3c0.mjs.map +0 -1
  159. package/fesm2022/acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs +0 -73
  160. package/fesm2022/acorex-platform-common-dateTime-widget-view.component-C7hmUXLz.mjs.map +0 -1
  161. package/fesm2022/acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs +0 -75
  162. package/fesm2022/acorex-platform-common-email-widget-column.component-BPoSZTqM.mjs.map +0 -1
  163. package/fesm2022/acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs +0 -249
  164. package/fesm2022/acorex-platform-common-email-widget-edit.component-aLPGOG3r.mjs.map +0 -1
  165. package/fesm2022/acorex-platform-common-email-widget-view.component-dMByK5bc.mjs +0 -109
  166. package/fesm2022/acorex-platform-common-email-widget-view.component-dMByK5bc.mjs.map +0 -1
  167. package/fesm2022/acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs +0 -29
  168. package/fesm2022/acorex-platform-common-file-widget-column.component-Dafc2zLc.mjs.map +0 -1
  169. package/fesm2022/acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs +0 -202
  170. package/fesm2022/acorex-platform-common-file-widget-edit.component-C31kfJSw.mjs.map +0 -1
  171. package/fesm2022/acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs +0 -29
  172. package/fesm2022/acorex-platform-common-file-widget-filter.component-BNCcBun4.mjs.map +0 -1
  173. package/fesm2022/acorex-platform-common-file-widget-view.component-T3r6musY.mjs +0 -155
  174. package/fesm2022/acorex-platform-common-file-widget-view.component-T3r6musY.mjs.map +0 -1
  175. package/fesm2022/acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs +0 -191
  176. package/fesm2022/acorex-platform-common-gallery-widget-edit.component-zBsaBkzu.mjs.map +0 -1
  177. package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs +0 -29
  178. package/fesm2022/acorex-platform-common-gallery-widget-filter.component-BhLYuB6p.mjs.map +0 -1
  179. package/fesm2022/acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs +0 -175
  180. package/fesm2022/acorex-platform-common-gallery-widget-view.component-Dxf4Oj1E.mjs.map +0 -1
  181. package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs +0 -38
  182. package/fesm2022/acorex-platform-common-largetext-widget-edit.component-BYMIaLCI.mjs.map +0 -1
  183. package/fesm2022/acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs +0 -45
  184. package/fesm2022/acorex-platform-common-lookup-widget-column.component-BB0Mdx2u.mjs.map +0 -1
  185. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs +0 -96
  186. package/fesm2022/acorex-platform-common-lookup-widget-edit.component-DUPsS_ZW.mjs.map +0 -1
  187. package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs +0 -161
  188. package/fesm2022/acorex-platform-common-lookup-widget-filter.component-CLyl94AJ.mjs.map +0 -1
  189. package/fesm2022/acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs +0 -56
  190. package/fesm2022/acorex-platform-common-lookup-widget-view.component-CJijszjn.mjs.map +0 -1
  191. package/fesm2022/acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs +0 -94
  192. package/fesm2022/acorex-platform-common-map-widget-edit.component-BTHORlG5.mjs.map +0 -1
  193. package/fesm2022/acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs +0 -66
  194. package/fesm2022/acorex-platform-common-map-widget-view.component-CQzW1ZeD.mjs.map +0 -1
  195. package/fesm2022/acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs +0 -73
  196. package/fesm2022/acorex-platform-common-messenger-widget-column.component-Brm4vLGA.mjs.map +0 -1
  197. package/fesm2022/acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs +0 -138
  198. package/fesm2022/acorex-platform-common-messenger-widget-edit.component-CJHvut2C.mjs.map +0 -1
  199. package/fesm2022/acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs +0 -133
  200. package/fesm2022/acorex-platform-common-messenger-widget-view.component-DVylp_2t.mjs.map +0 -1
  201. package/fesm2022/acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs +0 -48
  202. package/fesm2022/acorex-platform-common-number-widget-edit.component-DZf-n-yr.mjs.map +0 -1
  203. package/fesm2022/acorex-platform-common-number-widget-filter.component-womVAhSr.mjs +0 -137
  204. package/fesm2022/acorex-platform-common-number-widget-filter.component-womVAhSr.mjs.map +0 -1
  205. package/fesm2022/acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs +0 -33
  206. package/fesm2022/acorex-platform-common-number-widget-view.component-L2pxAqqz.mjs.map +0 -1
  207. package/fesm2022/acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs +0 -68
  208. package/fesm2022/acorex-platform-common-password-widget-column.component-3ubqJk-d.mjs.map +0 -1
  209. package/fesm2022/acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs +0 -43
  210. package/fesm2022/acorex-platform-common-password-widget-edit.component-BokyEDfK.mjs.map +0 -1
  211. package/fesm2022/acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs +0 -110
  212. package/fesm2022/acorex-platform-common-password-widget-view.component-BuFoE2fz.mjs.map +0 -1
  213. package/fesm2022/acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs +0 -93
  214. package/fesm2022/acorex-platform-common-phone-widget-column.component-79Me_VNP.mjs.map +0 -1
  215. package/fesm2022/acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs +0 -249
  216. package/fesm2022/acorex-platform-common-phone-widget-edit.component-CIayMoT1.mjs.map +0 -1
  217. package/fesm2022/acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs +0 -124
  218. package/fesm2022/acorex-platform-common-phone-widget-view.component-B1Xu_rxC.mjs.map +0 -1
  219. package/fesm2022/acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs +0 -63
  220. package/fesm2022/acorex-platform-common-rich-text-widget-column.component-Dbn3JMOu.mjs.map +0 -1
  221. package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs +0 -69
  222. package/fesm2022/acorex-platform-common-rich-text-widget-edit.component-CJZJzh1K.mjs.map +0 -1
  223. package/fesm2022/acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs +0 -37
  224. package/fesm2022/acorex-platform-common-rich-text-widget-view.component-qvUpx39D.mjs.map +0 -1
  225. package/fesm2022/acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs +0 -47
  226. package/fesm2022/acorex-platform-common-selection-list-widget-column.component-E7yRTViz.mjs.map +0 -1
  227. package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs +0 -55
  228. package/fesm2022/acorex-platform-common-selection-list-widget-edit.component-B8dmJ_jJ.mjs.map +0 -1
  229. package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs +0 -47
  230. package/fesm2022/acorex-platform-common-selection-list-widget-filter.component-i4syx0Bj.mjs.map +0 -1
  231. package/fesm2022/acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs +0 -47
  232. package/fesm2022/acorex-platform-common-selection-list-widget-view.component-B7disiIF.mjs.map +0 -1
  233. package/fesm2022/acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs +0 -130
  234. package/fesm2022/acorex-platform-common-signature-pad-widget-edit.component-CMoiIhgJ.mjs.map +0 -1
  235. package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs +0 -43
  236. package/fesm2022/acorex-platform-common-signature-pad-widget-view.component-HfArY6VQ.mjs.map +0 -1
  237. package/fesm2022/acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs +0 -127
  238. package/fesm2022/acorex-platform-common-string-widget-filter.component-CDssxMLR.mjs.map +0 -1
  239. package/fesm2022/acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs +0 -49
  240. package/fesm2022/acorex-platform-common-text-widget-column.component-7yp4qqIb.mjs.map +0 -1
  241. package/fesm2022/acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs +0 -162
  242. package/fesm2022/acorex-platform-common-text-widget-edit.component-5koh5Aws.mjs.map +0 -1
  243. package/fesm2022/acorex-platform-common-text-widget-view.component-BH0LTD80.mjs +0 -69
  244. package/fesm2022/acorex-platform-common-text-widget-view.component-BH0LTD80.mjs.map +0 -1
  245. package/fesm2022/acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs +0 -59
  246. package/fesm2022/acorex-platform-common-toggle-widget-column.component-C5dMjerm.mjs.map +0 -1
  247. package/fesm2022/acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs +0 -27
  248. package/fesm2022/acorex-platform-common-toggle-widget-edit.component-JOnGMn-9.mjs.map +0 -1
  249. package/fesm2022/acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs +0 -51
  250. package/fesm2022/acorex-platform-common-toggle-widget-view.component-DguoIz_c.mjs.map +0 -1
@@ -1,35 +1,28 @@
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, merge, cloneDeep, get, omit } 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
7
  import * as i5 from '@acorex/platform/workflow';
8
8
  import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
9
- import * as i2 from '@angular/router';
9
+ import * as i2$1 from '@angular/router';
10
10
  import { Router, RouterModule } from '@angular/router';
11
- import * as i1 from '@ngrx/effects';
11
+ import * as i1$1 from '@ngrx/effects';
12
12
  import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
13
13
  import { applySortArray, applyFilterArray } from '@acorex/platform/core';
14
14
  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';
15
+ import * as i3 from '@acorex/components/decorators';
20
16
  import { AXDecoratorModule } from '@acorex/components/decorators';
21
- import * as i2$1 from '@acorex/components/image';
17
+ import * as i2 from '@acorex/components/image';
22
18
  import { AXImageModule } from '@acorex/components/image';
23
- import * as i1$1 from '@angular/common';
19
+ import * as i1 from '@angular/common';
24
20
  import { CommonModule } from '@angular/common';
25
21
  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';
22
+ import { createAction, props, Store } from '@ngrx/store';
23
+ import { Subject, switchMap, of } from 'rxjs';
24
+ import { AXTranslationService } from '@acorex/core/translation';
25
+ import { AXDialogService } from '@acorex/components/dialog';
33
26
 
34
27
  class AXPAppStartUpService {
35
28
  constructor() {
@@ -764,1255 +757,990 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
764
757
  args: [{ providedIn: 'root' }]
765
758
  }], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
766
759
 
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);
760
+ // src/app/directives/grid-layout.directive.ts
761
+ class AXPGridLayoutDirective {
762
+ constructor(el, renderer) {
763
+ this.el = el;
764
+ this.renderer = renderer;
793
765
  }
794
- group(name) {
795
- const foundGroup = this.groupMap.get(name);
796
- if (!foundGroup) {
797
- throw new Error(`Group with name "${name}" not found.`);
766
+ ngOnChanges(changes) {
767
+ if (changes['options']) {
768
+ this.applyTailwindClasses();
798
769
  }
799
- return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
800
770
  }
801
- getGroups() {
802
- return this.rootGroups;
771
+ applyTailwindClasses() {
772
+ // Clear existing grid classes
773
+ this.clearClasses();
774
+ // Apply new grid classes based on the input options
775
+ this.setClasses(this.options.positions?.default, '');
776
+ this.setClasses(this.options.positions?.md, 'md:');
777
+ this.setClasses(this.options.positions?.lg, 'lg:');
778
+ this.setClasses(this.options.positions?.xl, 'xl:');
779
+ this.setClasses(this.options.positions?.xxl, '2xl:');
803
780
  }
804
- // Expose groupMap for controlled access
805
- hasGroup(name) {
806
- return this.groupMap.has(name);
781
+ setClasses(positions, prefix) {
782
+ if (positions == null)
783
+ return;
784
+ const colStart = positions.colStart ? `${prefix}ax-col-start-${positions.colStart}` : '';
785
+ const colEnd = positions.colEnd ? `${prefix}ax-col-end-${positions.colEnd}` : '';
786
+ const colSpan = positions.colSpan ? `${prefix}ax-col-span-${positions.colSpan}` : '';
787
+ const rowStart = positions.rowStart ? `${prefix}ax-row-start-${positions.rowStart}` : '';
788
+ const rowEnd = positions.rowEnd ? `${prefix}ax-row-end-${positions.rowEnd}` : '';
789
+ const rowSpan = positions.rowSpan ? `${prefix}ax-row-span-${positions.rowSpan}` : '';
790
+ const order = positions.order ? `${prefix}ax-order-${positions.order}` : ''; // Handling order
791
+ [colStart, colEnd, colSpan, rowStart, rowEnd, rowSpan, order].forEach(cls => {
792
+ if (cls) {
793
+ this.renderer.addClass(this.el.nativeElement, cls);
794
+ }
795
+ });
807
796
  }
808
- getGroup(name) {
809
- return this.groupMap.get(name);
797
+ clearClasses() {
798
+ const currentClasses = this.el.nativeElement.className.split(' ');
799
+ currentClasses.forEach((className) => {
800
+ if (className.startsWith('ax-col-') || className.startsWith('ax-row-') || className.startsWith('ax-order-')) {
801
+ this.renderer.removeClass(this.el.nativeElement, className);
802
+ }
803
+ });
810
804
  }
805
+ 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 }); }
806
+ 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
807
  }
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);
826
- }
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}".`);
831
- }
832
- return new AXPSettingDefinitionSectionBuilder(this, foundSection);
808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
809
+ type: Directive,
810
+ args: [{
811
+ selector: '[gridLayout]',
812
+ standalone: true,
813
+ }]
814
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{
815
+ type: Input,
816
+ args: ['gridLayout']
817
+ }] } });
818
+
819
+ class AXPStickyDirective {
820
+ get isSticky() {
821
+ return this._isSticky;
833
822
  }
834
- addGroup(name, title, description, icon) {
835
- const newGroup = {
836
- name,
837
- title,
838
- description: description,
839
- icon,
840
- groups: [],
841
- sections: [],
842
- };
843
- this.group.groups.push(newGroup);
844
- if (this.context.hasGroup(name)) {
845
- throw new Error(`Group with name "${name}" already exists.`);
823
+ set isSticky(value) {
824
+ if (this._isSticky !== value) {
825
+ this._isSticky = value;
826
+ this.isStickyChange.emit(value);
846
827
  }
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
828
  }
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
- },
829
+ constructor(element, renderer, zone, cdr) {
830
+ this.element = element;
831
+ this.renderer = renderer;
832
+ this.zone = zone;
833
+ this.cdr = cdr;
834
+ this.stickyOffset = 100;
835
+ this.isStickyChange = new EventEmitter();
836
+ this._isSticky = false;
837
+ this.onParentScroll = () => {
838
+ this.zone.runOutsideAngular(() => {
839
+ const scrollTop = this.parentElement === window
840
+ ? window.scrollY
841
+ : this.parentElement.scrollTop;
842
+ const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
843
+ if (shouldStick !== this.isSticky) {
844
+ this.zone.run(() => {
845
+ this.isSticky = shouldStick;
846
+ this.toggleStickyClasses(shouldStick);
847
+ this.cdr.markForCheck();
848
+ });
849
+ }
850
+ });
881
851
  };
882
- this.section.settings.push(newSetting);
883
- return this;
884
- }
885
- endSection() {
886
- return this.groupBuilder;
887
852
  }
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;
853
+ ngAfterViewInit() {
854
+ this.initSticky();
855
+ // Add mutation observer for dynamic content
856
+ this.mutationObserver = new MutationObserver(() => {
857
+ this.updateTopOffset();
858
+ });
859
+ this.mutationObserver.observe(this.element.nativeElement, {
860
+ childList: true,
861
+ subtree: true,
862
+ });
863
+ // Add resize event listener
864
+ window.addEventListener('resize', this.updateTopOffset.bind(this));
896
865
  }
897
- async load() {
898
- if (this.cache) {
899
- return;
866
+ initSticky() {
867
+ if (this.stickyParent instanceof HTMLElement) {
868
+ this.parentElement = this.stickyParent;
900
869
  }
901
- const context = new AXPSettingDefinitionProviderContext();
902
- if (Array.isArray(this.providers)) {
903
- for (const provider of this.providers) {
904
- await provider.provide(context);
905
- }
870
+ else {
871
+ this.parentElement =
872
+ document.querySelector(this.stickyParent) || window;
906
873
  }
907
- this.cache = context.getGroups();
874
+ this.targetElement =
875
+ document.querySelector(this.stickyTarget) ||
876
+ this.element.nativeElement;
877
+ this.updateTopOffset();
878
+ this.parentElement.addEventListener('scroll', this.onParentScroll);
908
879
  }
909
- async getListAsync(scope) {
910
- await this.load();
911
- return this.getList(scope);
880
+ updateTopOffset() {
881
+ this.zone.runOutsideAngular(() => {
882
+ const rect = this.targetElement.getBoundingClientRect();
883
+ this.topOffset = rect.top + (window.scrollY || 0);
884
+ });
912
885
  }
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);
946
- }
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();
963
- }
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
- }
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
- };
886
+ toggleStickyClasses(isSticky) {
887
+ const classes = this.stickyClass.split(' ').filter(Boolean);
888
+ classes.forEach((className) => {
889
+ if (isSticky) {
890
+ this.renderer.addClass(this.targetElement, className);
980
891
  }
981
- // Recursively search in nested groups
982
- const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
983
- if (nestedResult.breadcrumb.length > 0) {
984
- return nestedResult;
892
+ else {
893
+ this.renderer.removeClass(this.targetElement, className);
985
894
  }
895
+ });
896
+ }
897
+ ngOnDestroy() {
898
+ this.parentElement.removeEventListener('scroll', this.onParentScroll);
899
+ window.removeEventListener('resize', this.updateTopOffset.bind(this));
900
+ if (this.mutationObserver) {
901
+ this.mutationObserver.disconnect();
986
902
  }
987
- // If no matching group is found
988
- return {
989
- breadcrumb: [],
990
- groups: [],
991
- sections: []
992
- };
993
903
  }
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' }); }
904
+ 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 }); }
905
+ 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 }); }
996
906
  }
997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
998
- type: Injectable,
999
- args: [{ providedIn: 'root' }]
1000
- }] });
1001
- class AXPSettingDefaultValueProvider {
907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, decorators: [{
908
+ type: Directive,
909
+ args: [{
910
+ selector: '[axpSticky]',
911
+ exportAs: 'axpSticky',
912
+ standalone: true,
913
+ }]
914
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { stickyClass: [{
915
+ type: Input,
916
+ args: ['axpSticky']
917
+ }], stickyOffset: [{
918
+ type: Input,
919
+ args: ['stickyOffset']
920
+ }], isStickyChange: [{
921
+ type: Output
922
+ }], stickyParent: [{
923
+ type: Input
924
+ }], stickyTarget: [{
925
+ type: Input
926
+ }] } });
927
+
928
+ class AXPComponentSlotRegistryService {
1002
929
  constructor() {
1003
- this.definitionProvider = inject(AXPSettingDefinitionProviderService);
1004
- }
1005
- get scope() {
1006
- return AXPSettingScope.Global;
930
+ this.registry = new Map();
1007
931
  }
1008
- async load() {
1009
- return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
932
+ register(slotName, config) {
933
+ let configs = this.registry.get(slotName) || [];
934
+ // Check if the component is already registered in this slot
935
+ const isDuplicate = configs.some(existingConfig => existingConfig.name === config.name);
936
+ if (!isDuplicate) {
937
+ configs = [...configs, config]; // Add the new configuration
938
+ this.registry.set(slotName, configs);
939
+ }
1010
940
  }
1011
- set(key, value) {
1012
- throw new Error('Method not implemented.');
941
+ get(slotName) {
942
+ return this.registry.get(slotName) || [];
1013
943
  }
944
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
945
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
1014
946
  }
947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
948
+ type: Injectable,
949
+ args: [{
950
+ providedIn: 'root'
951
+ }]
952
+ }] });
1015
953
 
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})`;
954
+ class AXPComponentSlotLoaderService {
955
+ constructor(registryService, injector) {
956
+ this.registryService = registryService;
957
+ this.injector = injector;
1034
958
  }
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);
959
+ loadComponent(slotName, viewContainerRef) {
960
+ const configs = sortBy(this.registryService.get(slotName), (c) => c.priority ?? 0);
961
+ if (configs) {
962
+ viewContainerRef.clear();
963
+ configs.forEach(async (config) => {
964
+ let component;
965
+ let options = {};
966
+ if (typeof config.loadComponent === 'function') {
967
+ // If component is a function
968
+ runInInjectionContext(this.injector, () => {
969
+ component = config.loadComponent?.();
970
+ });
971
+ }
972
+ else if (config.component) {
973
+ // If component is a Type
974
+ component = config.component;
975
+ }
976
+ //
977
+ if (typeof config.options === 'function') {
978
+ // If options is a function
979
+ runInInjectionContext(this.injector, () => {
980
+ const fun = config.options;
981
+ options = fun();
982
+ });
983
+ }
984
+ else if (config.options) {
985
+ // If options is a object
986
+ options = config.options;
987
+ }
988
+ //
989
+ if (component != null) {
990
+ const componentRef = viewContainerRef.createComponent(component);
991
+ Object.assign(componentRef.instance, options);
992
+ }
1042
993
  });
1043
- return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
1044
994
  }
1045
- return Promise.resolve([]);
1046
995
  }
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();
996
+ 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 }); }
997
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, providedIn: 'root' }); }
998
+ }
999
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, decorators: [{
1000
+ type: Injectable,
1001
+ args: [{
1002
+ providedIn: 'root',
1003
+ }]
1004
+ }], ctorParameters: () => [{ type: AXPComponentSlotRegistryService }, { type: i0.Injector }] });
1005
+
1006
+ class AXPComponentSlotDirective {
1007
+ constructor(dynamicLoaderService, viewContainerRef) {
1008
+ this.dynamicLoaderService = dynamicLoaderService;
1009
+ this.viewContainerRef = viewContainerRef;
1059
1010
  }
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));
1011
+ ngOnInit() {
1012
+ this.dynamicLoaderService.loadComponent(this.name, this.viewContainerRef);
1066
1013
  }
1014
+ 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 }); }
1015
+ 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
1016
  }
1017
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
1018
+ type: Directive,
1019
+ args: [{
1020
+ selector: 'axp-component-slot',
1021
+ standalone: false
1022
+ }]
1023
+ }], ctorParameters: () => [{ type: AXPComponentSlotLoaderService }, { type: i0.ViewContainerRef }], propDecorators: { name: [{
1024
+ type: Input
1025
+ }] } });
1068
1026
 
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);
1027
+ class AXPComponentSlotModule {
1028
+ static forRoot(configs) {
1029
+ return {
1030
+ ngModule: AXPComponentSlotModule,
1031
+ providers: [
1032
+ {
1033
+ provide: 'AXPComponentSlotModuleFactory',
1034
+ useFactory: (registry) => () => {
1035
+ if (configs) {
1036
+ for (const [key, value] of Object.entries(configs)) {
1037
+ value.forEach(v => {
1038
+ registry.register(key, v);
1039
+ });
1040
+ }
1041
+ }
1042
+ },
1043
+ deps: [AXPComponentSlotRegistryService],
1044
+ multi: true
1112
1045
  }
1113
- }
1114
- }
1115
- const defaults = await this.definitionService.defaultValues();
1116
- return get(defaults, key); // Fallback if no value is found
1046
+ ]
1047
+ };
1117
1048
  }
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 };
1049
+ static forChild(configs) {
1050
+ return {
1051
+ ngModule: AXPComponentSlotModule,
1052
+ providers: [
1053
+ {
1054
+ provide: 'AXPComponentSlotModuleFactory',
1055
+ useFactory: (registry) => () => {
1056
+ if (configs) {
1057
+ for (const [key, value] of Object.entries(configs)) {
1058
+ value.forEach(v => {
1059
+ registry.register(key, v);
1060
+ });
1061
+ }
1062
+ }
1063
+ },
1064
+ deps: [AXPComponentSlotRegistryService],
1065
+ multi: true
1066
+ }
1067
+ ]
1068
+ };
1141
1069
  }
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));
1070
+ /**
1071
+ * @ignore
1072
+ */
1073
+ constructor(instances) {
1074
+ instances?.forEach(f => {
1075
+ f();
1076
+ });
1148
1077
  }
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' }); }
1078
+ 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 }); }
1079
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
1080
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule }); }
1151
1081
  }
1152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, decorators: [{
1153
- type: Injectable,
1082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
1083
+ type: NgModule,
1154
1084
  args: [{
1155
- providedIn: 'root',
1085
+ declarations: [AXPComponentSlotDirective],
1086
+ exports: [AXPComponentSlotDirective]
1156
1087
  }]
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;
1088
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1089
+ type: Optional
1090
+ }, {
1091
+ type: Inject,
1092
+ args: ['AXPComponentSlotModuleFactory']
1093
+ }] }] });
1094
+
1095
+ class AXPTextLogoConfig {
1096
+ constructor(text) {
1097
+ this.text = text;
1169
1098
  }
1170
- async all() {
1171
- const settings = await this.provider.load();
1172
- return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
1099
+ }
1100
+ class AXPImageUrlLogoConfig {
1101
+ constructor(url) {
1102
+ this.url = url;
1173
1103
  }
1174
- async defaultValues() {
1175
- return this.parent.defaultValues(this.provider.scope);
1104
+ }
1105
+ class AXPFontIconLogoConfig {
1106
+ constructor(iconClass) {
1107
+ this.iconClass = iconClass;
1176
1108
  }
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
- }
1109
+ }
1110
+ class AXPComponentLogoConfig {
1111
+ constructor(component) {
1112
+ this.component = component;
1201
1113
  }
1202
1114
  }
1203
1115
 
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 });
1116
+ class AXPLogoComponent {
1117
+ ngOnInit() {
1118
+ switch (true) {
1119
+ case this.source instanceof AXPTextLogoConfig:
1120
+ this.logoType = 'text';
1121
+ break;
1122
+ case this.source instanceof AXPImageUrlLogoConfig:
1123
+ this.logoType = 'url';
1124
+ break;
1125
+ case this.source instanceof AXPFontIconLogoConfig:
1126
+ this.logoType = 'iconClass';
1127
+ break;
1128
+ case this.source instanceof AXPComponentLogoConfig:
1129
+ this.logoType = 'component';
1130
+ break;
1131
+ default:
1132
+ break;
1133
+ }
1224
1134
  }
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 }); }
1135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1136
+ 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
1137
  }
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 }] });
1138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, decorators: [{
1139
+ type: Component,
1140
+ 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}" }]
1141
+ }], propDecorators: { source: [{
1142
+ type: Input
1143
+ }] } });
1231
1144
 
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 {
1145
+ const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
1146
+ class AXPMenuProviderService {
1236
1147
  constructor() {
1237
- super(...arguments);
1238
- this.router = inject(Router);
1148
+ this.providers = inject(AXP_MENU_PROVIDER, { optional: true });
1149
+ this.cache = null;
1150
+ this.pendingInserts = [];
1151
+ this.pendingRemovals = [];
1152
+ this.pendingUpdates = [];
1153
+ this.pendingAdditions = [];
1239
1154
  }
1240
- async execute(context) {
1241
- const payload = context.getVariable('payload');
1242
- if (Array.isArray(payload.commands)) {
1243
- this.router.navigate(payload.commands, payload.extras);
1244
- }
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);
1155
+ async items() {
1156
+ // Return cached items if available
1157
+ if (this.cache) {
1158
+ return this.cache;
1585
1159
  }
1160
+ const items = [];
1161
+ const context = this.createMenuProviderContext(items);
1162
+ if (Array.isArray(this.providers)) {
1163
+ for (const provider of this.providers) {
1164
+ await provider.provide(context);
1165
+ }
1166
+ }
1167
+ // Apply pending operations
1168
+ this.applyPendingOperations(items);
1169
+ // Cache the computed items
1170
+ this.cache = items;
1171
+ return items;
1586
1172
  }
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
- });
1173
+ createMenuProviderContext(items) {
1174
+ return {
1175
+ addItems: (newItems) => {
1176
+ items.push(...newItems);
1177
+ },
1178
+ find: (target) => {
1179
+ return {
1180
+ insert: (newItems, position) => {
1181
+ this.pendingInserts.push({ target, newItems, position });
1182
+ },
1183
+ remove: () => {
1184
+ this.pendingRemovals.push(target);
1185
+ },
1186
+ update: (updatedItem) => {
1187
+ this.pendingUpdates.push({ target, updatedItem });
1188
+ },
1189
+ addItems: (newItems) => {
1190
+ this.pendingAdditions.push({ target, newItems });
1191
+ }
1192
+ };
1193
+ }
1609
1194
  };
1610
1195
  }
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;
1196
+ applyPendingOperations(items) {
1197
+ for (const { target, newItems, position } of this.pendingInserts) {
1198
+ const foundItemInfo = this.findItemWithParent(items, target);
1199
+ const { foundItem, parentItems } = foundItemInfo;
1200
+ if (!foundItem) {
1201
+ console.warn(`Target "${target}" not found, appending items.`);
1202
+ items.push(...newItems);
1203
+ }
1204
+ else {
1205
+ const index = parentItems.indexOf(foundItem);
1206
+ const insertPosition = position === 'before' ? index : index + 1;
1207
+ parentItems.splice(insertPosition, 0, ...newItems);
1208
+ }
1627
1209
  }
1628
- else {
1629
- this.parentElement =
1630
- document.querySelector(this.stickyParent) || window;
1210
+ for (const target of this.pendingRemovals) {
1211
+ const foundItemInfo = this.findItemWithParent(items, target);
1212
+ const { foundItem, parentItems } = foundItemInfo;
1213
+ if (!foundItem) {
1214
+ console.warn(`Target "${target}" not found, nothing to remove.`);
1215
+ }
1216
+ else {
1217
+ const index = parentItems.indexOf(foundItem);
1218
+ parentItems.splice(index, 1);
1219
+ }
1631
1220
  }
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);
1221
+ for (const { target, updatedItem } of this.pendingUpdates) {
1222
+ const foundItemInfo = this.findItemWithParent(items, target);
1223
+ const { foundItem } = foundItemInfo;
1224
+ if (!foundItem) {
1225
+ console.warn(`Target "${target}" not found, nothing to update.`);
1649
1226
  }
1650
1227
  else {
1651
- this.renderer.removeClass(this.targetElement, className);
1228
+ Object.assign(foundItem, updatedItem);
1652
1229
  }
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
1230
  }
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);
1231
+ for (const { target, newItems } of this.pendingAdditions) {
1232
+ const foundItemInfo = this.findItemWithParent(items, target);
1233
+ const { foundItem } = foundItemInfo;
1234
+ if (!foundItem) {
1235
+ console.warn(`Target "${target}" not found, nothing to add items to.`);
1236
+ }
1237
+ else {
1238
+ if (!foundItem.children) {
1239
+ foundItem.children = [];
1240
+ }
1241
+ foundItem.children.push(...newItems);
1242
+ }
1697
1243
  }
1244
+ // Clear pending operations after applying them
1245
+ this.pendingInserts = [];
1246
+ this.pendingRemovals = [];
1247
+ this.pendingUpdates = [];
1248
+ this.pendingAdditions = [];
1698
1249
  }
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);
1250
+ findItemWithParent(items, target, parentItems = items) {
1251
+ for (const item of items) {
1252
+ if (item.name === target) {
1253
+ return { foundItem: item, parentItems };
1254
+ }
1255
+ if (item.children) {
1256
+ const result = this.findItemWithParent(item.children, target, item.children);
1257
+ if (result.foundItem) {
1258
+ return result;
1750
1259
  }
1751
- });
1260
+ }
1752
1261
  }
1262
+ return { foundItem: null, parentItems: items };
1753
1263
  }
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' }); }
1264
+ // Method to clear the cache, if needed (e.g., when providers change)
1265
+ clearCache() {
1266
+ this.cache = null;
1267
+ this.pendingInserts = [];
1268
+ this.pendingRemovals = [];
1269
+ this.pendingUpdates = [];
1270
+ this.pendingAdditions = [];
1271
+ }
1272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1273
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
1756
1274
  }
1757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, decorators: [{
1275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, decorators: [{
1758
1276
  type: Injectable,
1759
- args: [{
1760
- providedIn: 'root',
1761
- }]
1762
- }], ctorParameters: () => [{ type: AXPComponentSlotRegistryService }, { type: i0.Injector }] });
1277
+ args: [{ providedIn: 'root' }]
1278
+ }] });
1763
1279
 
1764
- class AXPComponentSlotDirective {
1765
- constructor(dynamicLoaderService, viewContainerRef) {
1766
- this.dynamicLoaderService = dynamicLoaderService;
1767
- this.viewContainerRef = viewContainerRef;
1280
+ const AXPNavigateAction = createAction('[Navigate] Action', props());
1281
+ const AXPSignOutAction = createAction('[SignOut] Action');
1282
+ const AXPSignInAction = createAction('[SignIn] Action');
1283
+
1284
+ var AXPSettingScope;
1285
+ (function (AXPSettingScope) {
1286
+ AXPSettingScope["Environment"] = "C";
1287
+ AXPSettingScope["Global"] = "G";
1288
+ AXPSettingScope["Tenant"] = "T";
1289
+ AXPSettingScope["User"] = "U";
1290
+ })(AXPSettingScope || (AXPSettingScope = {}));
1291
+ ;
1292
+
1293
+ class AXPSettingDefinitionProviderContext {
1294
+ constructor() {
1295
+ this.rootGroups = [];
1296
+ this.groupMap = new Map();
1768
1297
  }
1769
- ngOnInit() {
1770
- this.dynamicLoaderService.loadComponent(this.name, this.viewContainerRef);
1298
+ addGroup(name, title, description, icon) {
1299
+ const newGroup = {
1300
+ name,
1301
+ title,
1302
+ description,
1303
+ icon,
1304
+ groups: [],
1305
+ sections: [],
1306
+ };
1307
+ this.rootGroups.push(newGroup);
1308
+ this.groupMap.set(name, newGroup); // Index by name
1309
+ return new AXPSettingDefinitionGroupBuilder(this, newGroup);
1310
+ }
1311
+ group(name) {
1312
+ const foundGroup = this.groupMap.get(name);
1313
+ if (!foundGroup) {
1314
+ throw new Error(`Group with name "${name}" not found.`);
1315
+ }
1316
+ return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
1317
+ }
1318
+ getGroups() {
1319
+ return this.rootGroups;
1320
+ }
1321
+ // Expose groupMap for controlled access
1322
+ hasGroup(name) {
1323
+ return this.groupMap.has(name);
1324
+ }
1325
+ getGroup(name) {
1326
+ return this.groupMap.get(name);
1771
1327
  }
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
1328
  }
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
- ]
1329
+ class AXPSettingDefinitionGroupBuilder {
1330
+ constructor(context, group) {
1331
+ this.context = context;
1332
+ this.group = group;
1333
+ }
1334
+ addSection(name, title, description) {
1335
+ const newSection = {
1336
+ name,
1337
+ title,
1338
+ description: description,
1339
+ settings: [],
1805
1340
  };
1341
+ this.group.sections.push(newSection);
1342
+ return new AXPSettingDefinitionSectionBuilder(this, newSection);
1806
1343
  }
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
- ]
1344
+ section(name) {
1345
+ const foundSection = this.group.sections.find((section) => section.name === name);
1346
+ if (!foundSection) {
1347
+ throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
1348
+ }
1349
+ return new AXPSettingDefinitionSectionBuilder(this, foundSection);
1350
+ }
1351
+ addGroup(name, title, description, icon) {
1352
+ const newGroup = {
1353
+ name,
1354
+ title,
1355
+ description: description,
1356
+ icon,
1357
+ groups: [],
1358
+ sections: [],
1826
1359
  };
1360
+ this.group.groups.push(newGroup);
1361
+ if (this.context.hasGroup(name)) {
1362
+ throw new Error(`Group with name "${name}" already exists.`);
1363
+ }
1364
+ this.context['groupMap'].set(name, newGroup);
1365
+ return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
1827
1366
  }
1828
- /**
1829
- * @ignore
1830
- */
1831
- constructor(instances) {
1832
- instances?.forEach(f => {
1833
- f();
1834
- });
1367
+ endGroup() {
1368
+ return this.context;
1835
1369
  }
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
1370
  }
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
- }
1371
+ class AXPSettingDefinitionSectionBuilder {
1372
+ constructor(groupBuilder, section) {
1373
+ this.groupBuilder = groupBuilder;
1374
+ this.section = section;
1375
+ }
1376
+ addSetting(setting) {
1377
+ const newSetting = {
1378
+ name: setting.key,
1379
+ title: setting.title,
1380
+ description: setting.description,
1381
+ isRequired: setting.isRequired ?? false,
1382
+ isInherited: setting.isInherited ?? false,
1383
+ isEncrypted: setting.isEncrypted ?? false,
1384
+ defaultValue: setting.defaultValue,
1385
+ scope: setting.scope ?? 'G',
1386
+ widget: {
1387
+ type: setting.widget.type,
1388
+ name: setting.key,
1389
+ path: setting.key,
1390
+ defaultValue: setting.defaultValue,
1391
+ options: merge(setting.widget.options ?? {}, {
1392
+ label: setting.widget.options?.['label'] ?? setting.title,
1393
+ validationRules: setting.validationRules ?? [],
1394
+ }),
1395
+ valueTransforms: setting.valueTransforms,
1396
+ triggers: setting.widget.triggers,
1397
+ },
1398
+ };
1399
+ this.section.settings.push(newSetting);
1400
+ return this;
1401
+ }
1402
+ endSection() {
1403
+ return this.groupBuilder;
1871
1404
  }
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
1405
  }
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
1406
 
1882
- const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
1883
- class AXPMenuProviderService {
1407
+ // Injection token for setting providers
1408
+ const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
1409
+ class AXPSettingDefinitionProviderService {
1884
1410
  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 = [];
1411
+ this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
1412
+ this.cache = null;
1891
1413
  }
1892
- async items() {
1893
- // Return cached items if available
1414
+ async load() {
1894
1415
  if (this.cache) {
1895
- return this.cache;
1416
+ return;
1896
1417
  }
1897
- const items = [];
1898
- const context = this.createMenuProviderContext(items);
1418
+ const context = new AXPSettingDefinitionProviderContext();
1899
1419
  if (Array.isArray(this.providers)) {
1900
1420
  for (const provider of this.providers) {
1901
1421
  await provider.provide(context);
1902
1422
  }
1903
1423
  }
1904
- // Apply pending operations
1905
- this.applyPendingOperations(items);
1906
- // Cache the computed items
1907
- this.cache = items;
1908
- return items;
1424
+ this.cache = context.getGroups();
1909
1425
  }
1910
- createMenuProviderContext(items) {
1911
- return {
1912
- addItems: (newItems) => {
1913
- items.push(...newItems);
1914
- },
1915
- find: (target) => {
1426
+ async getListAsync(scope) {
1427
+ await this.load();
1428
+ return this.getList(scope);
1429
+ }
1430
+ getList(scope) {
1431
+ if (!this.cache) {
1432
+ return [];
1433
+ }
1434
+ const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
1435
+ const filterByScope = (groups, currentScope) => {
1436
+ const currentScopeIndex = scopeOrder.indexOf(currentScope);
1437
+ return groups
1438
+ .map((group) => ({
1439
+ ...group,
1440
+ sections: group.sections.map((section) => ({
1441
+ ...section,
1442
+ settings: section.settings.filter((setting) => {
1443
+ const settingScopeIndex = scopeOrder.indexOf(setting.scope);
1444
+ // Include settings where:
1445
+ // 1. The scope matches the requested scope.
1446
+ if (setting.scope === currentScope)
1447
+ return true;
1448
+ // 2. The setting scope is higher (closer to 'U') and is inherited.
1449
+ if (setting.isInherited &&
1450
+ settingScopeIndex > currentScopeIndex // Higher scope
1451
+ ) {
1452
+ return true;
1453
+ }
1454
+ // 3. Exclude settings with a lower or irrelevant scope.
1455
+ return false;
1456
+ }),
1457
+ })).filter((section) => section.settings.length > 0), // Keep only sections with settings
1458
+ groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
1459
+ }))
1460
+ .filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
1461
+ };
1462
+ return filterByScope(this.cache, scope);
1463
+ }
1464
+ async defaultValues() {
1465
+ const defaults = {};
1466
+ const collectDefaults = (groups) => {
1467
+ groups.forEach((group) => {
1468
+ group.sections.forEach((section) => {
1469
+ section.settings.forEach((setting) => {
1470
+ if (setting.defaultValue !== undefined) {
1471
+ defaults[setting.name] = setting.defaultValue;
1472
+ }
1473
+ });
1474
+ });
1475
+ collectDefaults(group.groups);
1476
+ });
1477
+ };
1478
+ if (!this.cache) {
1479
+ await this.load();
1480
+ }
1481
+ collectDefaults(this.cache);
1482
+ return defaults;
1483
+ }
1484
+ findGroup(scope, groupName) {
1485
+ return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
1486
+ }
1487
+ searchRecursive(groups, groupName, breadcrumb) {
1488
+ for (const group of groups) {
1489
+ const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
1490
+ // If the group name matches, return its details
1491
+ if (group.name === groupName) {
1916
1492
  return {
1917
- insert: (newItems, position) => {
1918
- this.pendingInserts.push({ target, newItems, position });
1919
- },
1920
- remove: () => {
1921
- this.pendingRemovals.push(target);
1922
- },
1923
- update: (updatedItem) => {
1924
- this.pendingUpdates.push({ target, updatedItem });
1925
- },
1926
- addItems: (newItems) => {
1927
- this.pendingAdditions.push({ target, newItems });
1928
- }
1493
+ breadcrumb: currentBreadcrumb,
1494
+ sections: group.sections.length > 0 ? group.sections : null,
1495
+ groups: group.groups.length > 0 ? group.groups : null,
1929
1496
  };
1930
1497
  }
1498
+ // Recursively search in nested groups
1499
+ const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
1500
+ if (nestedResult.breadcrumb.length > 0) {
1501
+ return nestedResult;
1502
+ }
1503
+ }
1504
+ // If no matching group is found
1505
+ return {
1506
+ breadcrumb: [],
1507
+ groups: [],
1508
+ sections: []
1931
1509
  };
1932
1510
  }
1933
- applyPendingOperations(items) {
1934
- for (const { target, newItems, position } of this.pendingInserts) {
1935
- const foundItemInfo = this.findItemWithParent(items, target);
1936
- const { foundItem, parentItems } = foundItemInfo;
1937
- if (!foundItem) {
1938
- console.warn(`Target "${target}" not found, appending items.`);
1939
- items.push(...newItems);
1940
- }
1941
- else {
1942
- const index = parentItems.indexOf(foundItem);
1943
- const insertPosition = position === 'before' ? index : index + 1;
1944
- parentItems.splice(insertPosition, 0, ...newItems);
1945
- }
1511
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1512
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
1513
+ }
1514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
1515
+ type: Injectable,
1516
+ args: [{ providedIn: 'root' }]
1517
+ }] });
1518
+ class AXPSettingDefaultValueProvider {
1519
+ constructor() {
1520
+ this.definitionProvider = inject(AXPSettingDefinitionProviderService);
1521
+ }
1522
+ get scope() {
1523
+ return AXPSettingScope.Global;
1524
+ }
1525
+ async load() {
1526
+ return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
1527
+ }
1528
+ set(key, value) {
1529
+ throw new Error('Method not implemented.');
1530
+ }
1531
+ }
1532
+
1533
+ const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
1534
+ providedIn: 'root',
1535
+ factory: () => {
1536
+ return [
1537
+ //new AXPSettingDefaultValueProvider(),
1538
+ new AXPSettingValueProviderDefault(AXPSettingScope.Tenant),
1539
+ new AXPSettingValueProviderDefault(AXPSettingScope.User)
1540
+ ];
1541
+ }
1542
+ });
1543
+ class AXPSettingValueProviderDefault {
1544
+ get scope() {
1545
+ return this._scope;
1546
+ }
1547
+ constructor(_scope) {
1548
+ this._scope = _scope;
1549
+ this.cache = new Map();
1550
+ this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
1551
+ }
1552
+ async load() {
1553
+ // Load settings from localStorage as a single key
1554
+ const storedSettings = localStorage.getItem(this.localStorageKey);
1555
+ if (storedSettings) {
1556
+ const parsedSettings = JSON.parse(storedSettings);
1557
+ Object.entries(parsedSettings).forEach(([key, value]) => {
1558
+ this.cache.set(key, value);
1559
+ });
1560
+ return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
1946
1561
  }
1947
- for (const target of this.pendingRemovals) {
1948
- const foundItemInfo = this.findItemWithParent(items, target);
1949
- const { foundItem, parentItems } = foundItemInfo;
1950
- if (!foundItem) {
1951
- console.warn(`Target "${target}" not found, nothing to remove.`);
1952
- }
1953
- else {
1954
- const index = parentItems.indexOf(foundItem);
1955
- parentItems.splice(index, 1);
1562
+ return Promise.resolve([]);
1563
+ }
1564
+ async set(keyOrValues, value) {
1565
+ if (typeof keyOrValues === 'string') {
1566
+ // Single value update
1567
+ this.cache.set(keyOrValues, value);
1568
+ }
1569
+ else {
1570
+ // Bulk update
1571
+ for (const [key, val] of Object.entries(keyOrValues)) {
1572
+ this.cache.set(key, val);
1956
1573
  }
1957
1574
  }
1958
- for (const { target, updatedItem } of this.pendingUpdates) {
1959
- const foundItemInfo = this.findItemWithParent(items, target);
1960
- const { foundItem } = foundItemInfo;
1961
- if (!foundItem) {
1962
- console.warn(`Target "${target}" not found, nothing to update.`);
1575
+ await this.saveToLocalStorage();
1576
+ }
1577
+ async saveToLocalStorage() {
1578
+ const settingsObject = {};
1579
+ this.cache.forEach((value, key) => {
1580
+ settingsObject[key] = value;
1581
+ });
1582
+ localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
1583
+ }
1584
+ }
1585
+
1586
+ class AXPSettingValueProviderService {
1587
+ constructor() {
1588
+ this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
1589
+ this.definitionService = inject(AXPSettingDefinitionProviderService);
1590
+ this.scopedSettingsCache = new Map();
1591
+ this.onChanged = new Subject();
1592
+ // Initialize scoped caches for dynamic scopes
1593
+ const staticScopes = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User];
1594
+ staticScopes.forEach((scope) => {
1595
+ if (!this.scopedSettingsCache.has(scope)) {
1596
+ this.scopedSettingsCache.set(scope, new Map());
1963
1597
  }
1964
- else {
1965
- Object.assign(foundItem, updatedItem);
1598
+ });
1599
+ }
1600
+ async load() {
1601
+ try {
1602
+ const settingsList = [];
1603
+ for (const provider of this.providers) {
1604
+ const scopeCache = this.scopedSettingsCache.get(provider.scope);
1605
+ const providerSettings = await provider.load();
1606
+ providerSettings.forEach((setting) => {
1607
+ scopeCache.set(setting.key, setting.value);
1608
+ });
1609
+ settingsList.push(...providerSettings);
1966
1610
  }
1611
+ return settingsList;
1967
1612
  }
1968
- for (const { target, newItems } of this.pendingAdditions) {
1969
- const foundItemInfo = this.findItemWithParent(items, target);
1970
- const { foundItem } = foundItemInfo;
1971
- if (!foundItem) {
1972
- console.warn(`Target "${target}" not found, nothing to add items to.`);
1973
- }
1974
- else {
1975
- if (!foundItem.children) {
1976
- foundItem.children = [];
1613
+ catch (error) {
1614
+ console.error('Error loading settings', error);
1615
+ throw error;
1616
+ }
1617
+ }
1618
+ async get(key) {
1619
+ if (this.scopedSettingsCache.size === 0) {
1620
+ await this.load();
1621
+ }
1622
+ const scopeOrder = [AXPSettingScope.User, AXPSettingScope.Tenant, AXPSettingScope.Global, AXPSettingScope.Environment];
1623
+ for (const scope of scopeOrder) {
1624
+ const scopeCache = this.scopedSettingsCache.get(scope);
1625
+ if (scopeCache && scopeCache.has(key)) {
1626
+ const value = scopeCache.get(key);
1627
+ if (value !== undefined && value !== null) {
1628
+ return cloneDeep(value);
1977
1629
  }
1978
- foundItem.children.push(...newItems);
1979
1630
  }
1980
1631
  }
1981
- // Clear pending operations after applying them
1982
- this.pendingInserts = [];
1983
- this.pendingRemovals = [];
1984
- this.pendingUpdates = [];
1985
- this.pendingAdditions = [];
1632
+ const defaults = await this.definitionService.defaultValues();
1633
+ return get(defaults, key); // Fallback if no value is found
1986
1634
  }
1987
- findItemWithParent(items, target, parentItems = items) {
1988
- for (const item of items) {
1989
- if (item.name === target) {
1990
- return { foundItem: item, parentItems };
1991
- }
1992
- if (item.children) {
1993
- const result = this.findItemWithParent(item.children, target, item.children);
1994
- if (result.foundItem) {
1995
- return result;
1996
- }
1635
+ async defaultValues(scope) {
1636
+ let scopeOrder = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User].reverse();
1637
+ const scopeIndex = scopeOrder.indexOf(scope);
1638
+ if (scopeIndex === -1) {
1639
+ throw new Error(`Invalid scope: ${scope}`);
1640
+ }
1641
+ scopeOrder = scopeOrder.slice(scopeIndex + 1);
1642
+ // Accumulate defaults from the current scope and higher scopes
1643
+ const accumulatedDefaults = {};
1644
+ for (let i = scopeIndex; i < scopeOrder.length; i++) {
1645
+ const currentScope = scopeOrder[i];
1646
+ const scopeCache = this.scopedSettingsCache.get(currentScope);
1647
+ if (scopeCache) {
1648
+ scopeCache.forEach((value, key) => {
1649
+ if (!(key in accumulatedDefaults)) {
1650
+ accumulatedDefaults[key] = value;
1651
+ }
1652
+ });
1997
1653
  }
1998
1654
  }
1999
- return { foundItem: null, parentItems: items };
1655
+ // Merge with global default values from the definition service
1656
+ const globalDefaults = await this.definitionService.defaultValues();
1657
+ return { ...globalDefaults, ...accumulatedDefaults };
2000
1658
  }
2001
- // Method to clear the cache, if needed (e.g., when providers change)
2002
- clearCache() {
2003
- this.cache = null;
2004
- this.pendingInserts = [];
2005
- this.pendingRemovals = [];
2006
- this.pendingUpdates = [];
2007
- this.pendingAdditions = [];
1659
+ scope(scope) {
1660
+ const provider = this.providers.find((p) => p.scope === scope);
1661
+ if (!provider) {
1662
+ throw new Error(`No provider found for scope: ${scope}`);
1663
+ }
1664
+ return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
2008
1665
  }
2009
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2010
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
1666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1667
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, providedIn: 'root' }); }
2011
1668
  }
2012
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, decorators: [{
1669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, decorators: [{
2013
1670
  type: Injectable,
2014
- args: [{ providedIn: 'root' }]
2015
- }] });
1671
+ args: [{
1672
+ providedIn: 'root',
1673
+ }]
1674
+ }], ctorParameters: () => [] });
1675
+ class ScopedSettingService {
1676
+ constructor(parent, provider, onChanged, scopeCache) {
1677
+ this.parent = parent;
1678
+ this.provider = provider;
1679
+ this.onChanged = onChanged;
1680
+ this.scopeCache = scopeCache;
1681
+ }
1682
+ async get(key) {
1683
+ const settings = await this.provider.load();
1684
+ const setting = settings.find((s) => s.key === key);
1685
+ return setting ? cloneDeep(setting.value) : undefined;
1686
+ }
1687
+ async all() {
1688
+ const settings = await this.provider.load();
1689
+ return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
1690
+ }
1691
+ async defaultValues() {
1692
+ return this.parent.defaultValues(this.provider.scope);
1693
+ }
1694
+ async set(keyOrValues, value) {
1695
+ if (typeof keyOrValues === 'string') {
1696
+ // Single key-value pair
1697
+ await this.provider.set(keyOrValues, value);
1698
+ this.scopeCache.set(keyOrValues, value); // Sync the cache
1699
+ this.onChanged.next({
1700
+ scope: this.provider.scope,
1701
+ keys: [keyOrValues],
1702
+ values: { [keyOrValues]: value },
1703
+ entries: [{ key: keyOrValues, value }],
1704
+ });
1705
+ }
1706
+ else {
1707
+ // Multiple key-value pairs
1708
+ await this.provider.set(keyOrValues);
1709
+ Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
1710
+ const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
1711
+ this.onChanged.next({
1712
+ scope: this.provider.scope,
1713
+ keys: Object.keys(keyOrValues),
1714
+ values: keyOrValues,
1715
+ entries,
1716
+ });
1717
+ }
1718
+ }
1719
+ }
1720
+
1721
+ class AXPCommonEffects {
1722
+ constructor(actions$, router, settingService) {
1723
+ this.actions$ = actions$;
1724
+ this.router = router;
1725
+ this.settingService = settingService;
1726
+ this.command$ = createEffect(() => this.actions$.pipe(ofType(AXPNavigateAction), switchMap((action) => {
1727
+ if (Array.isArray(action.payload.commands))
1728
+ this.router.navigate(action.payload.commands, action.payload.extras);
1729
+ else {
1730
+ if (action.payload.commands.toLowerCase().startsWith('http'))
1731
+ window.open(action.payload.commands, '_blank');
1732
+ else
1733
+ this.router.navigate([action.payload.commands], action.payload.extras);
1734
+ }
1735
+ return of();
1736
+ })), { dispatch: false });
1737
+ }
1738
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects, deps: [{ token: i1$1.Actions }, { token: i2$1.Router }, { token: AXPSettingValueProviderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1739
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects }); }
1740
+ }
1741
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects, decorators: [{
1742
+ type: Injectable
1743
+ }], ctorParameters: () => [{ type: i1$1.Actions }, { type: i2$1.Router }, { type: AXPSettingValueProviderService }] });
2016
1744
 
2017
1745
  const AXPMenuService = signalStore({ providedIn: 'root' },
2018
1746
  // Initial State
@@ -2117,6 +1845,68 @@ withMethods((store, router = inject(Router), globalStore = inject(Store)) => {
2117
1845
  },
2118
1846
  })));
2119
1847
 
1848
+ class AXPMenuSearchDefinitionProvider {
1849
+ async provide(context) {
1850
+ context.addDefinition('menu', 'Menu', 'fa-thin fa-bars', [
1851
+ {
1852
+ name: 'open',
1853
+ command: {
1854
+ name: 'view',
1855
+ options: {},
1856
+ },
1857
+ type: 'view',
1858
+ priority: 'primary',
1859
+ },
1860
+ ]);
1861
+ }
1862
+ }
1863
+
1864
+ class AXPMenuSearchProvider {
1865
+ constructor() {
1866
+ this.menuService = inject(AXPMenuProviderService);
1867
+ this.trService = inject(AXTranslationService);
1868
+ }
1869
+ async search(text) {
1870
+ const menuItems = await this.searchMenuItems(await this.menuService.items(), text);
1871
+ return sortBy(menuItems.map((item) => ({
1872
+ name: 'menu', // Use `name` or empty string if undefined
1873
+ title: item.text, // Use `text` for the `title`
1874
+ icon: item.icon, // Include the `icon` if present
1875
+ data: item,
1876
+ parent: item.parent
1877
+ ? {
1878
+ title: item.parent.text,
1879
+ data: item.parent,
1880
+ }
1881
+ : undefined,
1882
+ })), [(o) => this.trService.translateSync(o.title)]);
1883
+ }
1884
+ /**
1885
+ * Recursively searches AXPMenuItem and its children for a matching text.
1886
+ *
1887
+ * @param menuItems - The array of AXPMenuItem to search in.
1888
+ * @param searchText - The text to search for (case-insensitive).
1889
+ * @returns An array of AXPMenuItem that match the search text.
1890
+ */
1891
+ async searchMenuItems(menuItems, searchText) {
1892
+ const result = [];
1893
+ for (const item of menuItems) {
1894
+ // Check if the current item's text matches the search text
1895
+ if (item.type != 'group' &&
1896
+ (item.children?.length ?? 0) == 0 &&
1897
+ (await this.trService.translateAsync(item.text)).toLowerCase().includes(searchText.toLowerCase())) {
1898
+ result.push(item);
1899
+ }
1900
+ // Recursively search in children if they exist
1901
+ if (item.children && item.children.length > 0) {
1902
+ const childResults = await this.searchMenuItems(item.children, searchText);
1903
+ result.push(...childResults.map((x) => ({ ...x, parent: item })));
1904
+ }
1905
+ }
1906
+ return result;
1907
+ }
1908
+ }
1909
+
2120
1910
  class AXPFooterTextSlotComponent {
2121
1911
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2122
1912
  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: `
@@ -2148,7 +1938,7 @@ class AXPNavBarSlotComponent {
2148
1938
  <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
2149
1939
  <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
2150
1940
  </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 }); }
1941
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None }); }
2152
1942
  }
2153
1943
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
2154
1944
  type: Component,
@@ -2159,1152 +1949,550 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2159
1949
  </div>
2160
1950
  `,
2161
1951
  imports: [CommonModule],
2162
- encapsulation: ViewEncapsulation.None
2163
- }]
2164
- }], propDecorators: { items: [{
2165
- type: Input
2166
- }] } });
2167
-
2168
- class AXPSchemaRegistryService {
2169
- constructor() {
2170
- this.types = new Map();
2171
- }
2172
- register(schema) {
2173
- this.types.set(schema.name, schema);
2174
- }
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);
2180
- }
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.`);
2185
- }
2186
- return schema;
2187
- }
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' }); }
2190
- }
2191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSchemaRegistryService, decorators: [{
2192
- type: Injectable,
2193
- args: [{
2194
- providedIn: 'root',
2195
- }]
2196
- }] });
2197
-
2198
- const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
2199
-
2200
- class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2201
- constructor() {
2202
- super(...arguments);
2203
- this.widgetRegistery = inject(AXPSchemaRegistryService);
2204
- this.mergedOptions = {};
2205
- this.injector = inject(Injector);
2206
- this.cdr = inject(ChangeDetectorRef);
2207
- }
2208
- get renderFooterTemplate() {
2209
- return this.footerTemplate ?? this._contentFooterTemplate;
2210
- }
2211
- get renderCellTemplate() {
2212
- return this.cellTemplate ?? this._contentCellTemplate;
2213
- }
2214
- get renderHeaderTemplate() {
2215
- return this.headerTemplate ?? this._contentHeaderTemplate;
2216
- }
2217
- get loadingEnabled() {
2218
- return true;
2219
- }
2220
- get name() {
2221
- return `col-${this.dataField}`;
2222
- }
2223
- get schemaName() {
2224
- return this._schemaName;
2225
- }
2226
- set schemaName(v) {
2227
- this._schemaName = v;
2228
- }
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
- ],
2249
- });
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 }); }
2267
- }
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
-
2312
- class AXPWidgetFilterRendererComponent {
2313
- 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();
2345
- });
2346
- }
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();
2369
- }
2370
- }
2371
- updateValue() {
2372
- if (this.instance) {
2373
- this.instance.value = this.value;
2374
- }
2375
- }
2376
- updateOperator() {
2377
- if (this.instance) {
2378
- this.instance.operator = this.operator;
2379
- }
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;
2391
- }
2392
- });
2393
- this.instance.operatorChange.subscribe((op) => {
2394
- if (!isEqual(op, this.operator)) {
2395
- this.operator = op;
2396
- }
2397
- });
2398
- }
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>
2405
- }
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 }); }
2407
- }
2408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetFilterRendererComponent, decorators: [{
2409
- type: Component,
2410
- 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: [{
1952
+ encapsulation: ViewEncapsulation.None
1953
+ }]
1954
+ }], propDecorators: { items: [{
2477
1955
  type: Input
2478
1956
  }] } });
2479
- class AXPWidgetEditBase extends AXPWidgetBase {
1957
+
1958
+ class AXPSearchDefinitionProviderContext {
2480
1959
  constructor() {
2481
- super(...arguments);
2482
- this.valueChange = new EventEmitter();
1960
+ this.definitions = [];
1961
+ this.definitionMap = new Map();
2483
1962
  }
2484
- get value() {
2485
- return this._value;
1963
+ addDefinition(name, title, icon, actions) {
1964
+ const definitionSearch = {
1965
+ name,
1966
+ title,
1967
+ icon,
1968
+ actions: actions ?? [],
1969
+ };
1970
+ this.definitions.push(definitionSearch);
1971
+ this.definitionMap.set(name, definitionSearch); // Index by name
1972
+ return new AXPSearchDefinitionBuilder(this, definitionSearch);
2486
1973
  }
2487
- set value(v) {
2488
- this._value = v;
2489
- this.valueChange.emit(v);
2490
- this.render();
2491
- this.cdr.markForCheck();
1974
+ definition(name) {
1975
+ const foundDefinition = this.definitionMap.get(name);
1976
+ if (!foundDefinition) {
1977
+ throw new Error(`definition with name "${name}" not found.`);
1978
+ }
1979
+ return new AXPSearchDefinitionBuilder(this, foundDefinition);
2492
1980
  }
2493
- get validations() {
2494
- const merged = [...(this.schema.validationRules ?? []), ...(this.token.prop.validationRules ?? [])];
2495
- return merged;
1981
+ getDefinitions() {
1982
+ return this.definitions;
2496
1983
  }
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();
1984
+ // Expose groupMap for controlled access
1985
+ hasEntity(name) {
1986
+ return this.definitionMap.has(name);
2512
1987
  }
2513
- get operator() {
2514
- return this._operator;
1988
+ getDefinition(name) {
1989
+ return this.definitionMap.get(name);
1990
+ }
1991
+ }
1992
+ class AXPSearchDefinitionBuilder {
1993
+ constructor(context, definition) {
1994
+ this.context = context;
1995
+ this.definition = definition;
2515
1996
  }
2516
- set operator(op) {
2517
- this._operator = op;
2518
- this.operatorChange.emit(op);
2519
- this.render();
2520
- this.cdr.markForCheck();
1997
+ addAction(name) {
1998
+ const newAction = {
1999
+ name,
2000
+ type: 'view',
2001
+ command: '',
2002
+ priority: 'primary',
2003
+ };
2004
+ this.definition.actions.push(newAction);
2005
+ return new AXPSearchDefinitionActionBuilder(this);
2006
+ }
2007
+ action(name) {
2008
+ const foundAction = this.definition.actions.find((action) => action.name === name);
2009
+ if (!foundAction) {
2010
+ throw new Error(`action with name "${name}" not found in entity "${this.definition.name}".`);
2011
+ }
2012
+ return new AXPSearchDefinitionActionBuilder(this);
2013
+ }
2014
+ // addGroup(name: string, title: string, description?: string, icon?: string): AXPTextSearchEntityBuilder {
2015
+ // const newGroup: AXPTextSearchEntity = {
2016
+ // name,
2017
+ // title,
2018
+ // description: description,
2019
+ // icon,
2020
+ // groups: [],
2021
+ // sections: [],
2022
+ // };
2023
+ // this.entity.groups.push(newGroup);
2024
+ // if (this.context.hasGroup(name)) {
2025
+ // throw new Error(`Group with name "${name}" already exists.`);
2026
+ // }
2027
+ // this.context['groupMap'].set(name, newGroup);
2028
+ // return new AXPTextSearchEntityBuilder(this.context, newGroup);
2029
+ // }
2030
+ endEntity() {
2031
+ return this.context;
2521
2032
  }
2522
- get value() {
2523
- return this._value;
2033
+ }
2034
+ class AXPSearchDefinitionActionBuilder {
2035
+ constructor(entityBuilder) {
2036
+ this.entityBuilder = entityBuilder;
2524
2037
  }
2525
- set value(v) {
2526
- this._value = v;
2527
- this.valueChange.emit(v);
2528
- this.render();
2529
- this.cdr.markForCheck();
2038
+ endAction() {
2039
+ return this.entityBuilder;
2530
2040
  }
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
2041
  }
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
2042
 
2546
- class AXPWidgetRendererComponent {
2043
+ // Injection token for setting providers
2044
+ const AXP_SEARCH_DEFINITION_PROVIDER = new InjectionToken('AXP_SEARCH_DEFINITION_PROVIDER');
2045
+ class AXPSearchDefinitionProviderService {
2547
2046
  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
- });
2047
+ this.providers = inject(AXP_SEARCH_DEFINITION_PROVIDER, { optional: true });
2048
+ this.cache = null;
2575
2049
  }
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();
2050
+ async load() {
2051
+ if (this.cache) {
2052
+ return;
2053
+ }
2054
+ const context = new AXPSearchDefinitionProviderContext();
2055
+ if (Array.isArray(this.providers)) {
2056
+ for (const provider of this.providers) {
2057
+ await provider.provide(context);
2058
+ }
2598
2059
  }
2060
+ this.cache = context.getDefinitions();
2061
+ }
2062
+ async getListAsync() {
2063
+ await this.load();
2064
+ return this.getList();
2599
2065
  }
2600
- updateValue() {
2601
- if (this.instance && this.context && this.instance instanceof AXPWidgetEditBase) {
2602
- this.instance.value = get(this.context, this.prop.name);
2066
+ getList() {
2067
+ if (!this.cache) {
2068
+ return [];
2069
+ }
2070
+ else {
2071
+ return this.cache;
2603
2072
  }
2604
2073
  }
2605
- updateProps() {
2606
- if (this.instance) {
2607
- assign(this.instance, this.options);
2074
+ findDefinition(definitionName) {
2075
+ const definition = this.getList().find((definition) => definition.name === definitionName);
2076
+ if (!definition) {
2077
+ throw new Error(`Definition with name ${definitionName} not found`);
2608
2078
  }
2079
+ return definition;
2609
2080
  }
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]);
2081
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2082
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
2083
+ }
2084
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
2085
+ type: Injectable,
2086
+ args: [{ providedIn: 'root' }]
2087
+ }] });
2088
+
2089
+ // Injection token for setting providers
2090
+ const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
2091
+ class AXPSearchService {
2092
+ constructor() {
2093
+ this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
2094
+ this.definitionService = inject(AXPSearchDefinitionProviderService);
2095
+ }
2096
+ async search(text) {
2097
+ //TODO better handle this
2098
+ if (this.definitionService.getList().length == 0) {
2099
+ await this.definitionService.getListAsync();
2100
+ }
2101
+ if (!this.providers || (this.providers?.length || 0) === 0) {
2102
+ throw new Error('No search providers available'); // No providers available
2103
+ }
2104
+ const mergeData = [];
2105
+ const promises = this.providers.map((provider) => provider.search(text));
2106
+ const results = await Promise.all(promises);
2107
+ for (const resultArray of results) {
2108
+ for (const result of resultArray) {
2109
+ try {
2110
+ const definition = this.definitionService.findDefinition(result.name);
2111
+ mergeData.push({
2112
+ definitionName: definition.name,
2113
+ definitionTitle: definition.title,
2114
+ name: result.name,
2115
+ title: result.title,
2116
+ icon: result.icon ?? definition.icon,
2117
+ data: result.data,
2118
+ actions: definition.actions,
2119
+ description: result.description,
2120
+ parent: result.parent,
2121
+ });
2617
2122
  }
2618
- else {
2619
- this.context[referenceField] = v?.[valueField];
2123
+ catch (e) {
2124
+ console.error(e);
2620
2125
  }
2621
2126
  }
2622
- else {
2623
- this.context[`${this.prop.name}Id`] = v?.[valueField];
2624
- }
2625
2127
  }
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);
2638
- });
2128
+ // Group data
2129
+ const groupedData = [];
2130
+ const groupMap = {};
2131
+ // Create groups
2132
+ for (const item of mergeData) {
2133
+ const groupName = item.definitionName; // Change this to the property you want to group by
2134
+ if (!groupMap[groupName]) {
2135
+ groupMap[groupName] = {
2136
+ name: groupName,
2137
+ title: item.definitionTitle, // You can adjust the title logic if needed
2138
+ children: [],
2139
+ };
2140
+ groupedData.push(groupMap[groupName]);
2141
+ }
2142
+ groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle']));
2639
2143
  }
2144
+ return groupedData;
2640
2145
  }
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: [
2643
- {
2644
- provide: AXUnsubscriber,
2645
- },
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>
2651
- }
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] }); }
2146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2147
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
2689
2148
  }
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
- }]
2149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, decorators: [{
2150
+ type: Injectable,
2151
+ args: [{ providedIn: 'root' }]
2698
2152
  }] });
2699
2153
 
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));
2154
+ class AXPSettingSearchDefinitionProvider {
2155
+ async provide(context) {
2156
+ context.addDefinition('setting', 'Setting', 'fa-solid fa-gear', [
2157
+ {
2158
+ name: 'open',
2159
+ command: {
2160
+ name: 'view',
2161
+ options: {},
2162
+ },
2163
+ type: 'view',
2164
+ priority: 'primary',
2165
+ },
2166
+ ]);
2167
+ }
2729
2168
  }
2730
2169
 
2731
- class AXEntityLoaderDefault {
2732
- async get(moduleName, entityName) {
2733
- return null;
2170
+ class AXPSettingSearchProvider {
2171
+ constructor() {
2172
+ this.settingService = inject(AXPSettingDefinitionProviderService);
2173
+ }
2174
+ async search(text) {
2175
+ const groupsSetting = this.settingService.getList(AXPSettingScope.User);
2176
+ if (groupsSetting.length == 0) {
2177
+ groupsSetting.push(...(await this.settingService.getListAsync(AXPSettingScope.User)));
2178
+ }
2179
+ // Step 2: Flatten settings from groups
2180
+ const allSettings = [];
2181
+ const extractSettings = (group) => {
2182
+ for (const section of group.sections) {
2183
+ allSettings.push(...section.settings.map((x) => ({ ...x, group })));
2184
+ }
2185
+ for (const subGroup of group.groups) {
2186
+ extractSettings(subGroup); // Recursive extraction
2187
+ }
2188
+ };
2189
+ for (const group of groupsSetting) {
2190
+ extractSettings(group);
2191
+ }
2192
+ // Step 3: Search settings by title
2193
+ const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));
2194
+ return sortBy(searchResults.map((setting) => ({
2195
+ title: setting.title,
2196
+ description: setting.description,
2197
+ name: 'setting',
2198
+ data: setting,
2199
+ parent: setting.group
2200
+ ? {
2201
+ title: setting.group.title,
2202
+ data: setting.group,
2203
+ }
2204
+ : undefined,
2205
+ })), ['title']);
2734
2206
  }
2735
2207
  }
2736
- const AXP_ENTITY_LOADER = new InjectionToken('AXP_ENTITY_LOADER', {
2737
- providedIn: 'root',
2738
- factory: () => {
2739
- return new AXEntityLoaderDefault();
2740
- },
2741
- });
2742
2208
 
2743
- class AXPEntityRegistryService {
2209
+ //TODO Loading, Redirect, Drawer, Show toast
2210
+ const AXPRedirectEvent = createWorkFlowEvent('Redirect Event Fired');
2211
+ const AXPRefreshEvent = createWorkFlowEvent('Refresh Event Fired');
2212
+ class AXPWorkflowNavigateAction extends AXPWorkflowAction {
2744
2213
  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);
2214
+ super(...arguments);
2215
+ this.router = inject(Router);
2759
2216
  }
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}`);
2217
+ async execute(context) {
2218
+ const payload = context.getVariable('payload');
2219
+ if (Array.isArray(payload.commands)) {
2220
+ this.router.navigate(payload.commands, payload.extras);
2221
+ }
2222
+ else {
2223
+ if (payload.commands.toLowerCase().startsWith('http') || payload.target == 'blank') {
2224
+ window.open(payload.commands, '_blank');
2786
2225
  }
2226
+ else
2227
+ this.router.navigate([payload.commands], payload.extras);
2787
2228
  }
2788
- return config;
2789
2229
  }
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}`;
2230
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2231
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction }); }
2232
+ }
2233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
2234
+ type: Injectable
2235
+ }] });
2236
+ class AXPDialogConfirmAction extends AXPWorkflowAction {
2237
+ constructor() {
2238
+ super(...arguments);
2239
+ this.dialogService = inject(AXDialogService);
2240
+ this.translationService = inject(AXTranslationService);
2241
+ }
2242
+ async execute(context) {
2243
+ context.setOutput('result', false);
2244
+ const dialogResult = await this.dialogService.confirm(await this.translationService.translateAsync(this.title), await this.translationService.translateAsync(this.message), (await this.translationService.translateAsync(this.type)));
2245
+ context.setOutput('result', dialogResult.result);
2799
2246
  }
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' }); }
2247
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2248
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction }); }
2802
2249
  }
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
- }]
2250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
2251
+ type: Injectable
2808
2252
  }] });
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',
2253
+ class AXPToastAction extends AXPWorkflowAction {
2254
+ constructor() {
2255
+ super(...arguments);
2256
+ this.toastService = inject(AXToastService);
2257
+ this.translationService = inject(AXTranslationService);
2258
+ }
2259
+ async execute(context) {
2260
+ this.toastService.show({
2261
+ color: this.color,
2262
+ title: await this.translationService.translateAsync(this.title),
2263
+ content: await this.translationService.translateAsync(this.content),
2264
+ closeButton: true,
2265
+ timeOut: 3000,
2266
+ timeOutProgress: true,
3090
2267
  });
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,
2268
+ }
2269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2270
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction }); }
2271
+ }
2272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPToastAction, decorators: [{
2273
+ type: Injectable
2274
+ }] });
2275
+
2276
+ class AXMWorkflowErrorHandler {
2277
+ constructor() {
2278
+ this.dialog = inject(AXDialogService);
2279
+ }
2280
+ handleError(error, next) {
2281
+ if (error instanceof AXPWorkflowError) {
2282
+ this.dialog.alert("Somthing is wrong!", error.inner ? error.inner.message : error.message, 'danger');
2283
+ next(error);
2284
+ }
2285
+ else {
2286
+ next(error);
2287
+ }
2288
+ }
2289
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2290
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler }); }
2291
+ }
2292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
2293
+ type: Injectable
2294
+ }] });
2295
+
2296
+ class AXPCommonModule {
2297
+ static forRoot(configs) {
2298
+ return {
2299
+ ngModule: AXPCommonModule,
2300
+ providers: [
2301
+ ...(configs?.errorHandlers || []),
2302
+ {
2303
+ provide: 'AXPCommonModuleFactory',
2304
+ useFactory: (registry) => () => {
2305
+ registry.register(...(configs?.errorHandlers || []));
3101
2306
  },
2307
+ deps: [AXPErrorHandlerRegistryService],
2308
+ multi: true,
3102
2309
  },
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',
3116
- });
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,
2310
+ ],
2311
+ };
2312
+ }
2313
+ static forChild(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',
2326
+ ],
2327
+ };
2328
+ }
2329
+ /**
2330
+ * @ignore
2331
+ */
2332
+ constructor(instances, appInitService, settingsService, seederService) {
2333
+ instances.forEach((f) => {
2334
+ f();
3142
2335
  });
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,
3156
- },
3157
- },
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,
2336
+ // appInitService.registerTask({
2337
+ // name: 'Modules',
2338
+ // statusText: 'Initializing Modules ...',
2339
+ // run: () =>
2340
+ // new Promise<void>((resolve) => {
2341
+ // setTimeout(() => {
2342
+ // resolve();
2343
+ // }, 250);
2344
+ // }),
2345
+ // });
2346
+ //
2347
+ appInitService.registerTask({
2348
+ name: 'Settings',
2349
+ statusText: 'Loading Settings ...',
2350
+ run: async () => {
2351
+ await settingsService.load();
3165
2352
  },
3166
- name: widgetSchemas.selectionList,
3167
- dataType: 'object',
3168
2353
  });
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,
2354
+ //
2355
+ //
2356
+ appInitService.registerTask({
2357
+ name: 'Seeder',
2358
+ statusText: 'Seed Data ...',
2359
+ run: async () => {
2360
+ await seederService.seed();
3194
2361
  },
3195
- name: widgetSchemas.richText,
3196
- dataType: 'object',
3197
2362
  });
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,
2363
+ }
2364
+ 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 }); }
2365
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, imports: [i1$1.EffectsFeatureModule, i5.AXPWorkflowModule, AXPopupModule,
2366
+ AXDateTimeModule,
2367
+ AXToastModule], exports: [RouterModule] }); }
2368
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, providers: [
2369
+ AXPAppStartUpProvider,
2370
+ {
2371
+ provide: ErrorHandler,
2372
+ useClass: AXPGlobalErrorHandler,
3211
2373
  },
3212
- name: widgetSchemas.map,
3213
- dataType: 'object',
3214
- });
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
- },
2374
+ {
2375
+ provide: AXPCustomOperatorService,
2376
+ useClass: AXPCustomOperatorServiceImpl,
3224
2377
  },
3225
- filterOptions: {
3226
- operators: [],
3227
- default: EQ_OPER,
2378
+ {
2379
+ provide: AXPFilterOperatorMiddlewareService,
2380
+ useClass: AXPFilterOperatorMiddlewareServiceImpl,
3228
2381
  },
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
- },
2382
+ {
2383
+ provide: AXP_SEARCH_PROVIDER,
2384
+ useClass: AXPSettingSearchProvider,
2385
+ multi: true,
3247
2386
  },
3248
- filterOptions: {
3249
- operators: [],
3250
- default: EQ_OPER,
2387
+ {
2388
+ provide: AXP_SEARCH_PROVIDER,
2389
+ useClass: AXPMenuSearchProvider,
2390
+ multi: true,
3251
2391
  },
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
- },
2392
+ {
2393
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2394
+ useClass: AXPSettingSearchDefinitionProvider,
2395
+ multi: true,
3268
2396
  },
3269
- filterOptions: {
3270
- operators: [],
3271
- default: EQ_OPER,
2397
+ {
2398
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2399
+ useClass: AXPMenuSearchDefinitionProvider,
2400
+ multi: true,
3272
2401
  },
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),
2402
+ ], imports: [EffectsModule.forFeature([AXPCommonEffects]),
2403
+ AXPWorkflowModule.forChild({
2404
+ actions: {
2405
+ navigate: AXPDialogConfirmAction,
2406
+ 'show-prompt-dialog': AXPDialogConfirmAction,
2407
+ 'show-toast': AXPToastAction,
3284
2408
  },
3285
- },
3286
- filterOptions: {
3287
- operators: [],
3288
- default: EQ_OPER,
3289
- },
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] }); }
2409
+ }),
2410
+ AXPopupModule,
2411
+ AXDateTimeModule,
2412
+ AXToastModule, RouterModule] }); }
3298
2413
  }
3299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonWidgetModule, decorators: [{
2414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, decorators: [{
3300
2415
  type: NgModule,
3301
2416
  args: [{
3302
- imports: [AXToastModule],
3303
- exports: [],
3304
- declarations: [],
3305
- providers: [],
2417
+ imports: [
2418
+ EffectsModule.forFeature([AXPCommonEffects]),
2419
+ AXPWorkflowModule.forChild({
2420
+ actions: {
2421
+ navigate: AXPDialogConfirmAction,
2422
+ 'show-prompt-dialog': AXPDialogConfirmAction,
2423
+ 'show-toast': AXPToastAction,
2424
+ },
2425
+ }),
2426
+ AXPopupModule,
2427
+ AXDateTimeModule,
2428
+ AXToastModule,
2429
+ ],
2430
+ exports: [RouterModule],
2431
+ providers: [
2432
+ AXPAppStartUpProvider,
2433
+ {
2434
+ provide: ErrorHandler,
2435
+ useClass: AXPGlobalErrorHandler,
2436
+ },
2437
+ {
2438
+ provide: AXPCustomOperatorService,
2439
+ useClass: AXPCustomOperatorServiceImpl,
2440
+ },
2441
+ {
2442
+ provide: AXPFilterOperatorMiddlewareService,
2443
+ useClass: AXPFilterOperatorMiddlewareServiceImpl,
2444
+ },
2445
+ {
2446
+ provide: AXP_SEARCH_PROVIDER,
2447
+ useClass: AXPSettingSearchProvider,
2448
+ multi: true,
2449
+ },
2450
+ {
2451
+ provide: AXP_SEARCH_PROVIDER,
2452
+ useClass: AXPMenuSearchProvider,
2453
+ multi: true,
2454
+ },
2455
+ {
2456
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2457
+ useClass: AXPSettingSearchDefinitionProvider,
2458
+ multi: true,
2459
+ },
2460
+ {
2461
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2462
+ useClass: AXPMenuSearchDefinitionProvider,
2463
+ multi: true,
2464
+ },
2465
+ ],
3306
2466
  }]
3307
- }], ctorParameters: () => [{ type: AXPSchemaRegistryService }] });
2467
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2468
+ type: Inject,
2469
+ args: ['AXPCommonModuleFactory']
2470
+ }] }, { type: AXPAppStartUpService }, { type: AXPSettingValueProviderService }, { type: AXPDataSeederService }] });
2471
+
2472
+ const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
2473
+ const AXP_PLATFORM_CONFIG_TOKEN = new InjectionToken('AXP_PLATFORM_CONFIG_TOKEN', {
2474
+ providedIn: 'root',
2475
+ factory: () => {
2476
+ return AXPPlatformDefaultConfigs;
2477
+ },
2478
+ });
2479
+ const AXPPlatformDefaultConfigs = {
2480
+ copyright: 'ACoreX @ 2024',
2481
+ title: 'ACoreX Platform',
2482
+ logo: {
2483
+ dark: new AXPTextLogoConfig('ACoreX'),
2484
+ light: new AXPTextLogoConfig('ACoreX'),
2485
+ colored: new AXPTextLogoConfig('ACoreX'),
2486
+ },
2487
+ network: {
2488
+ timeOut: 5000,
2489
+ }
2490
+ };
2491
+ function configPlatform(config = AXPPlatformDefaultConfigs) {
2492
+ return merge(AXPPlatformDefaultConfigs, config);
2493
+ }
2494
+
2495
+ const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
3308
2496
 
3309
2497
  class AXPFileStorageService {
3310
2498
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -3323,9 +2511,26 @@ var AXPFileStorageStatus;
3323
2511
  AXPFileStorageStatus["Error"] = "error";
3324
2512
  })(AXPFileStorageStatus || (AXPFileStorageStatus = {}));
3325
2513
 
2514
+ class AXPFiltersProviderService {
2515
+ async getAll() {
2516
+ return Promise.resolve('');
2517
+ }
2518
+ async execute() {
2519
+ return Promise.resolve('');
2520
+ }
2521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, providedIn: 'root' }); }
2523
+ }
2524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFiltersProviderService, decorators: [{
2525
+ type: Injectable,
2526
+ args: [{
2527
+ providedIn: 'root',
2528
+ }]
2529
+ }] });
2530
+
3326
2531
  /**
3327
2532
  * Generated bundle index. Do not edit.
3328
2533
  */
3329
2534
 
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 };
2535
+ export { ALL_DEFAULT_OPERATORS, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService, AXPCommonEffects, 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, AXPNavigateAction, 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, 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
2536
  //# sourceMappingURL=acorex-platform-common.mjs.map