@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
@@ -0,0 +1,862 @@
1
+ import { AXActionSheetModule } from '@acorex/components/action-sheet';
2
+ import * as i8$2 from '@acorex/components/data-table';
3
+ import { AXDataTableModule } from '@acorex/components/data-table';
4
+ import { AXDrawerModule } from '@acorex/components/drawer';
5
+ import * as i1$1 from '@acorex/core/platform';
6
+ import * as i0 from '@angular/core';
7
+ import { inject, input, viewChild, signal, ViewEncapsulation, Component, EventEmitter, effect, Output, Input, linkedSignal, untracked, ViewChildren, ChangeDetectionStrategy, computed } from '@angular/core';
8
+ import { ActivatedRoute, RouterModule } from '@angular/router';
9
+ import * as i5 from '@acorex/components/badge';
10
+ import { AXBadgeModule } from '@acorex/components/badge';
11
+ import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
12
+ import * as i4$3 from '@acorex/components/button';
13
+ import { AXButtonModule } from '@acorex/components/button';
14
+ import * as i3 from '@acorex/components/decorators';
15
+ import { AXDecoratorModule } from '@acorex/components/decorators';
16
+ import { AXDialogModule } from '@acorex/components/dialog';
17
+ import { AXDropdownModule } from '@acorex/components/dropdown';
18
+ import { AXFormModule } from '@acorex/components/form';
19
+ import { AXLoadingModule } from '@acorex/components/loading';
20
+ import * as i6 from '@acorex/components/popover';
21
+ import { AXPopoverModule } from '@acorex/components/popover';
22
+ import * as i7 from '@acorex/components/search-box';
23
+ import { AXSearchBoxModule } from '@acorex/components/search-box';
24
+ import * as i8$1 from '@acorex/components/tabs';
25
+ import { AXTabsModule } from '@acorex/components/tabs';
26
+ import { AXTooltipModule } from '@acorex/components/tooltip';
27
+ import * as i4$1 from '@acorex/core/translation';
28
+ import { AXTranslationService, AXTranslationModule, translateSync } from '@acorex/core/translation';
29
+ import { AXPAuthModule } from '@acorex/platform/auth';
30
+ import * as i8 from '@acorex/platform/layout/builder';
31
+ import { AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
32
+ import { AXPThemeLayoutBlockComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutToolbarComponent, AXPLayoutThemeService, AXPThemeLayoutStartSideComponent } from '@acorex/platform/themes/shared';
33
+ import { AXPWidgetsModule } from '@acorex/platform/widgets';
34
+ import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle, DragDropModule } from '@angular/cdk/drag-drop';
35
+ import * as i1 from '@angular/common';
36
+ import { CommonModule } from '@angular/common';
37
+ import * as i2 from '@angular/forms';
38
+ import { FormsModule } from '@angular/forms';
39
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
40
+ import { AXPBasePageComponent, AXPPageLayoutComponent, AXPBasePage } from './acorex-platform-themes-default.mjs';
41
+ import * as i4 from '@acorex/components/skeleton';
42
+ import { AXSkeletonModule } from '@acorex/components/skeleton';
43
+ import * as i3$1 from '@acorex/components/tree-view';
44
+ import { AXTreeViewModule } from '@acorex/components/tree-view';
45
+ import { AXPEntityResolver } from '@acorex/platform/layout/entity';
46
+ import * as i4$2 from '@acorex/components/switch';
47
+ import { AXSwitchModule } from '@acorex/components/switch';
48
+ import { AXPSettingService, ALL_DEFAULT_OPERATORS } from '@acorex/platform/common';
49
+ import { cloneDeep } from 'lodash-es';
50
+ import { AXImageModule } from '@acorex/components/image';
51
+ import { AXSelectBoxModule } from '@acorex/components/select-box';
52
+ import * as i9 from '@acorex/cdk/list-navigation';
53
+ import { AXListNavigationModule } from '@acorex/cdk/list-navigation';
54
+ import { AXSelectionListModule } from '@acorex/components/selection-list';
55
+ import * as i7$1 from '@acorex/components/tag-box';
56
+ import { AXTagBoxModule } from '@acorex/components/tag-box';
57
+ import { AXCalendarService } from '@acorex/core/date-time';
58
+ import { AXTextBoxModule } from '@acorex/components/text-box';
59
+
60
+ class AXPEntityCategoryComponent {
61
+ constructor() {
62
+ this.entityResolver = inject(AXPEntityResolver);
63
+ this.translate = inject(AXTranslationService);
64
+ this.vm = input.required();
65
+ this.tree = viewChild('tree');
66
+ this.searchValue = input('');
67
+ this.isLoading = signal(true);
68
+ this.basicQueryEvent = {
69
+ skip: 0,
70
+ take: 1000,
71
+ };
72
+ this.treeItems = signal([
73
+ {
74
+ expand: true,
75
+ children: [],
76
+ },
77
+ ]);
78
+ }
79
+ ngOnInit() {
80
+ this.getCategories();
81
+ }
82
+ async handleCategorySearchChange(e) {
83
+ if (this.categoryEntityDef) {
84
+ this.isLoading.set(true);
85
+ const categoryInlineFilters = this.categoryEntityDef.properties.filter((p) => p.options?.filter?.inline?.enabled);
86
+ const event = {
87
+ ...this.basicQueryEvent,
88
+ filter: {
89
+ filters: [
90
+ {
91
+ filters: categoryInlineFilters.map((cif) => ({
92
+ field: cif.name,
93
+ operator: {
94
+ type: 'contains',
95
+ },
96
+ value: e.value,
97
+ })),
98
+ logic: 'or',
99
+ },
100
+ {
101
+ value: true,
102
+ field: this.categoryEntityDef.parentKey,
103
+ operator: {
104
+ type: 'isEmpty',
105
+ },
106
+ },
107
+ ],
108
+ logic: 'and',
109
+ },
110
+ };
111
+ const res = await this.categoryEntityQueryFunc(event);
112
+ this.treeItems.update((prev) => prev.map((item) => ({ ...item, children: res.items })));
113
+ this.isLoading.set(false);
114
+ }
115
+ }
116
+ async getCategories() {
117
+ this.isLoading.set(true);
118
+ this.categoryEntityDef = await this.getCategoryEntityDef();
119
+ this.categoryEntityQueryFunc = this.categoryEntityDef?.queries.list?.execute;
120
+ const res = await this.categoryEntityQueryFunc(this.basicQueryEvent);
121
+ const textField = this.vm().entityDef.category?.textField || 'title';
122
+ const valueField = this.vm().entityDef.category?.valueField || 'id';
123
+ const updatedItems = {
124
+ expand: true,
125
+ [textField]: await this.translate.translateAsync('allItems'),
126
+ [valueField]: 'all',
127
+ children: res.items,
128
+ };
129
+ this.treeItems.update((prev) => prev.map((_) => updatedItems));
130
+ this.isLoading.set(false);
131
+ }
132
+ async handleCollapseChanged(e) {
133
+ debugger;
134
+ this.tree()?.setNodeLoading(e.data.id, true);
135
+ const event = {
136
+ ...this.basicQueryEvent,
137
+ filter: {
138
+ field: this.categoryEntityDef?.parentKey,
139
+ value: e.data.id,
140
+ operator: {
141
+ type: 'equal',
142
+ },
143
+ },
144
+ };
145
+ const children = await this.categoryEntityQueryFunc(event);
146
+ this.treeItems.update((prev) => prev.map((i) => ({
147
+ ...i,
148
+ children: prev[0].children.map((ti) => (ti.id === e.data.id ? { ...ti, children: children.items } : ti)),
149
+ })));
150
+ this.tree()?.setNodeLoading(e.data.id, false);
151
+ }
152
+ async getCategoryEntityDef() {
153
+ const [module, entity] = this.vm().entityDef.category?.entity?.split('.') || [];
154
+ return await this.entityResolver.get(module, entity);
155
+ }
156
+ handleNodeClick(event) {
157
+ const filters = this.vm()
158
+ .entityDef.category?.applyConditions?.map((f) => {
159
+ console.log({ f });
160
+ return event.data[f.value] !== 'all'
161
+ ? {
162
+ field: f.name,
163
+ value: event.data[f.value],
164
+ operator: f.operator,
165
+ }
166
+ : null;
167
+ })
168
+ .filter((item) => item != null);
169
+ const viewFilters = this.vm()
170
+ .view()
171
+ .conditions.map((i) => ({ ...i, field: i.name }));
172
+ console.log({ viewFilters });
173
+ const newFilters = [...viewFilters, ...filters];
174
+ // this.vm().filterQueries.update((prev) => [...prev, ...filters!]);
175
+ this.vm().dataSource.filter({
176
+ filters: newFilters,
177
+ logic: 'and',
178
+ });
179
+ this.vm().dataSource.refresh();
180
+ }
181
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
182
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityCategoryComponent, isStandalone: true, selector: "axp-entity-category", inputs: { vm: { classPropertyName: "vm", publicName: "vm", isSignal: true, isRequired: true, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- <ax-tree-view [items]=\"treeItems()\"></ax-tree-view> -->\n\n<axp-layout-header>\n <axp-layout-title>{{ vm().entityDef.category?.title || 'category' | translate | async }}</axp-layout-title>\n <axp-layout-toolbar>\n <ax-search-box\n (onValueChanged)=\"handleCategorySearchChange($event)\"\n [delayTime]=\"300\"\n [placeholder]=\"'search.placeholder' | translate | async\"\n >\n </ax-search-box>\n </axp-layout-toolbar>\n</axp-layout-header>\n<axp-layout-content>\n @if(isLoading()){\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n }@else if (treeItems()[0].children.length) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\">\n <ax-tree-view\n (onNodeClick)=\"handleNodeClick($event)\"\n (onCollapsedChanged)=\"handleCollapseChanged($event)\"\n [showCheckbox]=\"false\"\n [itemTemplate]=\"itemTemplate\"\n #treeRef\n [textField]=\"vm().entityDef.category?.textField || 'title'\"\n [valueField]=\"vm().entityDef.category?.valueField || 'id'\"\n [expandedField]=\"'expand'\"\n [items]=\"treeItems()\"\n #tree\n >\n </ax-tree-view>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-justify-center\">\n <span class=\"ax-text-center\"> No Record Found! </span>\n </div>\n }\n\n <ng-template #itemTemplate let-item>\n <ax-icon class=\"fas ax-text-warning fa-folder\"></ax-icon>\n {{ item.title }}\n </ng-template>\n</axp-layout-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTreeViewModule }, { kind: "component", type: i3$1.AXTreeViewComponent, selector: "ax-tree-view", inputs: ["items", "showCheckbox", "selectionMode", "selectionBehavior", "focusNodeEnabled", "valueField", "textField", "visibleField", "disableField", "hasChildField", "selectedField", "expandedField", "tooltipField", "childrenField", "activeField", "indeterminateField", "parentField", "iconField", "toggleIcons", "look", "itemTemplate", "emptyTemplate", "expandOn"], outputs: ["onSelectionChanged", "onNodeClick", "onCollapsedChanged", "onNodedbClick"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i4.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer, axp-page-header, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-container, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i7.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutToolbarComponent, selector: "axp-layout-toolbar" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
183
+ }
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCategoryComponent, decorators: [{
185
+ type: Component,
186
+ args: [{ selector: 'axp-entity-category', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
187
+ CommonModule,
188
+ AXDecoratorModule,
189
+ AXTreeViewModule,
190
+ AXSkeletonModule,
191
+ AXPThemeLayoutBlockComponent,
192
+ AXSearchBoxModule,
193
+ AXPThemeLayoutHeaderComponent,
194
+ AXPThemeLayoutToolbarComponent,
195
+ AXTranslationModule,
196
+ ], template: "<!-- <ax-tree-view [items]=\"treeItems()\"></ax-tree-view> -->\n\n<axp-layout-header>\n <axp-layout-title>{{ vm().entityDef.category?.title || 'category' | translate | async }}</axp-layout-title>\n <axp-layout-toolbar>\n <ax-search-box\n (onValueChanged)=\"handleCategorySearchChange($event)\"\n [delayTime]=\"300\"\n [placeholder]=\"'search.placeholder' | translate | async\"\n >\n </ax-search-box>\n </axp-layout-toolbar>\n</axp-layout-header>\n<axp-layout-content>\n @if(isLoading()){\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n }@else if (treeItems()[0].children.length) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\">\n <ax-tree-view\n (onNodeClick)=\"handleNodeClick($event)\"\n (onCollapsedChanged)=\"handleCollapseChanged($event)\"\n [showCheckbox]=\"false\"\n [itemTemplate]=\"itemTemplate\"\n #treeRef\n [textField]=\"vm().entityDef.category?.textField || 'title'\"\n [valueField]=\"vm().entityDef.category?.valueField || 'id'\"\n [expandedField]=\"'expand'\"\n [items]=\"treeItems()\"\n #tree\n >\n </ax-tree-view>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-justify-center\">\n <span class=\"ax-text-center\"> No Record Found! </span>\n </div>\n }\n\n <ng-template #itemTemplate let-item>\n <ax-icon class=\"fas ax-text-warning fa-folder\"></ax-icon>\n {{ item.title }}\n </ng-template>\n</axp-layout-content>\n" }]
197
+ }] });
198
+
199
+ class AXPListViewOptionsColumnsComponent {
200
+ constructor() {
201
+ this.settings = inject(AXPSettingService);
202
+ this.onClosed = new EventEmitter();
203
+ this.columnsChanged = effect(() => {
204
+ this.vm.onColumnsChanged(this.vm.columns());
205
+ //.map((c) => ({ visible: c.visible, name: c.name }))
206
+ });
207
+ }
208
+ handleVisibilityChange(e, name) {
209
+ if (e.isUserInteraction) {
210
+ this.vm.columns.update((prev) => {
211
+ return prev.map((c) => {
212
+ return c.name === name ? { ...c, visible: e.value ?? true } : c;
213
+ });
214
+ });
215
+ }
216
+ }
217
+ drop(event) {
218
+ const columns = cloneDeep(this.vm.columns());
219
+ moveItemInArray(columns, event.previousIndex, event.currentIndex);
220
+ this.vm.columns.set(columns);
221
+ }
222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionsColumnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
223
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPListViewOptionsColumnsComponent, isStandalone: true, selector: "axp-list-view-option-columns", inputs: { vm: ["viewModel", "vm"] }, outputs: { onClosed: "onClosed" }, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-gap-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n @for(item of vm.columns();track item.name) {\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title | translate | async }}</p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"item.visible\"\n (onValueChanged)=\"handleVisibilityChange($event, item.name)\"\n ></ax-switch>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXSwitchModule }, { kind: "component", type: i4$2.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }] }); }
224
+ }
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionsColumnsComponent, decorators: [{
226
+ type: Component,
227
+ args: [{ selector: 'axp-list-view-option-columns', imports: [
228
+ CommonModule,
229
+ FormsModule,
230
+ CdkDropList,
231
+ CdkDrag,
232
+ CdkDragHandle,
233
+ AXButtonModule,
234
+ AXDecoratorModule,
235
+ AXSwitchModule,
236
+ AXTranslationModule,
237
+ ], template: "<div class=\"ax-flex ax-flex-col ax-gap-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n @for(item of vm.columns();track item.name) {\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title | translate | async }}</p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"item.visible\"\n (onValueChanged)=\"handleVisibilityChange($event, item.name)\"\n ></ax-switch>\n </div>\n }\n </div>\n</div>\n" }]
238
+ }], propDecorators: { vm: [{
239
+ type: Input,
240
+ args: ['viewModel']
241
+ }], onClosed: [{
242
+ type: Output
243
+ }] } });
244
+
245
+ class AXPListViewOptionSortingComponent {
246
+ constructor() {
247
+ this.isSM = false;
248
+ this.onClosed = new EventEmitter();
249
+ }
250
+ drop(event) {
251
+ moveItemInArray(this.vm.sortedFields(), event.previousIndex, event.currentIndex);
252
+ }
253
+ changeItemSort(item) {
254
+ const newDirection = item.dir === 'asc' ? 'desc' : item.dir === 'desc' ? undefined : 'asc';
255
+ this.vm.sortedFields.update((prev) => {
256
+ return prev.map((field) => {
257
+ if (field.name === item.name) {
258
+ return { ...field, dir: newDirection };
259
+ }
260
+ return field;
261
+ });
262
+ });
263
+ item.dir = newDirection;
264
+ }
265
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionSortingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
266
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPListViewOptionSortingComponent, isStandalone: true, selector: "axp-list-view-option-sorting", inputs: { vm: ["viewModel", "vm"] }, outputs: { onClosed: "onClosed" }, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-justify-center ax-gap-4 ax-select-none\">\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n @for(item of vm.sortedFields();track item.name) {\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title | translate | async }}</p>\n </div>\n <ax-button [color]=\"'blank'\" class=\"ax-sm\" (click)=\"changeItemSort(item)\">\n <ax-icon\n [class.ax-text-primary]=\"item.dir === 'asc'\"\n class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"\n ></ax-icon>\n <ax-icon\n [class.ax-text-primary]=\"item.dir === 'desc'\"\n class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"\n ></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXSwitchModule }, { kind: "ngmodule", type: AXSelectBoxModule }] }); }
267
+ }
268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPListViewOptionSortingComponent, decorators: [{
269
+ type: Component,
270
+ args: [{ selector: 'axp-list-view-option-sorting', imports: [
271
+ AXTranslationModule,
272
+ CommonModule,
273
+ FormsModule,
274
+ CdkDropList,
275
+ CdkDrag,
276
+ CdkDragHandle,
277
+ AXButtonModule,
278
+ AXImageModule,
279
+ AXDecoratorModule,
280
+ AXSwitchModule,
281
+ AXSelectBoxModule,
282
+ ], template: "<div class=\"ax-flex ax-flex-col ax-justify-center ax-gap-4 ax-select-none\">\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n @for(item of vm.sortedFields();track item.name) {\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title | translate | async }}</p>\n </div>\n <ax-button [color]=\"'blank'\" class=\"ax-sm\" (click)=\"changeItemSort(item)\">\n <ax-icon\n [class.ax-text-primary]=\"item.dir === 'asc'\"\n class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"\n ></ax-icon>\n <ax-icon\n [class.ax-text-primary]=\"item.dir === 'desc'\"\n class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"\n ></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
283
+ }], propDecorators: { onClosed: [{
284
+ type: Output
285
+ }], vm: [{
286
+ type: Input,
287
+ args: ['viewModel']
288
+ }] } });
289
+
290
+ class AXPEntityFilterToolbarComponent {
291
+ constructor() {
292
+ this.translate = inject(AXTranslationService);
293
+ this.calendarService = inject(AXCalendarService);
294
+ this.tagBox = viewChild('tagBox');
295
+ this.selectedField = signal(null);
296
+ this.selectedFilters = linkedSignal(() => this.convertQueriesToDefinitions(this.vm.view().conditions).map((i) => ({ ...i, readOnly: true })));
297
+ this.context = linkedSignal(() => this.convertQueriesToContext(this.vm.view().conditions));
298
+ this.activeFilter = signal(null);
299
+ this.asyncTags = signal([]);
300
+ this.popover = viewChild('popover');
301
+ this.inputValue = signal('');
302
+ this.inlineFilters = () => {
303
+ return this.vm.filtersDef.filter((f) => f.filterType.inline &&
304
+ !this.selectedFilters().some((sf) => sf.field === f.field &&
305
+ sf.operator?.type === (this.context()[sf.field]?.operation?.type || f.operator?.type)));
306
+ };
307
+ this.getDisplayValue = async (filter, val) => {
308
+ if (filter.widget.type === 'select-editor' || filter.widget.type === 'select-filter') {
309
+ const dataSource = filter.widget.options?.['dataSource'];
310
+ const textField = filter.widget.options?.['textField'];
311
+ const valueField = filter.widget.options?.['valueField'];
312
+ if (dataSource?.config?.byKey) {
313
+ if (Array.isArray(val)) {
314
+ const results = await Promise.all(val.map((v) => dataSource.config.byKey(v)));
315
+ return results.map((data) => data[textField]).join(', ');
316
+ }
317
+ else {
318
+ const data = (await dataSource.config.byKey(val));
319
+ return data[textField];
320
+ }
321
+ }
322
+ else if (Array.isArray(dataSource)) {
323
+ if (Array.isArray(val)) {
324
+ return dataSource.map((data) => data[textField]).join(', ');
325
+ }
326
+ else {
327
+ const record = dataSource.find((d) => d[valueField] === val);
328
+ return record ? record[textField] : '';
329
+ }
330
+ }
331
+ }
332
+ return typeof val === 'object' && !Array.isArray(val)
333
+ ? `${this.convertIfISOStringDate(val.from)} and ${this.convertIfISOStringDate(val.to)}`
334
+ : this.convertIfISOStringDate(val);
335
+ };
336
+ this.convertIfISOStringDate = (val) => {
337
+ const isISOStringDate = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(val);
338
+ if (isISOStringDate) {
339
+ return this.calendarService.convert(val).date.toLocaleDateString();
340
+ }
341
+ return val;
342
+ };
343
+ this.filterFields = () => {
344
+ return this.vm.filtersDef.filter((f) => f.title.toUpperCase().includes(this.tagBox()?.inputValue()?.toUpperCase() || '') &&
345
+ !this.selectedFilters().some((sf) => sf.field === f.field &&
346
+ sf.operator?.type === (this.context()[sf.field]?.operation?.type || f.operator?.type)));
347
+ };
348
+ this.#effect = effect(() => {
349
+ const context = untracked(() => this.context());
350
+ const convertedFilters = this.selectedFilters().map((f) => ({
351
+ field: f.field,
352
+ operator: context[f.field]?.operation,
353
+ value: context[f.field]?.value,
354
+ }));
355
+ const newContext = {};
356
+ convertedFilters.forEach((cf) => {
357
+ newContext[cf.field] = {
358
+ value: cf.value,
359
+ operation: typeof cf.operator === 'string' ? { type: cf.operator } : cf.operator,
360
+ };
361
+ });
362
+ this.context.set(newContext);
363
+ this.vm.filterQueries.set(convertedFilters);
364
+ this.vm.applyFilterAndSort();
365
+ untracked(() => this.deactivateAllListItems());
366
+ });
367
+ this.#effect2 = effect(() => {
368
+ const filters = this.selectedFilters();
369
+ const context = this.context();
370
+ Promise.all(filters.map(async (filter) => {
371
+ console.log({ filter });
372
+ const val = context[filter.field]?.value;
373
+ const displayValue = await this.getDisplayValue(filter, val);
374
+ return {
375
+ ...filter,
376
+ query: `${this.translate.translateSync(filter.title)} ${this.getActiveOperator(filter)} '${displayValue}'`,
377
+ // readOnly: true,
378
+ };
379
+ })).then((results) => {
380
+ this.asyncTags.set(results);
381
+ });
382
+ });
383
+ }
384
+ convertQueriesToDefinitions(queries) {
385
+ const properties = this.vm.properties;
386
+ return queries.map((q) => {
387
+ const property = properties.find((p) => p.name === q.name);
388
+ return {
389
+ field: q.name,
390
+ operator: q.operator,
391
+ value: q.value,
392
+ title: property?.title || '',
393
+ widget: {
394
+ type: property?.schema.interface?.type,
395
+ options: property?.schema.interface?.options,
396
+ },
397
+ filterType: {
398
+ inline: property?.options?.filter?.inline?.enabled || false,
399
+ advance: property?.options?.filter?.advance?.enabled || false,
400
+ },
401
+ };
402
+ });
403
+ }
404
+ convertQueriesToContext(queries) {
405
+ return queries.reduce((acc, q) => {
406
+ acc[q.name] = { value: q.value, operation: q.operator };
407
+ return acc;
408
+ }, {});
409
+ }
410
+ ngOnInit() {
411
+ this.tagBoxInput = this.tagBox()?.getHostElement().querySelector('input');
412
+ }
413
+ handleSelectField(field) {
414
+ this.activeFilter.set(field);
415
+ // this.inputValue.set('');
416
+ this.tagBox()?.inputValue.set('');
417
+ }
418
+ handleFieldKeyDown(e, field) {
419
+ if (e.key === 'Enter') {
420
+ this.handleSelectField(field);
421
+ }
422
+ }
423
+ onContextChanged(e) {
424
+ this.context.set(e.data);
425
+ }
426
+ handleApplyFilter() {
427
+ if (this.activeFilter()) {
428
+ this.selectedFilters.update((prev) => [...prev, this.activeFilter()]);
429
+ this.activeFilter.set(null);
430
+ this.popover()?.close();
431
+ }
432
+ }
433
+ handleButtonKeyDown(e) {
434
+ if (this.popover()?.isOpen && !this.activeFilter()) {
435
+ // Find first list item and focus it
436
+ const firstItem = document.querySelector('[axListNavigationItem]');
437
+ if (firstItem) {
438
+ firstItem.focus();
439
+ e?.preventDefault();
440
+ }
441
+ }
442
+ }
443
+ handleKeyDown(e) {
444
+ if (e.nativeEvent?.key === 'ArrowDown') {
445
+ if (this.popover()?.isOpen && !this.activeFilter()) {
446
+ // Find first list item and focus it
447
+ const firstItem = document.querySelector('[axListNavigationItem]');
448
+ if (firstItem) {
449
+ firstItem.focus();
450
+ e.nativeEvent?.preventDefault();
451
+ }
452
+ }
453
+ }
454
+ else {
455
+ this.popover()?.open();
456
+ }
457
+ }
458
+ #effect;
459
+ handleSelectFilters(e) {
460
+ console.log(e);
461
+ this.selectedFilters.update((prev) => {
462
+ return e.value;
463
+ });
464
+ }
465
+ getActiveOperator(filter) {
466
+ if (!filter) {
467
+ return undefined;
468
+ }
469
+ const contextOperation = this.context()?.[filter.field]?.operation?.type;
470
+ const operatorType = contextOperation || filter.operator?.type;
471
+ return ALL_DEFAULT_OPERATORS.find((o) => o.name === operatorType)?.title;
472
+ }
473
+ handleSelectInlineFilter(filter) {
474
+ this.context.update((prev) => ({
475
+ ...prev,
476
+ [filter.field]: {
477
+ value: this.tagBox()?.inputValue(),
478
+ operation: { type: 'contains' },
479
+ },
480
+ }));
481
+ // this.inputValue.set('');
482
+ this.tagBox()?.inputValue.set('');
483
+ this.selectedFilters.update((prev) => [...prev, filter]);
484
+ this.popover()?.close();
485
+ }
486
+ handleInlineFilterKeyDown(e, filter) {
487
+ if (e.key === 'Enter') {
488
+ this.handleSelectInlineFilter(filter);
489
+ }
490
+ }
491
+ handlePopoverClosed(e) {
492
+ this.activeFilter.set(null);
493
+ }
494
+ deactivateAllListItems() {
495
+ if (this.listItems) {
496
+ this.listItems.forEach((item) => {
497
+ if (item.isActive()) {
498
+ item.isActive.set(false);
499
+ }
500
+ });
501
+ }
502
+ }
503
+ #effect2;
504
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityFilterToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
505
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityFilterToolbarComponent, isStandalone: true, selector: "axp-entity-filter-toolbar", inputs: { vm: ["viewModel", "vm"] }, host: { classAttribute: "ax-w-full" }, providers: [], viewQueries: [{ propertyName: "tagBox", first: true, predicate: ["tagBox"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ["caseItem"], descendants: true }], ngImport: i0, template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"'filter.title' | translate | async\"\n #tagBox\n ></ax-tag-box>\n</div>\n\n<ax-popover\n [offsetY]=\"activeFilter() ? -30 : 0\"\n [target]=\"tagBoxInput\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n (onClosed)=\"handlePopoverClosed($event)\"\n [adaptivityEnabled]=\"true\"\n #popover\n>\n <div class=\"md:ax-min-w-72 ax-w-full\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n @if (activeFilter()) {\n <div class=\"ax-flex ax-flex-col ax-lightest-surface ax-rounded-md ax-shadow-md\">\n <ax-header class=\"ax-border-b ax-border-light ax-px-4 ax-py-2\">{{\n activeFilter()?.title! | translate | async\n }}</ax-header>\n <ax-content class=\"ax-p-4\">\n <div class=\"ax-mb-2\">\n <ax-badge [text]=\"getActiveOperator(activeFilter())!\"></ax-badge>\n </div>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n type: activeFilter()?.widget?.type || 'text-editor',\n path: activeFilter()?.field,\n options: activeFilter()?.widget?.options\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ax-content>\n <ax-footer class=\"ax-border-t ax-flex ax-justify-end ax-border-light ax-w-full ax-px-4 ax-py-2\">\n <ax-button class=\"ax-xs\" [text]=\"'apply' | translate | async\" (onClick)=\"handleApplyFilter()\"></ax-button>\n </ax-footer>\n </div>\n }@else {\n <div axListNavigation #list=\"axListNavigation\" class=\"axp-list-items\">\n @if(tagBox.inputValue()){ @for(inlineFilter of inlineFilters(); track inlineFilter.field){\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n tabindex=\"0\"\n (click)=\"handleSelectInlineFilter(inlineFilter)\"\n (keydown)=\"handleInlineFilterKeyDown($event, inlineFilter)\"\n >\n {{ inlineFilter.title | translate | async }} {{ getActiveOperator(inlineFilter) }} '{{ tagBox.inputValue() }}'\n </div>\n }\n <span class=\"ax-w-full ax-border-t ax-border-light ax-my-1\"></span>\n } @for (field of filterFields(); track field.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n (click)=\"handleSelectField(field)\"\n (keydown)=\"handleFieldKeyDown($event, field)\"\n tabindex=\"0\"\n >\n <div class=\"ax-flex ax-items-end ax-gap-2\">\n <ax-icon class=\"ax-w-5\" [class]=\"'fa-light ' + field.icon\"> </ax-icon>\n {{ field.title | translate | async }}\n </div>\n </div>\n }\n </div>\n }\n </axp-widgets-container>\n </div>\n</ax-popover>\n", styles: ["axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i6.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSelectionListModule }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i7$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i8.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i8.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i9.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onPressEnterOrSpace"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i9.AXListNavigationItemDirective, selector: "[axListNavigationItem]", exportAs: ["axListNavigationItem"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
506
+ }
507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityFilterToolbarComponent, decorators: [{
508
+ type: Component,
509
+ args: [{ selector: 'axp-entity-filter-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
510
+ CommonModule,
511
+ FormsModule,
512
+ AXButtonModule,
513
+ AXDecoratorModule,
514
+ AXTranslationModule,
515
+ AXPopoverModule,
516
+ AXSelectionListModule,
517
+ AXTagBoxModule,
518
+ AXPLayoutBuilderModule,
519
+ AXPWidgetsModule,
520
+ AXListNavigationModule,
521
+ AXBadgeModule,
522
+ ], providers: [], host: {
523
+ class: 'ax-w-full',
524
+ }, template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"'filter.title' | translate | async\"\n #tagBox\n ></ax-tag-box>\n</div>\n\n<ax-popover\n [offsetY]=\"activeFilter() ? -30 : 0\"\n [target]=\"tagBoxInput\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n (onClosed)=\"handlePopoverClosed($event)\"\n [adaptivityEnabled]=\"true\"\n #popover\n>\n <div class=\"md:ax-min-w-72 ax-w-full\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n @if (activeFilter()) {\n <div class=\"ax-flex ax-flex-col ax-lightest-surface ax-rounded-md ax-shadow-md\">\n <ax-header class=\"ax-border-b ax-border-light ax-px-4 ax-py-2\">{{\n activeFilter()?.title! | translate | async\n }}</ax-header>\n <ax-content class=\"ax-p-4\">\n <div class=\"ax-mb-2\">\n <ax-badge [text]=\"getActiveOperator(activeFilter())!\"></ax-badge>\n </div>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n type: activeFilter()?.widget?.type || 'text-editor',\n path: activeFilter()?.field,\n options: activeFilter()?.widget?.options\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ax-content>\n <ax-footer class=\"ax-border-t ax-flex ax-justify-end ax-border-light ax-w-full ax-px-4 ax-py-2\">\n <ax-button class=\"ax-xs\" [text]=\"'apply' | translate | async\" (onClick)=\"handleApplyFilter()\"></ax-button>\n </ax-footer>\n </div>\n }@else {\n <div axListNavigation #list=\"axListNavigation\" class=\"axp-list-items\">\n @if(tagBox.inputValue()){ @for(inlineFilter of inlineFilters(); track inlineFilter.field){\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n tabindex=\"0\"\n (click)=\"handleSelectInlineFilter(inlineFilter)\"\n (keydown)=\"handleInlineFilterKeyDown($event, inlineFilter)\"\n >\n {{ inlineFilter.title | translate | async }} {{ getActiveOperator(inlineFilter) }} '{{ tagBox.inputValue() }}'\n </div>\n }\n <span class=\"ax-w-full ax-border-t ax-border-light ax-my-1\"></span>\n } @for (field of filterFields(); track field.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n (click)=\"handleSelectField(field)\"\n (keydown)=\"handleFieldKeyDown($event, field)\"\n tabindex=\"0\"\n >\n <div class=\"ax-flex ax-items-end ax-gap-2\">\n <ax-icon class=\"ax-w-5\" [class]=\"'fa-light ' + field.icon\"> </ax-icon>\n {{ field.title | translate | async }}\n </div>\n </div>\n }\n </div>\n }\n </axp-widgets-container>\n </div>\n</ax-popover>\n", styles: ["axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"] }]
525
+ }], ctorParameters: () => [], propDecorators: { vm: [{
526
+ type: Input,
527
+ args: ['viewModel']
528
+ }], listItems: [{
529
+ type: ViewChildren,
530
+ args: ['caseItem']
531
+ }] } });
532
+
533
+ class AXPEntityViewToolbarComponent {
534
+ constructor() {
535
+ this.tabs = viewChild('tabs');
536
+ this.isMounted = signal(false);
537
+ this.#effect = effect(() => {
538
+ if (!this.isMounted())
539
+ return;
540
+ const views = untracked(() => this.vm.views());
541
+ if (!views)
542
+ return;
543
+ const selectedTab = views.findIndex((v) => v.name == this.vm.view().name);
544
+ untracked(() => {
545
+ if (selectedTab != -1) {
546
+ this.tabs()?.select(selectedTab);
547
+ }
548
+ });
549
+ });
550
+ }
551
+ ngAfterViewInit() {
552
+ this.isMounted.set(true);
553
+ }
554
+ #effect;
555
+ handleActiveChange(e) {
556
+ console.log(e);
557
+ }
558
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityViewToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
559
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityViewToolbarComponent, isStandalone: true, selector: "axp-entity-view-toolbar", inputs: { vm: ["viewModel", "vm"] }, host: { classAttribute: "ax-w-full" }, viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-tabs #tabs [look]=\"'with-line'\" class=\"ax-font-semibold\">\n @for (item of vm.views(); track item.name) {\n <ax-tab-item\n (onClick)=\"vm.setView(item.name)\"\n [key]=\"item.name\"\n [text]=\"(item.title | translate | async) || 'item.title'\"\n >\n </ax-tab-item>\n }\n</ax-tabs>\n", styles: ["axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i8$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i8$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
560
+ }
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityViewToolbarComponent, decorators: [{
562
+ type: Component,
563
+ args: [{ selector: 'axp-entity-view-toolbar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXTranslationModule, AXTextBoxModule, AXTabsModule], host: {
564
+ class: 'ax-w-full',
565
+ }, template: "<ax-tabs #tabs [look]=\"'with-line'\" class=\"ax-font-semibold\">\n @for (item of vm.views(); track item.name) {\n <ax-tab-item\n (onClick)=\"vm.setView(item.name)\"\n [key]=\"item.name\"\n [text]=\"(item.title | translate | async) || 'item.title'\"\n >\n </ax-tab-item>\n }\n</ax-tabs>\n", styles: ["axp-layout-title{display:block;width:100%;font-weight:600}axp-layout-description{display:block;width:100%;font-size:.875rem;line-height:1.25rem;opacity:.65}axp-layout-actions{display:flex;align-items:center;gap:.75rem}axp-layout-actions axp-layout-actions-primary{display:flex;align-items:center;gap:.75rem}axp-layout-footer,axp-layout-toolbar,axp-layout-header,axp-page-header,axp-page-footer,axp-page-toolbar{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-prefix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-prefix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-prefix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-prefix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-prefix,axp-page-toolbar>axp-layout-suffix{display:flex;flex-direction:row;align-items:center;gap:.5rem}axp-layout-footer>axp-layout-prefix,axp-layout-toolbar>axp-layout-prefix,axp-layout-header>axp-layout-prefix,axp-page-header>axp-layout-prefix,axp-page-footer>axp-layout-prefix,axp-page-toolbar>axp-layout-prefix{order:-9999}axp-layout-footer>axp-layout-suffix,axp-layout-toolbar>axp-layout-suffix,axp-layout-header>axp-layout-suffix,axp-page-header>axp-layout-suffix,axp-page-footer>axp-layout-suffix,axp-page-toolbar>axp-layout-suffix{order:9999;margin-inline-start:auto}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"] }]
566
+ }], ctorParameters: () => [], propDecorators: { vm: [{
567
+ type: Input,
568
+ args: ['viewModel']
569
+ }] } });
570
+
571
+ class AXPEntityMasterToolbarViewComponent {
572
+ constructor() {
573
+ this.layoutService = inject(AXPLayoutThemeService);
574
+ this.parent = inject(AXPEntityMasterListViewComponent);
575
+ }
576
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
577
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityMasterToolbarViewComponent, isStandalone: true, selector: "axp-entity-master-toolbar-view", inputs: { vm: ["viewModel", "vm"] }, host: { classAttribute: "ax-w-full" }, ngImport: i0, template: "<axp-entity-view-toolbar [viewModel]=\"vm\"></axp-entity-view-toolbar>\n<div class=\"ax-flex ax-items-center ax-gap-2 ax-border-b ax-border-light w-full\">\n <axp-entity-filter-toolbar [viewModel]=\"vm\"></axp-entity-filter-toolbar>\n\n <div class=\"ax-flex ax-items-center ax-gap-1 md:ax-gap-2\">\n <ax-button [iconOnly]=\"true\" #columnButton [color]=\"'default'\">\n <i class=\"fa-light fa-table-columns\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"30\"\n [target]=\"columnButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.columns' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-list-view-option-columns [viewModel]=\"vm\"></axp-list-view-option-columns>\n </div>\n </div>\n </ax-popover>\n @if(vm.canSort()) {\n <ax-button [iconOnly]=\"true\" [text]=\"'Sorts'\" #sortButton [color]=\"'default'\">\n <i class=\"fa-light fa-sort-amount-up\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"sortButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.sorts' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-list-view-option-sorting [viewModel]=\"vm\"></axp-list-view-option-sorting>\n </div>\n </div>\n </ax-popover>\n } @if(layoutService.isSmall()){\n <ax-button (onClick)=\"parent.toggleCategoryDrawer()\" [iconOnly]=\"true\" [color]=\"'default'\">\n <i class=\"fa-light fa-bars\"></i>\n </ax-button>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }, { kind: "component", type: AXPEntityFilterToolbarComponent, selector: "axp-entity-filter-toolbar", inputs: ["viewModel"] }, { kind: "component", type: AXPEntityViewToolbarComponent, selector: "axp-entity-view-toolbar", inputs: ["viewModel"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i6.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPListViewOptionSortingComponent, selector: "axp-list-view-option-sorting", inputs: ["viewModel"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionsColumnsComponent, selector: "axp-list-view-option-columns", inputs: ["viewModel"], outputs: ["onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
578
+ }
579
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, decorators: [{
580
+ type: Component,
581
+ args: [{ selector: 'axp-entity-master-toolbar-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
582
+ CommonModule,
583
+ AXButtonModule,
584
+ AXDecoratorModule,
585
+ AXTranslationModule,
586
+ AXPEntityFilterToolbarComponent,
587
+ AXPEntityViewToolbarComponent,
588
+ AXPopoverModule,
589
+ AXPListViewOptionSortingComponent,
590
+ AXPListViewOptionsColumnsComponent,
591
+ ], host: {
592
+ class: 'ax-w-full',
593
+ }, template: "<axp-entity-view-toolbar [viewModel]=\"vm\"></axp-entity-view-toolbar>\n<div class=\"ax-flex ax-items-center ax-gap-2 ax-border-b ax-border-light w-full\">\n <axp-entity-filter-toolbar [viewModel]=\"vm\"></axp-entity-filter-toolbar>\n\n <div class=\"ax-flex ax-items-center ax-gap-1 md:ax-gap-2\">\n <ax-button [iconOnly]=\"true\" #columnButton [color]=\"'default'\">\n <i class=\"fa-light fa-table-columns\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"30\"\n [target]=\"columnButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.columns' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-list-view-option-columns [viewModel]=\"vm\"></axp-list-view-option-columns>\n </div>\n </div>\n </ax-popover>\n @if(vm.canSort()) {\n <ax-button [iconOnly]=\"true\" [text]=\"'Sorts'\" #sortButton [color]=\"'default'\">\n <i class=\"fa-light fa-sort-amount-up\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"sortButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.sorts' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-list-view-option-sorting [viewModel]=\"vm\"></axp-list-view-option-sorting>\n </div>\n </div>\n </ax-popover>\n } @if(layoutService.isSmall()){\n <ax-button (onClick)=\"parent.toggleCategoryDrawer()\" [iconOnly]=\"true\" [color]=\"'default'\">\n <i class=\"fa-light fa-bars\"></i>\n </ax-button>\n }\n </div>\n</div>\n" }]
594
+ }], propDecorators: { vm: [{
595
+ type: Input,
596
+ args: ['viewModel']
597
+ }] } });
598
+
599
+ class AXPEntityMasterListViewComponent extends AXPBasePageComponent {
600
+ constructor(platform) {
601
+ super();
602
+ this.platform = platform;
603
+ this.activeRoute = inject(ActivatedRoute);
604
+ this.vm = this.activeRoute.snapshot.data['vm'];
605
+ //
606
+ this.store = inject(AXPLayoutThemeService);
607
+ //
608
+ this.searchBarShown = signal(true);
609
+ this.activeEndSideView = signal('column');
610
+ this.categorySearchValue = signal('');
611
+ // @ViewChild('grid', { static: true}) grid: AXDataTableComponent;
612
+ this.grid = viewChild('grid');
613
+ this.commandRowItems = computed(() => {
614
+ return this.vm.primaryRowActions().map((c) => {
615
+ return {
616
+ icon: c.icon,
617
+ name: c.name,
618
+ text: translateSync(c.title),
619
+ color: c.color,
620
+ disabled: c.disabled,
621
+ };
622
+ });
623
+ });
624
+ this.getDropdownRowItems = (rowData) => {
625
+ return Promise.resolve(this.dropdownRowItems(rowData));
626
+ };
627
+ this.getCommandRowItems = () => {
628
+ return this.commandRowItems();
629
+ };
630
+ effect(() => {
631
+ if (this.grid()) {
632
+ this.grid().selectedRows = this.vm.selectedItems();
633
+ }
634
+ });
635
+ //
636
+ this.vm.events$.subscribe(async (e) => {
637
+ const refreshTargetId = e.meta?.refreshTargetId;
638
+ if (e.action == 'refresh') {
639
+ if (refreshTargetId) {
640
+ this.grid()?.refreshItemChildren(refreshTargetId);
641
+ }
642
+ else {
643
+ this.grid()?.refresh();
644
+ }
645
+ }
646
+ });
647
+ }
648
+ ngAfterViewInit() {
649
+ this.vm.setView();
650
+ }
651
+ // protected closeFiltersDrawer(e: AXDrawerComponent, collapsed: boolean) {
652
+ // if (collapsed) {
653
+ // e.close();
654
+ // this.vm.discardFilters();
655
+ // }
656
+ // }
657
+ // handleChangeSearchValue(e: AXValueChangedEvent) {
658
+ // if (e.isUserInteraction) {
659
+ // this.vm.applyInlineFilter(e.value);
660
+ // }
661
+ // }
662
+ onColumnSizeChanged(e) {
663
+ if (e.isUserInteraction && e.type === 'end') {
664
+ this.vm.saveSettings('columnSizes', e.data);
665
+ }
666
+ }
667
+ onPageChanged(e) {
668
+ if (e.isUserInteraction) {
669
+ const pageSizeChanged = e.take != this.vm.dataSource.pageSize;
670
+ if (pageSizeChanged) {
671
+ this.vm.saveSettings('pageSize', e.take);
672
+ }
673
+ }
674
+ }
675
+ async dropdownRowItems(rowData) {
676
+ return (await this.vm.secondaryRowActions(rowData)).map((c) => ({
677
+ icon: c.icon,
678
+ name: c.name,
679
+ text: translateSync(c.title),
680
+ color: c.color,
681
+ disabled: c.disabled,
682
+ }));
683
+ }
684
+ async handleRowDbClick(e) {
685
+ //TODO: find a way for default action
686
+ const item = [...this.commandRowItems(), ...(await this.dropdownRowItems(e.data))][0];
687
+ if (item) {
688
+ const d = {
689
+ component: e.component,
690
+ name: item.name,
691
+ data: e.data,
692
+ };
693
+ this.handleRowCommandClick(d);
694
+ }
695
+ }
696
+ async handleRowCommandClick(e) {
697
+ this.vm.executeCommand(e.name, e.data);
698
+ }
699
+ async handleSelectedRowsChange(rows) {
700
+ this.vm.selectedItems.set(rows);
701
+ }
702
+ makeResponsive(value) {
703
+ if (this.platform.is('Mobile') || this.platform.is('SM')) {
704
+ return '';
705
+ }
706
+ else {
707
+ return value;
708
+ }
709
+ }
710
+ toggleSideBar(sideBar) {
711
+ this.toggleEndSide();
712
+ if (sideBar) {
713
+ this.activeEndSideView.set(sideBar);
714
+ }
715
+ }
716
+ toggleSearchBar() {
717
+ this.searchBarShown.update((v) => !v);
718
+ }
719
+ handleResetClick(sideBar) {
720
+ switch (sideBar) {
721
+ case 'filter': {
722
+ this.vm.resetFilters();
723
+ break;
724
+ }
725
+ case 'sort': {
726
+ this.vm.resetSorts();
727
+ break;
728
+ }
729
+ case 'column': {
730
+ this.vm.resetColumns();
731
+ break;
732
+ }
733
+ }
734
+ }
735
+ // protected handleDiscardClick(sideBar: 'filter' | 'sort' | 'column') {
736
+ // switch (sideBar) {
737
+ // case 'filter': {
738
+ // this.vm.discardFilters();
739
+ // break;
740
+ // }
741
+ // case 'sort': {
742
+ // this.vm.resetSorts();
743
+ // break;
744
+ // }
745
+ // case 'column': {
746
+ // this.vm.resetColumns();
747
+ // break;
748
+ // }
749
+ // }
750
+ // }
751
+ handleApplyClick(sideBar) {
752
+ this.vm.applyFilterAndSort();
753
+ this.toggleEndSide();
754
+ }
755
+ ngOnDestroy() {
756
+ this.vm.destroy();
757
+ }
758
+ toggleCategoryDrawer() {
759
+ this.toggleStartSide();
760
+ }
761
+ getPageTitle() {
762
+ return this.vm.title();
763
+ }
764
+ async getPageDescription() {
765
+ const description = this.vm.description();
766
+ if (description) {
767
+ return this.translateService.translateAsync(description);
768
+ }
769
+ return '';
770
+ }
771
+ getPageBreadcrumbs() {
772
+ return this.vm.beardcrumbs();
773
+ }
774
+ async getPrimaryMenuItems() {
775
+ return this.vm.primaryActions().map((tr) => ({
776
+ name: tr.name,
777
+ title: tr.title,
778
+ icon: tr.icon,
779
+ color: tr.color,
780
+ disabled: tr.disabled,
781
+ command: {
782
+ name: tr.name,
783
+ options: tr.options,
784
+ metadata: tr.metadata,
785
+ },
786
+ }));
787
+ }
788
+ async getSecondaryMenuItems() {
789
+ return this.vm.secondaryActions().map((tr) => ({
790
+ name: tr.name,
791
+ title: tr.title,
792
+ icon: tr.icon,
793
+ color: tr.color,
794
+ disabled: tr.disabled,
795
+ separated: tr.separated,
796
+ }));
797
+ }
798
+ async execute(command) {
799
+ if (command) {
800
+ this.vm.execute(command);
801
+ }
802
+ }
803
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterListViewComponent, deps: [{ token: i1$1.AXPlatform }], target: i0.ɵɵFactoryTarget.Component }); }
804
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityMasterListViewComponent, isStandalone: true, selector: "axp-entity-master-list", providers: [
805
+ {
806
+ provide: AXPBasePage,
807
+ useExisting: AXPEntityMasterListViewComponent,
808
+ },
809
+ ], viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if(vm.entityDef.category){\n <axp-layout-start-side>\n <axp-entity-category class=\"ax-w-80\" [vm]=\"vm\" [searchValue]=\"categorySearchValue()\"></axp-entity-category>\n </axp-layout-start-side>\n }\n <axp-page-toolbar>\n <axp-entity-master-toolbar-view [viewModel]=\"vm\"></axp-entity-master-toolbar-view>\n </axp-page-toolbar>\n <axp-page-content>\n <ax-data-table\n #grid\n [showFooter]=\"false\"\n class=\"ax-flex-1\"\n [paging]=\"true\"\n [fetchDataMode]=\"'manual'\"\n [parentField]=\"vm.parentKey()\"\n [loading]=\"{ enabled: true, animation: true }\"\n [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\"\n (onRowDbClick)=\"handleRowDbClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n >\n @if(vm.view().indexCol === true){\n <ax-index-column fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n } @if(vm.selectedScopeActionsCount()){\n <ax-select-column fixed=\"start\" [width]=\"'60px'\"></ax-select-column>\n } @for(col of vm.columns();track col.name) { @if(col.visible) {\n <axp-widget-column-renderer\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\"\n [customWidth]=\"col.width\"\n ></axp-widget-column-renderer>\n } } @if(getCommandRowItems().length){\n <ax-command-column\n fixed=\"end\"\n [width]=\"getCommandRowItems().length * 60 + 'px'\"\n [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n }\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axp-entity-master-list axp-layout-start-side{min-width:20rem!important;border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}.view-drawer{width:85vw}@media (min-width: 768px){.view-drawer{width:45vw}}@media (min-width: 1024px){.view-drawer{width:35vw}}@media (min-width: 1536px){.view-drawer{width:20vw}}.view-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));border-inline-start-width:1px;border-inline-start-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));border-top-width:1px;--tw-border-opacity: 1;border-top-color:rgba(var(--ax-sys-color-primary-600),var(--tw-border-opacity, 1))}.view-drawer ax-header{display:flex;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1));padding:.5rem 1rem}.view-drawer ax-header h2{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lighter-surface),var(--tw-text-opacity, 1))}.view-drawer ax-footer{position:absolute!important;bottom:0!important;width:100%!important;justify-content:flex-start!important;border-top-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1))!important;padding:.5rem 1rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXActionSheetModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i8$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i8$2.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero"] }, { kind: "component", type: i8$2.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i8$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i8$2.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }, { kind: "directive", type: i4$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type:
810
+ //
811
+ AXPLayoutBuilderModule }, { kind: "component", type: i8.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "component", type:
812
+ //
813
+ AXPEntityMasterToolbarViewComponent, selector: "axp-entity-master-toolbar-view", inputs: ["viewModel"] }, { kind: "component", type:
814
+ //
815
+ AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer, axp-page-header, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-container, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutStartSideComponent, selector: "axp-layout-page-start-side, axp-layout-start-side" }, { kind: "component", type: AXPEntityCategoryComponent, selector: "axp-entity-category", inputs: ["vm", "searchValue"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
816
+ }
817
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterListViewComponent, decorators: [{
818
+ type: Component,
819
+ args: [{ selector: 'axp-entity-master-list', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
820
+ CommonModule,
821
+ FormsModule,
822
+ RouterModule,
823
+ AXButtonModule,
824
+ AXDecoratorModule,
825
+ AXBadgeModule,
826
+ AXDropdownModule,
827
+ AXPopoverModule,
828
+ AXFormModule,
829
+ AXActionSheetModule,
830
+ AXDrawerModule,
831
+ AXDialogModule,
832
+ AXLoadingModule,
833
+ AXTabsModule,
834
+ AXTooltipModule,
835
+ AXBreadcrumbsModule,
836
+ AXDropdownButtonModule,
837
+ AXSearchBoxModule,
838
+ AXDataTableModule,
839
+ AXTranslationModule,
840
+ DragDropModule,
841
+ //
842
+ AXPLayoutBuilderModule,
843
+ AXPWidgetsModule,
844
+ AXPAuthModule,
845
+ //
846
+ AXPEntityMasterToolbarViewComponent,
847
+ //
848
+ AXPPageLayoutComponent,
849
+ AXPThemeLayoutBlockComponent,
850
+ AXDropdownButtonModule,
851
+ AXPThemeLayoutStartSideComponent,
852
+ AXPEntityCategoryComponent,
853
+ ], providers: [
854
+ {
855
+ provide: AXPBasePage,
856
+ useExisting: AXPEntityMasterListViewComponent,
857
+ },
858
+ ], template: "<axp-page-layout *translate=\"let t\">\n @if(vm.entityDef.category){\n <axp-layout-start-side>\n <axp-entity-category class=\"ax-w-80\" [vm]=\"vm\" [searchValue]=\"categorySearchValue()\"></axp-entity-category>\n </axp-layout-start-side>\n }\n <axp-page-toolbar>\n <axp-entity-master-toolbar-view [viewModel]=\"vm\"></axp-entity-master-toolbar-view>\n </axp-page-toolbar>\n <axp-page-content>\n <ax-data-table\n #grid\n [showFooter]=\"false\"\n class=\"ax-flex-1\"\n [paging]=\"true\"\n [fetchDataMode]=\"'manual'\"\n [parentField]=\"vm.parentKey()\"\n [loading]=\"{ enabled: true, animation: true }\"\n [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\"\n (onRowDbClick)=\"handleRowDbClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n >\n @if(vm.view().indexCol === true){\n <ax-index-column fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n } @if(vm.selectedScopeActionsCount()){\n <ax-select-column fixed=\"start\" [width]=\"'60px'\"></ax-select-column>\n } @for(col of vm.columns();track col.name) { @if(col.visible) {\n <axp-widget-column-renderer\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\"\n [customWidth]=\"col.width\"\n ></axp-widget-column-renderer>\n } } @if(getCommandRowItems().length){\n <ax-command-column\n fixed=\"end\"\n [width]=\"getCommandRowItems().length * 60 + 'px'\"\n [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n }\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axp-entity-master-list axp-layout-start-side{min-width:20rem!important;border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}.view-drawer{width:85vw}@media (min-width: 768px){.view-drawer{width:45vw}}@media (min-width: 1024px){.view-drawer{width:35vw}}@media (min-width: 1536px){.view-drawer{width:20vw}}.view-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));border-inline-start-width:1px;border-inline-start-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));border-top-width:1px;--tw-border-opacity: 1;border-top-color:rgba(var(--ax-sys-color-primary-600),var(--tw-border-opacity, 1))}.view-drawer ax-header{display:flex;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1));padding:.5rem 1rem}.view-drawer ax-header h2{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lighter-surface),var(--tw-text-opacity, 1))}.view-drawer ax-footer{position:absolute!important;bottom:0!important;width:100%!important;justify-content:flex-start!important;border-top-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1))!important;padding:.5rem 1rem!important}\n"] }]
859
+ }], ctorParameters: () => [{ type: i1$1.AXPlatform }] });
860
+
861
+ export { AXPEntityMasterListViewComponent };
862
+ //# sourceMappingURL=acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs.map