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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/auth/lib/application/application.types.d.ts +1 -1
  2. package/auth/lib/tenant/tenant.types.d.ts +1 -1
  3. package/common/index.d.ts +1 -0
  4. package/common/lib/app/application.types.d.ts +1 -1
  5. package/common/lib/app/index.d.ts +1 -0
  6. package/common/lib/configs/app.config.d.ts +1 -1
  7. package/common/lib/home-page/home-page-settings.key.d.ts +3 -0
  8. package/common/lib/home-page/home-page-settings.provider.d.ts +12 -0
  9. package/common/lib/home-page/home-page.module.d.ts +6 -0
  10. package/common/lib/home-page/home-page.routes.d.ts +2 -0
  11. package/common/lib/home-page/home-page.service.d.ts +24 -0
  12. package/common/lib/home-page/home-page.types.d.ts +9 -0
  13. package/common/lib/home-page/index.d.ts +4 -0
  14. package/common/lib/layout/logo/index.d.ts +0 -1
  15. package/common/lib/settings/setting.builder.d.ts +1 -1
  16. package/common/lib/settings/settings.types.d.ts +1 -1
  17. package/common/lib/workflows/navigate.workflow.d.ts +1 -1
  18. package/core/lib/data/data-generator.d.ts +2 -1
  19. package/core/lib/directives/grid-layout.directive.d.ts +15 -0
  20. package/core/lib/directives/index.d.ts +1 -0
  21. package/core/lib/expression-evaluator/expression-evaluator.service.d.ts +1 -2
  22. package/core/lib/types/core.types.d.ts +1 -0
  23. package/core/lib/types/index.d.ts +5 -3
  24. package/core/lib/types/interactive.types.d.ts +1 -0
  25. package/core/lib/types/layout.types.d.ts +27 -0
  26. package/core/lib/types/validation.types.d.ts +30 -1
  27. package/core/lib/utils/object-util.d.ts +1 -0
  28. package/fesm2022/acorex-platform-auth.mjs +0 -1
  29. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  30. package/fesm2022/acorex-platform-common.mjs +1559 -1396
  31. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  32. package/fesm2022/acorex-platform-core.mjs +247 -121
  33. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-layout-builder.mjs +438 -401
  35. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  36. package/fesm2022/acorex-platform-layout-designer.mjs +10 -10
  37. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  38. package/fesm2022/acorex-platform-layout-entity.mjs +107 -90
  39. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  40. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs → acorex-platform-themes-default-entity-master-create-view.component-CnqS3y7P.mjs} +5 -5
  41. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-CnqS3y7P.mjs.map} +1 -1
  42. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs +862 -0
  43. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs.map +1 -0
  44. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs → acorex-platform-themes-default-entity-master-modify-view.component-DzHZdi2R.mjs} +4 -4
  45. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DzHZdi2R.mjs.map +1 -0
  46. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs → acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs} +15 -8
  47. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs.map +1 -0
  48. package/fesm2022/{acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs → acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs} +8 -8
  49. package/fesm2022/{acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs.map → acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs.map} +1 -1
  50. package/fesm2022/{acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs → acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs} +4 -4
  51. package/fesm2022/{acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs.map → acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs.map} +1 -1
  52. package/fesm2022/{acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs → acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs} +5 -5
  53. package/fesm2022/{acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs.map → acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs.map} +1 -1
  54. package/fesm2022/acorex-platform-themes-default.mjs +295 -65
  55. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  56. package/fesm2022/{acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs → acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs} +1 -1
  57. package/fesm2022/acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-themes-shared.mjs +10 -8
  59. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  60. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-DVhi_mBH.mjs → acorex-platform-widgets-button-widget-designer.component-DSO0iNB_.mjs} +3 -3
  61. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-DSO0iNB_.mjs.map +1 -0
  62. package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-CrdfTgeq.mjs → acorex-platform-widgets-checkbox-widget-designer.component-DDIkt5nB.mjs} +3 -3
  63. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-DDIkt5nB.mjs.map +1 -0
  64. package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-DfSoF52n.mjs → acorex-platform-widgets-checkbox-widget-view.component-CqHkVcv-.mjs} +3 -3
  65. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-CqHkVcv-.mjs.map +1 -0
  66. package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-BM1G-WaN.mjs → acorex-platform-widgets-color-box-widget-designer.component-l_Of5uKT.mjs} +3 -3
  67. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-l_Of5uKT.mjs.map +1 -0
  68. package/fesm2022/{acorex-platform-widgets-contact-widget-filter.component-B1cKV-TM.mjs → acorex-platform-widgets-contact-widget-filter.component-KvKD5byB.mjs} +3 -3
  69. package/fesm2022/acorex-platform-widgets-contact-widget-filter.component-KvKD5byB.mjs.map +1 -0
  70. package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DtwyOnuO.mjs → acorex-platform-widgets-page-widget-designer.component-BIvAjvW3.mjs} +5 -5
  71. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-BIvAjvW3.mjs.map +1 -0
  72. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-u2RCVYRB.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs} +2 -2
  73. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-u2RCVYRB.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs.map} +1 -1
  74. package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-C3H0Zldz.mjs → acorex-platform-widgets-text-block-widget-designer.component-DPy2UR_J.mjs} +3 -3
  75. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-DPy2UR_J.mjs.map +1 -0
  76. package/fesm2022/acorex-platform-widgets.mjs +1832 -1490
  77. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  78. package/layout/builder/lib/builder/index.d.ts +2 -0
  79. package/layout/builder/lib/builder/view.types.d.ts +94 -0
  80. package/layout/builder/lib/builder/widget-base.component.d.ts +112 -0
  81. package/layout/builder/lib/builder/widget-map.d.ts +3 -0
  82. package/layout/builder/lib/builder/widget-renderer.directive.d.ts +12 -3
  83. package/layout/builder/lib/builder/widget.types.d.ts +9 -101
  84. package/layout/designer/lib/designer/shared/designer.service.d.ts +2 -2
  85. package/layout/designer/lib/designer/shared/widget-designer-renderer.directive.d.ts +2 -2
  86. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -2
  87. package/layout/entity/lib/entity-master-single.viewmodel.d.ts +4 -2
  88. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +6 -5
  89. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-view.component.d.ts +2 -2
  90. package/layout/entity/lib/widgets/lookup-widget/lookup-widget.config.d.ts +7 -0
  91. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-column.component.d.ts +2 -2
  92. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-edit.component.d.ts +2 -2
  93. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-filter.component.d.ts +2 -2
  94. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-print.component.d.ts +2 -2
  95. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-view.component.d.ts +2 -2
  96. package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-edit.component.d.ts +2 -2
  97. package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-view.component.d.ts +2 -2
  98. package/package.json +1 -1
  99. package/themes/default/index.d.ts +1 -0
  100. package/themes/default/lib/layouts/base/base-page.component.d.ts +9 -4
  101. package/themes/default/lib/layouts/base/base-page.types.d.ts +3 -2
  102. package/themes/default/lib/layouts/base/page-layout/page-layout.component.d.ts +9 -2
  103. package/themes/default/lib/layouts/entity-layouts/entity-category/entity-category.component.d.ts +10 -4
  104. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +3 -1
  105. package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +2 -1
  106. package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/entity-master-toolbar-view.component.d.ts +62 -0
  107. package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/views/entity-view-toolbar.component.d.ts +4 -1
  108. package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +3 -3
  109. package/themes/default/lib/layouts/root-layout/horizontal/horizontal-layout.component.d.ts +3 -3
  110. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +4 -1
  111. package/themes/default/lib/layouts/root-layout/vertical/vertical-layout.component.d.ts +3 -3
  112. package/themes/default/lib/layouts/view-layouts/index.d.ts +1 -0
  113. package/themes/default/lib/layouts/view-layouts/layout-detail-view/layout-detail-view.component.d.ts +19 -0
  114. package/themes/shared/index.d.ts +1 -1
  115. package/themes/shared/lib/components/layout-elements/layout-side.component.d.ts +1 -1
  116. package/themes/shared/lib/widgets/font-size-chooser/font-size-chooser-widget.component.d.ts +2 -2
  117. package/themes/shared/lib/widgets/font-style-chooser/font-style-chooser-widget.component.d.ts +2 -2
  118. package/themes/shared/lib/widgets/menu-orientation-chooser/menu-orientation-chooser-widget.component.d.ts +2 -2
  119. package/themes/shared/lib/widgets/theme-mode-chooser/theme-mode-chooser-widget.component.d.ts +2 -2
  120. package/themes/shared/lib/widgets/theme-palette-chooser/theme-palette-chooser-widget.component.d.ts +2 -2
  121. package/widgets/lib/properties/layout.props.d.ts +0 -6
  122. package/widgets/lib/widgets/actions/button/button-widget-designer.component.d.ts +2 -2
  123. package/widgets/lib/widgets/actions/button/button-widget-view.component.d.ts +2 -2
  124. package/widgets/lib/widgets/advance/avatar/avatar-widget-designer.component.d.ts +2 -2
  125. package/widgets/lib/widgets/advance/avatar/avatar-widget-edit.component.d.ts +2 -2
  126. package/widgets/lib/widgets/advance/avatar/avatar-widget-print.component.d.ts +2 -2
  127. package/widgets/lib/widgets/advance/avatar/avatar-widget-view.component.d.ts +2 -2
  128. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-designer.component.d.ts +2 -2
  129. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-edit.component.d.ts +2 -2
  130. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-filter.component.d.ts +2 -2
  131. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-print.component.d.ts +2 -2
  132. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-view.component.d.ts +2 -2
  133. package/widgets/lib/widgets/advance/file/file-box-widget-column.component.d.ts +2 -2
  134. package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +2 -2
  135. package/widgets/lib/widgets/advance/file/file-box-widget-filter.component.d.ts +2 -2
  136. package/widgets/lib/widgets/advance/file/file-box-widget-print.component.d.ts +2 -2
  137. package/widgets/lib/widgets/advance/file/file-box-widget-view.component.d.ts +2 -2
  138. package/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.d.ts +2 -2
  139. package/widgets/lib/widgets/advance/gallery/gallery-widget-print.component.d.ts +2 -2
  140. package/widgets/lib/widgets/advance/gallery/gallery-widget-view.component.d.ts +2 -2
  141. package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +2 -2
  142. package/widgets/lib/widgets/advance/map/map-box-widget-view.component.d.ts +2 -2
  143. package/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.d.ts +2 -2
  144. package/widgets/lib/widgets/advance/signature/signature-pad-widget-column.component.d.ts +2 -2
  145. package/widgets/lib/widgets/advance/signature/signature-pad-widget-edit.component.d.ts +2 -2
  146. package/widgets/lib/widgets/advance/signature/signature-pad-widget-filter.component.d.ts +2 -2
  147. package/widgets/lib/widgets/advance/signature/signature-pad-widget-print.component.d.ts +2 -2
  148. package/widgets/lib/widgets/advance/signature/signature-pad-widget-view.component.d.ts +2 -2
  149. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +13 -24
  150. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +2 -7
  151. package/widgets/lib/widgets/charts/chart.type.d.ts +1 -5
  152. package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.component.d.ts +2 -2
  153. package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.component.d.ts +25 -21
  154. package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +52 -23
  155. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.component.d.ts +21 -7
  156. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +1 -8
  157. package/widgets/lib/widgets/charts/notification/index.d.ts +3 -0
  158. package/widgets/lib/widgets/charts/notification/notification-widget.component.d.ts +54 -0
  159. package/widgets/lib/widgets/charts/notification/notification-widget.config.d.ts +10 -0
  160. package/widgets/lib/widgets/charts/notification/notification.type.d.ts +47 -0
  161. package/widgets/lib/widgets/charts/shared/chart-base.component.d.ts +4 -4
  162. package/widgets/lib/widgets/charts/shared/components/chart-tooltip/chart-tooltip.component.d.ts +28 -0
  163. package/widgets/lib/widgets/charts/shared/components/chart-tooltip/index.d.ts +1 -0
  164. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.component.d.ts +10 -6
  165. package/widgets/lib/widgets/charts/tasklist/index.d.ts +3 -0
  166. package/widgets/lib/widgets/charts/tasklist/tasklist-widget.component.d.ts +34 -0
  167. package/widgets/lib/widgets/charts/tasklist/tasklist-widget.config.d.ts +7 -0
  168. package/widgets/lib/widgets/charts/tasklist/tasklist.type.d.ts +36 -0
  169. package/widgets/lib/widgets/charts/weather/weather-widget.component.d.ts +2 -2
  170. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-designer.component.d.ts +2 -2
  171. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.d.ts +2 -2
  172. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-view.component.d.ts +2 -2
  173. package/widgets/lib/widgets/editors/checkbox/checkbox-widget.config.d.ts +7 -0
  174. package/widgets/lib/widgets/editors/color/color-box-widget-designer.component.d.ts +2 -2
  175. package/widgets/lib/widgets/editors/color/color-box-widget-edit.component.d.ts +2 -2
  176. package/widgets/lib/widgets/editors/color/color-box-widget-filter.component.d.ts +2 -2
  177. package/widgets/lib/widgets/editors/color/color-box-widget-print.component.d.ts +2 -2
  178. package/widgets/lib/widgets/editors/color/color-box-widget-view.component.d.ts +2 -2
  179. package/widgets/lib/widgets/editors/color/color-box-widget.config.d.ts +7 -0
  180. package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +2 -2
  181. package/widgets/lib/widgets/editors/contact/contact-widget-filter.component.d.ts +2 -2
  182. package/widgets/lib/widgets/editors/contact/contact-widget-print.component.d.ts +2 -2
  183. package/widgets/lib/widgets/editors/contact/contact-widget-view.component.d.ts +2 -2
  184. package/widgets/lib/widgets/editors/contact/contact-widget.config.d.ts +9 -0
  185. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +2 -2
  186. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-filter.component.d.ts +2 -2
  187. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-print.component.d.ts +2 -2
  188. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-view.component.d.ts +2 -2
  189. package/widgets/lib/widgets/editors/date-time/date-time-box-widget.config.d.ts +8 -0
  190. package/widgets/lib/widgets/editors/email/email-box-widget-edit.component.d.ts +2 -2
  191. package/widgets/lib/widgets/editors/email/email-box-widget-filter.component.d.ts +2 -2
  192. package/widgets/lib/widgets/editors/email/email-box-widget-print.component.d.ts +2 -2
  193. package/widgets/lib/widgets/editors/email/email-box-widget-view.component.d.ts +2 -2
  194. package/widgets/lib/widgets/editors/email/email-box-widget.config.d.ts +7 -0
  195. package/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.d.ts +2 -2
  196. package/widgets/lib/widgets/editors/large-text/large-text-widget-filter.component.d.ts +2 -2
  197. package/widgets/lib/widgets/editors/large-text/large-text-widget-print.component.d.ts +2 -2
  198. package/widgets/lib/widgets/editors/large-text/large-text-widget-view.component.d.ts +2 -2
  199. package/widgets/lib/widgets/editors/large-text/large-text-widget.config.d.ts +5 -0
  200. package/widgets/lib/widgets/editors/link/link-widget-edit.component.d.ts +2 -2
  201. package/widgets/lib/widgets/editors/link/link-widget-filter.component.d.ts +2 -2
  202. package/widgets/lib/widgets/editors/link/link-widget-print.component.d.ts +2 -2
  203. package/widgets/lib/widgets/editors/link/link-widget-view.component.d.ts +2 -2
  204. package/widgets/lib/widgets/editors/link/link-widget.config.d.ts +6 -0
  205. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-edit.component.d.ts +2 -2
  206. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-filter.component.d.ts +2 -2
  207. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-print.component.d.ts +2 -2
  208. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-view.component.d.ts +2 -2
  209. package/widgets/lib/widgets/editors/meta-data/meta-data-widget.config.d.ts +2 -0
  210. package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +2 -2
  211. package/widgets/lib/widgets/editors/number/number-box-widget-filter.component.d.ts +2 -2
  212. package/widgets/lib/widgets/editors/number/number-box-widget-print.component.d.ts +2 -2
  213. package/widgets/lib/widgets/editors/number/number-box-widget-view.component.d.ts +2 -2
  214. package/widgets/lib/widgets/editors/number/number-box-widget.config.d.ts +10 -0
  215. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-edit.component.d.ts +2 -2
  216. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-filter.component.d.ts +2 -2
  217. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-print.component.d.ts +2 -2
  218. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-view.component.d.ts +2 -2
  219. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget.config.d.ts +10 -0
  220. package/widgets/lib/widgets/editors/password/password-box-widget-edit.component.d.ts +2 -2
  221. package/widgets/lib/widgets/editors/password/password-box-widget-filter.component.d.ts +2 -2
  222. package/widgets/lib/widgets/editors/password/password-box-widget-print.component.d.ts +2 -2
  223. package/widgets/lib/widgets/editors/password/password-box-widget-view.component.d.ts +2 -2
  224. package/widgets/lib/widgets/editors/password/password-box-widget.config.d.ts +7 -0
  225. package/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.d.ts +2 -2
  226. package/widgets/lib/widgets/editors/phone/phone-box-widget-filter.component.d.ts +2 -2
  227. package/widgets/lib/widgets/editors/phone/phone-box-widget-print.component.d.ts +2 -2
  228. package/widgets/lib/widgets/editors/phone/phone-box-widget-view.component.d.ts +2 -2
  229. package/widgets/lib/widgets/editors/phone/phone-box-widget.config.d.ts +4 -0
  230. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +2 -2
  231. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-filter.component.d.ts +2 -2
  232. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-print.component.d.ts +2 -2
  233. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-view.component.d.ts +2 -2
  234. package/widgets/lib/widgets/editors/rich-text/rich-text-widget.config.d.ts +5 -0
  235. package/widgets/lib/widgets/editors/select/select-box-widget-filter.component.d.ts +2 -2
  236. package/widgets/lib/widgets/editors/select/select-box-widget-print.component.d.ts +2 -2
  237. package/widgets/lib/widgets/editors/select/select-box-widget-view.component.d.ts +2 -2
  238. package/widgets/lib/widgets/editors/select/select-box-widget.config.d.ts +11 -0
  239. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-filter.component.d.ts +2 -2
  240. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-print.component.d.ts +2 -2
  241. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-view.component.d.ts +2 -2
  242. package/widgets/lib/widgets/editors/selection-list/selection-list-widget.config.d.ts +8 -0
  243. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-column.component.d.ts +2 -2
  244. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-edit.component.d.ts +2 -2
  245. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-filter.component.d.ts +2 -2
  246. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-print.component.d.ts +2 -2
  247. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-view.component.d.ts +2 -2
  248. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget.config.d.ts +2 -0
  249. package/widgets/lib/widgets/editors/tabular-data/table-widget.config.d.ts +7 -0
  250. package/widgets/lib/widgets/editors/tabular-data/tabular-data-filter.component.d.ts +2 -2
  251. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +2 -2
  252. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-print.component.d.ts +2 -2
  253. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-view.component.d.ts +2 -2
  254. package/widgets/lib/widgets/editors/template-box/template-box-widget-column.component.d.ts +2 -2
  255. package/widgets/lib/widgets/editors/template-box/template-box-widget-edit.component.d.ts +2 -2
  256. package/widgets/lib/widgets/editors/template-box/template-box-widget-filter.component.d.ts +2 -2
  257. package/widgets/lib/widgets/editors/template-box/template-box-widget-print.component.d.ts +2 -2
  258. package/widgets/lib/widgets/editors/template-box/template-box-widget-view.component.d.ts +2 -2
  259. package/widgets/lib/widgets/editors/template-box/template-box-widget.config.d.ts +5 -0
  260. package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +2 -2
  261. package/widgets/lib/widgets/editors/text/text-box-widget-filter.component.d.ts +2 -2
  262. package/widgets/lib/widgets/editors/text/text-box-widget-print.component.d.ts +2 -2
  263. package/widgets/lib/widgets/editors/text/text-box-widget-view.component.d.ts +2 -2
  264. package/widgets/lib/widgets/editors/text/text-box-widget.config.d.ts +8 -0
  265. package/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.d.ts +2 -2
  266. package/widgets/lib/widgets/editors/toggle/toggle-widget-filter.component.d.ts +2 -2
  267. package/widgets/lib/widgets/editors/toggle/toggle-widget-print.component.d.ts +2 -2
  268. package/widgets/lib/widgets/editors/toggle/toggle-widget-view.component.d.ts +2 -2
  269. package/widgets/lib/widgets/editors/toggle/toggle-widget.config.d.ts +7 -0
  270. package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +2 -2
  271. package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget-edit.component.d.ts +2 -2
  272. package/widgets/lib/widgets/filters/number-filter/number-filter-widget-edit.component.d.ts +2 -2
  273. package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +2 -2
  274. package/widgets/lib/widgets/index.d.ts +3 -0
  275. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +2 -2
  276. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-view.component.d.ts +2 -2
  277. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget.config.d.ts +2 -0
  278. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-designer.component.d.ts +2 -2
  279. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-print.component.d.ts +2 -2
  280. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-view.component.d.ts +2 -2
  281. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget.config.d.ts +2 -0
  282. package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +2 -7
  283. package/widgets/lib/widgets/layout/block/block-widget-view.component.d.ts +4 -7
  284. package/widgets/lib/widgets/layout/block/block-widget.config.d.ts +17 -0
  285. package/widgets/lib/widgets/layout/document/document-widget.config.d.ts +2 -0
  286. package/widgets/lib/widgets/layout/form-field/form-field-widget-designer.component.d.ts +2 -2
  287. package/widgets/lib/widgets/layout/form-field/form-field-widget-view.component.d.ts +2 -2
  288. package/widgets/lib/widgets/layout/form-field/form-field-widget.config.d.ts +3 -0
  289. package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +2 -2
  290. package/widgets/lib/widgets/layout/grid/grid-widget-view.component.d.ts +2 -2
  291. package/widgets/lib/widgets/layout/grid/grid-widget.config.d.ts +3 -0
  292. package/widgets/lib/widgets/layout/grid-item/grid-item-widget-designer.component.d.ts +2 -2
  293. package/widgets/lib/widgets/layout/grid-item/grid-item-widget-print.component.d.ts +2 -2
  294. package/widgets/lib/widgets/layout/grid-item/grid-item-widget-view.component.d.ts +2 -2
  295. package/widgets/lib/widgets/layout/grid-item/grid-item-widget.config.d.ts +18 -0
  296. package/widgets/lib/widgets/layout/grid-row/grid-row-widget-designer.component.d.ts +2 -2
  297. package/widgets/lib/widgets/layout/grid-row/grid-row-widget-print.component.d.ts +2 -2
  298. package/widgets/lib/widgets/layout/grid-row/grid-row-widget-view.component.d.ts +2 -2
  299. package/widgets/lib/widgets/layout/grid-row/grid-row-widget.config.d.ts +4 -0
  300. package/widgets/lib/widgets/layout/page/page-widget-designer.component.d.ts +2 -2
  301. package/widgets/lib/widgets/layout/page/page-widget-view.component.d.ts +2 -2
  302. package/widgets/lib/widgets/layout/page/page-widget.config.d.ts +7 -0
  303. package/widgets/lib/widgets/layout/panel/index.d.ts +3 -0
  304. package/widgets/lib/widgets/layout/panel/panel-widget-designer.component.d.ts +15 -0
  305. package/widgets/lib/widgets/layout/panel/panel-widget-view.component.d.ts +15 -0
  306. package/widgets/lib/widgets/layout/panel/panel-widget.config.d.ts +7 -0
  307. package/widgets/lib/widgets/layout/repeater/repeater-widget-designer.component.d.ts +2 -2
  308. package/widgets/lib/widgets/layout/repeater/repeater-widget-edit.component.d.ts +2 -2
  309. package/widgets/lib/widgets/layout/repeater/repeater-widget-print.component.d.ts +2 -2
  310. package/widgets/lib/widgets/layout/repeater/repeater-widget-view.component.d.ts +2 -2
  311. package/widgets/lib/widgets/layout/repeater/repeater-widget.config.d.ts +5 -0
  312. package/widgets/lib/widgets/layout/text-block/text-block-widget-designer.component.d.ts +2 -2
  313. package/widgets/lib/widgets/layout/text-block/text-block-widget-view.component.d.ts +2 -2
  314. package/widgets/lib/widgets/layout/text-block/text-block-widget.config.d.ts +3 -0
  315. package/widgets/lib/widgets/property-editors/advanced-grid-options/advanced-grid-options-widget-editor.component.d.ts +2 -2
  316. package/widgets/lib/widgets/property-editors/border/border-widget-editor.component.d.ts +2 -2
  317. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +7 -6
  318. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +3 -9
  319. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +2 -2
  320. package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +2 -2
  321. package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +2 -2
  322. package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +2 -2
  323. package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +2 -2
  324. package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +2 -2
  325. package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +2 -2
  326. package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +2 -2
  327. package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +2 -2
  328. package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +2 -2
  329. package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +2 -2
  330. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-nvrF63CN.mjs +0 -764
  331. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-nvrF63CN.mjs.map +0 -1
  332. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs.map +0 -1
  333. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs.map +0 -1
  334. package/fesm2022/acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs.map +0 -1
  335. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-DVhi_mBH.mjs.map +0 -1
  336. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-CrdfTgeq.mjs.map +0 -1
  337. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DfSoF52n.mjs.map +0 -1
  338. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-BM1G-WaN.mjs.map +0 -1
  339. package/fesm2022/acorex-platform-widgets-contact-widget-filter.component-B1cKV-TM.mjs.map +0 -1
  340. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DtwyOnuO.mjs.map +0 -1
  341. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-C3H0Zldz.mjs.map +0 -1
  342. /package/{common/lib/layout/logo → core/lib/types}/logo.types.d.ts +0 -0
  343. /package/themes/shared/lib/{setting.keys.d.ts → settings.keys.d.ts} +0 -0
  344. /package/themes/shared/lib/{setting.provider.d.ts → settings.provider.d.ts} +0 -0
