@acorex/modules 19.3.6 → 19.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/auth/lib/pages/account/account.module.d.ts +1 -1
  2. package/common/lib/features/global-search/search.module.d.ts +1 -1
  3. package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.d.ts +38 -5
  4. package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.store.d.ts +40 -1
  5. package/dashboard-management/lib/features/home-dashboard/dashboard-popups/add-dashboard-popup.d.ts +7 -7
  6. package/dashboard-management/lib/features/shared/widgets/bar-chart/bar-chart-widget.component.d.ts +4 -3
  7. package/dashboard-management/lib/features/shared/widgets/donut-chart/donut-chart-widget.component.d.ts +4 -3
  8. package/dashboard-management/lib/features/shared/widgets/gauge-chart/gauge-chart-widget.component.d.ts +3 -2
  9. package/dashboard-management/lib/features/shared/widgets/line-chart/line-chart-widget.component.d.ts +1 -0
  10. package/document-management/lib/badge.provider.d.ts +1 -1
  11. package/document-management/lib/features/drive/drive.component.d.ts +2 -2
  12. package/document-management/lib/features/shared/document-manager.service.d.ts +2 -1
  13. package/document-management/lib/features/shared/document-manager.types.d.ts +3 -0
  14. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +5 -4
  15. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-bj5xztse.mjs → acorex-modules-auth-acorex-modules-auth-BhTLWa3y.mjs} +14 -13
  16. package/fesm2022/acorex-modules-auth-acorex-modules-auth-BhTLWa3y.mjs.map +1 -0
  17. package/fesm2022/{acorex-modules-auth-app-chooser.component-BOL3VzC1.mjs → acorex-modules-auth-app-chooser.component-J5vGfv56.mjs} +2 -2
  18. package/fesm2022/{acorex-modules-auth-app-chooser.component-BOL3VzC1.mjs.map → acorex-modules-auth-app-chooser.component-J5vGfv56.mjs.map} +1 -1
  19. package/fesm2022/{acorex-modules-auth-login.module-C1AoXhCI.mjs → acorex-modules-auth-login.module-DUlctvyx.mjs} +4 -4
  20. package/fesm2022/{acorex-modules-auth-login.module-C1AoXhCI.mjs.map → acorex-modules-auth-login.module-DUlctvyx.mjs.map} +1 -1
  21. package/fesm2022/{acorex-modules-auth-master.layout-vuHfrDxu.mjs → acorex-modules-auth-master.layout-BFCxBj8H.mjs} +6 -5
  22. package/fesm2022/acorex-modules-auth-master.layout-BFCxBj8H.mjs.map +1 -0
  23. package/fesm2022/{acorex-modules-auth-password.component-Dtcz95NV.mjs → acorex-modules-auth-password.component-CPpJug_X.mjs} +2 -2
  24. package/fesm2022/{acorex-modules-auth-password.component-Dtcz95NV.mjs.map → acorex-modules-auth-password.component-CPpJug_X.mjs.map} +1 -1
  25. package/fesm2022/{acorex-modules-auth-password.component-C71v2x71.mjs → acorex-modules-auth-password.component-CSE7_3Ey.mjs} +2 -2
  26. package/fesm2022/{acorex-modules-auth-password.component-C71v2x71.mjs.map → acorex-modules-auth-password.component-CSE7_3Ey.mjs.map} +1 -1
  27. package/fesm2022/{acorex-modules-auth-routes-lJgHFaQR.mjs → acorex-modules-auth-routes-BSk5njsU.mjs} +2 -2
  28. package/fesm2022/{acorex-modules-auth-routes-lJgHFaQR.mjs.map → acorex-modules-auth-routes-BSk5njsU.mjs.map} +1 -1
  29. package/fesm2022/{acorex-modules-auth-two-factor.module-C9SfEHF7.mjs → acorex-modules-auth-two-factor.module-D3mhXLXx.mjs} +2 -2
  30. package/fesm2022/{acorex-modules-auth-two-factor.module-C9SfEHF7.mjs.map → acorex-modules-auth-two-factor.module-D3mhXLXx.mjs.map} +1 -1
  31. package/fesm2022/{acorex-modules-auth-user-sessions.component-CCsoLecU.mjs → acorex-modules-auth-user-sessions.component-COeH4jjg.mjs} +2 -2
  32. package/fesm2022/{acorex-modules-auth-user-sessions.component-CCsoLecU.mjs.map → acorex-modules-auth-user-sessions.component-COeH4jjg.mjs.map} +1 -1
  33. package/fesm2022/acorex-modules-auth.mjs +1 -1
  34. package/fesm2022/{acorex-modules-common-search-popup.component-D1Ddwc_U.mjs → acorex-modules-common-search-popup.component-tUvSQpDP.mjs} +5 -5
  35. package/fesm2022/acorex-modules-common-search-popup.component-tUvSQpDP.mjs.map +1 -0
  36. package/fesm2022/acorex-modules-common.mjs +5 -4
  37. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  38. package/fesm2022/acorex-modules-dashboard-management.mjs +1136 -1231
  39. package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
  40. package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-k2QMxYk9.mjs → acorex-modules-document-management-acorex-modules-document-management-BcgxVPuR.mjs} +120 -61
  41. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-BcgxVPuR.mjs.map +1 -0
  42. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-BHCuKbmu.mjs → acorex-modules-document-management-attachment-widget.component-Cwa7HuUo.mjs} +4 -4
  43. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-BHCuKbmu.mjs.map → acorex-modules-document-management-attachment-widget.component-Cwa7HuUo.mjs.map} +1 -1
  44. package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-CNvlm2Va.mjs → acorex-modules-document-management-create-folder-dialog.component-BN0pWX7a.mjs} +2 -2
  45. package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-CNvlm2Va.mjs.map → acorex-modules-document-management-create-folder-dialog.component-BN0pWX7a.mjs.map} +1 -1
  46. package/fesm2022/{acorex-modules-document-management-details-view.component-DE84Itc_.mjs → acorex-modules-document-management-details-view.component-DXn54h2g.mjs} +2 -2
  47. package/fesm2022/{acorex-modules-document-management-details-view.component-DE84Itc_.mjs.map → acorex-modules-document-management-details-view.component-DXn54h2g.mjs.map} +1 -1
  48. package/fesm2022/{acorex-modules-document-management-drive-choose.component-CKMI_oKM.mjs → acorex-modules-document-management-drive-choose.component-CTrPj9t3.mjs} +2 -2
  49. package/fesm2022/{acorex-modules-document-management-drive-choose.component-CKMI_oKM.mjs.map → acorex-modules-document-management-drive-choose.component-CTrPj9t3.mjs.map} +1 -1
  50. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BPY3z02r.mjs → acorex-modules-document-management-large-icons-view.component-DwAyEZUU.mjs} +2 -2
  51. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BPY3z02r.mjs.map → acorex-modules-document-management-large-icons-view.component-DwAyEZUU.mjs.map} +1 -1
  52. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-eymKR4xY.mjs → acorex-modules-document-management-large-tiles-view.component-B0n1rs-g.mjs} +2 -2
  53. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-eymKR4xY.mjs.map → acorex-modules-document-management-large-tiles-view.component-B0n1rs-g.mjs.map} +1 -1
  54. package/fesm2022/{acorex-modules-document-management-list-view.component-CGSls2hG.mjs → acorex-modules-document-management-list-view.component-CIAQBAcy.mjs} +2 -2
  55. package/fesm2022/{acorex-modules-document-management-list-view.component-CGSls2hG.mjs.map → acorex-modules-document-management-list-view.component-CIAQBAcy.mjs.map} +1 -1
  56. package/fesm2022/{acorex-modules-document-management-permission-definition.provider-DROTONyx.mjs → acorex-modules-document-management-permission-definition.provider-BBXmMuIh.mjs} +3 -3
  57. package/fesm2022/acorex-modules-document-management-permission-definition.provider-BBXmMuIh.mjs.map +1 -0
  58. package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-BPU5NKy8.mjs → acorex-modules-document-management-rename-node-dialog.component-D28zKZqZ.mjs} +2 -2
  59. package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-BPU5NKy8.mjs.map → acorex-modules-document-management-rename-node-dialog.component-D28zKZqZ.mjs.map} +1 -1
  60. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-CYjLGCUJ.mjs → acorex-modules-document-management-small-icons-view.component-Dg5nb2yW.mjs} +2 -2
  61. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-CYjLGCUJ.mjs.map → acorex-modules-document-management-small-icons-view.component-Dg5nb2yW.mjs.map} +1 -1
  62. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BnXo0uWh.mjs → acorex-modules-document-management-small-tiles-view.component-BCaQYHQF.mjs} +2 -2
  63. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BnXo0uWh.mjs.map → acorex-modules-document-management-small-tiles-view.component-BCaQYHQF.mjs.map} +1 -1
  64. package/fesm2022/acorex-modules-document-management.mjs +1 -1
  65. package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-Bh0D44Yv.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-KTKkPz-B.mjs} +9 -9
  66. package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-Bh0D44Yv.mjs.map → acorex-modules-form-template-management-acorex-modules-form-template-management-KTKkPz-B.mjs.map} +1 -1
  67. package/fesm2022/{acorex-modules-form-template-management-category.entity-CMez7XCT.mjs → acorex-modules-form-template-management-category.entity-DxgqHkjI.mjs} +2 -2
  68. package/fesm2022/{acorex-modules-form-template-management-category.entity-CMez7XCT.mjs.map → acorex-modules-form-template-management-category.entity-DxgqHkjI.mjs.map} +1 -1
  69. package/fesm2022/{acorex-modules-form-template-management-permission-definition.provider-D_VOBOyf.mjs → acorex-modules-form-template-management-permission-definition.provider-6czJEo8f.mjs} +13 -13
  70. package/fesm2022/acorex-modules-form-template-management-permission-definition.provider-6czJEo8f.mjs.map +1 -0
  71. package/fesm2022/{acorex-modules-form-template-management-settings.provider-CzvnYncE.mjs → acorex-modules-form-template-management-settings.provider-D3nbUDMw.mjs} +2 -2
  72. package/fesm2022/{acorex-modules-form-template-management-settings.provider-CzvnYncE.mjs.map → acorex-modules-form-template-management-settings.provider-D3nbUDMw.mjs.map} +1 -1
  73. package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-CJqwkNDn.mjs → acorex-modules-form-template-management-template-widget-edit.component-BLobMX4C.mjs} +2 -2
  74. package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-CJqwkNDn.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-BLobMX4C.mjs.map} +1 -1
  75. package/fesm2022/{acorex-modules-form-template-management-template.entity-CSUgPKlG.mjs → acorex-modules-form-template-management-template.entity-Ci6QzE16.mjs} +2 -2
  76. package/fesm2022/{acorex-modules-form-template-management-template.entity-CSUgPKlG.mjs.map → acorex-modules-form-template-management-template.entity-Ci6QzE16.mjs.map} +1 -1
  77. package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-DDFNie66.mjs → acorex-modules-form-template-management-viewer-popup.component-DIzlC6tX.mjs} +2 -2
  78. package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-DDFNie66.mjs.map → acorex-modules-form-template-management-viewer-popup.component-DIzlC6tX.mjs.map} +1 -1
  79. package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
  80. package/fesm2022/acorex-modules-notification-management.mjs +3 -3
  81. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  82. package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-CaNP3qwK.mjs → acorex-modules-organization-management-org-chart-configuration.page-DNzhGz5G.mjs} +7 -7
  83. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DNzhGz5G.mjs.map +1 -0
  84. package/fesm2022/{acorex-modules-organization-management-org-chart.page-1UgQCqvl.mjs → acorex-modules-organization-management-org-chart.page-CP8zz-Bc.mjs} +22 -10
  85. package/fesm2022/acorex-modules-organization-management-org-chart.page-CP8zz-Bc.mjs.map +1 -0
  86. package/fesm2022/acorex-modules-organization-management.mjs +117 -5
  87. package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
  88. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-Bh6NW7UJ.mjs → acorex-modules-platform-management-acorex-modules-platform-management-CO8rzxOh.mjs} +16 -15
  89. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-CO8rzxOh.mjs.map +1 -0
  90. package/fesm2022/{acorex-modules-platform-management-list-version.component-Ctqr4YiY.mjs → acorex-modules-platform-management-list-version.component-gWnz7cp6.mjs} +2 -2
  91. package/fesm2022/{acorex-modules-platform-management-list-version.component-Ctqr4YiY.mjs.map → acorex-modules-platform-management-list-version.component-gWnz7cp6.mjs.map} +1 -1
  92. package/fesm2022/{acorex-modules-platform-management-settings.provider-Bz3Npk_t.mjs → acorex-modules-platform-management-settings.provider-JEwENvqy.mjs} +2 -2
  93. package/fesm2022/{acorex-modules-platform-management-settings.provider-Bz3Npk_t.mjs.map → acorex-modules-platform-management-settings.provider-JEwENvqy.mjs.map} +1 -1
  94. package/fesm2022/acorex-modules-platform-management.mjs +1 -1
  95. package/fesm2022/acorex-modules-security-management-permissions-editor.component-Ccx0_9L_.mjs +218 -0
  96. package/fesm2022/acorex-modules-security-management-permissions-editor.component-Ccx0_9L_.mjs.map +1 -0
  97. package/fesm2022/acorex-modules-security-management-permissions-widget-column.component-P2buwWAw.mjs +41 -0
  98. package/fesm2022/acorex-modules-security-management-permissions-widget-column.component-P2buwWAw.mjs.map +1 -0
  99. package/fesm2022/acorex-modules-security-management-permissions-widget-designer.component-CoqOAn_m.mjs +21 -0
  100. package/fesm2022/acorex-modules-security-management-permissions-widget-designer.component-CoqOAn_m.mjs.map +1 -0
  101. package/fesm2022/acorex-modules-security-management-permissions-widget-edit.component-P3adQ1xt.mjs +51 -0
  102. package/fesm2022/acorex-modules-security-management-permissions-widget-edit.component-P3adQ1xt.mjs.map +1 -0
  103. package/fesm2022/acorex-modules-security-management-permissions-widget-print.component-D4lk67fE.mjs +22 -0
  104. package/fesm2022/acorex-modules-security-management-permissions-widget-print.component-D4lk67fE.mjs.map +1 -0
  105. package/fesm2022/acorex-modules-security-management-permissions-widget-view.component-Cz32ewum.mjs +21 -0
  106. package/fesm2022/acorex-modules-security-management-permissions-widget-view.component-Cz32ewum.mjs.map +1 -0
  107. package/fesm2022/acorex-modules-security-management.mjs +185 -18
  108. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  109. package/fesm2022/{acorex-modules-settings-management-setting-page.component-X33xeQrg.mjs → acorex-modules-settings-management-setting-page.component-BgQoPRy_.mjs} +7 -7
  110. package/fesm2022/acorex-modules-settings-management-setting-page.component-BgQoPRy_.mjs.map +1 -0
  111. package/fesm2022/{acorex-modules-settings-management-setting-view.component-DryghOjs.mjs → acorex-modules-settings-management-setting-view.component-CX_FKIxI.mjs} +4 -3
  112. package/fesm2022/acorex-modules-settings-management-setting-view.component-CX_FKIxI.mjs.map +1 -0
  113. package/fesm2022/acorex-modules-settings-management.mjs +3 -3
  114. package/fesm2022/acorex-modules-settings-management.mjs.map +1 -1
  115. package/fesm2022/acorex-modules-training-management.mjs +2 -2
  116. package/fesm2022/acorex-modules-training-management.mjs.map +1 -1
  117. package/form-template-management/index.d.ts +1 -0
  118. package/notification-management/lib/notification-management.module.d.ts +1 -1
  119. package/organization-management/lib/features/employee/employee-feature.module.d.ts +9 -0
  120. package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +2 -2
  121. package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +3 -2
  122. package/organization-management/lib/organization-management.module.d.ts +2 -1
  123. package/package.json +9 -9
  124. package/platform-management/lib/entities/data-source/data-source.service.d.ts +1 -1
  125. package/platform-management/lib/entities/data-source/data-source.types.d.ts +2 -2
  126. package/platform-management/lib/entities/data-source/datasource-provider.dynamic.d.ts +1 -1
  127. package/platform-management/lib/entities/meta-data-definition/meta-data-definition.service.d.ts +2 -2
  128. package/platform-management/lib/entities/meta-data-definition/meta-data-definition.types.d.ts +2 -2
  129. package/platform-management/lib/entities/meta-data-definition-category/category.service.d.ts +1 -1
  130. package/platform-management/lib/entities/meta-data-definition-category/category.types.d.ts +2 -2
  131. package/platform-management/lib/features/app-terms/pages/list/list-terms.component.d.ts +2 -2
  132. package/platform-management/lib/features/common/common.module.d.ts +1 -1
  133. package/platform-management/lib/platform-management.module.d.ts +1 -1
  134. package/security-management/lib/features/permissions/permissions-editor/permissions-editor.component.d.ts +70 -0
  135. package/security-management/lib/features/permissions/permissions-widget/permissions-widget-column.component.d.ts +10 -0
  136. package/security-management/lib/features/permissions/permissions-widget/permissions-widget-designer.component.d.ts +6 -0
  137. package/security-management/lib/features/permissions/permissions-widget/permissions-widget-edit.component.d.ts +8 -0
  138. package/security-management/lib/features/permissions/permissions-widget/permissions-widget-print.component.d.ts +6 -0
  139. package/security-management/lib/features/permissions/permissions-widget/permissions-widget-view.component.d.ts +6 -0
  140. package/security-management/lib/features/permissions/permissions-widget/permissions-widget.config.d.ts +2 -0
  141. package/security-management/lib/features/permissions/permissions.module.d.ts +8 -0
  142. package/security-management/lib/features/permissions/workflows/assign-permissions.workflow.d.ts +10 -0
  143. package/security-management/lib/security-management.module.d.ts +3 -2
  144. package/settings-management/lib/features/settings/setting-page/setting-page.component.d.ts +2 -2
  145. package/fesm2022/acorex-modules-auth-acorex-modules-auth-bj5xztse.mjs.map +0 -1
  146. package/fesm2022/acorex-modules-auth-master.layout-vuHfrDxu.mjs.map +0 -1
  147. package/fesm2022/acorex-modules-common-search-popup.component-D1Ddwc_U.mjs.map +0 -1
  148. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-k2QMxYk9.mjs.map +0 -1
  149. package/fesm2022/acorex-modules-document-management-permission-definition.provider-DROTONyx.mjs.map +0 -1
  150. package/fesm2022/acorex-modules-form-template-management-permission-definition.provider-D_VOBOyf.mjs.map +0 -1
  151. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-CaNP3qwK.mjs.map +0 -1
  152. package/fesm2022/acorex-modules-organization-management-org-chart.page-1UgQCqvl.mjs.map +0 -1
  153. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-Bh6NW7UJ.mjs.map +0 -1
  154. package/fesm2022/acorex-modules-settings-management-setting-page.component-X33xeQrg.mjs.map +0 -1
  155. package/fesm2022/acorex-modules-settings-management-setting-view.component-DryghOjs.mjs.map +0 -1
@@ -3,7 +3,7 @@ import { createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXP_HOME
3
3
  import * as i3$1 from '@acorex/platform/layout/builder';
4
4
  import { AXPWidgetsCatalog, AXPValueWidgetComponent, cloneProperty, AXPWidgetGroupEnum, AXPLayoutWidgetComponent, AXPLayoutBuilderModule, AXPWidgetRendererDirective } from '@acorex/platform/layout/builder';
5
5
  import { AXMEntityCrudServiceImpl, AXPEntityService, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
6
- import { AXP_APPEARANCE_PROPERTY_GROUP, AXP_STYLING_PROPERTY_GROUP, AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXP_BG_COLOR_PROPERTY, plainTextDefaultProperty, AXP_DATA_PROPERTY_GROUP, AXP_COLOR_PROPERTY, AXPWidgetsModule } from '@acorex/platform/widgets';
6
+ import { AXP_APPEARANCE_PROPERTY_GROUP, AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXP_BG_COLOR_PROPERTY, plainTextDefaultProperty, AXP_DATA_PROPERTY_GROUP, AXP_COLOR_PROPERTY, AXPWidgetsModule } from '@acorex/platform/widgets';
7
7
  import * as i0 from '@angular/core';
8
8
  import { Injectable, inject, Injector, computed, ChangeDetectionStrategy, Component, ChangeDetectorRef, signal, viewChild, ElementRef, HostListener, output, InjectionToken, effect, HostBinding, NgModule, input, contentChild, afterNextRender, model, ViewEncapsulation } from '@angular/core';
9
9
  import { AXBarChartComponent } from '@acorex/charts/bar-chart';
@@ -53,8 +53,9 @@ import * as i3$2 from '@acorex/components/dropdown';
53
53
  import { AXDropdownModule } from '@acorex/components/dropdown';
54
54
  import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
55
55
  import { AXPWidgetPropertyViewerComponent, AXPWidgetPickerService, AXPDesignerService } from '@acorex/platform/layout/designer';
56
- import { AXPBasePageComponent, AXPPageLayoutComponent, AXPBasePage } from '@acorex/platform/themes/default';
57
- import { AXPLayoutThemeService, AXPThemeLayoutBlockComponent } from '@acorex/platform/themes/shared';
56
+ import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
57
+ import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
58
+ import { AXPThemeLayoutBlockComponent } from '@acorex/platform/layout/components';
58
59
  import * as i2$4 from '@acorex/components/loading';
59
60
  import { AXLoadingModule } from '@acorex/components/loading';
60
61
  import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
@@ -454,20 +455,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
454
455
  */
455
456
  class AXPBarChartWidgetViewComponent extends AXPValueWidgetComponent {
456
457
  constructor() {
457
- super(...arguments);
458
+ super();
458
459
  this.barChartData = computed(() => this.getValue());
459
460
  this.barChartOptions = computed(() => this.options());
461
+ this.setOptions({
462
+ ...this.options(),
463
+ showXAxis: true,
464
+ showYAxis: true,
465
+ barWidth: 80,
466
+ cornerRadius: 4,
467
+ showGrid: true,
468
+ showDataLabels: false,
469
+ showTooltip: true,
470
+ animationEasing: 'cubic-out',
471
+ animationDuration: 800,
472
+ });
460
473
  }
461
474
  handleBarClick(event) {
462
475
  //console.log(event);
463
476
  }
464
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPBarChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
477
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPBarChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
465
478
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: AXPBarChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ax-bar-chart [data]=\"barChartData()\" [options]=\"barChartOptions()\" (barClick)=\"handleBarClick($event)\"></ax-bar-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: AXBarChartComponent, selector: "ax-bar-chart", inputs: ["data", "options"], outputs: ["barClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
466
479
  }
467
480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPBarChartWidgetViewComponent, decorators: [{
468
481
  type: Component,
469
482
  args: [{ imports: [AXBarChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-bar-chart [data]=\"barChartData()\" [options]=\"barChartOptions()\" (barClick)=\"handleBarClick($event)\"></ax-bar-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
470
- }] });
483
+ }], ctorParameters: () => [] });
471
484
 
