@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.
- package/auth/lib/pages/account/account.module.d.ts +1 -1
- package/common/lib/features/global-search/search.module.d.ts +1 -1
- package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.d.ts +38 -5
- package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.store.d.ts +40 -1
- package/dashboard-management/lib/features/home-dashboard/dashboard-popups/add-dashboard-popup.d.ts +7 -7
- package/dashboard-management/lib/features/shared/widgets/bar-chart/bar-chart-widget.component.d.ts +4 -3
- package/dashboard-management/lib/features/shared/widgets/donut-chart/donut-chart-widget.component.d.ts +4 -3
- package/dashboard-management/lib/features/shared/widgets/gauge-chart/gauge-chart-widget.component.d.ts +3 -2
- package/dashboard-management/lib/features/shared/widgets/line-chart/line-chart-widget.component.d.ts +1 -0
- package/document-management/lib/badge.provider.d.ts +1 -1
- package/document-management/lib/features/drive/drive.component.d.ts +2 -2
- package/document-management/lib/features/shared/document-manager.service.d.ts +2 -1
- package/document-management/lib/features/shared/document-manager.types.d.ts +3 -0
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +5 -4
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-bj5xztse.mjs → acorex-modules-auth-acorex-modules-auth-BhTLWa3y.mjs} +14 -13
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-BhTLWa3y.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BOL3VzC1.mjs → acorex-modules-auth-app-chooser.component-J5vGfv56.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BOL3VzC1.mjs.map → acorex-modules-auth-app-chooser.component-J5vGfv56.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-C1AoXhCI.mjs → acorex-modules-auth-login.module-DUlctvyx.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-C1AoXhCI.mjs.map → acorex-modules-auth-login.module-DUlctvyx.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-vuHfrDxu.mjs → acorex-modules-auth-master.layout-BFCxBj8H.mjs} +6 -5
- package/fesm2022/acorex-modules-auth-master.layout-BFCxBj8H.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-password.component-Dtcz95NV.mjs → acorex-modules-auth-password.component-CPpJug_X.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-Dtcz95NV.mjs.map → acorex-modules-auth-password.component-CPpJug_X.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-C71v2x71.mjs → acorex-modules-auth-password.component-CSE7_3Ey.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-C71v2x71.mjs.map → acorex-modules-auth-password.component-CSE7_3Ey.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-lJgHFaQR.mjs → acorex-modules-auth-routes-BSk5njsU.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-lJgHFaQR.mjs.map → acorex-modules-auth-routes-BSk5njsU.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-C9SfEHF7.mjs → acorex-modules-auth-two-factor.module-D3mhXLXx.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-C9SfEHF7.mjs.map → acorex-modules-auth-two-factor.module-D3mhXLXx.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-CCsoLecU.mjs → acorex-modules-auth-user-sessions.component-COeH4jjg.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-user-sessions.component-CCsoLecU.mjs.map → acorex-modules-auth-user-sessions.component-COeH4jjg.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/{acorex-modules-common-search-popup.component-D1Ddwc_U.mjs → acorex-modules-common-search-popup.component-tUvSQpDP.mjs} +5 -5
- package/fesm2022/acorex-modules-common-search-popup.component-tUvSQpDP.mjs.map +1 -0
- package/fesm2022/acorex-modules-common.mjs +5 -4
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +1136 -1231
- package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-k2QMxYk9.mjs → acorex-modules-document-management-acorex-modules-document-management-BcgxVPuR.mjs} +120 -61
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-BcgxVPuR.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-BHCuKbmu.mjs → acorex-modules-document-management-attachment-widget.component-Cwa7HuUo.mjs} +4 -4
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-BHCuKbmu.mjs.map → acorex-modules-document-management-attachment-widget.component-Cwa7HuUo.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-CNvlm2Va.mjs → acorex-modules-document-management-create-folder-dialog.component-BN0pWX7a.mjs} +2 -2
- 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
- package/fesm2022/{acorex-modules-document-management-details-view.component-DE84Itc_.mjs → acorex-modules-document-management-details-view.component-DXn54h2g.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-details-view.component-DE84Itc_.mjs.map → acorex-modules-document-management-details-view.component-DXn54h2g.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-CKMI_oKM.mjs → acorex-modules-document-management-drive-choose.component-CTrPj9t3.mjs} +2 -2
- 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
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BPY3z02r.mjs → acorex-modules-document-management-large-icons-view.component-DwAyEZUU.mjs} +2 -2
- 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
- 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
- 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
- package/fesm2022/{acorex-modules-document-management-list-view.component-CGSls2hG.mjs → acorex-modules-document-management-list-view.component-CIAQBAcy.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-list-view.component-CGSls2hG.mjs.map → acorex-modules-document-management-list-view.component-CIAQBAcy.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-DROTONyx.mjs → acorex-modules-document-management-permission-definition.provider-BBXmMuIh.mjs} +3 -3
- package/fesm2022/acorex-modules-document-management-permission-definition.provider-BBXmMuIh.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-BPU5NKy8.mjs → acorex-modules-document-management-rename-node-dialog.component-D28zKZqZ.mjs} +2 -2
- 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
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-CYjLGCUJ.mjs → acorex-modules-document-management-small-icons-view.component-Dg5nb2yW.mjs} +2 -2
- 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
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BnXo0uWh.mjs → acorex-modules-document-management-small-tiles-view.component-BCaQYHQF.mjs} +2 -2
- 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
- package/fesm2022/acorex-modules-document-management.mjs +1 -1
- 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
- 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
- package/fesm2022/{acorex-modules-form-template-management-category.entity-CMez7XCT.mjs → acorex-modules-form-template-management-category.entity-DxgqHkjI.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-category.entity-CMez7XCT.mjs.map → acorex-modules-form-template-management-category.entity-DxgqHkjI.mjs.map} +1 -1
- 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
- package/fesm2022/acorex-modules-form-template-management-permission-definition.provider-6czJEo8f.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-settings.provider-CzvnYncE.mjs → acorex-modules-form-template-management-settings.provider-D3nbUDMw.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-settings.provider-CzvnYncE.mjs.map → acorex-modules-form-template-management-settings.provider-D3nbUDMw.mjs.map} +1 -1
- 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
- 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
- package/fesm2022/{acorex-modules-form-template-management-template.entity-CSUgPKlG.mjs → acorex-modules-form-template-management-template.entity-Ci6QzE16.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template.entity-CSUgPKlG.mjs.map → acorex-modules-form-template-management-template.entity-Ci6QzE16.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-DDFNie66.mjs → acorex-modules-form-template-management-viewer-popup.component-DIzlC6tX.mjs} +2 -2
- 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
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +3 -3
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-CaNP3qwK.mjs → acorex-modules-organization-management-org-chart-configuration.page-DNzhGz5G.mjs} +7 -7
- package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DNzhGz5G.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-1UgQCqvl.mjs → acorex-modules-organization-management-org-chart.page-CP8zz-Bc.mjs} +22 -10
- package/fesm2022/acorex-modules-organization-management-org-chart.page-CP8zz-Bc.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +117 -5
- package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-Bh6NW7UJ.mjs → acorex-modules-platform-management-acorex-modules-platform-management-CO8rzxOh.mjs} +16 -15
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-CO8rzxOh.mjs.map +1 -0
- package/fesm2022/{acorex-modules-platform-management-list-version.component-Ctqr4YiY.mjs → acorex-modules-platform-management-list-version.component-gWnz7cp6.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-list-version.component-Ctqr4YiY.mjs.map → acorex-modules-platform-management-list-version.component-gWnz7cp6.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-platform-management-settings.provider-Bz3Npk_t.mjs → acorex-modules-platform-management-settings.provider-JEwENvqy.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-settings.provider-Bz3Npk_t.mjs.map → acorex-modules-platform-management-settings.provider-JEwENvqy.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +1 -1
- package/fesm2022/acorex-modules-security-management-permissions-editor.component-Ccx0_9L_.mjs +218 -0
- package/fesm2022/acorex-modules-security-management-permissions-editor.component-Ccx0_9L_.mjs.map +1 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-column.component-P2buwWAw.mjs +41 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-column.component-P2buwWAw.mjs.map +1 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-designer.component-CoqOAn_m.mjs +21 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-designer.component-CoqOAn_m.mjs.map +1 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-edit.component-P3adQ1xt.mjs +51 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-edit.component-P3adQ1xt.mjs.map +1 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-print.component-D4lk67fE.mjs +22 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-print.component-D4lk67fE.mjs.map +1 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-view.component-Cz32ewum.mjs +21 -0
- package/fesm2022/acorex-modules-security-management-permissions-widget-view.component-Cz32ewum.mjs.map +1 -0
- package/fesm2022/acorex-modules-security-management.mjs +185 -18
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-X33xeQrg.mjs → acorex-modules-settings-management-setting-page.component-BgQoPRy_.mjs} +7 -7
- package/fesm2022/acorex-modules-settings-management-setting-page.component-BgQoPRy_.mjs.map +1 -0
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-DryghOjs.mjs → acorex-modules-settings-management-setting-view.component-CX_FKIxI.mjs} +4 -3
- package/fesm2022/acorex-modules-settings-management-setting-view.component-CX_FKIxI.mjs.map +1 -0
- package/fesm2022/acorex-modules-settings-management.mjs +3 -3
- package/fesm2022/acorex-modules-settings-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-training-management.mjs +2 -2
- package/fesm2022/acorex-modules-training-management.mjs.map +1 -1
- package/form-template-management/index.d.ts +1 -0
- package/notification-management/lib/notification-management.module.d.ts +1 -1
- package/organization-management/lib/features/employee/employee-feature.module.d.ts +9 -0
- package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +2 -2
- package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +3 -2
- package/organization-management/lib/organization-management.module.d.ts +2 -1
- package/package.json +9 -9
- package/platform-management/lib/entities/data-source/data-source.service.d.ts +1 -1
- package/platform-management/lib/entities/data-source/data-source.types.d.ts +2 -2
- package/platform-management/lib/entities/data-source/datasource-provider.dynamic.d.ts +1 -1
- package/platform-management/lib/entities/meta-data-definition/meta-data-definition.service.d.ts +2 -2
- package/platform-management/lib/entities/meta-data-definition/meta-data-definition.types.d.ts +2 -2
- package/platform-management/lib/entities/meta-data-definition-category/category.service.d.ts +1 -1
- package/platform-management/lib/entities/meta-data-definition-category/category.types.d.ts +2 -2
- package/platform-management/lib/features/app-terms/pages/list/list-terms.component.d.ts +2 -2
- package/platform-management/lib/features/common/common.module.d.ts +1 -1
- package/platform-management/lib/platform-management.module.d.ts +1 -1
- package/security-management/lib/features/permissions/permissions-editor/permissions-editor.component.d.ts +70 -0
- package/security-management/lib/features/permissions/permissions-widget/permissions-widget-column.component.d.ts +10 -0
- package/security-management/lib/features/permissions/permissions-widget/permissions-widget-designer.component.d.ts +6 -0
- package/security-management/lib/features/permissions/permissions-widget/permissions-widget-edit.component.d.ts +8 -0
- package/security-management/lib/features/permissions/permissions-widget/permissions-widget-print.component.d.ts +6 -0
- package/security-management/lib/features/permissions/permissions-widget/permissions-widget-view.component.d.ts +6 -0
- package/security-management/lib/features/permissions/permissions-widget/permissions-widget.config.d.ts +2 -0
- package/security-management/lib/features/permissions/permissions.module.d.ts +8 -0
- package/security-management/lib/features/permissions/workflows/assign-permissions.workflow.d.ts +10 -0
- package/security-management/lib/security-management.module.d.ts +3 -2
- package/settings-management/lib/features/settings/setting-page/setting-page.component.d.ts +2 -2
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-bj5xztse.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-master.layout-vuHfrDxu.mjs.map +0 -1
- package/fesm2022/acorex-modules-common-search-popup.component-D1Ddwc_U.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-k2QMxYk9.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-permission-definition.provider-DROTONyx.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-permission-definition.provider-D_VOBOyf.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-CaNP3qwK.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart.page-1UgQCqvl.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-Bh6NW7UJ.mjs.map +0 -1
- package/fesm2022/acorex-modules-settings-management-setting-page.component-X33xeQrg.mjs.map +0 -1
- 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,
|
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 {
|
57
|
-
import { AXPLayoutThemeService
|
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(
|
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:
|
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
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
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
|
-
|
652
|
+
},
|
653
|
+
visible: true,
|
638
654
|
},
|
639
655
|
{
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
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
|
-
|
672
|
+
},
|
673
|
+
visible: true,
|
658
674
|
},
|
659
675
|
// ====== Grid Settings ======
|
660
676
|
{
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
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
|
-
|
688
|
+
},
|
689
|
+
visible: true,
|
674
690
|
},
|
675
691
|
{
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
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
|
-
|
703
|
+
},
|
704
|
+
visible: true,
|
689
705
|
},
|
690
706
|
// ====== Tooltip Settings ======
|
691
707
|
{
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
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
|
-
|
719
|
+
},
|
720
|
+
visible: true,
|
705
721
|
},
|
706
722
|
// ====== Animation Settings ======
|
707
723
|
{
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
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
|
-
|
750
|
+
},
|
751
|
+
visible: true,
|
736
752
|
},
|
737
753
|
{
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
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
|
-
|
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(
|
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:
|
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
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
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
|
-
|
1224
|
+
},
|
1225
|
+
visible: true,
|
1197
1226
|
},
|
1198
1227
|
{
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
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
|
-
|
1243
|
+
},
|
1244
|
+
visible: true,
|
1216
1245
|
},
|
1217
1246
|
// ====== Donut Appearance ======
|
1218
1247
|
{
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
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
|
-
|
1259
|
+
},
|
1260
|
+
visible: true,
|
1232
1261
|
},
|
1233
1262
|
{
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
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
|
-
|
1279
|
+
},
|
1280
|
+
visible: true,
|
1252
1281
|
},
|
1253
1282
|
{
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
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
|
-
|
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
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
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
|
-
|
1349
|
+
},
|
1350
|
+
visible: true,
|
1322
1351
|
},
|
1323
1352
|
// ====== Animation Settings ======
|
1324
1353
|
{
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
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
|
-
|
1380
|
+
},
|
1381
|
+
visible: true,
|
1353
1382
|
},
|
1354
1383
|
{
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
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
|
-
|
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(
|
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:
|
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
|
-
// ======
|
1485
|
+
// ====== Label Display ======
|
1444
1486
|
{
|
1445
|
-
name: '
|
1446
|
-
title: '@dashboard:widgets.gauge-chart.
|
1447
|
-
group:
|
1487
|
+
name: 'label',
|
1488
|
+
title: '@dashboard:widgets.gauge-chart.label',
|
1489
|
+
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1448
1490
|
schema: {
|
1449
|
-
defaultValue:
|
1450
|
-
dataType: '
|
1491
|
+
defaultValue: '',
|
1492
|
+
dataType: 'string',
|
1451
1493
|
interface: {
|
1452
|
-
name: '
|
1453
|
-
path: 'options.
|
1454
|
-
type: AXPWidgetsCatalog.
|
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
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
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
|
-
|
1520
|
+
},
|
1521
|
+
visible: true,
|
1483
1522
|
},
|
1484
|
-
// ====== Gauge Configuration ======
|
1485
1523
|
{
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
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
|
-
|
1540
|
+
},
|
1541
|
+
visible: true,
|
1499
1542
|
},
|
1543
|
+
// ====== Gauge Configuration ======
|
1500
1544
|
{
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
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
|
-
|
1556
|
+
},
|
1557
|
+
visible: true,
|
1514
1558
|
},
|
1515
|
-
// ====== Gauge Appearance ======
|
1516
1559
|
{
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
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
|
-
|
1571
|
+
},
|
1572
|
+
visible: true,
|
1530
1573
|
},
|
1574
|
+
// ====== Gauge Appearance ======
|
1531
1575
|
{
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
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
|
-
|
1587
|
+
},
|
1588
|
+
visible: true,
|
1550
1589
|
},
|
1551
1590
|
{
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
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
|
-
|
1607
|
+
},
|
1608
|
+
visible: true,
|
1570
1609
|
},
|
1571
|
-
// ====== Label Display ======
|
1572
1610
|
{
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
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
|
-
|
1627
|
+
},
|
1628
|
+
visible: true,
|
1586
1629
|
},
|
1587
1630
|
// ====== Animation Settings ======
|
1588
1631
|
{
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
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
|
-
|
1658
|
+
},
|
1659
|
+
visible: true,
|
1617
1660
|
},
|
1618
1661
|
{
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
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
|
-
|
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(
|
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:
|
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: '
|
1901
|
-
path: 'options.
|
1902
|
-
type: AXPWidgetsCatalog.
|
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: '
|
1909
|
-
title: '@dashboard:widgets.line-chart.
|
1789
|
+
name: 'yAxisLabel',
|
1790
|
+
title: '@dashboard:widgets.line-chart.y-axis-label',
|
1910
1791
|
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1911
1792
|
schema: {
|
1912
|
-
defaultValue:
|
1913
|
-
dataType: '
|
1793
|
+
defaultValue: '',
|
1794
|
+
dataType: 'string',
|
1914
1795
|
interface: {
|
1915
|
-
name: '
|
1916
|
-
path: 'options.
|
1917
|
-
type: AXPWidgetsCatalog.
|
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
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
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
|
-
|
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
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
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
|
-
|
2042
|
+
},
|
2043
|
+
visible: true,
|
1978
2044
|
},
|
1979
2045
|
{
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
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
|
-
|
2057
|
+
},
|
2058
|
+
visible: true,
|
1993
2059
|
},
|
2060
|
+
|
1994
2061
|
// ====== Animation Settings ======
|
1995
2062
|
{
|
1996
|
-
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
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
|
-
|
2089
|
+
},
|
2090
|
+
visible: true,
|
2024
2091
|
},
|
2025
2092
|
{
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
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
|
-
|
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:
|
2058
|
-
maxHeight:
|
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
|
-
|
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: '
|
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
|
-
|
4273
|
-
|
4274
|
-
|
4275
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
4331
|
-
|
4332
|
-
|
4333
|
-
|
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
|
-
|
4356
|
-
|
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
|
-
|
4403
|
-
|
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,
|
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.
|
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
|
-
|
4482
|
-
|
4483
|
-
|
4484
|
-
|
4485
|
-
|
4486
|
-
|
4487
|
-
|
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
|
-
|
4490
|
-
|
4491
|
-
|
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:
|
4496
|
+
currentDashboardId: dashboardWithMetadata.id,
|
4498
4497
|
});
|
4499
|
-
|
4500
|
-
|
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
|
-
|
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.
|
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
|
-
|
4517
|
-
|
4518
|
-
|
4519
|
-
|
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
|
4527
|
-
widget.path = widget
|
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
|
-
|
4556
|
-
|
4557
|
-
|
4558
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
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
|
-
|
4681
|
-
|
4682
|
-
|
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.
|
4710
|
-
console.warn('No current dashboard selected');
|
4689
|
+
if (!store.selectedDashboard())
|
4711
4690
|
return;
|
4712
|
-
}
|
4713
4691
|
try {
|
4714
|
-
|
4715
|
-
const
|
4716
|
-
|
4717
|
-
|
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
|
-
|
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.
|
4747
|
-
console.warn('No current dashboard selected');
|
4711
|
+
if (!store.selectedDashboard())
|
4748
4712
|
return;
|
4749
|
-
}
|
4750
4713
|
try {
|
4751
|
-
|
4752
|
-
const
|
4753
|
-
|
4754
|
-
|
4755
|
-
|
4756
|
-
...widget,
|
4757
|
-
|
4758
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
4801
|
-
|
4802
|
-
|
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;
|
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.
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
4802
|
+
const currentDashboard = store.selectedDashboard();
|
4888
4803
|
return currentDashboard?.locked === true;
|
4889
4804
|
},
|
4890
4805
|
};
|
4891
4806
|
}));
|
4892
4807
|
|
4893
|
-
class AXMDashboardHomeComponent extends
|
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
|
-
|
4819
|
+
// Component State
|
4904
4820
|
this.context = signal({});
|
4905
4821
|
this.dashboardsLoaded = signal(false);
|
4906
|
-
|
4907
|
-
|
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.
|
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.
|
4859
|
+
return this.store.selectedDashboard()?.title || 'Dashboard';
|
4950
4860
|
}
|
4951
4861
|
async getPageDescription() {
|
4952
|
-
return this.store.
|
4862
|
+
return this.store.selectedDashboard()?.description || '';
|
4953
4863
|
}
|
4954
4864
|
getTitleActions() {
|
4955
|
-
return
|
4956
|
-
|
4957
|
-
|
4958
|
-
|
4959
|
-
|
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('
|
4996
|
-
icon: 'fa-light fa-
|
4997
|
-
color: '
|
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.
|
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
|
-
|
5025
|
-
|
5026
|
-
|
5027
|
-
|
5028
|
-
|
5029
|
-
|
5030
|
-
|
5031
|
-
|
5032
|
-
|
5033
|
-
|
5034
|
-
|
5035
|
-
|
5036
|
-
|
5037
|
-
|
5038
|
-
|
5039
|
-
|
5040
|
-
|
5041
|
-
|
5042
|
-
|
5043
|
-
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
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:
|
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.
|
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:
|
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.
|
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({
|