@@ -4,15 +4,15 @@ import { PortalModule } from '@angular/cdk/portal';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i0 from '@angular/core';
7
- import { signal, computed, Injectable, InjectionToken, inject, ElementRef, effect, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, input, ViewContainerRef, Directive, Optional, Inject, NgModule } from '@angular/core';
7
+ import { signal, computed, Injectable, InjectionToken, inject, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, effect, Output, input, output, ViewContainerRef, Directive, Optional, Inject, NgModule, ElementRef } from '@angular/core';
8
8
  import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
9
- import { set, merge, cloneDeep, get, isEqual, isNil, isUndefined, sum, isEmpty, isString } from 'lodash-es';
10
- import { Subject, BehaviorSubject, filter } from 'rxjs';
11
- import { convertArrayToDataSource, AXDataSource } from '@acorex/components/common';
9
+ import { set, merge, cloneDeep, isNil, get, isEqual, sum, isEmpty, isString, isUndefined } from 'lodash-es';
10
+ import { Subject, filter, BehaviorSubject } from 'rxjs';
11
+ import { getSmart, setSmart } from '@acorex/platform/core';
12
12
  import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
13
- import { setSmart, getSmart } from '@acorex/platform/core';
14
13
  import { AXTranslationService } from '@acorex/core/translation';