472
485
  var barChartWidget_component = /*#__PURE__*/Object.freeze({
473
486
  __proto__: null,
@@ -514,61 +527,7 @@ const AXPBarChartWidget = {
514
527
  },
515
528
  visible: true,
516
529
  },
517
- // ====== Layout & Dimensions ======
518
- {
519
- name: 'width',
520
- title: '@dashboard:widgets.bar-chart.width',
521
- group: AXP_STYLING_PROPERTY_GROUP,
522
- schema: {
523
- defaultValue: null,
524
- dataType: 'number',
525
- interface: {
526
- name: 'width',
527
- path: 'options.width',
528
- type: AXPWidgetsCatalog.number,
529
- options: {
530
- minValue: 0,
531
- maxValue: 1200,
532
- },
533
- },
534
- },
535
- visible: true,
536
- },
537
- {
538
- name: 'height',
539
- title: '@dashboard:widgets.bar-chart.height',
540
- group: AXP_STYLING_PROPERTY_GROUP,
541
- schema: {
542
- defaultValue: 300,
543
- dataType: 'number',
544
- interface: {
545
- name: 'height',
546
- path: 'options.height',
547
- type: AXPWidgetsCatalog.number,
548
- options: {
549
- minValue: 0,
550
- maxValue: 800,
551
- },
552
- },
553
- },
554
- visible: true,
555
- },
556
530
  // ====== X Axis Settings ======
557
- {
558
- name: 'showXAxis',
559
- title: '@dashboard:widgets.bar-chart.show-x-axis',
560
- group: AXP_APPEARANCE_PROPERTY_GROUP,
561
- schema: {
562
- defaultValue: true,
563
- dataType: 'boolean',
564
- interface: {
565
- name: 'showXAxis',
566
- path: 'options.showXAxis',
567
- type: AXPWidgetsCatalog.toggle,
568
- },
569
- },
570
- visible: true,
571
- },
572
531
  {
573
532
  name: 'xAxisLabel',
574
533
  title: '@dashboard:widgets.bar-chart.x-axis-label',
@@ -585,21 +544,6 @@ const AXPBarChartWidget = {
585
544
  visible: true,
586
545
  },
587
546
  // ====== Y Axis Settings ======
588
- {
589
- name: 'showYAxis',
590
- title: '@dashboard:widgets.bar-chart.show-y-axis',
591
- group: AXP_APPEARANCE_PROPERTY_GROUP,
592
- schema: {
593
- defaultValue: true,
594
- dataType: 'boolean',
595
- interface: {
596
- name: 'showYAxis',
597
- path: 'options.showYAxis',
598
- type: AXPWidgetsCatalog.toggle,
599
- },
600
- },
601
- visible: true,
602
- },
603
547
  {
604
548
  name: 'yAxisLabel',
605
549
  title: '@dashboard:widgets.bar-chart.y-axis-label',
@@ -615,145 +559,218 @@ const AXPBarChartWidget = {
615
559
  },
616
560
  visible: true,
617
561
  },
562
+ /* Commented out properties
563
+ // ====== Layout & Dimensions ======
564
+ {
565
+ name: 'width',
566
+ title: '@dashboard:widgets.bar-chart.width',
567
+ group: AXP_STYLING_PROPERTY_GROUP,
568
+ schema: {
569
+ defaultValue: null,
570
+ dataType: 'number',
571
+ interface: {
572
+ name: 'width',
573
+ path: 'options.width',
574
+ type: AXPWidgetsCatalog.number,
575
+ options: {
576
+ minValue: 0,
577
+ maxValue: 1200,
578
+ },
579
+ },
580
+ },
581
+ visible: true,
582
+ },
583
+ {
584
+ name: 'height',
585
+ title: '@dashboard:widgets.bar-chart.height',
586
+ group: AXP_STYLING_PROPERTY_GROUP,
587
+ schema: {
588
+ defaultValue: 300,
589
+ dataType: 'number',
590
+ interface: {
591
+ name: 'height',
592
+ path: 'options.height',
593
+ type: AXPWidgetsCatalog.number,
594
+ options: {
595
+ minValue: 0,
596
+ maxValue: 800,
597
+ },
598
+ },
599
+ },
600
+ visible: true,
601
+ },
602
+ // ====== X Axis Settings ======
603
+ {
604
+ name: 'showXAxis',
605
+ title: '@dashboard:widgets.bar-chart.show-x-axis',
606
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
607
+ schema: {
608
+ defaultValue: true,
609
+ dataType: 'boolean',
610
+ interface: {
611
+ name: 'showXAxis',
612
+ path: 'options.showXAxis',
613
+ type: AXPWidgetsCatalog.toggle,
614
+ },
615
+ },
616
+ visible: true,
617
+ },
618
+ // ====== Y Axis Settings ======
619
+ {
620
+ name: 'showYAxis',
621
+ title: '@dashboard:widgets.bar-chart.show-y-axis',
622
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
623
+ schema: {
624
+ defaultValue: true,
625
+ dataType: 'boolean',
626
+ interface: {
627
+ name: 'showYAxis',
628
+ path: 'options.showYAxis',
629
+ type: AXPWidgetsCatalog.toggle,
630
+ },
631
+ },
632
+ visible: true,
633
+ },
618
634
  // ====== Bar Appearance ======
619
635
  {
620
- name: 'barWidth',
621
- title: '@dashboard:widgets.bar-chart.bar-width',
622
- group: AXP_APPEARANCE_PROPERTY_GROUP,
623
- schema: {
624
- defaultValue: 80,
625
- dataType: 'number',
626
- interface: {
627
- name: 'barWidth',
628
- path: 'options.barWidth',
629
- type: AXPWidgetsCatalog.number,
630
- options: {
631
- placeholder: '1-100',
632
- minValue: 1,
633
- maxValue: 100,
634
- },
635
- },
636
+ name: 'barWidth',
637
+ title: '@dashboard:widgets.bar-chart.bar-width',
638
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
639
+ schema: {
640
+ defaultValue: 80,
641
+ dataType: 'number',
642
+ interface: {
643
+ name: 'barWidth',
644
+ path: 'options.barWidth',
645
+ type: AXPWidgetsCatalog.number,
646
+ options: {
647
+ placeholder: '1-100',
648
+ minValue: 1,
649
+ maxValue: 100,
650
+ },
636
651
  },
637
- visible: true,
652
+ },
653
+ visible: true,
638
654
  },
639
655
  {
640
- name: 'cornerRadius',
641
- title: '@dashboard:widgets.bar-chart.corner-radius',
642
- group: AXP_APPEARANCE_PROPERTY_GROUP,
643
- schema: {
644
- defaultValue: 4,
645
- dataType: 'number',
646
- interface: {
647
- name: 'cornerRadius',
648
- path: 'options.cornerRadius',
649
- type: AXPWidgetsCatalog.number,
650
- options: {
651
- placeholder: '0-20',
652
- minValue: 0,
653
- maxValue: 20,
654
- },
655
- },
656
+ name: 'cornerRadius',
657
+ title: '@dashboard:widgets.bar-chart.corner-radius',
658
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
659
+ schema: {
660
+ defaultValue: 4,
661
+ dataType: 'number',
662
+ interface: {
663
+ name: 'cornerRadius',
664
+ path: 'options.cornerRadius',
665
+ type: AXPWidgetsCatalog.number,
666
+ options: {
667
+ placeholder: '0-20',
668
+ minValue: 0,
669
+ maxValue: 20,
670
+ },
656
671
  },
657
- visible: true,
672
+ },
673
+ visible: true,
658
674
  },
659
675
  // ====== Grid Settings ======
660
676
  {
661
- name: 'showGrid',
662
- title: '@dashboard:widgets.bar-chart.show-grid',
663
- group: AXP_APPEARANCE_PROPERTY_GROUP,
664
- schema: {
665
- defaultValue: true,
666
- dataType: 'boolean',
667
- interface: {
668
- name: 'showGrid',
669
- path: 'options.showGrid',
670
- type: AXPWidgetsCatalog.toggle,
671
- },
677
+ name: 'showGrid',
678
+ title: '@dashboard:widgets.bar-chart.show-grid',
679
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
680
+ schema: {
681
+ defaultValue: true,
682
+ dataType: 'boolean',
683
+ interface: {
684
+ name: 'showGrid',
685
+ path: 'options.showGrid',
686
+ type: AXPWidgetsCatalog.toggle,
672
687
  },
673
- visible: true,
688
+ },
689
+ visible: true,
674
690
  },
675
691
  {
676
- name: 'showDataLabels',
677
- title: '@dashboard:widgets.bar-chart.show-data-labels',
678
- group: AXP_APPEARANCE_PROPERTY_GROUP,
679
- schema: {
680
- defaultValue: true,
681
- dataType: 'boolean',
682
- interface: {
683
- name: 'showDataLabels',
684
- path: 'options.showDataLabels',
685
- type: AXPWidgetsCatalog.toggle,
686
- },
692
+ name: 'showDataLabels',
693
+ title: '@dashboard:widgets.bar-chart.show-data-labels',
694
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
695
+ schema: {
696
+ defaultValue: true,
697
+ dataType: 'boolean',
698
+ interface: {
699
+ name: 'showDataLabels',
700
+ path: 'options.showDataLabels',
701
+ type: AXPWidgetsCatalog.toggle,
687
702
  },
688
- visible: true,
703
+ },
704
+ visible: true,
689
705
  },
690
706
  // ====== Tooltip Settings ======
691
707
  {
692
- name: 'showTooltip',
693
- title: '@dashboard:widgets.bar-chart.show-tooltip',
694
- group: AXP_APPEARANCE_PROPERTY_GROUP,
695
- schema: {
696
- defaultValue: true,
697
- dataType: 'boolean',
698
- interface: {
699
- name: 'showTooltip',
700
- path: 'options.showTooltip',
701
- type: AXPWidgetsCatalog.toggle,
702
- },
708
+ name: 'showTooltip',
709
+ title: '@dashboard:widgets.bar-chart.show-tooltip',
710
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
711
+ schema: {
712
+ defaultValue: true,
713
+ dataType: 'boolean',
714
+ interface: {
715
+ name: 'showTooltip',
716
+ path: 'options.showTooltip',
717
+ type: AXPWidgetsCatalog.toggle,
703
718
  },
704
- visible: true,
719
+ },
720
+ visible: true,
705
721
  },
706
722
  // ====== Animation Settings ======
707
723
  {
708
- name: 'animationEasing',
709
- title: '@dashboard:widgets.bar-chart.animation-easing',
710
- group: AXP_APPEARANCE_PROPERTY_GROUP,
711
- schema: {
712
- defaultValue: 'cubic-out',
713
- dataType: 'string',
714
- interface: {
715
- name: 'animationEasing',
716
- path: 'options.animationEasing',
717
- type: AXPWidgetsCatalog.select,
718
- options: {
719
- dataSource: [
720
- { value: 'linear', text: 'Linear' },
721
- { value: 'ease', text: 'Ease' },
722
- { value: 'ease-in', text: 'Ease In' },
723
- { value: 'ease-out', text: 'Ease Out' },
724
- { value: 'ease-in-out', text: 'Ease In Out' },
725
- { value: 'cubic', text: 'Cubic' },
726
- { value: 'cubic-in', text: 'Cubic In' },
727
- { value: 'cubic-out', text: 'Cubic Out' },
728
- { value: 'cubic-in-out', text: 'Cubic In Out' },
729
- ],
730
- textField: 'text',
731
- valueField: 'value',
732
- },
733
- },
724
+ name: 'animationEasing',
725
+ title: '@dashboard:widgets.bar-chart.animation-easing',
726
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
727
+ schema: {
728
+ defaultValue: 'cubic-out',
729
+ dataType: 'string',
730
+ interface: {
731
+ name: 'animationEasing',
732
+ path: 'options.animationEasing',
733
+ type: AXPWidgetsCatalog.select,
734
+ options: {
735
+ dataSource: [
736
+ { value: 'linear', text: 'Linear' },
737
+ { value: 'ease', text: 'Ease' },
738
+ { value: 'ease-in', text: 'Ease In' },
739
+ { value: 'ease-out', text: 'Ease Out' },
740
+ { value: 'ease-in-out', text: 'Ease In Out' },
741
+ { value: 'cubic', text: 'Cubic' },
742
+ { value: 'cubic-in', text: 'Cubic In' },
743
+ { value: 'cubic-out', text: 'Cubic Out' },
744
+ { value: 'cubic-in-out', text: 'Cubic In Out' },
745
+ ],
746
+ textField: 'text',
747
+ valueField: 'value',
748
+ },
734
749
  },
735
- visible: true,
750
+ },
751
+ visible: true,
736
752
  },
737
753
  {
738
- name: 'animationDuration',
739
- title: '@dashboard:widgets.bar-chart.animation-duration',
740
- group: AXP_APPEARANCE_PROPERTY_GROUP,
741
- schema: {
742
- defaultValue: 800,
743
- dataType: 'number',
744
- interface: {
745
- name: 'animationDuration',
746
- path: 'options.animationDuration',
747
- type: AXPWidgetsCatalog.number,
748
- options: {
749
- placeholder: '0-2000',
750
- minValue: 0,
751
- maxValue: 2000,
752
- },
753
- },
754
+ name: 'animationDuration',
755
+ title: '@dashboard:widgets.bar-chart.animation-duration',
756
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
757
+ schema: {
758
+ defaultValue: 800,
759
+ dataType: 'number',
760
+ interface: {
761
+ name: 'animationDuration',
762
+ path: 'options.animationDuration',
763
+ type: AXPWidgetsCatalog.number,
764
+ options: {
765
+ placeholder: '0-2000',
766
+ minValue: 0,
767
+ maxValue: 2000,
768
+ },
754
769
  },
755
- visible: true,
770
+ },
771
+ visible: true,
756
772
  },
773
+ */
757
774
  ],
758
775
  components: {
759
776
  view: {
@@ -1126,20 +1143,31 @@ const AXPClockCalendarWidget = {
1126
1143
  */
1127
1144
  class AXPDonutChartWidgetViewComponent extends AXPValueWidgetComponent {
1128
1145
  constructor() {
1129
- super(...arguments);
1146
+ super();
1130
1147
  this.donutChartData = computed(() => this.getValue());
1131
1148
  this.donutChartOptions = computed(() => this.options());
1149
+ this.setOptions({
1150
+ ...this.options(),
1151
+ width: 300,
1152
+ height: 300,
1153
+ showDataLabels: false,
1154
+ donutWidth: 35,
1155
+ cornerRadius: 4,
1156
+ showTooltip: true,
1157
+ animationEasing: 'cubic-out',
1158
+ animationDuration: 800,
1159
+ });
1132
1160
  }
1133
1161
  handleDonutChartSegmentClick(event) {
1134
1162
  //console.log(event);
1135
1163
  }
1136
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPDonutChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1164
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPDonutChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1137
1165
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: AXPDonutChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ax-donut-chart\n [data]=\"donutChartData()\"\n [options]=\"donutChartOptions()\"\n (segmentClick)=\"handleDonutChartSegmentClick($event)\"\n></ax-donut-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: AXDonutChartComponent, selector: "ax-donut-chart", inputs: ["data", "options"], outputs: ["segmentClick", "segmentHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1138
1166
  }
1139
1167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPDonutChartWidgetViewComponent, decorators: [{
1140
1168
  type: Component,
1141
1169
  args: [{ imports: [AXDonutChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-donut-chart\n [data]=\"donutChartData()\"\n [options]=\"donutChartOptions()\"\n (segmentClick)=\"handleDonutChartSegmentClick($event)\"\n></ax-donut-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
1142
- }] });
1170
+ }], ctorParameters: () => [] });
1143
1171
 
1144
1172
  var donutChartWidget_component = /*#__PURE__*/Object.freeze({
1145
1173
  __proto__: null,
@@ -1175,100 +1203,101 @@ const AXPDonutChartWidget = {
1175
1203
  },
1176
1204
  visible: true,
1177
1205
  },
1206
+ /* Commented out properties
1178
1207
  // ====== Size & Layout ======
1179
1208
  {
1180
- name: 'width',
1181
- title: '@dashboard:widgets.donut-chart.width',
1182
- group: AXP_STYLING_PROPERTY_GROUP,
1183
- schema: {
1184
- defaultValue: 300,
1185
- dataType: 'number',
1186
- interface: {
1187
- name: 'width',
1188
- path: 'options.width',
1189
- type: AXPWidgetsCatalog.number,
1190
- options: {
1191
- minValue: 200,
1192
- maxValue: 1200,
1193
- },
1194
- },
1209
+ name: 'width',
1210
+ title: '@dashboard:widgets.donut-chart.width',
1211
+ group: AXP_STYLING_PROPERTY_GROUP,
1212
+ schema: {
1213
+ defaultValue: 300,
1214
+ dataType: 'number',
1215
+ interface: {
1216
+ name: 'width',
1217
+ path: 'options.width',
1218
+ type: AXPWidgetsCatalog.number,
1219
+ options: {
1220
+ minValue: 200,
1221
+ maxValue: 1200,
1222
+ },
1195
1223
  },
1196
- visible: true,
1224
+ },
1225
+ visible: true,
1197
1226
  },
1198
1227
  {
1199
- name: 'height',
1200
- title: '@dashboard:widgets.donut-chart.height',
1201
- group: AXP_STYLING_PROPERTY_GROUP,
1202
- schema: {
1203
- defaultValue: 300,
1204
- dataType: 'number',
1205
- interface: {
1206
- name: 'height',
1207
- path: 'options.height',
1208
- type: AXPWidgetsCatalog.number,
1209
- options: {
1210
- minValue: 200,
1211
- maxValue: 800,
1212
- },
1213
- },
1228
+ name: 'height',
1229
+ title: '@dashboard:widgets.donut-chart.height',
1230
+ group: AXP_STYLING_PROPERTY_GROUP,
1231
+ schema: {
1232
+ defaultValue: 300,
1233
+ dataType: 'number',
1234
+ interface: {
1235
+ name: 'height',
1236
+ path: 'options.height',
1237
+ type: AXPWidgetsCatalog.number,
1238
+ options: {
1239
+ minValue: 200,
1240
+ maxValue: 800,
1241
+ },
1214
1242
  },
1215
- visible: true,
1243
+ },
1244
+ visible: true,
1216
1245
  },
1217
1246
  // ====== Donut Appearance ======
1218
1247
  {
1219
- name: 'showDataLabels',
1220
- title: '@dashboard:widgets.donut-chart.show-data-labels',
1221
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1222
- schema: {
1223
- defaultValue: true,
1224
- dataType: 'boolean',
1225
- interface: {
1226
- name: 'showDataLabels',
1227
- path: 'options.showDataLabels',
1228
- type: AXPWidgetsCatalog.toggle,
1229
- },
1248
+ name: 'showDataLabels',
1249
+ title: '@dashboard:widgets.donut-chart.show-data-labels',
1250
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1251
+ schema: {
1252
+ defaultValue: true,
1253
+ dataType: 'boolean',
1254
+ interface: {
1255
+ name: 'showDataLabels',
1256
+ path: 'options.showDataLabels',
1257
+ type: AXPWidgetsCatalog.toggle,
1230
1258
  },
1231
- visible: true,
1259
+ },
1260
+ visible: true,
1232
1261
  },
1233
1262
  {
1234
- name: 'donutWidth',
1235
- title: '@dashboard:widgets.donut-chart.donut-width',
1236
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1237
- schema: {
1238
- defaultValue: 35,
1239
- dataType: 'number',
1240
- interface: {
1241
- name: 'donutWidth',
1242
- path: 'options.donutWidth',
1243
- type: AXPWidgetsCatalog.number,
1244
- options: {
1245
- placeholder: '10-80',
1246
- minValue: 10,
1247
- maxValue: 80,
1248
- },
1249
- },
1263
+ name: 'donutWidth',
1264
+ title: '@dashboard:widgets.donut-chart.donut-width',
1265
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1266
+ schema: {
1267
+ defaultValue: 35,
1268
+ dataType: 'number',
1269
+ interface: {
1270
+ name: 'donutWidth',
1271
+ path: 'options.donutWidth',
1272
+ type: AXPWidgetsCatalog.number,
1273
+ options: {
1274
+ placeholder: '10-80',
1275
+ minValue: 10,
1276
+ maxValue: 80,
1277
+ },
1250
1278
  },
1251
- visible: true,
1279
+ },
1280
+ visible: true,
1252
1281
  },
1253
1282
  {
1254
- name: 'cornerRadius',
1255
- title: '@dashboard:widgets.donut-chart.corner-radius',
1256
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1257
- schema: {
1258
- defaultValue: 4,
1259
- dataType: 'number',
1260
- interface: {
1261
- name: 'cornerRadius',
1262
- path: 'options.cornerRadius',
1263
- type: AXPWidgetsCatalog.number,
1264
- options: {
1265
- placeholder: '0-20',
1266
- minValue: 0,
1267
- maxValue: 20,
1268
- },
1269
- },
1283
+ name: 'cornerRadius',
1284
+ title: '@dashboard:widgets.donut-chart.corner-radius',
1285
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1286
+ schema: {
1287
+ defaultValue: 4,
1288
+ dataType: 'number',
1289
+ interface: {
1290
+ name: 'cornerRadius',
1291
+ path: 'options.cornerRadius',
1292
+ type: AXPWidgetsCatalog.number,
1293
+ options: {
1294
+ placeholder: '0-20',
1295
+ minValue: 0,
1296
+ maxValue: 20,
1297
+ },
1270
1298
  },
1271
- visible: true,
1299
+ },
1300
+ visible: true,
1272
1301
  },
1273
1302
  // ====== Legend ======
1274
1303
  // {
@@ -1306,71 +1335,72 @@ const AXPDonutChartWidget = {
1306
1335
  // },
1307
1336
  // ====== Tooltip ======
1308
1337
  {
1309
- name: 'showTooltip',
1310
- title: '@dashboard:widgets.donut-chart.show-tooltip',
1311
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1312
- schema: {
1313
- defaultValue: true,
1314
- dataType: 'boolean',
1315
- interface: {
1316
- name: 'showTooltip',
1317
- path: 'options.showTooltip',
1318
- type: AXPWidgetsCatalog.toggle,
1319
- },
1338
+ name: 'showTooltip',
1339
+ title: '@dashboard:widgets.donut-chart.show-tooltip',
1340
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1341
+ schema: {
1342
+ defaultValue: true,
1343
+ dataType: 'boolean',
1344
+ interface: {
1345
+ name: 'showTooltip',
1346
+ path: 'options.showTooltip',
1347
+ type: AXPWidgetsCatalog.toggle,
1320
1348
  },
1321
- visible: true,
1349
+ },
1350
+ visible: true,
1322
1351
  },
1323
1352
  // ====== Animation Settings ======
1324
1353
  {
1325
- name: 'animationEasing',
1326
- title: '@dashboard:widgets.donut-chart.animation-easing',
1327
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1328
- schema: {
1329
- defaultValue: 'cubic-out',
1330
- dataType: 'string',
1331
- interface: {
1332
- name: 'animationEasing',
1333
- path: 'options.animationEasing',
1334
- type: AXPWidgetsCatalog.select,
1335
- options: {
1336
- dataSource: [
1337
- { value: 'linear', text: 'Linear' },
1338
- { value: 'ease', text: 'Ease' },
1339
- { value: 'ease-in', text: 'Ease In' },
1340
- { value: 'ease-out', text: 'Ease Out' },
1341
- { value: 'ease-in-out', text: 'Ease In Out' },
1342
- { value: 'cubic', text: 'Cubic' },
1343
- { value: 'cubic-in', text: 'Cubic In' },
1344
- { value: 'cubic-out', text: 'Cubic Out' },
1345
- { value: 'cubic-in-out', text: 'Cubic In Out' },
1346
- ],
1347
- textField: 'text',
1348
- valueField: 'value',
1349
- },
1350
- },
1354
+ name: 'animationEasing',
1355
+ title: '@dashboard:widgets.donut-chart.animation-easing',
1356
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1357
+ schema: {
1358
+ defaultValue: 'cubic-out',
1359
+ dataType: 'string',
1360
+ interface: {
1361
+ name: 'animationEasing',
1362
+ path: 'options.animationEasing',
1363
+ type: AXPWidgetsCatalog.select,
1364
+ options: {
1365
+ dataSource: [
1366
+ { value: 'linear', text: 'Linear' },
1367
+ { value: 'ease', text: 'Ease' },
1368
+ { value: 'ease-in', text: 'Ease In' },
1369
+ { value: 'ease-out', text: 'Ease Out' },
1370
+ { value: 'ease-in-out', text: 'Ease In Out' },
1371
+ { value: 'cubic', text: 'Cubic' },
1372
+ { value: 'cubic-in', text: 'Cubic In' },
1373
+ { value: 'cubic-out', text: 'Cubic Out' },
1374
+ { value: 'cubic-in-out', text: 'Cubic In Out' },
1375
+ ],
1376
+ textField: 'text',
1377
+ valueField: 'value',
1378
+ },
1351
1379
  },
1352
- visible: true,
1380
+ },
1381
+ visible: true,
1353
1382
  },
1354
1383
  {
1355
- name: 'animationDuration',
1356
- title: '@dashboard:widgets.donut-chart.animation-duration',
1357
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1358
- schema: {
1359
- defaultValue: 800,
1360
- dataType: 'number',
1361
- interface: {
1362
- name: 'animationDuration',
1363
- path: 'options.animationDuration',
1364
- type: AXPWidgetsCatalog.number,
1365
- options: {
1366
- placeholder: '0-2000',
1367
- minValue: 0,
1368
- maxValue: 2000,
1369
- },
1370
- },
1384
+ name: 'animationDuration',
1385
+ title: '@dashboard:widgets.donut-chart.animation-duration',
1386
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1387
+ schema: {
1388
+ defaultValue: 800,
1389
+ dataType: 'number',
1390
+ interface: {
1391
+ name: 'animationDuration',
1392
+ path: 'options.animationDuration',
1393
+ type: AXPWidgetsCatalog.number,
1394
+ options: {
1395
+ placeholder: '0-2000',
1396
+ minValue: 0,
1397
+ maxValue: 2000,
1398
+ },
1371
1399
  },
1372
- visible: true,
1400
+ },
1401
+ visible: true,
1373
1402
  },
1403
+ */
1374
1404
  ],
1375
1405
  components: {
1376
1406
  view: {
@@ -1395,17 +1425,29 @@ const AXPDonutChartWidget = {
1395
1425
  */
1396
1426
  class AXPGaugeChartWidgetViewComponent extends AXPValueWidgetComponent {
1397
1427
  constructor() {
1398
- super(...arguments);
1428
+ super();
1399
1429
  this.gaugeChartValue = computed(() => this.getValue());
1400
1430
  this.gaugeChartOptions = computed(() => this.options());
1431
+ this.setOptions({
1432
+ ...this.options(),
1433
+ width: null,
1434
+ height: 300,
1435
+ minValue: 0,
1436
+ maxValue: 100,
1437
+ showTooltip: true,
1438
+ gaugeWidth: 30,
1439
+ cornerRadius: 4,
1440
+ animationEasing: 'cubic-out',
1441
+ animationDuration: 800,
1442
+ });
1401
1443
  }
1402
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1444
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1403
1445
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: AXPGaugeChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ax-gauge-chart [value]=\"gaugeChartValue()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: AXGaugeChartComponent, selector: "ax-gauge-chart", inputs: ["value", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1404
1446
  }
1405
1447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, decorators: [{
1406
1448
  type: Component,
1407
1449
  args: [{ imports: [AXGaugeChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-gauge-chart [value]=\"gaugeChartValue()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
1408
- }] });
1450
+ }], ctorParameters: () => [] });
1409
1451
 
1410
1452
  var gaugeChartWidget_component = /*#__PURE__*/Object.freeze({
1411
1453
  __proto__: null,
@@ -1440,201 +1482,203 @@ const AXPGaugeChartWidget = {
1440
1482
  },
1441
1483
  visible: true,
1442
1484
  },
1443
- // ====== Layout & Dimensions ======
1485
+ // ====== Label Display ======
1444
1486
  {
1445
- name: 'width',
1446
- title: '@dashboard:widgets.gauge-chart.width',
1447
- group: AXP_STYLING_PROPERTY_GROUP,
1487
+ name: 'label',
1488
+ title: '@dashboard:widgets.gauge-chart.label',
1489
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1448
1490
  schema: {
1449
- defaultValue: null,
1450
- dataType: 'number',
1491
+ defaultValue: '',
1492
+ dataType: 'string',
1451
1493
  interface: {
1452
- name: 'width',
1453
- path: 'options.width',
1454
- type: AXPWidgetsCatalog.number,
1455
- options: {
1456
- placeholder: '1-1200',
1457
- minValue: 1,
1458
- maxValue: 1200,
1459
- },
1494
+ name: 'label',
1495
+ path: 'options.label',
1496
+ type: AXPWidgetsCatalog.text,
1460
1497
  },
1461
1498
  },
1462
1499
  visible: true,
1463
1500
  },
1501
+ /* Commented out properties
1502
+ // ====== Layout & Dimensions ======
1464
1503
  {
1465
- name: 'height',
1466
- title: '@dashboard:widgets.gauge-chart.height',
1467
- group: AXP_STYLING_PROPERTY_GROUP,
1468
- schema: {
1469
- defaultValue: 300,
1470
- dataType: 'number',
1471
- interface: {
1472
- name: 'height',
1473
- path: 'options.height',
1474
- type: AXPWidgetsCatalog.number,
1475
- options: {
1476
- placeholder: '1-800',
1477
- minValue: 1,
1478
- maxValue: 800,
1479
- },
1480
- },
1504
+ name: 'width',
1505
+ title: '@dashboard:widgets.gauge-chart.width',
1506
+ group: AXP_STYLING_PROPERTY_GROUP,
1507
+ schema: {
1508
+ defaultValue: null,
1509
+ dataType: 'number',
1510
+ interface: {
1511
+ name: 'width',
1512
+ path: 'options.width',
1513
+ type: AXPWidgetsCatalog.number,
1514
+ options: {
1515
+ placeholder: '1-1200',
1516
+ minValue: 1,
1517
+ maxValue: 1200,
1518
+ },
1481
1519
  },
1482
- visible: true,
1520
+ },
1521
+ visible: true,
1483
1522
  },
1484
- // ====== Gauge Configuration ======
1485
1523
  {
1486
- name: 'minValue',
1487
- title: '@dashboard:widgets.gauge-chart.min-value',
1488
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1489
- schema: {
1490
- defaultValue: 0,
1491
- dataType: 'number',
1492
- interface: {
1493
- name: 'minValue',
1494
- path: 'options.minValue',
1495
- type: AXPWidgetsCatalog.number,
1496
- },
1524
+ name: 'height',
1525
+ title: '@dashboard:widgets.gauge-chart.height',
1526
+ group: AXP_STYLING_PROPERTY_GROUP,
1527
+ schema: {
1528
+ defaultValue: 300,
1529
+ dataType: 'number',
1530
+ interface: {
1531
+ name: 'height',
1532
+ path: 'options.height',
1533
+ type: AXPWidgetsCatalog.number,
1534
+ options: {
1535
+ placeholder: '1-800',
1536
+ minValue: 1,
1537
+ maxValue: 800,
1538
+ },
1497
1539
  },
1498
- visible: true,
1540
+ },
1541
+ visible: true,
1499
1542
  },
1543
+ // ====== Gauge Configuration ======
1500
1544
  {
1501
- name: 'maxValue',
1502
- title: '@dashboard:widgets.gauge-chart.max-value',
1503
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1504
- schema: {
1505
- defaultValue: 100,
1506
- dataType: 'number',
1507
- interface: {
1508
- name: 'maxValue',
1509
- path: 'options.maxValue',
1510
- type: AXPWidgetsCatalog.number,
1511
- },
1545
+ name: 'minValue',
1546
+ title: '@dashboard:widgets.gauge-chart.min-value',
1547
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1548
+ schema: {
1549
+ defaultValue: 0,
1550
+ dataType: 'number',
1551
+ interface: {
1552
+ name: 'minValue',
1553
+ path: 'options.minValue',
1554
+ type: AXPWidgetsCatalog.number,
1512
1555
  },
1513
- visible: true,
1556
+ },
1557
+ visible: true,
1514
1558
  },
1515
- // ====== Gauge Appearance ======
1516
1559
  {
1517
- name: 'showTooltip',
1518
- title: '@dashboard:widgets.gauge-chart.show-tooltip',
1519
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1520
- schema: {
1521
- defaultValue: true,
1522
- dataType: 'boolean',
1523
- interface: {
1524
- name: 'showTooltip',
1525
- path: 'options.showTooltip',
1526
- type: AXPWidgetsCatalog.toggle,
1527
- },
1560
+ name: 'maxValue',
1561
+ title: '@dashboard:widgets.gauge-chart.max-value',
1562
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1563
+ schema: {
1564
+ defaultValue: 100,
1565
+ dataType: 'number',
1566
+ interface: {
1567
+ name: 'maxValue',
1568
+ path: 'options.maxValue',
1569
+ type: AXPWidgetsCatalog.number,
1528
1570
  },
1529
- visible: true,
1571
+ },
1572
+ visible: true,
1530
1573
  },
1574
+ // ====== Gauge Appearance ======
1531
1575
  {
1532
- name: 'gaugeWidth',
1533
- title: '@dashboard:widgets.gauge-chart.gauge-width',
1534
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1535
- schema: {
1536
- defaultValue: 30,
1537
- dataType: 'number',
1538
- interface: {
1539
- name: 'gaugeWidth',
1540
- path: 'options.gaugeWidth',
1541
- type: AXPWidgetsCatalog.number,
1542
- options: {
1543
- placeholder: '1-100',
1544
- minValue: 1,
1545
- maxValue: 100,
1546
- },
1547
- },
1576
+ name: 'showTooltip',
1577
+ title: '@dashboard:widgets.gauge-chart.show-tooltip',
1578
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1579
+ schema: {
1580
+ defaultValue: true,
1581
+ dataType: 'boolean',
1582
+ interface: {
1583
+ name: 'showTooltip',
1584
+ path: 'options.showTooltip',
1585
+ type: AXPWidgetsCatalog.toggle,
1548
1586
  },
1549
- visible: true,
1587
+ },
1588
+ visible: true,
1550
1589
  },
1551
1590
  {
1552
- name: 'cornerRadius',
1553
- title: '@dashboard:widgets.gauge-chart.corner-radius',
1554
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1555
- schema: {
1556
- defaultValue: 4,
1557
- dataType: 'number',
1558
- interface: {
1559
- name: 'cornerRadius',
1560
- path: 'options.cornerRadius',
1561
- type: AXPWidgetsCatalog.number,
1562
- options: {
1563
- placeholder: '1-20',
1564
- minValue: 0,
1565
- maxValue: 20,
1566
- },
1567
- },
1591
+ name: 'gaugeWidth',
1592
+ title: '@dashboard:widgets.gauge-chart.gauge-width',
1593
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1594
+ schema: {
1595
+ defaultValue: 30,
1596
+ dataType: 'number',
1597
+ interface: {
1598
+ name: 'gaugeWidth',
1599
+ path: 'options.gaugeWidth',
1600
+ type: AXPWidgetsCatalog.number,
1601
+ options: {
1602
+ placeholder: '1-100',
1603
+ minValue: 1,
1604
+ maxValue: 100,
1605
+ },
1568
1606
  },
1569
- visible: true,
1607
+ },
1608
+ visible: true,
1570
1609
  },
1571
- // ====== Label Display ======
1572
1610
  {
1573
- name: 'label',
1574
- title: '@dashboard:widgets.gauge-chart.label',
1575
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1576
- schema: {
1577
- defaultValue: '',
1578
- dataType: 'string',
1579
- interface: {
1580
- name: 'label',
1581
- path: 'options.label',
1582
- type: AXPWidgetsCatalog.text,
1583
- },
1611
+ name: 'cornerRadius',
1612
+ title: '@dashboard:widgets.gauge-chart.corner-radius',
1613
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1614
+ schema: {
1615
+ defaultValue: 4,
1616
+ dataType: 'number',
1617
+ interface: {
1618
+ name: 'cornerRadius',
1619
+ path: 'options.cornerRadius',
1620
+ type: AXPWidgetsCatalog.number,
1621
+ options: {
1622
+ placeholder: '1-20',
1623
+ minValue: 0,
1624
+ maxValue: 20,
1625
+ },
1584
1626
  },
1585
- visible: true,
1627
+ },
1628
+ visible: true,
1586
1629
  },
1587
1630
  // ====== Animation Settings ======
1588
1631
  {
1589
- name: 'animationEasing',
1590
- title: '@dashboard:widgets.gauge-chart.animation-easing',
1591
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1592
- schema: {
1593
- defaultValue: 'cubic-out',
1594
- dataType: 'string',
1595
- interface: {
1596
- name: 'animationEasing',
1597
- path: 'options.animationEasing',
1598
- type: AXPWidgetsCatalog.select,
1599
- options: {
1600
- dataSource: [
1601
- { value: 'linear', text: 'Linear' },
1602
- { value: 'ease', text: 'Ease' },
1603
- { value: 'ease-in', text: 'Ease In' },
1604
- { value: 'ease-out', text: 'Ease Out' },
1605
- { value: 'ease-in-out', text: 'Ease In Out' },
1606
- { value: 'cubic', text: 'Cubic' },
1607
- { value: 'cubic-in', text: 'Cubic In' },
1608
- { value: 'cubic-out', text: 'Cubic Out' },
1609
- { value: 'cubic-in-out', text: 'Cubic In Out' },
1610
- ],
1611
- textField: 'text',
1612
- valueField: 'value',
1613
- },
1614
- },
1632
+ name: 'animationEasing',
1633
+ title: '@dashboard:widgets.gauge-chart.animation-easing',
1634
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1635
+ schema: {
1636
+ defaultValue: 'cubic-out',
1637
+ dataType: 'string',
1638
+ interface: {
1639
+ name: 'animationEasing',
1640
+ path: 'options.animationEasing',
1641
+ type: AXPWidgetsCatalog.select,
1642
+ options: {
1643
+ dataSource: [
1644
+ { value: 'linear', text: 'Linear' },
1645
+ { value: 'ease', text: 'Ease' },
1646
+ { value: 'ease-in', text: 'Ease In' },
1647
+ { value: 'ease-out', text: 'Ease Out' },
1648
+ { value: 'ease-in-out', text: 'Ease In Out' },
1649
+ { value: 'cubic', text: 'Cubic' },
1650
+ { value: 'cubic-in', text: 'Cubic In' },
1651
+ { value: 'cubic-out', text: 'Cubic Out' },
1652
+ { value: 'cubic-in-out', text: 'Cubic In Out' },
1653
+ ],
1654
+ textField: 'text',
1655
+ valueField: 'value',
1656
+ },
1615
1657
  },
1616
- visible: true,
1658
+ },
1659
+ visible: true,
1617
1660
  },
1618
1661
  {
1619
- name: 'animationDuration',
1620
- title: '@dashboard:widgets.gauge-chart.animation-duration',
1621
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1622
- schema: {
1623
- defaultValue: 800,
1624
- dataType: 'number',
1625
- interface: {
1626
- name: 'animationDuration',
1627
- path: 'options.animationDuration',
1628
- type: AXPWidgetsCatalog.number,
1629
- options: {
1630
- placeholder: '0-2000',
1631
- minValue: 0,
1632
- maxValue: 2000,
1633
- },
1634
- },
1662
+ name: 'animationDuration',
1663
+ title: '@dashboard:widgets.gauge-chart.animation-duration',
1664
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1665
+ schema: {
1666
+ defaultValue: 800,
1667
+ dataType: 'number',
1668
+ interface: {
1669
+ name: 'animationDuration',
1670
+ path: 'options.animationDuration',
1671
+ type: AXPWidgetsCatalog.number,
1672
+ options: {
1673
+ placeholder: '0-2000',
1674
+ minValue: 0,
1675
+ maxValue: 2000,
1676
+ },
1635
1677
  },
1636
- visible: true,
1678
+ },
1679
+ visible: true,
1637
1680
  },
1681
+ */
1638
1682
  ],
1639
1683
  components: {
1640
1684
  view: {
@@ -1659,20 +1703,37 @@ const AXPGaugeChartWidget = {
1659
1703
  */
1660
1704
  class AXPLineChartWidgetViewComponent extends AXPValueWidgetComponent {
1661
1705
  constructor() {
1662
- super(...arguments);
1706
+ super();
1663
1707
  this.lineChartData = computed(() => this.getValue());
1664
1708
  this.lineChartOptions = computed(() => this.options());
1709
+ this.setOptions({
1710
+ ...this.options(),
1711
+ showXAxis: true,
1712
+ showYAxis: true,
1713
+ yAxisStartsAtZero: true,
1714
+ showGrid: true,
1715
+ showVerticalGrid: true,
1716
+ lineWidth: 2,
1717
+ smoothLine: true,
1718
+ showPoints: true,
1719
+ pointRadius: 4,
1720
+ fillOpacity: 80,
1721
+ showTooltip: true,
1722
+ showCrosshair: true,
1723
+ animationEasing: 'cubic-out',
1724
+ animationDuration: 800,
1725
+ });
1665
1726
  }
1666
1727
  handleLineChartPointClick(event) {
1667
1728
  //console.log(event);
1668
1729
  }
1669
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPLineChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1730
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPLineChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1670
1731
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: AXPLineChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ax-line-chart\n (pointClick)=\"handleLineChartPointClick($event)\"\n [data]=\"lineChartData()\"\n [options]=\"lineChartOptions()\"\n></ax-line-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: AXLineChartComponent, selector: "ax-line-chart", inputs: ["data", "options"], outputs: ["pointClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1671
1732
  }
1672
1733
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPLineChartWidgetViewComponent, decorators: [{
1673
1734
  type: Component,
1674
1735
  args: [{ standalone: true, imports: [AXLineChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-line-chart\n (pointClick)=\"handleLineChartPointClick($event)\"\n [data]=\"lineChartData()\"\n [options]=\"lineChartOptions()\"\n></ax-line-chart>\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
1675
- }] });
1736
+ }], ctorParameters: () => [] });
1676
1737
 
1677
1738
  var lineChartWidget_component = /*#__PURE__*/Object.freeze({
1678
1739
  __proto__: null,
@@ -1708,218 +1769,33 @@ const AXPLineChartWidget = {
1708
1769
  },
1709
1770
  visible: true,
1710
1771
  },
1711
- // ====== Layout & Dimensions ======
1712
- {
1713
- name: 'width',
1714
- title: '@dashboard:widgets.line-chart.width',
1715
- group: AXP_STYLING_PROPERTY_GROUP,
1716
- schema: {
1717
- defaultValue: null,
1718
- dataType: 'number',
1719
- interface: {
1720
- name: 'width',
1721
- path: 'options.width',
1722
- type: AXPWidgetsCatalog.number,
1723
- options: {
1724
- minValue: 0,
1725
- maxValue: 1200,
1726
- },
1727
- },
1728
- },
1729
- visible: true,
1730
- },
1731
- {
1732
- name: 'height',
1733
- title: '@dashboard:widgets.line-chart.height',
1734
- group: AXP_STYLING_PROPERTY_GROUP,
1735
- schema: {
1736
- defaultValue: 300,
1737
- dataType: 'number',
1738
- interface: {
1739
- name: 'height',
1740
- path: 'options.height',
1741
- type: AXPWidgetsCatalog.number,
1742
- options: {
1743
- minValue: 0,
1744
- maxValue: 800,
1745
- },
1746
- },
1747
- },
1748
- visible: true,
1749
- },
1750
1772
  // ====== Axis Settings ======
1751
- {
1752
- name: 'showXAxis',
1753
- title: '@dashboard:widgets.line-chart.show-x-axis',
1754
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1755
- schema: {
1756
- defaultValue: true,
1757
- dataType: 'boolean',
1758
- interface: {
1759
- name: 'showXAxis',
1760
- path: 'options.showXAxis',
1761
- type: AXPWidgetsCatalog.toggle,
1762
- },
1763
- },
1764
- visible: true,
1765
- },
1766
1773
  {
1767
1774
  name: 'xAxisLabel',
1768
1775
  title: '@dashboard:widgets.line-chart.x-axis-label',
1769
1776
  group: AXP_APPEARANCE_PROPERTY_GROUP,
1770
1777
  schema: {
1771
- defaultValue: '',
1772
- dataType: 'string',
1773
- interface: {
1774
- name: 'xAxisLabel',
1775
- path: 'options.xAxisLabel',
1776
- type: AXPWidgetsCatalog.text,
1777
- },
1778
- },
1779
- visible: true,
1780
- },
1781
- {
1782
- name: 'showYAxis',
1783
- title: '@dashboard:widgets.line-chart.show-y-axis',
1784
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1785
- schema: {
1786
- defaultValue: true,
1787
- dataType: 'boolean',
1788
- interface: {
1789
- name: 'showYAxis',
1790
- path: 'options.showYAxis',
1791
- type: AXPWidgetsCatalog.toggle,
1792
- },
1793
- },
1794
- visible: true,
1795
- },
1796
- {
1797
- name: 'yAxisLabel',
1798
- title: '@dashboard:widgets.line-chart.y-axis-label',
1799
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1800
- schema: {
1801
- defaultValue: '',
1802
- dataType: 'string',
1803
- interface: {
1804
- name: 'yAxisLabel',
1805
- path: 'options.yAxisLabel',
1806
- type: AXPWidgetsCatalog.text,
1807
- },
1808
- },
1809
- visible: true,
1810
- },
1811
- {
1812
- name: 'yAxisStartsAtZero',
1813
- title: '@dashboard:widgets.line-chart.y-axis-starts-at-zero',
1814
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1815
- schema: {
1816
- defaultValue: true,
1817
- dataType: 'boolean',
1818
- interface: {
1819
- name: 'yAxisStartsAtZero',
1820
- path: 'options.yAxisStartsAtZero',
1821
- type: AXPWidgetsCatalog.toggle,
1822
- },
1823
- },
1824
- visible: true,
1825
- },
1826
- {
1827
- name: 'showGrid',
1828
- title: '@dashboard:widgets.line-chart.show-grid',
1829
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1830
- schema: {
1831
- defaultValue: true,
1832
- dataType: 'boolean',
1833
- interface: {
1834
- name: 'showGrid',
1835
- path: 'options.showGrid',
1836
- type: AXPWidgetsCatalog.toggle,
1837
- },
1838
- },
1839
- visible: true,
1840
- },
1841
- {
1842
- name: 'showVerticalGrid',
1843
- title: '@dashboard:widgets.line-chart.show-vertical-grid',
1844
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1845
- schema: {
1846
- defaultValue: true,
1847
- dataType: 'boolean',
1848
- interface: {
1849
- name: 'showVerticalGrid',
1850
- path: 'options.showVerticalGrid',
1851
- type: AXPWidgetsCatalog.toggle,
1852
- },
1853
- },
1854
- visible: true,
1855
- },
1856
- // ====== Line Appearance ======
1857
- {
1858
- name: 'lineWidth',
1859
- title: '@dashboard:widgets.line-chart.line-width',
1860
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1861
- schema: {
1862
- defaultValue: 2,
1863
- dataType: 'number',
1864
- interface: {
1865
- name: 'lineWidth',
1866
- path: 'options.lineWidth',
1867
- type: AXPWidgetsCatalog.number,
1868
- options: {
1869
- placeholder: '1-10',
1870
- minValue: 1,
1871
- maxValue: 10,
1872
- },
1873
- },
1874
- },
1875
- visible: true,
1876
- },
1877
- {
1878
- name: 'smoothLine',
1879
- title: '@dashboard:widgets.line-chart.smooth-line',
1880
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1881
- schema: {
1882
- defaultValue: true,
1883
- dataType: 'boolean',
1884
- interface: {
1885
- name: 'smoothLine',
1886
- path: 'options.smoothLine',
1887
- type: AXPWidgetsCatalog.toggle,
1888
- },
1889
- },
1890
- visible: true,
1891
- },
1892
- {
1893
- name: 'showPoints',
1894
- title: '@dashboard:widgets.line-chart.show-points',
1895
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1896
- schema: {
1897
- defaultValue: true,
1898
- dataType: 'boolean',
1778
+ defaultValue: '',
1779
+ dataType: 'string',
1899
1780
  interface: {
1900
- name: 'showPoints',
1901
- path: 'options.showPoints',
1902
- type: AXPWidgetsCatalog.toggle,
1781
+ name: 'xAxisLabel',
1782
+ path: 'options.xAxisLabel',
1783
+ type: AXPWidgetsCatalog.text,
1903
1784
  },
1904
1785
  },
1905
1786
  visible: true,
1906
1787
  },
1907
1788
  {
1908
- name: 'pointRadius',
1909
- title: '@dashboard:widgets.line-chart.point-radius',
1789
+ name: 'yAxisLabel',
1790
+ title: '@dashboard:widgets.line-chart.y-axis-label',
1910
1791
  group: AXP_APPEARANCE_PROPERTY_GROUP,
1911
1792
  schema: {
1912
- defaultValue: 4,
1913
- dataType: 'number',
1793
+ defaultValue: '',
1794
+ dataType: 'string',
1914
1795
  interface: {
1915
- name: 'pointRadius',
1916
- path: 'options.pointRadius',
1917
- type: AXPWidgetsCatalog.number,
1918
- options: {
1919
- placeholder: '1-10',
1920
- minValue: 1,
1921
- maxValue: 10,
1922
- },
1796
+ name: 'yAxisLabel',
1797
+ path: 'options.yAxisLabel',
1798
+ type: AXPWidgetsCatalog.text,
1923
1799
  },
1924
1800
  },
1925
1801
  visible: true,
@@ -1939,109 +1815,301 @@ const AXPLineChartWidget = {
1939
1815
  },
1940
1816
  visible: true,
1941
1817
  },
1818
+ /* Commented out properties
1819
+ // ====== Layout & Dimensions ======
1942
1820
  {
1943
- name: 'fillOpacity',
1944
- title: '@dashboard:widgets.line-chart.fill-opacity',
1945
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1946
- schema: {
1947
- defaultValue: 0.1,
1948
- dataType: 'number',
1949
- interface: {
1950
- name: 'fillOpacity',
1951
- path: 'options.fillOpacity',
1952
- type: AXPWidgetsCatalog.number,
1953
- options: {
1954
- placeholder: '0-1',
1955
- minValue: 0,
1956
- maxValue: 1,
1957
- step: 0.1,
1958
- },
1959
- },
1821
+ name: 'width',
1822
+ title: '@dashboard:widgets.line-chart.width',
1823
+ group: AXP_STYLING_PROPERTY_GROUP,
1824
+ schema: {
1825
+ defaultValue: null,
1826
+ dataType: 'number',
1827
+ interface: {
1828
+ name: 'width',
1829
+ path: 'options.width',
1830
+ type: AXPWidgetsCatalog.number,
1831
+ options: {
1832
+ minValue: 0,
1833
+ maxValue: 1200,
1834
+ },
1960
1835
  },
1961
- visible: true,
1836
+ },
1837
+ visible: true,
1838
+ },
1839
+ {
1840
+ name: 'height',
1841
+ title: '@dashboard:widgets.line-chart.height',
1842
+ group: AXP_STYLING_PROPERTY_GROUP,
1843
+ schema: {
1844
+ defaultValue: 300,
1845
+ dataType: 'number',
1846
+ interface: {
1847
+ name: 'height',
1848
+ path: 'options.height',
1849
+ type: AXPWidgetsCatalog.number,
1850
+ options: {
1851
+ minValue: 0,
1852
+ maxValue: 800,
1853
+ },
1854
+ },
1855
+ },
1856
+ visible: true,
1857
+ },
1858
+
1859
+ // ====== Axis Settings ======
1860
+ {
1861
+ name: 'showXAxis',
1862
+ title: '@dashboard:widgets.line-chart.show-x-axis',
1863
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1864
+ schema: {
1865
+ defaultValue: true,
1866
+ dataType: 'boolean',
1867
+ interface: {
1868
+ name: 'showXAxis',
1869
+ path: 'options.showXAxis',
1870
+ type: AXPWidgetsCatalog.toggle,
1871
+ },
1872
+ },
1873
+ visible: true,
1874
+ },
1875
+ {
1876
+ name: 'showYAxis',
1877
+ title: '@dashboard:widgets.line-chart.show-y-axis',
1878
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1879
+ schema: {
1880
+ defaultValue: true,
1881
+ dataType: 'boolean',
1882
+ interface: {
1883
+ name: 'showYAxis',
1884
+ path: 'options.showYAxis',
1885
+ type: AXPWidgetsCatalog.toggle,
1886
+ },
1887
+ },
1888
+ visible: true,
1889
+ },
1890
+ {
1891
+ name: 'yAxisStartsAtZero',
1892
+ title: '@dashboard:widgets.line-chart.y-axis-starts-at-zero',
1893
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1894
+ schema: {
1895
+ defaultValue: true,
1896
+ dataType: 'boolean',
1897
+ interface: {
1898
+ name: 'yAxisStartsAtZero',
1899
+ path: 'options.yAxisStartsAtZero',
1900
+ type: AXPWidgetsCatalog.toggle,
1901
+ },
1902
+ },
1903
+ visible: true,
1904
+ },
1905
+
1906
+ {
1907
+ name: 'showGrid',
1908
+ title: '@dashboard:widgets.line-chart.show-grid',
1909
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1910
+ schema: {
1911
+ defaultValue: true,
1912
+ dataType: 'boolean',
1913
+ interface: {
1914
+ name: 'showGrid',
1915
+ path: 'options.showGrid',
1916
+ type: AXPWidgetsCatalog.toggle,
1917
+ },
1918
+ },
1919
+ visible: true,
1920
+ },
1921
+ {
1922
+ name: 'showVerticalGrid',
1923
+ title: '@dashboard:widgets.line-chart.show-vertical-grid',
1924
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1925
+ schema: {
1926
+ defaultValue: true,
1927
+ dataType: 'boolean',
1928
+ interface: {
1929
+ name: 'showVerticalGrid',
1930
+ path: 'options.showVerticalGrid',
1931
+ type: AXPWidgetsCatalog.toggle,
1932
+ },
1933
+ },
1934
+ visible: true,
1935
+ },
1936
+
1937
+ // ====== Line Appearance ======
1938
+ {
1939
+ name: 'lineWidth',
1940
+ title: '@dashboard:widgets.line-chart.line-width',
1941
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1942
+ schema: {
1943
+ defaultValue: 2,
1944
+ dataType: 'number',
1945
+ interface: {
1946
+ name: 'lineWidth',
1947
+ path: 'options.lineWidth',
1948
+ type: AXPWidgetsCatalog.number,
1949
+ options: {
1950
+ placeholder: '1-10',
1951
+ minValue: 1,
1952
+ maxValue: 10,
1953
+ },
1954
+ },
1955
+ },
1956
+ visible: true,
1957
+ },
1958
+ {
1959
+ name: 'smoothLine',
1960
+ title: '@dashboard:widgets.line-chart.smooth-line',
1961
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1962
+ schema: {
1963
+ defaultValue: true,
1964
+ dataType: 'boolean',
1965
+ interface: {
1966
+ name: 'smoothLine',
1967
+ path: 'options.smoothLine',
1968
+ type: AXPWidgetsCatalog.toggle,
1969
+ },
1970
+ },
1971
+ visible: true,
1972
+ },
1973
+ {
1974
+ name: 'showPoints',
1975
+ title: '@dashboard:widgets.line-chart.show-points',
1976
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1977
+ schema: {
1978
+ defaultValue: true,
1979
+ dataType: 'boolean',
1980
+ interface: {
1981
+ name: 'showPoints',
1982
+ path: 'options.showPoints',
1983
+ type: AXPWidgetsCatalog.toggle,
1984
+ },
1985
+ },
1986
+ visible: true,
1987
+ },
1988
+ {
1989
+ name: 'pointRadius',
1990
+ title: '@dashboard:widgets.line-chart.point-radius',
1991
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
1992
+ schema: {
1993
+ defaultValue: 4,
1994
+ dataType: 'number',
1995
+ interface: {
1996
+ name: 'pointRadius',
1997
+ path: 'options.pointRadius',
1998
+ type: AXPWidgetsCatalog.number,
1999
+ options: {
2000
+ placeholder: '1-10',
2001
+ minValue: 1,
2002
+ maxValue: 10,
2003
+ },
2004
+ },
2005
+ },
2006
+ visible: true,
2007
+ },
2008
+ {
2009
+ name: 'fillOpacity',
2010
+ title: '@dashboard:widgets.line-chart.fill-opacity',
2011
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2012
+ schema: {
2013
+ defaultValue: 80,
2014
+ dataType: 'number',
2015
+ interface: {
2016
+ name: 'fillOpacity',
2017
+ path: 'options.fillOpacity',
2018
+ type: AXPWidgetsCatalog.number,
2019
+ options: {
2020
+ placeholder: '1-100',
2021
+ minValue: 1,
2022
+ maxValue: 100,
2023
+ },
2024
+ },
2025
+ },
2026
+ visible: true,
1962
2027
  },
2028
+
1963
2029
  // ====== Tooltip Settings ======
1964
2030
  {
1965
- name: 'showTooltip',
1966
- title: '@dashboard:widgets.line-chart.show-tooltip',
1967
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1968
- schema: {
1969
- defaultValue: true,
1970
- dataType: 'boolean',
1971
- interface: {
1972
- name: 'showTooltip',
1973
- path: 'options.showTooltip',
1974
- type: AXPWidgetsCatalog.toggle,
1975
- },
2031
+ name: 'showTooltip',
2032
+ title: '@dashboard:widgets.line-chart.show-tooltip',
2033
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2034
+ schema: {
2035
+ defaultValue: true,
2036
+ dataType: 'boolean',
2037
+ interface: {
2038
+ name: 'showTooltip',
2039
+ path: 'options.showTooltip',
2040
+ type: AXPWidgetsCatalog.toggle,
1976
2041
  },
1977
- visible: true,
2042
+ },
2043
+ visible: true,
1978
2044
  },
1979
2045
  {
1980
- name: 'showCrosshair',
1981
- title: '@dashboard:widgets.line-chart.show-crosshair',
1982
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1983
- schema: {
1984
- defaultValue: true,
1985
- dataType: 'boolean',
1986
- interface: {
1987
- name: 'showCrosshair',
1988
- path: 'options.showCrosshair',
1989
- type: AXPWidgetsCatalog.toggle,
1990
- },
2046
+ name: 'showCrosshair',
2047
+ title: '@dashboard:widgets.line-chart.show-crosshair',
2048
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2049
+ schema: {
2050
+ defaultValue: true,
2051
+ dataType: 'boolean',
2052
+ interface: {
2053
+ name: 'showCrosshair',
2054
+ path: 'options.showCrosshair',
2055
+ type: AXPWidgetsCatalog.toggle,
1991
2056
  },
1992
- visible: true,
2057
+ },
2058
+ visible: true,
1993
2059
  },
2060
+
1994
2061
  // ====== Animation Settings ======
1995
2062
  {
1996
- name: 'animationEasing',
1997
- title: '@dashboard:widgets.line-chart.animation-easing',
1998
- group: AXP_APPEARANCE_PROPERTY_GROUP,
1999
- schema: {
2000
- defaultValue: 'cubic-out',
2001
- dataType: 'string',
2002
- interface: {
2003
- name: 'animationEasing',
2004
- path: 'options.animationEasing',
2005
- type: AXPWidgetsCatalog.select,
2006
- options: {
2007
- dataSource: [
2008
- { value: 'linear', text: 'Linear' },
2009
- { value: 'ease', text: 'Ease' },
2010
- { value: 'ease-in', text: 'Ease In' },
2011
- { value: 'ease-out', text: 'Ease Out' },
2012
- { value: 'ease-in-out', text: 'Ease In Out' },
2013
- { value: 'cubic', text: 'Cubic' },
2014
- { value: 'cubic-in', text: 'Cubic In' },
2015
- { value: 'cubic-out', text: 'Cubic Out' },
2016
- { value: 'cubic-in-out', text: 'Cubic In Out' },
2017
- ],
2018
- textField: 'text',
2019
- valueField: 'value',
2020
- },
2021
- },
2063
+ name: 'animationEasing',
2064
+ title: '@dashboard:widgets.line-chart.animation-easing',
2065
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2066
+ schema: {
2067
+ defaultValue: 'cubic-out',
2068
+ dataType: 'string',
2069
+ interface: {
2070
+ name: 'animationEasing',
2071
+ path: 'options.animationEasing',
2072
+ type: AXPWidgetsCatalog.select,
2073
+ options: {
2074
+ dataSource: [
2075
+ { value: 'linear', text: 'Linear' },
2076
+ { value: 'ease', text: 'Ease' },
2077
+ { value: 'ease-in', text: 'Ease In' },
2078
+ { value: 'ease-out', text: 'Ease Out' },
2079
+ { value: 'ease-in-out', text: 'Ease In Out' },
2080
+ { value: 'cubic', text: 'Cubic' },
2081
+ { value: 'cubic-in', text: 'Cubic In' },
2082
+ { value: 'cubic-out', text: 'Cubic Out' },
2083
+ { value: 'cubic-in-out', text: 'Cubic In Out' },
2084
+ ],
2085
+ textField: 'text',
2086
+ valueField: 'value',
2087
+ },
2022
2088
  },
2023
- visible: true,
2089
+ },
2090
+ visible: true,
2024
2091
  },
2025
2092
  {
2026
- name: 'animationDuration',
2027
- title: '@dashboard:widgets.line-chart.animation-duration',
2028
- group: AXP_APPEARANCE_PROPERTY_GROUP,
2029
- schema: {
2030
- defaultValue: 800,
2031
- dataType: 'number',
2032
- interface: {
2033
- name: 'animationDuration',
2034
- path: 'options.animationDuration',
2035
- type: AXPWidgetsCatalog.number,
2036
- options: {
2037
- placeholder: '0-2000',
2038
- minValue: 0,
2039
- maxValue: 2000,
2040
- },
2041
- },
2093
+ name: 'animationDuration',
2094
+ title: '@dashboard:widgets.line-chart.animation-duration',
2095
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2096
+ schema: {
2097
+ defaultValue: 800,
2098
+ dataType: 'number',
2099
+ interface: {
2100
+ name: 'animationDuration',
2101
+ path: 'options.animationDuration',
2102
+ type: AXPWidgetsCatalog.number,
2103
+ options: {
2104
+ placeholder: '0-2000',
2105
+ minValue: 0,
2106
+ maxValue: 2000,
2107
+ },
2042
2108
  },
2043
- visible: true,
2109
+ },
2110
+ visible: true,
2044
2111
  },
2112
+ */
2045
2113
  ],
2046
2114
  components: {
2047
2115
  view: {
@@ -2054,8 +2122,8 @@ const AXPLineChartWidget = {
2054
2122
  height: 4,
2055
2123
  minWidth: 2,
2056
2124
  minHeight: 2,
2057
- maxWidth: 4,
2058
- maxHeight: 5,
2125
+ maxWidth: 6,
2126
+ maxHeight: 6,
2059
2127
  },
2060
2128
  },
2061
2129
  };
@@ -3285,7 +3353,7 @@ class AXPWeatherWidgetViewComponent extends AXPValueWidgetComponent {
3285
3353
  provide: AXPWeatherApiAbstract,
3286
3354
  useClass: AXPWeatherApiService,
3287
3355
  },
3288
- ], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["containerElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Weather Widget Component Template -->\n<div class=\"axp-weather-container\" #containerElement>\n <!-- Loading indicator -->\n @if (isLoading()) {\n <div class=\"axp-weather-loading-overlay\">\n <div class=\"axp-weather-loading-spinner\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n </div>\n }\n\n <!-- Error message -->\n @if (hasError()) {\n <div class=\"axp-weather-error-overlay\">\n <div class=\"axp-weather-error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ errorMessage() | translate: { scope: 'dashboard' } | async }}</span>\n <button class=\"axp-weather-retry-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.retry' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n }\n\n <!-- Weather content - only show when we have data -->\n @if (weatherData()) {\n <!-- Background decorations based on weather condition -->\n <div class=\"axp-weather-background-decorations\">\n <div class=\"axp-weather-decoration\" [ngClass]=\"weatherData()?.current?.condition?.toLowerCase()\"></div>\n <div class=\"axp-weather-gradient-overlay\"></div>\n </div>\n\n <div class=\"axp-weather-inner\">\n <!-- Location information section -->\n <div class=\"axp-weather-location-info\">\n <div class=\"axp-weather-location-icon\">\n <i class=\"fa-solid fa-location-dot\"></i>\n </div>\n <div class=\"axp-weather-location-text\">\n <h2 class=\"axp-weather-location-name\">{{ city() }}</h2>\n </div>\n </div>\n\n <!-- Current weather conditions section -->\n <div class=\"axp-weather-current-weather\">\n <!-- Weather icon and condition name -->\n @if (showCurrentCondition()) {\n <div class=\"axp-weather-condition\">\n <div class=\"axp-weather-icon-wrapper\">\n <div class=\"axp-weather-icon\">\n <i\n [class]=\"getConditionIcon(weatherData()?.current?.condition || '')\"\n [style.color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></i>\n </div>\n <div\n class=\"axp-weather-icon-glow\"\n [style.background-color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></div>\n </div>\n <div class=\"axp-weather-condition-name\">\n {{ getCurrentCondition() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n }\n\n <!-- Temperature display -->\n @if (showTemperature()) {\n <div class=\"axp-weather-temperature\">\n <span class=\"axp-weather-temperature-value\">{{ getCurrentTemperature() }}</span>\n <span class=\"axp-weather-temperature-unit\">{{\n getTemperatureUnit() | translate: { scope: 'dashboard' } | async\n }}</span>\n </div>\n }\n </div>\n\n <!-- Weather details section (humidity and wind) -->\n @if (showHumidity() || showWind()) {\n <div class=\"axp-weather-details\">\n <!-- Humidity information -->\n @if (showHumidity()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-droplet\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.humidity' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">{{ getHumidity() }}%</div>\n </div>\n </div>\n }\n\n <!-- Wind speed information -->\n @if (showWind()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-wind\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.wind' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnit() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Weather forecast section -->\n @if (showForecast() && weatherData()?.forecast) {\n <div class=\"axp-weather-forecast\">\n <div class=\"axp-weather-forecast-header\">\n <h3 class=\"axp-weather-forecast-title\">\n <i class=\"fa-solid fa-calendar-days\"></i>\n <span class=\"ax-px-1\">{{ 'weather.forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </h3>\n </div>\n <!-- Loading indicator for forecast -->\n <!-- @if (isForecastLoading()) {\n <div class=\"axp-weather-forecast-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading-forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n } -->\n <!-- Scrollable forecast days display -->\n <div class=\"axp-weather-forecast-items\">\n @for (day of displayedForecast(); track day.day) {\n <div class=\"axp-weather-forecast-day\">\n <div class=\"axp-weather-forecast-day-name\">\n {{ getDayName(parseDate(day.date)) | translate: { scope: 'dashboard' } | async }}\n </div>\n <div\n class=\"axp-weather-forecast-icon\"\n [title]=\"getConditionName(day.condition) | translate: { scope: 'dashboard' } | async\"\n >\n <i [class]=\"getConditionIcon(day.condition)\" [style.color]=\"getConditionColor(day.condition)\"></i>\n </div>\n <div class=\"axp-weather-forecast-temps\">\n <span class=\"axp-weather-forecast-low\">\n {{ temperatureUnit() === '\u00B0C' ? day.minTempC : day.minTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n <span class=\"axp-weather-forecast-high\">\n {{ temperatureUnit() === '\u00B0C' ? day.maxTempC : day.maxTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Last updated timestamp -->\n <div class=\"axp-weather-last-updated\">\n <span>{{ 'weather.last-updated' | translate: { scope: 'dashboard' } | async }}: {{ getLastUpdated() }}</span>\n </div>\n\n <!-- Manual refresh button -->\n <div class=\"axp-weather-refresh-action\">\n <button\n class=\"axp-weather-refresh-button\"\n (click)=\"refreshWeather()\"\n [attr.aria-label]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n [title]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n >\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.refresh' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n } @else if (!isLoading() && !hasError()) {\n <!-- No data state (not loading, no error) -->\n <div class=\"axp-weather-no-data-state\">\n <i class=\"fa-solid fa-cloud-sun\"></i>\n <p>{{ 'weather.no-data' | translate: { scope: 'dashboard' } | async }}</p>\n <button class=\"axp-weather-refresh-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.load-data' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;--primary-gradient-start: #2196f3;--primary-gradient-end: #1976d2;--shadow-color: rgba(0, 0, 0, .2);--glass-bg: rgba(255, 255, 255, .15);--glass-border: rgba(255, 255, 255, .2);--text-primary: rgba(255, 255, 255, .95);--text-secondary: rgba(255, 255, 255, .75);--transition-speed: .3s}.axp-weather-container{width:100%;height:100%;overflow:hidden;position:relative;box-shadow:0 4px 8px rgba(0,0,0,.1);color:#fff;min-height:300px;background-color:#2c3e50}.axp-weather-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(44,62,80,.85);display:flex;justify-content:center;align-items:center;z-index:100}.axp-weather-loading-spinner{text-align:center}.axp-weather-loading-spinner i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-loading-spinner span{display:block;color:#fff;font-size:1rem}.axp-weather-error-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(189,54,47,.85);display:flex;justify-content:center;align-items:center;z-index:100}.axp-weather-error-message{text-align:center;padding:1rem}.axp-weather-error-message i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-error-message span{display:block;color:#fff;font-size:1.1rem;margin-bottom:1rem}.axp-weather-error-message .axp-weather-retry-button{color:#bd362f;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-error-message .axp-weather-retry-button:hover{transform:translateY(-1px)}.axp-weather-no-data-state{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:2rem;text-align:center}.axp-weather-no-data-state i{font-size:3rem;margin-bottom:1rem;color:rgba(255,255,255,.8)}.axp-weather-no-data-state p{margin-bottom:1.5rem;font-size:1.1rem}.axp-weather-no-data-state .axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-no-data-state .axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-background-decorations{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.axp-weather-decoration{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center}.axp-weather-decoration.sunny{background:linear-gradient(135deg,#ff7e00,#f7d358)}.axp-weather-decoration.partlyCloudy{background:linear-gradient(135deg,#7ba2e7,#b4d2f7)}.axp-weather-decoration.cloudy{background:linear-gradient(135deg,#717e8c,#919eab)}.axp-weather-decoration.rain{background:linear-gradient(135deg,#6a8caf,#567a9e)}.axp-weather-decoration.snow{background:linear-gradient(135deg,#99b3cc,#c6d4e1)}.axp-weather-decoration.thunder{background:linear-gradient(135deg,#425777,#2c3e50)}.axp-weather-decoration.mist{background:linear-gradient(135deg,#94a3b8,#cbd5e1)}.axp-weather-gradient-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.5))}.axp-weather-inner{position:relative;z-index:2;height:100%;padding:1.5rem;display:flex;flex-direction:column;justify-content:space-between}.axp-weather-location-info{display:flex;align-items:center;margin-bottom:1.5rem}.axp-weather-location-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,.2);border-radius:50%;margin-right:.75rem}.axp-weather-location-icon i{color:#fff}.axp-weather-location-name{margin:0;font-size:1.5rem;font-weight:500;text-shadow:1px 1px 3px rgba(0,0,0,.2);text-transform:capitalize}.axp-weather-current-weather{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap}.axp-weather-condition{display:flex;flex-direction:column;align-items:center}.axp-weather-icon-wrapper{position:relative;margin-bottom:.5rem}.axp-weather-icon{position:relative;z-index:2}.axp-weather-icon i{font-size:2.75rem;filter:drop-shadow(0 0 8px rgba(0,0,0,.3))}.axp-weather-icon-glow{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);width:45px;height:45px;border-radius:50%;filter:blur(15px);opacity:.75}.axp-weather-condition-name{font-size:1.1rem;text-align:center;text-shadow:1px 1px 2px rgba(0,0,0,.2)}.axp-weather-temperature{display:flex;align-items:flex-start;text-shadow:1px 1px 3px rgba(0,0,0,.3)}.axp-weather-temperature-value{font-size:3.5rem;font-weight:500;line-height:1}.axp-weather-temperature-unit{font-size:1.5rem;margin-top:.25rem}.axp-weather-details{display:flex;flex-wrap:wrap;gap:1.5rem;margin-bottom:1rem;padding:1rem;background-color:rgba(0,0,0,.15);border-radius:8px}.axp-weather-detail-item{display:flex;align-items:center;flex:1;min-width:120px}.axp-weather-detail-icon{width:40px;height:40px;border-radius:50%;background-color:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;margin-right:.75rem}.axp-weather-detail-icon i{font-size:1.25rem}.axp-weather-detail-info{display:flex;padding-inline:.25rem;flex-direction:column}.axp-weather-detail-label{font-size:.875rem;color:rgba(255,255,255,.8);margin-bottom:.25rem}.axp-weather-detail-value{font-size:1.125rem;font-weight:500}.axp-weather-forecast{margin-bottom:.5rem;background-color:rgba(0,0,0,.15);border-radius:8px;padding:1rem}.axp-weather-forecast-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.axp-weather-forecast-title{margin:0;font-size:1.125rem;font-weight:500;display:flex;align-items:center}.axp-weather-forecast-title i{margin-right:.5rem;opacity:.8}.axp-weather-scroll-indicator{color:rgba(255,255,255,.6)}.axp-weather-forecast-items{display:flex;overflow-x:auto;gap:.75rem;padding-bottom:.5rem}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.3);border-radius:4px}.axp-weather-forecast-items::-webkit-scrollbar-track{background-color:rgba(0,0,0,.1);border-radius:4px}.axp-weather-forecast-day{min-width:90px;display:flex;flex-direction:column;align-items:center;padding:.75rem .5rem;background-color:rgba(255,255,255,.1);border-radius:6px;transition:all .3s ease}.axp-weather-forecast-day:hover{background-color:rgba(255,255,255,.15);transform:translateY(-2px)}.axp-weather-forecast-day-name{font-size:.875rem;margin-bottom:.5rem;font-weight:500}.axp-weather-forecast-icon{font-size:1.5rem;margin-bottom:.5rem}.axp-weather-forecast-icon i{filter:drop-shadow(0 0 5px rgba(0,0,0,.2))}.axp-weather-forecast-temps{display:flex;flex-direction:row;gap:.75rem;align-items:center;font-size:.775rem}.axp-weather-last-updated{text-align:center;font-size:.75rem;opacity:.7;margin-bottom:.5rem}.axp-weather-refresh-action{text-align:center}.axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.875rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-refresh-button i{font-size:.875rem}@media (max-width: 576px){.axp-weather-inner{padding:.8rem;gap:.4rem}.axp-weather-location-name{font-size:1.1rem;padding-inline:.25rem}.axp-weather-temperature{font-size:2.5rem}.axp-weather-temperature-unit{font-size:1.1rem}.axp-weather-weather-details{flex-direction:column;gap:.5rem}.axp-weather-forecast-items{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.5rem;margin:0 -.4rem;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:thin;mask-image:linear-gradient(to right,#000 95%,rgba(0,0,0,0));-webkit-mask-image:linear-gradient(to right,rgb(0,0,0) 95%,rgba(0,0,0,0))}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2);border-radius:4px}.axp-weather-forecast-day{min-width:60px;flex:0 0 auto;padding:.4rem .6rem}.axp-weather-forecast-day-name{font-size:.7rem}.axp-weather-forecast-icon{padding:.3rem;height:1.6rem}.axp-weather-forecast-temps{font-size:.7rem}.axp-weather-scroll-indicator{display:block}}:host-context(.theme-dark){--glass-bg: rgba(0, 0, 0, .3);--glass-border: rgba(255, 255, 255, .1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: HttpClientModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i2$3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3356
+ ], viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["containerElement"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Weather Widget Component Template -->\n<div class=\"axp-weather-container\" #containerElement>\n <!-- Loading indicator -->\n @if (isLoading()) {\n <div class=\"axp-weather-loading-overlay\">\n <div class=\"axp-weather-loading-spinner\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n </div>\n }\n\n <!-- Error message -->\n @if (hasError()) {\n <div class=\"axp-weather-error-overlay\">\n <div class=\"axp-weather-error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ errorMessage() | translate: { scope: 'dashboard' } | async }}</span>\n <button class=\"axp-weather-retry-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.retry' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n }\n\n <!-- Weather content - only show when we have data -->\n @if (weatherData()) {\n <!-- Background decorations based on weather condition -->\n <div class=\"axp-weather-background-decorations\">\n <div class=\"axp-weather-decoration\" [ngClass]=\"weatherData()?.current?.condition?.toLowerCase()\"></div>\n <div class=\"axp-weather-gradient-overlay\"></div>\n </div>\n\n <div class=\"axp-weather-inner\">\n <!-- Location information section -->\n <div class=\"axp-weather-location-info\">\n <div class=\"axp-weather-location-icon\">\n <i class=\"fa-solid fa-location-dot\"></i>\n </div>\n <div class=\"axp-weather-location-text\">\n <h2 class=\"axp-weather-location-name\">{{ city() }}</h2>\n </div>\n </div>\n\n <!-- Current weather conditions section -->\n <div class=\"axp-weather-current-weather\">\n <!-- Weather icon and condition name -->\n @if (showCurrentCondition()) {\n <div class=\"axp-weather-condition\">\n <div class=\"axp-weather-icon-wrapper\">\n <div class=\"axp-weather-icon\">\n <i\n [class]=\"getConditionIcon(weatherData()?.current?.condition || '')\"\n [style.color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></i>\n </div>\n <div\n class=\"axp-weather-icon-glow\"\n [style.background-color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></div>\n </div>\n <div class=\"axp-weather-condition-name\">\n {{ getCurrentCondition() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n }\n\n <!-- Temperature display -->\n @if (showTemperature()) {\n <div class=\"axp-weather-temperature\">\n <span class=\"axp-weather-temperature-value\">{{ getCurrentTemperature() }}</span>\n <span class=\"axp-weather-temperature-unit\">{{\n getTemperatureUnit() | translate: { scope: 'dashboard' } | async\n }}</span>\n </div>\n }\n </div>\n\n <!-- Weather details section (humidity and wind) -->\n @if (showHumidity() || showWind()) {\n <div class=\"axp-weather-details\">\n <!-- Humidity information -->\n @if (showHumidity()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-droplet\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.humidity' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">{{ getHumidity() }}%</div>\n </div>\n </div>\n }\n\n <!-- Wind speed information -->\n @if (showWind()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-wind\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.wind' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnit() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Weather forecast section -->\n @if (showForecast() && weatherData()?.forecast) {\n <div class=\"axp-weather-forecast\">\n <div class=\"axp-weather-forecast-header\">\n <h3 class=\"axp-weather-forecast-title\">\n <i class=\"fa-solid fa-calendar-days\"></i>\n <span class=\"ax-px-1\">{{ 'weather.forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </h3>\n </div>\n <!-- Loading indicator for forecast -->\n <!-- @if (isForecastLoading()) {\n <div class=\"axp-weather-forecast-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading-forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n } -->\n <!-- Scrollable forecast days display -->\n <div class=\"axp-weather-forecast-items\">\n @for (day of displayedForecast(); track day.day) {\n <div class=\"axp-weather-forecast-day\">\n <div class=\"axp-weather-forecast-day-name\">\n {{ getDayName(parseDate(day.date)) | translate: { scope: 'dashboard' } | async }}\n </div>\n <div\n class=\"axp-weather-forecast-icon\"\n [title]=\"getConditionName(day.condition) | translate: { scope: 'dashboard' } | async\"\n >\n <i [class]=\"getConditionIcon(day.condition)\" [style.color]=\"getConditionColor(day.condition)\"></i>\n </div>\n <div class=\"axp-weather-forecast-temps\">\n <span class=\"axp-weather-forecast-low\">\n {{ temperatureUnit() === '\u00B0C' ? day.minTempC : day.minTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n <span class=\"axp-weather-forecast-high\">\n {{ temperatureUnit() === '\u00B0C' ? day.maxTempC : day.maxTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Last updated timestamp -->\n <div class=\"axp-weather-last-updated\">\n <span>{{ 'weather.last-updated' | translate: { scope: 'dashboard' } | async }}: {{ getLastUpdated() }}</span>\n </div>\n\n <!-- Manual refresh button -->\n <div class=\"axp-weather-refresh-action\">\n <button\n class=\"axp-weather-refresh-button\"\n (click)=\"refreshWeather()\"\n [attr.aria-label]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n [title]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n >\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.refresh' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n } @else if (!isLoading() && !hasError()) {\n <!-- No data state (not loading, no error) -->\n <div class=\"axp-weather-no-data-state\">\n <i class=\"fa-solid fa-cloud-sun\"></i>\n <p>{{ 'weather.no-data' | translate: { scope: 'dashboard' } | async }}</p>\n <button class=\"axp-weather-refresh-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.load-data' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;--primary-gradient-start: #2196f3;--primary-gradient-end: #1976d2;--shadow-color: rgba(0, 0, 0, .2);--glass-bg: rgba(255, 255, 255, .15);--glass-border: rgba(255, 255, 255, .2);--text-primary: rgba(255, 255, 255, .95);--text-secondary: rgba(255, 255, 255, .75);--transition-speed: .3s}.axp-weather-container{width:100%;height:100%;overflow:hidden;position:relative;box-shadow:0 4px 8px rgba(0,0,0,.1);color:#fff;min-height:300px;background-color:#2c3e50}.axp-weather-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(44,62,80,.85);display:flex;justify-content:center;align-items:center;z-index:100}.axp-weather-loading-spinner{text-align:center}.axp-weather-loading-spinner i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-loading-spinner span{display:block;color:#fff;font-size:1rem}.axp-weather-error-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(189,54,47,.85);display:flex;justify-content:center;align-items:center}.axp-weather-error-message{text-align:center;padding:1rem}.axp-weather-error-message i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-error-message span{display:block;color:#fff;font-size:1.1rem;margin-bottom:1rem}.axp-weather-error-message .axp-weather-retry-button{color:#bd362f;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-error-message .axp-weather-retry-button:hover{transform:translateY(-1px)}.axp-weather-no-data-state{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:2rem;text-align:center}.axp-weather-no-data-state i{font-size:3rem;margin-bottom:1rem;color:rgba(255,255,255,.8)}.axp-weather-no-data-state p{margin-bottom:1.5rem;font-size:1.1rem}.axp-weather-no-data-state .axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-no-data-state .axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-background-decorations{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.axp-weather-decoration{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center}.axp-weather-decoration.sunny{background:linear-gradient(135deg,#ff7e00,#f7d358)}.axp-weather-decoration.partlyCloudy{background:linear-gradient(135deg,#7ba2e7,#b4d2f7)}.axp-weather-decoration.cloudy{background:linear-gradient(135deg,#717e8c,#919eab)}.axp-weather-decoration.rain{background:linear-gradient(135deg,#6a8caf,#567a9e)}.axp-weather-decoration.snow{background:linear-gradient(135deg,#99b3cc,#c6d4e1)}.axp-weather-decoration.thunder{background:linear-gradient(135deg,#425777,#2c3e50)}.axp-weather-decoration.mist{background:linear-gradient(135deg,#94a3b8,#cbd5e1)}.axp-weather-gradient-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.5))}.axp-weather-inner{position:relative;z-index:2;height:100%;padding:1.5rem;display:flex;flex-direction:column;justify-content:space-between}.axp-weather-location-info{display:flex;align-items:center;margin-bottom:1.5rem}.axp-weather-location-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,.2);border-radius:50%;margin-right:.75rem}.axp-weather-location-icon i{color:#fff}.axp-weather-location-name{margin:0;font-size:1.5rem;font-weight:500;text-shadow:1px 1px 3px rgba(0,0,0,.2);text-transform:capitalize}.axp-weather-current-weather{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap}.axp-weather-condition{display:flex;flex-direction:column;align-items:center}.axp-weather-icon-wrapper{position:relative;margin-bottom:.5rem}.axp-weather-icon{position:relative;z-index:2}.axp-weather-icon i{font-size:2.75rem;filter:drop-shadow(0 0 8px rgba(0,0,0,.3))}.axp-weather-icon-glow{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);width:45px;height:45px;border-radius:50%;filter:blur(15px);opacity:.75}.axp-weather-condition-name{font-size:1.1rem;text-align:center;text-shadow:1px 1px 2px rgba(0,0,0,.2)}.axp-weather-temperature{display:flex;align-items:flex-start;text-shadow:1px 1px 3px rgba(0,0,0,.3)}.axp-weather-temperature-value{font-size:3.5rem;font-weight:500;line-height:1}.axp-weather-temperature-unit{font-size:1.5rem;margin-top:.25rem}.axp-weather-details{display:flex;flex-wrap:wrap;gap:1.5rem;margin-bottom:1rem;padding:1rem;background-color:rgba(0,0,0,.15);border-radius:8px}.axp-weather-detail-item{display:flex;align-items:center;flex:1;min-width:120px}.axp-weather-detail-icon{width:40px;height:40px;border-radius:50%;background-color:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;margin-right:.75rem}.axp-weather-detail-icon i{font-size:1.25rem}.axp-weather-detail-info{display:flex;padding-inline:.25rem;flex-direction:column}.axp-weather-detail-label{font-size:.875rem;color:rgba(255,255,255,.8);margin-bottom:.25rem}.axp-weather-detail-value{font-size:1.125rem;font-weight:500}.axp-weather-forecast{margin-bottom:.5rem;background-color:rgba(0,0,0,.15);border-radius:8px;padding:1rem}.axp-weather-forecast-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.axp-weather-forecast-title{margin:0;font-size:1.125rem;font-weight:500;display:flex;align-items:center}.axp-weather-forecast-title i{margin-right:.5rem;opacity:.8}.axp-weather-scroll-indicator{color:rgba(255,255,255,.6)}.axp-weather-forecast-items{display:flex;overflow-x:auto;gap:.75rem;padding-bottom:.5rem}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.3);border-radius:4px}.axp-weather-forecast-items::-webkit-scrollbar-track{background-color:rgba(0,0,0,.1);border-radius:4px}.axp-weather-forecast-day{min-width:90px;display:flex;flex-direction:column;align-items:center;padding:.75rem .5rem;background-color:rgba(255,255,255,.1);border-radius:6px;transition:all .3s ease}.axp-weather-forecast-day:hover{background-color:rgba(255,255,255,.15);transform:translateY(-2px)}.axp-weather-forecast-day-name{font-size:.875rem;margin-bottom:.5rem;font-weight:500}.axp-weather-forecast-icon{font-size:1.5rem;margin-bottom:.5rem}.axp-weather-forecast-icon i{filter:drop-shadow(0 0 5px rgba(0,0,0,.2))}.axp-weather-forecast-temps{display:flex;flex-direction:row;gap:.75rem;align-items:center;font-size:.775rem}.axp-weather-last-updated{text-align:center;font-size:.75rem;opacity:.7;margin-bottom:.5rem}.axp-weather-refresh-action{text-align:center}.axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.875rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-refresh-button i{font-size:.875rem}@media (max-width: 576px){.axp-weather-inner{padding:.8rem;gap:.4rem}.axp-weather-location-name{font-size:1.1rem;padding-inline:.25rem}.axp-weather-temperature{font-size:2.5rem}.axp-weather-temperature-unit{font-size:1.1rem}.axp-weather-weather-details{flex-direction:column;gap:.5rem}.axp-weather-forecast-items{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.5rem;margin:0 -.4rem;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:thin;mask-image:linear-gradient(to right,#000 95%,rgba(0,0,0,0));-webkit-mask-image:linear-gradient(to right,rgb(0,0,0) 95%,rgba(0,0,0,0))}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2);border-radius:4px}.axp-weather-forecast-day{min-width:60px;flex:0 0 auto;padding:.4rem .6rem}.axp-weather-forecast-day-name{font-size:.7rem}.axp-weather-forecast-icon{padding:.3rem;height:1.6rem}.axp-weather-forecast-temps{font-size:.7rem}.axp-weather-scroll-indicator{display:block}}:host-context(.theme-dark){--glass-bg: rgba(0, 0, 0, .3);--glass-border: rgba(255, 255, 255, .1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: HttpClientModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i2$3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3289
3357
  }
3290
3358
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPWeatherWidgetViewComponent, decorators: [{
3291
3359
  type: Component,
@@ -3294,7 +3362,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
3294
3362
  provide: AXPWeatherApiAbstract,
3295
3363
  useClass: AXPWeatherApiService,
3296
3364
  },
3297
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Weather Widget Component Template -->\n<div class=\"axp-weather-container\" #containerElement>\n <!-- Loading indicator -->\n @if (isLoading()) {\n <div class=\"axp-weather-loading-overlay\">\n <div class=\"axp-weather-loading-spinner\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n </div>\n }\n\n <!-- Error message -->\n @if (hasError()) {\n <div class=\"axp-weather-error-overlay\">\n <div class=\"axp-weather-error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ errorMessage() | translate: { scope: 'dashboard' } | async }}</span>\n <button class=\"axp-weather-retry-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.retry' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n }\n\n <!-- Weather content - only show when we have data -->\n @if (weatherData()) {\n <!-- Background decorations based on weather condition -->\n <div class=\"axp-weather-background-decorations\">\n <div class=\"axp-weather-decoration\" [ngClass]=\"weatherData()?.current?.condition?.toLowerCase()\"></div>\n <div class=\"axp-weather-gradient-overlay\"></div>\n </div>\n\n <div class=\"axp-weather-inner\">\n <!-- Location information section -->\n <div class=\"axp-weather-location-info\">\n <div class=\"axp-weather-location-icon\">\n <i class=\"fa-solid fa-location-dot\"></i>\n </div>\n <div class=\"axp-weather-location-text\">\n <h2 class=\"axp-weather-location-name\">{{ city() }}</h2>\n </div>\n </div>\n\n <!-- Current weather conditions section -->\n <div class=\"axp-weather-current-weather\">\n <!-- Weather icon and condition name -->\n @if (showCurrentCondition()) {\n <div class=\"axp-weather-condition\">\n <div class=\"axp-weather-icon-wrapper\">\n <div class=\"axp-weather-icon\">\n <i\n [class]=\"getConditionIcon(weatherData()?.current?.condition || '')\"\n [style.color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></i>\n </div>\n <div\n class=\"axp-weather-icon-glow\"\n [style.background-color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></div>\n </div>\n <div class=\"axp-weather-condition-name\">\n {{ getCurrentCondition() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n }\n\n <!-- Temperature display -->\n @if (showTemperature()) {\n <div class=\"axp-weather-temperature\">\n <span class=\"axp-weather-temperature-value\">{{ getCurrentTemperature() }}</span>\n <span class=\"axp-weather-temperature-unit\">{{\n getTemperatureUnit() | translate: { scope: 'dashboard' } | async\n }}</span>\n </div>\n }\n </div>\n\n <!-- Weather details section (humidity and wind) -->\n @if (showHumidity() || showWind()) {\n <div class=\"axp-weather-details\">\n <!-- Humidity information -->\n @if (showHumidity()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-droplet\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.humidity' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">{{ getHumidity() }}%</div>\n </div>\n </div>\n }\n\n <!-- Wind speed information -->\n @if (showWind()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-wind\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.wind' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnit() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Weather forecast section -->\n @if (showForecast() && weatherData()?.forecast) {\n <div class=\"axp-weather-forecast\">\n <div class=\"axp-weather-forecast-header\">\n <h3 class=\"axp-weather-forecast-title\">\n <i class=\"fa-solid fa-calendar-days\"></i>\n <span class=\"ax-px-1\">{{ 'weather.forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </h3>\n </div>\n <!-- Loading indicator for forecast -->\n <!-- @if (isForecastLoading()) {\n <div class=\"axp-weather-forecast-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading-forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n } -->\n <!-- Scrollable forecast days display -->\n <div class=\"axp-weather-forecast-items\">\n @for (day of displayedForecast(); track day.day) {\n <div class=\"axp-weather-forecast-day\">\n <div class=\"axp-weather-forecast-day-name\">\n {{ getDayName(parseDate(day.date)) | translate: { scope: 'dashboard' } | async }}\n </div>\n <div\n class=\"axp-weather-forecast-icon\"\n [title]=\"getConditionName(day.condition) | translate: { scope: 'dashboard' } | async\"\n >\n <i [class]=\"getConditionIcon(day.condition)\" [style.color]=\"getConditionColor(day.condition)\"></i>\n </div>\n <div class=\"axp-weather-forecast-temps\">\n <span class=\"axp-weather-forecast-low\">\n {{ temperatureUnit() === '\u00B0C' ? day.minTempC : day.minTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n <span class=\"axp-weather-forecast-high\">\n {{ temperatureUnit() === '\u00B0C' ? day.maxTempC : day.maxTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Last updated timestamp -->\n <div class=\"axp-weather-last-updated\">\n <span>{{ 'weather.last-updated' | translate: { scope: 'dashboard' } | async }}: {{ getLastUpdated() }}</span>\n </div>\n\n <!-- Manual refresh button -->\n <div class=\"axp-weather-refresh-action\">\n <button\n class=\"axp-weather-refresh-button\"\n (click)=\"refreshWeather()\"\n [attr.aria-label]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n [title]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n >\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.refresh' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n } @else if (!isLoading() && !hasError()) {\n <!-- No data state (not loading, no error) -->\n <div class=\"axp-weather-no-data-state\">\n <i class=\"fa-solid fa-cloud-sun\"></i>\n <p>{{ 'weather.no-data' | translate: { scope: 'dashboard' } | async }}</p>\n <button class=\"axp-weather-refresh-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.load-data' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;--primary-gradient-start: #2196f3;--primary-gradient-end: #1976d2;--shadow-color: rgba(0, 0, 0, .2);--glass-bg: rgba(255, 255, 255, .15);--glass-border: rgba(255, 255, 255, .2);--text-primary: rgba(255, 255, 255, .95);--text-secondary: rgba(255, 255, 255, .75);--transition-speed: .3s}.axp-weather-container{width:100%;height:100%;overflow:hidden;position:relative;box-shadow:0 4px 8px rgba(0,0,0,.1);color:#fff;min-height:300px;background-color:#2c3e50}.axp-weather-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(44,62,80,.85);display:flex;justify-content:center;align-items:center;z-index:100}.axp-weather-loading-spinner{text-align:center}.axp-weather-loading-spinner i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-loading-spinner span{display:block;color:#fff;font-size:1rem}.axp-weather-error-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(189,54,47,.85);display:flex;justify-content:center;align-items:center;z-index:100}.axp-weather-error-message{text-align:center;padding:1rem}.axp-weather-error-message i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-error-message span{display:block;color:#fff;font-size:1.1rem;margin-bottom:1rem}.axp-weather-error-message .axp-weather-retry-button{color:#bd362f;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-error-message .axp-weather-retry-button:hover{transform:translateY(-1px)}.axp-weather-no-data-state{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:2rem;text-align:center}.axp-weather-no-data-state i{font-size:3rem;margin-bottom:1rem;color:rgba(255,255,255,.8)}.axp-weather-no-data-state p{margin-bottom:1.5rem;font-size:1.1rem}.axp-weather-no-data-state .axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-no-data-state .axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-background-decorations{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.axp-weather-decoration{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center}.axp-weather-decoration.sunny{background:linear-gradient(135deg,#ff7e00,#f7d358)}.axp-weather-decoration.partlyCloudy{background:linear-gradient(135deg,#7ba2e7,#b4d2f7)}.axp-weather-decoration.cloudy{background:linear-gradient(135deg,#717e8c,#919eab)}.axp-weather-decoration.rain{background:linear-gradient(135deg,#6a8caf,#567a9e)}.axp-weather-decoration.snow{background:linear-gradient(135deg,#99b3cc,#c6d4e1)}.axp-weather-decoration.thunder{background:linear-gradient(135deg,#425777,#2c3e50)}.axp-weather-decoration.mist{background:linear-gradient(135deg,#94a3b8,#cbd5e1)}.axp-weather-gradient-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.5))}.axp-weather-inner{position:relative;z-index:2;height:100%;padding:1.5rem;display:flex;flex-direction:column;justify-content:space-between}.axp-weather-location-info{display:flex;align-items:center;margin-bottom:1.5rem}.axp-weather-location-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,.2);border-radius:50%;margin-right:.75rem}.axp-weather-location-icon i{color:#fff}.axp-weather-location-name{margin:0;font-size:1.5rem;font-weight:500;text-shadow:1px 1px 3px rgba(0,0,0,.2);text-transform:capitalize}.axp-weather-current-weather{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap}.axp-weather-condition{display:flex;flex-direction:column;align-items:center}.axp-weather-icon-wrapper{position:relative;margin-bottom:.5rem}.axp-weather-icon{position:relative;z-index:2}.axp-weather-icon i{font-size:2.75rem;filter:drop-shadow(0 0 8px rgba(0,0,0,.3))}.axp-weather-icon-glow{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);width:45px;height:45px;border-radius:50%;filter:blur(15px);opacity:.75}.axp-weather-condition-name{font-size:1.1rem;text-align:center;text-shadow:1px 1px 2px rgba(0,0,0,.2)}.axp-weather-temperature{display:flex;align-items:flex-start;text-shadow:1px 1px 3px rgba(0,0,0,.3)}.axp-weather-temperature-value{font-size:3.5rem;font-weight:500;line-height:1}.axp-weather-temperature-unit{font-size:1.5rem;margin-top:.25rem}.axp-weather-details{display:flex;flex-wrap:wrap;gap:1.5rem;margin-bottom:1rem;padding:1rem;background-color:rgba(0,0,0,.15);border-radius:8px}.axp-weather-detail-item{display:flex;align-items:center;flex:1;min-width:120px}.axp-weather-detail-icon{width:40px;height:40px;border-radius:50%;background-color:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;margin-right:.75rem}.axp-weather-detail-icon i{font-size:1.25rem}.axp-weather-detail-info{display:flex;padding-inline:.25rem;flex-direction:column}.axp-weather-detail-label{font-size:.875rem;color:rgba(255,255,255,.8);margin-bottom:.25rem}.axp-weather-detail-value{font-size:1.125rem;font-weight:500}.axp-weather-forecast{margin-bottom:.5rem;background-color:rgba(0,0,0,.15);border-radius:8px;padding:1rem}.axp-weather-forecast-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.axp-weather-forecast-title{margin:0;font-size:1.125rem;font-weight:500;display:flex;align-items:center}.axp-weather-forecast-title i{margin-right:.5rem;opacity:.8}.axp-weather-scroll-indicator{color:rgba(255,255,255,.6)}.axp-weather-forecast-items{display:flex;overflow-x:auto;gap:.75rem;padding-bottom:.5rem}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.3);border-radius:4px}.axp-weather-forecast-items::-webkit-scrollbar-track{background-color:rgba(0,0,0,.1);border-radius:4px}.axp-weather-forecast-day{min-width:90px;display:flex;flex-direction:column;align-items:center;padding:.75rem .5rem;background-color:rgba(255,255,255,.1);border-radius:6px;transition:all .3s ease}.axp-weather-forecast-day:hover{background-color:rgba(255,255,255,.15);transform:translateY(-2px)}.axp-weather-forecast-day-name{font-size:.875rem;margin-bottom:.5rem;font-weight:500}.axp-weather-forecast-icon{font-size:1.5rem;margin-bottom:.5rem}.axp-weather-forecast-icon i{filter:drop-shadow(0 0 5px rgba(0,0,0,.2))}.axp-weather-forecast-temps{display:flex;flex-direction:row;gap:.75rem;align-items:center;font-size:.775rem}.axp-weather-last-updated{text-align:center;font-size:.75rem;opacity:.7;margin-bottom:.5rem}.axp-weather-refresh-action{text-align:center}.axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.875rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-refresh-button i{font-size:.875rem}@media (max-width: 576px){.axp-weather-inner{padding:.8rem;gap:.4rem}.axp-weather-location-name{font-size:1.1rem;padding-inline:.25rem}.axp-weather-temperature{font-size:2.5rem}.axp-weather-temperature-unit{font-size:1.1rem}.axp-weather-weather-details{flex-direction:column;gap:.5rem}.axp-weather-forecast-items{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.5rem;margin:0 -.4rem;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:thin;mask-image:linear-gradient(to right,#000 95%,rgba(0,0,0,0));-webkit-mask-image:linear-gradient(to right,rgb(0,0,0) 95%,rgba(0,0,0,0))}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2);border-radius:4px}.axp-weather-forecast-day{min-width:60px;flex:0 0 auto;padding:.4rem .6rem}.axp-weather-forecast-day-name{font-size:.7rem}.axp-weather-forecast-icon{padding:.3rem;height:1.6rem}.axp-weather-forecast-temps{font-size:.7rem}.axp-weather-scroll-indicator{display:block}}:host-context(.theme-dark){--glass-bg: rgba(0, 0, 0, .3);--glass-border: rgba(255, 255, 255, .1)}\n"] }]
3365
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Weather Widget Component Template -->\n<div class=\"axp-weather-container\" #containerElement>\n <!-- Loading indicator -->\n @if (isLoading()) {\n <div class=\"axp-weather-loading-overlay\">\n <div class=\"axp-weather-loading-spinner\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n </div>\n }\n\n <!-- Error message -->\n @if (hasError()) {\n <div class=\"axp-weather-error-overlay\">\n <div class=\"axp-weather-error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ errorMessage() | translate: { scope: 'dashboard' } | async }}</span>\n <button class=\"axp-weather-retry-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.retry' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n }\n\n <!-- Weather content - only show when we have data -->\n @if (weatherData()) {\n <!-- Background decorations based on weather condition -->\n <div class=\"axp-weather-background-decorations\">\n <div class=\"axp-weather-decoration\" [ngClass]=\"weatherData()?.current?.condition?.toLowerCase()\"></div>\n <div class=\"axp-weather-gradient-overlay\"></div>\n </div>\n\n <div class=\"axp-weather-inner\">\n <!-- Location information section -->\n <div class=\"axp-weather-location-info\">\n <div class=\"axp-weather-location-icon\">\n <i class=\"fa-solid fa-location-dot\"></i>\n </div>\n <div class=\"axp-weather-location-text\">\n <h2 class=\"axp-weather-location-name\">{{ city() }}</h2>\n </div>\n </div>\n\n <!-- Current weather conditions section -->\n <div class=\"axp-weather-current-weather\">\n <!-- Weather icon and condition name -->\n @if (showCurrentCondition()) {\n <div class=\"axp-weather-condition\">\n <div class=\"axp-weather-icon-wrapper\">\n <div class=\"axp-weather-icon\">\n <i\n [class]=\"getConditionIcon(weatherData()?.current?.condition || '')\"\n [style.color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></i>\n </div>\n <div\n class=\"axp-weather-icon-glow\"\n [style.background-color]=\"getConditionColor(weatherData()?.current?.condition || '')\"\n ></div>\n </div>\n <div class=\"axp-weather-condition-name\">\n {{ getCurrentCondition() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n }\n\n <!-- Temperature display -->\n @if (showTemperature()) {\n <div class=\"axp-weather-temperature\">\n <span class=\"axp-weather-temperature-value\">{{ getCurrentTemperature() }}</span>\n <span class=\"axp-weather-temperature-unit\">{{\n getTemperatureUnit() | translate: { scope: 'dashboard' } | async\n }}</span>\n </div>\n }\n </div>\n\n <!-- Weather details section (humidity and wind) -->\n @if (showHumidity() || showWind()) {\n <div class=\"axp-weather-details\">\n <!-- Humidity information -->\n @if (showHumidity()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-droplet\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.humidity' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">{{ getHumidity() }}%</div>\n </div>\n </div>\n }\n\n <!-- Wind speed information -->\n @if (showWind()) {\n <div class=\"axp-weather-detail-item\">\n <div class=\"axp-weather-detail-icon\">\n <i class=\"fa-solid fa-wind\"></i>\n </div>\n <div class=\"axp-weather-detail-info\">\n <div class=\"axp-weather-detail-label\">\n {{ 'weather.wind' | translate: { scope: 'dashboard' } | async }}\n </div>\n <div class=\"axp-weather-detail-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnit() | translate: { scope: 'dashboard' } | async }}\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Weather forecast section -->\n @if (showForecast() && weatherData()?.forecast) {\n <div class=\"axp-weather-forecast\">\n <div class=\"axp-weather-forecast-header\">\n <h3 class=\"axp-weather-forecast-title\">\n <i class=\"fa-solid fa-calendar-days\"></i>\n <span class=\"ax-px-1\">{{ 'weather.forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </h3>\n </div>\n <!-- Loading indicator for forecast -->\n <!-- @if (isForecastLoading()) {\n <div class=\"axp-weather-forecast-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>{{ 'weather.loading-forecast' | translate: { scope: 'dashboard' } | async }}</span>\n </div>\n } -->\n <!-- Scrollable forecast days display -->\n <div class=\"axp-weather-forecast-items\">\n @for (day of displayedForecast(); track day.day) {\n <div class=\"axp-weather-forecast-day\">\n <div class=\"axp-weather-forecast-day-name\">\n {{ getDayName(parseDate(day.date)) | translate: { scope: 'dashboard' } | async }}\n </div>\n <div\n class=\"axp-weather-forecast-icon\"\n [title]=\"getConditionName(day.condition) | translate: { scope: 'dashboard' } | async\"\n >\n <i [class]=\"getConditionIcon(day.condition)\" [style.color]=\"getConditionColor(day.condition)\"></i>\n </div>\n <div class=\"axp-weather-forecast-temps\">\n <span class=\"axp-weather-forecast-low\">\n {{ temperatureUnit() === '\u00B0C' ? day.minTempC : day.minTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n <span class=\"axp-weather-forecast-high\">\n {{ temperatureUnit() === '\u00B0C' ? day.maxTempC : day.maxTempF\n }}{{ getTemperatureUnit() | translate: { scope: 'dashboard' } | async }}\n </span>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Last updated timestamp -->\n <div class=\"axp-weather-last-updated\">\n <span>{{ 'weather.last-updated' | translate: { scope: 'dashboard' } | async }}: {{ getLastUpdated() }}</span>\n </div>\n\n <!-- Manual refresh button -->\n <div class=\"axp-weather-refresh-action\">\n <button\n class=\"axp-weather-refresh-button\"\n (click)=\"refreshWeather()\"\n [attr.aria-label]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n [title]=\"'weather.refresh' | translate: { scope: 'dashboard' } | async\"\n >\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.refresh' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n </div>\n } @else if (!isLoading() && !hasError()) {\n <!-- No data state (not loading, no error) -->\n <div class=\"axp-weather-no-data-state\">\n <i class=\"fa-solid fa-cloud-sun\"></i>\n <p>{{ 'weather.no-data' | translate: { scope: 'dashboard' } | async }}</p>\n <button class=\"axp-weather-refresh-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>{{ 'weather.load-data' | translate: { scope: 'dashboard' } | async }}</span>\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;--primary-gradient-start: #2196f3;--primary-gradient-end: #1976d2;--shadow-color: rgba(0, 0, 0, .2);--glass-bg: rgba(255, 255, 255, .15);--glass-border: rgba(255, 255, 255, .2);--text-primary: rgba(255, 255, 255, .95);--text-secondary: rgba(255, 255, 255, .75);--transition-speed: .3s}.axp-weather-container{width:100%;height:100%;overflow:hidden;position:relative;box-shadow:0 4px 8px rgba(0,0,0,.1);color:#fff;min-height:300px;background-color:#2c3e50}.axp-weather-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(44,62,80,.85);display:flex;justify-content:center;align-items:center;z-index:100}.axp-weather-loading-spinner{text-align:center}.axp-weather-loading-spinner i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-loading-spinner span{display:block;color:#fff;font-size:1rem}.axp-weather-error-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(189,54,47,.85);display:flex;justify-content:center;align-items:center}.axp-weather-error-message{text-align:center;padding:1rem}.axp-weather-error-message i{font-size:2.5rem;color:#fff;margin-bottom:.5rem}.axp-weather-error-message span{display:block;color:#fff;font-size:1.1rem;margin-bottom:1rem}.axp-weather-error-message .axp-weather-retry-button{color:#bd362f;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-error-message .axp-weather-retry-button:hover{transform:translateY(-1px)}.axp-weather-no-data-state{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;padding:2rem;text-align:center}.axp-weather-no-data-state i{font-size:3rem;margin-bottom:1rem;color:rgba(255,255,255,.8)}.axp-weather-no-data-state p{margin-bottom:1.5rem;font-size:1.1rem}.axp-weather-no-data-state .axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:1rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-no-data-state .axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-background-decorations{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.axp-weather-decoration{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center}.axp-weather-decoration.sunny{background:linear-gradient(135deg,#ff7e00,#f7d358)}.axp-weather-decoration.partlyCloudy{background:linear-gradient(135deg,#7ba2e7,#b4d2f7)}.axp-weather-decoration.cloudy{background:linear-gradient(135deg,#717e8c,#919eab)}.axp-weather-decoration.rain{background:linear-gradient(135deg,#6a8caf,#567a9e)}.axp-weather-decoration.snow{background:linear-gradient(135deg,#99b3cc,#c6d4e1)}.axp-weather-decoration.thunder{background:linear-gradient(135deg,#425777,#2c3e50)}.axp-weather-decoration.mist{background:linear-gradient(135deg,#94a3b8,#cbd5e1)}.axp-weather-gradient-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.5))}.axp-weather-inner{position:relative;z-index:2;height:100%;padding:1.5rem;display:flex;flex-direction:column;justify-content:space-between}.axp-weather-location-info{display:flex;align-items:center;margin-bottom:1.5rem}.axp-weather-location-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,.2);border-radius:50%;margin-right:.75rem}.axp-weather-location-icon i{color:#fff}.axp-weather-location-name{margin:0;font-size:1.5rem;font-weight:500;text-shadow:1px 1px 3px rgba(0,0,0,.2);text-transform:capitalize}.axp-weather-current-weather{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap}.axp-weather-condition{display:flex;flex-direction:column;align-items:center}.axp-weather-icon-wrapper{position:relative;margin-bottom:.5rem}.axp-weather-icon{position:relative;z-index:2}.axp-weather-icon i{font-size:2.75rem;filter:drop-shadow(0 0 8px rgba(0,0,0,.3))}.axp-weather-icon-glow{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);width:45px;height:45px;border-radius:50%;filter:blur(15px);opacity:.75}.axp-weather-condition-name{font-size:1.1rem;text-align:center;text-shadow:1px 1px 2px rgba(0,0,0,.2)}.axp-weather-temperature{display:flex;align-items:flex-start;text-shadow:1px 1px 3px rgba(0,0,0,.3)}.axp-weather-temperature-value{font-size:3.5rem;font-weight:500;line-height:1}.axp-weather-temperature-unit{font-size:1.5rem;margin-top:.25rem}.axp-weather-details{display:flex;flex-wrap:wrap;gap:1.5rem;margin-bottom:1rem;padding:1rem;background-color:rgba(0,0,0,.15);border-radius:8px}.axp-weather-detail-item{display:flex;align-items:center;flex:1;min-width:120px}.axp-weather-detail-icon{width:40px;height:40px;border-radius:50%;background-color:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;margin-right:.75rem}.axp-weather-detail-icon i{font-size:1.25rem}.axp-weather-detail-info{display:flex;padding-inline:.25rem;flex-direction:column}.axp-weather-detail-label{font-size:.875rem;color:rgba(255,255,255,.8);margin-bottom:.25rem}.axp-weather-detail-value{font-size:1.125rem;font-weight:500}.axp-weather-forecast{margin-bottom:.5rem;background-color:rgba(0,0,0,.15);border-radius:8px;padding:1rem}.axp-weather-forecast-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.axp-weather-forecast-title{margin:0;font-size:1.125rem;font-weight:500;display:flex;align-items:center}.axp-weather-forecast-title i{margin-right:.5rem;opacity:.8}.axp-weather-scroll-indicator{color:rgba(255,255,255,.6)}.axp-weather-forecast-items{display:flex;overflow-x:auto;gap:.75rem;padding-bottom:.5rem}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.3);border-radius:4px}.axp-weather-forecast-items::-webkit-scrollbar-track{background-color:rgba(0,0,0,.1);border-radius:4px}.axp-weather-forecast-day{min-width:90px;display:flex;flex-direction:column;align-items:center;padding:.75rem .5rem;background-color:rgba(255,255,255,.1);border-radius:6px;transition:all .3s ease}.axp-weather-forecast-day:hover{background-color:rgba(255,255,255,.15);transform:translateY(-2px)}.axp-weather-forecast-day-name{font-size:.875rem;margin-bottom:.5rem;font-weight:500}.axp-weather-forecast-icon{font-size:1.5rem;margin-bottom:.5rem}.axp-weather-forecast-icon i{filter:drop-shadow(0 0 5px rgba(0,0,0,.2))}.axp-weather-forecast-temps{display:flex;flex-direction:row;gap:.75rem;align-items:center;font-size:.775rem}.axp-weather-last-updated{text-align:center;font-size:.75rem;opacity:.7;margin-bottom:.5rem}.axp-weather-refresh-action{text-align:center}.axp-weather-refresh-button{background-color:rgba(255,255,255,.2);color:#fff;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.875rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.axp-weather-refresh-button:hover{background-color:rgba(255,255,255,.3);transform:translateY(-1px)}.axp-weather-refresh-button i{font-size:.875rem}@media (max-width: 576px){.axp-weather-inner{padding:.8rem;gap:.4rem}.axp-weather-location-name{font-size:1.1rem;padding-inline:.25rem}.axp-weather-temperature{font-size:2.5rem}.axp-weather-temperature-unit{font-size:1.1rem}.axp-weather-weather-details{flex-direction:column;gap:.5rem}.axp-weather-forecast-items{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.5rem;margin:0 -.4rem;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:thin;mask-image:linear-gradient(to right,#000 95%,rgba(0,0,0,0));-webkit-mask-image:linear-gradient(to right,rgb(0,0,0) 95%,rgba(0,0,0,0))}.axp-weather-forecast-items::-webkit-scrollbar{height:4px}.axp-weather-forecast-items::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2);border-radius:4px}.axp-weather-forecast-day{min-width:60px;flex:0 0 auto;padding:.4rem .6rem}.axp-weather-forecast-day-name{font-size:.7rem}.axp-weather-forecast-icon{padding:.3rem;height:1.6rem}.axp-weather-forecast-temps{font-size:.7rem}.axp-weather-scroll-indicator{display:block}}:host-context(.theme-dark){--glass-bg: rgba(0, 0, 0, .3);--glass-border: rgba(255, 255, 255, .1)}\n"] }]
3298
3366
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
3299
3367
 
