@acorex/modules 19.3.3-next.1 → 19.3.4
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/conversation/lib/entities/comments/pages/comment-list-view.component.d.ts +3 -2
- package/dashboard-management/index.d.ts +3 -1
- package/dashboard-management/lib/entities/dashboard/dashboard.types.d.ts +4 -0
- package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.d.ts +6 -25
- package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.store.d.ts +1 -26
- package/dashboard-management/lib/features/home-dashboard/dashboard-home/home-dashboard.type.d.ts +8 -0
- package/dashboard-management/lib/features/home-dashboard/dashboard-popups/add-dashboard-popup.d.ts +10 -2
- package/dashboard-management/lib/features/home-dashboard/dashboard-popups/dashboard-popup.service.d.ts +1 -1
- package/dashboard-management/lib/features/home-dashboard/index.d.ts +1 -0
- package/document-management/lib/features/document-explorer/views/attachement-widget/attachment-widget.component.d.ts +126 -0
- package/document-management/lib/features/shared/document-manager.types.d.ts +1 -3
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +1 -0
- package/fesm2022/{acorex-modules-application-management-module-designer.component-ClxaJcjD.mjs → acorex-modules-application-management-module-designer.component-cD24pUfN.mjs} +7 -7
- package/fesm2022/{acorex-modules-application-management-module-designer.component-ClxaJcjD.mjs.map → acorex-modules-application-management-module-designer.component-cD24pUfN.mjs.map} +1 -1
- package/fesm2022/acorex-modules-application-management.mjs +41 -41
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-DJZcD1j3.mjs → acorex-modules-auth-acorex-modules-auth-DCWtLiHM.mjs} +43 -43
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-DJZcD1j3.mjs.map → acorex-modules-auth-acorex-modules-auth-DCWtLiHM.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-app-chooser.component-DlYxDGQr.mjs → acorex-modules-auth-app-chooser.component-VMhnsjYn.mjs} +5 -5
- package/fesm2022/{acorex-modules-auth-app-chooser.component-DlYxDGQr.mjs.map → acorex-modules-auth-app-chooser.component-VMhnsjYn.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-blank.layout-DIttom0K.mjs +18 -0
- package/fesm2022/{acorex-modules-auth-blank.layout-B1a0710P.mjs.map → acorex-modules-auth-blank.layout-DIttom0K.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-D-XgzifC.mjs → acorex-modules-auth-login.module-DxLjSR75.mjs} +8 -8
- package/fesm2022/{acorex-modules-auth-login.module-D-XgzifC.mjs.map → acorex-modules-auth-login.module-DxLjSR75.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-ZaCb3CED.mjs → acorex-modules-auth-master.layout-Dpb-D34R.mjs} +5 -5
- package/fesm2022/{acorex-modules-auth-master.layout-ZaCb3CED.mjs.map → acorex-modules-auth-master.layout-Dpb-D34R.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-password.component-Bcwod5kV.mjs +59 -0
- package/fesm2022/{acorex-modules-auth-password.component-CLTZoufP.mjs.map → acorex-modules-auth-password.component-Bcwod5kV.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-C-xRIhrM.mjs → acorex-modules-auth-password.component-CEAzmwdd.mjs} +5 -5
- package/fesm2022/{acorex-modules-auth-password.component-C-xRIhrM.mjs.map → acorex-modules-auth-password.component-CEAzmwdd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-4T5jq7su.mjs → acorex-modules-auth-routes-DHX4wD9P.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-4T5jq7su.mjs.map → acorex-modules-auth-routes-DHX4wD9P.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-Ow7QtAWc.mjs → acorex-modules-auth-tenant-chooser.component-S07bx8PP.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-Ow7QtAWc.mjs.map → acorex-modules-auth-tenant-chooser.component-S07bx8PP.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-two-factor-code.component-CK9J4jMb.mjs +40 -0
- package/fesm2022/{acorex-modules-auth-two-factor-code.component-PqOn37Gg.mjs.map → acorex-modules-auth-two-factor-code.component-CK9J4jMb.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-D72KIpvA.mjs → acorex-modules-auth-two-factor.module-CZyzLTm3.mjs} +7 -7
- package/fesm2022/{acorex-modules-auth-two-factor.module-D72KIpvA.mjs.map → acorex-modules-auth-two-factor.module-CZyzLTm3.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-Btnu_Oeq.mjs → acorex-modules-auth-user-sessions.component-SuhoNCuQ.mjs} +5 -5
- package/fesm2022/{acorex-modules-auth-user-sessions.component-Btnu_Oeq.mjs.map → acorex-modules-auth-user-sessions.component-SuhoNCuQ.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/{acorex-modules-common-search-popup.component-C3XUb6pF.mjs → acorex-modules-common-search-popup.component-DQYBNkIc.mjs} +4 -4
- package/fesm2022/{acorex-modules-common-search-popup.component-C3XUb6pF.mjs.map → acorex-modules-common-search-popup.component-DQYBNkIc.mjs.map} +1 -1
- package/fesm2022/acorex-modules-common.mjs +19 -19
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +45 -45
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +4994 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-hMEt0yZI.mjs → acorex-modules-document-management-acorex-modules-document-management-kZDDtr98.mjs} +151 -141
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-kZDDtr98.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management-attachment-widget.component-DlwLjrkw.mjs +32 -0
- package/fesm2022/acorex-modules-document-management-attachment-widget.component-DlwLjrkw.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-D_FfCqY8.mjs → acorex-modules-document-management-create-folder-dialog.component-CPXnUlUx.mjs} +6 -6
- package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-D_FfCqY8.mjs.map → acorex-modules-document-management-create-folder-dialog.component-CPXnUlUx.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-details-view.component-Oxtnvogq.mjs → acorex-modules-document-management-details-view.component-9LB0w9DQ.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-details-view.component-Oxtnvogq.mjs.map → acorex-modules-document-management-details-view.component-9LB0w9DQ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-BqZyAAAw.mjs → acorex-modules-document-management-drive-choose.component-CPIB0bcn.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-BqZyAAAw.mjs.map → acorex-modules-document-management-drive-choose.component-CPIB0bcn.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-9APgNKIu.mjs → acorex-modules-document-management-large-icons-view.component-D--yZaJt.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-9APgNKIu.mjs.map → acorex-modules-document-management-large-icons-view.component-D--yZaJt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-Byt-Hl3M.mjs → acorex-modules-document-management-large-tiles-view.component-CNeKXArZ.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-Byt-Hl3M.mjs.map → acorex-modules-document-management-large-tiles-view.component-CNeKXArZ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-link-dialog.component-1iPUnhr1.mjs → acorex-modules-document-management-link-dialog.component-DKbO2nX8.mjs} +4 -4
- package/fesm2022/{acorex-modules-document-management-link-dialog.component-1iPUnhr1.mjs.map → acorex-modules-document-management-link-dialog.component-DKbO2nX8.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-list-view.component-BeuXrgYL.mjs → acorex-modules-document-management-list-view.component-q2bCwMab.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-list-view.component-BeuXrgYL.mjs.map → acorex-modules-document-management-list-view.component-q2bCwMab.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-lock-dialog.component-By36woOc.mjs +52 -0
- package/fesm2022/{acorex-modules-document-management-lock-dialog.component-BwKdUUcf.mjs.map → acorex-modules-document-management-lock-dialog.component-By36woOc.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-9KjrOZc6.mjs → acorex-modules-document-management-permission-definition.provider-Cqkd87Cb.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-9KjrOZc6.mjs.map → acorex-modules-document-management-permission-definition.provider-Cqkd87Cb.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-BHayM-mO.mjs → acorex-modules-document-management-rename-node-dialog.component-WZYHoTrK.mjs} +6 -6
- package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-BHayM-mO.mjs.map → acorex-modules-document-management-rename-node-dialog.component-WZYHoTrK.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-share-dialog.component-BiNdRpqs.mjs → acorex-modules-document-management-share-dialog.component-Diof2rpe.mjs} +4 -4
- package/fesm2022/{acorex-modules-document-management-share-dialog.component-BiNdRpqs.mjs.map → acorex-modules-document-management-share-dialog.component-Diof2rpe.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-share-email-dialog.component-Bj6G6aqt.mjs +55 -0
- package/fesm2022/{acorex-modules-document-management-share-email-dialog.component-BvR5OuCV.mjs.map → acorex-modules-document-management-share-email-dialog.component-Bj6G6aqt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-CNVZaLv2.mjs → acorex-modules-document-management-small-icons-view.component-iCcvLfHC.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-CNVZaLv2.mjs.map → acorex-modules-document-management-small-icons-view.component-iCcvLfHC.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BDv_sH9f.mjs → acorex-modules-document-management-small-tiles-view.component-BlxmyYrn.mjs} +5 -5
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BDv_sH9f.mjs.map → acorex-modules-document-management-small-tiles-view.component-BlxmyYrn.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-unlock-dialog.component-CNjFnm2w.mjs +37 -0
- package/fesm2022/{acorex-modules-document-management-unlock-dialog.component-DkZQ84kg.mjs.map → acorex-modules-document-management-unlock-dialog.component-CNjFnm2w.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-CJ2Qoott.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-BL9GxOV_.mjs} +56 -56
- package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-CJ2Qoott.mjs.map → acorex-modules-form-template-management-acorex-modules-form-template-management-BL9GxOV_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-category.entity-BjNsUAZq.mjs → acorex-modules-form-template-management-category.entity-DgpkNWIh.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-category.entity-BjNsUAZq.mjs.map → acorex-modules-form-template-management-category.entity-DgpkNWIh.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-designer.page-Bd_bZ_7p.mjs → acorex-modules-form-template-management-designer.page-BmSMzkbb.mjs} +4 -4
- package/fesm2022/{acorex-modules-form-template-management-designer.page-Bd_bZ_7p.mjs.map → acorex-modules-form-template-management-designer.page-BmSMzkbb.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-permission-definition.provider-CqZ8ytjA.mjs → acorex-modules-form-template-management-permission-definition.provider-DwpvJvia.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-permission-definition.provider-CqZ8ytjA.mjs.map → acorex-modules-form-template-management-permission-definition.provider-DwpvJvia.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-settings.provider-LrzsYkiL.mjs → acorex-modules-form-template-management-settings.provider-BDlPJPWl.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-settings.provider-LrzsYkiL.mjs.map → acorex-modules-form-template-management-settings.provider-BDlPJPWl.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-M-R2U9CH.mjs → acorex-modules-form-template-management-template-picker.component-DWZby-TS.mjs} +4 -4
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-M-R2U9CH.mjs.map → acorex-modules-form-template-management-template-picker.component-DWZby-TS.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-BP75i9zU.mjs → acorex-modules-form-template-management-template-widget-edit.component-CZ7DLKVC.mjs} +5 -5
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-BP75i9zU.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-CZ7DLKVC.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template.entity-CCaHPkWq.mjs → acorex-modules-form-template-management-template.entity-DbDR1qAp.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template.entity-CCaHPkWq.mjs.map → acorex-modules-form-template-management-template.entity-DbDR1qAp.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-CUOsh6e5.mjs → acorex-modules-form-template-management-viewer-popup.component-B4EoS2iO.mjs} +5 -5
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-CUOsh6e5.mjs.map → acorex-modules-form-template-management-viewer-popup.component-B4EoS2iO.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/{acorex-modules-issue-management-acorex-modules-issue-management-DcmAnBue.mjs → acorex-modules-issue-management-acorex-modules-issue-management-7RWgBq87.mjs} +62 -65
- package/fesm2022/{acorex-modules-issue-management-acorex-modules-issue-management-DcmAnBue.mjs.map → acorex-modules-issue-management-acorex-modules-issue-management-7RWgBq87.mjs.map} +1 -1
- package/fesm2022/acorex-modules-issue-management-capture-screen.component-BzvY3UMh.mjs +28 -0
- package/fesm2022/{acorex-modules-issue-management-capture-screen.component-BMpafdHr.mjs.map → acorex-modules-issue-management-capture-screen.component-BzvY3UMh.mjs.map} +1 -1
- package/fesm2022/acorex-modules-issue-management.mjs +1 -1
- package/fesm2022/acorex-modules-log-management.mjs +10 -10
- package/fesm2022/acorex-modules-log-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +35 -35
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-organization-management-add-item.component-DE0Ek0dk.mjs → acorex-modules-organization-management-add-item.component-sP_aikRE.mjs} +5 -5
- package/fesm2022/{acorex-modules-organization-management-add-item.component-DE0Ek0dk.mjs.map → acorex-modules-organization-management-add-item.component-sP_aikRE.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-RuvkSheN.mjs → acorex-modules-organization-management-org-chart-configuration.page-CaNP3qwK.mjs} +5 -5
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-RuvkSheN.mjs.map → acorex-modules-organization-management-org-chart-configuration.page-CaNP3qwK.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.service-2EZNvjAH.mjs → acorex-modules-organization-management-org-chart-configuration.service-CtA19B8x.mjs} +4 -4
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.service-2EZNvjAH.mjs.map → acorex-modules-organization-management-org-chart-configuration.service-CtA19B8x.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-C2qYJxpY.mjs → acorex-modules-organization-management-org-chart.page-B-TZkfTX.mjs} +12 -12
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-C2qYJxpY.mjs.map → acorex-modules-organization-management-org-chart.page-B-TZkfTX.mjs.map} +1 -1
- package/fesm2022/acorex-modules-organization-management-position-category.entity-DrZ9Ott4.mjs +320 -0
- package/fesm2022/acorex-modules-organization-management-position-category.entity-DrZ9Ott4.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management-position.entity-CY4TugWR.mjs +412 -0
- package/fesm2022/acorex-modules-organization-management-position.entity-CY4TugWR.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management-responsibility-category.entity-CmafbyCZ.mjs +332 -0
- package/fesm2022/acorex-modules-organization-management-responsibility-category.entity-CmafbyCZ.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-position.entity-DhPT9kzv.mjs → acorex-modules-organization-management-responsibility.entity-DmLeFogS.mjs} +63 -27
- package/fesm2022/acorex-modules-organization-management-responsibility.entity-DmLeFogS.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-role.entity-C-AIIaDo.mjs → acorex-modules-organization-management-role-category.entity-Cyt1dAKR.mjs} +58 -8
- package/fesm2022/acorex-modules-organization-management-role-category.entity-Cyt1dAKR.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management-role.entity-BDErzNv-.mjs +324 -0
- package/fesm2022/acorex-modules-organization-management-role.entity-BDErzNv-.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management-skill-category.entity-BPgGGVT3.mjs +320 -0
- package/fesm2022/acorex-modules-organization-management-skill-category.entity-BPgGGVT3.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management-skill.entity-D9XojzUV.mjs +287 -0
- package/fesm2022/acorex-modules-organization-management-skill.entity-D9XojzUV.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +451 -106
- package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-CJZ86Oon.mjs → acorex-modules-platform-management-acorex-modules-platform-management-D8qCuwrP.mjs} +247 -269
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-D8qCuwrP.mjs.map +1 -0
- package/fesm2022/{acorex-modules-platform-management-list-version.component-a_szjudb.mjs → acorex-modules-platform-management-list-version.component-C4efcHZE.mjs} +8 -8
- package/fesm2022/acorex-modules-platform-management-list-version.component-C4efcHZE.mjs.map +1 -0
- package/fesm2022/{acorex-modules-platform-management-settings.provider-D_lPw5D4.mjs → acorex-modules-platform-management-settings.provider-DOR4HWty.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-settings.provider-D_lPw5D4.mjs.map → acorex-modules-platform-management-settings.provider-DOR4HWty.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +1 -1
- package/fesm2022/acorex-modules-project-management.mjs +43 -43
- package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-scheduler-job-management.mjs +14 -14
- package/fesm2022/acorex-modules-scheduler-job-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +35 -35
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-XDFtTqft.mjs → acorex-modules-settings-management-setting-page.component-X33xeQrg.mjs} +4 -4
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-XDFtTqft.mjs.map → acorex-modules-settings-management-setting-page.component-X33xeQrg.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-B_6RIU9e.mjs → acorex-modules-settings-management-setting-view.component-DryghOjs.mjs} +4 -4
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-B_6RIU9e.mjs.map → acorex-modules-settings-management-setting-view.component-DryghOjs.mjs.map} +1 -1
- package/fesm2022/acorex-modules-settings-management.mjs +6 -6
- package/fesm2022/acorex-modules-settings-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-text-template-management.mjs +24 -24
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-training-management.mjs +43 -43
- package/fesm2022/acorex-modules-training-management.mjs.map +1 -1
- package/organization-management/lib/const.d.ts +38 -2
- package/organization-management/lib/entities/index.d.ts +6 -0
- package/organization-management/lib/entities/position/position.types.d.ts +5 -0
- package/organization-management/lib/entities/position-category/index.d.ts +3 -0
- package/organization-management/lib/entities/position-category/position-category.entity.d.ts +3 -0
- package/organization-management/lib/entities/position-category/position-category.module.d.ts +6 -0
- package/organization-management/lib/entities/position-category/position-category.service.d.ts +10 -0
- package/organization-management/lib/entities/position-category/position-category.types.d.ts +7 -0
- package/organization-management/lib/entities/responsibility/index.d.ts +3 -0
- package/organization-management/lib/entities/responsibility/responsibility.entity.d.ts +3 -0
- package/organization-management/lib/entities/responsibility/responsibility.module.d.ts +7 -0
- package/organization-management/lib/entities/responsibility/responsibility.service.d.ts +10 -0
- package/organization-management/lib/entities/responsibility/responsibility.types.d.ts +6 -0
- package/organization-management/lib/entities/responsibility-category/index.d.ts +3 -0
- package/organization-management/lib/entities/responsibility-category/responsibility-category.entity.d.ts +3 -0
- package/organization-management/lib/entities/responsibility-category/responsibility-category.module.d.ts +7 -0
- package/organization-management/lib/entities/responsibility-category/responsibility-category.service.d.ts +10 -0
- package/organization-management/lib/entities/responsibility-category/responsibility-category.types.d.ts +7 -0
- package/organization-management/lib/entities/role/role.types.d.ts +3 -0
- package/organization-management/lib/entities/role-category/index.d.ts +3 -0
- package/organization-management/lib/entities/role-category/role-category.entity.d.ts +3 -0
- package/organization-management/lib/entities/role-category/role-category.module.d.ts +6 -0
- package/organization-management/lib/entities/role-category/role-category.service.d.ts +10 -0
- package/organization-management/lib/entities/role-category/role-category.types.d.ts +7 -0
- package/organization-management/lib/entities/skill/index.d.ts +3 -0
- package/organization-management/lib/entities/skill/skill.entity.d.ts +3 -0
- package/organization-management/lib/entities/skill/skill.module.d.ts +6 -0
- package/organization-management/lib/entities/skill/skill.service.d.ts +10 -0
- package/organization-management/lib/entities/skill/skill.types.d.ts +6 -0
- package/organization-management/lib/entities/skill-category/index.d.ts +3 -0
- package/organization-management/lib/entities/skill-category/skill-category.entity.d.ts +3 -0
- package/organization-management/lib/entities/skill-category/skill-category.module.d.ts +6 -0
- package/organization-management/lib/entities/skill-category/skill-category.service.d.ts +10 -0
- package/organization-management/lib/entities/skill-category/skill-category.types.d.ts +7 -0
- package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +38 -2
- package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +38 -2
- package/organization-management/lib/organization-management.module.d.ts +17 -11
- package/package.json +1 -1
- package/platform-management/lib/entities/data-source/coulmn-def.widget.d.ts +1 -4
- package/platform-management/lib/features/app-terms/components/notify-app/notify-app.component.d.ts +1 -2
- package/platform-management/lib/features/app-terms/pages/list/list-terms.component.d.ts +0 -1
- package/platform-management/lib/features/app-version/check-version.service.d.ts +1 -3
- package/platform-management/lib/features/app-version/components/list-versions/list-version.component.d.ts +2 -1
- package/platform-management/lib/features/app-version/components/notify-app/notify-app.component.d.ts +2 -3
- package/platform-management/lib/features/app-version/workflows/change-log.workflow.d.ts +8 -0
- package/fesm2022/acorex-modules-auth-blank.layout-B1a0710P.mjs +0 -18
- package/fesm2022/acorex-modules-auth-password.component-CLTZoufP.mjs +0 -59
- package/fesm2022/acorex-modules-auth-two-factor-code.component-PqOn37Gg.mjs +0 -40
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-DKGnh_V9.mjs +0 -3780
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-DKGnh_V9.mjs.map +0 -1
- package/fesm2022/acorex-modules-dashboard-management-home-dashboard-By3lZP-J.mjs +0 -861
- package/fesm2022/acorex-modules-dashboard-management-home-dashboard-By3lZP-J.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-hMEt0yZI.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-lock-dialog.component-BwKdUUcf.mjs +0 -52
- package/fesm2022/acorex-modules-document-management-share-email-dialog.component-BvR5OuCV.mjs +0 -55
- package/fesm2022/acorex-modules-document-management-unlock-dialog.component-DkZQ84kg.mjs +0 -37
- package/fesm2022/acorex-modules-issue-management-capture-screen.component-BMpafdHr.mjs +0 -28
- package/fesm2022/acorex-modules-organization-management-position.entity-DhPT9kzv.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-role.entity-C-AIIaDo.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-CJZ86Oon.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-management-list-version.component-a_szjudb.mjs.map +0 -1
@@ -1,3780 +0,0 @@
|
|
1
|
-
import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
|
2
|
-
import { createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXP_HOME_PAGES, AXP_MENU_PROVIDER, AXP_HOME_PAGE_DEFAULT_KEY } from '@acorex/platform/common';
|
3
|
-
import * as i3$1 from '@acorex/platform/layout/builder';
|
4
|
-
import { AXPWidgetsCatalog, AXPValueWidgetComponent, cloneProperty, AXPWidgetGroupEnum, AXPLayoutWidgetComponent, AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
|
5
|
-
import { AXMEntityCrudServiceImpl, AXPEntityService, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
6
|
-
import { AXP_APPEARANCE_PROPERTY_GROUP, AXP_STYLING_PROPERTY_GROUP, AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXP_BG_COLOR_PROPERTY, plainTextDefaultProperty, AXP_DATA_PROPERTY_GROUP, AXP_COLOR_PROPERTY, AXPWidgetsModule } from '@acorex/platform/widgets';
|
7
|
-
import * as i0 from '@angular/core';
|
8
|
-
import { Injectable, inject, Injector, computed, ChangeDetectionStrategy, Component, ChangeDetectorRef, signal, viewChild, ElementRef, HostListener, output, InjectionToken, effect, HostBinding, NgModule } from '@angular/core';
|
9
|
-
import { AXBarChartComponent } from '@acorex/charts/bar-chart';
|
10
|
-
import * as i2$2 from '@acorex/components/decorators';
|
11
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
12
|
-
import { AXTagModule } from '@acorex/components/tag';
|
13
|
-
import { AXDateTimeModule } from '@acorex/core/date-time';
|
14
|
-
import * as i2 from '@acorex/core/format';
|
15
|
-
import { AXFormatModule } from '@acorex/core/format';
|
16
|
-
import * as i1 from '@angular/common';
|
17
|
-
import { CommonModule, DatePipe } from '@angular/common';
|
18
|
-
import { interval, map, Observable, catchError, throwError, switchMap, firstValueFrom } from 'rxjs';
|
19
|
-
import { AXDonutChartComponent } from '@acorex/charts/donut-chart';
|
20
|
-
import { AXGaugeChartComponent } from '@acorex/charts/gauge-chart';
|
21
|
-
import { AXLineChartComponent } from '@acorex/charts/line-chart';
|
22
|
-
import { AXColorBoxModule } from '@acorex/components/color-box';
|
23
|
-
import { AXGridLayoutWidgetComponent } from '@acorex/components/grid-layout-builder';
|
24
|
-
import { AXPopoverModule } from '@acorex/components/popover';
|
25
|
-
import { AXToolBarModule } from '@acorex/components/toolbar';
|
26
|
-
import * as i1$1 from '@acorex/components/wysiwyg';
|
27
|
-
import { AXWysiwygModule } from '@acorex/components/wysiwyg';
|
28
|
-
import * as i2$1 from '@angular/forms';
|
29
|
-
import { FormsModule } from '@angular/forms';
|
30
|
-
import { AXAvatarModule } from '@acorex/components/avatar';
|
31
|
-
import * as i3 from '@acorex/components/badge';
|
32
|
-
import { AXBadgeModule } from '@acorex/components/badge';
|
33
|
-
import { AXButtonModule } from '@acorex/components/button';
|
34
|
-
import * as i4 from '@acorex/components/check-box';
|
35
|
-
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
36
|
-
import { AXImageModule } from '@acorex/components/image';
|
37
|
-
import { AXLabelModule } from '@acorex/components/label';
|
38
|
-
import { AXTabsModule } from '@acorex/components/tabs';
|
39
|
-
import * as i6 from '@acorex/core/translation';
|
40
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
41
|
-
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
42
|
-
import { AXPopupService } from '@acorex/components/popup';
|
43
|
-
import { AXP_GLOBAL_SEARCH_CONFIG_TOKEN } from '@acorex/modules/common';
|
44
|
-
import { AXPDataGenerator } from '@acorex/platform/core';
|
45
|
-
import { AXPWorkflowService } from '@acorex/platform/workflow';
|
46
|
-
|
47
|
-
const config = {
|
48
|
-
i18n: 'dashboard',
|
49
|
-
};
|
50
|
-
const RootConfig = {
|
51
|
-
config,
|
52
|
-
module: {
|
53
|
-
module: 'DashboardManagement',
|
54
|
-
name: 'Dashboard Management',
|
55
|
-
title: `t('module-name', {scope:"${config.i18n}"})`,
|
56
|
-
icon: 'fa-regular fa-tachometer-alt',
|
57
|
-
},
|
58
|
-
entities: {
|
59
|
-
dashboard: {
|
60
|
-
name: 'Dashboard',
|
61
|
-
title: `t("dashboard", { scope: "dashboard" })`,
|
62
|
-
titlePlural: `t("dashboardPlural", { scope: "dashboard" })`,
|
63
|
-
icon: 'fa-regular fa-tachometer-alt',
|
64
|
-
},
|
65
|
-
},
|
66
|
-
};
|
67
|
-
|
68
|
-
class AXMDashboardService extends AXMEntityCrudServiceImpl {
|
69
|
-
}
|
70
|
-
class AXMDashboardServiceImpl extends AXMDashboardService {
|
71
|
-
constructor() {
|
72
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.dashboard.name}`);
|
73
|
-
}
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
75
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardServiceImpl }); }
|
76
|
-
}
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardServiceImpl, decorators: [{
|
78
|
-
type: Injectable
|
79
|
-
}], ctorParameters: () => [] });
|
80
|
-
|
81
|
-
async function dashboardFactory(injector) {
|
82
|
-
const dataService = injector.get(AXMDashboardService);
|
83
|
-
const i18n = RootConfig.config.i18n;
|
84
|
-
const entityDef = {
|
85
|
-
module: RootConfig.module.name,
|
86
|
-
name: RootConfig.entities.dashboard.name,
|
87
|
-
source: '',
|
88
|
-
title: RootConfig.entities.dashboard.title,
|
89
|
-
formats: {
|
90
|
-
individual: RootConfig.entities.dashboard.title,
|
91
|
-
plural: RootConfig.entities.dashboard.titlePlural,
|
92
|
-
searchResult: {
|
93
|
-
title: '{{ title }}',
|
94
|
-
description: RootConfig.module.title,
|
95
|
-
},
|
96
|
-
},
|
97
|
-
relatedEntities: [],
|
98
|
-
groups: [
|
99
|
-
{
|
100
|
-
id: 'section',
|
101
|
-
title: RootConfig.entities.dashboard.title,
|
102
|
-
},
|
103
|
-
],
|
104
|
-
properties: [
|
105
|
-
{
|
106
|
-
name: 'name',
|
107
|
-
title: `t("name", { scope: "common" })`,
|
108
|
-
groupId: 'section',
|
109
|
-
options: {
|
110
|
-
sort: {
|
111
|
-
enabled: false,
|
112
|
-
},
|
113
|
-
filter: {
|
114
|
-
advance: {
|
115
|
-
enabled: false,
|
116
|
-
},
|
117
|
-
inline: {
|
118
|
-
enabled: false,
|
119
|
-
},
|
120
|
-
},
|
121
|
-
},
|
122
|
-
schema: {
|
123
|
-
dataType: 'string',
|
124
|
-
interface: {
|
125
|
-
type: AXPWidgetsCatalog.text,
|
126
|
-
},
|
127
|
-
},
|
128
|
-
},
|
129
|
-
{
|
130
|
-
name: 'title',
|
131
|
-
title: `t("title", { scope: "common" })`,
|
132
|
-
groupId: 'section',
|
133
|
-
options: {
|
134
|
-
sort: {
|
135
|
-
enabled: true,
|
136
|
-
},
|
137
|
-
filter: {
|
138
|
-
advance: {
|
139
|
-
enabled: true,
|
140
|
-
},
|
141
|
-
inline: {
|
142
|
-
enabled: true,
|
143
|
-
},
|
144
|
-
},
|
145
|
-
},
|
146
|
-
schema: {
|
147
|
-
dataType: 'string',
|
148
|
-
interface: {
|
149
|
-
type: AXPWidgetsCatalog.text,
|
150
|
-
},
|
151
|
-
},
|
152
|
-
validations: [
|
153
|
-
{
|
154
|
-
rule: 'required',
|
155
|
-
},
|
156
|
-
],
|
157
|
-
},
|
158
|
-
{
|
159
|
-
name: 'description',
|
160
|
-
title: `t("description", { scope: "${i18n}" })`,
|
161
|
-
groupId: 'section',
|
162
|
-
options: {
|
163
|
-
sort: {
|
164
|
-
enabled: false,
|
165
|
-
},
|
166
|
-
filter: {
|
167
|
-
advance: {
|
168
|
-
enabled: false,
|
169
|
-
},
|
170
|
-
inline: {
|
171
|
-
enabled: false,
|
172
|
-
},
|
173
|
-
},
|
174
|
-
},
|
175
|
-
schema: {
|
176
|
-
dataType: 'string',
|
177
|
-
interface: {
|
178
|
-
type: AXPWidgetsCatalog.text,
|
179
|
-
},
|
180
|
-
},
|
181
|
-
},
|
182
|
-
],
|
183
|
-
columns: [{ name: 'name' }, { name: 'title' }, { name: 'description' }],
|
184
|
-
commands: {
|
185
|
-
create: {
|
186
|
-
execute: async (data) => {
|
187
|
-
const res = await dataService.insertOne(data);
|
188
|
-
return { id: res };
|
189
|
-
},
|
190
|
-
},
|
191
|
-
delete: {
|
192
|
-
execute: async (id) => {
|
193
|
-
return await dataService.deleteOne(id);
|
194
|
-
},
|
195
|
-
},
|
196
|
-
update: {
|
197
|
-
execute: async (data) => {
|
198
|
-
return await dataService.updateOne(data.id, data);
|
199
|
-
},
|
200
|
-
},
|
201
|
-
},
|
202
|
-
queries: {
|
203
|
-
byKey: {
|
204
|
-
execute: async (id) => {
|
205
|
-
return await dataService.getOne(id);
|
206
|
-
},
|
207
|
-
type: AXPEntityQueryType.Single,
|
208
|
-
},
|
209
|
-
list: {
|
210
|
-
execute: async (e) => {
|
211
|
-
return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
|
212
|
-
},
|
213
|
-
type: AXPEntityQueryType.List,
|
214
|
-
},
|
215
|
-
},
|
216
|
-
interfaces: {
|
217
|
-
master: {
|
218
|
-
create: {
|
219
|
-
sections: [
|
220
|
-
{
|
221
|
-
id: 'section',
|
222
|
-
},
|
223
|
-
],
|
224
|
-
properties: [
|
225
|
-
{
|
226
|
-
name: 'name',
|
227
|
-
layout: {
|
228
|
-
positions: {
|
229
|
-
lg: {
|
230
|
-
colSpan: 6,
|
231
|
-
order: 1,
|
232
|
-
},
|
233
|
-
},
|
234
|
-
},
|
235
|
-
},
|
236
|
-
{
|
237
|
-
name: 'title',
|
238
|
-
layout: {
|
239
|
-
positions: {
|
240
|
-
lg: {
|
241
|
-
colSpan: 6,
|
242
|
-
order: 2,
|
243
|
-
},
|
244
|
-
},
|
245
|
-
},
|
246
|
-
},
|
247
|
-
{
|
248
|
-
name: 'description',
|
249
|
-
layout: {
|
250
|
-
positions: {
|
251
|
-
lg: {
|
252
|
-
colSpan: 12,
|
253
|
-
order: 3,
|
254
|
-
},
|
255
|
-
},
|
256
|
-
},
|
257
|
-
},
|
258
|
-
],
|
259
|
-
},
|
260
|
-
update: {
|
261
|
-
sections: [
|
262
|
-
{
|
263
|
-
id: 'section',
|
264
|
-
},
|
265
|
-
],
|
266
|
-
properties: [
|
267
|
-
{
|
268
|
-
name: 'name',
|
269
|
-
layout: {
|
270
|
-
positions: {
|
271
|
-
lg: {
|
272
|
-
colSpan: 6,
|
273
|
-
order: 1,
|
274
|
-
},
|
275
|
-
},
|
276
|
-
},
|
277
|
-
},
|
278
|
-
{
|
279
|
-
name: 'title',
|
280
|
-
layout: {
|
281
|
-
positions: {
|
282
|
-
lg: {
|
283
|
-
colSpan: 6,
|
284
|
-
order: 2,
|
285
|
-
},
|
286
|
-
},
|
287
|
-
},
|
288
|
-
},
|
289
|
-
{
|
290
|
-
name: 'description',
|
291
|
-
layout: {
|
292
|
-
positions: {
|
293
|
-
lg: {
|
294
|
-
colSpan: 12,
|
295
|
-
order: 3,
|
296
|
-
},
|
297
|
-
},
|
298
|
-
},
|
299
|
-
},
|
300
|
-
],
|
301
|
-
},
|
302
|
-
single: {
|
303
|
-
title: '{{title}}',
|
304
|
-
sections: [
|
305
|
-
{
|
306
|
-
id: 'section',
|
307
|
-
layout: {
|
308
|
-
positions: {
|
309
|
-
lg: {
|
310
|
-
colSpan: 12,
|
311
|
-
},
|
312
|
-
},
|
313
|
-
},
|
314
|
-
},
|
315
|
-
],
|
316
|
-
properties: [
|
317
|
-
{
|
318
|
-
name: 'name',
|
319
|
-
layout: {
|
320
|
-
positions: {
|
321
|
-
lg: {
|
322
|
-
colSpan: 6,
|
323
|
-
order: 1,
|
324
|
-
},
|
325
|
-
},
|
326
|
-
},
|
327
|
-
},
|
328
|
-
{
|
329
|
-
name: 'title',
|
330
|
-
layout: {
|
331
|
-
positions: {
|
332
|
-
lg: {
|
333
|
-
colSpan: 6,
|
334
|
-
order: 2,
|
335
|
-
},
|
336
|
-
},
|
337
|
-
},
|
338
|
-
},
|
339
|
-
{
|
340
|
-
name: 'description',
|
341
|
-
layout: {
|
342
|
-
positions: {
|
343
|
-
lg: {
|
344
|
-
colSpan: 12,
|
345
|
-
order: 3,
|
346
|
-
},
|
347
|
-
},
|
348
|
-
},
|
349
|
-
},
|
350
|
-
],
|
351
|
-
actions: [],
|
352
|
-
},
|
353
|
-
list: {
|
354
|
-
actions: [
|
355
|
-
{
|
356
|
-
title: `t("create", { scope: "common" })`,
|
357
|
-
command: 'create-entity',
|
358
|
-
priority: 'primary',
|
359
|
-
type: 'create',
|
360
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
361
|
-
},
|
362
|
-
{
|
363
|
-
title: 't("deleteItems", { scope: "common" })',
|
364
|
-
command: 'delete-entity',
|
365
|
-
priority: 'primary',
|
366
|
-
type: 'delete',
|
367
|
-
scope: AXPEntityCommandScope.Selected,
|
368
|
-
},
|
369
|
-
{
|
370
|
-
title: 't("detail", { scope: "common" })',
|
371
|
-
command: 'open-entity',
|
372
|
-
priority: 'secondary',
|
373
|
-
type: 'view',
|
374
|
-
scope: AXPEntityCommandScope.Individual,
|
375
|
-
},
|
376
|
-
{
|
377
|
-
title: 't("delete", { scope: "common" })',
|
378
|
-
command: 'delete-entity',
|
379
|
-
priority: 'secondary',
|
380
|
-
type: 'delete',
|
381
|
-
scope: AXPEntityCommandScope.Individual,
|
382
|
-
},
|
383
|
-
],
|
384
|
-
views: [
|
385
|
-
createAllQueryView({
|
386
|
-
sorts: [{ name: 'name', dir: 'asc' }]
|
387
|
-
}),
|
388
|
-
],
|
389
|
-
},
|
390
|
-
},
|
391
|
-
},
|
392
|
-
};
|
393
|
-
return entityDef;
|
394
|
-
}
|
395
|
-
|
396
|
-
var dashboard_entity = /*#__PURE__*/Object.freeze({
|
397
|
-
__proto__: null,
|
398
|
-
dashboardFactory: dashboardFactory
|
399
|
-
});
|
400
|
-
|
401
|
-
class AXMEntityProvider {
|
402
|
-
constructor() {
|
403
|
-
this.injector = inject(Injector);
|
404
|
-
}
|
405
|
-
preload() {
|
406
|
-
const module = RootConfig.module.name;
|
407
|
-
return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
|
408
|
-
module: module,
|
409
|
-
entity: entity.name,
|
410
|
-
}));
|
411
|
-
}
|
412
|
-
async get(moduleName, entityName) {
|
413
|
-
if (moduleName == RootConfig.module.name) {
|
414
|
-
switch (entityName) {
|
415
|
-
case RootConfig.entities.dashboard.name:
|
416
|
-
return (await Promise.resolve().then(function () { return dashboard_entity; })).dashboardFactory(this.injector);
|
417
|
-
}
|
418
|
-
}
|
419
|
-
return null;
|
420
|
-
}
|
421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
422
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMEntityProvider }); }
|
423
|
-
}
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMEntityProvider, decorators: [{
|
425
|
-
type: Injectable
|
426
|
-
}] });
|
427
|
-
|
428
|
-
/**
|
429
|
-
* Bar Chart Widget Component
|
430
|
-
* Renders data as vertical bars with interactive hover effects and animations
|
431
|
-
*/
|
432
|
-
class AXPBarChartWidgetViewComponent extends AXPValueWidgetComponent {
|
433
|
-
constructor() {
|
434
|
-
super(...arguments);
|
435
|
-
this.barChartData = computed(() => this.getValue());
|
436
|
-
this.barChartOptions = computed(() => this.options());
|
437
|
-
}
|
438
|
-
handleBarClick(event) {
|
439
|
-
//console.log(event);
|
440
|
-
}
|
441
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBarChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
442
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", 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 }); }
|
443
|
-
}
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPBarChartWidgetViewComponent, decorators: [{
|
445
|
-
type: Component,
|
446
|
-
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"] }]
|
447
|
-
}] });
|
448
|
-
|
449
|
-
var barChartWidget_component = /*#__PURE__*/Object.freeze({
|
450
|
-
__proto__: null,
|
451
|
-
AXPBarChartWidgetViewComponent: AXPBarChartWidgetViewComponent
|
452
|
-
});
|
453
|
-
|
454
|
-
const AXP_WIDGETS_CHART_CATEGORY = {
|
455
|
-
name: 'chart',
|
456
|
-
order: 6,
|
457
|
-
title: 'Charts',
|
458
|
-
};
|
459
|
-
const AXP_WIDGETS_UTILITY_CATEGORY = {
|
460
|
-
name: 'utility',
|
461
|
-
order: 7,
|
462
|
-
title: 'Utilities',
|
463
|
-
};
|
464
|
-
|
465
|
-
const AXPBarChartWidget = {
|
466
|
-
name: 'bar-chart',
|
467
|
-
title: 'Bar Chart Widget',
|
468
|
-
categories: [AXP_WIDGETS_CHART_CATEGORY],
|
469
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
470
|
-
type: 'dashboard',
|
471
|
-
icon: 'fa-light fa-chart-bar',
|
472
|
-
properties: [
|
473
|
-
cloneProperty(AXP_NAME_PROPERTY, { visible: false }),
|
474
|
-
cloneProperty(AXP_DATA_PATH_PROPERTY, { visible: false }),
|
475
|
-
// ====== Chart Title ======
|
476
|
-
{
|
477
|
-
name: 'title',
|
478
|
-
title: 'Chart Title',
|
479
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
480
|
-
schema: {
|
481
|
-
defaultValue: '',
|
482
|
-
dataType: 'string',
|
483
|
-
interface: {
|
484
|
-
name: 'title',
|
485
|
-
path: 'options.title',
|
486
|
-
type: AXPWidgetsCatalog.text,
|
487
|
-
options: {
|
488
|
-
placeholder: 'Enter chart title',
|
489
|
-
},
|
490
|
-
},
|
491
|
-
},
|
492
|
-
visible: true,
|
493
|
-
},
|
494
|
-
// ====== Layout & Dimensions ======
|
495
|
-
{
|
496
|
-
name: 'width',
|
497
|
-
title: 'Width',
|
498
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
499
|
-
schema: {
|
500
|
-
defaultValue: null,
|
501
|
-
dataType: 'number',
|
502
|
-
interface: {
|
503
|
-
name: 'width',
|
504
|
-
path: 'options.width',
|
505
|
-
type: AXPWidgetsCatalog.number,
|
506
|
-
options: {
|
507
|
-
minValue: 0,
|
508
|
-
maxValue: 1200,
|
509
|
-
},
|
510
|
-
},
|
511
|
-
},
|
512
|
-
visible: true,
|
513
|
-
},
|
514
|
-
{
|
515
|
-
name: 'height',
|
516
|
-
title: 'Height',
|
517
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
518
|
-
schema: {
|
519
|
-
defaultValue: 300,
|
520
|
-
dataType: 'number',
|
521
|
-
interface: {
|
522
|
-
name: 'height',
|
523
|
-
path: 'options.height',
|
524
|
-
type: AXPWidgetsCatalog.number,
|
525
|
-
options: {
|
526
|
-
minValue: 0,
|
527
|
-
maxValue: 800,
|
528
|
-
},
|
529
|
-
},
|
530
|
-
},
|
531
|
-
visible: true,
|
532
|
-
},
|
533
|
-
// ====== X Axis Settings ======
|
534
|
-
{
|
535
|
-
name: 'showXAxis',
|
536
|
-
title: 'Show X Axis',
|
537
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
538
|
-
schema: {
|
539
|
-
defaultValue: true,
|
540
|
-
dataType: 'boolean',
|
541
|
-
interface: {
|
542
|
-
name: 'showXAxis',
|
543
|
-
path: 'options.showXAxis',
|
544
|
-
type: AXPWidgetsCatalog.toggle,
|
545
|
-
},
|
546
|
-
},
|
547
|
-
visible: true,
|
548
|
-
},
|
549
|
-
{
|
550
|
-
name: 'xAxisLabel',
|
551
|
-
title: 'X Axis Label',
|
552
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
553
|
-
schema: {
|
554
|
-
defaultValue: '',
|
555
|
-
dataType: 'string',
|
556
|
-
interface: {
|
557
|
-
name: 'xAxisLabel',
|
558
|
-
path: 'options.xAxisLabel',
|
559
|
-
type: AXPWidgetsCatalog.text,
|
560
|
-
},
|
561
|
-
},
|
562
|
-
visible: true,
|
563
|
-
},
|
564
|
-
// ====== Y Axis Settings ======
|
565
|
-
{
|
566
|
-
name: 'showYAxis',
|
567
|
-
title: 'Show Y Axis',
|
568
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
569
|
-
schema: {
|
570
|
-
defaultValue: true,
|
571
|
-
dataType: 'boolean',
|
572
|
-
interface: {
|
573
|
-
name: 'showYAxis',
|
574
|
-
path: 'options.showYAxis',
|
575
|
-
type: AXPWidgetsCatalog.toggle,
|
576
|
-
},
|
577
|
-
},
|
578
|
-
visible: true,
|
579
|
-
},
|
580
|
-
{
|
581
|
-
name: 'yAxisLabel',
|
582
|
-
title: 'Y Axis Label',
|
583
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
584
|
-
schema: {
|
585
|
-
defaultValue: '',
|
586
|
-
dataType: 'string',
|
587
|
-
interface: {
|
588
|
-
name: 'yAxisLabel',
|
589
|
-
path: 'options.yAxisLabel',
|
590
|
-
type: AXPWidgetsCatalog.text,
|
591
|
-
},
|
592
|
-
},
|
593
|
-
visible: true,
|
594
|
-
},
|
595
|
-
// ====== Bar Appearance ======
|
596
|
-
{
|
597
|
-
name: 'barWidth',
|
598
|
-
title: 'Bar Width',
|
599
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
600
|
-
schema: {
|
601
|
-
defaultValue: 80,
|
602
|
-
dataType: 'number',
|
603
|
-
interface: {
|
604
|
-
name: 'barWidth',
|
605
|
-
path: 'options.barWidth',
|
606
|
-
type: AXPWidgetsCatalog.number,
|
607
|
-
options: {
|
608
|
-
placeholder: '1-100',
|
609
|
-
minValue: 1,
|
610
|
-
maxValue: 100,
|
611
|
-
},
|
612
|
-
},
|
613
|
-
},
|
614
|
-
visible: true,
|
615
|
-
},
|
616
|
-
{
|
617
|
-
name: 'cornerRadius',
|
618
|
-
title: 'Corner Radius',
|
619
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
620
|
-
schema: {
|
621
|
-
defaultValue: 4,
|
622
|
-
dataType: 'number',
|
623
|
-
interface: {
|
624
|
-
name: 'cornerRadius',
|
625
|
-
path: 'options.cornerRadius',
|
626
|
-
type: AXPWidgetsCatalog.number,
|
627
|
-
options: {
|
628
|
-
placeholder: '0-20',
|
629
|
-
minValue: 0,
|
630
|
-
maxValue: 20,
|
631
|
-
},
|
632
|
-
},
|
633
|
-
},
|
634
|
-
visible: true,
|
635
|
-
},
|
636
|
-
// ====== Grid Settings ======
|
637
|
-
{
|
638
|
-
name: 'showGrid',
|
639
|
-
title: 'Show Grid Lines',
|
640
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
641
|
-
schema: {
|
642
|
-
defaultValue: true,
|
643
|
-
dataType: 'boolean',
|
644
|
-
interface: {
|
645
|
-
name: 'showGrid',
|
646
|
-
path: 'options.showGrid',
|
647
|
-
type: AXPWidgetsCatalog.toggle,
|
648
|
-
},
|
649
|
-
},
|
650
|
-
visible: true,
|
651
|
-
},
|
652
|
-
// ====== Tooltip Settings ======
|
653
|
-
{
|
654
|
-
name: 'showTooltip',
|
655
|
-
title: 'Show Tooltip',
|
656
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
657
|
-
schema: {
|
658
|
-
defaultValue: true,
|
659
|
-
dataType: 'boolean',
|
660
|
-
interface: {
|
661
|
-
name: 'showTooltip',
|
662
|
-
path: 'options.showTooltip',
|
663
|
-
type: AXPWidgetsCatalog.toggle,
|
664
|
-
},
|
665
|
-
},
|
666
|
-
visible: true,
|
667
|
-
},
|
668
|
-
// ====== Animation Settings ======
|
669
|
-
{
|
670
|
-
name: 'animationEasing',
|
671
|
-
title: 'Animation Easing',
|
672
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
673
|
-
schema: {
|
674
|
-
defaultValue: 'cubic-out',
|
675
|
-
dataType: 'string',
|
676
|
-
interface: {
|
677
|
-
name: 'animationEasing',
|
678
|
-
path: 'options.animationEasing',
|
679
|
-
type: AXPWidgetsCatalog.select,
|
680
|
-
options: {
|
681
|
-
dataSource: [
|
682
|
-
{ value: 'linear', text: 'Linear' },
|
683
|
-
{ value: 'ease', text: 'Ease' },
|
684
|
-
{ value: 'ease-in', text: 'Ease In' },
|
685
|
-
{ value: 'ease-out', text: 'Ease Out' },
|
686
|
-
{ value: 'ease-in-out', text: 'Ease In Out' },
|
687
|
-
{ value: 'cubic', text: 'Cubic' },
|
688
|
-
{ value: 'cubic-in', text: 'Cubic In' },
|
689
|
-
{ value: 'cubic-out', text: 'Cubic Out' },
|
690
|
-
{ value: 'cubic-in-out', text: 'Cubic In Out' },
|
691
|
-
],
|
692
|
-
textField: 'text',
|
693
|
-
valueField: 'value',
|
694
|
-
},
|
695
|
-
},
|
696
|
-
},
|
697
|
-
visible: true,
|
698
|
-
},
|
699
|
-
{
|
700
|
-
name: 'animationDuration',
|
701
|
-
title: 'Animation Duration',
|
702
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
703
|
-
schema: {
|
704
|
-
defaultValue: 800,
|
705
|
-
dataType: 'number',
|
706
|
-
interface: {
|
707
|
-
name: 'animationDuration',
|
708
|
-
path: 'options.animationDuration',
|
709
|
-
type: AXPWidgetsCatalog.number,
|
710
|
-
options: {
|
711
|
-
placeholder: '0-2000',
|
712
|
-
minValue: 0,
|
713
|
-
maxValue: 2000,
|
714
|
-
},
|
715
|
-
},
|
716
|
-
},
|
717
|
-
visible: true,
|
718
|
-
},
|
719
|
-
],
|
720
|
-
components: {
|
721
|
-
view: {
|
722
|
-
component: () => Promise.resolve().then(function () { return barChartWidget_component; }).then((c) => c.AXPBarChartWidgetViewComponent),
|
723
|
-
},
|
724
|
-
},
|
725
|
-
meta: {
|
726
|
-
dimensions: {
|
727
|
-
width: 5,
|
728
|
-
height: 6,
|
729
|
-
minWidth: 2,
|
730
|
-
minHeight: 2,
|
731
|
-
maxWidth: 6,
|
732
|
-
maxHeight: 7,
|
733
|
-
},
|
734
|
-
},
|
735
|
-
};
|
736
|
-
|
737
|
-
class AXPClockCalendarWidgetViewComponent extends AXPValueWidgetComponent {
|
738
|
-
constructor() {
|
739
|
-
super(...arguments);
|
740
|
-
// Dependencies
|
741
|
-
this.cdr = inject(ChangeDetectorRef);
|
742
|
-
// Time state
|
743
|
-
this.currentTime = new Date();
|
744
|
-
this.currentDate = new Date();
|
745
|
-
this.clockSubscription = null;
|
746
|
-
// Static clock elements
|
747
|
-
this.clockHours = Array.from({ length: 12 }, (_, i) => i + 1);
|
748
|
-
this.clockHourNumbers = Array.from({ length: 12 }, (_, i) => ({
|
749
|
-
number: i === 0 ? 12 : i,
|
750
|
-
angle: i * 30,
|
751
|
-
}));
|
752
|
-
// Clock hands rotation angles
|
753
|
-
this.hourRotation = 0;
|
754
|
-
this.minuteRotation = 0;
|
755
|
-
this.secondRotation = 0;
|
756
|
-
// Options with computed properties and defaults
|
757
|
-
this.displayLayout = computed(() => this.options()?.displayLayout?.id ?? 'both');
|
758
|
-
this.showDigitalClock = computed(() => {
|
759
|
-
const layout = this.displayLayout();
|
760
|
-
return layout === 'both' || layout === 'digital';
|
761
|
-
});
|
762
|
-
this.showAnalogClock = computed(() => {
|
763
|
-
const layout = this.displayLayout();
|
764
|
-
return layout === 'both' || layout === 'analog';
|
765
|
-
});
|
766
|
-
this.showDate = computed(() => this.options()?.showDate !== false);
|
767
|
-
this.showDayOfWeek = computed(() => this.options()?.showDayOfWeek !== false);
|
768
|
-
this.use24Hour = computed(() => this.options()?.use24Hour === true);
|
769
|
-
this.showSeconds = computed(() => this.options()?.showSeconds !== false);
|
770
|
-
this.dateFormat = computed(() => this.options()?.dateFormat?.id ?? 'dd MMM yyyy');
|
771
|
-
this.timezone = computed(() => this.options()?.timezone?.id ?? 'local');
|
772
|
-
// protected readonly showTimezoneIndicator: Signal<boolean> = computed(() => this.timezone() !== 'local');
|
773
|
-
this.displayTimezone = computed(() => {
|
774
|
-
const tz = this.timezone();
|
775
|
-
if (tz === 'local')
|
776
|
-
return '';
|
777
|
-
if (tz.startsWith('UTC')) {
|
778
|
-
const [match, sign, hours, minutes] = tz.match(/UTC([+-])(\d+):?(\d+)?/) ?? [];
|
779
|
-
if (match) {
|
780
|
-
if (!minutes || minutes === '00') {
|
781
|
-
return `UTC${sign}${parseInt(hours)}`;
|
782
|
-
}
|
783
|
-
return `UTC${sign}${parseInt(hours)}:${minutes}`;
|
784
|
-
}
|
785
|
-
}
|
786
|
-
return tz;
|
787
|
-
});
|
788
|
-
this.timeFormat = computed(() => this.showSeconds() ? (this.use24Hour() ? 'HH:mm:ss' : 'hh:mm:ss a') : this.use24Hour() ? 'HH:mm' : 'hh:mm a');
|
789
|
-
}
|
790
|
-
ngOnInit() {
|
791
|
-
super.ngOnInit();
|
792
|
-
this.startClockTimer();
|
793
|
-
this.updateTime();
|
794
|
-
}
|
795
|
-
ngOnDestroy() {
|
796
|
-
this.stopClockTimer();
|
797
|
-
}
|
798
|
-
startClockTimer() {
|
799
|
-
this.stopClockTimer();
|
800
|
-
this.clockSubscription = interval(1000).subscribe(() => this.updateTime());
|
801
|
-
}
|
802
|
-
stopClockTimer() {
|
803
|
-
this.clockSubscription?.unsubscribe();
|
804
|
-
this.clockSubscription = null;
|
805
|
-
}
|
806
|
-
updateTime() {
|
807
|
-
const now = this.getAdjustedTime();
|
808
|
-
this.currentTime = now;
|
809
|
-
this.currentDate = now;
|
810
|
-
this.updateClockHandsRotation(now);
|
811
|
-
this.cdr.markForCheck();
|
812
|
-
}
|
813
|
-
getAdjustedTime() {
|
814
|
-
const now = new Date();
|
815
|
-
const tz = this.timezone();
|
816
|
-
if (tz === 'local' || !tz.startsWith('UTC')) {
|
817
|
-
return now;
|
818
|
-
}
|
819
|
-
const [match, sign, hours, minutes] = tz.match(/UTC([+-])(\d+):?(\d+)?/) ?? [];
|
820
|
-
if (!match) {
|
821
|
-
return now;
|
822
|
-
}
|
823
|
-
const offsetHours = parseInt(hours) * (sign === '+' ? 1 : -1);
|
824
|
-
const offsetMinutes = minutes ? parseInt(minutes) * (sign === '+' ? 1 : -1) : 0;
|
825
|
-
const utcTime = now.getTime() + now.getTimezoneOffset() * 60000;
|
826
|
-
return new Date(utcTime + (offsetHours * 3600000 + offsetMinutes * 60000));
|
827
|
-
}
|
828
|
-
updateClockHandsRotation(now) {
|
829
|
-
const hours = now.getHours() % 12;
|
830
|
-
const minutes = now.getMinutes();
|
831
|
-
const seconds = now.getSeconds();
|
832
|
-
// For analog clocks:
|
833
|
-
// - 12 o'clock is 0°
|
834
|
-
// - 3 o'clock is 90°
|
835
|
-
// - 6 o'clock is 180°
|
836
|
-
// - 9 o'clock is 270°
|
837
|
-
// Hour hand: 30° per hour (360°/12) plus gradual movement from minutes
|
838
|
-
this.hourRotation = hours * 30 + minutes / 2 + 180;
|
839
|
-
// Minute hand: 6° per minute (360°/60)
|
840
|
-
this.minuteRotation = minutes * 6 + 180;
|
841
|
-
// Second hand: 6° per second (360°/60)
|
842
|
-
this.secondRotation = seconds * 6 + 180;
|
843
|
-
}
|
844
|
-
initializeWidget() {
|
845
|
-
this.updateTime();
|
846
|
-
}
|
847
|
-
updateWidget() {
|
848
|
-
this.stopClockTimer();
|
849
|
-
this.startClockTimer();
|
850
|
-
this.updateTime();
|
851
|
-
}
|
852
|
-
destroyWidget() {
|
853
|
-
this.stopClockTimer();
|
854
|
-
}
|
855
|
-
getDayOfWeek() {
|
856
|
-
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
857
|
-
return days[this.currentDate.getDay()];
|
858
|
-
}
|
859
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPClockCalendarWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
860
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPClockCalendarWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-clock-calendar-container\">\n <!-- Timezone indicator (only shown when not local) -->\n <!-- @if (showTimezoneIndicator()) {\n <div class=\"axp-clock-calendar-timezone-badge\"><i class=\"fa-solid fa-globe\"></i> {{ displayTimezone() }}</div>\n } -->\n\n <!-- Day of week display -->\n @if (showDayOfWeek()) {\n <div class=\"axp-clock-calendar-day-label\">{{ getDayOfWeek() }}</div>\n }\n\n <div class=\"axp-clock-calendar-content\">\n <!-- Digital Clock Display -->\n @if (showDigitalClock()) {\n <div class=\"axp-clock-calendar-digital-clock\">\n {{ currentTime | format : 'datetime' : timeFormat() | async }}\n </div>\n }\n\n <!-- Analog Clock Display -->\n @if (showAnalogClock()) {\n <div class=\"axp-clock-calendar-analog-clock\">\n <!-- Hour markers -->\n @for (hour of clockHours; track hour) {\n <div\n class=\"axp-clock-calendar-hour-marker\"\n [style.transform]=\"'rotate(' + hour * 30 + 'deg) translateY(-80px)'\"\n ></div>\n }\n\n <!-- Clock Numbers -->\n <div class=\"axp-clock-calendar-numbers-container\">\n @for (hour of clockHourNumbers; track hour) {\n <div\n class=\"axp-clock-calendar-hour-number\"\n [style.transform]=\"'rotate(' + hour.angle + 'deg) translateY(-82px)'\"\n >\n <span [style.transform]=\"'rotate(' + -hour.angle + 'deg)'\">{{ hour.number }}</span>\n </div>\n }\n </div>\n\n <!-- Clock Hands -->\n <div class=\"axp-clock-calendar-hands-container\">\n <div class=\"axp-clock-calendar-hour-hand\" [style.transform]=\"'rotate(' + hourRotation + 'deg)'\"></div>\n <div class=\"axp-clock-calendar-minute-hand\" [style.transform]=\"'rotate(' + minuteRotation + 'deg)'\"></div>\n @if (showSeconds()) {\n <div class=\"axp-clock-calendar-second-hand\" [style.transform]=\"'rotate(' + secondRotation + 'deg)'\"></div>\n }\n <div class=\"axp-clock-calendar-center-dot\"></div>\n </div>\n </div>\n }\n\n <!-- Date Display -->\n @if (showDate()) {\n <div class=\"axp-clock-calendar-date-display\">\n <i class=\"fa-regular fa-calendar\"></i>\n {{ currentDate | format : 'datetime' : dateFormat() | async }}\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.axp-clock-calendar-container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;padding:1rem;position:relative;overflow:hidden;box-shadow:var(--ax-shadow-sm);background-color:var(--ax-surface-color);color:var(--ax-text-color)}.axp-clock-calendar-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;width:100%;height:100%;position:relative}.axp-clock-calendar-timezone-badge{position:absolute;top:.5rem;right:.5rem;font-size:.75rem;padding:.25rem;border-radius:1rem;border-width:1px;border-color:rgba(23,23,23,.5)}.axp-clock-calendar-timezone-badge:is(.ax-dark *){border-color:rgba(245,245,245,.5)}.axp-clock-calendar-timezone-badge{display:flex;align-items:center;gap:.25rem}.axp-clock-calendar-timezone-badge i{font-size:.75rem}.axp-clock-calendar-day-label{font-size:.9rem;font-weight:600;text-transform:uppercase;letter-spacing:.05rem;margin-bottom:.25rem}.axp-clock-calendar-digital-clock{font-size:1.5rem;font-weight:500;letter-spacing:.05rem;font-family:monospace;padding:.5rem .75rem;border-radius:.25rem}.axp-clock-calendar-analog-clock{position:relative;border-radius:50%;border-width:1px;border-color:rgba(23,23,23,.5)}.axp-clock-calendar-analog-clock:is(.ax-dark *){border-color:rgba(245,245,245,.5)}.axp-clock-calendar-analog-clock{display:flex;align-items:center;justify-content:center;background:var(--ax-surface-color);width:min(180px,100%);height:0;padding-bottom:min(180px,100%);margin:.5rem auto;min-width:120px;min-height:120px;box-shadow:var(--ax-shadow-sm)}.axp-clock-calendar-hands-container,.axp-clock-calendar-numbers-container{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%}.axp-clock-calendar-hour-marker{position:absolute;left:50%;top:50%;width:2px;height:4%;margin-left:-1px;border-radius:1px;background-color:var(--ax-text-muted);transform-origin:50% 0}.axp-clock-calendar-hour-number{position:absolute;left:50%;top:50%;transform-origin:50% 0;font-size:clamp(.7rem,2.5vw,.9rem);font-weight:600;color:var(--ax-text-color)}.axp-clock-calendar-hour-number span{display:block}.axp-clock-calendar-hour-hand{position:absolute;top:50%;left:50%;width:4px;height:25%;margin-left:-2px;background-color:rgba(23,23,23,.75)}.axp-clock-calendar-hour-hand:is(.ax-dark *){background-color:rgba(245,245,245,.75)}.axp-clock-calendar-hour-hand{transform-origin:50% 0;border-radius:3px;box-shadow:0 0 4px rgba(0,0,0,.3)}.axp-clock-calendar-minute-hand{position:absolute;top:50%;left:50%;width:3px;height:38%;margin-left:-1.5px;background-color:rgba(23,23,23,.5)}.axp-clock-calendar-minute-hand:is(.ax-dark *){background-color:rgba(245,245,245,.5)}.axp-clock-calendar-minute-hand{transform-origin:50% 0;border-radius:2px;box-shadow:0 0 4px rgba(0,0,0,.3)}.axp-clock-calendar-second-hand{position:absolute;top:50%;left:50%;width:2px;height:42%;margin-left:-1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-500),var(--tw-bg-opacity, 1))}.axp-clock-calendar-second-hand:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-400),var(--tw-bg-opacity, 1))}.axp-clock-calendar-second-hand{transform-origin:50% 0;border-radius:1px;box-shadow:0 0 3px rgba(0,0,0,.2)}.axp-clock-calendar-center-dot{position:absolute;top:50%;left:50%;width:10px;height:10px;border-radius:50%;margin-top:-5px;margin-left:-5px;background-color:#d81159;border:2px solid var(--ax-surface-color);box-shadow:0 0 4px rgba(0,0,0,.3)}.axp-clock-calendar-date-display{display:flex;align-items:center;gap:.5rem;font-size:.85rem;padding:.25rem .6rem;border-radius:.25rem;background-color:var(--ax-surface-hover);color:var(--ax-text-color)}.axp-clock-calendar-date-display i{font-size:.85rem;opacity:.7}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i2.AXFormatPipe, name: "format" }, { kind: "ngmodule", type: AXTagModule }, { kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
861
|
-
}
|
862
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPClockCalendarWidgetViewComponent, decorators: [{
|
863
|
-
type: Component,
|
864
|
-
args: [{ standalone: true, imports: [CommonModule, AXDateTimeModule, AXFormatModule, AXTagModule, AXDecoratorModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-clock-calendar-container\">\n <!-- Timezone indicator (only shown when not local) -->\n <!-- @if (showTimezoneIndicator()) {\n <div class=\"axp-clock-calendar-timezone-badge\"><i class=\"fa-solid fa-globe\"></i> {{ displayTimezone() }}</div>\n } -->\n\n <!-- Day of week display -->\n @if (showDayOfWeek()) {\n <div class=\"axp-clock-calendar-day-label\">{{ getDayOfWeek() }}</div>\n }\n\n <div class=\"axp-clock-calendar-content\">\n <!-- Digital Clock Display -->\n @if (showDigitalClock()) {\n <div class=\"axp-clock-calendar-digital-clock\">\n {{ currentTime | format : 'datetime' : timeFormat() | async }}\n </div>\n }\n\n <!-- Analog Clock Display -->\n @if (showAnalogClock()) {\n <div class=\"axp-clock-calendar-analog-clock\">\n <!-- Hour markers -->\n @for (hour of clockHours; track hour) {\n <div\n class=\"axp-clock-calendar-hour-marker\"\n [style.transform]=\"'rotate(' + hour * 30 + 'deg) translateY(-80px)'\"\n ></div>\n }\n\n <!-- Clock Numbers -->\n <div class=\"axp-clock-calendar-numbers-container\">\n @for (hour of clockHourNumbers; track hour) {\n <div\n class=\"axp-clock-calendar-hour-number\"\n [style.transform]=\"'rotate(' + hour.angle + 'deg) translateY(-82px)'\"\n >\n <span [style.transform]=\"'rotate(' + -hour.angle + 'deg)'\">{{ hour.number }}</span>\n </div>\n }\n </div>\n\n <!-- Clock Hands -->\n <div class=\"axp-clock-calendar-hands-container\">\n <div class=\"axp-clock-calendar-hour-hand\" [style.transform]=\"'rotate(' + hourRotation + 'deg)'\"></div>\n <div class=\"axp-clock-calendar-minute-hand\" [style.transform]=\"'rotate(' + minuteRotation + 'deg)'\"></div>\n @if (showSeconds()) {\n <div class=\"axp-clock-calendar-second-hand\" [style.transform]=\"'rotate(' + secondRotation + 'deg)'\"></div>\n }\n <div class=\"axp-clock-calendar-center-dot\"></div>\n </div>\n </div>\n }\n\n <!-- Date Display -->\n @if (showDate()) {\n <div class=\"axp-clock-calendar-date-display\">\n <i class=\"fa-regular fa-calendar\"></i>\n {{ currentDate | format : 'datetime' : dateFormat() | async }}\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.axp-clock-calendar-container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;padding:1rem;position:relative;overflow:hidden;box-shadow:var(--ax-shadow-sm);background-color:var(--ax-surface-color);color:var(--ax-text-color)}.axp-clock-calendar-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;width:100%;height:100%;position:relative}.axp-clock-calendar-timezone-badge{position:absolute;top:.5rem;right:.5rem;font-size:.75rem;padding:.25rem;border-radius:1rem;border-width:1px;border-color:rgba(23,23,23,.5)}.axp-clock-calendar-timezone-badge:is(.ax-dark *){border-color:rgba(245,245,245,.5)}.axp-clock-calendar-timezone-badge{display:flex;align-items:center;gap:.25rem}.axp-clock-calendar-timezone-badge i{font-size:.75rem}.axp-clock-calendar-day-label{font-size:.9rem;font-weight:600;text-transform:uppercase;letter-spacing:.05rem;margin-bottom:.25rem}.axp-clock-calendar-digital-clock{font-size:1.5rem;font-weight:500;letter-spacing:.05rem;font-family:monospace;padding:.5rem .75rem;border-radius:.25rem}.axp-clock-calendar-analog-clock{position:relative;border-radius:50%;border-width:1px;border-color:rgba(23,23,23,.5)}.axp-clock-calendar-analog-clock:is(.ax-dark *){border-color:rgba(245,245,245,.5)}.axp-clock-calendar-analog-clock{display:flex;align-items:center;justify-content:center;background:var(--ax-surface-color);width:min(180px,100%);height:0;padding-bottom:min(180px,100%);margin:.5rem auto;min-width:120px;min-height:120px;box-shadow:var(--ax-shadow-sm)}.axp-clock-calendar-hands-container,.axp-clock-calendar-numbers-container{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%}.axp-clock-calendar-hour-marker{position:absolute;left:50%;top:50%;width:2px;height:4%;margin-left:-1px;border-radius:1px;background-color:var(--ax-text-muted);transform-origin:50% 0}.axp-clock-calendar-hour-number{position:absolute;left:50%;top:50%;transform-origin:50% 0;font-size:clamp(.7rem,2.5vw,.9rem);font-weight:600;color:var(--ax-text-color)}.axp-clock-calendar-hour-number span{display:block}.axp-clock-calendar-hour-hand{position:absolute;top:50%;left:50%;width:4px;height:25%;margin-left:-2px;background-color:rgba(23,23,23,.75)}.axp-clock-calendar-hour-hand:is(.ax-dark *){background-color:rgba(245,245,245,.75)}.axp-clock-calendar-hour-hand{transform-origin:50% 0;border-radius:3px;box-shadow:0 0 4px rgba(0,0,0,.3)}.axp-clock-calendar-minute-hand{position:absolute;top:50%;left:50%;width:3px;height:38%;margin-left:-1.5px;background-color:rgba(23,23,23,.5)}.axp-clock-calendar-minute-hand:is(.ax-dark *){background-color:rgba(245,245,245,.5)}.axp-clock-calendar-minute-hand{transform-origin:50% 0;border-radius:2px;box-shadow:0 0 4px rgba(0,0,0,.3)}.axp-clock-calendar-second-hand{position:absolute;top:50%;left:50%;width:2px;height:42%;margin-left:-1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-500),var(--tw-bg-opacity, 1))}.axp-clock-calendar-second-hand:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-400),var(--tw-bg-opacity, 1))}.axp-clock-calendar-second-hand{transform-origin:50% 0;border-radius:1px;box-shadow:0 0 3px rgba(0,0,0,.2)}.axp-clock-calendar-center-dot{position:absolute;top:50%;left:50%;width:10px;height:10px;border-radius:50%;margin-top:-5px;margin-left:-5px;background-color:#d81159;border:2px solid var(--ax-surface-color);box-shadow:0 0 4px rgba(0,0,0,.3)}.axp-clock-calendar-date-display{display:flex;align-items:center;gap:.5rem;font-size:.85rem;padding:.25rem .6rem;border-radius:.25rem;background-color:var(--ax-surface-hover);color:var(--ax-text-color)}.axp-clock-calendar-date-display i{font-size:.85rem;opacity:.7}\n"] }]
|
865
|
-
}] });
|
866
|
-
|
867
|
-
var clockCalendarWidget_component = /*#__PURE__*/Object.freeze({
|
868
|
-
__proto__: null,
|
869
|
-
AXPClockCalendarWidgetViewComponent: AXPClockCalendarWidgetViewComponent
|
870
|
-
});
|
871
|
-
|
872
|
-
/**
|
873
|
-
* ACoreX Clock Calendar Widget Types
|
874
|
-
* Contains all types and interfaces for the Clock Calendar widget
|
875
|
-
*/
|
876
|
-
/**
|
877
|
-
* Common timezone options for the widget configuration
|
878
|
-
*/
|
879
|
-
const AXP_TIMEZONE_OPTIONS = [
|
880
|
-
{ id: 'local', title: 'Local Time' },
|
881
|
-
{ id: 'UTC+0', title: 'UTC (GMT)' },
|
882
|
-
{ id: 'UTC+1', title: 'Central European Time (UTC+1)' },
|
883
|
-
{ id: 'UTC+2', title: 'Eastern European Time (UTC+2)' },
|
884
|
-
{ id: 'UTC+3', title: 'Moscow Time (UTC+3)' },
|
885
|
-
{ id: 'UTC+4', title: 'Gulf Time (UTC+4)' },
|
886
|
-
{ id: 'UTC+5:30', title: 'Indian Time (UTC+5:30)' },
|
887
|
-
{ id: 'UTC+8', title: 'China Time (UTC+8)' },
|
888
|
-
{ id: 'UTC+9', title: 'Japan Time (UTC+9)' },
|
889
|
-
{ id: 'UTC+10', title: 'Australian Eastern Time (UTC+10)' },
|
890
|
-
{ id: 'UTC-5', title: 'Eastern Time (UTC-5)' },
|
891
|
-
{ id: 'UTC-6', title: 'Central Time (UTC-6)' },
|
892
|
-
{ id: 'UTC-7', title: 'Mountain Time (UTC-7)' },
|
893
|
-
{ id: 'UTC-8', title: 'Pacific Time (UTC-8)' },
|
894
|
-
];
|
895
|
-
/**
|
896
|
-
* Common date format options for the widget configuration
|
897
|
-
*/
|
898
|
-
const AXP_DATE_FORMAT_OPTIONS = [
|
899
|
-
{ id: 'dd MMM yyyy', title: '31 Dec 2023' },
|
900
|
-
{ id: 'MMM dd, yyyy', title: 'Dec 31, 2023' },
|
901
|
-
{ id: 'dd/MM/yyyy', title: '31/12/2023' },
|
902
|
-
{ id: 'MM/dd/yyyy', title: '12/31/2023' },
|
903
|
-
];
|
904
|
-
|
905
|
-
const AXPClockCalendarWidget = {
|
906
|
-
name: 'clock-calendar',
|
907
|
-
title: 'Clock & Calendar',
|
908
|
-
categories: [AXP_WIDGETS_UTILITY_CATEGORY],
|
909
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
910
|
-
type: 'dashboard',
|
911
|
-
icon: 'fa-light fa-clock',
|
912
|
-
properties: [
|
913
|
-
// ====== Title ======
|
914
|
-
{
|
915
|
-
name: 'title',
|
916
|
-
title: 'Chart Title',
|
917
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
918
|
-
schema: {
|
919
|
-
defaultValue: '',
|
920
|
-
dataType: 'string',
|
921
|
-
interface: {
|
922
|
-
name: 'title',
|
923
|
-
path: 'options.title',
|
924
|
-
type: AXPWidgetsCatalog.text,
|
925
|
-
options: {
|
926
|
-
placeholder: 'Enter chart title',
|
927
|
-
},
|
928
|
-
},
|
929
|
-
},
|
930
|
-
visible: true,
|
931
|
-
},
|
932
|
-
// ====== Display Settings ======
|
933
|
-
{
|
934
|
-
name: 'displayLayout',
|
935
|
-
title: 'Display Layout',
|
936
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
937
|
-
schema: {
|
938
|
-
dataType: 'string',
|
939
|
-
defaultValue: 'both',
|
940
|
-
interface: {
|
941
|
-
name: 'displayLayout',
|
942
|
-
path: 'options.displayLayout',
|
943
|
-
type: AXPWidgetsCatalog.select,
|
944
|
-
options: {
|
945
|
-
dataSource: [
|
946
|
-
{ id: 'both', title: 'Digital & Analog' },
|
947
|
-
{ id: 'digital', title: 'Digital Only' },
|
948
|
-
{ id: 'analog', title: 'Analog Only' },
|
949
|
-
],
|
950
|
-
},
|
951
|
-
},
|
952
|
-
},
|
953
|
-
visible: true,
|
954
|
-
},
|
955
|
-
{
|
956
|
-
name: 'showDate',
|
957
|
-
title: 'Show Date',
|
958
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
959
|
-
schema: {
|
960
|
-
defaultValue: true,
|
961
|
-
dataType: 'boolean',
|
962
|
-
interface: {
|
963
|
-
name: 'showDate',
|
964
|
-
path: 'options.showDate',
|
965
|
-
type: AXPWidgetsCatalog.toggle,
|
966
|
-
},
|
967
|
-
},
|
968
|
-
visible: true,
|
969
|
-
},
|
970
|
-
{
|
971
|
-
name: 'showDayOfWeek',
|
972
|
-
title: 'Show Day of Week',
|
973
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
974
|
-
schema: {
|
975
|
-
defaultValue: true,
|
976
|
-
dataType: 'boolean',
|
977
|
-
interface: {
|
978
|
-
name: 'showDayOfWeek',
|
979
|
-
path: 'options.showDayOfWeek',
|
980
|
-
type: AXPWidgetsCatalog.toggle,
|
981
|
-
},
|
982
|
-
},
|
983
|
-
visible: true,
|
984
|
-
},
|
985
|
-
// ====== Time Format Settings ======
|
986
|
-
{
|
987
|
-
name: 'use24Hour',
|
988
|
-
title: 'Use 24 Hour Format',
|
989
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
990
|
-
schema: {
|
991
|
-
defaultValue: false,
|
992
|
-
dataType: 'boolean',
|
993
|
-
interface: {
|
994
|
-
name: 'use24Hour',
|
995
|
-
path: 'options.use24Hour',
|
996
|
-
type: AXPWidgetsCatalog.toggle,
|
997
|
-
},
|
998
|
-
},
|
999
|
-
visible: true,
|
1000
|
-
},
|
1001
|
-
{
|
1002
|
-
name: 'showSeconds',
|
1003
|
-
title: 'Show Seconds',
|
1004
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
1005
|
-
schema: {
|
1006
|
-
defaultValue: true,
|
1007
|
-
dataType: 'boolean',
|
1008
|
-
interface: {
|
1009
|
-
name: 'showSeconds',
|
1010
|
-
path: 'options.showSeconds',
|
1011
|
-
type: AXPWidgetsCatalog.toggle,
|
1012
|
-
},
|
1013
|
-
},
|
1014
|
-
visible: true,
|
1015
|
-
},
|
1016
|
-
// {
|
1017
|
-
// name: 'showHourMarkers',
|
1018
|
-
// title: 'Show Hour Markers',
|
1019
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1020
|
-
// schema: {
|
1021
|
-
// defaultValue: true,
|
1022
|
-
// dataType: 'boolean',
|
1023
|
-
// interface: {
|
1024
|
-
// name: 'showHourMarkers',
|
1025
|
-
// path: 'options.showHourMarkers',
|
1026
|
-
// type: AXPWidgetsCatalog.toggle,
|
1027
|
-
// },
|
1028
|
-
// },
|
1029
|
-
// visible: true,
|
1030
|
-
// },
|
1031
|
-
{
|
1032
|
-
name: 'dateFormat',
|
1033
|
-
title: 'Date Format',
|
1034
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
1035
|
-
schema: {
|
1036
|
-
defaultValue: 'dd MMM yyyy',
|
1037
|
-
dataType: 'string',
|
1038
|
-
interface: {
|
1039
|
-
name: 'dateFormat',
|
1040
|
-
path: 'options.dateFormat',
|
1041
|
-
type: AXPWidgetsCatalog.select,
|
1042
|
-
options: {
|
1043
|
-
dataSource: AXP_DATE_FORMAT_OPTIONS,
|
1044
|
-
},
|
1045
|
-
},
|
1046
|
-
},
|
1047
|
-
visible: true,
|
1048
|
-
},
|
1049
|
-
{
|
1050
|
-
name: 'timezone',
|
1051
|
-
title: 'Timezone',
|
1052
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
1053
|
-
schema: {
|
1054
|
-
defaultValue: 'local',
|
1055
|
-
dataType: 'string',
|
1056
|
-
interface: {
|
1057
|
-
name: 'timezone',
|
1058
|
-
path: 'options.timezone',
|
1059
|
-
type: AXPWidgetsCatalog.select,
|
1060
|
-
options: {
|
1061
|
-
dataSource: AXP_TIMEZONE_OPTIONS,
|
1062
|
-
},
|
1063
|
-
},
|
1064
|
-
},
|
1065
|
-
visible: true,
|
1066
|
-
},
|
1067
|
-
],
|
1068
|
-
components: {
|
1069
|
-
view: {
|
1070
|
-
component: () => Promise.resolve().then(function () { return clockCalendarWidget_component; }).then((m) => m.AXPClockCalendarWidgetViewComponent),
|
1071
|
-
},
|
1072
|
-
},
|
1073
|
-
meta: {
|
1074
|
-
dimensions: {
|
1075
|
-
width: 2,
|
1076
|
-
height: 5,
|
1077
|
-
minWidth: 2,
|
1078
|
-
minHeight: 2,
|
1079
|
-
maxWidth: 3,
|
1080
|
-
maxHeight: 6,
|
1081
|
-
},
|
1082
|
-
},
|
1083
|
-
};
|
1084
|
-
|
1085
|
-
/**
|
1086
|
-
* Donut Chart Widget Component
|
1087
|
-
* Displays data in a circular donut chart with interactive segments
|
1088
|
-
*/
|
1089
|
-
class AXPDonutChartWidgetViewComponent extends AXPValueWidgetComponent {
|
1090
|
-
constructor() {
|
1091
|
-
super(...arguments);
|
1092
|
-
this.donutChartData = computed(() => this.getValue());
|
1093
|
-
this.donutChartOptions = computed(() => this.options());
|
1094
|
-
}
|
1095
|
-
handleDonutChartSegmentClick(event) {
|
1096
|
-
//console.log(event);
|
1097
|
-
}
|
1098
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDonutChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
1099
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", 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 }); }
|
1100
|
-
}
|
1101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDonutChartWidgetViewComponent, decorators: [{
|
1102
|
-
type: Component,
|
1103
|
-
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"] }]
|
1104
|
-
}] });
|
1105
|
-
|
1106
|
-
var donutChartWidget_component = /*#__PURE__*/Object.freeze({
|
1107
|
-
__proto__: null,
|
1108
|
-
AXPDonutChartWidgetViewComponent: AXPDonutChartWidgetViewComponent
|
1109
|
-
});
|
1110
|
-
|
1111
|
-
const AXPDonutChartWidget = {
|
1112
|
-
name: 'donut-chart',
|
1113
|
-
title: 'Donut Chart Widget',
|
1114
|
-
categories: AXP_WIDGETS_CHART_CATEGORY,
|
1115
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
1116
|
-
type: 'dashboard',
|
1117
|
-
icon: 'fa-light fa-donut',
|
1118
|
-
properties: [
|
1119
|
-
cloneProperty(AXP_NAME_PROPERTY, { visible: false }),
|
1120
|
-
cloneProperty(AXP_DATA_PATH_PROPERTY, { visible: false }),
|
1121
|
-
// ====== Chart Title ======
|
1122
|
-
{
|
1123
|
-
name: 'title',
|
1124
|
-
title: 'Chart Title',
|
1125
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1126
|
-
schema: {
|
1127
|
-
defaultValue: '',
|
1128
|
-
dataType: 'string',
|
1129
|
-
interface: {
|
1130
|
-
name: 'title',
|
1131
|
-
path: 'options.title',
|
1132
|
-
type: AXPWidgetsCatalog.text,
|
1133
|
-
options: {
|
1134
|
-
placeholder: 'Enter chart title',
|
1135
|
-
},
|
1136
|
-
},
|
1137
|
-
},
|
1138
|
-
visible: true,
|
1139
|
-
},
|
1140
|
-
// ====== Size & Layout ======
|
1141
|
-
{
|
1142
|
-
name: 'width',
|
1143
|
-
title: 'Width',
|
1144
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
1145
|
-
schema: {
|
1146
|
-
defaultValue: 300,
|
1147
|
-
dataType: 'number',
|
1148
|
-
interface: {
|
1149
|
-
name: 'width',
|
1150
|
-
path: 'options.width',
|
1151
|
-
type: AXPWidgetsCatalog.number,
|
1152
|
-
options: {
|
1153
|
-
minValue: 200,
|
1154
|
-
maxValue: 1200,
|
1155
|
-
},
|
1156
|
-
},
|
1157
|
-
},
|
1158
|
-
visible: true,
|
1159
|
-
},
|
1160
|
-
{
|
1161
|
-
name: 'height',
|
1162
|
-
title: 'Height',
|
1163
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
1164
|
-
schema: {
|
1165
|
-
defaultValue: 300,
|
1166
|
-
dataType: 'number',
|
1167
|
-
interface: {
|
1168
|
-
name: 'height',
|
1169
|
-
path: 'options.height',
|
1170
|
-
type: AXPWidgetsCatalog.number,
|
1171
|
-
options: {
|
1172
|
-
minValue: 200,
|
1173
|
-
maxValue: 800,
|
1174
|
-
},
|
1175
|
-
},
|
1176
|
-
},
|
1177
|
-
visible: true,
|
1178
|
-
},
|
1179
|
-
// ====== Donut Appearance ======
|
1180
|
-
{
|
1181
|
-
name: 'donutWidth',
|
1182
|
-
title: 'Donut Width',
|
1183
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1184
|
-
schema: {
|
1185
|
-
defaultValue: 35,
|
1186
|
-
dataType: 'number',
|
1187
|
-
interface: {
|
1188
|
-
name: 'donutWidth',
|
1189
|
-
path: 'options.donutWidth',
|
1190
|
-
type: AXPWidgetsCatalog.number,
|
1191
|
-
options: {
|
1192
|
-
placeholder: '10-80',
|
1193
|
-
minValue: 10,
|
1194
|
-
maxValue: 80,
|
1195
|
-
},
|
1196
|
-
},
|
1197
|
-
},
|
1198
|
-
visible: true,
|
1199
|
-
},
|
1200
|
-
{
|
1201
|
-
name: 'cornerRadius',
|
1202
|
-
title: 'Corner Radius',
|
1203
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1204
|
-
schema: {
|
1205
|
-
defaultValue: 4,
|
1206
|
-
dataType: 'number',
|
1207
|
-
interface: {
|
1208
|
-
name: 'cornerRadius',
|
1209
|
-
path: 'options.cornerRadius',
|
1210
|
-
type: AXPWidgetsCatalog.number,
|
1211
|
-
options: {
|
1212
|
-
placeholder: '0-20',
|
1213
|
-
minValue: 0,
|
1214
|
-
maxValue: 20,
|
1215
|
-
},
|
1216
|
-
},
|
1217
|
-
},
|
1218
|
-
visible: true,
|
1219
|
-
},
|
1220
|
-
// ====== Legend ======
|
1221
|
-
// {
|
1222
|
-
// name: 'showLegend',
|
1223
|
-
// title: 'Show Legend',
|
1224
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1225
|
-
// schema: {
|
1226
|
-
// defaultValue: true,
|
1227
|
-
// dataType: 'boolean',
|
1228
|
-
// interface: {
|
1229
|
-
// name: 'showLegend',
|
1230
|
-
// path: 'options.showLegend',
|
1231
|
-
// type: AXPWidgetsCatalog.toggle,
|
1232
|
-
// },
|
1233
|
-
// },
|
1234
|
-
// visible: true,
|
1235
|
-
// },
|
1236
|
-
// {
|
1237
|
-
// name: 'legendPosition',
|
1238
|
-
// title: 'Legend Position',
|
1239
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1240
|
-
// schema: {
|
1241
|
-
// defaultValue: 'right',
|
1242
|
-
// dataType: 'string',
|
1243
|
-
// interface: {
|
1244
|
-
// name: 'legendPosition',
|
1245
|
-
// path: 'options.legendPosition',
|
1246
|
-
// type: AXPWidgetsCatalog.select,
|
1247
|
-
// options: {
|
1248
|
-
// dataSource: ['right', 'bottom'],
|
1249
|
-
// },
|
1250
|
-
// },
|
1251
|
-
// },
|
1252
|
-
// visible: true,
|
1253
|
-
// },
|
1254
|
-
// ====== Tooltip ======
|
1255
|
-
{
|
1256
|
-
name: 'showTooltip',
|
1257
|
-
title: 'Show Tooltip',
|
1258
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1259
|
-
schema: {
|
1260
|
-
defaultValue: true,
|
1261
|
-
dataType: 'boolean',
|
1262
|
-
interface: {
|
1263
|
-
name: 'showTooltip',
|
1264
|
-
path: 'options.showTooltip',
|
1265
|
-
type: AXPWidgetsCatalog.toggle,
|
1266
|
-
},
|
1267
|
-
},
|
1268
|
-
visible: true,
|
1269
|
-
},
|
1270
|
-
// ====== Animation Settings ======
|
1271
|
-
{
|
1272
|
-
name: 'animationEasing',
|
1273
|
-
title: 'Animation Easing',
|
1274
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1275
|
-
schema: {
|
1276
|
-
defaultValue: 'cubic-out',
|
1277
|
-
dataType: 'string',
|
1278
|
-
interface: {
|
1279
|
-
name: 'animationEasing',
|
1280
|
-
path: 'options.animationEasing',
|
1281
|
-
type: AXPWidgetsCatalog.select,
|
1282
|
-
options: {
|
1283
|
-
dataSource: [
|
1284
|
-
{ value: 'linear', text: 'Linear' },
|
1285
|
-
{ value: 'ease', text: 'Ease' },
|
1286
|
-
{ value: 'ease-in', text: 'Ease In' },
|
1287
|
-
{ value: 'ease-out', text: 'Ease Out' },
|
1288
|
-
{ value: 'ease-in-out', text: 'Ease In Out' },
|
1289
|
-
{ value: 'cubic', text: 'Cubic' },
|
1290
|
-
{ value: 'cubic-in', text: 'Cubic In' },
|
1291
|
-
{ value: 'cubic-out', text: 'Cubic Out' },
|
1292
|
-
{ value: 'cubic-in-out', text: 'Cubic In Out' },
|
1293
|
-
],
|
1294
|
-
textField: 'text',
|
1295
|
-
valueField: 'value',
|
1296
|
-
},
|
1297
|
-
},
|
1298
|
-
},
|
1299
|
-
visible: true,
|
1300
|
-
},
|
1301
|
-
{
|
1302
|
-
name: 'animationDuration',
|
1303
|
-
title: 'Animation Duration',
|
1304
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1305
|
-
schema: {
|
1306
|
-
defaultValue: 800,
|
1307
|
-
dataType: 'number',
|
1308
|
-
interface: {
|
1309
|
-
name: 'animationDuration',
|
1310
|
-
path: 'options.animationDuration',
|
1311
|
-
type: AXPWidgetsCatalog.number,
|
1312
|
-
options: {
|
1313
|
-
placeholder: '0-2000',
|
1314
|
-
minValue: 0,
|
1315
|
-
maxValue: 2000,
|
1316
|
-
},
|
1317
|
-
},
|
1318
|
-
},
|
1319
|
-
visible: true,
|
1320
|
-
},
|
1321
|
-
],
|
1322
|
-
components: {
|
1323
|
-
view: {
|
1324
|
-
component: () => Promise.resolve().then(function () { return donutChartWidget_component; }).then((c) => c.AXPDonutChartWidgetViewComponent),
|
1325
|
-
},
|
1326
|
-
},
|
1327
|
-
meta: {
|
1328
|
-
dimensions: {
|
1329
|
-
width: 4,
|
1330
|
-
height: 4,
|
1331
|
-
minWidth: 2,
|
1332
|
-
minHeight: 2,
|
1333
|
-
maxWidth: 5,
|
1334
|
-
maxHeight: 6,
|
1335
|
-
},
|
1336
|
-
},
|
1337
|
-
};
|
1338
|
-
|
1339
|
-
/**
|
1340
|
-
* Gauge Chart Widget Component
|
1341
|
-
* Renders a semi-circular gauge chart with animated needle and thresholds
|
1342
|
-
*/
|
1343
|
-
class AXPGaugeChartWidgetViewComponent extends AXPValueWidgetComponent {
|
1344
|
-
constructor() {
|
1345
|
-
super(...arguments);
|
1346
|
-
this.gaugeChartValue = computed(() => this.getValue());
|
1347
|
-
this.gaugeChartOptions = computed(() => this.options());
|
1348
|
-
}
|
1349
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
1350
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", 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 }); }
|
1351
|
-
}
|
1352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, decorators: [{
|
1353
|
-
type: Component,
|
1354
|
-
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"] }]
|
1355
|
-
}] });
|
1356
|
-
|
1357
|
-
var gaugeChartWidget_component = /*#__PURE__*/Object.freeze({
|
1358
|
-
__proto__: null,
|
1359
|
-
AXPGaugeChartWidgetViewComponent: AXPGaugeChartWidgetViewComponent
|
1360
|
-
});
|
1361
|
-
|
1362
|
-
const AXPGaugeChartWidget = {
|
1363
|
-
name: 'gauge-chart',
|
1364
|
-
title: 'Gauge Chart Widget',
|
1365
|
-
categories: [AXP_WIDGETS_CHART_CATEGORY],
|
1366
|
-
type: 'dashboard',
|
1367
|
-
icon: 'fa-light fa-gauge',
|
1368
|
-
properties: [
|
1369
|
-
cloneProperty(AXP_NAME_PROPERTY, { visible: false }),
|
1370
|
-
cloneProperty(AXP_DATA_PATH_PROPERTY, { visible: false }),
|
1371
|
-
// ====== Chart Title ======
|
1372
|
-
{
|
1373
|
-
name: 'title',
|
1374
|
-
title: 'Chart Title',
|
1375
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1376
|
-
schema: {
|
1377
|
-
defaultValue: '',
|
1378
|
-
dataType: 'string',
|
1379
|
-
interface: {
|
1380
|
-
name: 'title',
|
1381
|
-
path: 'options.title',
|
1382
|
-
type: AXPWidgetsCatalog.text,
|
1383
|
-
options: {
|
1384
|
-
placeholder: 'Enter chart title',
|
1385
|
-
},
|
1386
|
-
},
|
1387
|
-
},
|
1388
|
-
visible: true,
|
1389
|
-
},
|
1390
|
-
// ====== Layout & Dimensions ======
|
1391
|
-
{
|
1392
|
-
name: 'width',
|
1393
|
-
title: 'Width',
|
1394
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
1395
|
-
schema: {
|
1396
|
-
defaultValue: null,
|
1397
|
-
dataType: 'number',
|
1398
|
-
interface: {
|
1399
|
-
name: 'width',
|
1400
|
-
path: 'options.width',
|
1401
|
-
type: AXPWidgetsCatalog.number,
|
1402
|
-
options: {
|
1403
|
-
placeholder: '1-1200',
|
1404
|
-
minValue: 1,
|
1405
|
-
maxValue: 1200,
|
1406
|
-
},
|
1407
|
-
},
|
1408
|
-
},
|
1409
|
-
visible: true,
|
1410
|
-
},
|
1411
|
-
{
|
1412
|
-
name: 'height',
|
1413
|
-
title: 'Height',
|
1414
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
1415
|
-
schema: {
|
1416
|
-
defaultValue: 300,
|
1417
|
-
dataType: 'number',
|
1418
|
-
interface: {
|
1419
|
-
name: 'height',
|
1420
|
-
path: 'options.height',
|
1421
|
-
type: AXPWidgetsCatalog.number,
|
1422
|
-
options: {
|
1423
|
-
placeholder: '1-800',
|
1424
|
-
minValue: 1,
|
1425
|
-
maxValue: 800,
|
1426
|
-
},
|
1427
|
-
},
|
1428
|
-
},
|
1429
|
-
visible: true,
|
1430
|
-
},
|
1431
|
-
// ====== Gauge Configuration ======
|
1432
|
-
{
|
1433
|
-
name: 'minValue',
|
1434
|
-
title: 'Minimum Value',
|
1435
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1436
|
-
schema: {
|
1437
|
-
defaultValue: 0,
|
1438
|
-
dataType: 'number',
|
1439
|
-
interface: {
|
1440
|
-
name: 'minValue',
|
1441
|
-
path: 'options.minValue',
|
1442
|
-
type: AXPWidgetsCatalog.number,
|
1443
|
-
},
|
1444
|
-
},
|
1445
|
-
visible: true,
|
1446
|
-
},
|
1447
|
-
{
|
1448
|
-
name: 'maxValue',
|
1449
|
-
title: 'Maximum Value',
|
1450
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1451
|
-
schema: {
|
1452
|
-
defaultValue: 100,
|
1453
|
-
dataType: 'number',
|
1454
|
-
interface: {
|
1455
|
-
name: 'maxValue',
|
1456
|
-
path: 'options.maxValue',
|
1457
|
-
type: AXPWidgetsCatalog.number,
|
1458
|
-
},
|
1459
|
-
},
|
1460
|
-
visible: true,
|
1461
|
-
},
|
1462
|
-
// ====== Gauge Appearance ======
|
1463
|
-
{
|
1464
|
-
name: 'gaugeWidth',
|
1465
|
-
title: 'Gauge Width',
|
1466
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1467
|
-
schema: {
|
1468
|
-
defaultValue: 30,
|
1469
|
-
dataType: 'number',
|
1470
|
-
interface: {
|
1471
|
-
name: 'gaugeWidth',
|
1472
|
-
path: 'options.gaugeWidth',
|
1473
|
-
type: AXPWidgetsCatalog.number,
|
1474
|
-
options: {
|
1475
|
-
placeholder: '1-100',
|
1476
|
-
minValue: 1,
|
1477
|
-
maxValue: 100,
|
1478
|
-
},
|
1479
|
-
},
|
1480
|
-
},
|
1481
|
-
visible: true,
|
1482
|
-
},
|
1483
|
-
{
|
1484
|
-
name: 'cornerRadius',
|
1485
|
-
title: 'Corner Radius',
|
1486
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1487
|
-
schema: {
|
1488
|
-
defaultValue: 4,
|
1489
|
-
dataType: 'number',
|
1490
|
-
interface: {
|
1491
|
-
name: 'cornerRadius',
|
1492
|
-
path: 'options.cornerRadius',
|
1493
|
-
type: AXPWidgetsCatalog.number,
|
1494
|
-
options: {
|
1495
|
-
placeholder: '1-20',
|
1496
|
-
minValue: 0,
|
1497
|
-
maxValue: 20,
|
1498
|
-
},
|
1499
|
-
},
|
1500
|
-
},
|
1501
|
-
visible: true,
|
1502
|
-
},
|
1503
|
-
// ====== Label Display ======
|
1504
|
-
{
|
1505
|
-
name: 'label',
|
1506
|
-
title: 'Label Text',
|
1507
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1508
|
-
schema: {
|
1509
|
-
defaultValue: '',
|
1510
|
-
dataType: 'string',
|
1511
|
-
interface: {
|
1512
|
-
name: 'label',
|
1513
|
-
path: 'options.label',
|
1514
|
-
type: AXPWidgetsCatalog.text,
|
1515
|
-
},
|
1516
|
-
},
|
1517
|
-
visible: true,
|
1518
|
-
},
|
1519
|
-
// ====== Animation Settings ======
|
1520
|
-
{
|
1521
|
-
name: 'animationEasing',
|
1522
|
-
title: 'Animation Easing',
|
1523
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1524
|
-
schema: {
|
1525
|
-
defaultValue: 'cubic-out',
|
1526
|
-
dataType: 'string',
|
1527
|
-
interface: {
|
1528
|
-
name: 'animationEasing',
|
1529
|
-
path: 'options.animationEasing',
|
1530
|
-
type: AXPWidgetsCatalog.select,
|
1531
|
-
options: {
|
1532
|
-
dataSource: [
|
1533
|
-
{ value: 'linear', text: 'Linear' },
|
1534
|
-
{ value: 'ease', text: 'Ease' },
|
1535
|
-
{ value: 'ease-in', text: 'Ease In' },
|
1536
|
-
{ value: 'ease-out', text: 'Ease Out' },
|
1537
|
-
{ value: 'ease-in-out', text: 'Ease In Out' },
|
1538
|
-
{ value: 'cubic', text: 'Cubic' },
|
1539
|
-
{ value: 'cubic-in', text: 'Cubic In' },
|
1540
|
-
{ value: 'cubic-out', text: 'Cubic Out' },
|
1541
|
-
{ value: 'cubic-in-out', text: 'Cubic In Out' },
|
1542
|
-
],
|
1543
|
-
textField: 'text',
|
1544
|
-
valueField: 'value',
|
1545
|
-
},
|
1546
|
-
},
|
1547
|
-
},
|
1548
|
-
visible: true,
|
1549
|
-
},
|
1550
|
-
{
|
1551
|
-
name: 'animationDuration',
|
1552
|
-
title: 'Animation Duration',
|
1553
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1554
|
-
schema: {
|
1555
|
-
defaultValue: 800,
|
1556
|
-
dataType: 'number',
|
1557
|
-
interface: {
|
1558
|
-
name: 'animationDuration',
|
1559
|
-
path: 'options.animationDuration',
|
1560
|
-
type: AXPWidgetsCatalog.number,
|
1561
|
-
options: {
|
1562
|
-
placeholder: '0-2000',
|
1563
|
-
minValue: 0,
|
1564
|
-
maxValue: 2000,
|
1565
|
-
},
|
1566
|
-
},
|
1567
|
-
},
|
1568
|
-
visible: true,
|
1569
|
-
},
|
1570
|
-
],
|
1571
|
-
components: {
|
1572
|
-
view: {
|
1573
|
-
component: () => Promise.resolve().then(function () { return gaugeChartWidget_component; }).then((c) => c.AXPGaugeChartWidgetViewComponent),
|
1574
|
-
},
|
1575
|
-
},
|
1576
|
-
meta: {
|
1577
|
-
dimensions: {
|
1578
|
-
width: 3,
|
1579
|
-
height: 4,
|
1580
|
-
minWidth: 2,
|
1581
|
-
minHeight: 2,
|
1582
|
-
maxWidth: 4,
|
1583
|
-
maxHeight: 5,
|
1584
|
-
},
|
1585
|
-
},
|
1586
|
-
};
|
1587
|
-
|
1588
|
-
/**
|
1589
|
-
* Line Chart Widget Component
|
1590
|
-
* Renders data as lines with interactive hover effects and animations
|
1591
|
-
*/
|
1592
|
-
class AXPLineChartWidgetViewComponent extends AXPValueWidgetComponent {
|
1593
|
-
constructor() {
|
1594
|
-
super(...arguments);
|
1595
|
-
this.lineChartData = computed(() => this.getValue());
|
1596
|
-
this.lineChartOptions = computed(() => this.options());
|
1597
|
-
}
|
1598
|
-
handleLineChartPointClick(event) {
|
1599
|
-
//console.log(event);
|
1600
|
-
}
|
1601
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLineChartWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
1602
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", 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 }); }
|
1603
|
-
}
|
1604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLineChartWidgetViewComponent, decorators: [{
|
1605
|
-
type: Component,
|
1606
|
-
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"] }]
|
1607
|
-
}] });
|
1608
|
-
|
1609
|
-
var lineChartWidget_component = /*#__PURE__*/Object.freeze({
|
1610
|
-
__proto__: null,
|
1611
|
-
AXPLineChartWidgetViewComponent: AXPLineChartWidgetViewComponent
|
1612
|
-
});
|
1613
|
-
|
1614
|
-
const AXPLineChartWidget = {
|
1615
|
-
name: 'line-chart',
|
1616
|
-
title: 'Line Chart Widget',
|
1617
|
-
categories: [AXP_WIDGETS_CHART_CATEGORY],
|
1618
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
1619
|
-
type: 'dashboard',
|
1620
|
-
icon: 'fa-light fa-chart-line',
|
1621
|
-
properties: [
|
1622
|
-
cloneProperty(AXP_NAME_PROPERTY, { visible: false }),
|
1623
|
-
cloneProperty(AXP_DATA_PATH_PROPERTY, { visible: false }),
|
1624
|
-
// ====== Chart Title ======
|
1625
|
-
{
|
1626
|
-
name: 'title',
|
1627
|
-
title: 'Chart Title',
|
1628
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1629
|
-
schema: {
|
1630
|
-
defaultValue: '',
|
1631
|
-
dataType: 'string',
|
1632
|
-
interface: {
|
1633
|
-
name: 'title',
|
1634
|
-
path: 'options.title',
|
1635
|
-
type: AXPWidgetsCatalog.text,
|
1636
|
-
options: {
|
1637
|
-
placeholder: 'Enter chart title',
|
1638
|
-
},
|
1639
|
-
},
|
1640
|
-
},
|
1641
|
-
visible: true,
|
1642
|
-
},
|
1643
|
-
// ====== Layout & Dimensions ======
|
1644
|
-
{
|
1645
|
-
name: 'width',
|
1646
|
-
title: 'Width',
|
1647
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
1648
|
-
schema: {
|
1649
|
-
defaultValue: null,
|
1650
|
-
dataType: 'number',
|
1651
|
-
interface: {
|
1652
|
-
name: 'width',
|
1653
|
-
path: 'options.width',
|
1654
|
-
type: AXPWidgetsCatalog.number,
|
1655
|
-
options: {
|
1656
|
-
minValue: 0,
|
1657
|
-
maxValue: 1200,
|
1658
|
-
},
|
1659
|
-
},
|
1660
|
-
},
|
1661
|
-
visible: true,
|
1662
|
-
},
|
1663
|
-
{
|
1664
|
-
name: 'height',
|
1665
|
-
title: 'Height',
|
1666
|
-
group: AXP_STYLING_PROPERTY_GROUP,
|
1667
|
-
schema: {
|
1668
|
-
defaultValue: 300,
|
1669
|
-
dataType: 'number',
|
1670
|
-
interface: {
|
1671
|
-
name: 'height',
|
1672
|
-
path: 'options.height',
|
1673
|
-
type: AXPWidgetsCatalog.number,
|
1674
|
-
options: {
|
1675
|
-
minValue: 0,
|
1676
|
-
maxValue: 800,
|
1677
|
-
},
|
1678
|
-
},
|
1679
|
-
},
|
1680
|
-
visible: true,
|
1681
|
-
},
|
1682
|
-
// ====== Axis Settings ======
|
1683
|
-
{
|
1684
|
-
name: 'showXAxis',
|
1685
|
-
title: 'Show X Axis',
|
1686
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1687
|
-
schema: {
|
1688
|
-
defaultValue: true,
|
1689
|
-
dataType: 'boolean',
|
1690
|
-
interface: {
|
1691
|
-
name: 'showXAxis',
|
1692
|
-
path: 'options.showXAxis',
|
1693
|
-
type: AXPWidgetsCatalog.toggle,
|
1694
|
-
},
|
1695
|
-
},
|
1696
|
-
visible: true,
|
1697
|
-
},
|
1698
|
-
{
|
1699
|
-
name: 'xAxisLabel',
|
1700
|
-
title: 'X Axis Label',
|
1701
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1702
|
-
schema: {
|
1703
|
-
defaultValue: '',
|
1704
|
-
dataType: 'string',
|
1705
|
-
interface: {
|
1706
|
-
name: 'xAxisLabel',
|
1707
|
-
path: 'options.xAxisLabel',
|
1708
|
-
type: AXPWidgetsCatalog.text,
|
1709
|
-
},
|
1710
|
-
},
|
1711
|
-
visible: true,
|
1712
|
-
},
|
1713
|
-
{
|
1714
|
-
name: 'showYAxis',
|
1715
|
-
title: 'Show Y Axis',
|
1716
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1717
|
-
schema: {
|
1718
|
-
defaultValue: true,
|
1719
|
-
dataType: 'boolean',
|
1720
|
-
interface: {
|
1721
|
-
name: 'showYAxis',
|
1722
|
-
path: 'options.showYAxis',
|
1723
|
-
type: AXPWidgetsCatalog.toggle,
|
1724
|
-
},
|
1725
|
-
},
|
1726
|
-
visible: true,
|
1727
|
-
},
|
1728
|
-
{
|
1729
|
-
name: 'yAxisLabel',
|
1730
|
-
title: 'Y Axis Label',
|
1731
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1732
|
-
schema: {
|
1733
|
-
defaultValue: '',
|
1734
|
-
dataType: 'string',
|
1735
|
-
interface: {
|
1736
|
-
name: 'yAxisLabel',
|
1737
|
-
path: 'options.yAxisLabel',
|
1738
|
-
type: AXPWidgetsCatalog.text,
|
1739
|
-
},
|
1740
|
-
},
|
1741
|
-
visible: true,
|
1742
|
-
},
|
1743
|
-
{
|
1744
|
-
name: 'yAxisStartsAtZero',
|
1745
|
-
title: 'Y Axis Starts At Zero',
|
1746
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1747
|
-
schema: {
|
1748
|
-
defaultValue: true,
|
1749
|
-
dataType: 'boolean',
|
1750
|
-
interface: {
|
1751
|
-
name: 'yAxisStartsAtZero',
|
1752
|
-
path: 'options.yAxisStartsAtZero',
|
1753
|
-
type: AXPWidgetsCatalog.toggle,
|
1754
|
-
},
|
1755
|
-
},
|
1756
|
-
visible: true,
|
1757
|
-
},
|
1758
|
-
{
|
1759
|
-
name: 'axisPadding',
|
1760
|
-
title: 'Axis Padding',
|
1761
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1762
|
-
schema: {
|
1763
|
-
defaultValue: 5,
|
1764
|
-
dataType: 'number',
|
1765
|
-
interface: {
|
1766
|
-
name: 'axisPadding',
|
1767
|
-
path: 'options.axisPadding',
|
1768
|
-
type: AXPWidgetsCatalog.number,
|
1769
|
-
options: {
|
1770
|
-
minValue: 0,
|
1771
|
-
maxValue: 50,
|
1772
|
-
},
|
1773
|
-
},
|
1774
|
-
},
|
1775
|
-
visible: true,
|
1776
|
-
},
|
1777
|
-
{
|
1778
|
-
name: 'showGrid',
|
1779
|
-
title: 'Show Grid Lines',
|
1780
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1781
|
-
schema: {
|
1782
|
-
defaultValue: true,
|
1783
|
-
dataType: 'boolean',
|
1784
|
-
interface: {
|
1785
|
-
name: 'showGrid',
|
1786
|
-
path: 'options.showGrid',
|
1787
|
-
type: AXPWidgetsCatalog.toggle,
|
1788
|
-
},
|
1789
|
-
},
|
1790
|
-
visible: true,
|
1791
|
-
},
|
1792
|
-
{
|
1793
|
-
name: 'showVerticalGrid',
|
1794
|
-
title: 'Show Vertical Grid',
|
1795
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1796
|
-
schema: {
|
1797
|
-
defaultValue: true,
|
1798
|
-
dataType: 'boolean',
|
1799
|
-
interface: {
|
1800
|
-
name: 'showVerticalGrid',
|
1801
|
-
path: 'options.showVerticalGrid',
|
1802
|
-
type: AXPWidgetsCatalog.toggle,
|
1803
|
-
},
|
1804
|
-
},
|
1805
|
-
visible: true,
|
1806
|
-
},
|
1807
|
-
// ====== Line Appearance ======
|
1808
|
-
{
|
1809
|
-
name: 'lineWidth',
|
1810
|
-
title: 'Line Width',
|
1811
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1812
|
-
schema: {
|
1813
|
-
defaultValue: 2,
|
1814
|
-
dataType: 'number',
|
1815
|
-
interface: {
|
1816
|
-
name: 'lineWidth',
|
1817
|
-
path: 'options.lineWidth',
|
1818
|
-
type: AXPWidgetsCatalog.number,
|
1819
|
-
options: {
|
1820
|
-
placeholder: '1-10',
|
1821
|
-
minValue: 1,
|
1822
|
-
maxValue: 10,
|
1823
|
-
},
|
1824
|
-
},
|
1825
|
-
},
|
1826
|
-
visible: true,
|
1827
|
-
},
|
1828
|
-
{
|
1829
|
-
name: 'smoothLine',
|
1830
|
-
title: 'Smooth Line',
|
1831
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1832
|
-
schema: {
|
1833
|
-
defaultValue: true,
|
1834
|
-
dataType: 'boolean',
|
1835
|
-
interface: {
|
1836
|
-
name: 'smoothLine',
|
1837
|
-
path: 'options.smoothLine',
|
1838
|
-
type: AXPWidgetsCatalog.toggle,
|
1839
|
-
},
|
1840
|
-
},
|
1841
|
-
visible: true,
|
1842
|
-
},
|
1843
|
-
{
|
1844
|
-
name: 'showPoints',
|
1845
|
-
title: 'Show Points',
|
1846
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1847
|
-
schema: {
|
1848
|
-
defaultValue: true,
|
1849
|
-
dataType: 'boolean',
|
1850
|
-
interface: {
|
1851
|
-
name: 'showPoints',
|
1852
|
-
path: 'options.showPoints',
|
1853
|
-
type: AXPWidgetsCatalog.toggle,
|
1854
|
-
},
|
1855
|
-
},
|
1856
|
-
visible: true,
|
1857
|
-
},
|
1858
|
-
{
|
1859
|
-
name: 'pointRadius',
|
1860
|
-
title: 'Point Size',
|
1861
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1862
|
-
schema: {
|
1863
|
-
defaultValue: 4,
|
1864
|
-
dataType: 'number',
|
1865
|
-
interface: {
|
1866
|
-
name: 'pointRadius',
|
1867
|
-
path: 'options.pointRadius',
|
1868
|
-
type: AXPWidgetsCatalog.number,
|
1869
|
-
options: {
|
1870
|
-
placeholder: '1-10',
|
1871
|
-
minValue: 1,
|
1872
|
-
maxValue: 10,
|
1873
|
-
},
|
1874
|
-
},
|
1875
|
-
},
|
1876
|
-
visible: true,
|
1877
|
-
},
|
1878
|
-
{
|
1879
|
-
name: 'fillArea',
|
1880
|
-
title: 'Fill Area',
|
1881
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1882
|
-
schema: {
|
1883
|
-
defaultValue: false,
|
1884
|
-
dataType: 'boolean',
|
1885
|
-
interface: {
|
1886
|
-
name: 'fillArea',
|
1887
|
-
path: 'options.fillArea',
|
1888
|
-
type: AXPWidgetsCatalog.toggle,
|
1889
|
-
},
|
1890
|
-
},
|
1891
|
-
visible: true,
|
1892
|
-
},
|
1893
|
-
{
|
1894
|
-
name: 'fillOpacity',
|
1895
|
-
title: 'Fill Opacity',
|
1896
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1897
|
-
schema: {
|
1898
|
-
defaultValue: 10,
|
1899
|
-
dataType: 'number',
|
1900
|
-
interface: {
|
1901
|
-
name: 'fillOpacity',
|
1902
|
-
path: 'options.fillOpacity',
|
1903
|
-
type: AXPWidgetsCatalog.number,
|
1904
|
-
options: {
|
1905
|
-
placeholder: '0-100',
|
1906
|
-
minValue: 0,
|
1907
|
-
maxValue: 100,
|
1908
|
-
},
|
1909
|
-
},
|
1910
|
-
},
|
1911
|
-
visible: true,
|
1912
|
-
},
|
1913
|
-
// ====== Tooltip Settings ======
|
1914
|
-
{
|
1915
|
-
name: 'showTooltip',
|
1916
|
-
title: 'Show Tooltip',
|
1917
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1918
|
-
schema: {
|
1919
|
-
defaultValue: true,
|
1920
|
-
dataType: 'boolean',
|
1921
|
-
interface: {
|
1922
|
-
name: 'showTooltip',
|
1923
|
-
path: 'options.showTooltip',
|
1924
|
-
type: AXPWidgetsCatalog.toggle,
|
1925
|
-
},
|
1926
|
-
},
|
1927
|
-
visible: true,
|
1928
|
-
},
|
1929
|
-
{
|
1930
|
-
name: 'showCrosshair',
|
1931
|
-
title: 'Show Crosshair',
|
1932
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1933
|
-
schema: {
|
1934
|
-
defaultValue: false,
|
1935
|
-
dataType: 'boolean',
|
1936
|
-
interface: {
|
1937
|
-
name: 'showCrosshair',
|
1938
|
-
path: 'options.showCrosshair',
|
1939
|
-
type: AXPWidgetsCatalog.toggle,
|
1940
|
-
},
|
1941
|
-
},
|
1942
|
-
visible: true,
|
1943
|
-
},
|
1944
|
-
// ====== Animation Settings ======
|
1945
|
-
{
|
1946
|
-
name: 'animationEasing',
|
1947
|
-
title: 'Animation Easing',
|
1948
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1949
|
-
schema: {
|
1950
|
-
defaultValue: 'cubic-out',
|
1951
|
-
dataType: 'string',
|
1952
|
-
interface: {
|
1953
|
-
name: 'animationEasing',
|
1954
|
-
path: 'options.animationEasing',
|
1955
|
-
type: AXPWidgetsCatalog.select,
|
1956
|
-
options: {
|
1957
|
-
dataSource: [
|
1958
|
-
{ value: 'linear', text: 'Linear' },
|
1959
|
-
{ value: 'ease', text: 'Ease' },
|
1960
|
-
{ value: 'ease-in', text: 'Ease In' },
|
1961
|
-
{ value: 'ease-out', text: 'Ease Out' },
|
1962
|
-
{ value: 'ease-in-out', text: 'Ease In Out' },
|
1963
|
-
{ value: 'cubic', text: 'Cubic' },
|
1964
|
-
{ value: 'cubic-in', text: 'Cubic In' },
|
1965
|
-
{ value: 'cubic-out', text: 'Cubic Out' },
|
1966
|
-
{ value: 'cubic-in-out', text: 'Cubic In Out' },
|
1967
|
-
],
|
1968
|
-
textField: 'text',
|
1969
|
-
valueField: 'value',
|
1970
|
-
},
|
1971
|
-
},
|
1972
|
-
},
|
1973
|
-
visible: true,
|
1974
|
-
},
|
1975
|
-
{
|
1976
|
-
name: 'animationDuration',
|
1977
|
-
title: 'Animation Duration',
|
1978
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
1979
|
-
schema: {
|
1980
|
-
defaultValue: 800,
|
1981
|
-
dataType: 'number',
|
1982
|
-
interface: {
|
1983
|
-
name: 'animationDuration',
|
1984
|
-
path: 'options.animationDuration',
|
1985
|
-
type: AXPWidgetsCatalog.number,
|
1986
|
-
options: {
|
1987
|
-
placeholder: '0-2000',
|
1988
|
-
minValue: 0,
|
1989
|
-
maxValue: 2000,
|
1990
|
-
},
|
1991
|
-
},
|
1992
|
-
},
|
1993
|
-
visible: true,
|
1994
|
-
},
|
1995
|
-
],
|
1996
|
-
components: {
|
1997
|
-
view: {
|
1998
|
-
component: () => Promise.resolve().then(function () { return lineChartWidget_component; }).then((c) => c.AXPLineChartWidgetViewComponent),
|
1999
|
-
},
|
2000
|
-
},
|
2001
|
-
meta: {
|
2002
|
-
dimensions: {
|
2003
|
-
width: 5,
|
2004
|
-
height: 6,
|
2005
|
-
minWidth: 2,
|
2006
|
-
minHeight: 2,
|
2007
|
-
maxWidth: 6,
|
2008
|
-
maxHeight: 7,
|
2009
|
-
},
|
2010
|
-
},
|
2011
|
-
};
|
2012
|
-
|
2013
|
-
class AXPStickyNoteWidgetViewComponent extends AXPValueWidgetComponent {
|
2014
|
-
constructor() {
|
2015
|
-
super(...arguments);
|
2016
|
-
this.isEditing = signal(false);
|
2017
|
-
this.wysiwyg = viewChild('wysiwyg');
|
2018
|
-
this.value = computed(() => this.getValue());
|
2019
|
-
this.date = computed(() => this.options()?.date ?? new Date());
|
2020
|
-
this.bgColor = computed(() => this.options()?.backgroundColor ?? '#FFF8B8');
|
2021
|
-
this.color = signal('#333333');
|
2022
|
-
this.el = inject(ElementRef);
|
2023
|
-
// Modern color palette with pastel and vibrant options
|
2024
|
-
this.colorPresets = [
|
2025
|
-
'#FFF8B8', // Soft yellow
|
2026
|
-
'#FFD8E6', // Soft pink
|
2027
|
-
'#D1F0FF', // Soft blue
|
2028
|
-
'#E2FFD1', // Soft green
|
2029
|
-
'#FFE8D1', // Soft orange
|
2030
|
-
'#F0D1FF', // Soft purple
|
2031
|
-
'#FFCDD2', // Soft red
|
2032
|
-
'#D1FFF0', // Soft teal
|
2033
|
-
'#F5F5F5', // Light gray
|
2034
|
-
'#FFFFFF', // White
|
2035
|
-
];
|
2036
|
-
}
|
2037
|
-
// Handle clicks outside the component to cancel editing
|
2038
|
-
handleClickOutside(event) {
|
2039
|
-
const clickedInside = this.el.nativeElement.contains(event.target);
|
2040
|
-
if (!clickedInside && this.isEditing()) {
|
2041
|
-
this.saveChanges();
|
2042
|
-
}
|
2043
|
-
}
|
2044
|
-
// Handle double-click to activate editing
|
2045
|
-
activateEdit() {
|
2046
|
-
//TODO FOCUS WYSIWYG
|
2047
|
-
this.wysiwyg()?.focus();
|
2048
|
-
this.isEditing.set(true);
|
2049
|
-
}
|
2050
|
-
// Save changes and exit edit mode
|
2051
|
-
saveChanges() {
|
2052
|
-
this.isEditing.set(false);
|
2053
|
-
}
|
2054
|
-
setColor(color) {
|
2055
|
-
this.setOptions({ backgroundColor: color });
|
2056
|
-
}
|
2057
|
-
valueChange(event) {
|
2058
|
-
if (event.isUserInteraction) {
|
2059
|
-
this.setValue(event.value);
|
2060
|
-
}
|
2061
|
-
}
|
2062
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyNoteWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
2063
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPStickyNoteWidgetViewComponent, isStandalone: true, selector: "ng-component", host: { listeners: { "document:click": "handleClickOutside($event)" } }, providers: [
|
2064
|
-
{
|
2065
|
-
provide: AXGridLayoutWidgetComponent,
|
2066
|
-
useExisting: AXPStickyNoteWidgetViewComponent,
|
2067
|
-
},
|
2068
|
-
], viewQueries: [{ propertyName: "wysiwyg", first: true, predicate: ["wysiwyg"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"sticky-note-container ax-size-full ax-rounded-lg ax-flex ax-flex-col ax-p-4 ax-shadow-md ax-transition-all ax-duration-300 hover:ax-shadow-lg\"\n [style.background-color]=\"bgColor()\"\n [style.color]=\"color()\"\n [class.ax-shadow-lg]=\"isEditing()\"\n [class.ax-scale-[1.02]]=\"isEditing()\"\n (dblclick)=\"activateEdit()\"\n>\n <!-- Header with timestamp -->\n <div class=\"ax-flex ax-justify-between ax-items-center ax-mb-3\">\n <div class=\"ax-text-xs ax-opacity-70 ax-font-medium ax-flex ax-items-center ax-gap-1\">\n <i class=\"fa-regular fa-clock ax-text-[0.65rem]\"></i>\n {{ date() | format : 'datetime' : 'dd MMM, YY HH:mm' | async }}\n </div>\n </div>\n\n <!-- Content area -->\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-wysiwyg-container\n #wysiwyg\n [class]=\"isEditing() ? 'ax-pointer-events-auto ax-cursor-text' : 'ax-pointer-events-none !ax-cursor-pointer'\"\n class=\"ax-h-full\"\n placeHolder=\"start writing with double click...\"\n look=\"none\"\n (onValueChanged)=\"valueChange($event)\"\n [ngModel]=\"value()\"\n >\n <ax-wysiwyg-view class=\"!ax-size-full ax-border-b-0\"></ax-wysiwyg-view>\n </ax-wysiwyg-container>\n </div>\n\n <!-- Footer with color selector and save button -->\n @if (isEditing()) {\n <div class=\"ax-absolute ax-bottom-2 ax-left-2 ax-right-2 ax-flex ax-flex-wrap ax-gap-1 ax-text-xs\">\n <!-- Color selection bar when in edit mode -->\n <div class=\"ax-flex ax-w-full ax-mt-2 ax-border ax-border-gray-200 ax-overflow-hidden ax-rounded-md\">\n @for (preset of colorPresets; track preset) {\n <div\n class=\"ax-h-6 ax-flex-1 ax-cursor-pointer ax-transition-all ax-duration-200 ax-border-r ax-border-gray-200 last:ax-border-r-0 hover:ax-brightness-95\"\n [style.background-color]=\"preset\"\n [class.ax-ring-inset]=\"bgColor() === preset\"\n [class.ax-ring-2]=\"bgColor() === preset\"\n [class.ax-ring-primary]=\"bgColor() === preset\"\n (click)=\"setColor(preset)\"\n ></div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%}:host ::ng-deep ax-wysiwyg-view{color:#2e2e2e!important}\n"], dependencies: [{ kind: "ngmodule", type: AXWysiwygModule }, { kind: "component", type: i1$1.AXWysiwygContainerComponent, selector: "ax-wysiwyg-container", inputs: ["look", "placeHolder"], outputs: ["onValueChanged"] }, { kind: "component", type: i1$1.AXWysiwygViewComponent, selector: "ax-wysiwyg-view", inputs: ["class"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXToolBarModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i2.AXFormatPipe, name: "format" }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXColorBoxModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2069
|
-
}
|
2070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyNoteWidgetViewComponent, decorators: [{
|
2071
|
-
type: Component,
|
2072
|
-
args: [{ standalone: true, imports: [
|
2073
|
-
AXWysiwygModule,
|
2074
|
-
AXDecoratorModule,
|
2075
|
-
AXToolBarModule,
|
2076
|
-
FormsModule,
|
2077
|
-
AXDateTimeModule,
|
2078
|
-
AXFormatModule,
|
2079
|
-
AXPopoverModule,
|
2080
|
-
CommonModule,
|
2081
|
-
FormsModule,
|
2082
|
-
AXColorBoxModule,
|
2083
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
2084
|
-
{
|
2085
|
-
provide: AXGridLayoutWidgetComponent,
|
2086
|
-
useExisting: AXPStickyNoteWidgetViewComponent,
|
2087
|
-
},
|
2088
|
-
], template: "<div\n class=\"sticky-note-container ax-size-full ax-rounded-lg ax-flex ax-flex-col ax-p-4 ax-shadow-md ax-transition-all ax-duration-300 hover:ax-shadow-lg\"\n [style.background-color]=\"bgColor()\"\n [style.color]=\"color()\"\n [class.ax-shadow-lg]=\"isEditing()\"\n [class.ax-scale-[1.02]]=\"isEditing()\"\n (dblclick)=\"activateEdit()\"\n>\n <!-- Header with timestamp -->\n <div class=\"ax-flex ax-justify-between ax-items-center ax-mb-3\">\n <div class=\"ax-text-xs ax-opacity-70 ax-font-medium ax-flex ax-items-center ax-gap-1\">\n <i class=\"fa-regular fa-clock ax-text-[0.65rem]\"></i>\n {{ date() | format : 'datetime' : 'dd MMM, YY HH:mm' | async }}\n </div>\n </div>\n\n <!-- Content area -->\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-wysiwyg-container\n #wysiwyg\n [class]=\"isEditing() ? 'ax-pointer-events-auto ax-cursor-text' : 'ax-pointer-events-none !ax-cursor-pointer'\"\n class=\"ax-h-full\"\n placeHolder=\"start writing with double click...\"\n look=\"none\"\n (onValueChanged)=\"valueChange($event)\"\n [ngModel]=\"value()\"\n >\n <ax-wysiwyg-view class=\"!ax-size-full ax-border-b-0\"></ax-wysiwyg-view>\n </ax-wysiwyg-container>\n </div>\n\n <!-- Footer with color selector and save button -->\n @if (isEditing()) {\n <div class=\"ax-absolute ax-bottom-2 ax-left-2 ax-right-2 ax-flex ax-flex-wrap ax-gap-1 ax-text-xs\">\n <!-- Color selection bar when in edit mode -->\n <div class=\"ax-flex ax-w-full ax-mt-2 ax-border ax-border-gray-200 ax-overflow-hidden ax-rounded-md\">\n @for (preset of colorPresets; track preset) {\n <div\n class=\"ax-h-6 ax-flex-1 ax-cursor-pointer ax-transition-all ax-duration-200 ax-border-r ax-border-gray-200 last:ax-border-r-0 hover:ax-brightness-95\"\n [style.background-color]=\"preset\"\n [class.ax-ring-inset]=\"bgColor() === preset\"\n [class.ax-ring-2]=\"bgColor() === preset\"\n [class.ax-ring-primary]=\"bgColor() === preset\"\n (click)=\"setColor(preset)\"\n ></div>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%}:host ::ng-deep ax-wysiwyg-view{color:#2e2e2e!important}\n"] }]
|
2089
|
-
}], propDecorators: { handleClickOutside: [{
|
2090
|
-
type: HostListener,
|
2091
|
-
args: ['document:click', ['$event']]
|
2092
|
-
}] } });
|
2093
|
-
|
2094
|
-
var stickyNoteWidget_component = /*#__PURE__*/Object.freeze({
|
2095
|
-
__proto__: null,
|
2096
|
-
AXPStickyNoteWidgetViewComponent: AXPStickyNoteWidgetViewComponent
|
2097
|
-
});
|
2098
|
-
|
2099
|
-
const AXPStickyNoteWidget = {
|
2100
|
-
name: 'sticky-note',
|
2101
|
-
title: 'Sticky Note Widget',
|
2102
|
-
categories: AXP_WIDGETS_UTILITY_CATEGORY,
|
2103
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
2104
|
-
type: 'dashboard',
|
2105
|
-
icon: 'fa-light fa-sticky-note',
|
2106
|
-
properties: [AXP_DATA_PATH_PROPERTY, AXP_BG_COLOR_PROPERTY, plainTextDefaultProperty()],
|
2107
|
-
components: {
|
2108
|
-
view: {
|
2109
|
-
component: () => Promise.resolve().then(function () { return stickyNoteWidget_component; }).then((c) => c.AXPStickyNoteWidgetViewComponent),
|
2110
|
-
},
|
2111
|
-
},
|
2112
|
-
meta: {
|
2113
|
-
dimensions: {
|
2114
|
-
width: 2,
|
2115
|
-
height: 3,
|
2116
|
-
minWidth: 2,
|
2117
|
-
minHeight: 2,
|
2118
|
-
maxWidth: 4,
|
2119
|
-
maxHeight: 4,
|
2120
|
-
},
|
2121
|
-
},
|
2122
|
-
};
|
2123
|
-
|
2124
|
-
/**
|
2125
|
-
* Task List Widget Component
|
2126
|
-
* Displays a list of tasks with checkboxes and filtering options
|
2127
|
-
*/
|
2128
|
-
class AXPTaskListWidgetViewComponent extends AXPValueWidgetComponent {
|
2129
|
-
constructor() {
|
2130
|
-
super(...arguments);
|
2131
|
-
// Outputs
|
2132
|
-
this.taskClick = output();
|
2133
|
-
this.taskCompleted = output();
|
2134
|
-
// Dependencies
|
2135
|
-
this.cdr = inject(ChangeDetectorRef);
|
2136
|
-
this.datePipe = inject(DatePipe);
|
2137
|
-
// Configuration options
|
2138
|
-
this.maxItems = computed(() => this.options()?.maxItems ?? 10);
|
2139
|
-
this.showDate = computed(() => this.options()?.showDate ?? true);
|
2140
|
-
this.showAssignee = computed(() => this.options()?.showAssignee ?? true);
|
2141
|
-
this.showPriority = computed(() => this.options()?.showPriority ?? true);
|
2142
|
-
this.allowMarkComplete = computed(() => this.options()?.allowMarkComplete ?? true);
|
2143
|
-
this.showCategories = computed(() => this.options()?.groupByCategory ?? true);
|
2144
|
-
// Data computed properties
|
2145
|
-
this.taskItems = computed(() => {
|
2146
|
-
const value = this.getValue();
|
2147
|
-
if (!value?.data?.length)
|
2148
|
-
return [];
|
2149
|
-
return value.data.slice(0, this.maxItems());
|
2150
|
-
});
|
2151
|
-
}
|
2152
|
-
// Task counting methods
|
2153
|
-
getPendingTaskCount() {
|
2154
|
-
return this.getFilteredTasks((task) => !task.completed).length;
|
2155
|
-
}
|
2156
|
-
getCompletedTaskCount() {
|
2157
|
-
return this.getFilteredTasks((task) => task.completed).length;
|
2158
|
-
}
|
2159
|
-
// Category-related methods
|
2160
|
-
hasCategories() {
|
2161
|
-
return this.taskItems().some((task) => !!task.category);
|
2162
|
-
}
|
2163
|
-
getCategories() {
|
2164
|
-
const tasks = this.taskItems();
|
2165
|
-
const categories = new Set();
|
2166
|
-
let hasUncategorized = false;
|
2167
|
-
tasks.forEach((task) => {
|
2168
|
-
if (task.category) {
|
2169
|
-
categories.add(task.category);
|
2170
|
-
}
|
2171
|
-
else {
|
2172
|
-
hasUncategorized = true;
|
2173
|
-
}
|
2174
|
-
});
|
2175
|
-
const result = Array.from(categories);
|
2176
|
-
if (hasUncategorized) {
|
2177
|
-
result.push('Uncategorized');
|
2178
|
-
}
|
2179
|
-
return result;
|
2180
|
-
}
|
2181
|
-
getTasksByCategory(category) {
|
2182
|
-
const tasks = this.taskItems();
|
2183
|
-
if (category === 'Uncategorized') {
|
2184
|
-
return tasks.filter((task) => !task.category);
|
2185
|
-
}
|
2186
|
-
return tasks.filter((task) => task.category === category);
|
2187
|
-
}
|
2188
|
-
getCategoryTaskCount(category) {
|
2189
|
-
return this.getTasksByCategory(category).filter((task) => !task.completed).length;
|
2190
|
-
}
|
2191
|
-
// Event handlers
|
2192
|
-
onTaskClick(task) {
|
2193
|
-
this.taskClick.emit(task);
|
2194
|
-
}
|
2195
|
-
onTaskCompletionChange(task, isCompleted) {
|
2196
|
-
const updatedTask = { ...task, completed: isCompleted };
|
2197
|
-
const value = this.getValue();
|
2198
|
-
if (!value?.data)
|
2199
|
-
return;
|
2200
|
-
const updatedTasks = value.data.map((t) => (t.id === task.id ? updatedTask : t));
|
2201
|
-
this.setValue({ ...value, data: updatedTasks });
|
2202
|
-
this.taskCompleted.emit(updatedTask);
|
2203
|
-
this.cdr.detectChanges();
|
2204
|
-
}
|
2205
|
-
// Formatting and utility methods
|
2206
|
-
formatDueDate(date) {
|
2207
|
-
if (!date)
|
2208
|
-
return '';
|
2209
|
-
const dateObj = typeof date === 'string' ? new Date(date) : date;
|
2210
|
-
const diffDays = this.getDaysDifference(dateObj);
|
2211
|
-
if (diffDays < 0)
|
2212
|
-
return 'Overdue!';
|
2213
|
-
if (diffDays === 0)
|
2214
|
-
return 'Today';
|
2215
|
-
if (diffDays === 1)
|
2216
|
-
return 'Tomorrow';
|
2217
|
-
if (diffDays < 7)
|
2218
|
-
return this.datePipe.transform(dateObj, 'EEE') || '';
|
2219
|
-
return this.datePipe.transform(dateObj, 'MM/dd/yyyy') || '';
|
2220
|
-
}
|
2221
|
-
getPriorityColor(priority) {
|
2222
|
-
if (!priority)
|
2223
|
-
return '';
|
2224
|
-
const priorityColors = {
|
2225
|
-
high: 'danger',
|
2226
|
-
medium: 'warning',
|
2227
|
-
low: 'success',
|
2228
|
-
};
|
2229
|
-
return priorityColors[priority] || '';
|
2230
|
-
}
|
2231
|
-
// Helper methods
|
2232
|
-
getFilteredTasks(filterFn) {
|
2233
|
-
const value = this.getValue();
|
2234
|
-
if (!value?.data?.length)
|
2235
|
-
return [];
|
2236
|
-
return value.data.filter(filterFn);
|
2237
|
-
}
|
2238
|
-
getDaysDifference(date) {
|
2239
|
-
const now = new Date();
|
2240
|
-
now.setHours(0, 0, 0, 0);
|
2241
|
-
const targetDate = new Date(date);
|
2242
|
-
targetDate.setHours(0, 0, 0, 0);
|
2243
|
-
const diffMs = targetDate.getTime() - now.getTime();
|
2244
|
-
return Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
2245
|
-
}
|
2246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTaskListWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
2247
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTaskListWidgetViewComponent, isStandalone: true, selector: "ng-component", outputs: { taskClick: "taskClick", taskCompleted: "taskCompleted" }, providers: [DatePipe], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-size-full ax-p-4\">\n <!-- Header -->\n <div class=\"ax-flex ax-justify-between ax-items-center ax-mb-3\">\n <h3 class=\"ax-text-lg ax-font-semibold\">{{ 'widget.tasklist.title' | translate | async }}</h3>\n <div class=\"ax-flex ax-gap-2\">\n @if(getPendingTaskCount() > 0){\n <ax-badge\n [text]=\"getPendingTaskCount() + ' ' + ('widget.tasklist.pending' | translate | async)\"\n [color]=\"'warning'\"\n size=\"sm\"\n class=\"ax-ml-1\"\n >\n </ax-badge>\n } @if(getCompletedTaskCount() > 0){\n <ax-badge\n [text]=\"getCompletedTaskCount() + ' ' + ('widget.tasklist.completed' | translate | async)\"\n [color]=\"'success'\"\n size=\"sm\"\n class=\"ax-ml-1\"\n >\n </ax-badge>\n }\n </div>\n </div>\n\n <!-- Task List -->\n <div class=\"ax-space-y-4 ax-my-4 ax-px-2\">\n @if (showCategories() && hasCategories()) {\n <!-- Categorized Tasks -->\n @for (category of getCategories(); track category) {\n <div class=\"ax-mb-3\">\n <!-- Category Header -->\n <div class=\"ax-flex ax-justify-between ax-items-center ax-mb-2 ax-h-5\">\n <h4 class=\"ax-font-medium ax-text-gray-700\">{{ category }}</h4>\n @if(getCategoryTaskCount(category)){\n <ax-badge [text]=\"getCategoryTaskCount(category).toString()\" [color]=\"'primary'\" size=\"sm\"></ax-badge>\n }\n </div>\n <!-- Tasks in Category -->\n @for (task of getTasksByCategory(category); track task.id) {\n <ng-container\n [ngTemplateOutlet]=\"taskItemTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: task }\"\n ></ng-container>\n }\n </div>\n } } @else {\n <!-- Uncategorized Tasks -->\n @for (task of taskItems(); track task.id) {\n <ng-container\n [ngTemplateOutlet]=\"taskItemTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: task }\"\n ></ng-container>\n } @empty {\n <!-- Empty State -->\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-12 ax-px-4 ax-text-gray-400\">\n <ax-icon class=\"ax-text-4xl ax-mb-3 ax-text-gray-300\">\n <i class=\"fa-light fa-clipboard-list-check\"></i>\n </ax-icon>\n <p class=\"ax-text-center\">{{ 'widget.tasklist.noTasks' | translate | async }}</p>\n </div>\n } }\n </div>\n</div>\n\n<!-- Task Item Template -->\n<ng-template #taskItemTemplateRef let-task>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-py-2 ax-border-b ax-border-gray-100 last:ax-border-0\">\n <!-- Checkbox -->\n <ax-check-box\n class=\"ax-flex-shrink-0\"\n [value]=\"task.completed\"\n [disabled]=\"!allowMarkComplete()\"\n (valueChange)=\"onTaskCompletionChange(task, $event)\"\n >\n </ax-check-box>\n\n <!-- Task Details -->\n <div class=\"ax-overflow-hidden ax-grow ax-text-start\" (click)=\"onTaskClick(task)\">\n <!-- Title and Priority -->\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <h6\n class=\"ax-font-semibold ax-truncate ax-pb-1\"\n [class.ax-line-through]=\"task.completed\"\n [class.ax-text-gray-400]=\"task.completed\"\n >\n {{ task.title }}\n </h6>\n @if(showPriority() && task.priority) {\n <ax-badge [color]=\"getPriorityColor(task.priority)\" [text]=\"task.priority\" size=\"sm\" class=\"ax-ml-1\"></ax-badge>\n }\n </div>\n\n <!-- Metadata -->\n <div class=\"ax-flex ax-flex-wrap ax-gap-x-3 ax-gap-y-1 ax-mt-1 ax-text-xs ax-text-gray-500\">\n @if(showDate() && task.dueDate) {\n <span class=\"ax-flex ax-items-center ax-gap-1\" [class.ax-text-danger-500]=\"getDaysDifference(task.dueDate) < 0\">\n <ax-icon><i class=\"fa-light fa-calendar\"></i></ax-icon>\n {{ formatDueDate(task.dueDate) }}\n </span>\n } @if(showAssignee() && task.assignedTo) {\n <span class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-icon><i class=\"fa-light fa-user\"></i></ax-icon>\n {{ task.assignedTo.name }}\n </span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block;height:100%;width:100%}.task-completed{text-decoration:line-through;color:var(--ax-text-secondary)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i3.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXAvatarModule }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i4.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2248
|
-
}
|
2249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTaskListWidgetViewComponent, decorators: [{
|
2250
|
-
type: Component,
|
2251
|
-
args: [{ standalone: true, imports: [
|
2252
|
-
CommonModule,
|
2253
|
-
AXTabsModule,
|
2254
|
-
AXDecoratorModule,
|
2255
|
-
AXButtonModule,
|
2256
|
-
AXBadgeModule,
|
2257
|
-
AXAvatarModule,
|
2258
|
-
AXImageModule,
|
2259
|
-
AXCheckBoxModule,
|
2260
|
-
AXLabelModule,
|
2261
|
-
AXTranslationModule,
|
2262
|
-
], providers: [DatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-size-full ax-p-4\">\n <!-- Header -->\n <div class=\"ax-flex ax-justify-between ax-items-center ax-mb-3\">\n <h3 class=\"ax-text-lg ax-font-semibold\">{{ 'widget.tasklist.title' | translate | async }}</h3>\n <div class=\"ax-flex ax-gap-2\">\n @if(getPendingTaskCount() > 0){\n <ax-badge\n [text]=\"getPendingTaskCount() + ' ' + ('widget.tasklist.pending' | translate | async)\"\n [color]=\"'warning'\"\n size=\"sm\"\n class=\"ax-ml-1\"\n >\n </ax-badge>\n } @if(getCompletedTaskCount() > 0){\n <ax-badge\n [text]=\"getCompletedTaskCount() + ' ' + ('widget.tasklist.completed' | translate | async)\"\n [color]=\"'success'\"\n size=\"sm\"\n class=\"ax-ml-1\"\n >\n </ax-badge>\n }\n </div>\n </div>\n\n <!-- Task List -->\n <div class=\"ax-space-y-4 ax-my-4 ax-px-2\">\n @if (showCategories() && hasCategories()) {\n <!-- Categorized Tasks -->\n @for (category of getCategories(); track category) {\n <div class=\"ax-mb-3\">\n <!-- Category Header -->\n <div class=\"ax-flex ax-justify-between ax-items-center ax-mb-2 ax-h-5\">\n <h4 class=\"ax-font-medium ax-text-gray-700\">{{ category }}</h4>\n @if(getCategoryTaskCount(category)){\n <ax-badge [text]=\"getCategoryTaskCount(category).toString()\" [color]=\"'primary'\" size=\"sm\"></ax-badge>\n }\n </div>\n <!-- Tasks in Category -->\n @for (task of getTasksByCategory(category); track task.id) {\n <ng-container\n [ngTemplateOutlet]=\"taskItemTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: task }\"\n ></ng-container>\n }\n </div>\n } } @else {\n <!-- Uncategorized Tasks -->\n @for (task of taskItems(); track task.id) {\n <ng-container\n [ngTemplateOutlet]=\"taskItemTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: task }\"\n ></ng-container>\n } @empty {\n <!-- Empty State -->\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-12 ax-px-4 ax-text-gray-400\">\n <ax-icon class=\"ax-text-4xl ax-mb-3 ax-text-gray-300\">\n <i class=\"fa-light fa-clipboard-list-check\"></i>\n </ax-icon>\n <p class=\"ax-text-center\">{{ 'widget.tasklist.noTasks' | translate | async }}</p>\n </div>\n } }\n </div>\n</div>\n\n<!-- Task Item Template -->\n<ng-template #taskItemTemplateRef let-task>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-py-2 ax-border-b ax-border-gray-100 last:ax-border-0\">\n <!-- Checkbox -->\n <ax-check-box\n class=\"ax-flex-shrink-0\"\n [value]=\"task.completed\"\n [disabled]=\"!allowMarkComplete()\"\n (valueChange)=\"onTaskCompletionChange(task, $event)\"\n >\n </ax-check-box>\n\n <!-- Task Details -->\n <div class=\"ax-overflow-hidden ax-grow ax-text-start\" (click)=\"onTaskClick(task)\">\n <!-- Title and Priority -->\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <h6\n class=\"ax-font-semibold ax-truncate ax-pb-1\"\n [class.ax-line-through]=\"task.completed\"\n [class.ax-text-gray-400]=\"task.completed\"\n >\n {{ task.title }}\n </h6>\n @if(showPriority() && task.priority) {\n <ax-badge [color]=\"getPriorityColor(task.priority)\" [text]=\"task.priority\" size=\"sm\" class=\"ax-ml-1\"></ax-badge>\n }\n </div>\n\n <!-- Metadata -->\n <div class=\"ax-flex ax-flex-wrap ax-gap-x-3 ax-gap-y-1 ax-mt-1 ax-text-xs ax-text-gray-500\">\n @if(showDate() && task.dueDate) {\n <span class=\"ax-flex ax-items-center ax-gap-1\" [class.ax-text-danger-500]=\"getDaysDifference(task.dueDate) < 0\">\n <ax-icon><i class=\"fa-light fa-calendar\"></i></ax-icon>\n {{ formatDueDate(task.dueDate) }}\n </span>\n } @if(showAssignee() && task.assignedTo) {\n <span class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-icon><i class=\"fa-light fa-user\"></i></ax-icon>\n {{ task.assignedTo.name }}\n </span>\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block;height:100%;width:100%}.task-completed{text-decoration:line-through;color:var(--ax-text-secondary)}\n"] }]
|
2263
|
-
}] });
|
2264
|
-
|
2265
|
-
var tasklistWidget_component = /*#__PURE__*/Object.freeze({
|
2266
|
-
__proto__: null,
|
2267
|
-
AXPTaskListWidgetViewComponent: AXPTaskListWidgetViewComponent
|
2268
|
-
});
|
2269
|
-
|
2270
|
-
const AXPTaskListWidget = {
|
2271
|
-
name: 'task-list',
|
2272
|
-
title: 'Task List Widget',
|
2273
|
-
categories: [AXP_WIDGETS_CHART_CATEGORY],
|
2274
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
2275
|
-
type: 'dashboard',
|
2276
|
-
icon: 'fa-light fa-clipboard-list-check',
|
2277
|
-
properties: [
|
2278
|
-
cloneProperty(AXP_DATA_PATH_PROPERTY, { visible: false }),
|
2279
|
-
// ====== Title ======
|
2280
|
-
{
|
2281
|
-
name: 'title',
|
2282
|
-
title: 'Chart Title',
|
2283
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2284
|
-
schema: {
|
2285
|
-
defaultValue: '',
|
2286
|
-
dataType: 'string',
|
2287
|
-
interface: {
|
2288
|
-
name: 'title',
|
2289
|
-
path: 'options.title',
|
2290
|
-
type: AXPWidgetsCatalog.text,
|
2291
|
-
options: {
|
2292
|
-
placeholder: 'Enter chart title',
|
2293
|
-
},
|
2294
|
-
},
|
2295
|
-
},
|
2296
|
-
visible: true,
|
2297
|
-
},
|
2298
|
-
// Display options
|
2299
|
-
{
|
2300
|
-
name: 'maxItems',
|
2301
|
-
title: 'Max Items',
|
2302
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2303
|
-
schema: {
|
2304
|
-
defaultValue: 10,
|
2305
|
-
dataType: 'number',
|
2306
|
-
interface: {
|
2307
|
-
name: 'maxItems',
|
2308
|
-
path: 'options.maxItems',
|
2309
|
-
type: AXPWidgetsCatalog.number,
|
2310
|
-
options: {
|
2311
|
-
minValue: 1,
|
2312
|
-
maxValue: 50,
|
2313
|
-
},
|
2314
|
-
},
|
2315
|
-
},
|
2316
|
-
visible: true,
|
2317
|
-
},
|
2318
|
-
{
|
2319
|
-
name: 'showDate',
|
2320
|
-
title: 'Show Date',
|
2321
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2322
|
-
schema: {
|
2323
|
-
defaultValue: true,
|
2324
|
-
dataType: 'boolean',
|
2325
|
-
interface: {
|
2326
|
-
name: 'showDate',
|
2327
|
-
path: 'options.showDate',
|
2328
|
-
type: AXPWidgetsCatalog.toggle,
|
2329
|
-
},
|
2330
|
-
},
|
2331
|
-
visible: true,
|
2332
|
-
},
|
2333
|
-
{
|
2334
|
-
name: 'showAssignee',
|
2335
|
-
title: 'Show Assignee',
|
2336
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2337
|
-
schema: {
|
2338
|
-
defaultValue: true,
|
2339
|
-
dataType: 'boolean',
|
2340
|
-
interface: {
|
2341
|
-
name: 'showAssignee',
|
2342
|
-
path: 'options.showAssignee',
|
2343
|
-
type: AXPWidgetsCatalog.toggle,
|
2344
|
-
},
|
2345
|
-
},
|
2346
|
-
visible: true,
|
2347
|
-
},
|
2348
|
-
{
|
2349
|
-
name: 'groupByCategory',
|
2350
|
-
title: 'Group by Category',
|
2351
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2352
|
-
schema: {
|
2353
|
-
defaultValue: true,
|
2354
|
-
dataType: 'boolean',
|
2355
|
-
interface: {
|
2356
|
-
name: 'groupByCategory',
|
2357
|
-
path: 'options.groupByCategory',
|
2358
|
-
type: AXPWidgetsCatalog.toggle,
|
2359
|
-
},
|
2360
|
-
},
|
2361
|
-
visible: true,
|
2362
|
-
},
|
2363
|
-
{
|
2364
|
-
name: 'showPriority',
|
2365
|
-
title: 'Show Priority',
|
2366
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2367
|
-
schema: {
|
2368
|
-
defaultValue: true,
|
2369
|
-
dataType: 'boolean',
|
2370
|
-
interface: {
|
2371
|
-
name: 'showPriority',
|
2372
|
-
path: 'options.showPriority',
|
2373
|
-
type: AXPWidgetsCatalog.toggle,
|
2374
|
-
},
|
2375
|
-
},
|
2376
|
-
visible: true,
|
2377
|
-
},
|
2378
|
-
{
|
2379
|
-
name: 'allowMarkComplete',
|
2380
|
-
title: 'Allow Complete',
|
2381
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
2382
|
-
schema: {
|
2383
|
-
defaultValue: true,
|
2384
|
-
dataType: 'boolean',
|
2385
|
-
interface: {
|
2386
|
-
name: 'allowMarkComplete',
|
2387
|
-
path: 'options.allowMarkComplete',
|
2388
|
-
type: AXPWidgetsCatalog.toggle,
|
2389
|
-
},
|
2390
|
-
},
|
2391
|
-
visible: true,
|
2392
|
-
},
|
2393
|
-
],
|
2394
|
-
components: {
|
2395
|
-
view: {
|
2396
|
-
component: () => Promise.resolve().then(function () { return tasklistWidget_component; }).then((c) => c.AXPTaskListWidgetViewComponent),
|
2397
|
-
},
|
2398
|
-
},
|
2399
|
-
meta: {
|
2400
|
-
dimensions: {
|
2401
|
-
width: 5,
|
2402
|
-
height: 7,
|
2403
|
-
minWidth: 3,
|
2404
|
-
minHeight: 4,
|
2405
|
-
maxWidth: 6,
|
2406
|
-
maxHeight: 8,
|
2407
|
-
},
|
2408
|
-
},
|
2409
|
-
};
|
2410
|
-
|
2411
|
-
/**
|
2412
|
-
* Abstract Weather API Service
|
2413
|
-
* Base class that defines the interface and common functionality
|
2414
|
-
* for weather data providers
|
2415
|
-
*/
|
2416
|
-
class AXPWeatherApiAbstract {
|
2417
|
-
constructor() {
|
2418
|
-
/** Weather condition definitions mapping */
|
2419
|
-
this.weatherConditions = {
|
2420
|
-
sunny: {
|
2421
|
-
id: 'sunny',
|
2422
|
-
name: 'Sunny',
|
2423
|
-
icon: 'fa-solid fa-sun',
|
2424
|
-
color: '#ff9d00',
|
2425
|
-
},
|
2426
|
-
clearNight: {
|
2427
|
-
id: 'clearNight',
|
2428
|
-
name: 'Clear Night',
|
2429
|
-
icon: 'fa-solid fa-moon',
|
2430
|
-
color: '#5d639e',
|
2431
|
-
},
|
2432
|
-
partlyCloudy: {
|
2433
|
-
id: 'partlyCloudy',
|
2434
|
-
name: 'Partly Cloudy',
|
2435
|
-
icon: 'fa-solid fa-cloud-sun',
|
2436
|
-
color: '#6ba4e8',
|
2437
|
-
},
|
2438
|
-
partlyCloudyNight: {
|
2439
|
-
id: 'partlyCloudyNight',
|
2440
|
-
name: 'Partly Cloudy Night',
|
2441
|
-
icon: 'fa-solid fa-cloud-moon',
|
2442
|
-
color: '#5d639e',
|
2443
|
-
},
|
2444
|
-
cloudy: {
|
2445
|
-
id: 'cloudy',
|
2446
|
-
name: 'Cloudy',
|
2447
|
-
icon: 'fa-solid fa-cloud',
|
2448
|
-
color: '#72869d',
|
2449
|
-
},
|
2450
|
-
rain: {
|
2451
|
-
id: 'rain',
|
2452
|
-
name: 'Rain',
|
2453
|
-
icon: 'fa-solid fa-cloud-rain',
|
2454
|
-
color: '#3a74ad',
|
2455
|
-
},
|
2456
|
-
showers: {
|
2457
|
-
id: 'showers',
|
2458
|
-
name: 'Showers',
|
2459
|
-
icon: 'fa-solid fa-cloud-showers-heavy',
|
2460
|
-
color: '#2c5d8c',
|
2461
|
-
},
|
2462
|
-
thunderstorm: {
|
2463
|
-
id: 'thunderstorm',
|
2464
|
-
name: 'Thunderstorm',
|
2465
|
-
icon: 'fa-solid fa-bolt-lightning',
|
2466
|
-
color: '#8834af',
|
2467
|
-
},
|
2468
|
-
snow: {
|
2469
|
-
id: 'snow',
|
2470
|
-
name: 'Snow',
|
2471
|
-
icon: 'fa-solid fa-snowflake',
|
2472
|
-
color: '#68a9cd',
|
2473
|
-
},
|
2474
|
-
mist: {
|
2475
|
-
id: 'mist',
|
2476
|
-
name: 'Mist',
|
2477
|
-
icon: 'fa-solid fa-smog',
|
2478
|
-
color: '#94a3b8',
|
2479
|
-
},
|
2480
|
-
};
|
2481
|
-
/** Day of week mapping */
|
2482
|
-
this.dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
2483
|
-
}
|
2484
|
-
/**
|
2485
|
-
* Get weather condition info by ID
|
2486
|
-
* @param id Condition ID
|
2487
|
-
* @returns Weather condition info or default if not found
|
2488
|
-
*/
|
2489
|
-
getCondition(id) {
|
2490
|
-
// Normalize condition ID by removing spaces and converting to lowercase
|
2491
|
-
const normalizedId = id.toLowerCase().replace(/\s+/g, '');
|
2492
|
-
// Direct match first
|
2493
|
-
if (this.weatherConditions[normalizedId]) {
|
2494
|
-
return this.weatherConditions[normalizedId];
|
2495
|
-
}
|
2496
|
-
// Check for partial matches or common variants
|
2497
|
-
if (normalizedId.includes('partly') && normalizedId.includes('cloud')) {
|
2498
|
-
return this.weatherConditions['partlyCloudy'];
|
2499
|
-
}
|
2500
|
-
if (normalizedId.includes('cloud')) {
|
2501
|
-
return this.weatherConditions['cloudy'];
|
2502
|
-
}
|
2503
|
-
if (normalizedId.includes('sun')) {
|
2504
|
-
return this.weatherConditions['sunny'];
|
2505
|
-
}
|
2506
|
-
if (normalizedId.includes('rain')) {
|
2507
|
-
return this.weatherConditions['rain'];
|
2508
|
-
}
|
2509
|
-
if (normalizedId.includes('snow')) {
|
2510
|
-
return this.weatherConditions['snow'];
|
2511
|
-
}
|
2512
|
-
// If no match found, return default unknown condition
|
2513
|
-
return {
|
2514
|
-
id: 'unknown',
|
2515
|
-
name: 'Unknown',
|
2516
|
-
icon: 'fa-solid fa-question',
|
2517
|
-
color: '#999999',
|
2518
|
-
};
|
2519
|
-
}
|
2520
|
-
/**
|
2521
|
-
* Parse location string into city and display components
|
2522
|
-
* @param location Location query string
|
2523
|
-
* @returns Parsed location parts
|
2524
|
-
*/
|
2525
|
-
parseLocation(location) {
|
2526
|
-
if (!location || location.trim() === '') {
|
2527
|
-
return { city: 'New York', country: 'USA', display: 'New York' };
|
2528
|
-
}
|
2529
|
-
const city = location.trim();
|
2530
|
-
return { city, country: '', display: city };
|
2531
|
-
}
|
2532
|
-
/**
|
2533
|
-
* Format location name for display
|
2534
|
-
* @param locationParts Parsed location parts
|
2535
|
-
* @returns Formatted location name
|
2536
|
-
*/
|
2537
|
-
formatLocationName(locationParts) {
|
2538
|
-
return locationParts.city || 'Unknown Location';
|
2539
|
-
}
|
2540
|
-
/**
|
2541
|
-
* Map API condition text to our internal condition IDs
|
2542
|
-
* @param conditionText Condition text from API
|
2543
|
-
* @returns Internal condition ID
|
2544
|
-
*/
|
2545
|
-
mapApiConditionToId(conditionText) {
|
2546
|
-
const text = conditionText.toLowerCase();
|
2547
|
-
// Match WeatherAPI.com condition text
|
2548
|
-
// Reference: https://www.weatherapi.com/docs/#weather-icons
|
2549
|
-
if (text.includes('sunny') || text.includes('clear')) {
|
2550
|
-
return 'sunny';
|
2551
|
-
}
|
2552
|
-
if (text === 'partly cloudy') {
|
2553
|
-
return 'partlyCloudy';
|
2554
|
-
}
|
2555
|
-
if (text.includes('cloudy') || text.includes('overcast')) {
|
2556
|
-
return 'cloudy';
|
2557
|
-
}
|
2558
|
-
if (text.includes('rain') || text.includes('drizzle') || text.includes('shower')) {
|
2559
|
-
return 'rain';
|
2560
|
-
}
|
2561
|
-
if (text.includes('thunder') || text.includes('lightning')) {
|
2562
|
-
return 'thunderstorm';
|
2563
|
-
}
|
2564
|
-
if (text.includes('snow') || text.includes('sleet') || text.includes('blizzard')) {
|
2565
|
-
return 'snow';
|
2566
|
-
}
|
2567
|
-
if (text.includes('mist') || text.includes('fog')) {
|
2568
|
-
return 'mist';
|
2569
|
-
}
|
2570
|
-
// Default to partly cloudy if we don't have a specific mapping
|
2571
|
-
return 'partlyCloudy';
|
2572
|
-
}
|
2573
|
-
/**
|
2574
|
-
* Generate random integer between min and max (inclusive)
|
2575
|
-
* Helper method for implementations
|
2576
|
-
* @param min Minimum value
|
2577
|
-
* @param max Maximum value
|
2578
|
-
* @returns Random integer
|
2579
|
-
*/
|
2580
|
-
getRandomInt(min, max) {
|
2581
|
-
return Math.floor(Math.random() * (max - min + 1)) + min;
|
2582
|
-
}
|
2583
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiAbstract, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2584
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiAbstract }); }
|
2585
|
-
}
|
2586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiAbstract, decorators: [{
|
2587
|
-
type: Injectable
|
2588
|
-
}] });
|
2589
|
-
|
2590
|
-
/**
|
2591
|
-
* Mock Weather API Service
|
2592
|
-
* Provides simulated weather data for development and testing
|
2593
|
-
*/
|
2594
|
-
class AXPWeatherApiMockService extends AXPWeatherApiAbstract {
|
2595
|
-
constructor() {
|
2596
|
-
super(...arguments);
|
2597
|
-
// Mock configuration
|
2598
|
-
this.mockDelay = 500;
|
2599
|
-
}
|
2600
|
-
/**
|
2601
|
-
* Get current weather data for given location
|
2602
|
-
* @param options Weather request options
|
2603
|
-
* @returns Observable with weather data
|
2604
|
-
*/
|
2605
|
-
getWeather(options) {
|
2606
|
-
const locationParts = this.parseLocation(options.location || '');
|
2607
|
-
const displayName = this.formatLocationName(locationParts);
|
2608
|
-
return this.getMockWeatherData(locationParts.city, options).pipe(map((mockData) => ({
|
2609
|
-
...mockData,
|
2610
|
-
location: {
|
2611
|
-
city: locationParts.city,
|
2612
|
-
country: '',
|
2613
|
-
displayName: displayName,
|
2614
|
-
},
|
2615
|
-
})));
|
2616
|
-
}
|
2617
|
-
/**
|
2618
|
-
* Get weather forecast for a location
|
2619
|
-
* @param options Weather request options with days
|
2620
|
-
* @returns Observable of weather data with forecast
|
2621
|
-
*/
|
2622
|
-
getForecast(options) {
|
2623
|
-
const days = options.days || 5;
|
2624
|
-
return this.getMockForecast(options.location || '', days, options);
|
2625
|
-
}
|
2626
|
-
/**
|
2627
|
-
* Get mock weather data for demo/development
|
2628
|
-
* @param location Location query
|
2629
|
-
* @param options Request options
|
2630
|
-
* @returns Observable of mock weather data
|
2631
|
-
*/
|
2632
|
-
getMockWeatherData(location, options) {
|
2633
|
-
return new Observable((observer) => {
|
2634
|
-
setTimeout(() => {
|
2635
|
-
try {
|
2636
|
-
const locationParts = this.parseLocation(location);
|
2637
|
-
const tempUnit = options?.tempUnit || '°C';
|
2638
|
-
const isCelsius = tempUnit === '°C';
|
2639
|
-
// Generate more realistic weather data based on location and current date
|
2640
|
-
const now = new Date();
|
2641
|
-
const month = now.getMonth(); // 0-11
|
2642
|
-
// Seasonally appropriate temperature range
|
2643
|
-
let minRange = 15;
|
2644
|
-
let maxRange = 25;
|
2645
|
-
// Northern hemisphere seasonal adjustments
|
2646
|
-
if (month >= 11 || month <= 1) {
|
2647
|
-
// Winter
|
2648
|
-
minRange = -5;
|
2649
|
-
maxRange = 10;
|
2650
|
-
}
|
2651
|
-
else if (month >= 2 && month <= 4) {
|
2652
|
-
// Spring
|
2653
|
-
minRange = 10;
|
2654
|
-
maxRange = 20;
|
2655
|
-
}
|
2656
|
-
else if (month >= 5 && month <= 7) {
|
2657
|
-
// Summer
|
2658
|
-
minRange = 20;
|
2659
|
-
maxRange = 35;
|
2660
|
-
}
|
2661
|
-
else if (month >= 8 && month <= 10) {
|
2662
|
-
// Fall/Autumn
|
2663
|
-
minRange = 10;
|
2664
|
-
maxRange = 25;
|
2665
|
-
}
|
2666
|
-
// Generate current temperature - more likely to be in the middle of the range
|
2667
|
-
const tempC = Math.round(minRange + (this.getRandomInt(4, 8) / 10) * (maxRange - minRange));
|
2668
|
-
const tempF = Math.round((tempC * 9) / 5 + 32);
|
2669
|
-
const humidity = this.getRandomInt(30, 90);
|
2670
|
-
const windKph = this.getRandomInt(5, 30);
|
2671
|
-
const windMph = Math.round(windKph * 0.621371);
|
2672
|
-
// Temperature-based conditions with randomization
|
2673
|
-
let conditionId = 'partlyCloudy';
|
2674
|
-
if (tempC > 25)
|
2675
|
-
conditionId = 'sunny';
|
2676
|
-
else if (tempC < 10)
|
2677
|
-
conditionId = 'cloudy';
|
2678
|
-
if (this.getRandomInt(1, 10) > 7)
|
2679
|
-
conditionId = 'rain';
|
2680
|
-
observer.next({
|
2681
|
-
location: {
|
2682
|
-
city: locationParts.city,
|
2683
|
-
country: '',
|
2684
|
-
displayName: this.formatLocationName(locationParts),
|
2685
|
-
},
|
2686
|
-
current: {
|
2687
|
-
condition: conditionId,
|
2688
|
-
conditionCode: 0,
|
2689
|
-
iconUrl: '', // Would be set from API
|
2690
|
-
tempC: tempC,
|
2691
|
-
tempF: tempF,
|
2692
|
-
feelsLikeC: tempC + this.getRandomInt(-3, 2),
|
2693
|
-
feelsLikeF: tempF + this.getRandomInt(-5, 3),
|
2694
|
-
humidity: humidity,
|
2695
|
-
windKph: windKph,
|
2696
|
-
windMph: windMph,
|
2697
|
-
windDirection: ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'][this.getRandomInt(0, 7)],
|
2698
|
-
uv: this.getRandomInt(0, 10),
|
2699
|
-
lastUpdated: new Date().toISOString(),
|
2700
|
-
},
|
2701
|
-
forecast: [],
|
2702
|
-
});
|
2703
|
-
observer.complete();
|
2704
|
-
}
|
2705
|
-
catch (error) {
|
2706
|
-
observer.error(error);
|
2707
|
-
}
|
2708
|
-
}, this.mockDelay);
|
2709
|
-
}).pipe(catchError((error) => throwError(() => new Error(`Failed to get weather data: ${error.message}`))));
|
2710
|
-
}
|
2711
|
-
/**
|
2712
|
-
* Get mock forecast data for demo/development
|
2713
|
-
* @param location Location query
|
2714
|
-
* @param days Number of forecast days
|
2715
|
-
* @param options Request options
|
2716
|
-
* @returns Observable of mock weather data with forecast
|
2717
|
-
*/
|
2718
|
-
getMockForecast(location, days = 5, options) {
|
2719
|
-
return this.getMockWeatherData(location, options).pipe(map((data) => {
|
2720
|
-
const currentCondition = data.current.condition;
|
2721
|
-
const currentTemp = data.current.tempC;
|
2722
|
-
// Use the current weather as a base for the forecast trend
|
2723
|
-
const forecast = Array.from({ length: days }, (_, i) => {
|
2724
|
-
// Create forecast date for each day (starting from tomorrow)
|
2725
|
-
const forecastDate = new Date();
|
2726
|
-
forecastDate.setDate(new Date().getDate() + i + 1);
|
2727
|
-
const dateStr = forecastDate.toISOString().split('T')[0];
|
2728
|
-
const dayName = this.dayNames[forecastDate.getDay()];
|
2729
|
-
// Generate condition with some continuity from current weather
|
2730
|
-
// Weather tends to be similar for a few days with gradual changes
|
2731
|
-
let conditionId;
|
2732
|
-
if (i === 0) {
|
2733
|
-
// Tomorrow's weather has 60% chance of being similar to today
|
2734
|
-
conditionId =
|
2735
|
-
this.getRandomInt(1, 10) <= 6
|
2736
|
-
? currentCondition
|
2737
|
-
: ['sunny', 'partlyCloudy', 'cloudy', 'rain', 'snow'][this.getRandomInt(0, 4)];
|
2738
|
-
}
|
2739
|
-
else {
|
2740
|
-
// Subsequent days have 70% chance of being similar to previous day
|
2741
|
-
const previousCondition = forecast[i - 1]?.condition || currentCondition;
|
2742
|
-
conditionId =
|
2743
|
-
this.getRandomInt(1, 10) <= 7
|
2744
|
-
? previousCondition
|
2745
|
-
: ['sunny', 'partlyCloudy', 'cloudy', 'rain', 'snow'][this.getRandomInt(0, 4)];
|
2746
|
-
}
|
2747
|
-
// Generate temperatures with realistic variance
|
2748
|
-
// Max is typically higher than current temperature
|
2749
|
-
// Min is typically lower than current temperature
|
2750
|
-
const tempVariance = this.getRandomInt(-3, 3); // Small day-to-day change
|
2751
|
-
const baseMaxC = currentTemp + this.getRandomInt(0, 5); // Max is higher than current
|
2752
|
-
const maxTempC = baseMaxC + tempVariance;
|
2753
|
-
const minTempC = maxTempC - this.getRandomInt(5, 10); // Min is lower than max
|
2754
|
-
const maxTempF = Math.round((maxTempC * 9) / 5 + 32);
|
2755
|
-
const minTempF = Math.round((minTempC * 9) / 5 + 32);
|
2756
|
-
return {
|
2757
|
-
date: dateStr,
|
2758
|
-
day: dayName,
|
2759
|
-
condition: conditionId,
|
2760
|
-
iconUrl: '', // Would be set from API
|
2761
|
-
maxTempC,
|
2762
|
-
maxTempF,
|
2763
|
-
minTempC,
|
2764
|
-
minTempF,
|
2765
|
-
};
|
2766
|
-
});
|
2767
|
-
return { ...data, forecast };
|
2768
|
-
}));
|
2769
|
-
}
|
2770
|
-
/**
|
2771
|
-
* Set the API key for the weather service
|
2772
|
-
* No-op in the mock implementation
|
2773
|
-
* @param key The API key
|
2774
|
-
*/
|
2775
|
-
setApiKey(key) {
|
2776
|
-
// No-op for mock service
|
2777
|
-
console.log('API key setting is ignored in mock weather service');
|
2778
|
-
}
|
2779
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiMockService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
2780
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiMockService }); }
|
2781
|
-
}
|
2782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiMockService, decorators: [{
|
2783
|
-
type: Injectable
|
2784
|
-
}] });
|
2785
|
-
|
2786
|
-
const AXP_WEATHER_API_KEY = new InjectionToken('AXP_WEATHER_API_KEY', {
|
2787
|
-
providedIn: 'root',
|
2788
|
-
factory: () => {
|
2789
|
-
return '40281dc1e31749edb6c104828250604';
|
2790
|
-
},
|
2791
|
-
});
|
2792
|
-
|
2793
|
-
/**
|
2794
|
-
* Real Weather API Service
|
2795
|
-
* Fetches actual weather data from a weather API service
|
2796
|
-
*/
|
2797
|
-
class AXPWeatherApiService extends AXPWeatherApiAbstract {
|
2798
|
-
constructor() {
|
2799
|
-
super(...arguments);
|
2800
|
-
this.http = inject(HttpClient);
|
2801
|
-
// API configuration
|
2802
|
-
this.baseApiUrl = 'https://api.weatherapi.com/v1';
|
2803
|
-
this.apiKeyToken = inject(AXP_WEATHER_API_KEY, { optional: true });
|
2804
|
-
}
|
2805
|
-
/**
|
2806
|
-
* Set the API key for the weather service
|
2807
|
-
* @param key The API key
|
2808
|
-
*/
|
2809
|
-
setApiKey(key) {
|
2810
|
-
if (key && key.trim() !== '') {
|
2811
|
-
this.apiKeyToken = key;
|
2812
|
-
}
|
2813
|
-
}
|
2814
|
-
/**
|
2815
|
-
* Get current weather data for given location
|
2816
|
-
* @param options Weather request options
|
2817
|
-
* @returns Observable with weather data
|
2818
|
-
*/
|
2819
|
-
getWeather(options) {
|
2820
|
-
// If forecast is likely needed, we should fetch it all at once
|
2821
|
-
if (options.useMockData === false || options.useMockData === undefined) {
|
2822
|
-
// For real API, use the forecast endpoint which includes current data
|
2823
|
-
return this.getForecast({
|
2824
|
-
...options,
|
2825
|
-
days: 1, // Request minimal forecast data
|
2826
|
-
});
|
2827
|
-
}
|
2828
|
-
// For mock data, we'll continue using separate calls for backward compatibility
|
2829
|
-
const locationParts = this.parseLocation(options.location || '');
|
2830
|
-
const displayName = this.formatLocationName(locationParts);
|
2831
|
-
// Use real API with query based on city only
|
2832
|
-
const query = encodeURIComponent(locationParts.city);
|
2833
|
-
const url = `${this.baseApiUrl}/current.json?key=${this.apiKeyToken}&q=${query}&aqi=no`;
|
2834
|
-
return this.http.get(url).pipe(map((data) => this.transformApiResponse(data, displayName)), catchError((error) => {
|
2835
|
-
console.error('Weather API error:', error);
|
2836
|
-
// Check for location not found error
|
2837
|
-
if (error.error?.error?.code === 1006) {
|
2838
|
-
return throwError(() => new Error(`Location "${locationParts.city}" not found. Please check the city name and try again.`));
|
2839
|
-
}
|
2840
|
-
return throwError(() => new Error(`Failed to fetch weather data: ${error.message}`));
|
2841
|
-
}));
|
2842
|
-
}
|
2843
|
-
/**
|
2844
|
-
* Get weather forecast for a location
|
2845
|
-
* @param options Weather request options with days
|
2846
|
-
* @returns Observable of weather data with forecast
|
2847
|
-
*/
|
2848
|
-
getForecast(options) {
|
2849
|
-
const locationParts = this.parseLocation(options.location || '');
|
2850
|
-
const displayName = this.formatLocationName(locationParts);
|
2851
|
-
const days = options.days || 5;
|
2852
|
-
// Build forecast API URL
|
2853
|
-
const query = encodeURIComponent(locationParts.city);
|
2854
|
-
const url = `${this.baseApiUrl}/forecast.json?key=${this.apiKeyToken}&q=${query}&days=${days}&aqi=no`;
|
2855
|
-
return this.http.get(url).pipe(map((data) => this.transformForecastResponse(data, displayName, days)), catchError((error) => {
|
2856
|
-
console.error('Weather API error:', error);
|
2857
|
-
// Check for location not found error
|
2858
|
-
if (error.error?.error?.code === 1006) {
|
2859
|
-
return throwError(() => new Error(`Location "${locationParts.city}" not found. Please check the city name and try again.`));
|
2860
|
-
}
|
2861
|
-
return throwError(() => new Error(`Failed to fetch forecast data: ${error.message}`));
|
2862
|
-
}));
|
2863
|
-
}
|
2864
|
-
/**
|
2865
|
-
* Transform API response to our internal data model
|
2866
|
-
* @param apiData Raw API response
|
2867
|
-
* @param displayName Formatted location name
|
2868
|
-
* @returns Normalized weather data
|
2869
|
-
*/
|
2870
|
-
transformApiResponse(apiData, displayName) {
|
2871
|
-
// Map API condition text to our condition IDs
|
2872
|
-
const conditionText = apiData.current?.condition?.text || '';
|
2873
|
-
const conditionId = this.mapApiConditionToId(conditionText);
|
2874
|
-
return {
|
2875
|
-
location: {
|
2876
|
-
city: apiData.location?.name || '',
|
2877
|
-
country: apiData.location?.country || '',
|
2878
|
-
displayName: displayName,
|
2879
|
-
},
|
2880
|
-
current: {
|
2881
|
-
condition: conditionId, // Use our mapped condition ID
|
2882
|
-
conditionCode: apiData.current?.condition?.code || 0,
|
2883
|
-
iconUrl: apiData.current?.condition?.icon || '',
|
2884
|
-
tempC: apiData.current?.temp_c || 0,
|
2885
|
-
tempF: apiData.current?.temp_f || 0,
|
2886
|
-
feelsLikeC: apiData.current?.feelslike_c || 0,
|
2887
|
-
feelsLikeF: apiData.current?.feelslike_f || 0,
|
2888
|
-
humidity: apiData.current?.humidity || 0,
|
2889
|
-
windKph: apiData.current?.wind_kph || 0,
|
2890
|
-
windMph: apiData.current?.wind_mph || 0,
|
2891
|
-
windDirection: apiData.current?.wind_dir || '',
|
2892
|
-
uv: apiData.current?.uv || 0,
|
2893
|
-
lastUpdated: apiData.current?.last_updated || new Date().toISOString(),
|
2894
|
-
},
|
2895
|
-
forecast: [],
|
2896
|
-
};
|
2897
|
-
}
|
2898
|
-
/**
|
2899
|
-
* Transform forecast API response to our internal data model
|
2900
|
-
* @param apiData Raw API response with forecast
|
2901
|
-
* @param displayName Formatted location name
|
2902
|
-
* @param days Number of forecast days
|
2903
|
-
* @returns Normalized weather data with forecast
|
2904
|
-
*/
|
2905
|
-
transformForecastResponse(apiData, displayName, days) {
|
2906
|
-
// First transform the current weather data using the current field of the forecast response
|
2907
|
-
const weatherData = this.transformApiResponse(apiData, displayName);
|
2908
|
-
// Then add the forecast data
|
2909
|
-
const forecastDays = apiData.forecast?.forecastday || [];
|
2910
|
-
weatherData.forecast = forecastDays.slice(0, days).map((day) => {
|
2911
|
-
// Parse the date for day name
|
2912
|
-
const date = new Date(day.date);
|
2913
|
-
const dayName = date.toLocaleDateString('en-US', { weekday: 'short' });
|
2914
|
-
// Map condition to our internal ID
|
2915
|
-
const conditionText = day.day?.condition?.text || '';
|
2916
|
-
const conditionId = this.mapApiConditionToId(conditionText);
|
2917
|
-
return {
|
2918
|
-
date: day.date,
|
2919
|
-
day: dayName,
|
2920
|
-
condition: conditionId,
|
2921
|
-
iconUrl: day.day?.condition?.icon || '',
|
2922
|
-
maxTempC: day.day?.maxtemp_c || 0,
|
2923
|
-
maxTempF: day.day?.maxtemp_f || 0,
|
2924
|
-
minTempC: day.day?.mintemp_c || 0,
|
2925
|
-
minTempF: day.day?.mintemp_f || 0,
|
2926
|
-
};
|
2927
|
-
});
|
2928
|
-
return weatherData;
|
2929
|
-
}
|
2930
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
2931
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiService }); }
|
2932
|
-
}
|
2933
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherApiService, decorators: [{
|
2934
|
-
type: Injectable
|
2935
|
-
}] });
|
2936
|
-
|
2937
|
-
/**
|
2938
|
-
* Weather Widget Component
|
2939
|
-
* Displays current weather conditions and optional forecast data
|
2940
|
-
* for a specified location with customizable display options.
|
2941
|
-
*/
|
2942
|
-
class AXPWeatherWidgetViewComponent extends AXPValueWidgetComponent {
|
2943
|
-
/**
|
2944
|
-
* Component constructor
|
2945
|
-
* @param cdr ChangeDetectorRef for triggering view updates
|
2946
|
-
*/
|
2947
|
-
constructor(cdr) {
|
2948
|
-
super();
|
2949
|
-
this.cdr = cdr;
|
2950
|
-
// Container element reference
|
2951
|
-
this.containerEl = viewChild.required('containerElement');
|
2952
|
-
// Weather API service instance
|
2953
|
-
this.weatherService = inject(AXPWeatherApiAbstract);
|
2954
|
-
// State signals
|
2955
|
-
this.weatherData = signal(null);
|
2956
|
-
this.isLoading = signal(true);
|
2957
|
-
this.hasError = signal(false);
|
2958
|
-
this.errorMessage = signal('');
|
2959
|
-
this.isForecastLoading = signal(false);
|
2960
|
-
// Auto-refresh subscription
|
2961
|
-
this.refreshSubscription = null;
|
2962
|
-
// Option-derived computed properties
|
2963
|
-
this.city = computed(() => {
|
2964
|
-
return this.options()['city'] || 'Newyork';
|
2965
|
-
});
|
2966
|
-
this.temperatureUnit = computed(() => this.options()['temperatureUnit']?.id || '°C');
|
2967
|
-
this.windSpeedUnit = computed(() => this.options()['windSpeedUnit']?.id || 'km/h');
|
2968
|
-
// Display option flags
|
2969
|
-
this.showCurrentCondition = computed(() => this.options()['showCurrentCondition'] !== false);
|
2970
|
-
this.showTemperature = computed(() => this.options()['showTemperature'] !== false);
|
2971
|
-
this.showHumidity = computed(() => this.options()['showHumidity'] !== false);
|
2972
|
-
this.showWind = computed(() => this.options()['showWind'] !== false);
|
2973
|
-
this.showForecast = computed(() => this.options()['showForecast'] !== false);
|
2974
|
-
this.forecastDays = computed(() => this.options()['forecastDays'] ?? 5);
|
2975
|
-
// Refresh settings
|
2976
|
-
this.autoRefresh = computed(() => this.options()['autoRefresh'] !== false);
|
2977
|
-
this.refreshInterval = computed(() => this.options()['refreshInterval']?.id ?? 15);
|
2978
|
-
// Reactivity effects
|
2979
|
-
this.optionsEffect = effect(() => {
|
2980
|
-
const opts = this.options();
|
2981
|
-
this.loadWeatherData();
|
2982
|
-
this.setupRefreshTimer();
|
2983
|
-
});
|
2984
|
-
this.valueEffect = effect(() => {
|
2985
|
-
this.city();
|
2986
|
-
this.loadWeatherData();
|
2987
|
-
});
|
2988
|
-
this.displayedForecast = computed(() => {
|
2989
|
-
const weatherData = this.weatherData();
|
2990
|
-
if (!weatherData?.forecast)
|
2991
|
-
return [];
|
2992
|
-
const forecastDays = this.forecastDays();
|
2993
|
-
return weatherData.forecast.slice(0, forecastDays);
|
2994
|
-
});
|
2995
|
-
// Inject the abstract service which will resolve to either the mock or real implementation
|
2996
|
-
this.weatherService = inject(AXPWeatherApiAbstract);
|
2997
|
-
setTimeout(() => {
|
2998
|
-
this.loadWeatherData();
|
2999
|
-
this.setupRefreshTimer();
|
3000
|
-
}, 0);
|
3001
|
-
}
|
3002
|
-
/**
|
3003
|
-
* Component cleanup on destroy
|
3004
|
-
*/
|
3005
|
-
ngOnDestroy() {
|
3006
|
-
this.clearRefreshTimer();
|
3007
|
-
}
|
3008
|
-
/**
|
3009
|
-
* Loads weather data from the API
|
3010
|
-
* Sets loading state and handles errors
|
3011
|
-
*/
|
3012
|
-
loadWeatherData() {
|
3013
|
-
this.isLoading.set(true);
|
3014
|
-
this.hasError.set(false);
|
3015
|
-
this.errorMessage.set('');
|
3016
|
-
const locationQuery = this.city();
|
3017
|
-
const shouldShowForecast = this.showForecast();
|
3018
|
-
// If we need forecast, request it directly to avoid duplicate calls
|
3019
|
-
// The forecast endpoint also returns current weather
|
3020
|
-
if (shouldShowForecast) {
|
3021
|
-
const forecastOptions = {
|
3022
|
-
location: locationQuery,
|
3023
|
-
tempUnit: this.temperatureUnit(),
|
3024
|
-
useMockData: false, // Use real API, signals to use forecast endpoint
|
3025
|
-
days: this.forecastDays(),
|
3026
|
-
};
|
3027
|
-
this.isForecastLoading.set(true);
|
3028
|
-
this.weatherService.getForecast(forecastOptions).subscribe({
|
3029
|
-
next: (data) => {
|
3030
|
-
this.weatherData.set(data);
|
3031
|
-
this.isLoading.set(false);
|
3032
|
-
this.isForecastLoading.set(false);
|
3033
|
-
setTimeout(() => this.cdr.detectChanges());
|
3034
|
-
},
|
3035
|
-
error: (error) => {
|
3036
|
-
this.hasError.set(true);
|
3037
|
-
this.errorMessage.set(error.message || 'Failed to load weather data. Please try again.');
|
3038
|
-
this.isLoading.set(false);
|
3039
|
-
this.isForecastLoading.set(false);
|
3040
|
-
this.cdr.detectChanges();
|
3041
|
-
},
|
3042
|
-
});
|
3043
|
-
return;
|
3044
|
-
}
|
3045
|
-
// If we only need current weather, use getWeather
|
3046
|
-
const requestOptions = {
|
3047
|
-
location: locationQuery,
|
3048
|
-
tempUnit: this.temperatureUnit(),
|
3049
|
-
useMockData: false, // Use real API
|
3050
|
-
};
|
3051
|
-
this.weatherService.getWeather(requestOptions).subscribe({
|
3052
|
-
next: (data) => {
|
3053
|
-
this.weatherData.set(data);
|
3054
|
-
this.isLoading.set(false);
|
3055
|
-
setTimeout(() => this.cdr.detectChanges());
|
3056
|
-
},
|
3057
|
-
error: (error) => {
|
3058
|
-
this.hasError.set(true);
|
3059
|
-
this.errorMessage.set(error.message || 'Failed to load weather data. Please try again.');
|
3060
|
-
this.isLoading.set(false);
|
3061
|
-
this.cdr.detectChanges();
|
3062
|
-
},
|
3063
|
-
});
|
3064
|
-
}
|
3065
|
-
/**
|
3066
|
-
* Sets up the auto-refresh timer based on configuration
|
3067
|
-
*/
|
3068
|
-
setupRefreshTimer() {
|
3069
|
-
this.clearRefreshTimer();
|
3070
|
-
if (!this.autoRefresh())
|
3071
|
-
return;
|
3072
|
-
const minInterval = 5; // 5 minutes minimum
|
3073
|
-
const intervalValue = Math.max(this.refreshInterval(), minInterval);
|
3074
|
-
const intervalMs = intervalValue * 60 * 1000;
|
3075
|
-
this.refreshSubscription = interval(intervalMs)
|
3076
|
-
.pipe(switchMap(() => {
|
3077
|
-
// Always use the loadWeatherData method to determine the correct API call
|
3078
|
-
this.loadWeatherData();
|
3079
|
-
// Return an empty observable to satisfy the switchMap typing
|
3080
|
-
return new Observable((observer) => {
|
3081
|
-
observer.complete();
|
3082
|
-
});
|
3083
|
-
}))
|
3084
|
-
.subscribe();
|
3085
|
-
}
|
3086
|
-
/**
|
3087
|
-
* Clears the refresh timer subscription
|
3088
|
-
*/
|
3089
|
-
clearRefreshTimer() {
|
3090
|
-
if (this.refreshSubscription) {
|
3091
|
-
this.refreshSubscription.unsubscribe();
|
3092
|
-
this.refreshSubscription = null;
|
3093
|
-
}
|
3094
|
-
}
|
3095
|
-
/**
|
3096
|
-
* Manually refreshes the weather data
|
3097
|
-
*/
|
3098
|
-
refreshWeather() {
|
3099
|
-
this.loadWeatherData();
|
3100
|
-
}
|
3101
|
-
/**
|
3102
|
-
* Gets the current temperature based on selected unit
|
3103
|
-
*/
|
3104
|
-
getCurrentTemperature() {
|
3105
|
-
if (!this.weatherData())
|
3106
|
-
return 0;
|
3107
|
-
return this.temperatureUnit() === '°C' ? this.weatherData().current.tempC : this.weatherData().current.tempF;
|
3108
|
-
}
|
3109
|
-
/**
|
3110
|
-
* Gets the feels like temperature based on selected unit
|
3111
|
-
*/
|
3112
|
-
getFeelsLikeTemperature() {
|
3113
|
-
if (!this.weatherData())
|
3114
|
-
return 0;
|
3115
|
-
return this.temperatureUnit() === '°C'
|
3116
|
-
? this.weatherData().current.feelsLikeC
|
3117
|
-
: this.weatherData().current.feelsLikeF;
|
3118
|
-
}
|
3119
|
-
/**
|
3120
|
-
* Gets the humidity percentage
|
3121
|
-
*/
|
3122
|
-
getHumidity() {
|
3123
|
-
return this.weatherData()?.current.humidity || 0;
|
3124
|
-
}
|
3125
|
-
/**
|
3126
|
-
* Gets the wind speed based on selected unit
|
3127
|
-
*/
|
3128
|
-
getWindSpeed() {
|
3129
|
-
if (!this.weatherData())
|
3130
|
-
return 0;
|
3131
|
-
return this.windSpeedUnit() === 'km/h' ? this.weatherData().current.windKph : this.weatherData().current.windMph;
|
3132
|
-
}
|
3133
|
-
/**
|
3134
|
-
* Gets the current weather condition
|
3135
|
-
*/
|
3136
|
-
getCurrentCondition() {
|
3137
|
-
const conditionId = this.weatherData()?.current.condition || '';
|
3138
|
-
return this.getConditionName(conditionId);
|
3139
|
-
}
|
3140
|
-
/**
|
3141
|
-
* Gets the formatted last updated time
|
3142
|
-
*/
|
3143
|
-
getLastUpdated() {
|
3144
|
-
if (!this.weatherData()?.current.lastUpdated)
|
3145
|
-
return '';
|
3146
|
-
return new Date(this.weatherData().current.lastUpdated).toLocaleTimeString();
|
3147
|
-
}
|
3148
|
-
/**
|
3149
|
-
* Gets the icon class for a weather condition
|
3150
|
-
* @param conditionId Weather condition ID
|
3151
|
-
* @returns Font Awesome icon class
|
3152
|
-
*/
|
3153
|
-
getConditionIcon(conditionId) {
|
3154
|
-
const condition = this.weatherService.getCondition(conditionId);
|
3155
|
-
return condition?.icon || 'fa-solid fa-question';
|
3156
|
-
}
|
3157
|
-
/**
|
3158
|
-
* Gets the display name for a weather condition
|
3159
|
-
* @param conditionId Weather condition ID
|
3160
|
-
* @returns Condition display name
|
3161
|
-
*/
|
3162
|
-
getConditionName(conditionId) {
|
3163
|
-
const condition = this.weatherService.getCondition(conditionId);
|
3164
|
-
return condition?.name || 'Unknown';
|
3165
|
-
}
|
3166
|
-
/**
|
3167
|
-
* Gets the color for a weather condition
|
3168
|
-
* @param conditionId Weather condition ID
|
3169
|
-
* @returns CSS color value
|
3170
|
-
*/
|
3171
|
-
getConditionColor(conditionId) {
|
3172
|
-
const condition = this.weatherService.getCondition(conditionId);
|
3173
|
-
return condition?.color || '#999999';
|
3174
|
-
}
|
3175
|
-
/**
|
3176
|
-
* Cleans up chart resources
|
3177
|
-
* Required by AXPChartBaseComponent
|
3178
|
-
*/
|
3179
|
-
cleanupChart() {
|
3180
|
-
this.clearRefreshTimer();
|
3181
|
-
}
|
3182
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherWidgetViewComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
3183
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPWeatherWidgetViewComponent, isStandalone: true, selector: "ng-component", providers: [
|
3184
|
-
{
|
3185
|
-
provide: AXPWeatherApiAbstract,
|
3186
|
-
useClass: AXPWeatherApiService,
|
3187
|
-
},
|
3188
|
-
], 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>Loading weather data...</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() }}</span>\n <button class=\"axp-weather-retry-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>Retry</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\">{{ getCurrentCondition() }}</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\">{{ temperatureUnit() }}</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\">Humidity</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\">Wind</div>\n <div class=\"axp-weather-detail-value\">{{ getWindSpeed() }} {{ windSpeedUnit() }}</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>Forecast</span>\n </h3>\n <!-- <div class=\"axp-weather-scroll-indicator\">\n <i class=\"fa-solid fa-chevron-right\"></i>\n </div> -->\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>Loading forecast...</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\">{{ day.day }}</div>\n <div class=\"axp-weather-forecast-icon\" title=\"{{ getConditionName(day.condition) }}\">\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 }}\u00B0\n </span>\n <span class=\"axp-weather-forecast-high\">\n {{ temperatureUnit() === '\u00B0C' ? day.maxTempC : day.maxTempF }}\u00B0\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>Last updated: {{ 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]=\"'Refresh weather data'\"\n title=\"Refresh weather data\"\n >\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>Refresh</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>No weather data available</p>\n <button class=\"axp-weather-refresh-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>Load Data</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%;border-radius:8px;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}.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:1.5rem;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;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-top:auto;margin-bottom:1rem;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:80px;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:.875rem}.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}.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: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: HttpClientModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3189
|
-
}
|
3190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWeatherWidgetViewComponent, decorators: [{
|
3191
|
-
type: Component,
|
3192
|
-
args: [{ standalone: true, imports: [CommonModule, AXDateTimeModule, AXFormatModule, HttpClientModule], providers: [
|
3193
|
-
{
|
3194
|
-
provide: AXPWeatherApiAbstract,
|
3195
|
-
useClass: AXPWeatherApiService,
|
3196
|
-
},
|
3197
|
-
], 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>Loading weather data...</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() }}</span>\n <button class=\"axp-weather-retry-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>Retry</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\">{{ getCurrentCondition() }}</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\">{{ temperatureUnit() }}</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\">Humidity</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\">Wind</div>\n <div class=\"axp-weather-detail-value\">{{ getWindSpeed() }} {{ windSpeedUnit() }}</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>Forecast</span>\n </h3>\n <!-- <div class=\"axp-weather-scroll-indicator\">\n <i class=\"fa-solid fa-chevron-right\"></i>\n </div> -->\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>Loading forecast...</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\">{{ day.day }}</div>\n <div class=\"axp-weather-forecast-icon\" title=\"{{ getConditionName(day.condition) }}\">\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 }}\u00B0\n </span>\n <span class=\"axp-weather-forecast-high\">\n {{ temperatureUnit() === '\u00B0C' ? day.maxTempC : day.maxTempF }}\u00B0\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>Last updated: {{ 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]=\"'Refresh weather data'\"\n title=\"Refresh weather data\"\n >\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>Refresh</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>No weather data available</p>\n <button class=\"axp-weather-refresh-button\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\"></i>\n <span>Load Data</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%;border-radius:8px;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}.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:1.5rem;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;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-top:auto;margin-bottom:1rem;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:80px;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:.875rem}.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}.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"] }]
|
3198
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
3199
|
-
|
3200
|
-
var weatherWidget_component = /*#__PURE__*/Object.freeze({
|
3201
|
-
__proto__: null,
|
3202
|
-
AXPWeatherWidgetViewComponent: AXPWeatherWidgetViewComponent
|
3203
|
-
});
|
3204
|
-
|
3205
|
-
/**
|
3206
|
-
* Weather Widget Configuration
|
3207
|
-
* Provides customization options for displaying weather data and forecast
|
3208
|
-
*/
|
3209
|
-
const AXPWeatherWidget = {
|
3210
|
-
name: 'weather',
|
3211
|
-
title: 'Weather Widget',
|
3212
|
-
categories: [AXP_WIDGETS_UTILITY_CATEGORY],
|
3213
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
3214
|
-
type: 'dashboard',
|
3215
|
-
icon: 'fa-light fa-cloud-sun',
|
3216
|
-
properties: [
|
3217
|
-
/* Location Settings */
|
3218
|
-
{
|
3219
|
-
name: 'city',
|
3220
|
-
title: 'City',
|
3221
|
-
group: AXP_DATA_PROPERTY_GROUP,
|
3222
|
-
schema: {
|
3223
|
-
defaultValue: 'New York',
|
3224
|
-
dataType: 'string',
|
3225
|
-
interface: {
|
3226
|
-
name: 'city',
|
3227
|
-
path: 'options.city',
|
3228
|
-
type: AXPWidgetsCatalog.text,
|
3229
|
-
},
|
3230
|
-
},
|
3231
|
-
visible: true,
|
3232
|
-
},
|
3233
|
-
/* Display Options */
|
3234
|
-
// {
|
3235
|
-
// name: 'showCurrentCondition',
|
3236
|
-
// title: 'Show Current Condition',
|
3237
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3238
|
-
// schema: {
|
3239
|
-
// defaultValue: true,
|
3240
|
-
// dataType: 'boolean',
|
3241
|
-
// interface: {
|
3242
|
-
// name: 'showCurrentCondition',
|
3243
|
-
// path: 'options.showCurrentCondition',
|
3244
|
-
// type: AXPWidgetsCatalog.toggle,
|
3245
|
-
// },
|
3246
|
-
// },
|
3247
|
-
// visible: true,
|
3248
|
-
// },
|
3249
|
-
// {
|
3250
|
-
// name: 'showTemperature',
|
3251
|
-
// title: 'Show Temperature',
|
3252
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3253
|
-
// schema: {
|
3254
|
-
// defaultValue: true,
|
3255
|
-
// dataType: 'boolean',
|
3256
|
-
// interface: {
|
3257
|
-
// name: 'showTemperature',
|
3258
|
-
// path: 'options.showTemperature',
|
3259
|
-
// type: AXPWidgetsCatalog.toggle,
|
3260
|
-
// },
|
3261
|
-
// },
|
3262
|
-
// visible: true,
|
3263
|
-
// },
|
3264
|
-
// {
|
3265
|
-
// name: 'showCurrentCondition',
|
3266
|
-
// title: 'Show Current Condition',
|
3267
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3268
|
-
// schema: {
|
3269
|
-
// defaultValue: true,
|
3270
|
-
// dataType: 'boolean',
|
3271
|
-
// interface: {
|
3272
|
-
// name: 'showCurrentCondition',
|
3273
|
-
// path: 'options.showCurrentCondition',
|
3274
|
-
// type: AXPWidgetsCatalog.toggle,
|
3275
|
-
// },
|
3276
|
-
// },
|
3277
|
-
// visible: true,
|
3278
|
-
// },
|
3279
|
-
// {
|
3280
|
-
// name: 'showTemperature',
|
3281
|
-
// title: 'Show Temperature',
|
3282
|
-
// group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3283
|
-
// schema: {
|
3284
|
-
// defaultValue: true,
|
3285
|
-
// dataType: 'boolean',
|
3286
|
-
// interface: {
|
3287
|
-
// name: 'showTemperature',
|
3288
|
-
// path: 'options.showTemperature',
|
3289
|
-
// type: AXPWidgetsCatalog.toggle,
|
3290
|
-
// },
|
3291
|
-
// },
|
3292
|
-
// visible: true,
|
3293
|
-
// },
|
3294
|
-
{
|
3295
|
-
name: 'showHumidity',
|
3296
|
-
title: 'Show Humidity',
|
3297
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3298
|
-
schema: {
|
3299
|
-
defaultValue: true,
|
3300
|
-
dataType: 'boolean',
|
3301
|
-
interface: {
|
3302
|
-
name: 'showHumidity',
|
3303
|
-
path: 'options.showHumidity',
|
3304
|
-
type: AXPWidgetsCatalog.toggle,
|
3305
|
-
},
|
3306
|
-
},
|
3307
|
-
visible: true,
|
3308
|
-
},
|
3309
|
-
{
|
3310
|
-
name: 'showWind',
|
3311
|
-
title: 'Show Wind Speed',
|
3312
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3313
|
-
schema: {
|
3314
|
-
defaultValue: true,
|
3315
|
-
dataType: 'boolean',
|
3316
|
-
interface: {
|
3317
|
-
name: 'showWind',
|
3318
|
-
path: 'options.showWind',
|
3319
|
-
type: AXPWidgetsCatalog.toggle,
|
3320
|
-
},
|
3321
|
-
},
|
3322
|
-
visible: true,
|
3323
|
-
},
|
3324
|
-
{
|
3325
|
-
name: 'showForecast',
|
3326
|
-
title: 'Show Forecast',
|
3327
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3328
|
-
schema: {
|
3329
|
-
defaultValue: true,
|
3330
|
-
dataType: 'boolean',
|
3331
|
-
interface: {
|
3332
|
-
name: 'showForecast',
|
3333
|
-
path: 'options.showForecast',
|
3334
|
-
type: AXPWidgetsCatalog.toggle,
|
3335
|
-
},
|
3336
|
-
},
|
3337
|
-
visible: true,
|
3338
|
-
},
|
3339
|
-
{
|
3340
|
-
name: 'forecastDays',
|
3341
|
-
title: 'Forecast Days',
|
3342
|
-
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
3343
|
-
schema: {
|
3344
|
-
defaultValue: 5,
|
3345
|
-
dataType: 'number',
|
3346
|
-
interface: {
|
3347
|
-
name: 'forecastDays',
|
3348
|
-
path: 'options.forecastDays',
|
3349
|
-
type: AXPWidgetsCatalog.number,
|
3350
|
-
options: {
|
3351
|
-
minValue: 1,
|
3352
|
-
maxValue: 7,
|
3353
|
-
step: 1,
|
3354
|
-
},
|
3355
|
-
},
|
3356
|
-
},
|
3357
|
-
visible: true,
|
3358
|
-
},
|
3359
|
-
/* Units Settings */
|
3360
|
-
{
|
3361
|
-
name: 'temperatureUnit',
|
3362
|
-
title: 'Temperature Unit',
|
3363
|
-
group: AXP_DATA_PROPERTY_GROUP,
|
3364
|
-
schema: {
|
3365
|
-
defaultValue: '°C',
|
3366
|
-
dataType: 'string',
|
3367
|
-
interface: {
|
3368
|
-
name: 'temperatureUnit',
|
3369
|
-
path: 'options.temperatureUnit',
|
3370
|
-
type: AXPWidgetsCatalog.select,
|
3371
|
-
options: {
|
3372
|
-
dataSource: ['°C', '°F'],
|
3373
|
-
},
|
3374
|
-
},
|
3375
|
-
},
|
3376
|
-
visible: true,
|
3377
|
-
},
|
3378
|
-
{
|
3379
|
-
name: 'windSpeedUnit',
|
3380
|
-
title: 'Wind Speed Unit',
|
3381
|
-
group: AXP_DATA_PROPERTY_GROUP,
|
3382
|
-
schema: {
|
3383
|
-
defaultValue: 'km/h',
|
3384
|
-
dataType: 'string',
|
3385
|
-
interface: {
|
3386
|
-
name: 'windSpeedUnit',
|
3387
|
-
path: 'options.windSpeedUnit',
|
3388
|
-
type: AXPWidgetsCatalog.select,
|
3389
|
-
options: {
|
3390
|
-
dataSource: ['km/h', 'mph', 'm/s'],
|
3391
|
-
},
|
3392
|
-
},
|
3393
|
-
},
|
3394
|
-
visible: true,
|
3395
|
-
},
|
3396
|
-
/* Refresh Settings */
|
3397
|
-
{
|
3398
|
-
name: 'autoRefresh',
|
3399
|
-
title: 'Auto Refresh',
|
3400
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
3401
|
-
schema: {
|
3402
|
-
defaultValue: true,
|
3403
|
-
dataType: 'boolean',
|
3404
|
-
interface: {
|
3405
|
-
name: 'autoRefresh',
|
3406
|
-
path: 'options.autoRefresh',
|
3407
|
-
type: AXPWidgetsCatalog.toggle,
|
3408
|
-
},
|
3409
|
-
},
|
3410
|
-
visible: true,
|
3411
|
-
},
|
3412
|
-
{
|
3413
|
-
name: 'refreshInterval',
|
3414
|
-
title: 'Refresh Interval (minutes)',
|
3415
|
-
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
3416
|
-
schema: {
|
3417
|
-
defaultValue: 15,
|
3418
|
-
dataType: 'number',
|
3419
|
-
interface: {
|
3420
|
-
name: 'refreshInterval',
|
3421
|
-
path: 'options.refreshInterval',
|
3422
|
-
type: AXPWidgetsCatalog.select,
|
3423
|
-
options: {
|
3424
|
-
dataSource: [5, 10, 15, 30, 60],
|
3425
|
-
},
|
3426
|
-
},
|
3427
|
-
},
|
3428
|
-
visible: true,
|
3429
|
-
},
|
3430
|
-
],
|
3431
|
-
components: {
|
3432
|
-
view: {
|
3433
|
-
component: () => Promise.resolve().then(function () { return weatherWidget_component; }).then((c) => c.AXPWeatherWidgetViewComponent),
|
3434
|
-
},
|
3435
|
-
},
|
3436
|
-
meta: {
|
3437
|
-
dimensions: {
|
3438
|
-
width: 3,
|
3439
|
-
height: 7,
|
3440
|
-
minWidth: 2,
|
3441
|
-
minHeight: 4,
|
3442
|
-
maxWidth: 4,
|
3443
|
-
maxHeight: 8,
|
3444
|
-
},
|
3445
|
-
},
|
3446
|
-
};
|
3447
|
-
|
3448
|
-
class AXPDashboardShortcutWidgetViewComponent extends AXPLayoutWidgetComponent {
|
3449
|
-
constructor() {
|
3450
|
-
super(...arguments);
|
3451
|
-
this.popupService = inject(AXPopupService);
|
3452
|
-
this.workflow = inject(AXPWorkflowService);
|
3453
|
-
this.searchConfig = inject(AXP_GLOBAL_SEARCH_CONFIG_TOKEN);
|
3454
|
-
this.item = computed(() => this.options()['item']);
|
3455
|
-
this.color = computed(() => this.options()['color']);
|
3456
|
-
}
|
3457
|
-
ngOnInit() {
|
3458
|
-
super.ngOnInit();
|
3459
|
-
if (!this.color()) {
|
3460
|
-
this.setOptions({
|
3461
|
-
color: AXPDataGenerator.color()
|
3462
|
-
});
|
3463
|
-
}
|
3464
|
-
}
|
3465
|
-
async executeCommand() {
|
3466
|
-
if (this.item()?.command) {
|
3467
|
-
await this.workflow.execute(this.item().command.name, this.item().command.options);
|
3468
|
-
}
|
3469
|
-
}
|
3470
|
-
async setCommand() {
|
3471
|
-
const component = await this.searchConfig.window();
|
3472
|
-
const popup = await this.popupService.open(component, {
|
3473
|
-
title: 'Choose command...',
|
3474
|
-
size: 'fit',
|
3475
|
-
closeOnBackdropClick: true,
|
3476
|
-
header: false,
|
3477
|
-
});
|
3478
|
-
if (popup.data) {
|
3479
|
-
const result = popup.data;
|
3480
|
-
if (result && result.command) {
|
3481
|
-
this.setOptions({
|
3482
|
-
item: {
|
3483
|
-
name: result.name,
|
3484
|
-
title: result.title,
|
3485
|
-
description: result.description,
|
3486
|
-
icon: result.icon,
|
3487
|
-
command: result.command
|
3488
|
-
}
|
3489
|
-
});
|
3490
|
-
}
|
3491
|
-
}
|
3492
|
-
}
|
3493
|
-
get __style() {
|
3494
|
-
const cls = {};
|
3495
|
-
cls[`background-color`] = this.color();
|
3496
|
-
return cls;
|
3497
|
-
}
|
3498
|
-
get __class() {
|
3499
|
-
const cls = {};
|
3500
|
-
cls[`ax-flex`] = true;
|
3501
|
-
cls[`ax-flex-col`] = true;
|
3502
|
-
cls[`ax-items-center`] = true;
|
3503
|
-
cls[`ax-justify-center`] = true;
|
3504
|
-
cls[`ax-w-full`] = true;
|
3505
|
-
cls[`ax-h-full`] = true;
|
3506
|
-
cls[`ax-text-center`] = true;
|
3507
|
-
cls[`ax-overflow-hidden`] = true;
|
3508
|
-
cls[`ax-cursor-pointer`] = true;
|
3509
|
-
cls[`ax-text-white`] = true;
|
3510
|
-
return cls;
|
3511
|
-
}
|
3512
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDashboardShortcutWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
3513
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPDashboardShortcutWidgetViewComponent, isStandalone: true, selector: "ng-component", host: { properties: { "style": "this.__style", "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
|
3514
|
-
@if(item()) {
|
3515
|
-
<div
|
3516
|
-
class="ax-group ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-3 ax-w-full ax-h-full ax-relative ax-overflow-hidden "
|
3517
|
-
(click)="executeCommand()">
|
3518
|
-
<div class="ax-absolute ax-inset-0 ax-bg-black/0 hover:ax-bg-black/10 ax-transition-opacity"></div>
|
3519
|
-
<i [class]="item().icon + ' ax-text-3xl'"></i>
|
3520
|
-
<span class="ax-text-xl ax-font-semibold">{{ item().title | translate | async }}</span>
|
3521
|
-
@if(item().description) {
|
3522
|
-
<span class="ax-text-sm ax-opacity-90 ax-text-center ax-px-2">{{ item().description! | translate | async }}</span>
|
3523
|
-
}
|
3524
|
-
</div>
|
3525
|
-
} @else {
|
3526
|
-
<div
|
3527
|
-
(click)="setCommand()"
|
3528
|
-
class="ax-group ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-3 ax-w-full ax-h-full ax-relative ax-overflow-hidden">
|
3529
|
-
<div class="ax-absolute ax-inset-0 ax-bg-black/0 hover:ax-bg-black/5 ax-transition-opacity"></div>
|
3530
|
-
<i class="fa-light fa-plus ax-text-3xl"></i>
|
3531
|
-
<span class="ax-text-xl ax-font-semibold">Add Shortcut</span>
|
3532
|
-
</div>
|
3533
|
-
}
|
3534
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
3535
|
-
}
|
3536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDashboardShortcutWidgetViewComponent, decorators: [{
|
3537
|
-
type: Component,
|
3538
|
-
args: [{
|
3539
|
-
template: `
|
3540
|
-
@if(item()) {
|
3541
|
-
<div
|
3542
|
-
class="ax-group ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-3 ax-w-full ax-h-full ax-relative ax-overflow-hidden "
|
3543
|
-
(click)="executeCommand()">
|
3544
|
-
<div class="ax-absolute ax-inset-0 ax-bg-black/0 hover:ax-bg-black/10 ax-transition-opacity"></div>
|
3545
|
-
<i [class]="item().icon + ' ax-text-3xl'"></i>
|
3546
|
-
<span class="ax-text-xl ax-font-semibold">{{ item().title | translate | async }}</span>
|
3547
|
-
@if(item().description) {
|
3548
|
-
<span class="ax-text-sm ax-opacity-90 ax-text-center ax-px-2">{{ item().description! | translate | async }}</span>
|
3549
|
-
}
|
3550
|
-
</div>
|
3551
|
-
} @else {
|
3552
|
-
<div
|
3553
|
-
(click)="setCommand()"
|
3554
|
-
class="ax-group ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-3 ax-w-full ax-h-full ax-relative ax-overflow-hidden">
|
3555
|
-
<div class="ax-absolute ax-inset-0 ax-bg-black/0 hover:ax-bg-black/5 ax-transition-opacity"></div>
|
3556
|
-
<i class="fa-light fa-plus ax-text-3xl"></i>
|
3557
|
-
<span class="ax-text-xl ax-font-semibold">Add Shortcut</span>
|
3558
|
-
</div>
|
3559
|
-
}
|
3560
|
-
`,
|
3561
|
-
standalone: true,
|
3562
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3563
|
-
imports: [CommonModule, AXTranslationModule]
|
3564
|
-
}]
|
3565
|
-
}], propDecorators: { __style: [{
|
3566
|
-
type: HostBinding,
|
3567
|
-
args: ['style']
|
3568
|
-
}], __class: [{
|
3569
|
-
type: HostBinding,
|
3570
|
-
args: ['class']
|
3571
|
-
}] } });
|
3572
|
-
|
3573
|
-
var dashboardShortcutWidgetView_component = /*#__PURE__*/Object.freeze({
|
3574
|
-
__proto__: null,
|
3575
|
-
AXPDashboardShortcutWidgetViewComponent: AXPDashboardShortcutWidgetViewComponent
|
3576
|
-
});
|
3577
|
-
|
3578
|
-
const AXPDashboardShortcutWidget = {
|
3579
|
-
name: "dashboard-shortcut",
|
3580
|
-
title: "Shortcut",
|
3581
|
-
description: 'Quick access to your key features.',
|
3582
|
-
type: 'view',
|
3583
|
-
categories: [AXP_WIDGETS_UTILITY_CATEGORY],
|
3584
|
-
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
3585
|
-
icon: "fa-light fa-link",
|
3586
|
-
properties: [
|
3587
|
-
AXP_COLOR_PROPERTY
|
3588
|
-
],
|
3589
|
-
meta: {
|
3590
|
-
dimensions: {
|
3591
|
-
width: 2,
|
3592
|
-
height: 2,
|
3593
|
-
minWidth: 1,
|
3594
|
-
minHeight: 1,
|
3595
|
-
maxWidth: 3,
|
3596
|
-
maxHeight: 2,
|
3597
|
-
},
|
3598
|
-
},
|
3599
|
-
components: {
|
3600
|
-
view: {
|
3601
|
-
component: () => Promise.resolve().then(function () { return dashboardShortcutWidgetView_component; }).then((c) => c.AXPDashboardShortcutWidgetViewComponent),
|
3602
|
-
},
|
3603
|
-
}
|
3604
|
-
};
|
3605
|
-
|
3606
|
-
class AXMMenuProvider {
|
3607
|
-
constructor() {
|
3608
|
-
this.sessionService = inject(AXPSessionService);
|
3609
|
-
this.entityService = inject(AXPEntityService);
|
3610
|
-
}
|
3611
|
-
async provide(context) {
|
3612
|
-
const scope = RootConfig.config.i18n;
|
3613
|
-
const module = RootConfig.module;
|
3614
|
-
const appName = this.sessionService.application?.name;
|
3615
|
-
context.addItems([
|
3616
|
-
{
|
3617
|
-
priority: 9001,
|
3618
|
-
text: `t('root-menu', {scope: "${scope}"})`,
|
3619
|
-
icon: RootConfig.module.icon,
|
3620
|
-
data: {
|
3621
|
-
// requiredPermission: 'demo.admin.settings',
|
3622
|
-
},
|
3623
|
-
children: [
|
3624
|
-
{
|
3625
|
-
text: `t('dashboards', {scope: "${scope}"})`,
|
3626
|
-
path: `${this.sessionService.application?.name}/dashboard/management`,
|
3627
|
-
icon: RootConfig.entities.dashboard.icon,
|
3628
|
-
priority: 1,
|
3629
|
-
},
|
3630
|
-
],
|
3631
|
-
},
|
3632
|
-
]);
|
3633
|
-
const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);
|
3634
|
-
if (!isAuthorized) {
|
3635
|
-
return;
|
3636
|
-
}
|
3637
|
-
}
|
3638
|
-
}
|
3639
|
-
|
3640
|
-
function routesFactory() {
|
3641
|
-
const config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
3642
|
-
return {
|
3643
|
-
path: ':app',
|
3644
|
-
canActivate: [AXPAuthGuard],
|
3645
|
-
loadComponent: () => {
|
3646
|
-
return config.viewers.root();
|
3647
|
-
},
|
3648
|
-
children: [
|
3649
|
-
{
|
3650
|
-
path: 'dashboard',
|
3651
|
-
loadComponent: () => import('./acorex-modules-dashboard-management-home-dashboard-By3lZP-J.mjs').then((c) => c.AXMDashboardHomeComponent),
|
3652
|
-
children: [
|
3653
|
-
{
|
3654
|
-
path: 'management',
|
3655
|
-
loadComponent: () => import('./acorex-modules-dashboard-management-home-dashboard-By3lZP-J.mjs').then((c) => c.AXMDashboardHomeComponent),
|
3656
|
-
},
|
3657
|
-
],
|
3658
|
-
},
|
3659
|
-
],
|
3660
|
-
};
|
3661
|
-
}
|
3662
|
-
class AXMDashboardManagementModule {
|
3663
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
3664
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardManagementModule, imports: [i3$1.AXPLayoutBuilderModule] }); }
|
3665
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardManagementModule, providers: [
|
3666
|
-
{
|
3667
|
-
provide: AXMDashboardService,
|
3668
|
-
useClass: AXMDashboardServiceImpl,
|
3669
|
-
},
|
3670
|
-
{
|
3671
|
-
provide: AXP_HOME_PAGES,
|
3672
|
-
multi: true,
|
3673
|
-
useFactory: () => [
|
3674
|
-
{
|
3675
|
-
key: 'dashboard',
|
3676
|
-
title: 'Dashboard',
|
3677
|
-
route: routesFactory(),
|
3678
|
-
},
|
3679
|
-
],
|
3680
|
-
},
|
3681
|
-
AXPWidgetsModule,
|
3682
|
-
{
|
3683
|
-
provide: AXP_MENU_PROVIDER,
|
3684
|
-
useClass: AXMMenuProvider,
|
3685
|
-
multi: true,
|
3686
|
-
},
|
3687
|
-
{
|
3688
|
-
provide: AXP_ENTITY_DEFINITION_LOADER,
|
3689
|
-
useClass: AXMEntityProvider,
|
3690
|
-
multi: true,
|
3691
|
-
},
|
3692
|
-
{
|
3693
|
-
provide: AXMDashboardService,
|
3694
|
-
useClass: AXMDashboardServiceImpl,
|
3695
|
-
},
|
3696
|
-
{
|
3697
|
-
provide: AXP_HOME_PAGE_DEFAULT_KEY,
|
3698
|
-
useValue: 'dashboard',
|
3699
|
-
},
|
3700
|
-
], imports: [AXPLayoutBuilderModule.forChild({
|
3701
|
-
widgets: [
|
3702
|
-
AXPDashboardShortcutWidget,
|
3703
|
-
//charts
|
3704
|
-
AXPDonutChartWidget,
|
3705
|
-
AXPBarChartWidget,
|
3706
|
-
AXPLineChartWidget,
|
3707
|
-
AXPGaugeChartWidget,
|
3708
|
-
AXPStickyNoteWidget,
|
3709
|
-
AXPClockCalendarWidget,
|
3710
|
-
AXPWeatherWidget,
|
3711
|
-
AXPTaskListWidget,
|
3712
|
-
],
|
3713
|
-
})] }); }
|
3714
|
-
}
|
3715
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDashboardManagementModule, decorators: [{
|
3716
|
-
type: NgModule,
|
3717
|
-
args: [{
|
3718
|
-
imports: [
|
3719
|
-
AXPLayoutBuilderModule.forChild({
|
3720
|
-
widgets: [
|
3721
|
-
AXPDashboardShortcutWidget,
|
3722
|
-
//charts
|
3723
|
-
AXPDonutChartWidget,
|
3724
|
-
AXPBarChartWidget,
|
3725
|
-
AXPLineChartWidget,
|
3726
|
-
AXPGaugeChartWidget,
|
3727
|
-
AXPStickyNoteWidget,
|
3728
|
-
AXPClockCalendarWidget,
|
3729
|
-
AXPWeatherWidget,
|
3730
|
-
AXPTaskListWidget,
|
3731
|
-
],
|
3732
|
-
}),
|
3733
|
-
],
|
3734
|
-
exports: [],
|
3735
|
-
declarations: [],
|
3736
|
-
providers: [
|
3737
|
-
{
|
3738
|
-
provide: AXMDashboardService,
|
3739
|
-
useClass: AXMDashboardServiceImpl,
|
3740
|
-
},
|
3741
|
-
{
|
3742
|
-
provide: AXP_HOME_PAGES,
|
3743
|
-
multi: true,
|
3744
|
-
useFactory: () => [
|
3745
|
-
{
|
3746
|
-
key: 'dashboard',
|
3747
|
-
title: 'Dashboard',
|
3748
|
-
route: routesFactory(),
|
3749
|
-
},
|
3750
|
-
],
|
3751
|
-
},
|
3752
|
-
AXPWidgetsModule,
|
3753
|
-
{
|
3754
|
-
provide: AXP_MENU_PROVIDER,
|
3755
|
-
useClass: AXMMenuProvider,
|
3756
|
-
multi: true,
|
3757
|
-
},
|
3758
|
-
{
|
3759
|
-
provide: AXP_ENTITY_DEFINITION_LOADER,
|
3760
|
-
useClass: AXMEntityProvider,
|
3761
|
-
multi: true,
|
3762
|
-
},
|
3763
|
-
{
|
3764
|
-
provide: AXMDashboardService,
|
3765
|
-
useClass: AXMDashboardServiceImpl,
|
3766
|
-
},
|
3767
|
-
{
|
3768
|
-
provide: AXP_HOME_PAGE_DEFAULT_KEY,
|
3769
|
-
useValue: 'dashboard',
|
3770
|
-
},
|
3771
|
-
],
|
3772
|
-
}]
|
3773
|
-
}] });
|
3774
|
-
|
3775
|
-
/**
|
3776
|
-
* Generated bundle index. Do not edit.
|
3777
|
-
*/
|
3778
|
-
|
3779
|
-
export { AXMDashboardService as A, RootConfig as R, AXMDashboardManagementModule as a, AXPBarChartWidgetViewComponent as b, AXPBarChartWidget as c, AXP_WIDGETS_CHART_CATEGORY as d, AXP_WIDGETS_UTILITY_CATEGORY as e, AXPClockCalendarWidgetViewComponent as f, AXPClockCalendarWidget as g, AXP_TIMEZONE_OPTIONS as h, AXP_DATE_FORMAT_OPTIONS as i, AXPDonutChartWidgetViewComponent as j, AXPDonutChartWidget as k, AXPGaugeChartWidgetViewComponent as l, AXPGaugeChartWidget as m, AXPLineChartWidgetViewComponent as n, AXPLineChartWidget as o, AXPStickyNoteWidgetViewComponent as p, AXPStickyNoteWidget as q, AXPTaskListWidgetViewComponent as r, AXPTaskListWidget as s, AXPWeatherApiAbstract as t, AXPWeatherApiMockService as u, AXPWeatherApiService as v, AXPWeatherWidgetViewComponent as w, AXPWeatherWidget as x };
|
3780
|
-
//# sourceMappingURL=acorex-modules-dashboard-management-acorex-modules-dashboard-management-DKGnh_V9.mjs.map
|