15
14
  import { AXUnsubscriber } from '@acorex/core/utils';
15
+ import { convertArrayToDataSource, AXDataSource } from '@acorex/components/common';
16
16
 
17
17
  var AXPPageStatus;
18
18
  (function (AXPPageStatus) {
@@ -160,126 +160,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
160
160
  }]
161
161
  }] });
162
162
 
163
- class AXPLayoutContextChangeEvent {
164
- }
165
- const AXPLayoutBuilderContextStore = signalStore(
166
- // Initial State
167
- withState(() => ({
168
- data: {}, // Shared context data
169
- state: 'initiated', // Current state
170
- initialSnapshot: {}, // Snapshot of the first initialized state
171
- previousSnapshot: {}, // Snapshot of the previous state
172
- lastChange: {
173
- state: 'initiated',
174
- }, // Last change event
175
- })),
176
- // Computed Signals
177
- withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
178
- isChanged: computed(() => state() === 'changed'),
179
- isReset: computed(() => state() === 'restored'),
180
- isInitiated: computed(() => state() === 'initiated'),
181
- isEmpty: computed(() => Object.keys(data()).length === 0),
182
- snapshot: computed(() => cloneDeep(data())), // Current data snapshot
183
- initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
184
- previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
185
- changeEvent: computed(() => lastChange()), // Reactive last change event
186
- })),
187
- // Methods for State Management
188
- withMethods((store) => ({
189
- // Update a specific value
190
- update(path, value) {
191
- const currentData = cloneDeep(store.data());
192
- const oldValue = get(currentData, path);
193
- // Skip if the value hasn't changed
194
- if (isEqual(oldValue, value)) {
195
- return;
196
- }
197
- // Update the value and prepare the change event
198
- const updatedData = setSmart(currentData, path, value);
199
- const changeEvent = {
200
- oldValue,
201
- newValue: value,
202
- path,
203
- state: 'changed',
204
- data: updatedData,
205
- };
206
- // Patch the state
207
- patchState(store, {
208
- previousSnapshot: store.snapshot(), // Save the previous state
209
- data: updatedData,
210
- state: 'changed',
211
- lastChange: changeEvent,
212
- });
213
- },
214
- // Reset to the initial state
215
- reset() {
216
- const initialData = store.initial();
217
- const changeEvent = {
218
- oldValue: cloneDeep(store.data()), // Current data becomes old value
219
- newValue: cloneDeep(initialData), // Reset to the initial state
220
- path: '',
221
- state: 'restored',
222
- data: initialData,
223
- };
224
- patchState(store, {
225
- previousSnapshot: store.snapshot(), // Save the previous state
226
- data: initialData,
227
- state: 'restored',
228
- lastChange: changeEvent,
229
- });
230
- },
231
- // Initialize the state
232
- set(initialData) {
233
- const currentData = store.data();
234
- if (isEqual(currentData, initialData)) {
235
- return; // Skip if the current state matches the initial state
236
- }
237
- const changeEvent = {
238
- oldValue: null,
239
- newValue: cloneDeep(initialData),
240
- path: '',
241
- state: 'initiated',
242
- data: initialData,
243
- };
244
- patchState(store, {
245
- initialSnapshot: cloneDeep(initialData), // Save the initial state
246
- previousSnapshot: store.snapshot(), // Save the current state as the previous
247
- data: initialData,
248
- state: 'initiated',
249
- lastChange: changeEvent,
250
- });
251
- },
252
- // Get a specific value
253
- getValue(path) {
254
- return get(store.data(), path);
255
- },
256
- })));
257
-
258
- const AXP_WIDGET_DATASOURCE_PROVIDER = new InjectionToken('AXP_WIDGET_DATASOURCE_PROVIDER');
259
- class AXPWidgetDataSourceProviderService {
260
- constructor() {
261
- this.providers = inject(AXP_WIDGET_DATASOURCE_PROVIDER, { optional: true });
262
- }
263
- async items() {
264
- const items = [];
265
- if (Array.isArray(this.providers)) {
266
- for (const provider of this.providers) {
267
- items.push(...(await provider.items()));
268
- }
269
- }
270
- return items;
271
- }
272
- async get(name) {
273
- return (await this.items()).find((c) => c.name == name);
274
- }
275
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
276
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, providedIn: 'root' }); }
277
- }
278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, decorators: [{
279
- type: Injectable,
280
- args: [{ providedIn: 'root' }]
281
- }] });
282
-
283
163
  const AXPWidgetsCatalog = {
284
164
  documentAttachment: 'document-attachment-editor',
285
165
  singleFileBox: 'single-file-box-editor',
@@ -358,6 +238,9 @@ const AXPWidgetsCatalog = {
358
238
  weather: 'weather',
359
239
  metaData: 'meta-data-editor',
360
240
  templateEditor: 'template-box-editor',
241
+ panel: 'panel',
242
+ notification: 'notification',
243
+ taskList: 'task-list',
361
244
  };
362
245
 
363
246
  function cloneProperty(property, values) {
@@ -441,287 +324,45 @@ function createSelectProperty(ctor) {
441
324
  }
442
325
  const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
443
326
  const AXP_WIDGET_COLUMN_TOKEN = new InjectionToken('AXP_WIDGET_COLUMN_TOKEN');
444
- class AXPWidgetComponent extends AXPLayoutElement {
327
+
328
+ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
445
329
  constructor() {
446
330
  super(...arguments);
447
- this.token = inject(AXP_WIDGET_TOKEN);
448
- this.host = inject(ElementRef).nativeElement;
449
- this.config = this.token.config;
450
- this.node = this.token.node;
451
- this.name = this.token.node.name;
452
- this.path = this.token.node.path;
453
- this.defaultValue = this.token.node.defaultValue;
454
- this._children = signal(this.token.node.children ?? []);
455
- this.children = this._children.asReadonly();
456
- this._options = signal(this.token.options ?? {});
457
- this.options = this._options.asReadonly();
458
- this.layoutService = inject(AXPLayoutBuilderService);
459
- this.contextService = inject(AXPLayoutBuilderContextStore);
460
- this._isValueWidget = false;
461
- this.isValueWidget = () => this._isValueWidget;
462
- this._status = signal(AXPWidgetStatus.Rendering);
463
- this.status = this._status.asReadonly();
464
- this.onStatusChanged = new BehaviorSubject(this._status());
465
- this.#statusEffect = effect(() => {
466
- this.onStatusChanged.next(this.status());
467
- });
468
- this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()));
469
- this.fullPath = signal(null);
470
- this.getValue = computed(() => {
471
- return this.fullPath() ? this.extractValue(this.fullPath()) : null;
472
- }, { equal: isEqual });
473
- this.validationRules = computed(() => {
474
- const validationsRaw = this.options()['validations'];
475
- if (validationsRaw == null) {
476
- return [];
477
- }
478
- return Object.values(this.options()['validations'])
479
- .filter((c) => c != null)
480
- .map((c) => ({
481
- rule: c.rule,
482
- message: c.message,
483
- options: c.options,
484
- }));
485
- });
486
- }
487
- get id() {
488
- return this._id;
489
- }
490
- #statusEffect;
491
- outputs() {
492
- return [];
331
+ this.widgetRegistery = inject(AXPWidgetRegistryService);
332
+ this.grid = inject(AXBaseDataTable);
333
+ this.mergedOptions = signal({});
334
+ this.loadingRow = signal(null);
335
+ this.injector = inject(Injector);
336
+ this.cdr = inject(ChangeDetectorRef);
493
337
  }
