@acorex/modules 19.2.20 → 19.3.0-next.0
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/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.d.ts +2 -2
- package/auth/lib/setting.provider.d.ts +4 -0
- package/common/index.d.ts +1 -0
- package/common/lib/entities/dashboard/dashboard.types.d.ts +1 -1
- package/common/lib/features/{dashboard-home/dashboard-home.d.ts → home-dashboard/dashboard-home/home-dashboard.d.ts} +72 -52
- package/common/lib/features/{dashboard-home/dashboard-home.store.d.ts → home-dashboard/dashboard-home/home-dashboard.store.d.ts} +9 -4
- package/common/lib/features/home-dashboard/dashboard-home/index.d.ts +3 -0
- package/common/lib/features/{dashboard-popups → home-dashboard/dashboard-popups}/add-dashboard-popup.d.ts +7 -5
- package/common/lib/features/home-dashboard/dashboard-popups/configuration-popup.d.ts +14 -0
- package/common/lib/features/{dashboard-popups → home-dashboard/dashboard-popups}/dashboard-popup.service.d.ts +5 -4
- package/common/lib/features/home-dashboard/setrting.keys.d.ts +3 -0
- package/common/lib/features/{widget-wrapper → home-dashboard/widget-wrapper}/dashboard-widget-wrapper.d.ts +2 -1
- package/common/lib/menu.provider.d.ts +1 -1
- package/conversation/lib/entities/chat/pages/chat/chat.component.d.ts +1 -1
- package/conversation/lib/entities/comments/comments.service.d.ts +4 -4
- package/conversation/lib/entities/comments/comments.type.d.ts +1 -1
- package/document-management/lib/badge.provider.d.ts +11 -0
- package/document-management/lib/entities/document/document.service.d.ts +1 -1
- package/document-management/lib/entities/document/document.types.d.ts +2 -0
- package/document-management/lib/entities/document-type/document-type.service.d.ts +3 -3
- package/document-management/lib/entities/folder/folder.service.d.ts +2 -7
- package/document-management/lib/entities/folder/folder.types.d.ts +2 -1
- package/document-management/lib/features/document-explorer/components/create-folder-dialog/create-folder-dialog.component.d.ts +6 -0
- package/document-management/lib/features/document-explorer/document-explorer.component.d.ts +18 -8
- package/document-management/lib/features/document-explorer/document-explorer.viewmodel.d.ts +10 -6
- package/document-management/lib/features/document-explorer/views/detail-panel/detail-panel.component.d.ts +40 -36
- package/document-management/lib/features/document-explorer/views/details/details-view.component.d.ts +40 -36
- package/document-management/lib/features/document-explorer/views/large-icons/large-icons-view.component.d.ts +40 -36
- package/document-management/lib/features/document-explorer/views/large-tiles/large-tiles-view.component.d.ts +40 -36
- package/document-management/lib/features/document-explorer/views/list/list-view.component.d.ts +40 -36
- package/document-management/lib/features/document-explorer/views/small-icons/small-icons-view.component.d.ts +40 -36
- package/document-management/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.d.ts +40 -36
- package/document-management/lib/features/drive/drive.component.d.ts +15 -9
- package/document-management/lib/features/drive/index.d.ts +3 -0
- package/document-management/lib/features/drive-choose/drive-choose.component.d.ts +16 -8
- package/document-management/lib/features/shared/components/document-type-choose-file/document-type-choose-file.component.d.ts +16 -0
- package/document-management/lib/features/shared/components/file-viewer-popup/file-viewer-popup.component.d.ts +5 -1
- package/document-management/lib/features/shared/components/folder-path-breadcrumbs/folder-path-breadcrumbs.component.d.ts +10 -6
- package/document-management/lib/features/shared/components/index.d.ts +1 -0
- package/document-management/lib/features/shared/components/link-dialog/link-dialog.component.d.ts +24 -0
- package/document-management/lib/features/shared/components/lock-dialog/lock-dialog.component.d.ts +16 -0
- package/document-management/lib/features/shared/components/share-dialog/share-dialog.component.d.ts +22 -0
- package/document-management/lib/features/shared/components/share-email-dialog/share-email-dialog.component.d.ts +17 -0
- package/document-management/lib/features/shared/components/unlock-dialog/unlock-dialog.component.d.ts +10 -0
- package/document-management/lib/features/shared/document-manager.service.d.ts +43 -22
- package/document-management/lib/features/shared/document-manager.types.d.ts +5 -7
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-column.component.d.ts +1 -1
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +66 -44
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-print.component.d.ts +1 -1
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-view.component.d.ts +1 -1
- package/document-management/lib/features/widgets/document-attachment/index.d.ts +0 -1
- package/fesm2022/acorex-modules-application-management.mjs +0 -1
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-DrcL7GCj.mjs → acorex-modules-auth-acorex-modules-auth-5o4GqqVA.mjs} +15 -19
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-5o4GqqVA.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-CbJb1P_k.mjs → acorex-modules-auth-app-chooser.component-NuQzP5DC.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-CbJb1P_k.mjs.map → acorex-modules-auth-app-chooser.component-NuQzP5DC.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-DFCB1l7W.mjs → acorex-modules-auth-login.module-B_WrZQJx.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-DFCB1l7W.mjs.map → acorex-modules-auth-login.module-B_WrZQJx.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-CuKXvY0o.mjs → acorex-modules-auth-master.layout-hDbrFbwO.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-CuKXvY0o.mjs.map → acorex-modules-auth-master.layout-hDbrFbwO.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-DacOjakT.mjs → acorex-modules-auth-password.component-BnT_IaqN.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-DacOjakT.mjs.map → acorex-modules-auth-password.component-BnT_IaqN.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-5gwz30CZ.mjs → acorex-modules-auth-password.component-DDE0M5GE.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-5gwz30CZ.mjs.map → acorex-modules-auth-password.component-DDE0M5GE.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-D018Lg-b.mjs → acorex-modules-auth-routes-Da02kID6.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-D018Lg-b.mjs.map → acorex-modules-auth-routes-Da02kID6.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-setting.provider-D3A0WUgJ.mjs +271 -0
- package/fesm2022/acorex-modules-auth-setting.provider-D3A0WUgJ.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-two-factor.module-DiEB7VWl.mjs → acorex-modules-auth-two-factor.module-BrDpX4X1.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-DiEB7VWl.mjs.map → acorex-modules-auth-two-factor.module-BrDpX4X1.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-common-index-rvP9ISgL.mjs +717 -0
- package/fesm2022/acorex-modules-common-index-rvP9ISgL.mjs.map +1 -0
- package/fesm2022/acorex-modules-common.mjs +34 -24
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +4 -2
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-_BOVaDOq.mjs → acorex-modules-document-management-acorex-modules-document-management-CI0m4lpX.mjs} +1015 -260
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-CI0m4lpX.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-D8anTs3Q.mjs +117 -0
- package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-D8anTs3Q.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-details-view.component-BHcu_gYH.mjs → acorex-modules-document-management-details-view.component-z05RykKt.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-details-view.component-BHcu_gYH.mjs.map → acorex-modules-document-management-details-view.component-z05RykKt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-WoZfDyLK.mjs → acorex-modules-document-management-drive-choose.component-BeiXQNAw.mjs} +22 -16
- package/fesm2022/acorex-modules-document-management-drive-choose.component-BeiXQNAw.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-DvriE0YR.mjs → acorex-modules-document-management-large-icons-view.component-DctO0SZ7.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-DvriE0YR.mjs.map → acorex-modules-document-management-large-icons-view.component-DctO0SZ7.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-ByWrKvZe.mjs → acorex-modules-document-management-large-tiles-view.component-CtCdVI_p.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-ByWrKvZe.mjs.map → acorex-modules-document-management-large-tiles-view.component-CtCdVI_p.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-link-dialog.component-1iPUnhr1.mjs +70 -0
- package/fesm2022/acorex-modules-document-management-link-dialog.component-1iPUnhr1.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-list-view.component-B6J6Tokv.mjs → acorex-modules-document-management-list-view.component-Cz2wNqhM.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-list-view.component-B6J6Tokv.mjs.map → acorex-modules-document-management-list-view.component-Cz2wNqhM.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-lock-dialog.component-BwKdUUcf.mjs +52 -0
- package/fesm2022/acorex-modules-document-management-lock-dialog.component-BwKdUUcf.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-Dae6RWb8.mjs → acorex-modules-document-management-rename-node-dialog.component-DB868l1X.mjs} +10 -10
- package/fesm2022/acorex-modules-document-management-rename-node-dialog.component-DB868l1X.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management-share-dialog.component-BiNdRpqs.mjs +143 -0
- package/fesm2022/acorex-modules-document-management-share-dialog.component-BiNdRpqs.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management-share-email-dialog.component-BvR5OuCV.mjs +55 -0
- package/fesm2022/acorex-modules-document-management-share-email-dialog.component-BvR5OuCV.mjs.map +1 -0
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-TrYeB22e.mjs → acorex-modules-document-management-small-icons-view.component-B_O5Qpmi.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-TrYeB22e.mjs.map → acorex-modules-document-management-small-icons-view.component-B_O5Qpmi.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-DDKdWg8I.mjs → acorex-modules-document-management-small-tiles-view.component-b2lauUIY.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-DDKdWg8I.mjs.map → acorex-modules-document-management-small-tiles-view.component-b2lauUIY.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management-unlock-dialog.component-DkZQ84kg.mjs +37 -0
- package/fesm2022/acorex-modules-document-management-unlock-dialog.component-DkZQ84kg.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management.mjs +1 -1
- package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-CJYrDtq6.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-HYqIufS1.mjs} +30 -24
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-HYqIufS1.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-category.entity-BdiYytzK.mjs → acorex-modules-form-template-management-category.entity-CLFAo0Cn.mjs} +7 -3
- package/fesm2022/acorex-modules-form-template-management-category.entity-CLFAo0Cn.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-setting.provider-CoETMkEC.mjs → acorex-modules-form-template-management-setting.provider-DgHwqlhz.mjs} +20 -17
- package/fesm2022/acorex-modules-form-template-management-setting.provider-DgHwqlhz.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-0JfGxdMv.mjs → acorex-modules-form-template-management-template-picker.component-M-R2U9CH.mjs} +5 -4
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-M-R2U9CH.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-BkJ3ieIg.mjs → acorex-modules-form-template-management-template-widget-edit.component-CYAyug_g.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-BkJ3ieIg.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-CYAyug_g.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template.entity-ByE2p0Mu.mjs → acorex-modules-form-template-management-template.entity-DGU1QNSN.mjs} +53 -33
- package/fesm2022/acorex-modules-form-template-management-template.entity-DGU1QNSN.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-CThcXWpt.mjs → acorex-modules-form-template-management-viewer-popup.component-DXJxzTfM.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-CThcXWpt.mjs.map → acorex-modules-form-template-management-viewer-popup.component-DXJxzTfM.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +43 -35
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-JKQwYEPq.mjs → acorex-modules-organization-management-org-chart-configuration.page-BFu7TUGC.mjs} +3 -3
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-JKQwYEPq.mjs.map → acorex-modules-organization-management-org-chart-configuration.page-BFu7TUGC.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.service-QLdDEdqL.mjs → acorex-modules-organization-management-org-chart-configuration.service-B4ohp4o5.mjs} +5 -4
- package/fesm2022/acorex-modules-organization-management-org-chart-configuration.service-B4ohp4o5.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-C2ZtUVKI.mjs → acorex-modules-organization-management-org-chart.page-BIytyLYP.mjs} +3 -4
- package/fesm2022/acorex-modules-organization-management-org-chart.page-BIytyLYP.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-setting.provider-CMDpwkG2.mjs → acorex-modules-organization-management-setting.provider-BPjFNA5E.mjs} +44 -23
- package/fesm2022/acorex-modules-organization-management-setting.provider-BPjFNA5E.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +6 -6
- package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-DNUdH0N9.mjs +4703 -0
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-DNUdH0N9.mjs.map +1 -0
- package/fesm2022/{acorex-modules-platform-management-list-version.component-C9764yzu.mjs → acorex-modules-platform-management-list-version.component-D3yLcmjw.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-list-version.component-C9764yzu.mjs.map → acorex-modules-platform-management-list-version.component-D3yLcmjw.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management-setting.provider-CQCoLwHW.mjs +335 -0
- package/fesm2022/acorex-modules-platform-management-setting.provider-CQCoLwHW.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management.mjs +1 -4866
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +18 -12
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/form-template-management/lib/entities/category/category.service.d.ts +2 -2
- package/form-template-management/lib/entities/category/category.types.d.ts +2 -1
- package/form-template-management/lib/entities/template/template.service.d.ts +2 -2
- package/form-template-management/lib/entities/template/template.types.d.ts +38 -5
- package/form-template-management/lib/features/designer/template.provider.d.ts +1 -1
- package/form-template-management/lib/features/designer/widgets/template-picker/template.provider.d.ts +3 -3
- package/form-template-management/lib/setting.provider.d.ts +4 -0
- package/notification-management/lib/setting.provider.d.ts +4 -0
- package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +2 -2
- package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +2 -2
- package/organization-management/lib/setting.provider.d.ts +5 -3
- package/package.json +1 -1
- package/platform-management/lib/common/regional/setting.keys.d.ts +3 -1
- package/platform-management/lib/common/regional/setting.provider.d.ts +4 -1
- package/security-management/lib/entities/users/users.service.d.ts +4 -4
- package/security-management/lib/entities/users/users.types.d.ts +0 -4
- package/common/lib/features/dashboard-home/index.d.ts +0 -1
- package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-filter.component.d.ts +0 -6
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-DrcL7GCj.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-setting.provider-DDl3OHw6.mjs +0 -59
- package/fesm2022/acorex-modules-auth-setting.provider-DDl3OHw6.mjs.map +0 -1
- package/fesm2022/acorex-modules-common-index-D90SN6SH.mjs +0 -507
- package/fesm2022/acorex-modules-common-index-D90SN6SH.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-_BOVaDOq.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-D66KoQNb.mjs +0 -92
- package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-D66KoQNb.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-drive-choose.component-WoZfDyLK.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-drive.component-B3BCzdVv.mjs +0 -305
- package/fesm2022/acorex-modules-document-management-drive.component-B3BCzdVv.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-rename-node-dialog.component-Dae6RWb8.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-CJYrDtq6.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-category.entity-BdiYytzK.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-setting.provider-CoETMkEC.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-0JfGxdMv.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template.entity-ByE2p0Mu.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart-configuration.service-QLdDEdqL.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-org-chart.page-C2ZtUVKI.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-setting.provider-CMDpwkG2.mjs.map +0 -1
- /package/common/lib/features/{dashboard-home/dashboard.type.d.ts → home-dashboard/dashboard-home/home-dashboard.type.d.ts} +0 -0
@@ -1,21 +1,21 @@
|
|
1
1
|
import { AXPSessionService, AXPAuthGuard, AXP_PERMISSION_PROVIDER } from '@acorex/platform/auth';
|
2
|
-
import { AXPSearchCommandProvider, createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService,
|
2
|
+
import { AXPSearchCommandProvider, createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPSettingService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_TASK_BADGE_PROVIDERS } from '@acorex/platform/common';
|
3
3
|
import { AXPEntityService, AXMEntityCrudServiceImpl, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { inject, Injector, Injectable, NgModule, ChangeDetectionStrategy, Component, signal, computed, viewChild, input, effect, ViewEncapsulation } from '@angular/core';
|
5
|
+
import { inject, Injector, Injectable, NgModule, ChangeDetectionStrategy, Component, signal, computed, viewChild, input, effect, ViewEncapsulation, afterNextRender, untracked, HostListener } from '@angular/core';
|
6
6
|
import { firstValueFrom } from 'rxjs';
|
7
7
|
import * as i6 from '@acorex/platform/layout/builder';
|
8
|
-
import { AXPWidgetsCatalog, AXPWidgetComponent, AXPLayoutBuilderModule,
|
9
|
-
import { RouterModule, ROUTES } from '@angular/router';
|
8
|
+
import { AXPWidgetsCatalog, AXPWidgetComponent, AXPLayoutBuilderModule, AXP_WIDGETS_ADVANCE_CATEGORY, AXPPageStatus, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/builder';
|
9
|
+
import { RouterModule, Router, ActivatedRoute, ROUTES } from '@angular/router';
|
10
10
|
import { AXDataSource } from '@acorex/components/common';
|
11
11
|
import { AXMMetaDataDefinitionService } from '@acorex/modules/platform-management';
|
12
12
|
import * as i1$1 from '@angular/common';
|
13
13
|
import { CommonModule } from '@angular/common';
|
14
|
-
import * as i7
|
14
|
+
import * as i7 from '@acorex/components/collapse';
|
15
15
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
16
|
-
import * as
|
16
|
+
import * as i2$1 from '@acorex/components/decorators';
|
17
17
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
18
|
-
import * as
|
18
|
+
import * as i3 from '@acorex/components/form';
|
19
19
|
import { AXFormModule } from '@acorex/components/form';
|
20
20
|
import * as i4 from '@acorex/components/label';
|
21
21
|
import { AXLabelModule } from '@acorex/components/label';
|
@@ -27,28 +27,35 @@ import get from 'lodash-es/get';
|
|
27
27
|
import set from 'lodash-es/set';
|
28
28
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/widgets';
|
29
29
|
import * as i3$2 from '@acorex/components/media-viewer';
|
30
|
-
import { AXMediaViewerModule } from '@acorex/components/media-viewer';
|
30
|
+
import { AXMediaViewerContainerComponent, AXMediaViewerModule } from '@acorex/components/media-viewer';
|
31
31
|
import * as i3$4 from '@acorex/platform/workflow';
|
32
32
|
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
33
|
-
import * as i2$
|
33
|
+
import * as i2$3 from '@acorex/components/button';
|
34
34
|
import { AXButtonModule, AXButtonComponent } from '@acorex/components/button';
|
35
35
|
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
36
|
-
import * as
|
36
|
+
import * as i3$3 from '@acorex/components/dropdown';
|
37
37
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
38
38
|
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
39
|
-
import
|
39
|
+
import { AXFileService, AXFileModule } from '@acorex/core/file';
|
40
|
+
import * as i4$1 from '@acorex/core/translation';
|
40
41
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
42
|
+
import { AXPPlatformScope, resolvePlatformScopeKey, resolvePlatformScopeName, AXPDataGenerator } from '@acorex/platform/core';
|
41
43
|
import { AXLoadingModule } from '@acorex/components/loading';
|
42
44
|
import * as i3$1 from '@acorex/components/menu';
|
43
45
|
import { AXMenuModule } from '@acorex/components/menu';
|
44
46
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
47
|
+
import * as i2$2 from '@acorex/core/format';
|
45
48
|
import { AXFormatModule } from '@acorex/core/format';
|
46
|
-
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
47
|
-
import { get as get$1, set as set$1 } from 'lodash-es';
|
49
|
+
import { AXPLayoutThemeService, AXPThemeLayoutBlockComponent } from '@acorex/platform/themes/shared';
|
50
|
+
import { castArray, get as get$1, set as set$1 } from 'lodash-es';
|
48
51
|
import { AXDialogService } from '@acorex/components/dialog';
|
49
52
|
import { AXPopupService } from '@acorex/components/popup';
|
50
|
-
import { AXFileService } from '@acorex/core/file';
|
51
53
|
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
54
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
55
|
+
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
56
|
+
import * as i6$1 from '@acorex/components/search-box';
|
57
|
+
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
58
|
+
import { AXPBasePageComponent, AXPPageLayoutComponent, AXPBasePage } from '@acorex/platform/themes/default';
|
52
59
|
import { AXBasePageComponent } from '@acorex/components/page';
|
53
60
|
import { AXUploaderService } from '@acorex/components/uploader';
|
54
61
|
|
@@ -155,12 +162,14 @@ class AXMMenuProvider {
|
|
155
162
|
text: RootConfig.entities.documentType.title,
|
156
163
|
path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.documentType.name),
|
157
164
|
icon: RootConfig.entities.documentType.icon,
|
165
|
+
badgeKey: 'badge-1',
|
158
166
|
priority: 2
|
159
167
|
},
|
160
168
|
{
|
161
|
-
text: RootConfig.
|
162
|
-
path: `${this.sessionService.application?.name}/drive/
|
169
|
+
text: `t('scope.tenant.title', {scope: "${RootConfig.config.i18n}"})`,
|
170
|
+
path: `${this.sessionService.application?.name}/drive/tenant`,
|
163
171
|
icon: RootConfig.entities.document.icon,
|
172
|
+
badgeKey: 'badge-2',
|
164
173
|
priority: 1
|
165
174
|
}
|
166
175
|
]
|
@@ -170,9 +179,9 @@ class AXMMenuProvider {
|
|
170
179
|
context.find('edit-profile').insert([
|
171
180
|
{
|
172
181
|
name: 'my-notifications',
|
173
|
-
text: `t('
|
182
|
+
text: `t('scope.user.title', {scope: "${RootConfig.config.i18n}"})`,
|
174
183
|
icon: 'fa-light fa-folder-open',
|
175
|
-
path: `${this.sessionService.application?.name}/drive/
|
184
|
+
path: `${this.sessionService.application?.name}/drive/user`,
|
176
185
|
data: {
|
177
186
|
scope: 'user'
|
178
187
|
},
|
@@ -296,6 +305,9 @@ async function documentFactory(injector) {
|
|
296
305
|
dataType: 'string',
|
297
306
|
interface: {
|
298
307
|
type: AXPWidgetsCatalog.text,
|
308
|
+
options: {
|
309
|
+
placeholder: 't("name", { scope: "common" })',
|
310
|
+
},
|
299
311
|
},
|
300
312
|
},
|
301
313
|
validations: [
|
@@ -674,14 +686,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
674
686
|
|
675
687
|
class AXMDocumentTypeService extends AXMEntityCrudServiceImpl {
|
676
688
|
}
|
677
|
-
class
|
689
|
+
class AXMDocumentTypeServiceImpl extends AXMDocumentTypeService {
|
678
690
|
constructor() {
|
679
691
|
super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
|
680
692
|
}
|
681
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
682
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
693
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
694
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentTypeServiceImpl }); }
|
683
695
|
}
|
684
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentTypeServiceImpl, decorators: [{
|
685
697
|
type: Injectable
|
686
698
|
}], ctorParameters: () => [] });
|
687
699
|
|
@@ -1129,7 +1141,7 @@ class AXMDocumentManagementDocumentTypeEntityModule {
|
|
1129
1141
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
|
1130
1142
|
{
|
1131
1143
|
provide: AXMDocumentTypeService,
|
1132
|
-
useClass:
|
1144
|
+
useClass: AXMDocumentTypeServiceImpl,
|
1133
1145
|
},
|
1134
1146
|
] }); }
|
1135
1147
|
}
|
@@ -1142,7 +1154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
1142
1154
|
providers: [
|
1143
1155
|
{
|
1144
1156
|
provide: AXMDocumentTypeService,
|
1145
|
-
useClass:
|
1157
|
+
useClass: AXMDocumentTypeServiceImpl,
|
1146
1158
|
},
|
1147
1159
|
],
|
1148
1160
|
}]
|
@@ -2209,7 +2221,6 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
2209
2221
|
__proto__: null,
|
2210
2222
|
AXMDocumentManagementDocumentEntityModule: AXMDocumentManagementDocumentEntityModule,
|
2211
2223
|
AXMDocumentManagementDocumentTypeEntityModule: AXMDocumentManagementDocumentTypeEntityModule,
|
2212
|
-
AXMDocumentManagementDocumentTypeEntityServiceImpl: AXMDocumentManagementDocumentTypeEntityServiceImpl,
|
2213
2224
|
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
2214
2225
|
AXMDocumentManagementDocumentTypeMetaDefinitionEntityService: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
2215
2226
|
AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
@@ -2222,6 +2233,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
2222
2233
|
AXMDocumentService: AXMDocumentService,
|
2223
2234
|
AXMDocumentServiceImpl: AXMDocumentServiceImpl,
|
2224
2235
|
AXMDocumentTypeService: AXMDocumentTypeService,
|
2236
|
+
AXMDocumentTypeServiceImpl: AXMDocumentTypeServiceImpl,
|
2225
2237
|
AXMFolderService: AXMFolderService,
|
2226
2238
|
AXMFolderServiceImpl: AXMFolderServiceImpl,
|
2227
2239
|
documentFactory: documentFactory,
|
@@ -2651,7 +2663,6 @@ class AXMFileTypeExtensionWidgetEditComponent extends AXPWidgetComponent {
|
|
2651
2663
|
super.ngOnInit();
|
2652
2664
|
this.selectedItems.set(this.getValue()?.selectedItems ?? []);
|
2653
2665
|
this.context.set(this.getValue()?.context ?? {});
|
2654
|
-
console.log(this.selectedItems());
|
2655
2666
|
}
|
2656
2667
|
outputs() {
|
2657
2668
|
return ['selectedItems', 'context'];
|
@@ -2772,7 +2783,7 @@ class AXMFileTypeExtensionWidgetEditComponent extends AXPWidgetComponent {
|
|
2772
2783
|
</ax-collapse-group>
|
2773
2784
|
}
|
2774
2785
|
</axp-widgets-container>
|
2775
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type:
|
2786
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i3.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i7.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i7.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2776
2787
|
}
|
2777
2788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetEditComponent, decorators: [{
|
2778
2789
|
type: Component,
|
@@ -2879,8 +2890,8 @@ const AXmFileTypeExtensionWidget = {
|
|
2879
2890
|
name: 'file-type-extension',
|
2880
2891
|
title: 'File Type Extension',
|
2881
2892
|
description: 'Uploads and manages files',
|
2882
|
-
icon: 'fa-
|
2883
|
-
|
2893
|
+
icon: 'fa-light fa-files',
|
2894
|
+
categories: AXP_WIDGETS_ADVANCE_CATEGORY,
|
2884
2895
|
type: 'editor',
|
2885
2896
|
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
|
2886
2897
|
components: {
|
@@ -2998,13 +3009,6 @@ var documentAttachmentWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
2998
3009
|
AXMDocumentAttachmentWidgetColumnComponent: AXMDocumentAttachmentWidgetColumnComponent
|
2999
3010
|
});
|
3000
3011
|
|
3001
|
-
var AXMDriveScope;
|
3002
|
-
(function (AXMDriveScope) {
|
3003
|
-
AXMDriveScope["Platform"] = "P";
|
3004
|
-
AXMDriveScope["Tenant"] = "T";
|
3005
|
-
AXMDriveScope["User"] = "U";
|
3006
|
-
})(AXMDriveScope || (AXMDriveScope = {}));
|
3007
|
-
|
3008
3012
|
/**
|
3009
3013
|
* Service for handling document drive operations
|
3010
3014
|
*/
|
@@ -3016,9 +3020,28 @@ class AXMDocumentManagerService {
|
|
3016
3020
|
this.popupService = inject(AXPopupService);
|
3017
3021
|
this.dialogService = inject(AXDialogService);
|
3018
3022
|
this.fileService = inject(AXPFileStorageService);
|
3019
|
-
this.
|
3023
|
+
this.fileManagerService = inject(AXFileService);
|
3020
3024
|
this.workflow = inject(AXPWorkflowService);
|
3021
3025
|
this.scopedDriveCache = new Map();
|
3026
|
+
this.mapFolderDtoToFolderNode = (folder) => {
|
3027
|
+
return {
|
3028
|
+
id: folder.id,
|
3029
|
+
name: folder.name,
|
3030
|
+
type: 'folder',
|
3031
|
+
parentId: folder.parentId || null,
|
3032
|
+
modifiedAt: folder.updatedAt,
|
3033
|
+
createdAt: folder.createdAt,
|
3034
|
+
description: folder.description,
|
3035
|
+
childrenCount: folder.nodeCount,
|
3036
|
+
size: folder.size,
|
3037
|
+
documentTypes: folder.documentTypes,
|
3038
|
+
storageType: 'physical',
|
3039
|
+
children: [
|
3040
|
+
...(folder.folders?.map(this.mapFolderDtoToFolderNode) || []),
|
3041
|
+
...(folder.documents?.map(this.mapFileToNode) || []),
|
3042
|
+
],
|
3043
|
+
};
|
3044
|
+
};
|
3022
3045
|
}
|
3023
3046
|
scope(scope, options) {
|
3024
3047
|
const cacheKey = this.getScopeCacheKey(scope, options);
|
@@ -3059,7 +3082,7 @@ class AXMDocumentManagerService {
|
|
3059
3082
|
* @param tenantId The tenant ID
|
3060
3083
|
* @returns Tenant root folder
|
3061
3084
|
*/
|
3062
|
-
async getTenantRootFolder(
|
3085
|
+
async getTenantRootFolder(rootFolder, tenantId) {
|
3063
3086
|
if (!tenantId) {
|
3064
3087
|
throw new Error('Tenant ID is required');
|
3065
3088
|
}
|
@@ -3070,7 +3093,11 @@ class AXMDocumentManagerService {
|
|
3070
3093
|
operator: null,
|
3071
3094
|
logic: 'and',
|
3072
3095
|
filters: [
|
3073
|
-
{
|
3096
|
+
{
|
3097
|
+
field: 'parentId',
|
3098
|
+
operator: { type: 'equal' },
|
3099
|
+
value: rootFolder.folders?.find((f) => f.name === 'Tenants')?.id,
|
3100
|
+
},
|
3074
3101
|
{ field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
|
3075
3102
|
{ field: 'userId', operator: { type: 'isNull' } },
|
3076
3103
|
],
|
@@ -3110,63 +3137,83 @@ class AXMDocumentManagerService {
|
|
3110
3137
|
}
|
3111
3138
|
return result.items[0];
|
3112
3139
|
}
|
3113
|
-
|
3114
|
-
return {
|
3115
|
-
id: folder.id,
|
3116
|
-
name: folder.name,
|
3117
|
-
type: 'folder',
|
3118
|
-
parentId: folder.parentId || null,
|
3119
|
-
modifiedAt: folder.updatedAt,
|
3120
|
-
createdAt: folder.createdAt,
|
3121
|
-
description: folder.description,
|
3122
|
-
childrenCount: folder.nodeCount,
|
3123
|
-
size: folder.size,
|
3124
|
-
children: [
|
3125
|
-
...(folder.folders?.map((child) => ({
|
3126
|
-
id: child.id,
|
3127
|
-
name: child.name,
|
3128
|
-
type: 'folder',
|
3129
|
-
parentId: child.parentId || null,
|
3130
|
-
modifiedAt: child.updatedAt,
|
3131
|
-
createdAt: child.createdAt,
|
3132
|
-
childrenCount: child.nodeCount,
|
3133
|
-
description: child.description,
|
3134
|
-
size: child.size,
|
3135
|
-
})) || []),
|
3136
|
-
...(folder.documents?.map((doc) => ({
|
3137
|
-
id: doc.id,
|
3138
|
-
name: doc.name,
|
3139
|
-
type: 'file',
|
3140
|
-
parentId: doc.parentId,
|
3141
|
-
modifiedAt: doc.updatedAt,
|
3142
|
-
createdAt: doc.createdAt,
|
3143
|
-
size: doc.size,
|
3144
|
-
description: doc.description,
|
3145
|
-
})) || []),
|
3146
|
-
],
|
3147
|
-
};
|
3148
|
-
}
|
3149
|
-
async buildPath(node) {
|
3140
|
+
async buildPath(node, stopFolderId) {
|
3150
3141
|
if (node.type === 'file') {
|
3151
|
-
return (await this.documentService.getPath(node.id)).map(this.mapFolderDtoToFolderNode);
|
3142
|
+
return (await this.documentService.getPath(node.id, stopFolderId)).map(this.mapFolderDtoToFolderNode);
|
3143
|
+
}
|
3144
|
+
else {
|
3145
|
+
return (await this.folderService.getPath(node.id, stopFolderId)).map(this.mapFolderDtoToFolderNode);
|
3152
3146
|
}
|
3153
|
-
return (await this.folderService.getPath(node.id)).map(this.mapFolderDtoToFolderNode);
|
3154
3147
|
}
|
3155
|
-
async
|
3156
|
-
const
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3148
|
+
async showShareDialog(node) {
|
3149
|
+
const comp = (await import('./acorex-modules-document-management-share-dialog.component-BiNdRpqs.mjs')).AXMShareDialogComponent;
|
3150
|
+
const popup = await this.popupService.open(comp, {
|
3151
|
+
title: 'Share',
|
3152
|
+
data: {
|
3153
|
+
node,
|
3154
|
+
},
|
3155
|
+
});
|
3156
|
+
if (popup.data?.result) {
|
3157
|
+
// Handle the share action with popup.data.data
|
3158
|
+
}
|
3159
|
+
}
|
3160
|
+
async showShareWithEmailDialog(node) {
|
3161
|
+
const comp = (await import('./acorex-modules-document-management-share-email-dialog.component-BvR5OuCV.mjs'))
|
3162
|
+
.AXMShareEmailDialogComponent;
|
3163
|
+
const popup = await this.popupService.open(comp, {
|
3164
|
+
title: 'Share via Email',
|
3165
|
+
data: {
|
3166
|
+
node,
|
3167
|
+
},
|
3168
|
+
});
|
3169
|
+
if (popup.data?.result) {
|
3170
|
+
// Handle the share via email action with popup.data.data
|
3171
|
+
}
|
3172
|
+
}
|
3173
|
+
async showLinkDialog(node) {
|
3174
|
+
const comp = (await import('./acorex-modules-document-management-link-dialog.component-1iPUnhr1.mjs')).AXMLinkDialogComponent;
|
3175
|
+
const popup = await this.popupService.open(comp, {
|
3176
|
+
title: 'Share Link',
|
3177
|
+
data: {
|
3178
|
+
node,
|
3179
|
+
},
|
3180
|
+
});
|
3181
|
+
if (popup.data?.result) {
|
3182
|
+
// Handle the link generation with popup.data.data
|
3183
|
+
}
|
3184
|
+
}
|
3185
|
+
async showLockDialog(node) {
|
3186
|
+
const comp = (await import('./acorex-modules-document-management-lock-dialog.component-BwKdUUcf.mjs')).AXMLockDialogComponent;
|
3187
|
+
const popup = await this.popupService.open(comp, {
|
3188
|
+
title: 'Lock Document',
|
3189
|
+
data: {
|
3190
|
+
node,
|
3191
|
+
},
|
3192
|
+
});
|
3193
|
+
if (popup.data?.result) {
|
3194
|
+
// Handle the lock action with popup.data.data
|
3195
|
+
}
|
3196
|
+
}
|
3197
|
+
async showUnlockDialog(node) {
|
3198
|
+
const comp = (await import('./acorex-modules-document-management-unlock-dialog.component-DkZQ84kg.mjs')).AXMUnlockDialogComponent;
|
3199
|
+
const popup = await this.popupService.open(comp, {
|
3200
|
+
title: 'Unlock Document',
|
3201
|
+
data: {
|
3202
|
+
node,
|
3203
|
+
},
|
3204
|
+
});
|
3205
|
+
if (popup.data?.result) {
|
3206
|
+
// Handle the unlock action with popup.data.data
|
3207
|
+
}
|
3208
|
+
}
|
3209
|
+
async updateFileName(node, name) {
|
3210
|
+
if (node.storageType == 'physical') {
|
3211
|
+
return this.mapFileToNode(await this.documentService.updateOne(node.id, { name }));
|
3212
|
+
}
|
3213
|
+
else {
|
3214
|
+
node.name = name;
|
3215
|
+
return node;
|
3216
|
+
}
|
3170
3217
|
}
|
3171
3218
|
/**
|
3172
3219
|
* Gets the root folder based on the specified scope
|
@@ -3177,31 +3224,34 @@ class AXMDocumentManagerService {
|
|
3177
3224
|
async getRoot(scope, options) {
|
3178
3225
|
const rootFolder = await this.getPlatformRootFolder();
|
3179
3226
|
let result;
|
3227
|
+
let path = [];
|
3180
3228
|
switch (scope) {
|
3181
|
-
case
|
3229
|
+
case AXPPlatformScope.Platform:
|
3182
3230
|
result = this.mapFolderDtoToFolderNode(rootFolder);
|
3231
|
+
path = await this.buildPath(result);
|
3183
3232
|
break;
|
3184
|
-
case
|
3233
|
+
case AXPPlatformScope.Tenant: {
|
3185
3234
|
if (!options?.tenantId) {
|
3186
3235
|
throw new Error('Tenant ID is required for tenant scope');
|
3187
3236
|
}
|
3188
|
-
const tenantRoot = await this.getTenantRootFolder(rootFolder
|
3237
|
+
const tenantRoot = await this.getTenantRootFolder(rootFolder, options.tenantId);
|
3189
3238
|
result = this.mapFolderDtoToFolderNode(tenantRoot);
|
3239
|
+
path = await this.buildPath(result, tenantRoot.id);
|
3190
3240
|
break;
|
3191
3241
|
}
|
3192
|
-
case
|
3242
|
+
case AXPPlatformScope.User: {
|
3193
3243
|
if (!options?.tenantId || !options?.userId) {
|
3194
3244
|
throw new Error('Both Tenant ID and User ID are required for user scope');
|
3195
3245
|
}
|
3196
|
-
const tenantFolder = await this.getTenantRootFolder(rootFolder
|
3197
|
-
const userRoot = await this.getUserRootFolder(tenantFolder.id, options.tenantId, options.userId);
|
3246
|
+
const tenantFolder = await this.getTenantRootFolder(rootFolder, options.tenantId);
|
3247
|
+
const userRoot = await this.getUserRootFolder(tenantFolder.folders?.find((f) => f.name === 'Users')?.id, options.tenantId, options.userId);
|
3198
3248
|
result = this.mapFolderDtoToFolderNode(userRoot);
|
3249
|
+
path = await this.buildPath(result, userRoot.id);
|
3199
3250
|
break;
|
3200
3251
|
}
|
3201
3252
|
default:
|
3202
3253
|
throw new Error(`Invalid scope: ${scope}`);
|
3203
3254
|
}
|
3204
|
-
const path = await this.buildPath(result);
|
3205
3255
|
return { path, result };
|
3206
3256
|
}
|
3207
3257
|
/**
|
@@ -3209,7 +3259,7 @@ class AXMDocumentManagerService {
|
|
3209
3259
|
* @param folderId The folder ID to retrieve
|
3210
3260
|
* @returns The requested folder
|
3211
3261
|
*/
|
3212
|
-
async getFolder(folderId) {
|
3262
|
+
async getFolder(scope, folderId, options) {
|
3213
3263
|
if (!folderId) {
|
3214
3264
|
throw new Error('Folder ID is required');
|
3215
3265
|
}
|
@@ -3218,7 +3268,7 @@ class AXMDocumentManagerService {
|
|
3218
3268
|
throw new Error('Folder not found');
|
3219
3269
|
}
|
3220
3270
|
const result = this.mapFolderDtoToFolderNode(folder);
|
3221
|
-
const path = await this.buildPath(result);
|
3271
|
+
const path = await this.buildPath(result, (await this.getRoot(scope, options)).result.id);
|
3222
3272
|
return { path, result };
|
3223
3273
|
}
|
3224
3274
|
async createFolder(data) {
|
@@ -3268,6 +3318,7 @@ class AXMDocumentManagerService {
|
|
3268
3318
|
createdAt: file.createdAt,
|
3269
3319
|
size: file.size,
|
3270
3320
|
fileId: file.fileId,
|
3321
|
+
storageType: 'physical',
|
3271
3322
|
};
|
3272
3323
|
}
|
3273
3324
|
async createFile(data) {
|
@@ -3276,9 +3327,6 @@ class AXMDocumentManagerService {
|
|
3276
3327
|
return this.mapFileToNode(file);
|
3277
3328
|
}
|
3278
3329
|
async updateFile(fileId, data) {
|
3279
|
-
const y = await this.documentService.getOne(fileId);
|
3280
|
-
console.log(y);
|
3281
|
-
debugger;
|
3282
3330
|
const updatedFile = await this.documentService.updateOne(fileId, data);
|
3283
3331
|
return this.mapFileToNode(updatedFile);
|
3284
3332
|
}
|
@@ -3296,7 +3344,7 @@ class AXMDocumentManagerService {
|
|
3296
3344
|
}
|
3297
3345
|
}
|
3298
3346
|
async showCreateFolderDialog(parentId) {
|
3299
|
-
const comp = (await import('./acorex-modules-document-management-create-folder-dialog.component-
|
3347
|
+
const comp = (await import('./acorex-modules-document-management-create-folder-dialog.component-D8anTs3Q.mjs'))
|
3300
3348
|
.AXMCreateFolderDialog;
|
3301
3349
|
const popup = await this.popupService.open(comp, {
|
3302
3350
|
title: 't("actions.create-folder")',
|
@@ -3307,7 +3355,7 @@ class AXMDocumentManagerService {
|
|
3307
3355
|
return popup.data?.folder;
|
3308
3356
|
}
|
3309
3357
|
async moveTo(options) {
|
3310
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
3358
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-BeiXQNAw.mjs')).AXMDocumentDriveChooseComponent;
|
3311
3359
|
//
|
3312
3360
|
const popup = await this.popupService.open(comp, {
|
3313
3361
|
title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
|
@@ -3338,7 +3386,7 @@ class AXMDocumentManagerService {
|
|
3338
3386
|
}
|
3339
3387
|
}
|
3340
3388
|
async copyTo(options) {
|
3341
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
3389
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-BeiXQNAw.mjs')).AXMDocumentDriveChooseComponent;
|
3342
3390
|
//
|
3343
3391
|
const popup = await this.popupService.open(comp, {
|
3344
3392
|
title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
|
@@ -3380,36 +3428,51 @@ class AXMDocumentManagerService {
|
|
3380
3428
|
return false;
|
3381
3429
|
}
|
3382
3430
|
}
|
3383
|
-
async
|
3384
|
-
|
3385
|
-
|
3386
|
-
const nodes = await Promise.all(parentFolder.documents?.map(async (doc) => {
|
3431
|
+
async mapDocumentToMediaViewerData(doc) {
|
3432
|
+
if (!doc.fileId?.startsWith('http')) {
|
3433
|
+
const fileInfo = await this.fileService.getInfo(doc.fileId);
|
3387
3434
|
return {
|
3388
|
-
id: doc.id
|
3435
|
+
id: doc.id ?? '',
|
3389
3436
|
name: doc.name,
|
3390
|
-
type:
|
3391
|
-
url:
|
3437
|
+
type: 'image',
|
3438
|
+
url: fileInfo.url ?? '',
|
3392
3439
|
size: doc.size.toString(),
|
3393
|
-
thumbnail:
|
3440
|
+
thumbnail: fileInfo.url ?? '',
|
3394
3441
|
};
|
3395
|
-
}
|
3396
|
-
|
3442
|
+
}
|
3443
|
+
return {
|
3444
|
+
id: doc.id ?? '',
|
3445
|
+
name: doc.name,
|
3446
|
+
type: doc.meta?.['type'] ?? 'image',
|
3447
|
+
url: doc.fileId ?? '',
|
3448
|
+
size: doc.size.toString(),
|
3449
|
+
thumbnail: doc.fileId ?? '',
|
3450
|
+
};
|
3451
|
+
}
|
3452
|
+
async showFileViewerPopup(node, options) {
|
3453
|
+
const isVirtualFolder = node.parentId === 'virtual';
|
3454
|
+
const parentFolderName = isVirtualFolder ? 'Virtual' : (await this.folderService.getOne(node.parentId)).name;
|
3455
|
+
const documents = isVirtualFolder
|
3456
|
+
? options?.folderVituralfiles ?? []
|
3457
|
+
: (await this.folderService.getOne(node.parentId)).documents ?? [];
|
3458
|
+
const nodes = await Promise.all(documents.map((doc) => this.mapDocumentToMediaViewerData(doc)));
|
3397
3459
|
const comp = (await Promise.resolve().then(function () { return fileViewerPopup_component; }))
|
3398
3460
|
.AXMFileViewerPopupComponent;
|
3399
3461
|
await this.popupService.open(comp, {
|
3400
3462
|
title: `t("gallery" , ${RootConfig.module.name})` + ' - ' + parentFolderName,
|
3401
3463
|
data: {
|
3402
3464
|
nodes,
|
3465
|
+
index: isVirtualFolder
|
3466
|
+
? options?.folderVituralfiles?.findIndex((f) => f.id === node.id) ?? 0
|
3467
|
+
: options?.index ?? 0,
|
3403
3468
|
},
|
3404
3469
|
});
|
3405
3470
|
}
|
3406
3471
|
async openFile(node) {
|
3407
|
-
console.log(node);
|
3408
3472
|
const file = await this.documentService.getOne(node.id);
|
3409
|
-
console.log(file);
|
3410
3473
|
}
|
3411
|
-
async
|
3412
|
-
const comp = (await import('./acorex-modules-document-management-rename-node-dialog.component-
|
3474
|
+
async showRenamePopup(node) {
|
3475
|
+
const comp = (await import('./acorex-modules-document-management-rename-node-dialog.component-DB868l1X.mjs'))
|
3413
3476
|
.AXMRenameNodeDialog;
|
3414
3477
|
const popup = await this.popupService.open(comp, {
|
3415
3478
|
title: 't("actions.rename")',
|
@@ -3449,24 +3512,42 @@ class AXMDocumentManagerService {
|
|
3449
3512
|
//TODO filter by scope
|
3450
3513
|
return (await this.folderService.query()).items.map(this.mapFolderDtoToFolderNode);
|
3451
3514
|
}
|
3452
|
-
async getAllFiles() {
|
3515
|
+
async getAllFiles(request) {
|
3453
3516
|
//TODO filter by scope
|
3454
|
-
return (await this.documentService.query()).items.map(this.mapFileToNode);
|
3517
|
+
return (await this.documentService.query(request)).items.map(this.mapFileToNode);
|
3455
3518
|
}
|
3456
3519
|
async getAllNodes() {
|
3457
3520
|
return [...(await this.getAllFolders()), ...(await this.getAllFiles())];
|
3458
3521
|
}
|
3459
|
-
async showChooseFileDialog() {
|
3460
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
3461
|
-
await this.popupService.open(comp
|
3522
|
+
async showChooseFileDialog(scope) {
|
3523
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-BeiXQNAw.mjs')).AXMDocumentDriveChooseComponent;
|
3524
|
+
const result = await this.popupService.open(comp, {
|
3525
|
+
title: `t("actions.choose-from-drive" , scope: {"${RootConfig.config.i18n}"})`,
|
3526
|
+
data: {
|
3527
|
+
scope: scope,
|
3528
|
+
},
|
3529
|
+
});
|
3530
|
+
if (result.data?.result) {
|
3531
|
+
return castArray(result.data.items);
|
3532
|
+
}
|
3533
|
+
return [];
|
3462
3534
|
}
|
3463
3535
|
async downloadFile(node) {
|
3464
|
-
const file = await this.documentService.getOne(node.id);
|
3465
|
-
if (
|
3466
|
-
|
3536
|
+
// const file = await this.documentService.getOne(node.id);
|
3537
|
+
if (node.fileId) {
|
3538
|
+
if (node.fileId.startsWith('http')) {
|
3539
|
+
const link = document.createElement('a');
|
3540
|
+
link.href = node.fileId;
|
3541
|
+
link.download = node.name;
|
3542
|
+
document.body.appendChild(link);
|
3543
|
+
link.click();
|
3544
|
+
document.body.removeChild(link);
|
3545
|
+
return;
|
3546
|
+
}
|
3547
|
+
const fileInfo = await this.fileService.getInfo(node.fileId);
|
3467
3548
|
const link = document.createElement('a');
|
3468
3549
|
link.href = fileInfo.url ?? '';
|
3469
|
-
link.download =
|
3550
|
+
link.download = node.name; // Set the desired file name
|
3470
3551
|
document.body.appendChild(link);
|
3471
3552
|
link.click();
|
3472
3553
|
document.body.removeChild(link);
|
@@ -3540,13 +3621,13 @@ class AXMDocumentManagerService {
|
|
3540
3621
|
}
|
3541
3622
|
async uploadFile(folderId) {
|
3542
3623
|
const folder = await this.folderService.getOne(folderId);
|
3543
|
-
var docTypes = folder.
|
3624
|
+
var docTypes = folder.documentTypes;
|
3544
3625
|
if (folder && docTypes == null) {
|
3545
3626
|
const comp = (await Promise.resolve().then(function () { return index; })).AXMChooseDocumentTypeComponent;
|
3546
3627
|
const result = await this.popupService.open(comp);
|
3547
3628
|
if (result.data != null && result.data.documentType != null) {
|
3548
3629
|
const { upload, ...metaContext } = result.data.context;
|
3549
|
-
//Todo
|
3630
|
+
//Todo
|
3550
3631
|
const fileInfo = await this.fileService.getInfo(upload[0]);
|
3551
3632
|
const file = await this.documentService.insertOne({
|
3552
3633
|
fileId: upload[0],
|
@@ -3564,6 +3645,38 @@ class AXMDocumentManagerService {
|
|
3564
3645
|
}
|
3565
3646
|
return false;
|
3566
3647
|
}
|
3648
|
+
async uploadFileByType(folderId, docTypeId) {
|
3649
|
+
const folder = await this.folderService.getOne(folderId);
|
3650
|
+
var docType = folder.documentTypes?.find((dt) => dt.id === docTypeId);
|
3651
|
+
if (folder && docType != null) {
|
3652
|
+
const comp = (await Promise.resolve().then(function () { return index; })).AXMDocumentTypeChooseFileComponent;
|
3653
|
+
const result = await this.popupService.open(comp, {
|
3654
|
+
title: `Select ${docType.title}`,
|
3655
|
+
data: {
|
3656
|
+
documentType: docType,
|
3657
|
+
},
|
3658
|
+
});
|
3659
|
+
if (result.data != null) {
|
3660
|
+
const { uploads, ...metaContext } = result.data.context;
|
3661
|
+
for (const u of uploads) {
|
3662
|
+
const fileInfo = u;
|
3663
|
+
const file = await this.documentService.insertOne({
|
3664
|
+
fileId: fileInfo.fileId,
|
3665
|
+
meta: metaContext,
|
3666
|
+
parentId: folderId,
|
3667
|
+
size: fileInfo.size,
|
3668
|
+
name: fileInfo.name ?? '',
|
3669
|
+
title: fileInfo.name ?? '',
|
3670
|
+
});
|
3671
|
+
}
|
3672
|
+
return true;
|
3673
|
+
}
|
3674
|
+
else {
|
3675
|
+
return false;
|
3676
|
+
}
|
3677
|
+
}
|
3678
|
+
return false;
|
3679
|
+
}
|
3567
3680
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
3568
3681
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, providedIn: 'root' }); }
|
3569
3682
|
}
|
@@ -3582,12 +3695,12 @@ class ScopedDriveService {
|
|
3582
3695
|
}
|
3583
3696
|
validateScopeOptions() {
|
3584
3697
|
switch (this.scope) {
|
3585
|
-
case
|
3698
|
+
case AXPPlatformScope.Tenant:
|
3586
3699
|
if (!this.options?.tenantId) {
|
3587
3700
|
throw new Error('Tenant ID is required for tenant scope');
|
3588
3701
|
}
|
3589
3702
|
break;
|
3590
|
-
case
|
3703
|
+
case AXPPlatformScope.User:
|
3591
3704
|
if (!this.options?.tenantId || !this.options?.userId) {
|
3592
3705
|
throw new Error('Both Tenant ID and User ID are required for user scope');
|
3593
3706
|
}
|
@@ -3598,7 +3711,7 @@ class ScopedDriveService {
|
|
3598
3711
|
return this.parent.getRoot(this.scope, this.options);
|
3599
3712
|
}
|
3600
3713
|
async getFolder(folderId) {
|
3601
|
-
return this.parent.getFolder(folderId);
|
3714
|
+
return this.parent.getFolder(this.scope, folderId, this.options);
|
3602
3715
|
}
|
3603
3716
|
async createFolder(data) {
|
3604
3717
|
const folderData = {
|
@@ -3651,6 +3764,7 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3651
3764
|
// View State
|
3652
3765
|
viewMode: 'large-tiles',
|
3653
3766
|
isLoading: false,
|
3767
|
+
scope: AXPPlatformScope.User,
|
3654
3768
|
// Navigation State
|
3655
3769
|
currentPath: [],
|
3656
3770
|
currentNode: null,
|
@@ -3678,8 +3792,12 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3678
3792
|
detailPanel: false,
|
3679
3793
|
})), withComputed((store) => ({
|
3680
3794
|
isRoot: computed(() => {
|
3795
|
+
const path = store.currentPath();
|
3796
|
+
return path.length === 1;
|
3797
|
+
}),
|
3798
|
+
isVirtual: computed(() => {
|
3681
3799
|
const node = store.currentNode();
|
3682
|
-
return node?.
|
3800
|
+
return node?.storageType === 'virtual';
|
3683
3801
|
}),
|
3684
3802
|
currentFolder: computed(() => store.currentNode()),
|
3685
3803
|
currentFolderContents: computed(() => ({
|
@@ -3703,27 +3821,37 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3703
3821
|
isMultiSelect: computed(() => store.selectionMode() === 'multiple'),
|
3704
3822
|
selectedNode: computed(() => store.selectedNodes()[0] ?? null),
|
3705
3823
|
isDetailPanelOpen: computed(() => store.detailPanel()),
|
3706
|
-
})), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), documentTypeService = inject(AXMDocumentTypeService), driveService = inject(AXMDocumentManagerService), settingService = inject(AXPSettingService), translateService = inject(AXTranslationService)) => ({
|
3824
|
+
})), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), documentTypeService = inject(AXMDocumentTypeService), driveService = inject(AXMDocumentManagerService), settingService = inject(AXPSettingService), sessionService = inject(AXPSessionService), translateService = inject(AXTranslationService)) => ({
|
3707
3825
|
async initialize(options) {
|
3708
3826
|
// Load file types
|
3709
3827
|
const fileTypes = await fileTypeService.items();
|
3710
3828
|
patchState(store, { fileTypes });
|
3711
3829
|
// Load initial settings
|
3712
|
-
const viewMode = await settingService
|
3713
|
-
|
3714
|
-
|
3830
|
+
const viewMode = await settingService
|
3831
|
+
.scope(options?.scope || AXPPlatformScope.User)
|
3832
|
+
.get(AXPDocumentExplorerSettings.ViewMode);
|
3833
|
+
const sortField = await settingService
|
3834
|
+
.scope(options?.scope || AXPPlatformScope.User)
|
3835
|
+
.get(AXPDocumentExplorerSettings.SortField);
|
3836
|
+
const sortDirection = await settingService
|
3837
|
+
.scope(options?.scope || AXPPlatformScope.User)
|
3838
|
+
.get(AXPDocumentExplorerSettings.SortDirection);
|
3715
3839
|
patchState(store, {
|
3716
|
-
viewMode: viewMode || '
|
3840
|
+
viewMode: viewMode || 'list',
|
3717
3841
|
sortField: sortField || 'name',
|
3718
3842
|
sortDirection: sortDirection || 'asc',
|
3719
3843
|
browseMode: options?.browseMode || 'file',
|
3844
|
+
scope: options?.scope || AXPPlatformScope.User,
|
3720
3845
|
});
|
3721
3846
|
},
|
3722
3847
|
_load: async (folderId) => {
|
3723
3848
|
patchState(store, { loadingFolderId: folderId, isLoading: true });
|
3724
3849
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
3725
3850
|
try {
|
3726
|
-
const node = await driveService.getFolder(folderId
|
3851
|
+
const node = await driveService.getFolder(store.scope(), folderId, {
|
3852
|
+
tenantId: sessionService.tenant?.id,
|
3853
|
+
userId: sessionService.user?.id,
|
3854
|
+
});
|
3727
3855
|
patchState(store, {
|
3728
3856
|
currentNode: node.result,
|
3729
3857
|
currentPath: node.path,
|
@@ -3757,20 +3885,48 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3757
3885
|
await this._load(folderId);
|
3758
3886
|
this.deselectAll();
|
3759
3887
|
},
|
3888
|
+
async virtualFolder(files = []) {
|
3889
|
+
const id = 'virtual';
|
3890
|
+
patchState(store, {
|
3891
|
+
loadingFolderId: id,
|
3892
|
+
isLoading: true,
|
3893
|
+
});
|
3894
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
3895
|
+
const node = {
|
3896
|
+
id: id,
|
3897
|
+
name: 'virtual',
|
3898
|
+
type: 'folder',
|
3899
|
+
children: files,
|
3900
|
+
parentId: null,
|
3901
|
+
size: 0,
|
3902
|
+
storageType: 'virtual',
|
3903
|
+
};
|
3904
|
+
patchState(store, {
|
3905
|
+
currentNode: node,
|
3906
|
+
currentPath: [],
|
3907
|
+
folders: [],
|
3908
|
+
files: files,
|
3909
|
+
itemsCount: node.children?.length || 0,
|
3910
|
+
availableSpace: await driveService.getAvailableSpace(),
|
3911
|
+
loadingFolderId: null,
|
3912
|
+
isLoading: false,
|
3913
|
+
navigatingFolderId: null,
|
3914
|
+
});
|
3915
|
+
},
|
3760
3916
|
setViewMode(mode) {
|
3761
3917
|
patchState(store, { viewMode: mode });
|
3762
|
-
settingService.scope(
|
3918
|
+
settingService.scope(AXPPlatformScope.User).set(AXPDocumentExplorerSettings.ViewMode, mode);
|
3763
3919
|
},
|
3764
3920
|
isViewMode(mode) {
|
3765
3921
|
return store.viewMode() === mode;
|
3766
3922
|
},
|
3767
3923
|
setSortField(field) {
|
3768
3924
|
patchState(store, { sortField: field });
|
3769
|
-
settingService.scope(
|
3925
|
+
settingService.scope(AXPPlatformScope.User).set(AXPDocumentExplorerSettings.SortField, field);
|
3770
3926
|
},
|
3771
3927
|
setSortDirection(direction) {
|
3772
3928
|
patchState(store, { sortDirection: direction });
|
3773
|
-
settingService.scope(
|
3929
|
+
settingService.scope(AXPPlatformScope.User).set(AXPDocumentExplorerSettings.SortDirection, direction);
|
3774
3930
|
},
|
3775
3931
|
setSelectionMode(mode) {
|
3776
3932
|
patchState(store, { selectionMode: mode });
|
@@ -3842,10 +3998,10 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3842
3998
|
content: node.modifiedAt || new Date(),
|
3843
3999
|
format: 'datetime',
|
3844
4000
|
icon: 'fa-solid fa-calendar-days',
|
3845
|
-
}
|
3846
|
-
]
|
3847
|
-
}
|
3848
|
-
]
|
4001
|
+
},
|
4002
|
+
],
|
4003
|
+
},
|
4004
|
+
],
|
3849
4005
|
};
|
3850
4006
|
}
|
3851
4007
|
// If the node is a folder, return the folder info
|
@@ -3885,10 +4041,10 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3885
4041
|
content: node.modifiedAt || new Date(),
|
3886
4042
|
format: 'datetime',
|
3887
4043
|
icon: 'fa-solid fa-calendar-days',
|
3888
|
-
}
|
3889
|
-
]
|
3890
|
-
}
|
3891
|
-
]
|
4044
|
+
},
|
4045
|
+
],
|
4046
|
+
},
|
4047
|
+
],
|
3892
4048
|
};
|
3893
4049
|
}
|
3894
4050
|
},
|
@@ -3914,9 +4070,15 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3914
4070
|
});
|
3915
4071
|
},
|
3916
4072
|
async refresh() {
|
3917
|
-
|
3918
|
-
|
3919
|
-
|
4073
|
+
if (!store.isVirtual()) {
|
4074
|
+
const currentFolder = store.currentNode();
|
4075
|
+
if (currentFolder) {
|
4076
|
+
await this._load(currentFolder.id);
|
4077
|
+
}
|
4078
|
+
}
|
4079
|
+
else {
|
4080
|
+
patchState(store, { loadingFolderId: 'fake' });
|
4081
|
+
patchState(store, { loadingFolderId: null });
|
3920
4082
|
}
|
3921
4083
|
},
|
3922
4084
|
navigateToUp() {
|
@@ -3943,25 +4105,35 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3943
4105
|
async openFile(file) {
|
3944
4106
|
await driveService.openFile(file);
|
3945
4107
|
},
|
3946
|
-
//TODO: Delete only one node at a time
|
4108
|
+
//TODO: Delete only one node at a time
|
3947
4109
|
async deleteNodes(nodes = store.selectedNodes()) {
|
3948
|
-
|
3949
|
-
|
3950
|
-
|
3951
|
-
|
4110
|
+
if (store.isVirtual()) {
|
4111
|
+
patchState(store, {
|
4112
|
+
files: store.currentFolderContents().files.filter((file) => !nodes.some((node) => node.name === file.name)),
|
4113
|
+
});
|
4114
|
+
}
|
4115
|
+
else {
|
4116
|
+
const result = await driveService.showDeleteNodesDialog(nodes);
|
4117
|
+
if (result) {
|
4118
|
+
this.deselectAll();
|
4119
|
+
await this.refresh();
|
4120
|
+
}
|
3952
4121
|
}
|
3953
4122
|
},
|
3954
4123
|
toggleSelect(node) {
|
3955
4124
|
if (store.selectionMode() === 'multiple') {
|
3956
|
-
patchState(store, {
|
4125
|
+
patchState(store, {
|
4126
|
+
selectedNodes: store.selectedNodes().includes(node)
|
4127
|
+
? store.selectedNodes().filter((n) => n.id !== node.id)
|
4128
|
+
: [...store.selectedNodes(), node],
|
4129
|
+
});
|
3957
4130
|
}
|
3958
4131
|
else {
|
3959
4132
|
patchState(store, { selectedNodes: [node] });
|
3960
4133
|
}
|
3961
|
-
console.log(store.currentPath());
|
3962
4134
|
},
|
3963
4135
|
isItemSelected(node) {
|
3964
|
-
return store.selectedNodes().some(selectedNode => selectedNode.id === node.id);
|
4136
|
+
return store.selectedNodes().some((selectedNode) => selectedNode.id === node.id);
|
3965
4137
|
},
|
3966
4138
|
selectAll() {
|
3967
4139
|
patchState(store, { selectedNodes: [...store.folders(), ...store.files()] });
|
@@ -3980,13 +4152,13 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3980
4152
|
},
|
3981
4153
|
//#region Menu Items
|
3982
4154
|
async getFolderAddMenuItems() {
|
3983
|
-
const documentTypes = await documentTypeService.query();
|
3984
|
-
const items = documentTypes.items.map(item => ({
|
3985
|
-
name: item.name,
|
3986
|
-
title: item.title,
|
3987
|
-
})) ?? [];
|
3988
|
-
//
|
3989
4155
|
const scope = RootConfig.config.i18n;
|
4156
|
+
// const documentTypes = await documentTypeService.query();
|
4157
|
+
// const items = documentTypes.items.map(item => ({
|
4158
|
+
// name: item.name,
|
4159
|
+
// title: item.title,
|
4160
|
+
// })) ?? [];
|
4161
|
+
// //
|
3990
4162
|
return [
|
3991
4163
|
{
|
3992
4164
|
title: await translateService.translateAsync('actions.create-folder', { scope }),
|
@@ -3996,27 +4168,46 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
3996
4168
|
name: 'new-folder',
|
3997
4169
|
options: {
|
3998
4170
|
folderId: store.currentFolder()?.id,
|
3999
|
-
}
|
4000
|
-
}
|
4171
|
+
},
|
4172
|
+
},
|
4001
4173
|
},
|
4002
|
-
{
|
4003
|
-
title:
|
4174
|
+
...(store.currentFolder()?.documentTypes?.map((type) => ({
|
4175
|
+
title: type.title,
|
4176
|
+
//icon: type.icon,
|
4004
4177
|
icon: 'fa-light fa-file-arrow-up',
|
4005
|
-
|
4006
|
-
|
4178
|
+
break: true,
|
4179
|
+
command: {
|
4180
|
+
name: `upload.${type.name}`,
|
4181
|
+
options: {
|
4182
|
+
folderId: store.currentFolder()?.id,
|
4183
|
+
documentType: type,
|
4184
|
+
},
|
4185
|
+
},
|
4186
|
+
})) ?? []),
|
4187
|
+
// {
|
4188
|
+
// title: await translateService.translateAsync('actions.upload-file', { scope }),
|
4189
|
+
// icon: 'fa-light fa-file-arrow-up',
|
4190
|
+
// command: {
|
4191
|
+
// name: 'upload-file',
|
4192
|
+
// options: {
|
4193
|
+
// folderId: store.currentFolder()?.id,
|
4194
|
+
// },
|
4195
|
+
// },
|
4196
|
+
// //items: items
|
4197
|
+
// },
|
4007
4198
|
];
|
4008
4199
|
},
|
4009
4200
|
async getFolderActionMenuItems() {
|
4010
4201
|
return [
|
4011
4202
|
{
|
4012
4203
|
name: 'refresh',
|
4013
|
-
title: '
|
4204
|
+
title: await translateService.translateAsync('refresh'),
|
4014
4205
|
icon: 'fa-light fa-rotate-right',
|
4015
4206
|
break: true,
|
4016
4207
|
},
|
4017
4208
|
{
|
4018
4209
|
name: 'delete',
|
4019
|
-
title: '
|
4210
|
+
title: await translateService.translateAsync('delete'),
|
4020
4211
|
color: 'danger',
|
4021
4212
|
icon: 'fa-light fa-trash',
|
4022
4213
|
},
|
@@ -4025,7 +4216,7 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
4025
4216
|
//#endregion
|
4026
4217
|
//#region Context Menu Items
|
4027
4218
|
async getContextMenuItems() {
|
4028
|
-
return [...await this.getFolderAddMenuItems(), ...await this.getFolderActionMenuItems()];
|
4219
|
+
return [...(await this.getFolderAddMenuItems()), ...(await this.getFolderActionMenuItems())];
|
4029
4220
|
},
|
4030
4221
|
//#endregion
|
4031
4222
|
})));
|
@@ -4044,16 +4235,15 @@ class AXMDocumentExplorerComponent {
|
|
4044
4235
|
this.showContextMenu = input(true);
|
4045
4236
|
this.view = signal(null);
|
4046
4237
|
this.viewMap = {
|
4047
|
-
list: async () => (await import('./acorex-modules-document-management-list-view.component-
|
4048
|
-
'small-tiles': async () => (await import('./acorex-modules-document-management-small-tiles-view.component-
|
4049
|
-
'large-tiles': async () => (await import('./acorex-modules-document-management-large-tiles-view.component-
|
4050
|
-
details: async () => (await import('./acorex-modules-document-management-details-view.component-
|
4051
|
-
'large-icons': async () => (await import('./acorex-modules-document-management-large-icons-view.component-
|
4052
|
-
'small-icons': async () => (await import('./acorex-modules-document-management-small-icons-view.component-
|
4238
|
+
list: async () => (await import('./acorex-modules-document-management-list-view.component-Cz2wNqhM.mjs')).AXMDocumentExplorerListViewComponent,
|
4239
|
+
'small-tiles': async () => (await import('./acorex-modules-document-management-small-tiles-view.component-b2lauUIY.mjs')).AXMDocumentExplorerSmallTilesViewComponent,
|
4240
|
+
'large-tiles': async () => (await import('./acorex-modules-document-management-large-tiles-view.component-CtCdVI_p.mjs')).AXMDocumentExplorerLargeTilesViewComponent,
|
4241
|
+
details: async () => (await import('./acorex-modules-document-management-details-view.component-z05RykKt.mjs')).AXMDocumentExplorerDetailsViewComponent,
|
4242
|
+
'large-icons': async () => (await import('./acorex-modules-document-management-large-icons-view.component-DctO0SZ7.mjs')).AXMDocumentExplorerLargeIconsViewComponent,
|
4243
|
+
'small-icons': async () => (await import('./acorex-modules-document-management-small-icons-view.component-B_O5Qpmi.mjs')).AXMDocumentExplorerSmallIconsViewComponent,
|
4053
4244
|
};
|
4054
4245
|
this.#effect = effect(() => {
|
4055
|
-
|
4056
|
-
if (!navigatingFolderId) {
|
4246
|
+
if (this.vm.loadingFolderId() == null) {
|
4057
4247
|
setTimeout(() => {
|
4058
4248
|
this.contextMenu()?.refresh();
|
4059
4249
|
this.rootContextMenu()?.refresh();
|
@@ -4079,7 +4269,6 @@ class AXMDocumentExplorerComponent {
|
|
4079
4269
|
#effect3;
|
4080
4270
|
handleNavigateToFolder(folderId) {
|
4081
4271
|
this.vm.navigateToFolder(folderId);
|
4082
|
-
console.log(this.vm.currentFolder());
|
4083
4272
|
}
|
4084
4273
|
//#region Menu and Context Menu
|
4085
4274
|
async handleContextMenuOnOpening(e) {
|
@@ -4114,11 +4303,21 @@ class AXMDocumentExplorerComponent {
|
|
4114
4303
|
data: node,
|
4115
4304
|
},
|
4116
4305
|
{
|
4117
|
-
name: 'upload-file',
|
4118
|
-
text: 'Upload
|
4306
|
+
name: 'upload-file-33',
|
4307
|
+
text: 'Upload',
|
4119
4308
|
icon: 'fa-light fa-file-arrow-up',
|
4120
4309
|
break: true,
|
4121
|
-
|
4310
|
+
items: node?.documentTypes?.map((type) => ({
|
4311
|
+
name: `upload.${type.name}`,
|
4312
|
+
text: type.title,
|
4313
|
+
// icon: type.icon,
|
4314
|
+
icon: 'fa-light fa-file-arrow-up',
|
4315
|
+
break: true,
|
4316
|
+
data: {
|
4317
|
+
node,
|
4318
|
+
documentType: type,
|
4319
|
+
},
|
4320
|
+
})) ?? [],
|
4122
4321
|
},
|
4123
4322
|
];
|
4124
4323
|
const info = {
|
@@ -4220,9 +4419,16 @@ class AXMDocumentExplorerComponent {
|
|
4220
4419
|
}
|
4221
4420
|
}
|
4222
4421
|
async handleContextMenuRootOnOpening(e) {
|
4223
|
-
//TODO: check async translate method in acorex
|
4224
|
-
const items = [
|
4225
|
-
|
4422
|
+
//TODO: check async translate method in acorex
|
4423
|
+
const items = [
|
4424
|
+
...(await this.vm.getFolderAddMenuItems()).map((m) => ({
|
4425
|
+
...m,
|
4426
|
+
name: m.command?.name,
|
4427
|
+
data: m.command?.options,
|
4428
|
+
})),
|
4429
|
+
...(await this.vm.getFolderActionMenuItems()),
|
4430
|
+
];
|
4431
|
+
const mappedItems = items.map((m) => ({
|
4226
4432
|
...m,
|
4227
4433
|
text: m.title,
|
4228
4434
|
}));
|
@@ -4247,9 +4453,9 @@ class AXMDocumentExplorerComponent {
|
|
4247
4453
|
await this.createFolder(node);
|
4248
4454
|
// Handle new folder creation
|
4249
4455
|
break;
|
4250
|
-
case 'upload-file':
|
4251
|
-
|
4252
|
-
|
4456
|
+
// case 'upload-file':
|
4457
|
+
// await this.uploadFile(node);
|
4458
|
+
// break;
|
4253
4459
|
case 'paste':
|
4254
4460
|
// Handle paste operation
|
4255
4461
|
break;
|
@@ -4271,11 +4477,50 @@ class AXMDocumentExplorerComponent {
|
|
4271
4477
|
case 'copy':
|
4272
4478
|
this.makeCopy(node);
|
4273
4479
|
break;
|
4480
|
+
case 'share':
|
4481
|
+
this.share(node);
|
4482
|
+
break;
|
4483
|
+
case 'share-with-email':
|
4484
|
+
this.shareWithEmail(node);
|
4485
|
+
break;
|
4486
|
+
case 'link':
|
4487
|
+
this.link(node);
|
4488
|
+
break;
|
4489
|
+
case 'lock':
|
4490
|
+
this.lock(node);
|
4491
|
+
break;
|
4492
|
+
case 'unlock':
|
4493
|
+
this.unlock(node);
|
4494
|
+
break;
|
4495
|
+
default:
|
4496
|
+
if (e.item.name?.startsWith('upload.')) {
|
4497
|
+
await this.driveService.uploadFileByType(e.item.data.node?.id ?? this.vm.currentFolder()?.id, e.item.data.documentType.id);
|
4498
|
+
this.vm.refresh();
|
4499
|
+
}
|
4500
|
+
break;
|
4274
4501
|
}
|
4275
4502
|
}
|
4276
|
-
//#endregion
|
4503
|
+
//#endregion
|
4504
|
+
async share(node) {
|
4505
|
+
await this.driveService.showShareDialog(node);
|
4506
|
+
}
|
4507
|
+
async shareWithEmail(node) {
|
4508
|
+
await this.driveService.showShareWithEmailDialog(node);
|
4509
|
+
}
|
4510
|
+
async link(node) {
|
4511
|
+
await this.driveService.showLinkDialog(node);
|
4512
|
+
}
|
4513
|
+
async lock(node) {
|
4514
|
+
await this.driveService.showLockDialog(node);
|
4515
|
+
}
|
4516
|
+
async unlock(node) {
|
4517
|
+
await this.driveService.showUnlockDialog(node);
|
4518
|
+
}
|
4277
4519
|
async openGallery(node) {
|
4278
|
-
await this.driveService.showFileViewerPopup(node
|
4520
|
+
await this.driveService.showFileViewerPopup(node, {
|
4521
|
+
folderVituralfiles: this.vm.currentFolderContents().files,
|
4522
|
+
index: this.vm.currentFolderContents().files.findIndex((f) => f.id === node.id),
|
4523
|
+
});
|
4279
4524
|
}
|
4280
4525
|
async openFile(node) {
|
4281
4526
|
await this.driveService.openFile(node);
|
@@ -4294,11 +4539,23 @@ class AXMDocumentExplorerComponent {
|
|
4294
4539
|
}
|
4295
4540
|
async renameNode(node) {
|
4296
4541
|
if (node) {
|
4297
|
-
const result = await this.driveService.
|
4542
|
+
const result = await this.driveService.showRenamePopup(node);
|
4298
4543
|
if (result) {
|
4544
|
+
if (node.storageType == 'virtual') {
|
4545
|
+
const files = this.vm.files();
|
4546
|
+
const updatedFiles = files.map((file) => {
|
4547
|
+
if (file.id === result.id) {
|
4548
|
+
return result;
|
4549
|
+
}
|
4550
|
+
return file;
|
4551
|
+
});
|
4552
|
+
this.vm.virtualFolder(updatedFiles);
|
4553
|
+
}
|
4299
4554
|
await this.vm.refresh();
|
4300
4555
|
}
|
4556
|
+
return result;
|
4301
4557
|
}
|
4558
|
+
return;
|
4302
4559
|
}
|
4303
4560
|
async uploadFile(node) {
|
4304
4561
|
const folderId = node?.id ?? this.vm.currentFolder()?.id;
|
@@ -4309,9 +4566,9 @@ class AXMDocumentExplorerComponent {
|
|
4309
4566
|
}
|
4310
4567
|
}
|
4311
4568
|
}
|
4312
|
-
async chooseFile() {
|
4313
|
-
await this.driveService.showChooseFileDialog();
|
4314
|
-
await this.vm.refresh();
|
4569
|
+
async chooseFile(scope = this.vm.scope()) {
|
4570
|
+
return await this.driveService.showChooseFileDialog(scope);
|
4571
|
+
//await this.vm.refresh();
|
4315
4572
|
}
|
4316
4573
|
async makeCopy(node) {
|
4317
4574
|
if (node) {
|
@@ -4341,7 +4598,7 @@ class AXMDocumentExplorerComponent {
|
|
4341
4598
|
}
|
4342
4599
|
}
|
4343
4600
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4344
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentExplorerComponent, isStandalone: true, selector: "axm-document-explorer", inputs: { browseMode: { classPropertyName: "browseMode", publicName: "browseMode", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, showContextMenu: { classPropertyName: "showContextMenu", publicName: "showContextMenu", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["itemsContextMenu"], descendants: true, isSignal: true }, { propertyName: "rootContextMenu", first: true, predicate: ["rootContextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Empty State -->\n<div class=\"view-container\">\n @if (vm.folders().length === 0 && vm.files().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-16 ax-h-full\">\n <ax-icon icon=\"fa-light fa-folder-open\" class=\"ax-text-6xl ax-mb-4\"></ax-icon>\n <h3 class=\"ax-text-xl ax-font-medium ax-mb-2\">No Items Found</h3>\n <p class=\"\">This folder is empty. Add some files or folders to get started.</p>\n </div>\n } @else {\n <ng-container [ngComponentOutlet]=\"view()\"></ng-container>\n }\n</div>\n\n<!-- Context Menu -->\n@if (showContextMenu()) {\n<!-- Item Context Menu-->\n<ax-context-menu\n #itemsContextMenu\n [target]=\"'.__explorer-item'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n>\n</ax-context-menu>\n<!-- Root Context Menu-->\n<ax-context-menu\n #rootContextMenu\n [target]=\"'.view-container'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuRootOnOpening($event)\"\n>\n</ax-context-menu>\n}\n", styles: ["axm-document-explorer{display:flex;height:max-content;min-height:100%;width:100%;flex-direction:row;gap:1rem
|
4601
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentExplorerComponent, isStandalone: true, selector: "axm-document-explorer", inputs: { browseMode: { classPropertyName: "browseMode", publicName: "browseMode", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, showContextMenu: { classPropertyName: "showContextMenu", publicName: "showContextMenu", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["itemsContextMenu"], descendants: true, isSignal: true }, { propertyName: "rootContextMenu", first: true, predicate: ["rootContextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Empty State -->\n<div class=\"view-container\">\n @if (vm.folders().length === 0 && vm.files().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-16 ax-h-full\">\n <ax-icon icon=\"fa-light fa-folder-open\" class=\"ax-text-6xl ax-mb-4\"></ax-icon>\n <h3 class=\"ax-text-xl ax-font-medium ax-mb-2\">No Items Found</h3>\n <p class=\"\">This folder is empty. Add some files or folders to get started.</p>\n </div>\n } @else {\n <ng-container [ngComponentOutlet]=\"view()\"></ng-container>\n }\n</div>\n\n<!-- Context Menu -->\n@if (showContextMenu()) {\n<!-- Item Context Menu-->\n<ax-context-menu\n #itemsContextMenu\n [target]=\"'.__explorer-item'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n>\n</ax-context-menu>\n<!-- Root Context Menu-->\n<ax-context-menu\n #rootContextMenu\n [target]=\"'.view-container'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuRootOnOpening($event)\"\n>\n</ax-context-menu>\n}\n", styles: ["axm-document-explorer{display:flex;height:max-content;min-height:100%;width:100%;flex-direction:row;gap:1rem}axm-document-explorer>.view-container{display:flex;flex:1 1 0%;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;flex-direction:column;gap:1rem}axm-document-explorer .animation-duration-2s{--fa-animation-duration: 2s}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i3$1.AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
4345
4602
|
}
|
4346
4603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerComponent, decorators: [{
|
4347
4604
|
type: Component,
|
@@ -4353,7 +4610,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
4353
4610
|
AXFormatModule,
|
4354
4611
|
AXDateTimeModule,
|
4355
4612
|
AXMenuModule,
|
4356
|
-
], template: "<!-- Empty State -->\n<div class=\"view-container\">\n @if (vm.folders().length === 0 && vm.files().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-16 ax-h-full\">\n <ax-icon icon=\"fa-light fa-folder-open\" class=\"ax-text-6xl ax-mb-4\"></ax-icon>\n <h3 class=\"ax-text-xl ax-font-medium ax-mb-2\">No Items Found</h3>\n <p class=\"\">This folder is empty. Add some files or folders to get started.</p>\n </div>\n } @else {\n <ng-container [ngComponentOutlet]=\"view()\"></ng-container>\n }\n</div>\n\n<!-- Context Menu -->\n@if (showContextMenu()) {\n<!-- Item Context Menu-->\n<ax-context-menu\n #itemsContextMenu\n [target]=\"'.__explorer-item'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n>\n</ax-context-menu>\n<!-- Root Context Menu-->\n<ax-context-menu\n #rootContextMenu\n [target]=\"'.view-container'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuRootOnOpening($event)\"\n>\n</ax-context-menu>\n}\n", styles: ["axm-document-explorer{display:flex;height:max-content;min-height:100%;width:100%;flex-direction:row;gap:1rem
|
4613
|
+
], template: "<!-- Empty State -->\n<div class=\"view-container\">\n @if (vm.folders().length === 0 && vm.files().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-16 ax-h-full\">\n <ax-icon icon=\"fa-light fa-folder-open\" class=\"ax-text-6xl ax-mb-4\"></ax-icon>\n <h3 class=\"ax-text-xl ax-font-medium ax-mb-2\">No Items Found</h3>\n <p class=\"\">This folder is empty. Add some files or folders to get started.</p>\n </div>\n } @else {\n <ng-container [ngComponentOutlet]=\"view()\"></ng-container>\n }\n</div>\n\n<!-- Context Menu -->\n@if (showContextMenu()) {\n<!-- Item Context Menu-->\n<ax-context-menu\n #itemsContextMenu\n [target]=\"'.__explorer-item'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n>\n</ax-context-menu>\n<!-- Root Context Menu-->\n<ax-context-menu\n #rootContextMenu\n [target]=\"'.view-container'\"\n [orientation]=\"'vertical'\"\n [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n (onOpening)=\"handleContextMenuRootOnOpening($event)\"\n>\n</ax-context-menu>\n}\n", styles: ["axm-document-explorer{display:flex;height:max-content;min-height:100%;width:100%;flex-direction:row;gap:1rem}axm-document-explorer>.view-container{display:flex;flex:1 1 0%;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;flex-direction:column;gap:1rem}axm-document-explorer .animation-duration-2s{--fa-animation-duration: 2s}\n"] }]
|
4614
|
+
}] });
|
4615
|
+
|
4616
|
+
class AXMDocumentExplorerDetailPanelComponent {
|
4617
|
+
constructor() {
|
4618
|
+
this.vm = inject(AXPDocumentExplorerViewModel);
|
4619
|
+
}
|
4620
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerDetailPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4621
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentExplorerDetailPanelComponent, isStandalone: true, selector: "axm-document-explorer-detail-panel", ngImport: i0, template: "<!-- Multiple Selected -->\n@if(vm.hasMultipleSelectedItems()) {\n<div class=\"__header\" *translate=\"let t\">\n <div class=\"__title\">\n <i class=\"fa-fw fa-lg fa-solid\"></i>\n <span> {{ vm.selectedCount() }} {{ t('itemsSelected', { scope: 'common' }) | async }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n</div>\n<div class=\"__content\"></div>\n}\n<!-- Single Selected -->\n@else {\n<!-- Info -->\n@let nodeInfo = vm.getNodeInfo((vm.selectedNode() ?? vm.currentFolder())!);\n<div class=\"__header\">\n <div class=\"__title\">\n <i class=\"fa-fw fa-lg {{ nodeInfo.icon }} fa-solid\"></i>\n <span>{{ nodeInfo.name }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n</div>\n<div class=\"__content\">\n @for(section of nodeInfo.sections; track section.title) {\n <div class=\"__section\">\n <div class=\"__title\">\n <span>{{ section.title }}</span>\n </div>\n <div class=\"__content\">\n @for(detail of section.details; track detail.title) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{ detail.title }}</span>\n </div>\n <div class=\"__content\">\n @if(detail.format) {\n <span>{{ detail.content | format : detail.format | async }}</span>\n } @else {\n <span>{{ detail.content ?? '---' }}</span>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n</div>\n}\n", styles: ["axm-document-explorer-detail-panel{display:flex;flex-direction:column;border-radius:.5rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}@media (min-width: 1024px){axm-document-explorer-detail-panel{min-width:20rem}}axm-document-explorer-detail-panel>.__header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-bottom-width:1px;padding:1rem}axm-document-explorer-detail-panel>.__header>.__title{display:flex;width:90%;flex-direction:row;align-items:center;gap:.5rem}axm-document-explorer-detail-panel>.__header>.__title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;font-weight:600;line-height:1.625}axm-document-explorer-detail-panel>.__content{display:flex;flex-direction:column}axm-document-explorer-detail-panel>.__content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}axm-document-explorer-detail-panel>.__content>.__section{display:flex;flex-direction:column;padding:1rem}axm-document-explorer-detail-panel>.__content>.__section>.__title{margin-bottom:1rem;font-size:.875rem;line-height:1.25rem;font-weight:700}axm-document-explorer-detail-panel>.__content>.__section>.__content{display:flex;flex-direction:column;gap:1rem}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row{display:flex;flex-direction:column;gap:.25rem}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row>.__title{display:flex;font-size:.875rem;line-height:1.25rem;font-weight:600;opacity:.9}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row>.__content{display:flex;flex-direction:row;align-items:center;gap:.5rem}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row>.__content span{opacity:.7}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i2$2.AXFormatPipe, name: "format" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i4$1.AXTranslatorDirective, selector: "[translate]" }], encapsulation: i0.ViewEncapsulation.None }); }
|
4622
|
+
}
|
4623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerDetailPanelComponent, decorators: [{
|
4624
|
+
type: Component,
|
4625
|
+
args: [{ selector: 'axm-document-explorer-detail-panel', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
|
4626
|
+
CommonModule,
|
4627
|
+
AXDecoratorModule,
|
4628
|
+
AXFormatModule,
|
4629
|
+
AXButtonModule,
|
4630
|
+
AXTranslationModule
|
4631
|
+
], template: "<!-- Multiple Selected -->\n@if(vm.hasMultipleSelectedItems()) {\n<div class=\"__header\" *translate=\"let t\">\n <div class=\"__title\">\n <i class=\"fa-fw fa-lg fa-solid\"></i>\n <span> {{ vm.selectedCount() }} {{ t('itemsSelected', { scope: 'common' }) | async }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n</div>\n<div class=\"__content\"></div>\n}\n<!-- Single Selected -->\n@else {\n<!-- Info -->\n@let nodeInfo = vm.getNodeInfo((vm.selectedNode() ?? vm.currentFolder())!);\n<div class=\"__header\">\n <div class=\"__title\">\n <i class=\"fa-fw fa-lg {{ nodeInfo.icon }} fa-solid\"></i>\n <span>{{ nodeInfo.name }}</span>\n </div>\n <ax-button [look]=\"'blank'\" class=\"ax-sm ax-rounded-full\" (onClick)=\"vm.closeDetailPanel()\">\n <ax-icon icon=\"fa-solid fa-xmark\"></ax-icon>\n </ax-button>\n</div>\n<div class=\"__content\">\n @for(section of nodeInfo.sections; track section.title) {\n <div class=\"__section\">\n <div class=\"__title\">\n <span>{{ section.title }}</span>\n </div>\n <div class=\"__content\">\n @for(detail of section.details; track detail.title) {\n <div class=\"__row\">\n <div class=\"__title\">\n <span>{{ detail.title }}</span>\n </div>\n <div class=\"__content\">\n @if(detail.format) {\n <span>{{ detail.content | format : detail.format | async }}</span>\n } @else {\n <span>{{ detail.content ?? '---' }}</span>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n</div>\n}\n", styles: ["axm-document-explorer-detail-panel{display:flex;flex-direction:column;border-radius:.5rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}@media (min-width: 1024px){axm-document-explorer-detail-panel{min-width:20rem}}axm-document-explorer-detail-panel>.__header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-bottom-width:1px;padding:1rem}axm-document-explorer-detail-panel>.__header>.__title{display:flex;width:90%;flex-direction:row;align-items:center;gap:.5rem}axm-document-explorer-detail-panel>.__header>.__title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;font-weight:600;line-height:1.625}axm-document-explorer-detail-panel>.__content{display:flex;flex-direction:column}axm-document-explorer-detail-panel>.__content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}axm-document-explorer-detail-panel>.__content>.__section{display:flex;flex-direction:column;padding:1rem}axm-document-explorer-detail-panel>.__content>.__section>.__title{margin-bottom:1rem;font-size:.875rem;line-height:1.25rem;font-weight:700}axm-document-explorer-detail-panel>.__content>.__section>.__content{display:flex;flex-direction:column;gap:1rem}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row{display:flex;flex-direction:column;gap:.25rem}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row>.__title{display:flex;font-size:.875rem;line-height:1.25rem;font-weight:600;opacity:.9}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row>.__content{display:flex;flex-direction:row;align-items:center;gap:.5rem}axm-document-explorer-detail-panel>.__content>.__section>.__content>.__row>.__content span{opacity:.7}\n"] }]
|
4357
4632
|
}] });
|
4358
4633
|
|
4359
4634
|
class AXMChooseDocumentTypeComponent extends AXBasePageComponent {
|
@@ -4392,7 +4667,6 @@ class AXMChooseDocumentTypeComponent extends AXBasePageComponent {
|
|
4392
4667
|
};
|
4393
4668
|
});
|
4394
4669
|
for (const i of item.meta) {
|
4395
|
-
console.log(JSON.parse(i.interface)['children'][0]);
|
4396
4670
|
if (!get(i, '__node__')) {
|
4397
4671
|
set$1(i, '__node__', typeof i.interface == 'function' ? await i.interface() :
|
4398
4672
|
JSON.parse(i.interface)['children'][0]['children'][0]);
|
@@ -4413,27 +4687,99 @@ class AXMChooseDocumentTypeComponent extends AXBasePageComponent {
|
|
4413
4687
|
});
|
4414
4688
|
}
|
4415
4689
|
getNode(meta) {
|
4416
|
-
console.log(meta);
|
4417
4690
|
return get(meta, '__node__');
|
4418
4691
|
}
|
4419
4692
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMChooseDocumentTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4420
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMChooseDocumentTypeComponent, isStandalone: true, selector: "axm-choose-document-type", usesInheritance: true, ngImport: i0, template: "<ax-header> </ax-header>\n<ax-content>\n <div class=\"ax-flex ax-flex-col ax-py-4 ax-px-6\">\n <ax-label> Select Document Type </ax-label>\n <ax-select-box\n [dataSource]=\"documentTypesSource\"\n textField=\"title\"\n valueField=\"id\"\n (onValueChanged)=\"handleChangeDocumentType($event)\"\n >\n </ax-select-box>\n @if (documentTypeSelected().length > 0) {\n
|
4693
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMChooseDocumentTypeComponent, isStandalone: true, selector: "axm-choose-document-type", usesInheritance: true, ngImport: i0, template: "<ax-header> </ax-header>\n<ax-content>\n <div class=\"ax-flex ax-flex-col ax-py-4 ax-px-6\">\n <ax-label> Select Document Type </ax-label>\n <ax-select-box\n [dataSource]=\"documentTypesSource\"\n textField=\"title\"\n valueField=\"id\"\n (onValueChanged)=\"handleChangeDocumentType($event)\"\n >\n </ax-select-box>\n @if (documentTypeSelected().length > 0) {\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"handleContextChanged($event)\">\n <ax-form>\n @for(doc of documentTypeSelected()[0].meta; track doc.name) {\n <ax-form-field>\n <ax-label>{{ doc.title }}</ax-label>\n <ng-container axp-widget-renderer [node]=\"getNode(doc)\" [mode]=\"'edit'\"></ng-container>\n </ax-form-field>\n }\n <ng-container axp-widget-renderer [node]=\"uploadNode()\" mode=\"edit\"></ng-container>\n </ax-form>\n </axp-widgets-container>\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button text=\"Cancel\" (onClick)=\"handleCancel()\"> </ax-button>\n <ax-button text=\"Next\" look=\"solid\" color=\"primary\" (onClick)=\"handlesubmit()\"> </ax-button>\n </ax-suffix>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i3.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i3.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4421
4694
|
}
|
4422
4695
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMChooseDocumentTypeComponent, decorators: [{
|
4423
4696
|
type: Component,
|
4424
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'axm-choose-document-type', imports: [AXButtonModule, AXDecoratorModule, AXFormModule, AXLabelModule, AXSelectBoxModule, AXPLayoutBuilderModule], template: "<ax-header> </ax-header>\n<ax-content>\n <div class=\"ax-flex ax-flex-col ax-py-4 ax-px-6\">\n <ax-label> Select Document Type </ax-label>\n <ax-select-box\n [dataSource]=\"documentTypesSource\"\n textField=\"title\"\n valueField=\"id\"\n (onValueChanged)=\"handleChangeDocumentType($event)\"\n >\n </ax-select-box>\n @if (documentTypeSelected().length > 0) {\n
|
4697
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'axm-choose-document-type', imports: [AXButtonModule, AXDecoratorModule, AXFormModule, AXLabelModule, AXSelectBoxModule, AXPLayoutBuilderModule], template: "<ax-header> </ax-header>\n<ax-content>\n <div class=\"ax-flex ax-flex-col ax-py-4 ax-px-6\">\n <ax-label> Select Document Type </ax-label>\n <ax-select-box\n [dataSource]=\"documentTypesSource\"\n textField=\"title\"\n valueField=\"id\"\n (onValueChanged)=\"handleChangeDocumentType($event)\"\n >\n </ax-select-box>\n @if (documentTypeSelected().length > 0) {\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"handleContextChanged($event)\">\n <ax-form>\n @for(doc of documentTypeSelected()[0].meta; track doc.name) {\n <ax-form-field>\n <ax-label>{{ doc.title }}</ax-label>\n <ng-container axp-widget-renderer [node]=\"getNode(doc)\" [mode]=\"'edit'\"></ng-container>\n </ax-form-field>\n }\n <ng-container axp-widget-renderer [node]=\"uploadNode()\" mode=\"edit\"></ng-container>\n </ax-form>\n </axp-widgets-container>\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button text=\"Cancel\" (onClick)=\"handleCancel()\"> </ax-button>\n <ax-button text=\"Next\" look=\"solid\" color=\"primary\" (onClick)=\"handlesubmit()\"> </ax-button>\n </ax-suffix>\n</ax-footer>\n" }]
|
4698
|
+
}] });
|
4699
|
+
|
4700
|
+
class AXMDocumentTypeChooseFileComponent extends AXBasePageComponent {
|
4701
|
+
constructor() {
|
4702
|
+
super(...arguments);
|
4703
|
+
this.context = signal({});
|
4704
|
+
this.uploadNode = signal({
|
4705
|
+
name: 'uploads',
|
4706
|
+
path: 'uploads',
|
4707
|
+
type: 'file',
|
4708
|
+
options: {
|
4709
|
+
accept: '.pdf',
|
4710
|
+
multiple: false,
|
4711
|
+
},
|
4712
|
+
});
|
4713
|
+
}
|
4714
|
+
async ngOnInit() {
|
4715
|
+
this.uploadNode.update((old) => {
|
4716
|
+
return {
|
4717
|
+
...old,
|
4718
|
+
options: {
|
4719
|
+
multiple: this.documentType.isMultiple,
|
4720
|
+
accept: this.documentType.name == 'any'
|
4721
|
+
? ''
|
4722
|
+
: this.documentType.type.selectedItems.map((i) => `.${i.name.split('.')[1]}`).join(','),
|
4723
|
+
},
|
4724
|
+
};
|
4725
|
+
});
|
4726
|
+
for (const i of this.documentType.meta) {
|
4727
|
+
if (!get(i, '__node__')) {
|
4728
|
+
set$1(i, '__node__', typeof i.interface == 'function'
|
4729
|
+
? await i.interface()
|
4730
|
+
: JSON.parse(i.interface)['children'][0]['children'][0]);
|
4731
|
+
}
|
4732
|
+
}
|
4733
|
+
}
|
4734
|
+
handleContextChanged(e) {
|
4735
|
+
console.log(e.data);
|
4736
|
+
this.context.set(e.data);
|
4737
|
+
}
|
4738
|
+
handleCancel() {
|
4739
|
+
this.close();
|
4740
|
+
}
|
4741
|
+
handlesubmit() {
|
4742
|
+
this.close({
|
4743
|
+
context: this.context(),
|
4744
|
+
});
|
4745
|
+
}
|
4746
|
+
getNode(meta) {
|
4747
|
+
return get(meta, '__node__');
|
4748
|
+
}
|
4749
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentTypeChooseFileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4750
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentTypeChooseFileComponent, isStandalone: true, selector: "axm-choose-document-type", usesInheritance: true, ngImport: i0, template: "<ax-content>\n <div class=\"ax-flex ax-flex-col ax-py-4 ax-px-6\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"handleContextChanged($event)\">\n <ax-form>\n @for(doc of documentType.meta; track doc.name) {\n <ax-form-field>\n <ax-label>{{ doc.title }}</ax-label>\n <ng-container axp-widget-renderer [node]=\"getNode(doc)\" [mode]=\"'edit'\"></ng-container>\n </ax-form-field>\n }\n <ng-container axp-widget-renderer [node]=\"uploadNode()\" mode=\"edit\"></ng-container>\n </ax-form>\n </axp-widgets-container>\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button text=\"Cancel\" (onClick)=\"handleCancel()\"> </ax-button>\n <ax-button text=\"Submit\" look=\"solid\" color=\"primary\" (onClick)=\"handlesubmit()\"> </ax-button>\n </ax-suffix>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i3.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i3.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i4.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4751
|
+
}
|
4752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentTypeChooseFileComponent, decorators: [{
|
4753
|
+
type: Component,
|
4754
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'axm-choose-document-type', imports: [AXButtonModule, AXDecoratorModule, AXFormModule, AXLabelModule, AXSelectBoxModule, AXPLayoutBuilderModule], template: "<ax-content>\n <div class=\"ax-flex ax-flex-col ax-py-4 ax-px-6\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"handleContextChanged($event)\">\n <ax-form>\n @for(doc of documentType.meta; track doc.name) {\n <ax-form-field>\n <ax-label>{{ doc.title }}</ax-label>\n <ng-container axp-widget-renderer [node]=\"getNode(doc)\" [mode]=\"'edit'\"></ng-container>\n </ax-form-field>\n }\n <ng-container axp-widget-renderer [node]=\"uploadNode()\" mode=\"edit\"></ng-container>\n </ax-form>\n </axp-widgets-container>\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button text=\"Cancel\" (onClick)=\"handleCancel()\"> </ax-button>\n <ax-button text=\"Submit\" look=\"solid\" color=\"primary\" (onClick)=\"handlesubmit()\"> </ax-button>\n </ax-suffix>\n</ax-footer>\n" }]
|
4425
4755
|
}] });
|
4426
4756
|
|
4427
4757
|
class AXMFileViewerPopupComponent extends AXBasePageComponent {
|
4758
|
+
constructor() {
|
4759
|
+
super(...arguments);
|
4760
|
+
this.index = 0;
|
4761
|
+
this.mediaViewer = viewChild(AXMediaViewerContainerComponent);
|
4762
|
+
this.f = afterNextRender(() => {
|
4763
|
+
console.log(this.mediaViewer());
|
4764
|
+
setTimeout(() => {
|
4765
|
+
this.mediaViewer()?.goToIndex(this.index, 0);
|
4766
|
+
});
|
4767
|
+
});
|
4768
|
+
}
|
4769
|
+
ngAfterViewInit() {
|
4770
|
+
//Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
|
4771
|
+
//Add 'implements AfterViewInit' to the class.
|
4772
|
+
this.mediaViewer()?.goToIndex(this.index, 0);
|
4773
|
+
}
|
4428
4774
|
onClose() {
|
4429
4775
|
this.close();
|
4430
4776
|
}
|
4431
4777
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileViewerPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4432
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
4778
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.3", type: AXMFileViewerPopupComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "mediaViewer", first: true, predicate: AXMediaViewerContainerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ax-content>\n <ax-media-viewer-container #c [dataArray]=\"nodes\">\n <ax-header class=\"ax-p-2\">\n <ax-prefix>\n <ax-file-info></ax-file-info>\n </ax-prefix>\n <ax-suffix>\n <ax-fullscreen-button></ax-fullscreen-button>\n </ax-suffix>\n </ax-header>\n <ax-prefix>\n <ax-button (click)=\"c.next()\">\n <ax-icon class=\"ax-icon ax-icon-chevron-right\"> </ax-icon>\n </ax-button>\n </ax-prefix>\n <ax-suffix>\n <ax-button (click)=\"c.prev()\">\n <ax-icon class=\"ax-icon ax-icon-chevron-left\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-media-viewer-container>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'close'\" (click)=\"onClose()\" />\n </ax-suffix>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: i2$1.AXDecoratorFullScreenButtonComponent, selector: "ax-fullscreen-button" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXMediaViewerModule }, { kind: "component", type: i3$2.AXMediaViewerContainerComponent, selector: "ax-media-viewer-container", inputs: ["dataArray", "thumbnail"] }, { kind: "component", type: i3$2.AXFileInfoComponent, selector: "ax-file-info" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4433
4779
|
}
|
4434
4780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileViewerPopupComponent, decorators: [{
|
4435
4781
|
type: Component,
|
4436
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXMediaViewerModule], template: "<
|
4782
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXMediaViewerModule], template: "<ax-content>\n <ax-media-viewer-container #c [dataArray]=\"nodes\">\n <ax-header class=\"ax-p-2\">\n <ax-prefix>\n <ax-file-info></ax-file-info>\n </ax-prefix>\n <ax-suffix>\n <ax-fullscreen-button></ax-fullscreen-button>\n </ax-suffix>\n </ax-header>\n <ax-prefix>\n <ax-button (click)=\"c.next()\">\n <ax-icon class=\"ax-icon ax-icon-chevron-right\"> </ax-icon>\n </ax-button>\n </ax-prefix>\n <ax-suffix>\n <ax-button (click)=\"c.prev()\">\n <ax-icon class=\"ax-icon ax-icon-chevron-left\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-media-viewer-container>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'close'\" (click)=\"onClose()\" />\n </ax-suffix>\n</ax-footer>\n" }]
|
4437
4783
|
}] });
|
4438
4784
|
|
4439
4785
|
var fileViewerPopup_component = /*#__PURE__*/Object.freeze({
|
@@ -4447,7 +4793,7 @@ class AXMFolderPathBreadcrumbsComponent {
|
|
4447
4793
|
this.layout = inject(AXPLayoutThemeService);
|
4448
4794
|
}
|
4449
4795
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderPathBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4450
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMFolderPathBreadcrumbsComponent, isStandalone: true, selector: "axm-folder-path-breadcrumbs", ngImport: i0, template: "<!-- Breadcrumbs Section -->\n<div class=\"__breadcrumb ax-xs\">\n <!-- Desktop Breadcrumb -->\n @for (item of vm.currentPath(); track item.id; let i = $index;let last = $last) {\n <!-- Navigation Button -->\n <ax-button look=\"blank\" (onClick)=\"vm.navigateToFolder(item.id)\" [text]=\"item.name\" [disabled]=\"last\">\n @if(i === 0) {\n <ax-icon icon=\"fa-light fa-cloud\"></ax-icon>\n }@else {\n <ax-icon icon=\"fa-light fa-folder-closed\"></ax-icon>\n }\n </ax-button>\n <!-- Separator -->\n @if(!last) {\n <i class=\"far fa-chevron-right rtl:ax-rotate-180 fa-fw fa-xs ax-me-2\"></i>\n }\n <!-- End Navigation Button -->\n }\n</div>\n", styles: [":host{display:flex;width:100%;align-items:center}:host .__nav{display:flex;flex-direction:row;align-items:center;gap:.25rem;border-inline-end-width:1px;padding-inline-start:.25rem;padding-inline-end:.5rem}:host .__breadcrumb{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding-inline-start:.5rem;padding-inline-end:.25rem}:host .__breadcrumb .ax-state-disabled button,:host .__breadcrumb .ax-state-loading button{cursor:default!important}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$
|
4796
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMFolderPathBreadcrumbsComponent, isStandalone: true, selector: "axm-folder-path-breadcrumbs", ngImport: i0, template: "<!-- Breadcrumbs Section -->\n<div class=\"__breadcrumb ax-xs\">\n <!-- Desktop Breadcrumb -->\n @for (item of vm.currentPath(); track item.id; let i = $index;let last = $last) {\n <!-- Navigation Button -->\n <ax-button look=\"blank\" (onClick)=\"vm.navigateToFolder(item.id)\" [text]=\"item.name\" [disabled]=\"last\">\n @if(i === 0) {\n <ax-icon icon=\"fa-light fa-cloud\"></ax-icon>\n }@else {\n <ax-icon icon=\"fa-light fa-folder-closed\"></ax-icon>\n }\n </ax-button>\n <!-- Separator -->\n @if(!last) {\n <i class=\"far fa-chevron-right rtl:ax-rotate-180 fa-fw fa-xs ax-me-2\"></i>\n }\n <!-- End Navigation Button -->\n }\n</div>\n", styles: [":host{display:flex;width:100%;align-items:center}:host .__nav{display:flex;flex-direction:row;align-items:center;gap:.25rem;border-inline-end-width:1px;padding-inline-start:.25rem;padding-inline-end:.5rem}:host .__breadcrumb{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding-inline-start:.5rem;padding-inline-end:.25rem}:host .__breadcrumb .ax-state-disabled button,:host .__breadcrumb .ax-state-loading button{cursor:default!important}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
|
4451
4797
|
}
|
4452
4798
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderPathBreadcrumbsComponent, decorators: [{
|
4453
4799
|
type: Component,
|
@@ -4460,46 +4806,445 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
4460
4806
|
var index = /*#__PURE__*/Object.freeze({
|
4461
4807
|
__proto__: null,
|
4462
4808
|
AXMChooseDocumentTypeComponent: AXMChooseDocumentTypeComponent,
|
4809
|
+
AXMDocumentTypeChooseFileComponent: AXMDocumentTypeChooseFileComponent,
|
4463
4810
|
AXMFileViewerPopupComponent: AXMFileViewerPopupComponent,
|
4464
4811
|
AXMFolderPathBreadcrumbsComponent: AXMFolderPathBreadcrumbsComponent
|
4465
4812
|
});
|
4466
4813
|
|
4467
|
-
class
|
4814
|
+
class AXMDocumentDriveComponent extends AXPBasePageComponent {
|
4468
4815
|
constructor() {
|
4469
4816
|
super(...arguments);
|
4817
|
+
//#region ---------------- Services & Dependencies ----------------
|
4818
|
+
this.rootConfig = RootConfig;
|
4819
|
+
this.fileTypeService = inject(AXPFileTypeProviderService);
|
4470
4820
|
this.driveService = inject(AXMDocumentManagerService);
|
4471
4821
|
this.vm = inject(AXPDocumentExplorerViewModel);
|
4472
|
-
this.
|
4822
|
+
this.router = inject(Router);
|
4823
|
+
this.activatedRoute = inject(ActivatedRoute);
|
4824
|
+
//#endregion
|
4825
|
+
//#region ---------------- View Properties ----------------
|
4826
|
+
this.filterItems = signal([]);
|
4827
|
+
this.selectedFilter = signal('all');
|
4828
|
+
this.sortItems = signal([
|
4829
|
+
{ key: 'name', textKey: 'actions.sort-by-name', icon: 'fa-light fa-font' },
|
4830
|
+
{ key: 'modified', textKey: 'actions.sort-by-date', icon: 'fa-light fa-calendar' },
|
4831
|
+
{ key: 'size', textKey: 'actions.sort-by-size', icon: 'fa-light fa-weight-hanging' },
|
4832
|
+
]);
|
4833
|
+
this.viewsItems = signal([
|
4834
|
+
{ key: 'large-icons', icon: 'fa-light fa-grid' },
|
4835
|
+
{ key: 'small-icons', icon: 'fa-light fa-grid', break: true },
|
4836
|
+
{ key: 'large-tiles', icon: 'fa-grid-2' },
|
4837
|
+
{ key: 'small-tiles', icon: 'fa-grid-2', break: true },
|
4838
|
+
{ key: 'details', icon: 'fa-bars', break: true },
|
4839
|
+
{ key: 'list', icon: 'fa-list' },
|
4840
|
+
]);
|
4841
|
+
this.selectedViewMode = computed(() => this.viewsItems().find((item) => item.key === this.vm.viewMode()) || this.viewsItems()[0]);
|
4842
|
+
this.selectionMode = signal('single');
|
4473
4843
|
this.documentExplorer = viewChild(AXMDocumentExplorerComponent);
|
4844
|
+
//#endregion
|
4845
|
+
//#region ---------------- Computed Properties ----------------
|
4846
|
+
this.selectedSort = computed(() => {
|
4847
|
+
const items = this.sortItems();
|
4848
|
+
return items.find((item) => item.key === this.vm.sortField()) || items[0];
|
4849
|
+
});
|
4850
|
+
//#endregion
|
4851
|
+
//#region ---------------- Effects ----------------
|
4474
4852
|
this.#navigateEffect = effect(() => {
|
4475
4853
|
const navigatingFolderId = this.vm.navigatingFolderId();
|
4476
4854
|
if (navigatingFolderId) {
|
4477
|
-
this.
|
4855
|
+
this.handleNavigateToFolder(navigatingFolderId);
|
4478
4856
|
}
|
4479
4857
|
});
|
4858
|
+
this.#loadingEffect = effect(() => {
|
4859
|
+
const isLoading = this.vm.isLoading();
|
4860
|
+
untracked(() => {
|
4861
|
+
this.layoutService.setNavigationLoading(isLoading);
|
4862
|
+
});
|
4863
|
+
});
|
4480
4864
|
}
|
4865
|
+
//#endregion
|
4866
|
+
//#region ---------------- Effects ----------------
|
4481
4867
|
#navigateEffect;
|
4482
|
-
|
4868
|
+
#loadingEffect;
|
4869
|
+
//#endregion
|
4870
|
+
//#region ---------------- Lifecycle Hooks ----------------
|
4871
|
+
async ngOnInit() {
|
4483
4872
|
super.ngOnInit();
|
4484
|
-
this.
|
4485
|
-
this.
|
4873
|
+
await this.loadFilterItems();
|
4874
|
+
const snapshot = this.activatedRoute.snapshot;
|
4875
|
+
const routerScope = resolvePlatformScopeKey(snapshot.parent?.paramMap.get('scope')?.trim()?.toLowerCase());
|
4876
|
+
await this.vm.initialize({ browseMode: 'file', scope: routerScope });
|
4877
|
+
this.activatedRoute.paramMap.subscribe(async () => {
|
4878
|
+
this.loadDrive();
|
4879
|
+
});
|
4486
4880
|
}
|
4487
|
-
|
4881
|
+
//#endregion
|
4882
|
+
//#region ---------------- Event Handlers ----------------
|
4883
|
+
async handleSearchChange(event) {
|
4884
|
+
const result = await this.driveService.searchNodes(event.value, AXPPlatformScope.Tenant);
|
4885
|
+
}
|
4886
|
+
handleCtrlKey(e) {
|
4887
|
+
this.selectionMode.set('multiple');
|
4888
|
+
}
|
4889
|
+
handleCtrlKeyUp(e) {
|
4890
|
+
this.selectionMode.set('single');
|
4891
|
+
}
|
4892
|
+
handleNavigateToFolder(folderId) {
|
4893
|
+
this.router.navigate([
|
4894
|
+
`${this.sessionService.application?.name}/drive/${resolvePlatformScopeName(this.vm.scope())}/${folderId}`,
|
4895
|
+
]);
|
4896
|
+
}
|
4897
|
+
//#endregion
|
4898
|
+
//#region ---------------- Data Loading Methods ----------------
|
4899
|
+
async loadDrive() {
|
4900
|
+
const folderId = this.activatedRoute.snapshot.paramMap.get('id');
|
4488
4901
|
if (folderId) {
|
4489
4902
|
await this.vm.loadFolderContents(folderId);
|
4490
4903
|
}
|
4491
4904
|
else {
|
4492
|
-
|
4905
|
+
// TODO: get root from tenant or user by scope
|
4906
|
+
const root = await this.driveService.getRoot(this.vm.scope(), {
|
4907
|
+
tenantId: this.sessionService.tenant?.id,
|
4908
|
+
userId: this.sessionService.user?.id,
|
4909
|
+
});
|
4493
4910
|
if (root.result) {
|
4494
|
-
await this.
|
4911
|
+
await this.router.navigate([
|
4912
|
+
`${this.sessionService.application?.name}/drive/${resolvePlatformScopeName(this.vm.scope())}/${root.result.id}`,
|
4913
|
+
], {
|
4914
|
+
replaceUrl: true,
|
4915
|
+
});
|
4495
4916
|
}
|
4496
4917
|
}
|
4918
|
+
//
|
4919
|
+
this.recompute();
|
4497
4920
|
}
|
4498
|
-
|
4499
|
-
this.
|
4921
|
+
async loadFilterItems() {
|
4922
|
+
const types = await this.fileTypeService.items();
|
4923
|
+
const items = [
|
4924
|
+
{ key: 'all', textKey: 'file-types.all', icon: 'fa-light fa-folder-closed' },
|
4925
|
+
...types.map((type) => ({
|
4926
|
+
key: type.name,
|
4927
|
+
textKey: `file-types.${type.name}`,
|
4928
|
+
icon: type.icon || 'fa-light fa-file',
|
4929
|
+
})),
|
4930
|
+
];
|
4931
|
+
this.filterItems.set(items);
|
4932
|
+
}
|
4933
|
+
//#endregion
|
4934
|
+
//#region ---------------- Filter Methods ----------------
|
4935
|
+
setFilter(key) {
|
4936
|
+
this.selectedFilter.set(key);
|
4937
|
+
}
|
4938
|
+
getFilterIcon() {
|
4939
|
+
if (this.selectedFilter() === 'all') {
|
4940
|
+
return 'fa-light fa-folder-closed';
|
4941
|
+
}
|
4942
|
+
const item = this.filterItems().find((item) => item.key === this.selectedFilter());
|
4943
|
+
return item?.icon || 'fa-light fa-file';
|
4944
|
+
}
|
4945
|
+
getFilterText() {
|
4946
|
+
if (this.selectedFilter() === 'all') {
|
4947
|
+
return 'file-types.all';
|
4948
|
+
}
|
4949
|
+
const item = this.filterItems().find((item) => item.key === this.selectedFilter());
|
4950
|
+
return item?.textKey || 'file-types.all';
|
4951
|
+
}
|
4952
|
+
//#endregion
|
4953
|
+
//#region ---------------- Page Configuration Overrides ----------------
|
4954
|
+
async getPrimaryMenuItems() {
|
4955
|
+
if (this.vm.hasMultipleSelectedItems()) {
|
4956
|
+
return [
|
4957
|
+
{
|
4958
|
+
name: 'deleteItems',
|
4959
|
+
title: 't("deleteItems")',
|
4960
|
+
icon: 'fa-light fa-trash-can',
|
4961
|
+
color: 'danger',
|
4962
|
+
},
|
4963
|
+
];
|
4964
|
+
}
|
4965
|
+
return [
|
4966
|
+
{
|
4967
|
+
title: 't("add-item")',
|
4968
|
+
icon: 'fa-light fa-plus',
|
4969
|
+
color: 'primary',
|
4970
|
+
items: await this.vm.getFolderAddMenuItems(),
|
4971
|
+
},
|
4972
|
+
];
|
4973
|
+
}
|
4974
|
+
async getSecondaryMenuItems() {
|
4975
|
+
if (this.vm.hasMultipleSelectedItems()) {
|
4976
|
+
return [
|
4977
|
+
{
|
4978
|
+
name: 'delete',
|
4979
|
+
title: 't("delete")',
|
4980
|
+
icon: 'fa-light fa-trash-can',
|
4981
|
+
color: 'danger',
|
4982
|
+
},
|
4983
|
+
];
|
4984
|
+
}
|
4985
|
+
return this.vm.getFolderActionMenuItems();
|
4986
|
+
}
|
4987
|
+
async getPageTitle() {
|
4988
|
+
if (this.vm.isRoot()) {
|
4989
|
+
return this.translateService.translateAsync(`scope.${resolvePlatformScopeName(this.vm.scope())}.title`, { scope: this.rootConfig.config.i18n });
|
4990
|
+
}
|
4991
|
+
return this.vm.currentFolder()?.name || '';
|
4992
|
+
}
|
4993
|
+
async getPageDescription() {
|
4994
|
+
const count = await this.vm.itemsCount();
|
4995
|
+
const size = await this.vm.availableSpace();
|
4996
|
+
const formattedSize = await this.formatService.format(size, 'filesize');
|
4997
|
+
return this.translateService.translateAsync(`scope.${resolvePlatformScopeName(this.vm.scope())}.description`, {
|
4998
|
+
scope: this.rootConfig.config.i18n,
|
4999
|
+
params: {
|
5000
|
+
count,
|
5001
|
+
size: formattedSize,
|
5002
|
+
},
|
5003
|
+
});
|
5004
|
+
}
|
5005
|
+
getBackButton() {
|
5006
|
+
if (this.vm.isUpAvailable()) {
|
5007
|
+
return {
|
5008
|
+
title: this.vm.currentPath()[this.vm.currentPath().length - 2].name,
|
5009
|
+
};
|
5010
|
+
}
|
5011
|
+
return null;
|
5012
|
+
}
|
5013
|
+
onBackButtonClick() {
|
5014
|
+
if (this.vm.isUpAvailable()) {
|
5015
|
+
this.vm.navigateToUp();
|
5016
|
+
}
|
5017
|
+
}
|
5018
|
+
async getPageBreadcrumbs() {
|
5019
|
+
return [
|
5020
|
+
{
|
5021
|
+
title: await this.translateService.translateAsync('entity.home'),
|
5022
|
+
},
|
5023
|
+
{
|
5024
|
+
title: await this.translateService.translateAsync(`scope.${resolvePlatformScopeName(this.vm.scope())}.title`, { scope: this.rootConfig.config.i18n }),
|
5025
|
+
},
|
5026
|
+
];
|
5027
|
+
}
|
5028
|
+
async execute(command) {
|
5029
|
+
const folderId = command.options?.['folderId'];
|
5030
|
+
switch (command.name) {
|
5031
|
+
case 'new-folder':
|
5032
|
+
if (folderId) {
|
5033
|
+
await this.driveService.showCreateFolderDialog(folderId);
|
5034
|
+
this.vm.refresh();
|
5035
|
+
}
|
5036
|
+
break;
|
5037
|
+
case 'upload-file':
|
5038
|
+
if (folderId) {
|
5039
|
+
await this.driveService.uploadFileByType(folderId, '37650cc4-074d-4334-ad36-d5ee1c341632');
|
5040
|
+
this.vm.refresh();
|
5041
|
+
}
|
5042
|
+
break;
|
5043
|
+
default:
|
5044
|
+
if (command.name.startsWith('upload.')) {
|
5045
|
+
await this.driveService.uploadFileByType(folderId, command.options?.['documentType']?.id);
|
5046
|
+
this.vm.refresh();
|
5047
|
+
}
|
5048
|
+
break;
|
5049
|
+
}
|
5050
|
+
}
|
5051
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentDriveComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
5052
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentDriveComponent, isStandalone: true, selector: "axp-document-drive", host: { listeners: { "document:keydown.control": "handleCtrlKey($event)", "document:keyup.control": "handleCtrlKeyUp($event)" } }, providers: [
|
5053
|
+
AXPDocumentExplorerViewModel,
|
5054
|
+
{
|
5055
|
+
provide: AXPBasePage,
|
5056
|
+
useExisting: AXMDocumentDriveComponent,
|
5057
|
+
},
|
5058
|
+
], viewQueries: [{ propertyName: "documentExplorer", first: true, predicate: AXMDocumentExplorerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Main Layout -->\n<axp-page-layout *translate=\"let t\">\n <axp-page-toolbar>\n <!-- Left Side Toolbar -->\n <axp-layout-prefix>\n @if(vm.hasMultipleSelectedItems() ) {\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\">\n {{ vm.selectedCount() }} {{ t('itemsSelected', { scope: 'common' }) | async }}\n </span>\n <span (click)=\"vm.deselectAll()\" class=\"ax-text-sm ax-text-secondary ax-underline ax-cursor-pointer\">{{\n t('unselect', { scope: 'common' }) | async\n }}</span>\n </div>\n }\n <!---------->\n @else {\n <!-- Filter Dropdown -->\n <ax-button [text]=\"t(getFilterText(), { scope: rootConfig.config.i18n }) | async\">\n <ax-prefix>\n <ax-icon [icon]=\"getFilterIcon()\"></ax-icon>\n </ax-prefix>\n\n <ax-dropdown-panel>\n <ax-button-item-list class=\"ax-p-2\">\n @for(item of filterItems(); track item.key) {\n <ax-button-item\n (onClick)=\"setFilter(item.key)\"\n [text]=\"(t(item.textKey, { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <!-- Search Box -->\n <ax-search-box\n (onValueChanged)=\"handleSearchChange($event)\"\n class=\"ax-w-72 ax-hidden md:ax-flex\"\n [placeholder]=\"t('actions.search', { scope: rootConfig.config.i18n }) | async\"\n ><ax-clear-button></ax-clear-button\n ></ax-search-box>\n }\n </axp-layout-prefix>\n\n <!-- Right Side Toolbar -->\n <axp-layout-suffix>\n <!-- Sort Dropdown -->\n <ax-button>\n <ax-icon\n [icon]=\"'fa-light fa-arrow-' + (vm.sortDirection() === 'asc' ? 'up' : 'down') + '-wide-short'\"\n ></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <!-- Sort By Options -->\n @for(item of sortItems(); track item.key) {\n <ax-button-item\n [text]=\"(t(item.textKey, { scope: rootConfig.config.i18n }) | async)!\"\n (onClick)=\"vm.setSortField(item.key)\"\n [selected]=\"vm.sortField() === item.key\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n <ax-divider></ax-divider>\n <!-- Sort Direction Options -->\n <ax-button-item\n [text]=\"(t('actions.sort-ascending', { scope: rootConfig.config.i18n }) | async)!\"\n [selected]=\"vm.sortDirection() === 'asc'\"\n (onClick)=\"vm.setSortDirection('asc')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-arrow-up-wide-short\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item\n [text]=\"(t('actions.sort-descending', { scope: rootConfig.config.i18n }) | async)!\"\n [selected]=\"vm.sortDirection() === 'desc'\"\n (onClick)=\"vm.setSortDirection('desc')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-arrow-down-wide-short\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n <!-- View Mode Toggle -->\n <ax-button>\n <ax-icon icon=\"fa-light {{ selectedViewMode().icon }}\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(item of viewsItems(); track item.key) {\n <!-- view mode items -->\n <ax-button-item\n [text]=\"(t('view-modes.' + item.key, { scope: rootConfig.config.i18n }) | async)!\"\n [selected]=\"vm.isViewMode(item.key)\"\n (onClick)=\"vm.setViewMode(item.key)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(item.break) {\n <ax-divider></ax-divider>\n }\n <!-- end of view mode items -->\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n @if(layoutService.isLarge()) {\n <!-- Detail Panel Toggle -->\n <ax-button (onClick)=\"vm.toggleDetailPanel()\">\n <ax-icon icon=\"{{ vm.isDetailPanelOpen() ? 'fa-solid fa-square-info' : 'fa-light fa-square-info' }}\"></ax-icon>\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-page-toolbar>\n\n <!-- Content Section -->\n <axp-page-content class=\"ax-overflow-auto ax-flex ax-flex-row ax-gap-4\">\n <axm-document-explorer [selectionMode]=\"selectionMode()\"></axm-document-explorer>\n @if (vm.isDetailPanelOpen() && layoutService.isLarge()) {\n <axm-document-explorer-detail-panel class=\"ax-sticky ax-top-0 ax-z-50\"></axm-document-explorer-detail-panel>\n }\n </axp-page-content>\n\n <!-- Footer Section -->\n @if(!layoutService.isSmall()) {\n <axp-page-footer>\n <axp-layout-prefix>\n <axm-folder-path-breadcrumbs></axm-folder-path-breadcrumbs>\n </axp-layout-prefix>\n </axp-page-footer>\n }\n</axp-page-layout>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type:
|
5059
|
+
//
|
5060
|
+
AXMenuModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2$3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2$3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3$3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i4$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXFileModule }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "component", type:
|
5061
|
+
//
|
5062
|
+
AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer, axp-page-header, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-container, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type:
|
5063
|
+
//
|
5064
|
+
AXMDocumentExplorerComponent, selector: "axm-document-explorer", inputs: ["browseMode", "viewMode", "selectionMode", "showContextMenu"] }, { kind: "component", type: AXMFolderPathBreadcrumbsComponent, selector: "axm-folder-path-breadcrumbs" }, { kind: "component", type: AXMDocumentExplorerDetailPanelComponent, selector: "axm-document-explorer-detail-panel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
5065
|
+
}
|
5066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentDriveComponent, decorators: [{
|
5067
|
+
type: Component,
|
5068
|
+
args: [{ selector: 'axp-document-drive', standalone: true, imports: [
|
5069
|
+
CommonModule,
|
5070
|
+
RouterModule,
|
5071
|
+
//
|
5072
|
+
AXMenuModule,
|
5073
|
+
AXButtonModule,
|
5074
|
+
AXButtonGroupModule,
|
5075
|
+
AXDropdownButtonModule,
|
5076
|
+
AXDropdownModule,
|
5077
|
+
AXTranslationModule,
|
5078
|
+
AXDecoratorModule,
|
5079
|
+
AXLoadingModule,
|
5080
|
+
AXBreadcrumbsModule,
|
5081
|
+
AXBadgeModule,
|
5082
|
+
AXSearchBoxModule,
|
5083
|
+
AXFormatModule,
|
5084
|
+
AXFileModule,
|
5085
|
+
AXDateTimeModule,
|
5086
|
+
//
|
5087
|
+
AXPPageLayoutComponent,
|
5088
|
+
AXPThemeLayoutBlockComponent,
|
5089
|
+
//
|
5090
|
+
AXMDocumentExplorerComponent,
|
5091
|
+
AXMFolderPathBreadcrumbsComponent,
|
5092
|
+
AXMDocumentExplorerDetailPanelComponent,
|
5093
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
5094
|
+
AXPDocumentExplorerViewModel,
|
5095
|
+
{
|
5096
|
+
provide: AXPBasePage,
|
5097
|
+
useExisting: AXMDocumentDriveComponent,
|
5098
|
+
},
|
5099
|
+
], template: "<!-- Main Layout -->\n<axp-page-layout *translate=\"let t\">\n <axp-page-toolbar>\n <!-- Left Side Toolbar -->\n <axp-layout-prefix>\n @if(vm.hasMultipleSelectedItems() ) {\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\">\n {{ vm.selectedCount() }} {{ t('itemsSelected', { scope: 'common' }) | async }}\n </span>\n <span (click)=\"vm.deselectAll()\" class=\"ax-text-sm ax-text-secondary ax-underline ax-cursor-pointer\">{{\n t('unselect', { scope: 'common' }) | async\n }}</span>\n </div>\n }\n <!---------->\n @else {\n <!-- Filter Dropdown -->\n <ax-button [text]=\"t(getFilterText(), { scope: rootConfig.config.i18n }) | async\">\n <ax-prefix>\n <ax-icon [icon]=\"getFilterIcon()\"></ax-icon>\n </ax-prefix>\n\n <ax-dropdown-panel>\n <ax-button-item-list class=\"ax-p-2\">\n @for(item of filterItems(); track item.key) {\n <ax-button-item\n (onClick)=\"setFilter(item.key)\"\n [text]=\"(t(item.textKey, { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <!-- Search Box -->\n <ax-search-box\n (onValueChanged)=\"handleSearchChange($event)\"\n class=\"ax-w-72 ax-hidden md:ax-flex\"\n [placeholder]=\"t('actions.search', { scope: rootConfig.config.i18n }) | async\"\n ><ax-clear-button></ax-clear-button\n ></ax-search-box>\n }\n </axp-layout-prefix>\n\n <!-- Right Side Toolbar -->\n <axp-layout-suffix>\n <!-- Sort Dropdown -->\n <ax-button>\n <ax-icon\n [icon]=\"'fa-light fa-arrow-' + (vm.sortDirection() === 'asc' ? 'up' : 'down') + '-wide-short'\"\n ></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <!-- Sort By Options -->\n @for(item of sortItems(); track item.key) {\n <ax-button-item\n [text]=\"(t(item.textKey, { scope: rootConfig.config.i18n }) | async)!\"\n (onClick)=\"vm.setSortField(item.key)\"\n [selected]=\"vm.sortField() === item.key\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n <ax-divider></ax-divider>\n <!-- Sort Direction Options -->\n <ax-button-item\n [text]=\"(t('actions.sort-ascending', { scope: rootConfig.config.i18n }) | async)!\"\n [selected]=\"vm.sortDirection() === 'asc'\"\n (onClick)=\"vm.setSortDirection('asc')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-arrow-up-wide-short\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item\n [text]=\"(t('actions.sort-descending', { scope: rootConfig.config.i18n }) | async)!\"\n [selected]=\"vm.sortDirection() === 'desc'\"\n (onClick)=\"vm.setSortDirection('desc')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-arrow-down-wide-short\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n <!-- View Mode Toggle -->\n <ax-button>\n <ax-icon icon=\"fa-light {{ selectedViewMode().icon }}\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(item of viewsItems(); track item.key) {\n <!-- view mode items -->\n <ax-button-item\n [text]=\"(t('view-modes.' + item.key, { scope: rootConfig.config.i18n }) | async)!\"\n [selected]=\"vm.isViewMode(item.key)\"\n (onClick)=\"vm.setViewMode(item.key)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(item.break) {\n <ax-divider></ax-divider>\n }\n <!-- end of view mode items -->\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n @if(layoutService.isLarge()) {\n <!-- Detail Panel Toggle -->\n <ax-button (onClick)=\"vm.toggleDetailPanel()\">\n <ax-icon icon=\"{{ vm.isDetailPanelOpen() ? 'fa-solid fa-square-info' : 'fa-light fa-square-info' }}\"></ax-icon>\n </ax-button>\n }\n </axp-layout-suffix>\n </axp-page-toolbar>\n\n <!-- Content Section -->\n <axp-page-content class=\"ax-overflow-auto ax-flex ax-flex-row ax-gap-4\">\n <axm-document-explorer [selectionMode]=\"selectionMode()\"></axm-document-explorer>\n @if (vm.isDetailPanelOpen() && layoutService.isLarge()) {\n <axm-document-explorer-detail-panel class=\"ax-sticky ax-top-0 ax-z-50\"></axm-document-explorer-detail-panel>\n }\n </axp-page-content>\n\n <!-- Footer Section -->\n @if(!layoutService.isSmall()) {\n <axp-page-footer>\n <axp-layout-prefix>\n <axm-folder-path-breadcrumbs></axm-folder-path-breadcrumbs>\n </axp-layout-prefix>\n </axp-page-footer>\n }\n</axp-page-layout>\n" }]
|
5100
|
+
}], propDecorators: { handleCtrlKey: [{
|
5101
|
+
type: HostListener,
|
5102
|
+
args: ['document:keydown.control', ['$event']]
|
5103
|
+
}], handleCtrlKeyUp: [{
|
5104
|
+
type: HostListener,
|
5105
|
+
args: ['document:keyup.control', ['$event']]
|
5106
|
+
}] } });
|
5107
|
+
|
5108
|
+
var drive_component = /*#__PURE__*/Object.freeze({
|
5109
|
+
__proto__: null,
|
5110
|
+
AXMDocumentDriveComponent: AXMDocumentDriveComponent
|
5111
|
+
});
|
5112
|
+
|
5113
|
+
class AXMDocumentAttachmentWidgetEditComponent extends AXPWidgetComponent {
|
5114
|
+
constructor() {
|
5115
|
+
super(...arguments);
|
5116
|
+
this.vm = inject(AXPDocumentExplorerViewModel);
|
5117
|
+
this.rootConfig = RootConfig;
|
5118
|
+
this.sessionService = inject(AXPSessionService);
|
5119
|
+
this.fileService = inject(AXFileService);
|
5120
|
+
this.fileStorageService = inject(AXPFileStorageService);
|
5121
|
+
this.driveService = inject(AXMDocumentManagerService);
|
5122
|
+
this.documentExplorer = viewChild(AXMDocumentExplorerComponent);
|
5123
|
+
this.scopes = AXPPlatformScope;
|
5124
|
+
this.multiple = computed(() => this.options()['multiple']);
|
5125
|
+
this.entity = computed(() => this.options()['entity']);
|
5126
|
+
this.entityRecordId = computed(() => this.options()['record']);
|
5127
|
+
}
|
5128
|
+
async ngOnDestroy() {
|
5129
|
+
const status = this.layoutService.status();
|
5130
|
+
if (status == AXPPageStatus.Submitted) {
|
5131
|
+
const oldFiles = await this.driveService.getAllFiles({
|
5132
|
+
skip: 0,
|
5133
|
+
take: 1000,
|
5134
|
+
filter: {
|
5135
|
+
logic: 'and',
|
5136
|
+
filters: [
|
5137
|
+
{
|
5138
|
+
field: 'refRecordId',
|
5139
|
+
operator: {
|
5140
|
+
type: 'equal',
|
5141
|
+
},
|
5142
|
+
value: this.entityRecordId() ?? this.contextService.data()?.id,
|
5143
|
+
},
|
5144
|
+
{
|
5145
|
+
field: 'refEntity',
|
5146
|
+
operator: {
|
5147
|
+
type: 'equal',
|
5148
|
+
},
|
5149
|
+
value: this.entity(),
|
5150
|
+
},
|
5151
|
+
],
|
5152
|
+
},
|
5153
|
+
});
|
5154
|
+
const filesToDelete = oldFiles.filter((file) => !this.vm.files().some((f) => f.id === file.id));
|
5155
|
+
this.driveService.deleteNodes(filesToDelete);
|
5156
|
+
const files = this.vm.files();
|
5157
|
+
for (const file of files) {
|
5158
|
+
if (file.fileId && file.storageType == 'virtual') {
|
5159
|
+
if (file.fileId && file.fileId.startsWith('http')) {
|
5160
|
+
this.fileStorageService.commit(file.fileId);
|
5161
|
+
}
|
5162
|
+
this.driveService.createFile({
|
5163
|
+
fileId: file.fileId,
|
5164
|
+
name: file.name,
|
5165
|
+
parentId: '123',
|
5166
|
+
size: file.size,
|
5167
|
+
title: file.name,
|
5168
|
+
refEntity: this.entity(),
|
5169
|
+
refRecordId: this.entityRecordId(),
|
5170
|
+
});
|
5171
|
+
}
|
5172
|
+
}
|
5173
|
+
}
|
5174
|
+
}
|
5175
|
+
async ngOnInit() {
|
5176
|
+
super.ngOnInit();
|
5177
|
+
const files = await this.driveService.getAllFiles({
|
5178
|
+
skip: 0,
|
5179
|
+
take: 1000,
|
5180
|
+
filter: {
|
5181
|
+
logic: 'and',
|
5182
|
+
filters: [
|
5183
|
+
{
|
5184
|
+
field: 'refRecordId',
|
5185
|
+
operator: {
|
5186
|
+
type: 'equal',
|
5187
|
+
},
|
5188
|
+
value: this.entityRecordId(),
|
5189
|
+
},
|
5190
|
+
{
|
5191
|
+
field: 'refEntity',
|
5192
|
+
operator: {
|
5193
|
+
type: 'equal',
|
5194
|
+
},
|
5195
|
+
value: this.entity(),
|
5196
|
+
},
|
5197
|
+
],
|
5198
|
+
},
|
5199
|
+
});
|
5200
|
+
this.vm.initialize({ browseMode: 'file' });
|
5201
|
+
this.vm.virtualFolder(files);
|
5202
|
+
}
|
5203
|
+
async chooseFromDrive(scope) {
|
5204
|
+
const result = ((await this.documentExplorer()?.chooseFile(scope)) ?? []).map((item) => ({
|
5205
|
+
...item,
|
5206
|
+
id: AXPDataGenerator.uuid(),
|
5207
|
+
storageType: 'virtual',
|
5208
|
+
parentId: 'virtual',
|
5209
|
+
}));
|
5210
|
+
const exists = this.vm.files();
|
5211
|
+
await this.updateContents([...exists, ...result]);
|
5212
|
+
}
|
5213
|
+
async uploadFromComputer() {
|
5214
|
+
const files = await this.fileService.choose();
|
5215
|
+
const allFiles = this.vm.files();
|
5216
|
+
for await (const file of files) {
|
5217
|
+
const f = await this.fileStorageService.save({
|
5218
|
+
file: file,
|
5219
|
+
category: '',
|
5220
|
+
refId: this.entityRecordId(),
|
5221
|
+
refType: this.entity(),
|
5222
|
+
});
|
5223
|
+
allFiles.push({
|
5224
|
+
id: f.fileId,
|
5225
|
+
fileId: f.fileId,
|
5226
|
+
// name: `test.${f.mimeType.split('/')[1]}`,
|
5227
|
+
name: file.name,
|
5228
|
+
size: f.size,
|
5229
|
+
parentId: 'virtual',
|
5230
|
+
type: 'file',
|
5231
|
+
storageType: 'virtual',
|
5232
|
+
});
|
5233
|
+
}
|
5234
|
+
await this.updateContents(allFiles);
|
5235
|
+
}
|
5236
|
+
async updateContents(files) {
|
5237
|
+
if (this.multiple()) {
|
5238
|
+
await this.vm.virtualFolder(files);
|
5239
|
+
//this.setValue(files);
|
5240
|
+
}
|
5241
|
+
else {
|
5242
|
+
await this.vm.virtualFolder([files[files.length - 1]]);
|
5243
|
+
//this.setValue([files[files.length - 1]]);
|
5244
|
+
}
|
4500
5245
|
}
|
4501
5246
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4502
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetEditComponent, isStandalone: true, selector: "axm-document-attachment-edit-widget", providers: [AXPDocumentExplorerViewModel], viewQueries: [{ propertyName: "documentExplorer", first: true, predicate: AXMDocumentExplorerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-gap-3\" *translate=\"let t\">\n <!-- Header Section -->\n <div class=\"ax-flex ax-flex-row ax-justify-
|
5247
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetEditComponent, isStandalone: true, selector: "axm-document-attachment-edit-widget", providers: [AXPDocumentExplorerViewModel], viewQueries: [{ propertyName: "documentExplorer", first: true, predicate: AXMDocumentExplorerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-gap-3\" *translate=\"let t\">\n <!-- Header Section -->\n <div class=\"ax-flex ax-flex-row ax-justify-end\">\n <!-- Primary Actions -->\n <ax-button [text]=\"t('actions.add-item', { scope: rootConfig.config.i18n }) | async\" [color]=\"'primary'\">\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-prefix>\n <ax-dropdown-panel>\n <!-- Upload Dropdown -->\n <ax-button-item-list>\n <ax-button-item\n (onClick)=\"uploadFromComputer()\"\n [text]=\"(t('actions.upload-from-device', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-file-arrow-up\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n\n <ax-divider></ax-divider>\n\n <ax-button-item\n (onClick)=\"chooseFromDrive(scopes.User)\"\n [text]=\"(t('actions.choose-from-drive', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-file-arrow-up\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item\n (onClick)=\"chooseFromDrive(scopes.Tenant)\"\n [text]=\"(t('actions.choose-from-organization', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-file-arrow-up\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n <axm-document-explorer></axm-document-explorer>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "component", type: AXMDocumentExplorerComponent, selector: "axm-document-explorer", inputs: ["browseMode", "viewMode", "selectionMode", "showContextMenu"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3$3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i4$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2$3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXButtonGroupModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4503
5248
|
}
|
4504
5249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetEditComponent, decorators: [{
|
4505
5250
|
type: Component,
|
@@ -4513,7 +5258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
4513
5258
|
AXTranslationModule,
|
4514
5259
|
AXButtonModule,
|
4515
5260
|
AXButtonGroupModule,
|
4516
|
-
],
|
5261
|
+
], providers: [AXPDocumentExplorerViewModel], template: "<div class=\"ax-flex ax-flex-col ax-gap-3\" *translate=\"let t\">\n <!-- Header Section -->\n <div class=\"ax-flex ax-flex-row ax-justify-end\">\n <!-- Primary Actions -->\n <ax-button [text]=\"t('actions.add-item', { scope: rootConfig.config.i18n }) | async\" [color]=\"'primary'\">\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-prefix>\n <ax-dropdown-panel>\n <!-- Upload Dropdown -->\n <ax-button-item-list>\n <ax-button-item\n (onClick)=\"uploadFromComputer()\"\n [text]=\"(t('actions.upload-from-device', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-file-arrow-up\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n\n <ax-divider></ax-divider>\n\n <ax-button-item\n (onClick)=\"chooseFromDrive(scopes.User)\"\n [text]=\"(t('actions.choose-from-drive', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-file-arrow-up\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item\n (onClick)=\"chooseFromDrive(scopes.Tenant)\"\n [text]=\"(t('actions.choose-from-organization', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-file-arrow-up\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n <axm-document-explorer></axm-document-explorer>\n</div>\n" }]
|
4517
5262
|
}] });
|
4518
5263
|
|
4519
5264
|
var documentAttachmentWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
@@ -4521,25 +5266,6 @@ var documentAttachmentWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
4521
5266
|
AXMDocumentAttachmentWidgetEditComponent: AXMDocumentAttachmentWidgetEditComponent
|
4522
5267
|
});
|
4523
5268
|
|
4524
|
-
class AXMDocumentAttachmentWidgetFilterComponent extends AXPWidgetComponent {
|
4525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4527
|
-
}
|
4528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetFilterComponent, decorators: [{
|
4529
|
-
type: Component,
|
4530
|
-
args: [{
|
4531
|
-
template: ``,
|
4532
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
4533
|
-
imports: [CommonModule, FormsModule],
|
4534
|
-
inputs: [],
|
4535
|
-
}]
|
4536
|
-
}] });
|
4537
|
-
|
4538
|
-
var documentAttachmentWidgetFilter_component = /*#__PURE__*/Object.freeze({
|
4539
|
-
__proto__: null,
|
4540
|
-
AXMDocumentAttachmentWidgetFilterComponent: AXMDocumentAttachmentWidgetFilterComponent
|
4541
|
-
});
|
4542
|
-
|
4543
5269
|
class AXMDocumentAttachmentWidgetPrintComponent extends AXPWidgetComponent {
|
4544
5270
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4545
5271
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
@@ -4574,30 +5300,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
4574
5300
|
}]
|
4575
5301
|
}] });
|
4576
5302
|
|
4577
|
-
var documentAttachmentWidgetView_component = /*#__PURE__*/Object.freeze({
|
4578
|
-
__proto__: null,
|
4579
|
-
AXMDocumentAttachmentWidgetViewComponent: AXMDocumentAttachmentWidgetViewComponent
|
4580
|
-
});
|
4581
|
-
|
4582
5303
|
const AXMDocumentAttachmentWidget = {
|
4583
5304
|
name: 'document-attachment-editor',
|
4584
5305
|
title: 'DocumentAttachment',
|
4585
|
-
icon: 'fa-
|
5306
|
+
icon: 'fa-light fa-gallery',
|
4586
5307
|
description: 'My custom widget',
|
4587
|
-
|
5308
|
+
categories: AXP_WIDGETS_EDITOR_CATEGORY,
|
4588
5309
|
type: 'editor',
|
4589
5310
|
defaultFilterWidgetName: 'string-filter',
|
4590
5311
|
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
|
4591
5312
|
components: {
|
4592
5313
|
view: {
|
4593
|
-
component: () => Promise.resolve().then(function () { return
|
5314
|
+
component: () => Promise.resolve().then(function () { return documentAttachmentWidgetEdit_component; }).then((c) => c.AXMDocumentAttachmentWidgetEditComponent),
|
4594
5315
|
},
|
4595
5316
|
edit: {
|
4596
5317
|
component: () => Promise.resolve().then(function () { return documentAttachmentWidgetEdit_component; }).then((c) => c.AXMDocumentAttachmentWidgetEditComponent),
|
4597
5318
|
},
|
4598
|
-
filter: {
|
4599
|
-
component: () => Promise.resolve().then(function () { return documentAttachmentWidgetFilter_component; }).then((c) => c.AXMDocumentAttachmentWidgetFilterComponent),
|
4600
|
-
},
|
4601
5319
|
column: {
|
4602
5320
|
component: () => Promise.resolve().then(function () { return documentAttachmentWidgetColumn_component; }).then((c) => c.AXMDocumentAttachmentWidgetColumnComponent),
|
4603
5321
|
},
|
@@ -4689,6 +5407,23 @@ const AXMUploadWorkflow = {
|
|
4689
5407
|
},
|
4690
5408
|
};
|
4691
5409
|
|
5410
|
+
class AXMTaskBadgeProviderSample1 {
|
5411
|
+
constructor() {
|
5412
|
+
this.count = signal(0);
|
5413
|
+
this.key = 'badge-1';
|
5414
|
+
this.count.set(10);
|
5415
|
+
}
|
5416
|
+
}
|
5417
|
+
class AXMTaskBadgeProviderSample2 {
|
5418
|
+
constructor() {
|
5419
|
+
this.count = signal(5);
|
5420
|
+
this.key = 'badge-2';
|
5421
|
+
setInterval(() => {
|
5422
|
+
this.count.update(c => c + 1);
|
5423
|
+
}, 30000);
|
5424
|
+
}
|
5425
|
+
}
|
5426
|
+
|
4692
5427
|
function routesFacory() {
|
4693
5428
|
const config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
4694
5429
|
const routes = [
|
@@ -4702,11 +5437,11 @@ function routesFacory() {
|
|
4702
5437
|
children: [
|
4703
5438
|
{
|
4704
5439
|
path: '',
|
4705
|
-
loadComponent: () =>
|
5440
|
+
loadComponent: () => Promise.resolve().then(function () { return drive_component; }).then((c) => c.AXMDocumentDriveComponent),
|
4706
5441
|
},
|
4707
5442
|
{
|
4708
5443
|
path: ':id',
|
4709
|
-
loadComponent: () =>
|
5444
|
+
loadComponent: () => Promise.resolve().then(function () { return drive_component; }).then((c) => c.AXMDocumentDriveComponent),
|
4710
5445
|
},
|
4711
5446
|
],
|
4712
5447
|
},
|
@@ -4750,6 +5485,16 @@ class AXMDocumentManagementModule {
|
|
4750
5485
|
useClass: AXMPermissionProvider,
|
4751
5486
|
multi: true,
|
4752
5487
|
},
|
5488
|
+
{
|
5489
|
+
provide: AXP_TASK_BADGE_PROVIDERS,
|
5490
|
+
useClass: AXMTaskBadgeProviderSample1,
|
5491
|
+
multi: true,
|
5492
|
+
},
|
5493
|
+
{
|
5494
|
+
provide: AXP_TASK_BADGE_PROVIDERS,
|
5495
|
+
useClass: AXMTaskBadgeProviderSample2,
|
5496
|
+
multi: true,
|
5497
|
+
},
|
4753
5498
|
{
|
4754
5499
|
provide: ROUTES,
|
4755
5500
|
multi: true,
|
@@ -4832,6 +5577,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
4832
5577
|
useClass: AXMPermissionProvider,
|
4833
5578
|
multi: true,
|
4834
5579
|
},
|
5580
|
+
{
|
5581
|
+
provide: AXP_TASK_BADGE_PROVIDERS,
|
5582
|
+
useClass: AXMTaskBadgeProviderSample1,
|
5583
|
+
multi: true,
|
5584
|
+
},
|
5585
|
+
{
|
5586
|
+
provide: AXP_TASK_BADGE_PROVIDERS,
|
5587
|
+
useClass: AXMTaskBadgeProviderSample2,
|
5588
|
+
multi: true,
|
5589
|
+
},
|
4835
5590
|
{
|
4836
5591
|
provide: ROUTES,
|
4837
5592
|
multi: true,
|
@@ -4845,5 +5600,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
4845
5600
|
* Generated bundle index. Do not edit.
|
4846
5601
|
*/
|
4847
5602
|
|
4848
|
-
export {
|
4849
|
-
//# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-
|
5603
|
+
export { AXMDocumentManagerService as A, AXMFolderServiceImpl as B, AXMEntityProvider as C, AXMMenuProvider as D, AXMSearchCommandProvider as E, AXMSettingProvider as F, RootConfig as R, AXMDocumentTypeService as a, AXPDocumentExplorerViewModel as b, AXMDocumentExplorerComponent as c, AXMFolderPathBreadcrumbsComponent as d, AXMDocumentManagementModule as e, documentFactory as f, AXMDocumentManagementDocumentEntityModule as g, AXMDocumentService as h, AXMDocumentServiceImpl as i, documentTypeFactory as j, AXMDocumentManagementDocumentTypeEntityModule as k, AXMDocumentTypeServiceImpl as l, documentTypeMetaDefinitionfactory as m, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule as n, AXMDocumentManagementDocumentTypeMetaDefinitionEntityService as o, AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl as p, documentTypeMetaValueFactory as q, AXMDocumentManagementDocumentTypeMetaValueEntityModule as r, AXMDocumentManagementDocumentTypeMetaValueEntityService as s, AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl as t, documentTypeStatusDefinitionFactory as u, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule as v, AXMDocumentManagementDocumentTypeStatusDefinitionEntityService as w, AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl as x, folderFactory as y, AXMFolderService as z };
|
5604
|
+
//# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-CI0m4lpX.mjs.map
|