@acorex/modules 18.2.4 → 19.0.1

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 (308) hide show
  1. package/auth/lib/account/app-chooser/app-chooser-slot.component.d.ts +1 -1
  2. package/fesm2022/{acorex-modules-application-management-module-designer.component-B6WPz0N8.mjs → acorex-modules-application-management-module-designer.component-1pXIvIeG.mjs} +9 -23
  3. package/fesm2022/acorex-modules-application-management-module-designer.component-1pXIvIeG.mjs.map +1 -0
  4. package/fesm2022/acorex-modules-application-management.mjs +44 -48
  5. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  6. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-DQzSrtut.mjs → acorex-modules-auth-acorex-modules-auth-CtWwcZOU.mjs} +44 -51
  7. package/fesm2022/acorex-modules-auth-acorex-modules-auth-CtWwcZOU.mjs.map +1 -0
  8. package/fesm2022/{acorex-modules-auth-app-chooser.component-BFQgjqFV.mjs → acorex-modules-auth-app-chooser.component-BK4Hs5OP.mjs} +7 -13
  9. package/fesm2022/acorex-modules-auth-app-chooser.component-BK4Hs5OP.mjs.map +1 -0
  10. package/fesm2022/{acorex-modules-auth-blank.layout-Bq822Iz4.mjs → acorex-modules-auth-blank.layout-B1a0710P.mjs} +5 -5
  11. package/fesm2022/acorex-modules-auth-blank.layout-B1a0710P.mjs.map +1 -0
  12. package/fesm2022/{acorex-modules-auth-login.module-KR2dB8vW.mjs → acorex-modules-auth-login.module-Cvr3l9wl.mjs} +8 -24
  13. package/fesm2022/acorex-modules-auth-login.module-Cvr3l9wl.mjs.map +1 -0
  14. package/fesm2022/acorex-modules-auth-master.layout-4jTF1Xhx.mjs +23 -0
  15. package/fesm2022/acorex-modules-auth-master.layout-4jTF1Xhx.mjs.map +1 -0
  16. package/fesm2022/{acorex-modules-auth-password.component-DpjEjw0o.mjs → acorex-modules-auth-password.component-C5soTmv9.mjs} +8 -16
  17. package/fesm2022/acorex-modules-auth-password.component-C5soTmv9.mjs.map +1 -0
  18. package/fesm2022/{acorex-modules-auth-password.component-9uIMNoQE.mjs → acorex-modules-auth-password.component-DeCK_glZ.mjs} +6 -19
  19. package/fesm2022/acorex-modules-auth-password.component-DeCK_glZ.mjs.map +1 -0
  20. package/fesm2022/{acorex-modules-auth-routes-CWqGOFnQ.mjs → acorex-modules-auth-routes-DqgtVe9G.mjs} +2 -2
  21. package/fesm2022/{acorex-modules-auth-routes-CWqGOFnQ.mjs.map → acorex-modules-auth-routes-DqgtVe9G.mjs.map} +1 -1
  22. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-6qDoCUBo.mjs → acorex-modules-auth-tenant-chooser.component-CorZ4Z7h.mjs} +6 -6
  23. package/fesm2022/acorex-modules-auth-tenant-chooser.component-CorZ4Z7h.mjs.map +1 -0
  24. package/fesm2022/{acorex-modules-auth-two-factor-code.component-BJKmvI7y.mjs → acorex-modules-auth-two-factor-code.component-BEsTVMeC.mjs} +6 -6
  25. package/fesm2022/acorex-modules-auth-two-factor-code.component-BEsTVMeC.mjs.map +1 -0
  26. package/fesm2022/{acorex-modules-auth-two-factor.module-Bnoi3ZXB.mjs → acorex-modules-auth-two-factor.module-C99NYq3o.mjs} +7 -23
  27. package/fesm2022/acorex-modules-auth-two-factor.module-C99NYq3o.mjs.map +1 -0
  28. package/fesm2022/acorex-modules-auth.mjs +1 -19
  29. package/fesm2022/acorex-modules-auth.mjs.map +1 -1
  30. package/fesm2022/acorex-modules-backend.mjs +36 -35
  31. package/fesm2022/acorex-modules-backend.mjs.map +1 -1
  32. package/fesm2022/acorex-modules-conversation.mjs +50 -51
  33. package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
  34. package/fesm2022/acorex-modules-form-template-management-category.entity-xUkZHVgy.mjs +195 -0
  35. package/fesm2022/acorex-modules-form-template-management-category.entity-xUkZHVgy.mjs.map +1 -0
  36. package/fesm2022/{acorex-modules-form-template-management-designer.page-NhIPhsRs.mjs → acorex-modules-form-template-management-designer.page-BLbPLLdP.mjs} +8 -5
  37. package/fesm2022/acorex-modules-form-template-management-designer.page-BLbPLLdP.mjs.map +1 -0
  38. package/fesm2022/acorex-modules-form-template-management-template-picker.component-D_FkgF0W.mjs +123 -0
  39. package/fesm2022/acorex-modules-form-template-management-template-picker.component-D_FkgF0W.mjs.map +1 -0
  40. package/fesm2022/acorex-modules-form-template-management-template-widget-edit.component-Bgx5YRBc.mjs +111 -0
  41. package/fesm2022/acorex-modules-form-template-management-template-widget-edit.component-Bgx5YRBc.mjs.map +1 -0
  42. package/fesm2022/acorex-modules-form-template-management-template.entity-CGhbmYel.mjs +470 -0
  43. package/fesm2022/acorex-modules-form-template-management-template.entity-CGhbmYel.mjs.map +1 -0
  44. package/fesm2022/acorex-modules-form-template-management.mjs +383 -730
  45. package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
  46. package/fesm2022/acorex-modules-localization-management.mjs +332 -334
  47. package/fesm2022/acorex-modules-localization-management.mjs.map +1 -1
  48. package/fesm2022/acorex-modules-notification-management.mjs +33 -34
  49. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  50. package/fesm2022/acorex-modules-platform-management.mjs +77 -84
  51. package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
  52. package/fesm2022/acorex-modules-scheduler-job-management.mjs +34 -23
  53. package/fesm2022/acorex-modules-scheduler-job-management.mjs.map +1 -1
  54. package/fesm2022/acorex-modules-text-template-management.mjs +22 -22
  55. package/form-template-management/index.d.ts +4 -0
  56. package/form-template-management/lib/components/widgets/template/index.d.ts +4 -0
  57. package/form-template-management/lib/components/widgets/template/template-picker/template-picker.component.d.ts +30 -0
  58. package/form-template-management/lib/components/widgets/template/template-widget-designer.component.d.ts +25 -0
  59. package/form-template-management/lib/components/widgets/template/template-widget-edit.component.d.ts +13 -0
  60. package/form-template-management/lib/components/widgets/template/template-widget-view.component.d.ts +11 -0
  61. package/form-template-management/lib/components/widgets/template/template-widget.config.d.ts +5 -0
  62. package/form-template-management/lib/components/widgets/template/template.provider.d.ts +30 -0
  63. package/form-template-management/lib/entities/category/category.types.d.ts +0 -1
  64. package/form-template-management/lib/entities/category/index.d.ts +0 -1
  65. package/form-template-management/lib/entities/template/index.d.ts +0 -1
  66. package/form-template-management/lib/entities/template/template.types.d.ts +11 -0
  67. package/form-template-management/lib/pages/designer/designer.page.d.ts +1 -0
  68. package/form-template-management/lib/services/designer-connector.service.d.ts +7 -3
  69. package/form-template-management/lib/services/template.provider.d.ts +3 -4
  70. package/localization-management/index.d.ts +2 -1
  71. package/package.json +11 -33
  72. package/platform-management/index.d.ts +2 -1
  73. package/platform-management/lib/common/{entity.loader.d.ts → entity.provider.d.ts} +3 -3
  74. package/platform-management/lib/common/index.d.ts +1 -2
  75. package/scheduler-job-management/index.d.ts +1 -0
  76. package/esm2022/acorex-modules.mjs +0 -5
  77. package/esm2022/application-management/acorex-modules-application-management.mjs +0 -5
  78. package/esm2022/application-management/index.mjs +0 -14
  79. package/esm2022/application-management/lib/application-management-mock-data.mjs +0 -109
  80. package/esm2022/application-management/lib/application-management.module.mjs +0 -117
  81. package/esm2022/application-management/lib/application-management.route.mjs +0 -29
  82. package/esm2022/application-management/lib/application-management.service.mjs +0 -66
  83. package/esm2022/application-management/lib/application-management.source.mjs +0 -9
  84. package/esm2022/application-management/lib/application-management.types.mjs +0 -2
  85. package/esm2022/application-management/lib/const.mjs +0 -6
  86. package/esm2022/application-management/lib/entities/application-module.entity.mjs +0 -270
  87. package/esm2022/application-management/lib/entities/applications.entity.mjs +0 -311
  88. package/esm2022/application-management/lib/entities/edition.entity.mjs +0 -281
  89. package/esm2022/application-management/lib/entities/entity.entity.mjs +0 -295
  90. package/esm2022/application-management/lib/entities/feature.entity.mjs +0 -281
  91. package/esm2022/application-management/lib/entities/modules.entity.mjs +0 -321
  92. package/esm2022/application-management/lib/entities/permission.entity.mjs +0 -281
  93. package/esm2022/application-management/lib/entities/property.entity.mjs +0 -447
  94. package/esm2022/application-management/lib/entity.loader.mjs +0 -46
  95. package/esm2022/application-management/lib/layouts/index.mjs +0 -2
  96. package/esm2022/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.mjs +0 -84
  97. package/esm2022/application-management/lib/menu.provider.mjs +0 -28
  98. package/esm2022/application-management/lib/module-designer/module-designer.component.mjs +0 -150
  99. package/esm2022/application-management/lib/module-designer/module-designer.service.mjs +0 -3
  100. package/esm2022/application-management/lib/module-designer/module-designer.type.mjs +0 -2
  101. package/esm2022/application-management/lib/services/application-management.service.mjs +0 -17
  102. package/esm2022/application-management/lib/services/application-module-management.service.mjs +0 -17
  103. package/esm2022/application-management/lib/services/context-menu.service.mjs +0 -166
  104. package/esm2022/application-management/lib/services/edition-management.service.mjs +0 -17
  105. package/esm2022/application-management/lib/services/entity-management.service.mjs +0 -17
  106. package/esm2022/application-management/lib/services/feature-management.service.mjs +0 -17
  107. package/esm2022/application-management/lib/services/module-management.service.mjs +0 -17
  108. package/esm2022/application-management/lib/services/permission-management.service.mjs +0 -17
  109. package/esm2022/application-management/lib/services/property-management.service.mjs +0 -17
  110. package/esm2022/application-management/lib/workflows/create-module-entity.workflow.mjs +0 -66
  111. package/esm2022/application-management/lib/workflows/index.mjs +0 -3
  112. package/esm2022/application-management/lib/workflows/show-module-entity-details.workflow.mjs +0 -9
  113. package/esm2022/auth/acorex-modules-auth.mjs +0 -5
  114. package/esm2022/auth/index.mjs +0 -5
  115. package/esm2022/auth/lib/account/account.module.mjs +0 -110
  116. package/esm2022/auth/lib/account/app-chooser/app-chooser-list.component.mjs +0 -31
  117. package/esm2022/auth/lib/account/app-chooser/app-chooser-slot.component.mjs +0 -42
  118. package/esm2022/auth/lib/account/app-chooser/app-chooser.component.mjs +0 -62
  119. package/esm2022/auth/lib/account/profile/profile-slot.component.mjs +0 -108
  120. package/esm2022/auth/lib/account/tenant-chooser/tenant-chooser-dropdown.component.mjs +0 -26
  121. package/esm2022/auth/lib/account/tenant-chooser/tenant-chooser.component.mjs +0 -80
  122. package/esm2022/auth/lib/auth.config.mjs +0 -23
  123. package/esm2022/auth/lib/auth.module.mjs +0 -51
  124. package/esm2022/auth/lib/auth.routes.mjs +0 -39
  125. package/esm2022/auth/lib/error-handler.mjs +0 -47
  126. package/esm2022/auth/lib/forgot/password/password.component.mjs +0 -56
  127. package/esm2022/auth/lib/forgot/routes.mjs +0 -7
  128. package/esm2022/auth/lib/login/login.module.mjs +0 -52
  129. package/esm2022/auth/lib/login/password/password.component.mjs +0 -118
  130. package/esm2022/auth/lib/menu.provider.mjs +0 -41
  131. package/esm2022/auth/lib/shared/layouts/blank/blank.layout.mjs +0 -15
  132. package/esm2022/auth/lib/shared/layouts/master/master.layout.mjs +0 -20
  133. package/esm2022/auth/lib/shared/services/idle.service.mjs +0 -42
  134. package/esm2022/auth/lib/shared/services/index.mjs +0 -2
  135. package/esm2022/auth/lib/store/auth.effects.mjs +0 -90
  136. package/esm2022/auth/lib/store/index.mjs +0 -3
  137. package/esm2022/auth/lib/two-factor/two-factor-code/two-factor-code.component.mjs +0 -37
  138. package/esm2022/auth/lib/two-factor/two-factor.module.mjs +0 -42
  139. package/esm2022/backend/acorex-modules-backend.mjs +0 -5
  140. package/esm2022/backend/index.mjs +0 -5
  141. package/esm2022/backend/lib/auth/oidc/application.loader.mjs +0 -54
  142. package/esm2022/backend/lib/auth/oidc/configuration.service.mjs +0 -52
  143. package/esm2022/backend/lib/auth/oidc/feature.loader.mjs +0 -21
  144. package/esm2022/backend/lib/auth/oidc/index.mjs +0 -7
  145. package/esm2022/backend/lib/auth/oidc/oidc.strategy.mjs +0 -217
  146. package/esm2022/backend/lib/auth/oidc/permission.loader.mjs +0 -34
  147. package/esm2022/backend/lib/auth/oidc/signincallback.component.mjs +0 -43
  148. package/esm2022/backend/lib/auth/oidc/tenant.loader.mjs +0 -34
  149. package/esm2022/backend/lib/backend.configs.mjs +0 -2
  150. package/esm2022/backend/lib/backend.module.mjs +0 -130
  151. package/esm2022/backend/lib/data/api/comment.service.mjs +0 -46
  152. package/esm2022/backend/lib/data/api/data-provider.mjs +0 -165
  153. package/esm2022/backend/lib/data/api/file.service.mjs +0 -101
  154. package/esm2022/backend/lib/data/api/module-designer.service.mjs +0 -95
  155. package/esm2022/backend/lib/data/index.mjs +0 -5
  156. package/esm2022/conversation/acorex-modules-conversation.mjs +0 -5
  157. package/esm2022/conversation/index.mjs +0 -17
  158. package/esm2022/conversation/lib/const.mjs +0 -8
  159. package/esm2022/conversation/lib/conversation.module.mjs +0 -17
  160. package/esm2022/conversation/lib/entities/chat/chat.module.mjs +0 -141
  161. package/esm2022/conversation/lib/entities/chat/chat.service.mjs +0 -23
  162. package/esm2022/conversation/lib/entities/chat/chat.type.mjs +0 -2
  163. package/esm2022/conversation/lib/entities/chat/components/chat-item/chat-item.component.mjs +0 -53
  164. package/esm2022/conversation/lib/entities/chat/components/chat-item-footer/chat-item-footer.component.mjs +0 -13
  165. package/esm2022/conversation/lib/entities/chat/components/chat-item-header/chat-item-header.component.mjs +0 -28
  166. package/esm2022/conversation/lib/entities/chat/components/chat-preview/chat-preview.component.mjs +0 -124
  167. package/esm2022/conversation/lib/entities/chat/components/chat-preview-header/chat-preview-header.component.mjs +0 -22
  168. package/esm2022/conversation/lib/entities/chat/pages/chat/chat.component.mjs +0 -80
  169. package/esm2022/conversation/lib/entities/comments/comment.module.mjs +0 -100
  170. package/esm2022/conversation/lib/entities/comments/comments.service.mjs +0 -21
  171. package/esm2022/conversation/lib/entities/comments/comments.type.mjs +0 -2
  172. package/esm2022/conversation/lib/entities/comments/pages/comment-list-view.component.mjs +0 -392
  173. package/esm2022/conversation/lib/entities/comments/pages/comment-lookup-popup.component.mjs +0 -56
  174. package/esm2022/form-template-management/acorex-modules-form-template-management.mjs +0 -5
  175. package/esm2022/form-template-management/index.mjs +0 -2
  176. package/esm2022/form-template-management/lib/components/widgets/template-designer/index.mjs +0 -3
  177. package/esm2022/form-template-management/lib/components/widgets/template-designer/template-designer-widget-view.component.mjs +0 -44
  178. package/esm2022/form-template-management/lib/components/widgets/template-designer/template-designer-widget.config.mjs +0 -23
  179. package/esm2022/form-template-management/lib/const.mjs +0 -8
  180. package/esm2022/form-template-management/lib/entities/category/category.entity.mjs +0 -241
  181. package/esm2022/form-template-management/lib/entities/category/category.module.mjs +0 -28
  182. package/esm2022/form-template-management/lib/entities/category/category.service.mjs +0 -17
  183. package/esm2022/form-template-management/lib/entities/category/category.types.mjs +0 -2
  184. package/esm2022/form-template-management/lib/entities/category/index.mjs +0 -5
  185. package/esm2022/form-template-management/lib/entities/template/index.mjs +0 -5
  186. package/esm2022/form-template-management/lib/entities/template/template.entity.mjs +0 -434
  187. package/esm2022/form-template-management/lib/entities/template/template.module.mjs +0 -28
  188. package/esm2022/form-template-management/lib/entities/template/template.service.mjs +0 -17
  189. package/esm2022/form-template-management/lib/entities/template/template.types.mjs +0 -2
  190. package/esm2022/form-template-management/lib/entity.provider.mjs +0 -25
  191. package/esm2022/form-template-management/lib/form-template-management.module.mjs +0 -143
  192. package/esm2022/form-template-management/lib/menu.provider.mjs +0 -32
  193. package/esm2022/form-template-management/lib/pages/designer/designer.page.mjs +0 -29
  194. package/esm2022/form-template-management/lib/services/designer-connector.service.mjs +0 -40
  195. package/esm2022/form-template-management/lib/services/template.provider.mjs +0 -31
  196. package/esm2022/form-template-management/lib/workflows/create-template.workflow.mjs +0 -40
  197. package/esm2022/form-template-management/lib/workflows/design-template.workflow.mjs +0 -32
  198. package/esm2022/index.mjs +0 -2
  199. package/esm2022/localization-management/acorex-modules-localization-management.mjs +0 -5
  200. package/esm2022/localization-management/index.mjs +0 -8
  201. package/esm2022/localization-management/lib/const.mjs +0 -9
  202. package/esm2022/localization-management/lib/culture/culture.entity.mjs +0 -239
  203. package/esm2022/localization-management/lib/culture/culture.service.mjs +0 -17
  204. package/esm2022/localization-management/lib/culture/culture.types.mjs +0 -2
  205. package/esm2022/localization-management/lib/culture/index.mjs +0 -4
  206. package/esm2022/localization-management/lib/entity.loader.mjs +0 -36
  207. package/esm2022/localization-management/lib/language/index.mjs +0 -4
  208. package/esm2022/localization-management/lib/language/language-slot/language-slot.component.mjs +0 -30
  209. package/esm2022/localization-management/lib/language/language.entity.mjs +0 -239
  210. package/esm2022/localization-management/lib/language/language.service.mjs +0 -17
  211. package/esm2022/localization-management/lib/language/language.types.mjs +0 -2
  212. package/esm2022/localization-management/lib/localization-management.module.mjs +0 -99
  213. package/esm2022/localization-management/lib/localization-management.source.mjs +0 -4
  214. package/esm2022/localization-management/lib/localization-store.service.mjs +0 -34
  215. package/esm2022/localization-management/lib/menu.provider.mjs +0 -44
  216. package/esm2022/localization-management/lib/time-zone/index.mjs +0 -4
  217. package/esm2022/localization-management/lib/time-zone/time-zone.entity.mjs +0 -256
  218. package/esm2022/localization-management/lib/time-zone/time-zone.service.mjs +0 -17
  219. package/esm2022/localization-management/lib/time-zone/time-zone.types.mjs +0 -2
  220. package/esm2022/notification-management/acorex-modules-notification-management.mjs +0 -5
  221. package/esm2022/notification-management/index.mjs +0 -9
  222. package/esm2022/notification-management/lib/admin-notification-slot/admin-notification-item/admin-notification-item.component.mjs +0 -39
  223. package/esm2022/notification-management/lib/admin-notification-slot/admin-notification-panel/admin-notification-panel.component.mjs +0 -155
  224. package/esm2022/notification-management/lib/admin-notification-slot/admin-notification-slot/admin-notification-slot.component.mjs +0 -36
  225. package/esm2022/notification-management/lib/const.mjs +0 -9
  226. package/esm2022/notification-management/lib/entities/my-notification.mjs +0 -236
  227. package/esm2022/notification-management/lib/entities/notification-channel.entity.mjs +0 -344
  228. package/esm2022/notification-management/lib/entities/notification-log.entity.mjs +0 -180
  229. package/esm2022/notification-management/lib/entities/notification-template.entity.mjs +0 -298
  230. package/esm2022/notification-management/lib/entities/notification.entity.mjs +0 -207
  231. package/esm2022/notification-management/lib/entity.loader.mjs +0 -41
  232. package/esm2022/notification-management/lib/menu.provider.mjs +0 -54
  233. package/esm2022/notification-management/lib/notification-management-mock-data.mjs +0 -55
  234. package/esm2022/notification-management/lib/notification-management.module.mjs +0 -61
  235. package/esm2022/notification-management/lib/notification-management.service.mjs +0 -39
  236. package/esm2022/notification-management/lib/notification-management.type.mjs +0 -2
  237. package/esm2022/notification-management/lib/notification.service.mjs +0 -3
  238. package/esm2022/platform-management/acorex-modules-platform-management.mjs +0 -5
  239. package/esm2022/platform-management/index.mjs +0 -4
  240. package/esm2022/platform-management/lib/common/common.module.mjs +0 -65
  241. package/esm2022/platform-management/lib/common/common.source.mjs +0 -5
  242. package/esm2022/platform-management/lib/common/country/country-datasource.provider.mjs +0 -27
  243. package/esm2022/platform-management/lib/common/country/country.entity.mjs +0 -696
  244. package/esm2022/platform-management/lib/common/country/country.service.mjs +0 -17
  245. package/esm2022/platform-management/lib/common/country/country.types.mjs +0 -2
  246. package/esm2022/platform-management/lib/common/country/index.mjs +0 -4
  247. package/esm2022/platform-management/lib/common/currency/currency.entity.mjs +0 -283
  248. package/esm2022/platform-management/lib/common/currency/currency.service.mjs +0 -17
  249. package/esm2022/platform-management/lib/common/currency/currency.types.mjs +0 -2
  250. package/esm2022/platform-management/lib/common/currency/index.mjs +0 -4
  251. package/esm2022/platform-management/lib/common/entity.loader.mjs +0 -36
  252. package/esm2022/platform-management/lib/common/index.mjs +0 -5
  253. package/esm2022/platform-management/lib/common/province/index.mjs +0 -4
  254. package/esm2022/platform-management/lib/common/province/province.entity.mjs +0 -307
  255. package/esm2022/platform-management/lib/common/province/province.service.mjs +0 -17
  256. package/esm2022/platform-management/lib/common/province/province.types.mjs +0 -2
  257. package/esm2022/platform-management/lib/const.mjs +0 -12
  258. package/esm2022/platform-management/lib/global-variables/entities/global-variable.entity.mjs +0 -346
  259. package/esm2022/platform-management/lib/global-variables/entity.loader.mjs +0 -23
  260. package/esm2022/platform-management/lib/global-variables/global-variables.service.mjs +0 -16
  261. package/esm2022/platform-management/lib/global-variables/global-variables.types.mjs +0 -2
  262. package/esm2022/platform-management/lib/global-variables/index.mjs +0 -5
  263. package/esm2022/platform-management/lib/menu.provider.mjs +0 -74
  264. package/esm2022/platform-management/lib/platform-management.module.mjs +0 -61
  265. package/esm2022/scheduler-job-management/acorex-modules-scheduler-job-management.mjs +0 -5
  266. package/esm2022/scheduler-job-management/index.mjs +0 -5
  267. package/esm2022/scheduler-job-management/lib/const.mjs +0 -8
  268. package/esm2022/scheduler-job-management/lib/entities/index.mjs +0 -2
  269. package/esm2022/scheduler-job-management/lib/entities/scheduler-job/index.mjs +0 -5
  270. package/esm2022/scheduler-job-management/lib/entities/scheduler-job/scheduler-job.entity.mjs +0 -333
  271. package/esm2022/scheduler-job-management/lib/entities/scheduler-job/scheduler-job.module.mjs +0 -28
  272. package/esm2022/scheduler-job-management/lib/entities/scheduler-job/scheduler-job.service.mjs +0 -17
  273. package/esm2022/scheduler-job-management/lib/entities/scheduler-job/scheduler-job.types.mjs +0 -2
  274. package/esm2022/scheduler-job-management/lib/entity.provider.mjs +0 -25
  275. package/esm2022/scheduler-job-management/lib/menu.provider.mjs +0 -31
  276. package/esm2022/scheduler-job-management/lib/scheduler-job-management.module.mjs +0 -44
  277. package/esm2022/text-template-management/acorex-modules-text-template-management.mjs +0 -5
  278. package/esm2022/text-template-management/index.mjs +0 -6
  279. package/esm2022/text-template-management/lib/const.mjs +0 -8
  280. package/esm2022/text-template-management/lib/entities/category/category.entity.mjs +0 -262
  281. package/esm2022/text-template-management/lib/entities/category/category.module.mjs +0 -28
  282. package/esm2022/text-template-management/lib/entities/category/category.service.mjs +0 -17
  283. package/esm2022/text-template-management/lib/entities/category/category.types.mjs +0 -2
  284. package/esm2022/text-template-management/lib/entities/category/index.mjs +0 -5
  285. package/esm2022/text-template-management/lib/entities/index.mjs +0 -3
  286. package/esm2022/text-template-management/lib/entities/template/index.mjs +0 -5
  287. package/esm2022/text-template-management/lib/entities/template/template.entity.mjs +0 -405
  288. package/esm2022/text-template-management/lib/entities/template/template.module.mjs +0 -28
  289. package/esm2022/text-template-management/lib/entities/template/template.service.mjs +0 -17
  290. package/esm2022/text-template-management/lib/entities/template/template.types.mjs +0 -2
  291. package/esm2022/text-template-management/lib/entity.provider.mjs +0 -29
  292. package/esm2022/text-template-management/lib/menu.provider.mjs +0 -37
  293. package/esm2022/text-template-management/lib/setting.provider.mjs +0 -308
  294. package/esm2022/text-template-management/lib/text-template-management.module.mjs +0 -56
  295. package/fesm2022/acorex-modules-application-management-module-designer.component-B6WPz0N8.mjs.map +0 -1
  296. package/fesm2022/acorex-modules-auth-acorex-modules-auth-DQzSrtut.mjs.map +0 -1
  297. package/fesm2022/acorex-modules-auth-app-chooser.component-BFQgjqFV.mjs.map +0 -1
  298. package/fesm2022/acorex-modules-auth-blank.layout-Bq822Iz4.mjs.map +0 -1
  299. package/fesm2022/acorex-modules-auth-login.module-KR2dB8vW.mjs.map +0 -1
  300. package/fesm2022/acorex-modules-auth-master.layout-CU27gbWp.mjs +0 -38
  301. package/fesm2022/acorex-modules-auth-master.layout-CU27gbWp.mjs.map +0 -1
  302. package/fesm2022/acorex-modules-auth-password.component-9uIMNoQE.mjs.map +0 -1
  303. package/fesm2022/acorex-modules-auth-password.component-DpjEjw0o.mjs.map +0 -1
  304. package/fesm2022/acorex-modules-auth-tenant-chooser.component-6qDoCUBo.mjs.map +0 -1
  305. package/fesm2022/acorex-modules-auth-two-factor-code.component-BJKmvI7y.mjs.map +0 -1
  306. package/fesm2022/acorex-modules-auth-two-factor.module-Bnoi3ZXB.mjs.map +0 -1
  307. package/fesm2022/acorex-modules-form-template-management-designer.page-NhIPhsRs.mjs.map +0 -1
  308. package/platform-management/lib/common/common.source.d.ts +0 -4