494
- ngOnInit() {
495
- this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
496
- if (this.isValueWidget()) {
497
- this.detectFullPath();
498
- if (!isNil(this.defaultValue) && isNil(this.getValue())) {
499
- this.setValue(this.defaultValue);
500
- }
501
- }
502
- //
503
- if (get(this.node, '__meta__.added')) {
504
- this.onAdded();
505
- }
506
- this.setStatus(AXPWidgetStatus.Rendered);
338
+ get node() {
339
+ return this._node;
507
340
  }
508
- extractValue(path) {
509
- const rawValue = this.contextService.getValue(path);
510
- if (this.node.valueTransforms?.getter) {
511
- return this.node.valueTransforms?.getter(rawValue);
512
- }
513
- return rawValue;
341
+ set node(v) {
342
+ this._node = v;
514
343
  }
515
- setValue(value) {
516
- if (this.node.valueTransforms?.setter) {
517
- value = this.node.valueTransforms?.setter(value);
518
- }
519
- const oldValue = this.getValue();
520
- value = isUndefined(value) ? null : value;
521
- if (isNil(value) && isNil(oldValue)) {
522
- return;
523
- }
524
- if (isEqual(oldValue, value)) {
525
- return;
526
- }
527
- if (this.fullPath()) {
528
- this.contextService.update(this.fullPath(), value);
529
- }
344
+ get renderFooterTemplate() {
345
+ return this.footerTemplate ?? this._contentFooterTemplate;
530
346
  }
531
- setStatus(status) {
532
- this._status.set(status);
533
- this.layoutService.updateStatus();
347
+ get renderCellTemplate() {
348
+ return this.cellTemplate ?? this._contentCellTemplate;
534
349
  }
535
- setOptions(values) {
536
- this._options.set({ ...this.options(), ...values });
350
+ async handleExpandRow(row) {
351
+ this.loadingRow.set(row);
352
+ await this.grid.expandRow(row);
353
+ this.loadingRow.set(null);
354
+ // if (row.data?.__meta__?.expanded === undefined) {
355
+ // this.width = `${parseInt(this.width as string) + 24}px`;
356
+ // }
537
357
  }
538
- output(name) {
539
- const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
540
- if (outputs.some((c) => c.name == name)) {
541
- const opt = get(this, name);
542
- if (typeof opt == 'function') {
543
- return opt();
544
- }
545
- return opt;
546
- }
547
- return null;
358
+ get renderHeaderTemplate() {
359
+ return this.headerTemplate ?? this._contentHeaderTemplate;
548
360
  }
549
- call(name, ...args) {
550
- const fn = get(this, name);
551
- if (fn && typeof fn == 'function') {
552
- fn.bind(this)(...args);
553
- }
361
+ get loadingEnabled() {
362
+ return true;
554
363
  }
555
- setChildren(children) {
556
- this._children.set([...children]);
557
- }
558
- onAdded() { }
559
- detectFullPath() {
560
- const sections = [];
561
- const ids = [];
562
- //
563
- let parent = this;
564
- //
565
- while (parent) {
566
- const isValue = parent.isValueWidget() && parent.index == null;
567
- const path = parent.path ?? (isValue ? parent.name : null);
568
- const id = parent.name;
569
- //
570
- if (path) {
571
- sections.push(path);
572
- }
573
- if (parent.index != null && parent.isValueWidget()) {
574
- sections.push(`[${parent.index}]`);
575
- }
576
- if (id) {
577
- ids.push(id);
578
- if (parent.index != null) {
579
- ids.push(`${parent.index}`);
580
- }
581
- }
582
- parent = parent.parent;
583
- }
584
- //
585
- this.fullPath.set(sections.reverse().join('.'));
586
- this._id = this.name || this.parent ? ids.reverse().join('_') : null;
587
- if (this._id) {
588
- this.layoutService.registerWidget(this._id, this);
589
- }
590
- }
591
- handleValueChanged(e) {
592
- if (e.isUserInteraction) {
593
- this.setValue(e.value);
594
- }
595
- }
596
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
597
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetComponent }); }
598
- }
599
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetComponent, decorators: [{
600
- type: Injectable
601
- }] });
602
- class AXPDataListWidgetComponent extends AXPWidgetComponent {
603
- constructor() {
604
- super(...arguments);
605
- this.dataService = inject(AXPWidgetDataSourceProviderService);
606
- this.dataSource = signal(convertArrayToDataSource([]));
607
- this.textField = computed(() => this.options()['textField'] ?? 'title');
608
- this.valueField = computed(() => this.options()['valueField'] ?? 'id');
609
- this.selectedItems = signal([]);
610
- this.rf = effect(async () => {
611
- const rawValue = this.options()['dataSource'];
612
- // static datasource class
613
- if (rawValue instanceof AXDataSource) {
614
- this.dataSource.set(rawValue);
615
- }
616
- // static array datasource
617
- else if (Array.isArray(rawValue)) {
618
- const ds = new AXDataSource({
619
- key: this.valueField(),
620
- pageSize: 10,
621
- load: async (e) => {
622
- const raw = this.options()['dataSource'];
623
- return {
624
- items: raw,
625
- total: raw.length,
626
- };
627
- },
628
- byKey: (key) => {
629
- const raw = this.options()['dataSource'];
630
- const item = raw.filter((c) => c[this.valueField()] == key);
631
- return Promise.resolve(item[0]);
632
- },
633
- });
634
- this.dataSource.set(ds);
635
- }
636
- // resolve data source by name
637
- else if (rawValue && (typeof rawValue == 'string' || typeof rawValue == 'object')) {
638
- const id = typeof rawValue == 'object' ? rawValue['id'] : rawValue;
639
- const c = await this.dataService.get(id);
640
- if (this.mode == 'designer' && c?.samples?.length) {
641
- this.dataSource.set(convertArrayToDataSource(c.samples, {
642
- key: this.valueField(),
643
- pageSize: 500,
644
- }));
645
- }
646
- else {
647
- const ds = c?.source();
648
- if (ds && ds instanceof Promise) {
649
- const d = await ds;
650
- this.dataSource.set(d);
651
- }
652
- else if (ds) {
653
- this.dataSource.set(ds);
654
- }
655
- // empty datasource
656
- else {
657
- this.dataSource.set(convertArrayToDataSource([]));
658
- }
659
- }
660
- }
661
- // empty datasource
662
- else {
663
- this.dataSource.set(convertArrayToDataSource([]));
664
- }
665
- });
666
- }
667
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
668
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent }); }
669
- }
670
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
671
- type: Injectable
672
- }] });
673
- class AXPColumnWidgetComponent {
674
- constructor() {
675
- this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
676
- this.path = this.token.path;
677
- this.options = this.token.options ?? {};
678
- this.rawValue = null;
679
- }
680
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
681
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent }); }
682
- }
683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
684
- type: Injectable
685
- }] });
686
-
687
- class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
688
- constructor() {
689
- super(...arguments);
690
- this.widgetRegistery = inject(AXPWidgetRegistryService);
691
- this.grid = inject(AXBaseDataTable);
692
- this.mergedOptions = signal({});
693
- this.loadingRow = signal(null);
694
- this.injector = inject(Injector);
695
- this.cdr = inject(ChangeDetectorRef);
696
- }
697
- get node() {
698
- return this._node;
699
- }
700
- set node(v) {
701
- this._node = v;
702
- }
703
- get renderFooterTemplate() {
704
- return this.footerTemplate ?? this._contentFooterTemplate;
705
- }
706
- get renderCellTemplate() {
707
- return this.cellTemplate ?? this._contentCellTemplate;
708
- }
709
- async handleExpandRow(row) {
710
- this.loadingRow.set(row);
711
- await this.grid.expandRow(row);
712
- this.loadingRow.set(null);
713
- // if (row.data?.__meta__?.expanded === undefined) {
714
- // this.width = `${parseInt(this.width as string) + 24}px`;
715
- // }
716
- }
717
- get renderHeaderTemplate() {
718
- return this.headerTemplate ?? this._contentHeaderTemplate;
719
- }
720
- get loadingEnabled() {
721
- return true;
722
- }
723
- get name() {
724
- return `col-${this.node.path}`;
364
+ get name() {
365
+ return `col-${this.node.path}`;
725
366
  }
726
367
  async ngOnInit() {
727
368
  const widget = this.widgetRegistery.resolve(this.node.type);
@@ -859,6 +500,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
859
500
  args: ['header']
860
501
  }] } });