3300
3368
  var weatherWidget_component = /*#__PURE__*/Object.freeze({
@@ -3949,7 +4017,6 @@ class AXMAddDashboardPopup extends AXBasePageComponent {
3949
4017
  constructor() {
3950
4018
  super(...arguments);
3951
4019
  this.scope = RootConfig.config.i18n;
3952
- this.isAdmin = false;
3953
4020
  this.roleService = inject(AXMOrganizationManagementRoleEntityService);
3954
4021
  this.sessionService = inject(AXPSessionService);
3955
4022
  this.title = model('');
@@ -3957,6 +4024,7 @@ class AXMAddDashboardPopup extends AXBasePageComponent {
3957
4024
  this.selectedRoleIds = model([]);
3958
4025
  this.isDisabled = model(false);
3959
4026
  this.isLocked = model(false);
4027
+ this.isAdmin = model(false);
3960
4028
  this.roles = [];
3961
4029
  }
3962
4030
  get isValid() {
@@ -3966,14 +4034,20 @@ class AXMAddDashboardPopup extends AXBasePageComponent {
3966
4034
  // Set initial values from input data
3967
4035
  this.title.set(this.data?.title || '');
3968
4036
  this.description.set(this.data?.description || '');
3969
- this.selectedRoleIds.set(this.data?.roleIds || []);
3970
4037
  this.isDisabled.set(this.data?.isDeleted || false);
3971
4038
  this.isLocked.set(this.data?.locked || false);
4039
+ this.isAdmin.set(this.data?.isAdmin || false);
3972
4040
  // Load roles if admin
3973
- if (this.isAdmin) {
4041
+ if (this.isAdmin()) {
3974
4042
  try {
3975
4043
  const result = await this.roleService.query({ skip: 0, take: 100 });
3976
- this.roles = result.items || [];
4044
+ if (result.items && result.items.length > 0) {
4045
+ this.roles = result.items.map((i) => ({
4046
+ id: i.id,
4047
+ title: i.title,
4048
+ }));
4049
+ }
4050
+ this.selectedRoleIds.set(this.roles.filter((i) => this.data?.roleIds?.includes(i.id)).map((i) => i.id));
3977
4051
  }
3978
4052
  catch (error) {
3979
4053
  console.error('Error loading roles:', error);
@@ -3985,10 +4059,10 @@ class AXMAddDashboardPopup extends AXBasePageComponent {
3985
4059
  this.close({
3986
4060
  title: this.title()?.trim(),
3987
4061
  description: this.description()?.trim(),
3988
- roleIds: this.isAdmin ? this.selectedRoleIds() : undefined,
3989
- isDeleted: this.isAdmin ? this.isDisabled() : undefined,
3990
- locked: this.isAdmin ? this.isLocked() : undefined,
3991
- scope: this.isAdmin ? 'T' : 'U',
4062
+ roleIds: this.isAdmin() ? this.selectedRoleIds() : undefined,
4063
+ isDeleted: this.isAdmin() ? this.isDisabled() : undefined,
4064
+ locked: this.isAdmin() ? this.isLocked() : undefined,
4065
+ scope: this.isAdmin() ? 'T' : 'U',
3992
4066
  createdBy: this.sessionService.user?.id,
3993
4067
  createdAt: new Date(),
3994
4068
  updatedBy: this.sessionService.user?.id,
@@ -3997,7 +4071,7 @@ class AXMAddDashboardPopup extends AXBasePageComponent {
3997
4071
  });
3998
4072
  }
3999
4073
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMAddDashboardPopup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4000
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AXMAddDashboardPopup, isStandalone: true, selector: "ng-component", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, selectedRoleIds: { classPropertyName: "selectedRoleIds", publicName: "selectedRoleIds", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLocked: { classPropertyName: "isLocked", publicName: "isLocked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { title: "titleChange", description: "descriptionChange", selectedRoleIds: "selectedRoleIdsChange", isDisabled: "isDisabledChange", isLocked: "isLockedChange" }, usesInheritance: true, ngImport: i0, template: `
4074
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AXMAddDashboardPopup, isStandalone: true, selector: "ng-component", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, selectedRoleIds: { classPropertyName: "selectedRoleIds", publicName: "selectedRoleIds", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLocked: { classPropertyName: "isLocked", publicName: "isLocked", isSignal: true, isRequired: false, transformFunction: null }, isAdmin: { classPropertyName: "isAdmin", publicName: "isAdmin", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { title: "titleChange", description: "descriptionChange", selectedRoleIds: "selectedRoleIdsChange", isDisabled: "isDisabledChange", isLocked: "isLockedChange", isAdmin: "isAdminChange" }, usesInheritance: true, ngImport: i0, template: `
4001
4075
  <div class="ax-card-body ax-p-4">
4002
4076
  <div class="ax-flex ax-flex-col ax-gap-2 ax-pb-4">
4003
4077
  <p class="ax-font-semibold">{{ 'title' | translate | async }}</p>
@@ -4009,7 +4083,7 @@ class AXMAddDashboardPopup extends AXBasePageComponent {
4009
4083
  </ax-text-box>
4010
4084
  </div>
4011
4085
 
4012
- @if (isAdmin) {
4086
+ @if (isAdmin()) {
4013
4087
  <div class="ax-flex ax-flex-col ax-gap-2 ax-mt-4">
4014
4088
  <p class="ax-font-semibold">{{ 'roles' | translate: { scope } | async }}</p>
4015
4089
  <ax-select-box
@@ -4070,7 +4144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
4070
4144
  </ax-text-box>
4071
4145
  </div>
4072
4146
 
4073
- @if (isAdmin) {
4147
+ @if (isAdmin()) {
4074
4148
  <div class="ax-flex ax-flex-col ax-gap-2 ax-mt-4">
4075
4149
  <p class="ax-font-semibold">{{ 'roles' | translate: { scope } | async }}</p>
4076
4150
  <ax-select-box
@@ -4204,7 +4278,7 @@ class AXMDashboardPopupService {
4204
4278
  draggable: true,
4205
4279
  hasBackdrop: true,
4206
4280
  title: await this.translateService.translateAsync('dashboard-info', { scope: 'dashboard' }),
4207
- data: dashboardData,
4281
+ data: { data: dashboardData },
4208
4282
  });
4209
4283
  if (!result.data) {
4210
4284
  return;
@@ -4221,7 +4295,7 @@ class AXMDashboardPopupService {
4221
4295
  size: 'sm',
4222
4296
  draggable: true,
4223
4297
  hasBackdrop: true,
4224
- title: 'Widget Configuration',
4298
+ title: await this.translateService.translateAsync('widget-configuration', { scope: 'dashboard' }),
4225
4299
  data: { widget },
4226
4300
  });
4227
4301
  if (!result.data) {
@@ -4241,139 +4315,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
4241
4315
  args: [{ providedIn: 'root' }]
4242
4316
  }] });
4243
4317
 
4318
+ // Helper functions
4319
+ const createInitialState = () => ({
4320
+ dashboards: [],
4321
+ allDashboards: [],
4322
+ currentDashboardId: null,
4323
+ isAdmin: false,
4324
+ dashboardsOption: {
4325
+ float: false,
4326
+ cellHeight: 75,
4327
+ gap: 5,
4328
+ minRow: 9,
4329
+ column: 12,
4330
+ responsiveLayout: [
4331
+ { column: 12, width: 2048 },
4332
+ { column: 6, width: 768 },
4333
+ { column: 1, width: 480 },
4334
+ ],
4335
+ },
4336
+ isLoading: false,
4337
+ });
4338
+ const modelToDashboardLayout = (model) => ({
4339
+ id: model.id || '',
4340
+ title: model.title,
4341
+ description: model.description,
4342
+ widgets: model.widgets || [],
4343
+ roleIds: model.roleIds,
4344
+ isDeleted: model.isDeleted,
4345
+ locked: model.locked,
4346
+ createdAt: model.createdAt,
4347
+ updatedAt: model.updatedAt,
4348
+ createdBy: model.createdBy,
4349
+ updatedBy: model.updatedBy,
4350
+ scope: model.scope,
4351
+ });
4352
+ const dashboardLayoutToModel = (layout) => ({
4353
+ id: layout.id,
4354
+ name: layout.title,
4355
+ title: layout.title,
4356
+ description: layout.description || '',
4357
+ widgets: layout.widgets,
4358
+ roleIds: layout.roleIds,
4359
+ isDeleted: layout.isDeleted,
4360
+ locked: layout.locked,
4361
+ createdAt: layout.createdAt,
4362
+ updatedAt: layout.updatedAt,
4363
+ createdBy: layout.createdBy,
4364
+ updatedBy: layout.updatedBy,
4365
+ scope: layout.scope,
4366
+ });
4244
4367
  // Create the SignalStore
4245
4368
  const AXMDashboardStore = signalStore({ providedIn: 'root' },
4246
4369
  // Initial State Definition
4247
- withState(() => {
4248
- // Define initial empty state
4249
- const state = {
4250
- dashboards: [],
4251
- allDashboards: [],
4252
- currentDashboardId: null,
4253
- isAdmin: false,
4254
- dashboardsOption: {
4255
- float: false,
4256
- cellHeight: 75,
4257
- gap: 5,
4258
- minRow: 9,
4259
- column: 12,
4260
- responsiveLayout: [
4261
- { column: 12, width: 2048 },
4262
- { column: 6, width: 768 },
4263
- { column: 1, width: 480 },
4264
- ],
4265
- },
4266
- isLoading: false,
4267
- };
4268
- return state;
4269
- }),
4370
+ withState(() => createInitialState()),
4270
4371
  // Computed Properties
4271
4372
  withComputed((state, sessionService = inject(AXPSessionService), layoutThemeService = inject(AXPLayoutThemeService)) => ({
4272
- currentDashboard: computed(() => {
4273
- return state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId()) || null;
4274
- }),
4275
- isAdmin: computed(() => {
4276
- return state.isAdmin();
4277
- }),
4278
- allDashboards: computed(() => {
4279
- return state.allDashboards();
4280
- }),
4281
- dashboardsOption: computed(() => {
4373
+ selectedDashboard: computed(() => state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId()) || null),
4374
+ isUserAdmin: computed(() => state.isAdmin()),
4375
+ availableDashboards: computed(() => state.allDashboards()),
4376
+ currentLayoutOptions: computed(() => {
4282
4377
  const currentDashboard = state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId());
4283
4378
  const baseOptions = state.dashboardsOption();
4284
- // If no current dashboard, return base options
4285
- if (!currentDashboard) {
4379
+ if (!currentDashboard)
4286
4380
  return baseOptions;
4287
- }
4288
- // Always disable drag and resize on mobile devices
4289
4381
  if (!layoutThemeService.isDesktopDevice()) {
4290
- return {
4291
- ...baseOptions,
4292
- disableDrag: true,
4293
- disableResize: true,
4294
- };
4382
+ return { ...baseOptions, disableDrag: true, disableResize: true };
4295
4383
  }
4296
- // If the base options already have explicit disableDrag and disableResize values,
4297
- // preserve those values (these were likely set by toggleLockDashboard)
4298
4384
  if (baseOptions.disableDrag !== undefined && baseOptions.disableResize !== undefined) {
4299
4385
  return baseOptions;
4300
4386
  }
4301
- // Check if dashboard is locked - locked dashboards always have drag and resize disabled
4302
4387
  if (currentDashboard.locked === true) {
4303
- return {
4304
- ...baseOptions,
4305
- disableDrag: true,
4306
- disableResize: true,
4307
- };
4388
+ return { ...baseOptions, disableDrag: true, disableResize: true };
4308
4389
  }
4309
- // If admin, no restrictions unless it's locked (which is checked above)
4310
- if (state.isAdmin()) {
4390
+ if (state.isAdmin())
4311
4391
  return baseOptions;
4312
- }
4313
- // Get user role
4314
4392
  const userRole = sessionService.user ? sessionService.user['role'] : undefined;
4315
- // Check if user has role in dashboard
4316
4393
  const hasRoleIds = currentDashboard.roleIds && Array.isArray(currentDashboard.roleIds) && currentDashboard.roleIds.length > 0;
4317
4394
  const hasUserRole = userRole && hasRoleIds && currentDashboard.roleIds?.includes(userRole);
4318
- // If user is not admin, has role in dashboard, and dashboard has scope 'T', disable drag and resize
4319
4395
  if (!state.isAdmin() && hasUserRole && currentDashboard.scope === 'T') {
4320
- return {
4321
- ...baseOptions,
4322
- disableDrag: true,
4323
- disableResize: true,
4324
- };
4396
+ return { ...baseOptions, disableDrag: true, disableResize: true };
4325
4397
  }
4326
- // Otherwise, return base options
4327
4398
  return baseOptions;
4328
4399
  }),
4329
- canConfigureWidget: computed(() => {
4330
- return (widget) => {
4331
- const currentDashboard = state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId());
4332
- if (!currentDashboard)
4333
- return true;
4334
- // If admin, always allow configuration
4335
- if (state.isAdmin())
4336
- return widget.node?.options?.['hasConfiguration'] ?? true;
4337
- // If dashboard is locked, no configuration allowed
4338
- if (currentDashboard.locked === true) {
4339
- return false;
4340
- }
4341
- // Get user role
4342
- const userRole = sessionService.user ? sessionService.user['role'] : undefined;
4343
- // Check if user has role in dashboard
4344
- const hasRoleIds = currentDashboard.roleIds && Array.isArray(currentDashboard.roleIds) && currentDashboard.roleIds.length > 0;
4345
- const hasUserRole = userRole && hasRoleIds && currentDashboard.roleIds?.includes(userRole);
4346
- // If user is not admin, has role in dashboard, and dashboard has scope 'T', disable configuration
4347
- if (hasUserRole && currentDashboard.scope === 'T') {
4348
- return false;
4349
- }
4350
- // Otherwise, use the widget's configuration value or default to true
4400
+ canConfigureWidget: computed(() => (widget) => {
4401
+ const currentDashboard = state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId());
4402
+ if (!currentDashboard)
4403
+ return true;
4404
+ if (state.isAdmin())
4351
4405
  return widget.node?.options?.['hasConfiguration'] ?? true;
4352
- };
4406
+ if (currentDashboard.locked === true)
4407
+ return false;
4408
+ const userRole = sessionService.user ? sessionService.user['role'] : undefined;
4409
+ const hasRoleIds = currentDashboard.roleIds && Array.isArray(currentDashboard.roleIds) && currentDashboard.roleIds.length > 0;
4410
+ const hasUserRole = userRole && hasRoleIds && currentDashboard.roleIds?.includes(userRole);
4411
+ if (hasUserRole && currentDashboard.scope === 'T')
4412
+ return false;
4413
+ return widget.node?.options?.['hasConfiguration'] ?? true;
4353
4414
  }),
4354
- isWidgetLocked: computed(() => {
4355
- return (widget) => {
4356
- const currentDashboard = state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId());
4357
- if (!currentDashboard)
4358
- return false;
4359
- // If dashboard is locked, widget is locked
4360
- if (currentDashboard.locked === true) {
4361
- return true;
4362
- }
4363
- // If admin, widget is not locked
4364
- if (state.isAdmin())
4365
- return false;
4366
- // Get user role
4367
- const userRole = sessionService.user ? sessionService.user['role'] : undefined;
4368
- // Check if user has role in dashboard
4369
- const hasRoleIds = currentDashboard.roleIds && Array.isArray(currentDashboard.roleIds) && currentDashboard.roleIds.length > 0;
4370
- const hasUserRole = userRole && hasRoleIds && currentDashboard.roleIds?.includes(userRole);
4371
- // If user is not admin, has role in dashboard, and dashboard has scope 'T', widget is locked
4372
- if (hasUserRole && currentDashboard.scope === 'T') {
4373
- return true;
4374
- }
4415
+ isWidgetLocked: computed(() => (widget) => {
4416
+ const currentDashboard = state.dashboards().find((dashboard) => dashboard.id === state.currentDashboardId());
4417
+ if (!currentDashboard)
4375
4418
  return false;
4376
- };
4419
+ if (currentDashboard.locked === true)
4420
+ return true;
4421
+ if (state.isAdmin())
4422
+ return false;
4423
+ const userRole = sessionService.user ? sessionService.user['role'] : undefined;
4424
+ const hasRoleIds = currentDashboard.roleIds && Array.isArray(currentDashboard.roleIds) && currentDashboard.roleIds.length > 0;
4425
+ const hasUserRole = userRole && hasRoleIds && currentDashboard.roleIds?.includes(userRole);
4426
+ return hasUserRole && currentDashboard.scope === 'T';
4377
4427
  }),
4378
4428
  })),
4379
4429
  // Methods for State Management
@@ -4386,126 +4436,112 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4386
4436
  async function loadDashboards() {
4387
4437
  try {
4388
4438
  patchState(store, { isLoading: true });
4389
- // Get dashboards from service using query method
4390
4439
  const result = await dashboardService.query({ skip: 0, take: 100 });
4391
4440
  const dashboardModels = result.items || [];
4392
- // Convert dashboard models to AXPDashboardLayout
4393
4441
  const dashboards = dashboardModels.map(modelToDashboardLayout);
4394
- // Get current dashboard from settings
4395
4442
  const currentDashboardId = await settingService
4396
4443
  .scope(AXPPlatformScope.User)
4397
4444
  .get(AXPHomeDashboardSetting.CurrentDashboard);
4398
4445
  let newCurrentDashboardId = null;
4399
4446
  if (dashboards.length > 0) {
4400
- // Check if currentDashboardId exists and is valid
4401
4447
  const dashboardExists = currentDashboardId && dashboards.some((d) => d.id === currentDashboardId);
4402
- if (dashboardExists) {
4403
- newCurrentDashboardId = currentDashboardId;
4404
- }
4405
- else {
4406
- // If current dashboard is not valid or not set, use the first one
4407
- newCurrentDashboardId = dashboards[0].id;
4408
- // Save to user settings
4448
+ newCurrentDashboardId = dashboardExists ? currentDashboardId : dashboards[0].id;
4449
+ if (!dashboardExists) {
4409
4450
  settingService
4410
4451
  .scope(AXPPlatformScope.User)
4411
4452
  .set(AXPHomeDashboardSetting.CurrentDashboard, newCurrentDashboardId);
4412
4453
  }
4413
4454
  }
4414
- // First, update the state with all dashboards
4415
4455
  patchState(store, {
4416
4456
  allDashboards: dashboards,
4417
- dashboards: dashboards, // Initially set all dashboards
4457
+ dashboards: dashboards,
4418
4458
  isLoading: false,
4419
4459
  currentDashboardId: newCurrentDashboardId,
4420
4460
  });
4421
- // After state is updated, apply filtering if needed
4422
- if (store.isAdmin() !== undefined) {
4423
- // We need to use the method from the return object, so we'll call it later
4424
- }
4425
4461
  }
4426
4462
  catch (error) {
4427
4463
  console.error('Error loading dashboards:', error);
4428
4464
  patchState(store, { isLoading: false });
4429
4465
  }
4430
4466
  }
4431
- // Convert entity model to dashboard layout
4432
- function modelToDashboardLayout(model) {
4433
- return {
4434
- id: model.id || '',
4435
- title: model.title,
4436
- description: model.description,
4437
- widgets: model.widgets || [],
4438
- roleIds: model.roleIds,
4439
- isDeleted: model.isDeleted,
4440
- locked: model.locked,
4441
- createdAt: model.createdAt,
4442
- updatedAt: model.updatedAt,
4443
- createdBy: model.createdBy,
4444
- updatedBy: model.updatedBy,
4445
- scope: model.scope,
4446
- };
4447
- }
4448
- // Convert dashboard layout to entity model
4449
- function dashboardLayoutToModel(layout) {
4450
- return {
4451
- id: layout.id,
4452
- name: layout.title,
4453
- title: layout.title,
4454
- description: layout.description || '',
4455
- widgets: layout.widgets,
4456
- roleIds: layout.roleIds,
4457
- isDeleted: layout.isDeleted,
4458
- locked: layout.locked,
4459
- createdAt: layout.createdAt,
4460
- updatedAt: layout.updatedAt,
4461
- createdBy: layout.createdBy,
4462
- updatedBy: layout.updatedBy,
4463
- scope: layout.scope,
4464
- };
4465
- }
4466
4467
  return {
4467
- // Set current dashboard
4468
4468
  setCurrentDashboard(dashboardId) {
4469
4469
  patchState(store, { currentDashboardId: dashboardId });
4470
4470
  settingService.scope(AXPPlatformScope.User).set(AXPHomeDashboardSetting.CurrentDashboard, dashboardId);
4471
4471
  },
4472
- // Add a new dashboard
4473
4472
  async addDashboard() {
4474
4473
  try {
4475
- const newDashboard = await dashboardPopup.generateDashboardLayout({}, store.isAdmin());
4474
+ const newDashboard = await dashboardPopup.generateDashboardLayout({}, store.isUserAdmin());
4476
4475
  if (!newDashboard)
4477
4476
  return;
4478
- // Add creation and update metadata
4479
4477
  const userId = sessionService.user?.id;
4480
4478
  const now = new Date();
4481
- newDashboard.createdBy = userId;
4482
- newDashboard.createdAt = now;
4483
- newDashboard.updatedBy = userId;
4484
- newDashboard.updatedAt = now;
4485
- newDashboard.scope = store.isAdmin() ? 'T' : 'U';
4486
- // Create dashboard model and save to service
4487
- const dashboardModel = dashboardLayoutToModel(newDashboard);
4479
+ const dashboardWithMetadata = {
4480
+ ...newDashboard,
4481
+ createdBy: userId,
4482
+ createdAt: now,
4483
+ updatedBy: userId,
4484
+ updatedAt: now,
4485
+ scope: store.isUserAdmin() ? 'T' : 'U',
4486
+ widgets: [],
4487
+ };
4488
+ const dashboardModel = dashboardLayoutToModel(dashboardWithMetadata);
4488
4489
  const createdDashboardId = await dashboardService.insertOne(dashboardModel);
4489
- newDashboard.id = createdDashboardId;
4490
- newDashboard.widgets = [];
4491
- // Update both allDashboards and dashboards states
4492
- const updatedAllDashboards = [...store.allDashboards(), newDashboard];
4493
- const updatedDashboards = [...store.dashboards(), newDashboard];
4490
+ dashboardWithMetadata.id = createdDashboardId;
4491
+ const updatedAllDashboards = [...store.availableDashboards(), dashboardWithMetadata];
4492
+ const updatedDashboards = [...store.dashboards(), dashboardWithMetadata];
4494
4493
  patchState(store, {
4495
4494
  allDashboards: updatedAllDashboards,
4496
4495
  dashboards: updatedDashboards,
4497
- currentDashboardId: newDashboard.id,
4496
+ currentDashboardId: dashboardWithMetadata.id,
4498
4497
  });
4499
- // Save current dashboard to settings
4500
- settingService.scope(AXPPlatformScope.User).set(AXPHomeDashboardSetting.CurrentDashboard, newDashboard.id);
4498
+ settingService
4499
+ .scope(AXPPlatformScope.User)
4500
+ .set(AXPHomeDashboardSetting.CurrentDashboard, dashboardWithMetadata.id);
4501
4501
  }
4502
4502
  catch (error) {
4503
4503
  console.error('Error adding dashboard:', error);
4504
4504
  }
4505
4505
  },
4506
- // Add a widget to the current dashboard
4506
+ async editDashboard() {
4507
+ const currentDashboard = store.selectedDashboard();
4508
+ if (!currentDashboard)
4509
+ return;
4510
+ try {
4511
+ const editedDashboard = await dashboardPopup.generateDashboardLayout({
4512
+ title: currentDashboard.title,
4513
+ description: currentDashboard.description,
4514
+ roleIds: currentDashboard.roleIds,
4515
+ scope: currentDashboard.scope,
4516
+ }, store.isUserAdmin());
4517
+ if (!editedDashboard)
4518
+ return;
4519
+ const userId = sessionService.user?.id;
4520
+ const now = new Date();
4521
+ const updatedDashboard = {
4522
+ ...currentDashboard,
4523
+ ...editedDashboard,
4524
+ updatedBy: userId,
4525
+ updatedAt: now,
4526
+ };
4527
+ await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4528
+ const updatedAllDashboards = store
4529
+ .availableDashboards()
4530
+ .map((d) => (d.id === updatedDashboard.id ? updatedDashboard : d));
4531
+ const updatedDashboards = store
4532
+ .dashboards()
4533
+ .map((d) => (d.id === updatedDashboard.id ? updatedDashboard : d));
4534
+ patchState(store, {
4535
+ allDashboards: updatedAllDashboards,
4536
+ dashboards: updatedDashboards,
4537
+ });
4538
+ }
4539
+ catch (error) {
4540
+ console.error('Error editing dashboard:', error);
4541
+ }
4542
+ },
4507
4543
  async addWidget() {
4508
- if (!store.currentDashboardId()) {
4544
+ if (!store.selectedDashboard()) {
4509
4545
  console.warn('No current dashboard selected');
4510
4546
  return;
4511
4547
  }
@@ -4513,57 +4549,43 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4513
4549
  const widgets = await widgetPickerService.showPicker({
4514
4550
  groups: [AXPWidgetGroupEnum.DashboardWidget],
4515
4551
  });
4516
- //remove meta from widgets //TODO TEMPORARY FIX
4517
- const filteredWidgets = widgets.map(({ __meta__, ...rest }) => rest);
4518
- if (filteredWidgets[0]?.type === 'sticky-note') {
4519
- if (!filteredWidgets[0].options) {
4520
- filteredWidgets[0].options = {};
4552
+ const filteredWidgets = widgets.map(({ __meta__, ...rest }) => {
4553
+ const widget = rest;
4554
+ if (widget.type === 'sticky-note' && !widget.options) {
4555
+ widget.options = { hasConfiguration: false };
4521
4556
  }
4522
- filteredWidgets[0].options.hasConfiguration = false;
4523
- }
4524
- filteredWidgets.forEach((widget) => {
4525
4557
  const randomId = AXPDataGenerator.uuid();
4526
- widget.name = widget?.type + '-' + randomId;
4527
- widget.path = widget?.type + '-' + randomId;
4528
- });
4529
- // Step 2: Convert the selected widgets into AXPDashboardWidgetData format
4530
- const convertedWidgets = filteredWidgets.map((widget) => {
4531
- const id = AXPDataGenerator.uuid();
4532
- return {
4533
- config: {
4534
- height: widget?.meta?.dimensions?.height ?? 2,
4535
- width: widget?.meta?.dimensions?.width ?? 2,
4536
- minHeight: widget?.meta?.dimensions?.minHeight,
4537
- minWidth: widget?.meta?.dimensions?.minWidth,
4538
- maxHeight: widget?.meta?.dimensions?.maxHeight,
4539
- maxWidth: widget?.meta?.dimensions?.maxWidth,
4540
- id,
4541
- },
4542
- node: { ...widget, name: id },
4543
- };
4544
- });
4545
- // Step 3: Update the dashboards
4546
- const updatedDashboards = store.dashboards().map((dashboard) => {
4547
- if (dashboard.id === store.currentDashboardId()) {
4548
- return {
4549
- ...dashboard,
4550
- widgets: [...dashboard.widgets, ...convertedWidgets],
4551
- };
4552
- }
4553
- return dashboard;
4558
+ widget.name = `${widget.type}-${randomId}`;
4559
+ widget.path = `${widget.type}-${randomId}`;
4560
+ return widget;
4554
4561
  });
4555
- // Step 4: Save the updated dashboard to the service
4556
- const currentDashboard = updatedDashboards.find((d) => d.id === store.currentDashboardId());
4557
- if (currentDashboard) {
4558
- await dashboardService.updateOne(currentDashboard.id, dashboardLayoutToModel(currentDashboard));
4559
- }
4562
+ const convertedWidgets = filteredWidgets.map((widget) => ({
4563
+ config: {
4564
+ height: widget?.meta?.dimensions?.height ?? 2,
4565
+ width: widget?.meta?.dimensions?.width ?? 2,
4566
+ minHeight: widget?.meta?.dimensions?.minHeight,
4567
+ minWidth: widget?.meta?.dimensions?.minWidth,
4568
+ maxHeight: widget?.meta?.dimensions?.maxHeight,
4569
+ maxWidth: widget?.meta?.dimensions?.maxWidth,
4570
+ id: AXPDataGenerator.uuid(),
4571
+ },
4572
+ node: { ...widget, name: widget.name },
4573
+ }));
4574
+ const currentDashboard = store.selectedDashboard();
4575
+ const updatedDashboard = {
4576
+ ...currentDashboard,
4577
+ widgets: [...currentDashboard.widgets, ...convertedWidgets],
4578
+ };
4579
+ await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4580
+ const updatedDashboards = store
4581
+ .dashboards()
4582
+ .map((d) => (d.id === updatedDashboard.id ? updatedDashboard : d));
4560
4583
  patchState(store, { dashboards: updatedDashboards });
4561
4584
  }
4562
4585
  catch (error) {
4563
4586
  console.error('Error adding widget:', error);
4564
4587
  }
4565
4588
  },
4566
- // Remove a dashboard
4567
4589
  async removeDashboard(id) {
4568
4590
  if (!id) {
4569
4591
  console.warn('No dashboard ID provided for removal');
@@ -4572,17 +4594,13 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4572
4594
  try {
4573
4595
  const dialogResult = await dialogService.confirm(await translationService.translateAsync('workflow.warning'), await translationService.translateAsync('workflow.confirm-delete'), 'danger', 'horizontal');
4574
4596
  if (dialogResult.result) {
4575
- // Delete from service
4576
4597
  await dashboardService.deleteOne(id);
4577
- // Remove the dashboard from both state arrays
4578
- const updatedAllDashboards = store.allDashboards().filter((dashboard) => dashboard.id !== id);
4598
+ const updatedAllDashboards = store.availableDashboards().filter((dashboard) => dashboard.id !== id);
4579
4599
  const updatedDashboards = store.dashboards().filter((dashboard) => dashboard.id !== id);
4580
- // Update state and select a new current dashboard if needed
4581
4600
  let newCurrentDashboardId = store.currentDashboardId();
4582
4601
  if (id === store.currentDashboardId()) {
4583
4602
  newCurrentDashboardId =
4584
4603
  updatedDashboards.length > 0 ? updatedDashboards[updatedDashboards.length - 1].id : null;
4585
- // Save to settings if we changed the current dashboard
4586
4604
  if (newCurrentDashboardId) {
4587
4605
  settingService
4588
4606
  .scope(AXPPlatformScope.User)
@@ -4600,7 +4618,6 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4600
4618
  console.error('Error removing dashboard:', error);
4601
4619
  }
4602
4620
  },
4603
- // Remove a widget from a dashboard
4604
4621
  async removeWidget(dashboardId, widgetId) {
4605
4622
  const currentDashboard = store.dashboards().find((d) => d.id === dashboardId);
4606
4623
  if (!currentDashboard)
@@ -4609,92 +4626,56 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4609
4626
  ...currentDashboard,
4610
4627
  widgets: currentDashboard.widgets.filter((widget) => widget.config.id !== widgetId),
4611
4628
  };
4612
- // Save to service
4613
4629
  await dashboardService.updateOne(dashboardId, dashboardLayoutToModel(updatedDashboard));
4614
- // Update local state
4615
4630
  const updatedDashboards = store
4616
4631
  .dashboards()
4617
4632
  .map((dashboard) => (dashboard.id === dashboardId ? updatedDashboard : dashboard));
4618
4633
  patchState(store, { dashboards: updatedDashboards });
4619
4634
  },
4620
- // Handle configuration changes
4621
4635
  async handleConfigChange(dashboard) {
4622
- // Save to service
4623
4636
  await dashboardService.updateOne(dashboard.id, dashboardLayoutToModel(dashboard));
4624
- // Update local state
4625
4637
  const updatedDashboards = store.dashboards().map((d) => (d.id === dashboard.id ? dashboard : d));
4626
4638
  patchState(store, {
4627
4639
  dashboards: updatedDashboards,
4628
4640
  currentDashboardId: dashboard.id,
4629
4641
  });
4630
- // Save current dashboard to settings
4631
4642
  settingService.scope(AXPPlatformScope.User).set(AXPHomeDashboardSetting.CurrentDashboard, dashboard.id);
4632
4643
  },
4633
- // Handle grid layout changes
4634
4644
  async onGridChange(event) {
4635
- // Skip any changes on mobile devices
4636
- if (!layoutThemeService.isDesktopDevice()) {
4637
- return;
4638
- }
4639
- if (!store.currentDashboard()) {
4640
- console.warn('No current dashboard for grid change');
4645
+ if (!layoutThemeService.isDesktopDevice() || !store.selectedDashboard())
4641
4646
  return;
4642
- }
4643
- // Extract nodes from the event and remove the `element` property
4644
4647
  const nodes = event.nodes.map(({ element, ...rest }) => rest);
4645
- // Update the current dashboard
4646
- const currentDashboard = store.currentDashboard();
4648
+ const currentDashboard = store.selectedDashboard();
4647
4649
  const updatedWidgets = currentDashboard.widgets.map((widget) => {
4648
4650
  const updatedNode = nodes.find((node) => node.id === widget.config.id);
4649
- if (updatedNode) {
4650
- return {
4651
- ...widget,
4652
- config: updatedNode,
4653
- };
4654
- }
4655
- return widget;
4651
+ return updatedNode ? { ...widget, config: updatedNode } : widget;
4656
4652
  });
4657
4653
  const updatedDashboard = {
4658
4654
  ...currentDashboard,
4659
4655
  widgets: updatedWidgets,
4660
4656
  };
4661
- // Save to service
4662
4657
  await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4663
- // Update the dashboards
4664
4658
  const updatedDashboards = store
4665
4659
  .dashboards()
4666
4660
  .map((dashboard) => (dashboard.id === updatedDashboard.id ? updatedDashboard : dashboard));
4667
4661
  patchState(store, { dashboards: updatedDashboards });
4668
4662
  },
4669
- // Handle widget configuration
4670
4663
  async handlePopupConfiguration(widgetNode) {
4671
- if (!store.currentDashboard()) {
4672
- console.warn('No current dashboard selected');
4664
+ if (!store.selectedDashboard())
4673
4665
  return;
4674
- }
4675
4666
  try {
4676
4667
  const updatedNode = await dashboardPopup.handlePopupConfiguration(widgetNode);
4677
- if (!updatedNode) {
4668
+ if (!updatedNode)
4678
4669
  return;
4679
- }
4680
- // Update the current dashboard's widget with the new configuration
4681
- const currentDashboard = store.currentDashboard();
4682
- const updatedWidgets = currentDashboard.widgets.map((widget) => {
4683
- if (widget.node?.name === widgetNode.name && widget.node?.path === widgetNode.path) {
4684
- return {
4685
- ...widget,
4686
- node: updatedNode,
4687
- };
4688
- }
4689
- return widget;
4690
- });
4670
+ const currentDashboard = store.selectedDashboard();
4671
+ const updatedWidgets = currentDashboard.widgets.map((widget) => widget.node?.name === widgetNode.name && widget.node?.path === widgetNode.path
4672
+ ? { ...widget, node: updatedNode }
4673
+ : widget);
4691
4674
  const updatedDashboard = {
4692
4675
  ...currentDashboard,
4693
4676
  widgets: updatedWidgets,
4694
4677
  };
4695
- // Save to service
4696
4678
  await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4697
- // Update the dashboards state
4698
4679
  const updatedDashboards = store
4699
4680
  .dashboards()
4700
4681
  .map((dashboard) => (dashboard.id === updatedDashboard.id ? updatedDashboard : dashboard));
@@ -4704,74 +4685,47 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4704
4685
  console.error('Error handling widget configuration:', error);
4705
4686
  }
4706
4687
  },
4707
- // Handle widget value changes
4708
4688
  async handleValueChanged(widgetNode, data) {
4709
- if (!store.currentDashboard()) {
4710
- console.warn('No current dashboard selected');
4689
+ if (!store.selectedDashboard())
4711
4690
  return;
4712
- }
4713
4691
  try {
4714
- // Update the current dashboard's widget with the new value
4715
- const currentDashboard = store.currentDashboard();
4716
- const updatedWidgets = currentDashboard.widgets.map((widget) => {
4717
- if (widget.node && widget.node.name === widgetNode.name && widget.node.path === widgetNode.path) {
4718
- return {
4719
- ...widget,
4720
- node: {
4721
- ...widget.node,
4722
- defaultValue: data,
4723
- },
4724
- };
4725
- }
4726
- return widget;
4727
- });
4692
+ const currentDashboard = store.selectedDashboard();
4693
+ const updatedWidgets = currentDashboard.widgets.map((widget) => widget.node && widget.node.name === widgetNode.name && widget.node.path === widgetNode.path
4694
+ ? { ...widget, node: { ...widget.node, defaultValue: data } }
4695
+ : widget);
4728
4696
  const updatedDashboard = {
4729
4697
  ...currentDashboard,
4730
4698
  widgets: updatedWidgets,
4731
4699
  };
4732
- // Save to service
4733
4700
  await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4734
- // Update the dashboards state
4735
4701
  const updatedDashboards = store
4736
4702
  .dashboards()
4737
4703
  .map((dashboard) => (dashboard.id === updatedDashboard.id ? updatedDashboard : dashboard));
4738
- // patchState(store, { dashboards: updatedDashboards });
4704
+ patchState(store, { dashboards: updatedDashboards });
4739
4705
  }
4740
4706
  catch (error) {
4741
4707
  console.error('Error handling widget value change:', error);
4742
4708
  }
4743
4709
  },
4744
- // Handle widget options changes
4745
4710
  async handleOptionsChanged(widgetNode, data) {
4746
- if (!store.currentDashboard()) {
4747
- console.warn('No current dashboard selected');
4711
+ if (!store.selectedDashboard())
4748
4712
  return;
4749
- }
4750
4713
  try {
4751
- // Update the current dashboard's widget with the new options
4752
- const currentDashboard = store.currentDashboard();
4753
- const updatedWidgets = currentDashboard.widgets.map((widget) => {
4754
- if (widget.node && widget.node.name === widgetNode.name && widget.node.path === widgetNode.path) {
4755
- return {
4756
- ...widget,
4757
- node: {
4758
- ...widget.node,
4759
- options: {
4760
- ...(widget.node.options || {}),
4761
- ...data,
4762
- },
4763
- },
4764
- };
4714
+ const currentDashboard = store.selectedDashboard();
4715
+ const updatedWidgets = currentDashboard.widgets.map((widget) => widget.node && widget.node.name === widgetNode.name && widget.node.path === widgetNode.path
4716
+ ? {
4717
+ ...widget,
4718
+ node: {
4719
+ ...widget.node,
4720
+ options: { ...(widget.node.options || {}), ...data },
4721
+ },
4765
4722
  }
4766
- return widget;
4767
- });
4723
+ : widget);
4768
4724
  const updatedDashboard = {
4769
4725
  ...currentDashboard,
4770
4726
  widgets: updatedWidgets,
4771
4727
  };
4772
- // Save to service
4773
4728
  await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4774
- // Update the dashboards state
4775
4729
  const updatedDashboards = store
4776
4730
  .dashboards()
4777
4731
  .map((dashboard) => (dashboard.id === updatedDashboard.id ? updatedDashboard : dashboard));
@@ -4781,118 +4735,80 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4781
4735
  console.error('Error handling widget options change:', error);
4782
4736
  }
4783
4737
  },
4784
- // Handle setting admin state
4785
4738
  setIsAdmin(isAdmin) {
4786
4739
  patchState(store, { isAdmin });
4787
4740
  },
4788
4741
  // Filter dashboards by scope
4789
4742
  filterDashboardsByScope(isAdmin) {
4790
- // Get all dashboards from the stored allDashboards array
4791
- const allDashboards = store.allDashboards();
4792
- // Get user ID and role from session service
4743
+ const allDashboards = store.availableDashboards();
4793
4744
  const userId = sessionService.user?.id;
4794
4745
  const userRole = sessionService.user ? sessionService.user['role'] : undefined;
4795
4746
  if (!userId) {
4796
- // If no user ID, don't filter
4797
4747
  patchState(store, { dashboards: allDashboards });
4798
4748
  return;
4799
4749
  }
4800
- // Apply filtering based on user permissions
4801
- let filteredDashboards = allDashboards;
4802
- if (isAdmin) {
4803
- // Admin sees only tenant-level dashboards
4804
- filteredDashboards = allDashboards.filter((dashboard) => dashboard.scope === 'T');
4805
- }
4806
- else {
4807
- // Regular users see:
4808
- // 1. User-level dashboards they created
4809
- // 2. Tenant-level dashboards where their role is included AND isDeleted is false/undefined
4810
- filteredDashboards = allDashboards.filter((dashboard) => {
4811
- // Check if this is a user-level dashboard created by this user
4750
+ const filteredDashboards = isAdmin
4751
+ ? allDashboards.filter((dashboard) => dashboard.scope === 'T')
4752
+ : allDashboards.filter((dashboard) => {
4812
4753
  const isUserDashboard = dashboard.scope === 'U' && dashboard.createdBy === userId;
4813
- // Check if this is a tenant-level dashboard with user's role and is not deleted
4814
4754
  const hasRoleIds = dashboard.roleIds && Array.isArray(dashboard.roleIds) && dashboard.roleIds.length > 0;
4815
4755
  const isTenantDashboard = dashboard.scope === 'T';
4816
4756
  const hasUserRole = userRole && hasRoleIds && dashboard.roleIds?.includes(userRole);
4817
- const isNotDeleted = dashboard.isDeleted !== true; // Show if isDeleted is false or undefined
4757
+ const isNotDeleted = dashboard.isDeleted !== true;
4818
4758
  const isTenantDashboardWithRole = isTenantDashboard && hasUserRole && isNotDeleted;
4819
4759
  return isUserDashboard || isTenantDashboardWithRole;
4820
4760
  });
4821
- }
4822
- // Update dashboards state
4823
4761
  patchState(store, { dashboards: filteredDashboards });
4824
- // If current dashboard is not in filtered list, select the first one
4825
4762
  if (filteredDashboards.length > 0 && !filteredDashboards.some((d) => d.id === store.currentDashboardId())) {
4826
4763
  this.setCurrentDashboard(filteredDashboards[0].id);
4827
4764
  }
4828
4765
  },
4829
- // Toggle lock state for the current dashboard
4830
4766
  async toggleLockDashboard() {
4831
- const currentDashboard = store.currentDashboard();
4832
- if (!currentDashboard) {
4833
- console.warn('No current dashboard selected');
4767
+ const currentDashboard = store.selectedDashboard();
4768
+ if (!currentDashboard)
4834
4769
  return;
4835
- }
4836
4770
  try {
4837
- // Check permission to toggle lock
4838
- const isAdmin = store.isAdmin();
4771
+ const isAdmin = store.isUserAdmin();
4839
4772
  const userId = sessionService.user?.id;
4840
- // Determine if user can toggle lock based on the rules:
4841
- // 1. If isAdmin is false, user can only toggle their own user-level dashboards
4842
- // 2. If isAdmin is true, user can only toggle tenant-level dashboards
4843
4773
  const canToggle = (!isAdmin && currentDashboard.scope === 'U' && currentDashboard.createdBy === userId) ||
4844
4774
  (isAdmin && currentDashboard.scope === 'T');
4845
4775
  if (!canToggle) {
4846
4776
  console.warn('User does not have permission to toggle lock for this dashboard');
4847
4777
  return;
4848
4778
  }
4849
- // Toggle the locked state
4850
4779
  const newLockedState = !currentDashboard.locked;
4851
- // Create an updated dashboard with toggled lock state
4852
4780
  const updatedDashboard = {
4853
4781
  ...currentDashboard,
4854
4782
  locked: newLockedState,
4855
4783
  };
4856
- // Save to service
4857
4784
  await dashboardService.updateOne(updatedDashboard.id, dashboardLayoutToModel(updatedDashboard));
4858
- // Update the dashboards in store
4859
4785
  const updatedDashboards = store
4860
4786
  .dashboards()
4861
4787
  .map((dashboard) => (dashboard.id === updatedDashboard.id ? updatedDashboard : dashboard));
4862
- // IMPORTANT: Get the base options BEFORE updating the dashboards state
4863
- // This ensures we're getting the current options without the lock state applied yet
4864
4788
  const baseOptions = { ...store.dashboardsOption() };
4865
- // First update the dashboards state
4866
- patchState(store, {
4867
- dashboards: updatedDashboards,
4868
- });
4869
- // Get a fresh reference to the updated options with drag/resize explicitly set
4870
- // This ensures the grid layout container gets a new object reference and responds immediately
4789
+ patchState(store, { dashboards: updatedDashboards });
4871
4790
  const updatedOptions = {
4872
4791
  ...baseOptions,
4873
4792
  disableDrag: newLockedState,
4874
4793
  disableResize: newLockedState,
4875
4794
  };
4876
- // Now update the options state separately to force a refresh of the grid layout
4877
- patchState(store, {
4878
- dashboardsOption: updatedOptions,
4879
- });
4795
+ patchState(store, { dashboardsOption: updatedOptions });
4880
4796
  }
4881
4797
  catch (error) {
4882
4798
  console.error('Error toggling dashboard lock state:', error);
4883
4799
  }
4884
4800
  },
4885
- // Check if dashboard is locked
4886
4801
  isDashboardLocked() {
4887
- const currentDashboard = store.currentDashboard();
4802
+ const currentDashboard = store.selectedDashboard();
4888
4803
  return currentDashboard?.locked === true;
4889
4804
  },
4890
4805
  };
4891
4806
  }));
4892
4807
 
4893
- class AXMDashboardHomeComponent extends AXPBasePageComponent {
4808
+ class AXMDashboardHomeComponent extends AXPPageLayoutBaseComponent {
4894
4809
  constructor() {
4895
4810
  super(...arguments);
4811
+ // Dependencies
4896
4812
  this.rootConfig = RootConfig;
4897
4813
  this.activatedRoute = inject(ActivatedRoute);
4898
4814
  this.dialogService = inject(AXDialogService);
@@ -4900,25 +4816,20 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
4900
4816
  this.router = inject(Router);
4901
4817
  this.store = inject(AXMDashboardStore);
4902
4818
  this.themeService = inject(AXPLayoutThemeService);
4903
- this.isEdited = signal(false);
4819
+ // Component State
4904
4820
  this.context = signal({});
4905
4821
  this.dashboardsLoaded = signal(false);
4906
- this.#dashboardsEffect = effect(() => {
4907
- const allDashboards = this.store.allDashboards();
4822
+ // Effects
4823
+ this.#initEffect = effect(() => {
4824
+ const allDashboards = this.store.availableDashboards();
4908
4825
  if (allDashboards.length > 0 && !this.dashboardsLoaded()) {
4909
4826
  this.dashboardsLoaded.set(true);
4910
4827
  this.applyDashboardFiltering();
4911
4828
  this.recompute();
4912
4829
  }
4913
4830
  });
4914
- this.#loadingEffect = effect(() => {
4915
- const isLoading = this.store.isLoading();
4916
- if (isLoading === false && this.dashboardsLoaded()) {
4917
- this.recompute;
4918
- setTimeout(() => this.recompute(), 0);
4919
- }
4920
- });
4921
4831
  }
4832
+ // Lifecycle Hooks
4922
4833
  async ngOnInit() {
4923
4834
  const childRoute = this.activatedRoute.firstChild || this.activatedRoute;
4924
4835
  childRoute.data.subscribe((data) => {
@@ -4926,13 +4837,11 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
4926
4837
  this.store.setIsAdmin(isAdmin);
4927
4838
  });
4928
4839
  }
4840
+ // Effects
4841
+ #initEffect;
4842
+ // Private Methods
4929
4843
  applyDashboardFiltering() {
4930
- this.store.filterDashboardsByScope(this.store.isAdmin());
4931
- }
4932
- #dashboardsEffect;
4933
- #loadingEffect;
4934
- toggleEdit() {
4935
- this.isEdited.update((value) => !value);
4844
+ this.store.filterDashboardsByScope(this.store.isUserAdmin());
4936
4845
  }
4937
4846
  async confirmWidgetDelete(dashboardId, widgetId) {
4938
4847
  try {
@@ -4945,23 +4854,21 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
4945
4854
  console.error('Error confirming widget deletion:', error);
4946
4855
  }
4947
4856
  }
4857
+ // Page Interface Implementation
4948
4858
  getPageTitle() {
4949
- return this.store.currentDashboard()?.title || 'Dashboard';
4859
+ return this.store.selectedDashboard()?.title || 'Dashboard';
4950
4860
  }
4951
4861
  async getPageDescription() {
4952
- return this.store.currentDashboard()?.description || '';
4862
+ return this.store.selectedDashboard()?.description || '';
4953
4863
  }
4954
4864
  getTitleActions() {
4955
- return [
4956
- ...this.store.dashboards().map((i) => ({
4957
- title: i.title,
4958
- command: { name: i.id, metadata: { isDashboard: true, dashboard: i } },
4959
- icon: i.id === this.store.currentDashboardId() ? 'fa-solid fa-check' : '',
4960
- })),
4961
- ];
4865
+ return this.store.dashboards().map((dashboard) => ({
4866
+ title: dashboard.title,
4867
+ command: { name: dashboard.id, metadata: { isDashboard: true, dashboard } },
4868
+ icon: dashboard.id === this.store.currentDashboardId() ? 'fa-solid fa-check' : '',
4869
+ }));
4962
4870
  }
4963
4871
  async getPrimaryMenuItems() {
4964
- const scope = this.rootConfig.config.i18n;
4965
4872
  return [
4966
4873
  {
4967
4874
  title: 't("add-item")',
@@ -4972,16 +4879,12 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
4972
4879
  title: await this.translateService.translateAsync('dashboard', { scope: 'dashboard' }),
4973
4880
  icon: 'fa-light fa-gauge-high',
4974
4881
  break: true,
4975
- command: {
4976
- name: 'new-dashboard',
4977
- },
4882
+ command: { name: 'new-dashboard' },
4978
4883
  },
4979
4884
  {
4980
4885
  title: await this.translateService.translateAsync('widget', { scope: 'dashboard' }),
4981
4886
  icon: 'fa-light fa-window-restore',
4982
- command: {
4983
- name: 'new-widget',
4984
- },
4887
+ command: { name: 'new-widget' },
4985
4888
  disabled: this.store.dashboards().length < 1,
4986
4889
  },
4987
4890
  ],
@@ -4989,19 +4892,16 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
4989
4892
  ];
4990
4893
  }
4991
4894
  async getSecondaryMenuItems() {
4992
- const scope = this.rootConfig.config.i18n;
4993
4895
  const items = [
4994
4896
  {
4995
- title: await this.translateService.translateAsync('delete'),
4996
- icon: 'fa-light fa-trash-can',
4997
- color: 'danger',
4897
+ title: await this.translateService.translateAsync('edit'),
4898
+ icon: 'fa-light fa-pen',
4899
+ color: 'primary',
4998
4900
  disabled: this.store.dashboards().length < 1,
4999
- command: {
5000
- name: 'delete',
5001
- },
4901
+ command: { name: 'edit' },
5002
4902
  },
5003
4903
  ];
5004
- if (!this.store.isAdmin() && this.themeService.isDesktopDevice()) {
4904
+ if (!this.store.isUserAdmin() && this.themeService.isDesktopDevice()) {
5005
4905
  items.push({
5006
4906
  title: await this.translateService.translateAsync(this.store.isDashboardLocked() ? 'unlock' : 'lock', {
5007
4907
  scope: 'dashboard',
@@ -5009,43 +4909,48 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
5009
4909
  icon: this.store.isDashboardLocked() ? 'fa-light fa-lock-open' : 'fa-light fa-lock',
5010
4910
  color: 'accent3',
5011
4911
  disabled: this.store.dashboards().length < 1,
5012
- command: {
5013
- name: 'toggle-lock',
5014
- },
4912
+ command: { name: 'toggle-lock' },
5015
4913
  });
5016
4914
  }
4915
+ items.push({
4916
+ title: await this.translateService.translateAsync('delete'),
4917
+ icon: 'fa-light fa-trash-can',
4918
+ color: 'danger',
4919
+ disabled: this.store.dashboards().length < 1,
4920
+ command: { name: 'delete' },
4921
+ });
5017
4922
  return items;
5018
4923
  }
5019
4924
  async execute(command) {
5020
4925
  if (command.metadata?.['isDashboard']) {
5021
4926
  this.store.handleConfigChange(command.metadata?.['dashboard']);
5022
4927
  this.recompute();
4928
+ return;
5023
4929
  }
5024
- else {
5025
- switch (command.name) {
5026
- case 'new-dashboard':
5027
- await this.store.addDashboard();
5028
- this.applyDashboardFiltering();
5029
- this.recompute();
5030
- break;
5031
- case 'new-widget':
5032
- await this.store.addWidget();
5033
- this.recompute();
5034
- break;
5035
- case 'delete':
5036
- await this.store.removeDashboard(this.store.currentDashboard()?.id);
5037
- this.applyDashboardFiltering();
5038
- this.recompute();
5039
- break;
5040
- case 'toggle-lock':
5041
- await this.store.toggleLockDashboard();
5042
- this.recompute();
5043
- // Add a short delay to ensure the grid layout updates properly
5044
- setTimeout(() => {
5045
- this.recompute();
5046
- }, 50);
5047
- break;
5048
- }
4930
+ switch (command.name) {
4931
+ case 'new-dashboard':
4932
+ await this.store.addDashboard();
4933
+ this.applyDashboardFiltering();
4934
+ this.recompute();
4935
+ break;
4936
+ case 'new-widget':
4937
+ await this.store.addWidget();
4938
+ this.recompute();
4939
+ break;
4940
+ case 'edit':
4941
+ await this.store.editDashboard();
4942
+ this.recompute();
4943
+ break;
4944
+ case 'delete':
4945
+ await this.store.removeDashboard(this.store.selectedDashboard()?.id);
4946
+ this.applyDashboardFiltering();
4947
+ this.recompute();
4948
+ break;
4949
+ case 'toggle-lock':
4950
+ await this.store.toggleLockDashboard();
4951
+ this.recompute();
4952
+ setTimeout(() => this.recompute(), 50);
4953
+ break;
5049
4954
  }
5050
4955
  }
5051
4956
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMDashboardHomeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
@@ -5053,10 +4958,10 @@ class AXMDashboardHomeComponent extends AXPBasePageComponent {
5053
4958
  AXPDesignerService,
5054
4959
  AXMDashboardStore,
5055
4960
  {
5056
- provide: AXPBasePage,
4961
+ provide: AXPPageLayoutBase,
5057
4962
  useExisting: AXMDashboardHomeComponent,
5058
4963
  },
5059
- ], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n <!-- Content Section -->\n\n <axp-page-content class=\"ax-relative\">\n @if(store.isLoading()) {\n <div\n class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-w-full ax-absolute ax-z-10 ax-bg-white/80\"\n >\n <ax-loading></ax-loading>\n <p class=\"ax-mt-3 ax-text-gray-600\">{{ t('loading', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else {\n <axp-widgets-container [context]=\"context()\">\n <ax-grid-layout-container [options]=\"store.dashboardsOption()\" (onChange)=\"store.onGridChange($event)\">\n @if(!store.dashboards() || store.dashboards().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-dashboards', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else if (!store.currentDashboard()) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">\n {{ t('no-current-dashboard', { scope: 'dashboard' }) | async }}\n </h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('select-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else if (!store.currentDashboard()?.widgets || store.currentDashboard()?.widgets.length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-widgets', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-widget', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else { @for(widget of store.currentDashboard()?.widgets; track widget.config.id) {\n <ax-grid-layout-widget [options]=\"widget.config\">\n <axm-dashboard-widget-wrapper\n [title]=\"widget.node?.options?.['title']\"\n [hasConfiguration]=\"store.canConfigureWidget()(widget)\"\n [isLocked]=\"store.isWidgetLocked()(widget)\"\n (onDelete)=\"confirmWidgetDelete(store.currentDashboard()?.id!, widget.config.id!)\"\n (onConfiguration)=\"store.handlePopupConfiguration(widget.node!)\"\n (onValueChanged)=\"store.handleValueChanged(widget?.node!,$event)\"\n (onOptionsChanged)=\"store.handleOptionsChanged(widget?.node!,$event)\"\n >\n @if(widget.node) {\n <ng-container axp-widget-renderer [node]=\"widget.node\" [mode]=\"'view'\"></ng-container>\n }\n </axm-dashboard-widget-wrapper>\n </ax-grid-layout-widget>\n } }\n </ax-grid-layout-container>\n </axp-widgets-container>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-dashboard-home{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axm-dashboard-home .placeholder-content{border-radius:.5rem!important;border-width:1px!important;border-style:dashed!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))!important;background-color:rgba(var(--ax-sys-color-primary-lightest-surface),.5)!important}axm-dashboard-home ax-grid-layout-widget .grid-stack-item-content{border-radius:.375rem!important;border-width:1px!important;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important;--ax-comp-grid-layout-stack-item-content-bg-color: var(--ax-sys-color-lightest-surface) }\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i2$4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXGridLayoutBuilderModule }, { kind: "component", type: i4$1.AXGridLayoutContainerComponent, selector: "ax-grid-layout-container", inputs: ["options", "isEmpty"], outputs: ["onAdded", "onRemoved", "onWidgetChange", "onChange", "onRender", "isEmptyChange"] }, { kind: "component", type: i4$1.AXGridLayoutWidgetComponent, selector: "ax-grid-layout-widget", inputs: ["options"] }, { kind: "component", type: 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: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i2$3.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "component", type: AXMDashboardWidgetWrapperComponent, selector: "axm-dashboard-widget-wrapper", inputs: ["title", "hasConfiguration", "isLocked"], outputs: ["onDelete", "onConfiguration", "onValueChanged", "onOptionsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4964
+ ], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n <!-- Content Section -->\n\n <axp-page-content class=\"ax-relative\">\n <!-- Loading State -->\n @if(store.isLoading()) {\n <div\n class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-w-full ax-absolute ax-z-10 ax-bg-white/80\"\n >\n <ax-loading></ax-loading>\n <p class=\"ax-mt-3 ax-text-gray-600\">{{ t('loading', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else {\n <axp-widgets-container [context]=\"context()\">\n <ax-grid-layout-container [options]=\"store.currentLayoutOptions()\" (onChange)=\"store.onGridChange($event)\">\n <!-- No Dashboards State -->\n @if(!store.dashboards() || store.dashboards().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-dashboards', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n }\n <!-- No Selected Dashboard State -->\n @else if (!store.selectedDashboard()) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">\n {{ t('no-current-dashboard', { scope: 'dashboard' }) | async }}\n </h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('select-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n }\n <!-- No Widgets State -->\n @else if (!store.selectedDashboard()?.widgets || store.selectedDashboard()?.widgets?.length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-widgets', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-widget', { scope: 'dashboard' }) | async }}</p>\n </div>\n }\n <!-- Widgets Grid -->\n @else { @for(widget of store.selectedDashboard()?.widgets; track widget.config.id) {\n <ax-grid-layout-widget [options]=\"widget.config\">\n <axm-dashboard-widget-wrapper\n [title]=\"widget.node?.options?.['title']\"\n [hasConfiguration]=\"store.canConfigureWidget()(widget)\"\n [isLocked]=\"store.isWidgetLocked()(widget)\"\n (onDelete)=\"confirmWidgetDelete(store.selectedDashboard()?.id!, widget.config.id!)\"\n (onConfiguration)=\"store.handlePopupConfiguration(widget.node!)\"\n (onValueChanged)=\"store.handleValueChanged(widget?.node!,$event)\"\n (onOptionsChanged)=\"store.handleOptionsChanged(widget?.node!,$event)\"\n >\n @if(widget.node) {\n <ng-container axp-widget-renderer [node]=\"widget.node\" [mode]=\"'view'\"></ng-container>\n }\n </axm-dashboard-widget-wrapper>\n </ax-grid-layout-widget>\n } }\n </ax-grid-layout-container>\n </axp-widgets-container>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-dashboard-home{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axm-dashboard-home .placeholder-content{border-radius:.5rem!important;border-width:1px!important;border-style:dashed!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))!important;background-color:rgba(var(--ax-sys-color-primary-lightest-surface),.5)!important}axm-dashboard-home ax-grid-layout-widget .grid-stack-item-content{border-radius:.375rem!important;border-width:1px!important;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important;--ax-comp-grid-layout-stack-item-content-bg-color: var(--ax-sys-color-lightest-surface) }\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i2$4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXGridLayoutBuilderModule }, { kind: "component", type: i4$1.AXGridLayoutContainerComponent, selector: "ax-grid-layout-container", inputs: ["options", "isEmpty"], outputs: ["onAdded", "onRemoved", "onWidgetChange", "onChange", "onRender", "isEmptyChange"] }, { kind: "component", type: i4$1.AXGridLayoutWidgetComponent, selector: "ax-grid-layout-widget", inputs: ["options"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, 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: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i2$3.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "component", type: AXMDashboardWidgetWrapperComponent, selector: "axm-dashboard-widget-wrapper", inputs: ["title", "hasConfiguration", "isLocked"], outputs: ["onDelete", "onConfiguration", "onValueChanged", "onOptionsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5060
4965
  }
5061
4966
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMDashboardHomeComponent, decorators: [{
5062
4967
  type: Component,
@@ -5079,10 +4984,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
5079
4984
  AXPDesignerService,
5080
4985
  AXMDashboardStore,
5081
4986
  {
5082
- provide: AXPBasePage,
4987
+ provide: AXPPageLayoutBase,
5083
4988
  useExisting: AXMDashboardHomeComponent,
5084
4989
  },
5085
- ], template: "<axp-page-layout *translate=\"let t\">\n <!-- Content Section -->\n\n <axp-page-content class=\"ax-relative\">\n @if(store.isLoading()) {\n <div\n class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-w-full ax-absolute ax-z-10 ax-bg-white/80\"\n >\n <ax-loading></ax-loading>\n <p class=\"ax-mt-3 ax-text-gray-600\">{{ t('loading', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else {\n <axp-widgets-container [context]=\"context()\">\n <ax-grid-layout-container [options]=\"store.dashboardsOption()\" (onChange)=\"store.onGridChange($event)\">\n @if(!store.dashboards() || store.dashboards().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-dashboards', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else if (!store.currentDashboard()) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">\n {{ t('no-current-dashboard', { scope: 'dashboard' }) | async }}\n </h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('select-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else if (!store.currentDashboard()?.widgets || store.currentDashboard()?.widgets.length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-widgets', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-widget', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else { @for(widget of store.currentDashboard()?.widgets; track widget.config.id) {\n <ax-grid-layout-widget [options]=\"widget.config\">\n <axm-dashboard-widget-wrapper\n [title]=\"widget.node?.options?.['title']\"\n [hasConfiguration]=\"store.canConfigureWidget()(widget)\"\n [isLocked]=\"store.isWidgetLocked()(widget)\"\n (onDelete)=\"confirmWidgetDelete(store.currentDashboard()?.id!, widget.config.id!)\"\n (onConfiguration)=\"store.handlePopupConfiguration(widget.node!)\"\n (onValueChanged)=\"store.handleValueChanged(widget?.node!,$event)\"\n (onOptionsChanged)=\"store.handleOptionsChanged(widget?.node!,$event)\"\n >\n @if(widget.node) {\n <ng-container axp-widget-renderer [node]=\"widget.node\" [mode]=\"'view'\"></ng-container>\n }\n </axm-dashboard-widget-wrapper>\n </ax-grid-layout-widget>\n } }\n </ax-grid-layout-container>\n </axp-widgets-container>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-dashboard-home{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axm-dashboard-home .placeholder-content{border-radius:.5rem!important;border-width:1px!important;border-style:dashed!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))!important;background-color:rgba(var(--ax-sys-color-primary-lightest-surface),.5)!important}axm-dashboard-home ax-grid-layout-widget .grid-stack-item-content{border-radius:.375rem!important;border-width:1px!important;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important;--ax-comp-grid-layout-stack-item-content-bg-color: var(--ax-sys-color-lightest-surface) }\n"] }]
4990
+ ], template: "<axp-page-layout *translate=\"let t\">\n <!-- Content Section -->\n\n <axp-page-content class=\"ax-relative\">\n <!-- Loading State -->\n @if(store.isLoading()) {\n <div\n class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-w-full ax-absolute ax-z-10 ax-bg-white/80\"\n >\n <ax-loading></ax-loading>\n <p class=\"ax-mt-3 ax-text-gray-600\">{{ t('loading', { scope: 'dashboard' }) | async }}</p>\n </div>\n } @else {\n <axp-widgets-container [context]=\"context()\">\n <ax-grid-layout-container [options]=\"store.currentLayoutOptions()\" (onChange)=\"store.onGridChange($event)\">\n <!-- No Dashboards State -->\n @if(!store.dashboards() || store.dashboards().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-dashboards', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n }\n <!-- No Selected Dashboard State -->\n @else if (!store.selectedDashboard()) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">\n {{ t('no-current-dashboard', { scope: 'dashboard' }) | async }}\n </h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('select-dashboard', { scope: 'dashboard' }) | async }}</p>\n </div>\n }\n <!-- No Widgets State -->\n @else if (!store.selectedDashboard()?.widgets || store.selectedDashboard()?.widgets?.length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-h-full ax-p-4\">\n <ax-icon icon=\"fa-light fa-shapes\" class=\"ax-text-4xl ax-mb-4\"></ax-icon>\n <h2 class=\"ax-text-xl ax-font-semibold ax-mb-2\">{{ t('no-widgets', { scope: 'dashboard' }) | async }}</h2>\n <p class=\"ax-text-center ax-mb-6\">{{ t('add-first-widget', { scope: 'dashboard' }) | async }}</p>\n </div>\n }\n <!-- Widgets Grid -->\n @else { @for(widget of store.selectedDashboard()?.widgets; track widget.config.id) {\n <ax-grid-layout-widget [options]=\"widget.config\">\n <axm-dashboard-widget-wrapper\n [title]=\"widget.node?.options?.['title']\"\n [hasConfiguration]=\"store.canConfigureWidget()(widget)\"\n [isLocked]=\"store.isWidgetLocked()(widget)\"\n (onDelete)=\"confirmWidgetDelete(store.selectedDashboard()?.id!, widget.config.id!)\"\n (onConfiguration)=\"store.handlePopupConfiguration(widget.node!)\"\n (onValueChanged)=\"store.handleValueChanged(widget?.node!,$event)\"\n (onOptionsChanged)=\"store.handleOptionsChanged(widget?.node!,$event)\"\n >\n @if(widget.node) {\n <ng-container axp-widget-renderer [node]=\"widget.node\" [mode]=\"'view'\"></ng-container>\n }\n </axm-dashboard-widget-wrapper>\n </ax-grid-layout-widget>\n } }\n </ax-grid-layout-container>\n </axp-widgets-container>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-dashboard-home{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}axm-dashboard-home .placeholder-content{border-radius:.5rem!important;border-width:1px!important;border-style:dashed!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))!important;background-color:rgba(var(--ax-sys-color-primary-lightest-surface),.5)!important}axm-dashboard-home ax-grid-layout-widget .grid-stack-item-content{border-radius:.375rem!important;border-width:1px!important;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05) !important;--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important;--ax-comp-grid-layout-stack-item-content-bg-color: var(--ax-sys-color-lightest-surface) }\n"] }]
5086
4991
  }] });
5087
4992
 
5088
4993
  var homeDashboard = /*#__PURE__*/Object.freeze({