@@ -0,0 +1,195 @@
1
+ import { AXPEntityQueryType, AXPEntityCommandScope } from '@acorex/platform/common';
2
+ import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
3
+ import { AXMFormTemplateManagementCategoryEntityService, AXMFormTemplateManagementModuleConst } from './acorex-modules-form-template-management.mjs';
4
+
5
+ async function factory(injector) {
6
+ const dataService = injector.get(AXMFormTemplateManagementCategoryEntityService);
7
+ const i18n = AXMFormTemplateManagementModuleConst.i18n;
8
+ const entityDef = {
9
+ module: AXMFormTemplateManagementModuleConst.moduleName,
10
+ name: AXMFormTemplateManagementModuleConst.categoryEntity,
11
+ source: '',
12
+ title: `t("category", { scope: "common" })`,
13
+ formats: {
14
+ individual: `t("category", { scope: "common" })`,
15
+ plural: `t("categories", { scope: "common" })`,
16
+ },
17
+ relatedEntities: [],
18
+ groups: [
19
+ {
20
+ id: 'section',
21
+ title: `t("category", { scope: "common" })`,
22
+ },
23
+ ],
24
+ properties: [
25
+ {
26
+ name: 'title',
27
+ title: 't("title", { scope: "common" })',
28
+ groupId: 'section',
29
+ schema: {
30
+ dataType: 'string',
31
+ interface: {
32
+ type: AXPWidgetsCatalog.text,
33
+ options: {
34
+ width: "400px"
35
+ }
36
+ },
37
+ },
38
+ validations: [
39
+ {
40
+ rule: 'required',
41
+ },
42
+ ],
43
+ },
44
+ ],
45
+ columns: [{ name: 'title' }],
46
+ commands: {
47
+ create: {
48
+ execute: async (data) => {
49
+ const res = await dataService.insertOne(data);
50
+ return { id: res };
51
+ },
52
+ },
53
+ delete: {
54
+ execute: async (id) => {
55
+ return await dataService.deleteOne(id);
56
+ },
57
+ },
58
+ update: {
59
+ execute: async (data) => {
60
+ return await dataService.updateOne(data.id, data);
61
+ },
62
+ },
63
+ },
64
+ queries: {
65
+ byKey: {
66
+ execute: async (id) => {
67
+ return await dataService.getOne(id);
68
+ },
69
+ type: AXPEntityQueryType.Single,
70
+ },
71
+ list: {
72
+ execute: async (e) => {
73
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });
74
+ },
75
+ type: AXPEntityQueryType.List,
76
+ },
77
+ },
78
+ interfaces: {
79
+ master: {
80
+ create: {
81
+ sections: [
82
+ {
83
+ id: 'section',
84
+ },
85
+ ],
86
+ properties: [
87
+ {
88
+ name: 'title',
89
+ layout: {
90
+ positions: {
91
+ lg: {
92
+ colSpan: 12,
93
+ },
94
+ },
95
+ },
96
+ },
97
+ ],
98
+ },
99
+ update: {
100
+ sections: [
101
+ {
102
+ id: 'section',
103
+ },
104
+ ],
105
+ properties: [
106
+ {
107
+ name: 'title',
108
+ layout: {
109
+ positions: {
110
+ lg: {
111
+ colSpan: 12,
112
+ },
113
+ },
114
+ },
115
+ },
116
+ ],
117
+ },
118
+ single: {
119
+ title: '{{title}}',
120
+ sections: [
121
+ {
122
+ id: 'section',
123
+ layout: {
124
+ positions: {
125
+ lg: {
126
+ colSpan: 12,
127
+ },
128
+ },
129
+ },
130
+ },
131
+ ],
132
+ properties: [
133
+ {
134
+ name: 'title',
135
+ layout: {
136
+ positions: {
137
+ lg: {
138
+ colSpan: 6,
139
+ },
140
+ },
141
+ },
142
+ },
143
+ ],
144
+ actions: [],
145
+ },
146
+ list: {
147
+ actions: [
148
+ {
149
+ title: `t("create", { scope: "common" })`,
150
+ command: 'create-entity',
151
+ priority: 'primary',
152
+ type: 'create',
153
+ scope: AXPEntityCommandScope.TypeLevel,
154
+ },
155
+ {
156
+ title: 't("deleteItems", { scope: "common" })',
157
+ command: 'delete-entity',
158
+ priority: 'primary',
159
+ type: 'delete',
160
+ scope: AXPEntityCommandScope.Selected,
161
+ },
162
+ {
163
+ title: 't("detail", { scope: "common" })',
164
+ command: 'open-entity',
165
+ priority: 'secondary',
166
+ type: 'view',
167
+ scope: AXPEntityCommandScope.Individual,
168
+ },
169
+ {
170
+ title: 't("delete", { scope: "common" })',
171
+ command: 'delete-entity',
172
+ priority: 'secondary',
173
+ type: 'delete',
174
+ scope: AXPEntityCommandScope.Individual,
175
+ },
176
+ ],
177
+ views: [
178
+ {
179
+ name: 'all',
180
+ title: 't("allItem", { scope: "common" })',
181
+ fixed: true,
182
+ columns: [],
183
+ conditions: [],
184
+ sorts: [],
185
+ },
186
+ ],
187
+ },
188
+ },
189
+ },
190
+ };
191
+ return entityDef;
192
+ }
193
+
194
+ export { factory };
195
+ //# sourceMappingURL=acorex-modules-form-template-management-category.entity-xUkZHVgy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-modules-form-template-management-category.entity-xUkZHVgy.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/entities/category/category.entity.ts"],"sourcesContent":["import { AXPEntity, AXPEntityCommandScope, AXPEntityQueryType } from '@acorex/platform/common';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { Injector } from '@angular/core';\n\nimport { AXMFormTemplateManagementModuleConst } from '../../const';\nimport { AXMFormTemplateManagementCategoryEntityService } from './category.service';\n\nexport async function factory(injector: Injector): Promise<AXPEntity | null> {\n const dataService = injector.get(AXMFormTemplateManagementCategoryEntityService);\n const i18n = AXMFormTemplateManagementModuleConst.i18n;\n\n const entityDef: AXPEntity = {\n module: AXMFormTemplateManagementModuleConst.moduleName,\n name: AXMFormTemplateManagementModuleConst.categoryEntity,\n source: '',\n title: `t(\"category\", { scope: \"common\" })`,\n formats: {\n individual: `t(\"category\", { scope: \"common\" })`,\n plural: `t(\"categories\", { scope: \"common\" })`,\n },\n relatedEntities: [],\n groups: [\n {\n id: 'section',\n title: `t(\"category\", { scope: \"common\" })`,\n },\n ],\n properties: [\n {\n name: 'title',\n title: 't(\"title\", { scope: \"common\" })',\n groupId: 'section',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.text,\n options: {\n width: \"400px\"\n }\n },\n },\n validations: [\n {\n rule: 'required',\n },\n ],\n },\n ],\n columns: [{ name: 'title' }],\n commands: {\n create: {\n execute: async (data: any) => {\n const res = await dataService.insertOne(data);\n return { id: res };\n },\n },\n delete: {\n execute: async (id: any) => {\n return await dataService.deleteOne(id);\n },\n },\n update: {\n execute: async (data: any) => {\n return await dataService.updateOne(data.id, data);\n },\n },\n },\n queries: {\n byKey: {\n execute: async (id: string) => {\n return await dataService.getOne(id);\n },\n type: AXPEntityQueryType.Single,\n },\n list: {\n execute: async (e: any) => {\n return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });\n },\n type: AXPEntityQueryType.List,\n },\n },\n interfaces: {\n master: {\n create: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n update: {\n sections: [\n {\n id: 'section',\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n },\n single: {\n title: '{{title}}',\n sections: [\n {\n id: 'section',\n layout: {\n positions: {\n lg: {\n colSpan: 12,\n },\n },\n },\n },\n ],\n properties: [\n {\n name: 'title',\n layout: {\n positions: {\n lg: {\n colSpan: 6,\n },\n },\n },\n },\n ],\n actions: [],\n },\n list: {\n actions: [\n {\n title: `t(\"create\", { scope: \"common\" })`,\n command: 'create-entity',\n priority: 'primary',\n type: 'create',\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n title: 't(\"deleteItems\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'primary',\n type: 'delete',\n scope: AXPEntityCommandScope.Selected,\n },\n {\n title: 't(\"detail\", { scope: \"common\" })',\n command: 'open-entity',\n priority: 'secondary',\n type: 'view',\n scope: AXPEntityCommandScope.Individual,\n },\n {\n title: 't(\"delete\", { scope: \"common\" })',\n command: 'delete-entity',\n priority: 'secondary',\n type: 'delete',\n scope: AXPEntityCommandScope.Individual,\n },\n ],\n views: [\n {\n name: 'all',\n title: 't(\"allItem\", { scope: \"common\" })',\n fixed: true,\n columns: [],\n conditions: [],\n sorts: [],\n },\n ],\n },\n },\n },\n };\n\n return entityDef;\n}\n"],"names":[],"mappings":";;;;AAOO,eAAe,OAAO,CAAC,QAAkB,EAAA;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,8CAA8C,CAAC;AAChF,IAAA,MAAM,IAAI,GAAG,oCAAoC,CAAC,IAAI;AAEtD,IAAA,MAAM,SAAS,GAAc;QAC3B,MAAM,EAAE,oCAAoC,CAAC,UAAU;QACvD,IAAI,EAAE,oCAAoC,CAAC,cAAc;AACzD,QAAA,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CAAC,QAAQ;AACtC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACD,wBAAA;AACE,4BAAA,KAAK,EAAE,kCAAkC;AACzC,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,QAAQ,EAAE,WAAW;AACrB,4BAAA,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,qBAAqB,CAAC,UAAU;AACxC,yBAAA;AACF,qBAAA;AACD,oBAAA,KAAK,EAAE;AACL,wBAAA;AACE,4BAAA,IAAI,EAAE,KAAK;AACX,4BAAA,KAAK,EAAE,mCAAmC;AAC1C,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,OAAO,EAAE,EAAE;AACX,4BAAA,UAAU,EAAE,EAAE;AACd,4BAAA,KAAK,EAAE,EAAE;AACV,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;;;;"}
@@ -13,12 +13,15 @@ class AXMFormTemplateManagementModuleDesignerPage {
13
13
  this.router = inject(ActivatedRoute);
14
14
  this.templateId = signal(this.router.snapshot.queryParams['id']);
15
15
  }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMFormTemplateManagementModuleDesignerPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXMFormTemplateManagementModuleDesignerPage, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<axp-layout-designer [id]=\"templateId()\"> </axp-layout-designer>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXPLayoutDesignerComponent, selector: "axp-layout-designer", inputs: ["id"] }] }); }