861
502
 
503
+ class AXPLayoutContextChangeEvent {
504
+ }
505
+ const AXPLayoutBuilderContextStore = signalStore(
506
+ // Initial State
507
+ withState(() => ({
508
+ data: {}, // Shared context data
509
+ state: 'initiated', // Current state
510
+ initialSnapshot: {}, // Snapshot of the first initialized state
511
+ previousSnapshot: {}, // Snapshot of the previous state
512
+ lastChange: {
513
+ state: 'initiated',
514
+ }, // Last change event
515
+ })),
516
+ // Computed Signals
517
+ withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
518
+ isChanged: computed(() => state() === 'changed'),
519
+ isReset: computed(() => state() === 'restored'),
520
+ isInitiated: computed(() => state() === 'initiated'),
521
+ isEmpty: computed(() => Object.keys(data()).length === 0),
522
+ snapshot: computed(() => cloneDeep(data())), // Current data snapshot
523
+ initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
524
+ previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
525
+ changeEvent: computed(() => lastChange()), // Reactive last change event
526
+ })),
527
+ // Methods for State Management
528
+ withMethods((store) => ({
529
+ // Update a specific value
530
+ update(path, value) {
531
+ const currentData = cloneDeep(store.data());
532
+ const oldValue = get(currentData, path);
533
+ // Skip if the value hasn't changed
534
+ if (isEqual(oldValue, value)) {
535
+ return;
536
+ }
537
+ // Update the value and prepare the change event
538
+ const updatedData = setSmart(currentData, path, value);
539
+ const changeEvent = {
540
+ oldValue,
541
+ newValue: value,
542
+ path,
543
+ state: 'changed',
544
+ data: updatedData,
545
+ };
546
+ // Patch the state
547
+ patchState(store, {
548
+ previousSnapshot: store.snapshot(), // Save the previous state
549
+ data: updatedData,
550
+ state: 'changed',
551
+ lastChange: changeEvent,
552
+ });
553
+ },
554
+ // Reset to the initial state
555
+ reset() {
556
+ const initialData = store.initial();
557
+ const changeEvent = {
558
+ oldValue: cloneDeep(store.data()), // Current data becomes old value
559
+ newValue: cloneDeep(initialData), // Reset to the initial state
560
+ path: '',
561
+ state: 'restored',
562
+ data: initialData,
563
+ };
564
+ patchState(store, {
565
+ previousSnapshot: store.snapshot(), // Save the previous state
566
+ data: initialData,
567
+ state: 'restored',
568
+ lastChange: changeEvent,
569
+ });
570
+ },
571
+ // Initialize the state
572
+ set(initialData) {
573
+ const currentData = store.data();
574
+ if (isEqual(currentData, initialData)) {
575
+ return; // Skip if the current state matches the initial state
576
+ }
577
+ const changeEvent = {
578
+ oldValue: null,
579
+ newValue: cloneDeep(initialData),
580
+ path: '',
581
+ state: 'initiated',
582
+ data: initialData,
583
+ };
584
+ patchState(store, {
585
+ initialSnapshot: cloneDeep(initialData), // Save the initial state
586
+ previousSnapshot: store.snapshot(), // Save the current state as the previous
587
+ data: initialData,
588
+ state: 'initiated',
589
+ lastChange: changeEvent,
590
+ });
591
+ },
592
+ // Get a specific value
593
+ getValue(path) {
594
+ return get(store.data(), path);
595
+ },
596
+ })));
597
+
862
598
  class AXPWidgetContainerComponent {
863
599
  set context(value) {
864
600
  this.contextService.set(value);
@@ -930,6 +666,8 @@ class AXPWidgetRendererDirective {
930
666
  this.node = input.required();
931
667
  this._options = signal({});
932
668
  this.options = this._options.asReadonly();
669
+ this.onOptionsChanged = output();
670
+ this.onValueChanged = output();
933
671
  this.mergedOptions = signal({});
934
672
  this.injector = inject(Injector);
935
673
  this.builderService = inject(AXPLayoutBuilderService);
@@ -1033,6 +771,12 @@ class AXPWidgetRendererDirective {
1033
771
  this.instance.index = this.index();
1034
772
  this.instance.mode = this.mode();
1035
773
  this.instance.setStatus(AXPWidgetStatus.Rendered);
774
+ this.instance?.onOptionsChanged?.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
775
+ this.onOptionsChanged.emit({ sender: this, widget: c.sender });
776
+ });
777
+ this.instance?.onValueChanged?.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
778
+ this.onValueChanged.emit({ sender: this, widget: c.sender });
779
+ });
1036
780
  await this.updateValueBasedOnFormula();
1037
781
  await this.assignTriggers();
1038
782
  //
@@ -1227,7 +971,7 @@ class AXPWidgetRendererDirective {
1227
971
  }
1228
972
  };
1229
973
  const actions = Array.isArray(t.action) ? t.action : [t.action];
1230
- actions.forEach(a => exec(a));
974
+ actions.forEach((a) => exec(a));
1231
975
  });
1232
976
  });
1233
977
  }
@@ -1265,7 +1009,7 @@ class AXPWidgetRendererDirective {
1265
1009
  }
1266
1010
  }
1267
1011
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1268
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.3", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
1012
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.3", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onOptionsChanged: "onOptionsChanged", onValueChanged: "onValueChanged" }, providers: [
1269
1013
  {
1270
1014
  provide: AXUnsubscriber,
1271
1015
  },
@@ -1345,8 +1089,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1345
1089
  args: ['AXPLayoutBuilderModuleFactory']
1346
1090
  }] }] });
1347
1091
 
1348
- const AXP_WIDGETS_LAYOUT_CATEGORY = {
1349
- name: 'layout',
1092
+ const AXP_WIDGET_DATASOURCE_PROVIDER = new InjectionToken('AXP_WIDGET_DATASOURCE_PROVIDER');
1093
+ class AXPWidgetDataSourceProviderService {
1094
+ constructor() {
1095
+ this.providers = inject(AXP_WIDGET_DATASOURCE_PROVIDER, { optional: true });
1096
+ }
1097
+ async items() {
1098
+ const items = [];
1099
+ if (Array.isArray(this.providers)) {
1100
+ for (const provider of this.providers) {
1101
+ items.push(...(await provider.items()));
1102
+ }
1103
+ }
1104
+ return items;
1105
+ }
1106
+ async get(name) {
1107
+ return (await this.items()).find((c) => c.name == name);
1108
+ }
1109
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1110
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, providedIn: 'root' }); }
1111
+ }
1112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetDataSourceProviderService, decorators: [{
1113
+ type: Injectable,
1114
+ args: [{ providedIn: 'root' }]
1115
+ }] });
1116
+
1117
+ const AXP_WIDGETS_LAYOUT_CATEGORY = {
1118
+ name: 'layout',
1350
1119
  order: 1,
1351
1120
  title: 'Layout',
1352
1121
  };