16
+ ngAfterViewInit() {
17
+ document.querySelector('html')?.classList.remove('ax-dark');
18
+ }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleDesignerPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFormTemplateManagementModuleDesignerPage, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<axp-layout-designer [id]=\"templateId()\"> </axp-layout-designer>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXPLayoutDesignerComponent, selector: "axp-layout-designer", inputs: ["id"] }] }); }
18
21
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMFormTemplateManagementModuleDesignerPage, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFormTemplateManagementModuleDesignerPage, decorators: [{
20
23
  type: Component,
21
- args: [{ standalone: true, imports: [
24
+ args: [{ imports: [
22
25
  CommonModule,
23
26
  AXDecoratorModule,
24
27
  AXPWidgetsModule,
@@ -29,4 +32,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
29
32
  }] });
30
33
 
31
34
  export { AXMFormTemplateManagementModuleDesignerPage };
32
- //# sourceMappingURL=acorex-modules-form-template-management-designer.page-NhIPhsRs.mjs.map
35
+ //# sourceMappingURL=acorex-modules-form-template-management-designer.page-BLbPLLdP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-modules-form-template-management-designer.page-BLbPLLdP.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/pages/designer/designer.page.ts","../../../../libs/modules/form-template-management/src/lib/pages/designer/designer.page.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';\nimport { AXPLayoutDesignerComponent } from '@acorex/platform/layout/designer';\nimport { AXPWidgetsModule } from '@acorex/platform/widgets';\nimport { CommonModule } from '@angular/common';\nimport { Component, inject, signal } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n templateUrl: 'designer.page.html',\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXPWidgetsModule,\n AXPLayoutBuilderModule,\n AXButtonModule,\n AXPLayoutDesignerComponent,\n ]\n})\nexport class AXMFormTemplateManagementModuleDesignerPage {\n private router = inject(ActivatedRoute);\n protected templateId = signal<string | null>(this.router.snapshot.queryParams['id']);\n\n ngAfterViewInit(): void {\n document.querySelector('html')?.classList.remove('ax-dark');\n }\n}\n","<axp-layout-designer [id]=\"templateId()\"> </axp-layout-designer>"],"names":[],"mappings":";;;;;;;;;;MAoBa,2CAA2C,CAAA;AAXxD,IAAA,WAAA,GAAA;AAYU,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAgB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAKrF;IAHC,eAAe,GAAA;AACb,QAAA,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;;8GALlD,2CAA2C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2CAA2C,ECpBxD,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,oEAAgE,EDYxD,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,EACZ,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAiB,EACjB,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,EAChB,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,sBAAsB,EACtB,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,cAAc,+BACd,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAGrB,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBAXvD,SAAS;AAEG,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACL,YAAY;wBACZ,iBAAiB;wBACjB,gBAAgB;wBAChB,sBAAsB;wBACtB,cAAc;wBACd,0BAA0B;AAC7B,qBAAA,EAAA,QAAA,EAAA,oEAAA,EAAA;;;;;"}
@@ -0,0 +1,123 @@
1
+ import * as i4 from '@acorex/components/button';
2
+ import { AXButtonModule } from '@acorex/components/button';
3
+ import * as i2 from '@acorex/components/common';
4
+ import { AXCommonModule } from '@acorex/components/common';
5
+ import * as i5 from '@acorex/components/decorators';
6
+ import { AXDecoratorModule } from '@acorex/components/decorators';
7
+ import { AXBasePageComponent } from '@acorex/components/page';
8
+ import * as i7 from '@acorex/components/search-box';
9
+ import { AXSearchBoxModule } from '@acorex/components/search-box';
10
+ import * as i6 from '@acorex/components/tabs';
11
+ import { AXTabsModule } from '@acorex/components/tabs';
12
+ import { AXPSettingsService, AXPStickyDirective } from '@acorex/platform/common';
13
+ import * as i1 from '@angular/common';
14
+ import { CommonModule } from '@angular/common';
15
+ import * as i0 from '@angular/core';
16
+ import { inject, model, signal, computed, Component, ViewEncapsulation } from '@angular/core';
17
+ import * as i3 from '@angular/forms';
18
+ import { FormsModule } from '@angular/forms';
19
+ import { orderBy } from 'lodash-es';
20
+
21
+ class AXPTemplateWidgetPickerComponent extends AXBasePageComponent {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.settingService = inject(AXPSettingsService);
25
+ this.pinnedSettingKey = 'forms:templates:picker:pinned';
26
+ this.searchTerm = model('');
27
+ // Signals
28
+ this.widgets = [];
29
+ this.displayWidgets = signal([]);
30
+ // Signal to track selected widgets
31
+ this.selectedWidgets = signal([]);
32
+ // Computed for filtered and ordered widget list
33
+ this.orderedList = computed(() => {
34
+ const search = this.searchTerm().toLowerCase();
35
+ const selectedTabName = this.selectedTab().name;
36
+ return orderBy(this.displayWidgets().filter((w) => {
37
+ const matchesTab = selectedTabName === 'all' || w.group.name === selectedTabName;
38
+ const matchesSearch = !search || w.title.toLowerCase().includes(search) || w.description?.toLowerCase().includes(search);
39
+ return matchesTab && matchesSearch;
40
+ }), ['pinned', 'title'], ['desc', 'asc']);
41
+ });
42
+ // Pinned and regular lists
43
+ this.pinnedList = computed(() => this.orderedList().filter((c) => c.pinned));
44
+ this.regularList = computed(() => this.orderedList().filter((c) => !c.pinned));
45
+ // Tabs for the widget groups
46
+ this.tabs = orderBy([{ name: 'all', title: 'All', order: 0 }, ...this.widgets.map(c => c.group)], (c) => c.order);
47
+ this.currentTabIndex = signal(0);
48
+ this.selectedTab = computed(() => this.tabs[this.currentTabIndex()]);
49
+ }
50
+ async ngOnInit() {
51
+ super.ngOnInit();
52
+ const pinnedWidgets = (await this.settingService.get(this.pinnedSettingKey)) || [];
53
+ this.displayWidgets.set(this.widgets.map((c) => ({ ...c, pinned: pinnedWidgets.includes(c.id), icon: c.icon ?? 'fa-solid fa-file-invoice' })));
54
+ }
55
+ handleTabChange(event) {
56
+ const indx = event.index;
57
+ if (this.currentTabIndex() != indx) {
58
+ this.currentTabIndex.set(indx);
59
+ }
60
+ }
61
+ handleClick(event, widget) {
62
+ if (event.ctrlKey) {
63
+ const currentSelection = this.selectedWidgets();
64
+ const isAlreadySelected = currentSelection.some((w) => w === widget);
65
+ if (isAlreadySelected) {
66
+ // Deselect widget if already selected
67
+ this.selectedWidgets.set(currentSelection.filter((w) => w !== widget));
68
+ }
69
+ else {
70
+ // Add widget to selection
71
+ this.selectedWidgets.set([...currentSelection, widget]);
72
+ }
73
+ }
74
+ else {
75
+ // If CTRL is not pressed, select only the clicked widget
76
+ this.close({ widgets: [widget] });
77
+ }
78
+ }
79
+ async handlePinClick(e, widget) {
80
+ e.stopPropagation();
81
+ widget.pinned = !widget.pinned;
82
+ // Get the current list of pinned widgets from settings
83
+ let pinnedWidgets = (await this.settingService.get(this.pinnedSettingKey)) || [];
84
+ // Update the list of pinned widgets based on the pinned status
85
+ if (widget.pinned) {
86
+ if (!pinnedWidgets.includes(widget.id)) {
87
+ pinnedWidgets.push(widget.id);
88
+ }
89
+ }
90
+ else {
91
+ pinnedWidgets = pinnedWidgets.filter((name) => name !== widget.id);
92
+ }
93
+ // Save the updated list of pinned widgets
94
+ await this.settingService.set(this.pinnedSettingKey, pinnedWidgets);
95
+ // Trigger a re-render of the widgets
96
+ this.displayWidgets.set([...this.displayWidgets()]);
97
+ }
98
+ // Check if a widget is selected
99
+ isWidgetSelected(widget) {
100
+ return this.selectedWidgets().includes(widget);
101
+ }
102
+ handleConfirmSelection() {
103
+ this.close({ widgets: this.selectedWidgets() });
104
+ }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
106
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetPickerComponent, isStandalone: true, selector: "ng-component", inputs: { searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchTerm: "searchTermChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col lg:ax-h-[75vh]\">\n <div>\n <ax-tabs [look]=\"'with-line'\" (onActiveTabChanged)=\"handleTabChange($event)\">\n @for(w of tabs;track $index)\n {\n <ax-tab-item [text]=\"w.title\" [key]=\"$index.toString()\"\n [active]=\"currentTabIndex() === $index\"></ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-overflow-auto\" #content>\n <div class=\"ax-p-4 ax-sticky ax-top-0 ax-z-10 ax-transition-all \" #sticky=\"axpSticky\"\n [axpSticky]=\"'ax-bg-surface ax-shadow-xl'\" [stickyParent]=\"content\" [stickyOffset]=\"10\">\n <ax-search-box look=\"fill\" placeholder=\"e.g. Button, Text, ...\" [(ngModel)]=\"searchTerm\" [delayTime]=\"300\"\n [axAutoFocus]=\"true\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n <div class=\"ax-flex ax-flex-col ax-p-4 ax-pt-0\">\n <ng-template #itemTpl let-w>\n <div (click)=\"handleClick($event,w)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-100 dark:hover:ax-bg-primary-800 ax-cursor-pointer\"\n [class.ax-bg-primary-100]=\"isWidgetSelected(w)\">\n <div class=\"ax-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border ax-border-neutral-200 ax-text-neutral-500 ax-bg-on-surface group-hover:ax-bg-primary-200\"\n [class.ax-bg-primary-200]=\"isWidgetSelected(w)\">\n <i [ngClass]=\"w.icon\" class=\"ax-text-lg group-hover:ax-text-primary-700 ax-text-on-surface-fore\"\n [class.ax-text-primary-700]=\"isWidgetSelected(w)\"></i>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <div class=\"ax-font-semibold ax-text-sm\">{{w.title}}</div>\n <div (click)=\"handlePinClick($event,w)\">\n @if (w.pinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45\"></i>\n }\n @else {\n <i\n class=\"fa-light fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45 ax-invisible group-hover:ax-visible\"></i>\n }\n </div>\n </div>\n <span class=\"ax-text-xs ax-text-neutral-400 ax-truncate\">\n {{w.description}}\n </span>\n </div>\n </div>\n </ng-template>\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2 \">\n @for(w of pinnedList();track $index)\n {\n <ng-container *ngTemplateOutlet=\"itemTpl;context:{ $implicit: w}\"></ng-container>\n }\n </div>\n @if(pinnedList().length)\n {\n <hr class=\"ax-my-4 ax-border-dashed\">\n }\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2 \">\n @for(w of regularList();track $index)\n {\n <ng-container *ngTemplateOutlet=\"itemTpl;context:{ $implicit: w}\"></ng-container>\n }\n </div>\n </div>\n </div>\n</div>\n@if(selectedWidgets().length)\n{\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"primary\" text=\"{{ selectedWidgets().length }} Selected\"\n (onClick)=\"handleConfirmSelection()\"></ax-button>\n </ax-suffix>\n</ax-footer>\n}", styles: [".selected-widget{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-primary-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-primary-100),var(--tw-bg-opacity, 1))}.selected-widget i{--tw-text-opacity: 1;color:rgba(var(--ax-color-primary-500),var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i2.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i5.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i6.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i6.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i7.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "directive", type: AXPStickyDirective, selector: "[axpSticky]", inputs: ["axpSticky", "stickyOffset", "stickyParent", "stickyTarget"], outputs: ["isStickyChange"], exportAs: ["axpSticky"] }], encapsulation: i0.ViewEncapsulation.None }); }
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetPickerComponent, decorators: [{
109
+ type: Component,
110
+ args: [{ imports: [
111
+ CommonModule,
112
+ AXCommonModule,
113
+ FormsModule,
114
+ AXButtonModule,
115
+ AXDecoratorModule,
116
+ AXTabsModule,
117
+ AXSearchBoxModule,
118
+ AXPStickyDirective,
119
+ ], encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-flex ax-flex-col lg:ax-h-[75vh]\">\n <div>\n <ax-tabs [look]=\"'with-line'\" (onActiveTabChanged)=\"handleTabChange($event)\">\n @for(w of tabs;track $index)\n {\n <ax-tab-item [text]=\"w.title\" [key]=\"$index.toString()\"\n [active]=\"currentTabIndex() === $index\"></ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-overflow-auto\" #content>\n <div class=\"ax-p-4 ax-sticky ax-top-0 ax-z-10 ax-transition-all \" #sticky=\"axpSticky\"\n [axpSticky]=\"'ax-bg-surface ax-shadow-xl'\" [stickyParent]=\"content\" [stickyOffset]=\"10\">\n <ax-search-box look=\"fill\" placeholder=\"e.g. Button, Text, ...\" [(ngModel)]=\"searchTerm\" [delayTime]=\"300\"\n [axAutoFocus]=\"true\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n <div class=\"ax-flex ax-flex-col ax-p-4 ax-pt-0\">\n <ng-template #itemTpl let-w>\n <div (click)=\"handleClick($event,w)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-100 dark:hover:ax-bg-primary-800 ax-cursor-pointer\"\n [class.ax-bg-primary-100]=\"isWidgetSelected(w)\">\n <div class=\"ax-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border ax-border-neutral-200 ax-text-neutral-500 ax-bg-on-surface group-hover:ax-bg-primary-200\"\n [class.ax-bg-primary-200]=\"isWidgetSelected(w)\">\n <i [ngClass]=\"w.icon\" class=\"ax-text-lg group-hover:ax-text-primary-700 ax-text-on-surface-fore\"\n [class.ax-text-primary-700]=\"isWidgetSelected(w)\"></i>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <div class=\"ax-font-semibold ax-text-sm\">{{w.title}}</div>\n <div (click)=\"handlePinClick($event,w)\">\n @if (w.pinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45\"></i>\n }\n @else {\n <i\n class=\"fa-light fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45 ax-invisible group-hover:ax-visible\"></i>\n }\n </div>\n </div>\n <span class=\"ax-text-xs ax-text-neutral-400 ax-truncate\">\n {{w.description}}\n </span>\n </div>\n </div>\n </ng-template>\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2 \">\n @for(w of pinnedList();track $index)\n {\n <ng-container *ngTemplateOutlet=\"itemTpl;context:{ $implicit: w}\"></ng-container>\n }\n </div>\n @if(pinnedList().length)\n {\n <hr class=\"ax-my-4 ax-border-dashed\">\n }\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2 \">\n @for(w of regularList();track $index)\n {\n <ng-container *ngTemplateOutlet=\"itemTpl;context:{ $implicit: w}\"></ng-container>\n }\n </div>\n </div>\n </div>\n</div>\n@if(selectedWidgets().length)\n{\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"primary\" text=\"{{ selectedWidgets().length }} Selected\"\n (onClick)=\"handleConfirmSelection()\"></ax-button>\n </ax-suffix>\n</ax-footer>\n}", styles: [".selected-widget{border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-color-primary-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-primary-100),var(--tw-bg-opacity, 1))}.selected-widget i{--tw-text-opacity: 1;color:rgba(var(--ax-color-primary-500),var(--tw-text-opacity, 1))}\n"] }]
120
+ }] });
121
+
122
+ export { AXPTemplateWidgetPickerComponent };
123
+ //# sourceMappingURL=acorex-modules-form-template-management-template-picker.component-D_FkgF0W.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-modules-form-template-management-template-picker.component-D_FkgF0W.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/components/widgets/template/template-picker/template-picker.component.ts","../../../../libs/modules/form-template-management/src/lib/components/widgets/template/template-picker/template-picker.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXSearchBoxModule } from '@acorex/components/search-box';\nimport { AXTabsModule, AXTabStripChangedEvent } from '@acorex/components/tabs';\nimport { AXPSettingsService, AXPStickyDirective } from '@acorex/platform/common';\nimport { AXPWidgetGroup } from '@acorex/platform/layout/builder';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, inject, model, signal, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { orderBy } from 'lodash-es';\nimport { AXPTemplateWidgetListItem } from '../template.provider';\n\nexport interface AXPDisplayWidgetProvided extends AXPTemplateWidgetListItem {\n pinned: boolean;\n}\n\n@Component({\n imports: [\n CommonModule,\n AXCommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n AXTabsModule,\n AXSearchBoxModule,\n AXPStickyDirective,\n ],\n templateUrl: './template-picker.component.html',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./template-picker.component.scss']\n})\nexport class AXPTemplateWidgetPickerComponent extends AXBasePageComponent {\n private settingService = inject(AXPSettingsService);\n\n private readonly pinnedSettingKey = 'forms:templates:picker:pinned';\n\n protected searchTerm = model('');\n\n // Signals\n private widgets: AXPDisplayWidgetProvided[] = [];\n private displayWidgets = signal<AXPDisplayWidgetProvided[]>([]);\n\n // Signal to track selected widgets\n protected selectedWidgets = signal<AXPDisplayWidgetProvided[]>([]);\n\n // Computed for filtered and ordered widget list\n private orderedList = computed(() => {\n const search = this.searchTerm().toLowerCase();\n const selectedTabName = this.selectedTab().name;\n\n return orderBy(\n this.displayWidgets().filter((w) => {\n const matchesTab = selectedTabName === 'all' || w.group.name === selectedTabName;\n const matchesSearch =\n !search || w.title.toLowerCase().includes(search) || w.description?.toLowerCase().includes(search);\n return matchesTab && matchesSearch;\n }),\n ['pinned', 'title'],\n ['desc', 'asc']\n );\n });\n\n // Pinned and regular lists\n protected pinnedList = computed(() => this.orderedList().filter((c) => c.pinned));\n protected regularList = computed(() => this.orderedList().filter((c) => !c.pinned));\n\n // Tabs for the widget groups\n protected tabs: AXPWidgetGroup[] = orderBy(\n [{ name: 'all', title: 'All', order: 0 }, ...this.widgets.map(c => c.group)],\n (c) => c.order\n );\n protected currentTabIndex = signal(0);\n protected selectedTab = computed(() => this.tabs[this.currentTabIndex()]);\n\n protected override async ngOnInit() {\n super.ngOnInit();\n const pinnedWidgets = (await this.settingService.get<string[]>(this.pinnedSettingKey)) || [];\n this.displayWidgets.set(this.widgets.map((c) => ({ ...c, pinned: pinnedWidgets.includes(c.id), icon: c.icon ?? 'fa-solid fa-file-invoice' })));\n }\n\n protected handleTabChange(event: AXTabStripChangedEvent): void {\n const indx = event.index;\n if (this.currentTabIndex() != indx) {\n this.currentTabIndex.set(indx);\n }\n }\n\n protected handleClick(event: MouseEvent, widget: AXPDisplayWidgetProvided) {\n if (event.ctrlKey) {\n const currentSelection = this.selectedWidgets();\n const isAlreadySelected = currentSelection.some((w) => w === widget);\n\n if (isAlreadySelected) {\n // Deselect widget if already selected\n this.selectedWidgets.set(currentSelection.filter((w) => w !== widget));\n } else {\n // Add widget to selection\n this.selectedWidgets.set([...currentSelection, widget]);\n }\n } else {\n // If CTRL is not pressed, select only the clicked widget\n this.close({ widgets: [widget] });\n }\n }\n\n protected async handlePinClick(e: MouseEvent, widget: AXPDisplayWidgetProvided) {\n e.stopPropagation();\n widget.pinned = !widget.pinned;\n // Get the current list of pinned widgets from settings\n let pinnedWidgets = (await this.settingService.get<string[]>(this.pinnedSettingKey)) || [];\n\n // Update the list of pinned widgets based on the pinned status\n if (widget.pinned) {\n if (!pinnedWidgets.includes(widget.id)) {\n pinnedWidgets.push(widget.id);\n }\n } else {\n pinnedWidgets = pinnedWidgets.filter((name) => name !== widget.id);\n }\n\n // Save the updated list of pinned widgets\n await this.settingService.set(this.pinnedSettingKey, pinnedWidgets);\n\n // Trigger a re-render of the widgets\n this.displayWidgets.set([...this.displayWidgets()]);\n }\n\n // Check if a widget is selected\n protected isWidgetSelected(widget: AXPDisplayWidgetProvided): boolean {\n return this.selectedWidgets().includes(widget);\n }\n\n protected handleConfirmSelection(): void {\n this.close({ widgets: this.selectedWidgets() });\n }\n}\n","<div class=\"ax-flex ax-flex-col lg:ax-h-[75vh]\">\n <div>\n <ax-tabs [look]=\"'with-line'\" (onActiveTabChanged)=\"handleTabChange($event)\">\n @for(w of tabs;track $index)\n {\n <ax-tab-item [text]=\"w.title\" [key]=\"$index.toString()\"\n [active]=\"currentTabIndex() === $index\"></ax-tab-item>\n }\n </ax-tabs>\n </div>\n <div class=\"ax-overflow-auto\" #content>\n <div class=\"ax-p-4 ax-sticky ax-top-0 ax-z-10 ax-transition-all \" #sticky=\"axpSticky\"\n [axpSticky]=\"'ax-bg-surface ax-shadow-xl'\" [stickyParent]=\"content\" [stickyOffset]=\"10\">\n <ax-search-box look=\"fill\" placeholder=\"e.g. Button, Text, ...\" [(ngModel)]=\"searchTerm\" [delayTime]=\"300\"\n [axAutoFocus]=\"true\">\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n <div class=\"ax-flex ax-flex-col ax-p-4 ax-pt-0\">\n <ng-template #itemTpl let-w>\n <div (click)=\"handleClick($event,w)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-100 dark:hover:ax-bg-primary-800 ax-cursor-pointer\"\n [class.ax-bg-primary-100]=\"isWidgetSelected(w)\">\n <div class=\"ax-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border ax-border-neutral-200 ax-text-neutral-500 ax-bg-on-surface group-hover:ax-bg-primary-200\"\n [class.ax-bg-primary-200]=\"isWidgetSelected(w)\">\n <i [ngClass]=\"w.icon\" class=\"ax-text-lg group-hover:ax-text-primary-700 ax-text-on-surface-fore\"\n [class.ax-text-primary-700]=\"isWidgetSelected(w)\"></i>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <div class=\"ax-font-semibold ax-text-sm\">{{w.title}}</div>\n <div (click)=\"handlePinClick($event,w)\">\n @if (w.pinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45\"></i>\n }\n @else {\n <i\n class=\"fa-light fa-thumbtack ax-text-sm ax-text-neutral-500 ax-rotate-45 ax-invisible group-hover:ax-visible\"></i>\n }\n </div>\n </div>\n <span class=\"ax-text-xs ax-text-neutral-400 ax-truncate\">\n {{w.description}}\n </span>\n </div>\n </div>\n </ng-template>\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2 \">\n @for(w of pinnedList();track $index)\n {\n <ng-container *ngTemplateOutlet=\"itemTpl;context:{ $implicit: w}\"></ng-container>\n }\n </div>\n @if(pinnedList().length)\n {\n <hr class=\"ax-my-4 ax-border-dashed\">\n }\n <div class=\"ax-grid ax-grid-cols-2 ax-gap-2 \">\n @for(w of regularList();track $index)\n {\n <ng-container *ngTemplateOutlet=\"itemTpl;context:{ $implicit: w}\"></ng-container>\n }\n </div>\n </div>\n </div>\n</div>\n@if(selectedWidgets().length)\n{\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" color=\"primary\" text=\"{{ selectedWidgets().length }} Selected\"\n (onClick)=\"handleConfirmSelection()\"></ax-button>\n </ax-suffix>\n</ax-footer>\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAiCM,MAAO,gCAAiC,SAAQ,mBAAmB,CAAA;AAfzE,IAAA,WAAA,GAAA;;AAgBU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAElC,IAAgB,CAAA,gBAAA,GAAG,+BAA+B;AAEzD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;;QAGxB,IAAO,CAAA,OAAA,GAA+B,EAAE;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAA6B,EAAE,CAAC;;AAGrD,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAA6B,EAAE,CAAC;;AAG1D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;YAClC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,EAAE;YAC9C,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI;AAE/C,YAAA,OAAO,OAAO,CACZ,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAI;AACjC,gBAAA,MAAM,UAAU,GAAG,eAAe,KAAK,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe;AAChF,gBAAA,MAAM,aAAa,GACjB,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC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eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,SAAA,EAAA,QAAA,EAAA,SAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAiB,4XACjB,kBAAkB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,cAAA,EAAA,cAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAMb,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAf5C,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACL,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,cAAc;wBACd,iBAAiB;wBACjB,YAAY;wBACZ,iBAAiB;wBACjB,kBAAkB;qBACrB,EAEc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,k1HAAA,EAAA,MAAA,EAAA,CAAA,gVAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,111 @@
1
+ import * as i3 from '@acorex/core/translation';
2
+ import { AXTranslationModule } from '@acorex/core/translation';
3
+ import * as i2 from '@acorex/platform/layout/builder';
4
+ import { AXPWidgetComponent, AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
5
+ import * as i1 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import * as i0 from '@angular/core';
8
+ import { inject, computed, signal, effect, Component, ChangeDetectionStrategy } from '@angular/core';
9
+ import { get, set } from 'lodash-es';
10
+ import { AXPTemplateWidgetProviderService } from './acorex-modules-form-template-management.mjs';
11
+
12
+ class AXPTemplateWidgetEditComponent extends AXPWidgetComponent {
13
+ constructor() {
14
+ super();
15
+ this.metaKey = '__meta__';
16
+ this.templateProvider = inject(AXPTemplateWidgetProviderService);
17
+ this.templateId = computed(() => this.options()['templateId']);
18
+ this.nodes = signal([]);
19
+ //
20
+ effect(async () => {
21
+ this.nodes.set([]);
22
+ const value = this.getValue();
23
+ const templateId = get(value, `${this.metaKey}.templateId`) ?? this.templateId();
24
+ if (templateId) {
25
+ const item = await this.templateProvider.get(templateId);
26
+ if (item) {
27
+ this.nodes.set(item.nodes);
28
+ }
29
+ }
30
+ });
31
+ }
32
+ async handleSelectClick() {
33
+ const result = await this.templateProvider.chooseTemplate();
34
+ if (result) {
35
+ this.setOptions({ templateId: result.id });
36
+ const value = this.getValue() ?? {};
37
+ set(value, this.metaKey, { templateId: result.id });
38
+ this.setValue(value);
39
+ }
40
+ }
41
+ async handleRemoveClick() {
42
+ this.setOptions({ templateId: null });
43
+ this.setValue(null);
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTemplateWidgetEditComponent, isStandalone: true, selector: "axp-template-widget-edit", usesInheritance: true, ngImport: i0, template: `
47
+ @if(nodes()) {
48
+ <ng-container>
49
+ @for (node of nodes(); track $index) {
50
+ <ng-container axp-widget-renderer
51
+ [node]="node"
52
+ [parentNode]="this"
53
+ [mode]="this.mode"
54
+ >
55
+ </ng-container>
56
+ }
57
+ <div
58
+ class="ax-text-danger-500 hover:ax-text-danger-800 ax-mt-2 ax-text-xs ax-cursor-pointer"
59
+ (click)="handleRemoveClick()"
60
+ >
61
+ {{ 'remove-template' | translate : { scope: 'form-template-management' } | async }}
62
+ </div>
63
+ </ng-container>
64
+ } @else {
65
+ <span
66
+ class="ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer"
67
+ (click)="handleSelectClick()"
68
+ >
69
+ {{ 'choose-template' | translate : { scope: 'form-template-management' } | async }}
70
+ </span>
71
+ }
72
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
73
+ }
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTemplateWidgetEditComponent, decorators: [{
75
+ type: Component,
76
+ args: [{
77
+ selector: 'axp-template-widget-edit',
78
+ template: `
79
+ @if(nodes()) {
80
+ <ng-container>
81
+ @for (node of nodes(); track $index) {
82
+ <ng-container axp-widget-renderer
83
+ [node]="node"
84
+ [parentNode]="this"
85
+ [mode]="this.mode"
86
+ >
87
+ </ng-container>
88
+ }
89
+ <div
90
+ class="ax-text-danger-500 hover:ax-text-danger-800 ax-mt-2 ax-text-xs ax-cursor-pointer"
91
+ (click)="handleRemoveClick()"
92
+ >
93
+ {{ 'remove-template' | translate : { scope: 'form-template-management' } | async }}
94
+ </div>
95
+ </ng-container>
96
+ } @else {
97
+ <span
98
+ class="ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer"
99
+ (click)="handleSelectClick()"
100
+ >
101
+ {{ 'choose-template' | translate : { scope: 'form-template-management' } | async }}
102
+ </span>
103
+ }
104
+ `,
105
+ changeDetection: ChangeDetectionStrategy.OnPush,
106
+ imports: [CommonModule, AXPLayoutBuilderModule, AXTranslationModule]
107
+ }]
108
+ }], ctorParameters: () => [] });
109
+
110
+ export { AXPTemplateWidgetEditComponent };
111
+ //# sourceMappingURL=acorex-modules-form-template-management-template-widget-edit.component-Bgx5YRBc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-modules-form-template-management-template-widget-edit.component-Bgx5YRBc.mjs","sources":["../../../../libs/modules/form-template-management/src/lib/components/widgets/template/template-widget-edit.component.ts"],"sourcesContent":["import { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLayoutBuilderModule, AXPWidgetComponent, AXPWidgetNode } from '@acorex/platform/layout/builder';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { get, set } from 'lodash-es';\nimport { AXPTemplateWidgetProviderService } from './template.provider';\n\n@Component({\n selector: 'axp-template-widget-edit',\n template: `\n @if(nodes()) {\n <ng-container>\n @for (node of nodes(); track $index) {\n <ng-container axp-widget-renderer\n [node]=\"node\"\n [parentNode]=\"this\"\n [mode]=\"this.mode\"\n >\n </ng-container>\n }\n <div\n class=\"ax-text-danger-500 hover:ax-text-danger-800 ax-mt-2 ax-text-xs ax-cursor-pointer\"\n (click)=\"handleRemoveClick()\"\n >\n {{ 'remove-template' | translate : { scope: 'form-template-management' } | async }}\n </div>\n </ng-container>\n } @else {\n <span\n class=\"ax-underline ax-decoration-dotted ax-underline-offset-8 hover:ax-text-primary-500 ax-cursor-pointer\"\n (click)=\"handleSelectClick()\"\n >\n {{ 'choose-template' | translate : { scope: 'form-template-management' } | async }}\n </span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXPLayoutBuilderModule, AXTranslationModule]\n})\nexport class AXPTemplateWidgetEditComponent extends AXPWidgetComponent<any> {\n private metaKey = '__meta__';\n\n private templateProvider = inject(AXPTemplateWidgetProviderService);\n protected templateId = computed<string>(() => this.options()['templateId'] as string);\n protected nodes = signal<AXPWidgetNode[]>([]);\n\n constructor() {\n super();\n //\n effect(\n async () => {\n this.nodes.set([]);\n const value = this.getValue();\n const templateId = get(value, `${this.metaKey}.templateId`) ?? this.templateId();\n if (templateId) {\n const item = await this.templateProvider.get(templateId);\n if (item) {\n this.nodes.set(item.nodes);\n }\n }\n }\n );\n }\n\n protected async handleSelectClick() {\n const result = await this.templateProvider.chooseTemplate();\n if (result) {\n this.setOptions({ templateId: result.id });\n const value = this.getValue() ?? {};\n set(value, this.metaKey, { templateId: result.id });\n this.setValue(value);\n }\n }\n\n protected async handleRemoveClick() {\n this.setOptions({ templateId: null });\n this.setValue(null);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAuCM,MAAO,8BAA+B,SAAQ,kBAAuB,CAAA;AAOzE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAPD,IAAO,CAAA,OAAA,GAAG,UAAU;AAEpB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAS,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAW,CAAC;AAC3E,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAkB,EAAE,CAAC;;QAK3C,MAAM,CACJ,YAAW;AACT,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AAClB,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;AAC7B,YAAA,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,EAAE,CAAG,EAAA,IAAI,CAAC,OAAO,aAAa,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE;YAChF,I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