@@ -1383,9 +1152,277 @@ var AXPWidgetGroupEnum;
1383
1152
  AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
1384
1153
  })(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
1385
1154
 
1155
+ class AXPBaseWidgetComponent extends AXPLayoutElement {
1156
+ constructor() {
1157
+ super(...arguments);
1158
+ this.token = inject(AXP_WIDGET_TOKEN);
1159
+ this.host = inject(ElementRef).nativeElement;
1160
+ this.layoutService = inject(AXPLayoutBuilderService);
1161
+ this.contextService = inject(AXPLayoutBuilderContextStore);
1162
+ this.config = this.token.config;
1163
+ this.node = this.token.node;
1164
+ this.name = this.token.node.name;
1165
+ this._options = signal(this.token.options ?? {});
1166
+ this.options = this._options.asReadonly();
1167
+ this.onOptionsChanged = new Subject();
1168
+ this._status = signal(AXPWidgetStatus.Rendering);
1169
+ this.status = this._status.asReadonly();
1170
+ this.onStatusChanged = new BehaviorSubject(this._status());
1171
+ this.#statusEffect = effect(() => {
1172
+ this.onStatusChanged.next(this.status());
1173
+ });
1174
+ this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()));
1175
+ this._children = signal(this.token.node.children ?? []);
1176
+ this.children = this._children.asReadonly();
1177
+ }
1178
+ get id() {
1179
+ return this._id;
1180
+ }
1181
+ #statusEffect;
1182
+ outputs() {
1183
+ return [];
1184
+ }
1185
+ ngOnInit() {
1186
+ if (get(this.node, '__meta__.added')) {
1187
+ this.onAdded();
1188
+ }
1189
+ this.setStatus(AXPWidgetStatus.Rendered);
1190
+ }
1191
+ setStatus(status) {
1192
+ this._status.set(status);
1193
+ this.layoutService.updateStatus();
1194
+ }
1195
+ setOptions(values) {
1196
+ this._options.set({ ...this.options(), ...values });
1197
+ this.onOptionsChanged.next({ sender: this });
1198
+ }
1199
+ output(name) {
1200
+ const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
1201
+ if (outputs.some((c) => c.name == name)) {
1202
+ const opt = get(this, name);
1203
+ if (typeof opt == 'function') {
1204
+ return opt();
1205
+ }
1206
+ return opt;
1207
+ }
1208
+ return null;
1209
+ }
1210
+ call(name, ...args) {
1211
+ const fn = get(this, name);
1212
+ if (fn && typeof fn == 'function') {
1213
+ fn.bind(this)(...args);
1214
+ }
1215
+ }
1216
+ setChildren(children) {
1217
+ this._children.set([...children]);
1218
+ }
1219
+ onAdded() { }
1220
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1221
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBaseWidgetComponent }); }
1222
+ }
1223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
1224
+ type: Injectable
1225
+ }] });
1226
+ class AXPLayoutWidgetComponent extends AXPBaseWidgetComponent {
1227
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1228
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutWidgetComponent }); }
1229
+ }
1230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutWidgetComponent, decorators: [{
1231
+ type: Injectable
1232
+ }] });
1233
+ class AXPValueWidgetComponent extends AXPLayoutWidgetComponent {
1234
+ constructor() {
1235
+ super(...arguments);
1236
+ this.path = this.token.node.path;
1237
+ this.defaultValue = this.token.node.defaultValue;
1238
+ this._isValueWidget = false;
1239
+ this.isValueWidget = () => this._isValueWidget;
1240
+ this.onValueChanged = new Subject();
1241
+ this.fullPath = signal(null);
1242
+ this.getValue = computed(() => {
1243
+ return this.fullPath() ? this.extractValue(this.fullPath()) : null;
1244
+ }, { equal: isEqual });
1245
+ this.validationRules = computed(() => {
1246
+ const validationsRaw = this.options()['validations'];
1247
+ if (validationsRaw == null) {
1248
+ return [];
1249
+ }
1250
+ return Object.values(this.options()['validations'])
1251
+ .filter((c) => c != null)
1252
+ .map((c) => ({
1253
+ rule: c.rule,
1254
+ message: c.message,
1255
+ options: c.options,
1256
+ }));
1257
+ });
1258
+ }
1259
+ ngOnInit() {
1260
+ this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
1261
+ if (this.isValueWidget()) {
1262
+ this.detectFullPath();
1263
+ if (!isNil(this.defaultValue) && isNil(this.getValue())) {
1264
+ this.setValue(this.defaultValue);
1265
+ }
1266
+ }
1267
+ //
1268
+ super.ngOnInit();
1269
+ }
1270
+ extractValue(path) {
1271
+ const rawValue = this.contextService.getValue(path);
1272
+ if (this.node.valueTransforms?.getter) {
1273
+ return this.node.valueTransforms?.getter(rawValue);
1274
+ }
1275
+ return rawValue;
1276
+ }
1277
+ setValue(value) {
1278
+ if (this.node.valueTransforms?.setter) {
1279
+ value = this.node.valueTransforms?.setter(value);
1280
+ }
1281
+ const oldValue = this.getValue();
1282
+ value = isUndefined(value) ? null : value;
1283
+ if (isNil(value) && isNil(oldValue)) {
1284
+ return;
1285
+ }
1286
+ if (isEqual(oldValue, value)) {
1287
+ return;
1288
+ }
1289
+ if (this.fullPath()) {
1290
+ this.contextService.update(this.fullPath(), value);
1291
+ this.onValueChanged.next({ sender: this });
1292
+ }
1293
+ }
1294
+ detectFullPath() {
1295
+ const sections = [];
1296
+ const ids = [];
1297
+ //
1298
+ let parent = this;
1299
+ //
1300
+ while (parent) {
1301
+ const isValueWidget = parent instanceof AXPValueWidgetComponent && parent.isValueWidget() && parent.index == null;
1302
+ const valueParent = parent;
1303
+ const path = valueParent.path ?? (isValueWidget ? valueParent.name : null);
1304
+ const id = valueParent.name;
1305
+ //
1306
+ if (path) {
1307
+ sections.push(path);
1308
+ }
1309
+ if (parent.index != null && isValueWidget) {
1310
+ sections.push(`[${parent.index}]`);
1311
+ }
1312
+ if (id) {
1313
+ ids.push(id);
1314
+ if (parent.index != null) {
1315
+ ids.push(`${parent.index}`);
1316
+ }
1317
+ }
1318
+ parent = parent.parent;
1319
+ }
1320
+ //
1321
+ this.fullPath.set(sections.reverse().join('.'));
1322
+ this._id = this.name || this.parent ? ids.reverse().join('_') : null;
1323
+ if (this._id) {
1324
+ this.layoutService.registerWidget(this._id, this);
1325
+ }
1326
+ }
1327
+ handleValueChanged(e) {
1328
+ if (e.isUserInteraction) {
1329
+ this.setValue(e.value);
1330
+ }
1331
+ }
1332
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1333
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPValueWidgetComponent }); }
1334
+ }
1335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
1336
+ type: Injectable
1337
+ }] });
1338
+ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
1339
+ constructor() {
1340
+ super(...arguments);
1341
+ this.dataService = inject(AXPWidgetDataSourceProviderService);
1342
+ this.dataSource = signal(convertArrayToDataSource([]));
1343
+ this.textField = computed(() => this.options()['textField'] ?? 'title');
1344
+ this.valueField = computed(() => this.options()['valueField'] ?? 'id');
1345
+ this.selectedItems = signal([]);
1346
+ this.rf = effect(async () => {
1347
+ const rawValue = this.options()['dataSource'];
1348
+ // static datasource class
1349
+ if (rawValue instanceof AXDataSource) {
1350
+ this.dataSource.set(rawValue);
1351
+ }
1352
+ // static array datasource
1353
+ else if (Array.isArray(rawValue)) {
1354
+ const ds = new AXDataSource({
1355
+ key: this.valueField(),
1356
+ pageSize: 10,
1357
+ load: async (e) => {
1358
+ const raw = this.options()['dataSource'];
1359
+ return {
1360
+ items: raw,
1361
+ total: raw.length,
1362
+ };
1363
+ },
1364
+ byKey: (key) => {
1365
+ const raw = this.options()['dataSource'];
1366
+ const item = raw.filter((c) => c[this.valueField()] == key);
1367
+ return Promise.resolve(item[0]);
1368
+ },
1369
+ });
1370
+ this.dataSource.set(ds);
1371
+ }
1372
+ // resolve data source by name
1373
+ else if (rawValue && (typeof rawValue == 'string' || typeof rawValue == 'object')) {
1374
+ const id = typeof rawValue == 'object' ? rawValue['id'] : rawValue;
1375
+ const c = await this.dataService.get(id);
1376
+ if (this.mode == 'designer' && c?.samples?.length) {
1377
+ this.dataSource.set(convertArrayToDataSource(c.samples, {
1378
+ key: this.valueField(),
1379
+ pageSize: 500,
1380
+ }));
1381
+ }
1382
+ else {
1383
+ const ds = c?.source();
1384
+ if (ds && ds instanceof Promise) {
1385
+ const d = await ds;
1386
+ this.dataSource.set(d);
1387
+ }
1388
+ else if (ds) {
1389
+ this.dataSource.set(ds);
1390
+ }
1391
+ // empty datasource
1392
+ else {
1393
+ this.dataSource.set(convertArrayToDataSource([]));
1394
+ }
1395
+ }
1396
+ }
1397
+ // empty datasource
1398
+ else {
1399
+ this.dataSource.set(convertArrayToDataSource([]));
1400
+ }
1401
+ });
1402
+ }
1403
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1404
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent }); }
1405
+ }
1406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
1407
+ type: Injectable
1408
+ }] });
1409
+ class AXPColumnWidgetComponent {
1410
+ constructor() {
1411
+ this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
1412
+ this.path = this.token.path;
1413
+ this.options = this.token.options ?? {};
1414
+ this.rawValue = null;
1415
+ }
1416
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1417
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent }); }
1418
+ }
1419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
1420
+ type: Injectable
1421
+ }] });
1422
+
1386
1423
  /**
1387
1424
  * Generated bundle index. Do not edit.
1388
1425
  */
1389
1426
 
1390
- export { AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPLayoutBuilderContextStore, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPLayoutElement, AXPPageStatus, AXPWidgetColumnRendererComponent, AXPWidgetComponent, AXPWidgetContainerComponent, AXPWidgetDataSourceProviderService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DATASOURCE_PROVIDER, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty };
1427
+ export { AXPBaseWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPLayoutBuilderContextStore, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPLayoutElement, AXPLayoutWidgetComponent, AXPPageStatus, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetDataSourceProviderService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DATASOURCE_PROVIDER, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty };
1391
1428
  //# sourceMappingURL=acorex-platform-layout-builder.mjs.map