@acorex/modules 19.2.17-next.0 → 19.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.d.ts +4 -0
  2. package/auth/lib/pages/login/password/password.component.d.ts +1 -0
  3. package/common/lib/entities/dashboard/dashboard.types.d.ts +2 -2
  4. package/common/lib/entities/index.d.ts +0 -1
  5. package/common/lib/features/dashboard-home/dashboard-home.d.ts +113 -0
  6. package/common/lib/features/dashboard-home/dashboard-home.store.d.ts +19 -0
  7. package/common/lib/features/dashboard-home/dashboard.type.d.ts +12 -0
  8. package/common/lib/features/dashboard-popups/add-dashboard-popup.d.ts +11 -0
  9. package/common/lib/features/dashboard-popups/dashboard-popup.service.d.ts +9 -0
  10. package/common/lib/features/widget-wrapper/dashboard-widget-wrapper.d.ts +10 -0
  11. package/document-management/lib/document-management.module.d.ts +3 -1
  12. package/document-management/lib/entities/document/document.service.d.ts +0 -5
  13. package/document-management/lib/entities/document/document.types.d.ts +6 -0
  14. package/document-management/lib/entities/document-type/document-type.service.d.ts +2 -2
  15. package/document-management/lib/entities/document-type/document-type.types.d.ts +1 -0
  16. package/document-management/lib/entities/folder/folder.types.d.ts +5 -4
  17. package/document-management/lib/features/document-explorer/document-explorer.component.d.ts +141 -10
  18. package/document-management/lib/features/document-explorer/document-explorer.viewmodel.d.ts +65 -6
  19. package/document-management/lib/features/document-explorer/views/detail-panel/detail-panel.component.d.ts +118 -0
  20. package/document-management/lib/features/document-explorer/views/details/details-view.component.d.ts +118 -0
  21. package/document-management/lib/features/document-explorer/views/large-icons/large-icons-view.component.d.ts +118 -0
  22. package/document-management/lib/features/document-explorer/views/large-tiles/large-tiles-view.component.d.ts +118 -0
  23. package/document-management/lib/features/document-explorer/views/list/list-view.component.d.ts +118 -0
  24. package/document-management/lib/features/document-explorer/views/small-icons/small-icons-view.component.d.ts +118 -0
  25. package/document-management/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.d.ts +118 -0
  26. package/document-management/lib/features/drive/drive.component.d.ts +111 -86
  27. package/document-management/lib/features/drive-choose/drive-choose.component.d.ts +264 -0
  28. package/document-management/lib/features/file-type/widgets/file-type-extension/file-type-extension-edit.component.d.ts +1 -0
  29. package/document-management/lib/features/shared/components/choose-document-type/choose-document-type.component.d.ts +21 -0
  30. package/document-management/lib/features/shared/components/file-viewer-popup/file-viewer-popup.component.d.ts +9 -0
  31. package/document-management/lib/features/shared/components/folder-path-breadcrumbs/folder-path-breadcrumbs.component.d.ts +179 -0
  32. package/document-management/lib/features/shared/components/index.d.ts +3 -0
  33. package/document-management/lib/features/shared/document-manager.service.d.ts +67 -55
  34. package/document-management/lib/features/shared/document-manager.types.d.ts +9 -3
  35. package/document-management/lib/features/shared/index.d.ts +1 -0
  36. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +171 -1
  37. package/document-management/lib/features/workflow/upload/upload.workflow.d.ts +17 -0
  38. package/fesm2022/{acorex-modules-application-management-module-designer.component-DPJ4qpK3.mjs → acorex-modules-application-management-module-designer.component-Dd_lmV6C.mjs} +3 -3
  39. package/fesm2022/{acorex-modules-application-management-module-designer.component-DPJ4qpK3.mjs.map → acorex-modules-application-management-module-designer.component-Dd_lmV6C.mjs.map} +1 -1
  40. package/fesm2022/acorex-modules-application-management.mjs +4 -4
  41. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  42. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-DTje3YIv.mjs → acorex-modules-auth-acorex-modules-auth-DrcL7GCj.mjs} +16 -16
  43. package/fesm2022/acorex-modules-auth-acorex-modules-auth-DrcL7GCj.mjs.map +1 -0
  44. package/fesm2022/{acorex-modules-auth-app-chooser.component-CZxX5-T_.mjs → acorex-modules-auth-app-chooser.component-CbJb1P_k.mjs} +3 -3
  45. package/fesm2022/{acorex-modules-auth-app-chooser.component-CZxX5-T_.mjs.map → acorex-modules-auth-app-chooser.component-CbJb1P_k.mjs.map} +1 -1
  46. package/fesm2022/{acorex-modules-auth-login.module-B9P2XpfQ.mjs → acorex-modules-auth-login.module-DFCB1l7W.mjs} +4 -4
  47. package/fesm2022/{acorex-modules-auth-login.module-B9P2XpfQ.mjs.map → acorex-modules-auth-login.module-DFCB1l7W.mjs.map} +1 -1
  48. package/fesm2022/acorex-modules-auth-master.layout-CuKXvY0o.mjs +23 -0
  49. package/fesm2022/acorex-modules-auth-master.layout-CuKXvY0o.mjs.map +1 -0
  50. package/fesm2022/{acorex-modules-auth-password.component-C7Yp-ioT.mjs → acorex-modules-auth-password.component-5gwz30CZ.mjs} +3 -3
  51. package/fesm2022/{acorex-modules-auth-password.component-C7Yp-ioT.mjs.map → acorex-modules-auth-password.component-5gwz30CZ.mjs.map} +1 -1
  52. package/fesm2022/acorex-modules-auth-password.component-DacOjakT.mjs +132 -0
  53. package/fesm2022/acorex-modules-auth-password.component-DacOjakT.mjs.map +1 -0
  54. package/fesm2022/{acorex-modules-auth-routes-Bu-xB4O6.mjs → acorex-modules-auth-routes-D018Lg-b.mjs} +2 -2
  55. package/fesm2022/{acorex-modules-auth-routes-Bu-xB4O6.mjs.map → acorex-modules-auth-routes-D018Lg-b.mjs.map} +1 -1
  56. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-CKsbiOUX.mjs → acorex-modules-auth-tenant-chooser.component-YZBKyJFH.mjs} +3 -3
  57. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-CKsbiOUX.mjs.map → acorex-modules-auth-tenant-chooser.component-YZBKyJFH.mjs.map} +1 -1
  58. package/fesm2022/{acorex-modules-auth-two-factor-code.component-DrV3UBuT.mjs → acorex-modules-auth-two-factor-code.component-B2ZYJOrN.mjs} +3 -3
  59. package/fesm2022/{acorex-modules-auth-two-factor-code.component-DrV3UBuT.mjs.map → acorex-modules-auth-two-factor-code.component-B2ZYJOrN.mjs.map} +1 -1
  60. package/fesm2022/{acorex-modules-auth-two-factor.module-YRh6_YcG.mjs → acorex-modules-auth-two-factor.module-DiEB7VWl.mjs} +3 -3
  61. package/fesm2022/{acorex-modules-auth-two-factor.module-YRh6_YcG.mjs.map → acorex-modules-auth-two-factor.module-DiEB7VWl.mjs.map} +1 -1
  62. package/fesm2022/acorex-modules-auth.mjs +1 -1
  63. package/fesm2022/acorex-modules-common-index-B3u5feXf.mjs +507 -0
  64. package/fesm2022/acorex-modules-common-index-B3u5feXf.mjs.map +1 -0
  65. package/fesm2022/acorex-modules-common.mjs +5 -505
  66. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  67. package/fesm2022/acorex-modules-conversation.mjs +5 -5
  68. package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
  69. package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-C9ZCejjs.mjs → acorex-modules-document-management-acorex-modules-document-management-CpoLrul7.mjs} +1061 -322
  70. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-CpoLrul7.mjs.map +1 -0
  71. package/fesm2022/{acorex-modules-document-management-create-folder-dialog.component-BnRaCq_Q.mjs → acorex-modules-document-management-create-folder-dialog.component-Cp26sAs9.mjs} +7 -7
  72. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-Cp26sAs9.mjs.map +1 -0
  73. package/fesm2022/acorex-modules-document-management-details-view.component-CZyOdjEl.mjs +24 -0
  74. package/fesm2022/acorex-modules-document-management-details-view.component-CZyOdjEl.mjs.map +1 -0
  75. package/fesm2022/acorex-modules-document-management-drive-choose.component-HSZ-b7-z.mjs +163 -0
  76. package/fesm2022/acorex-modules-document-management-drive-choose.component-HSZ-b7-z.mjs.map +1 -0
  77. package/fesm2022/acorex-modules-document-management-drive.component-CZR-optD.mjs +246 -0
  78. package/fesm2022/acorex-modules-document-management-drive.component-CZR-optD.mjs.map +1 -0
  79. package/fesm2022/acorex-modules-document-management-large-icons-view.component-C5pB5bc2.mjs +20 -0
  80. package/fesm2022/acorex-modules-document-management-large-icons-view.component-C5pB5bc2.mjs.map +1 -0
  81. package/fesm2022/acorex-modules-document-management-large-tiles-view.component-D9PFgzMQ.mjs +24 -0
  82. package/fesm2022/acorex-modules-document-management-large-tiles-view.component-D9PFgzMQ.mjs.map +1 -0
  83. package/fesm2022/acorex-modules-document-management-list-view.component-DjULM8Me.mjs +20 -0
  84. package/fesm2022/acorex-modules-document-management-list-view.component-DjULM8Me.mjs.map +1 -0
  85. package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-EBf1XqU8.mjs → acorex-modules-document-management-rename-node-dialog.component-D3Cg9_5d.mjs} +6 -6
  86. package/fesm2022/acorex-modules-document-management-rename-node-dialog.component-D3Cg9_5d.mjs.map +1 -0
  87. package/fesm2022/acorex-modules-document-management-small-icons-view.component-4M8c_1Dt.mjs +20 -0
  88. package/fesm2022/acorex-modules-document-management-small-icons-view.component-4M8c_1Dt.mjs.map +1 -0
  89. package/fesm2022/acorex-modules-document-management-small-tiles-view.component-CXPXrH4g.mjs +24 -0
  90. package/fesm2022/acorex-modules-document-management-small-tiles-view.component-CXPXrH4g.mjs.map +1 -0
  91. package/fesm2022/acorex-modules-document-management.mjs +1 -1
  92. package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-CJYrDtq6.mjs} +10 -10
  93. package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-szDh56Bk.mjs.map → acorex-modules-form-template-management-acorex-modules-form-template-management-CJYrDtq6.mjs.map} +1 -1
  94. package/fesm2022/{acorex-modules-form-template-management-category.entity-BZXqnhwK.mjs → acorex-modules-form-template-management-category.entity-BdiYytzK.mjs} +3 -3
  95. package/fesm2022/{acorex-modules-form-template-management-category.entity-BZXqnhwK.mjs.map → acorex-modules-form-template-management-category.entity-BdiYytzK.mjs.map} +1 -1
  96. package/fesm2022/{acorex-modules-form-template-management-setting.provider-o2_TSVfK.mjs → acorex-modules-form-template-management-setting.provider-CoETMkEC.mjs} +2 -2
  97. package/fesm2022/{acorex-modules-form-template-management-setting.provider-o2_TSVfK.mjs.map → acorex-modules-form-template-management-setting.provider-CoETMkEC.mjs.map} +1 -1
  98. package/fesm2022/{acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs → acorex-modules-form-template-management-template-picker.component-0JfGxdMv.mjs} +3 -3
  99. package/fesm2022/{acorex-modules-form-template-management-template-picker.component-BxOdV3y2.mjs.map → acorex-modules-form-template-management-template-picker.component-0JfGxdMv.mjs.map} +1 -1
  100. package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component--MGoF75g.mjs → acorex-modules-form-template-management-template-widget-edit.component-BkJ3ieIg.mjs} +3 -3
  101. package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component--MGoF75g.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-BkJ3ieIg.mjs.map} +1 -1
  102. package/fesm2022/{acorex-modules-form-template-management-template.entity-JvWcqjzi.mjs → acorex-modules-form-template-management-template.entity-ByE2p0Mu.mjs} +3 -3
  103. package/fesm2022/{acorex-modules-form-template-management-template.entity-JvWcqjzi.mjs.map → acorex-modules-form-template-management-template.entity-ByE2p0Mu.mjs.map} +1 -1
  104. package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-Bllb70Ih.mjs → acorex-modules-form-template-management-viewer-popup.component-CThcXWpt.mjs} +4 -4
  105. package/fesm2022/{acorex-modules-form-template-management-viewer-popup.component-Bllb70Ih.mjs.map → acorex-modules-form-template-management-viewer-popup.component-CThcXWpt.mjs.map} +1 -1
  106. package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
  107. package/fesm2022/acorex-modules-notification-management.mjs +4 -4
  108. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  109. package/fesm2022/{acorex-modules-organization-management-add-item.component-Y-i6xDkl.mjs → acorex-modules-organization-management-add-item.component-DW0TneoX.mjs} +3 -3
  110. package/fesm2022/{acorex-modules-organization-management-add-item.component-Y-i6xDkl.mjs.map → acorex-modules-organization-management-add-item.component-DW0TneoX.mjs.map} +1 -1
  111. package/fesm2022/{acorex-modules-organization-management-branch.entity-DhObzxhh.mjs → acorex-modules-organization-management-branch.entity-e5pFx82N.mjs} +2 -2
  112. package/fesm2022/{acorex-modules-organization-management-branch.entity-DhObzxhh.mjs.map → acorex-modules-organization-management-branch.entity-e5pFx82N.mjs.map} +1 -1
  113. package/fesm2022/{acorex-modules-organization-management-chart.entity-Bk4WgsYr.mjs → acorex-modules-organization-management-chart.entity-DnmNyyD2.mjs} +2 -2
  114. package/fesm2022/{acorex-modules-organization-management-chart.entity-Bk4WgsYr.mjs.map → acorex-modules-organization-management-chart.entity-DnmNyyD2.mjs.map} +1 -1
  115. package/fesm2022/{acorex-modules-organization-management-company.entity-d7GaCVei.mjs → acorex-modules-organization-management-company.entity-BRkEcDNt.mjs} +2 -2
  116. package/fesm2022/{acorex-modules-organization-management-company.entity-d7GaCVei.mjs.map → acorex-modules-organization-management-company.entity-BRkEcDNt.mjs.map} +1 -1
  117. package/fesm2022/{acorex-modules-organization-management-department.entity-BxyeK3lU.mjs → acorex-modules-organization-management-department.entity-ChJXNpXn.mjs} +2 -2
  118. package/fesm2022/{acorex-modules-organization-management-department.entity-BxyeK3lU.mjs.map → acorex-modules-organization-management-department.entity-ChJXNpXn.mjs.map} +1 -1
  119. package/fesm2022/{acorex-modules-organization-management-division.entity-Dh54R4es.mjs → acorex-modules-organization-management-division.entity-qyDyhl-q.mjs} +2 -2
  120. package/fesm2022/{acorex-modules-organization-management-division.entity-Dh54R4es.mjs.map → acorex-modules-organization-management-division.entity-qyDyhl-q.mjs.map} +1 -1
  121. package/fesm2022/{acorex-modules-organization-management-employee.entity-DcJCJN3R.mjs → acorex-modules-organization-management-employee.entity-Cp5TejzT.mjs} +2 -2
  122. package/fesm2022/{acorex-modules-organization-management-employee.entity-DcJCJN3R.mjs.map → acorex-modules-organization-management-employee.entity-Cp5TejzT.mjs.map} +1 -1
  123. package/fesm2022/{acorex-modules-organization-management-employment-type.entity-aNkt-l_e.mjs → acorex-modules-organization-management-employment-type.entity-Ul10Mdwm.mjs} +2 -2
  124. package/fesm2022/{acorex-modules-organization-management-employment-type.entity-aNkt-l_e.mjs.map → acorex-modules-organization-management-employment-type.entity-Ul10Mdwm.mjs.map} +1 -1
  125. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-D1tWlJqL.mjs +92 -0
  126. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-D1tWlJqL.mjs.map +1 -0
  127. package/fesm2022/{acorex-modules-organization-management-org-chart.page-DXyAFXwE.mjs → acorex-modules-organization-management-org-chart.page-bzbCuF-w.mjs} +16 -16
  128. package/fesm2022/acorex-modules-organization-management-org-chart.page-bzbCuF-w.mjs.map +1 -0
  129. package/fesm2022/{acorex-modules-organization-management-position.entity-D17Yembh.mjs → acorex-modules-organization-management-position.entity-BpQbwW-x.mjs} +2 -2
  130. package/fesm2022/{acorex-modules-organization-management-position.entity-D17Yembh.mjs.map → acorex-modules-organization-management-position.entity-BpQbwW-x.mjs.map} +1 -1
  131. package/fesm2022/{acorex-modules-organization-management-role.entity-Cmbyle8P.mjs → acorex-modules-organization-management-role.entity-B9N4qA_E.mjs} +2 -2
  132. package/fesm2022/{acorex-modules-organization-management-role.entity-Cmbyle8P.mjs.map → acorex-modules-organization-management-role.entity-B9N4qA_E.mjs.map} +1 -1
  133. package/fesm2022/{acorex-modules-organization-management-setting.provider-CAU8Bve9.mjs → acorex-modules-organization-management-setting.provider-CMDpwkG2.mjs} +2 -2
  134. package/fesm2022/{acorex-modules-organization-management-setting.provider-CAU8Bve9.mjs.map → acorex-modules-organization-management-setting.provider-CMDpwkG2.mjs.map} +1 -1
  135. package/fesm2022/{acorex-modules-organization-management-team.entity-DcurAtLd.mjs → acorex-modules-organization-management-team.entity-7q6Eg74A.mjs} +2 -2
  136. package/fesm2022/{acorex-modules-organization-management-team.entity-DcurAtLd.mjs.map → acorex-modules-organization-management-team.entity-7q6Eg74A.mjs.map} +1 -1
  137. package/fesm2022/acorex-modules-organization-management.mjs +17 -15
  138. package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
  139. package/fesm2022/{acorex-modules-platform-management-list-version.component-CoZBz85x.mjs → acorex-modules-platform-management-list-version.component-C9764yzu.mjs} +3 -3
  140. package/fesm2022/{acorex-modules-platform-management-list-version.component-CoZBz85x.mjs.map → acorex-modules-platform-management-list-version.component-C9764yzu.mjs.map} +1 -1
  141. package/fesm2022/acorex-modules-platform-management.mjs +376 -21
  142. package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
  143. package/fesm2022/acorex-modules-scheduler-job-management.mjs +1 -1
  144. package/fesm2022/acorex-modules-security-management.mjs +1 -1
  145. package/fesm2022/acorex-modules-text-template-management.mjs +1 -1
  146. package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +4 -0
  147. package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +4 -0
  148. package/package.json +1 -1
  149. package/platform-management/lib/const.d.ts +6 -0
  150. package/platform-management/lib/entities/index.d.ts +1 -0
  151. package/platform-management/lib/entities/meta-data-definition/meta-data-definition.types.d.ts +1 -0
  152. package/platform-management/lib/entities/meta-data-definition-category/category.entity.d.ts +3 -0
  153. package/platform-management/lib/entities/meta-data-definition-category/category.service.d.ts +10 -0
  154. package/platform-management/lib/entities/meta-data-definition-category/category.types.d.ts +5 -0
  155. package/platform-management/lib/entities/meta-data-definition-category/index.d.ts +3 -0
  156. package/common/lib/entities/dashboard-widget-data/dashboard-widget-data.entity.d.ts +0 -3
  157. package/common/lib/entities/dashboard-widget-data/dashboard-widget-data.service.d.ts +0 -10
  158. package/common/lib/entities/dashboard-widget-data/dashboard-widget-data.types.d.ts +0 -9
  159. package/common/lib/entities/dashboard-widget-data/index.d.ts +0 -3
  160. package/common/lib/features/home/dashboard-home.d.ts +0 -5
  161. package/fesm2022/acorex-modules-auth-acorex-modules-auth-DTje3YIv.mjs.map +0 -1
  162. package/fesm2022/acorex-modules-auth-master.layout-BYC0FYq1.mjs +0 -23
  163. package/fesm2022/acorex-modules-auth-master.layout-BYC0FYq1.mjs.map +0 -1
  164. package/fesm2022/acorex-modules-auth-password.component-DzrYH4yM.mjs +0 -127
  165. package/fesm2022/acorex-modules-auth-password.component-DzrYH4yM.mjs.map +0 -1
  166. package/fesm2022/acorex-modules-common-index-zaFxpV8u.mjs +0 -14
  167. package/fesm2022/acorex-modules-common-index-zaFxpV8u.mjs.map +0 -1
  168. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-C9ZCejjs.mjs.map +0 -1
  169. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-BnRaCq_Q.mjs.map +0 -1
  170. package/fesm2022/acorex-modules-document-management-drive.component-Sz198sA6.mjs +0 -165
  171. package/fesm2022/acorex-modules-document-management-drive.component-Sz198sA6.mjs.map +0 -1
  172. package/fesm2022/acorex-modules-document-management-index--I8MGeDs.mjs +0 -2
  173. package/fesm2022/acorex-modules-document-management-index--I8MGeDs.mjs.map +0 -1
  174. package/fesm2022/acorex-modules-document-management-rename-node-dialog.component-EBf1XqU8.mjs.map +0 -1
  175. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DO8wSZqZ.mjs +0 -92
  176. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DO8wSZqZ.mjs.map +0 -1
  177. package/fesm2022/acorex-modules-organization-management-org-chart.page-DXyAFXwE.mjs.map +0 -1
  178. /package/common/lib/features/{home → dashboard-home}/index.d.ts +0 -0
@@ -1,9 +1,9 @@
1
1
  import { AXPSessionService, AXPAuthGuard, AXP_PERMISSION_PROVIDER } from '@acorex/platform/auth';
2
- import { AXPSearchCommandProvider, AXPEntityQueryType, AXPEntityCommandScope, createAllQueryView, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPSettingScope, AXPSettingService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
2
+ import { AXPSearchCommandProvider, createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPSettingScope, AXPSettingService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } 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, Component, ChangeDetectionStrategy, signal, computed, viewChild, effect } from '@angular/core';
6
- import { firstValueFrom, Subject } from 'rxjs';
5
+ import { inject, Injector, Injectable, NgModule, ChangeDetectionStrategy, Component, signal, computed, viewChild, input, effect, ViewEncapsulation } from '@angular/core';
6
+ import { firstValueFrom } from 'rxjs';
7
7
  import * as i6 from '@acorex/platform/layout/builder';
8
8
  import { AXPWidgetsCatalog, AXPWidgetComponent, AXPLayoutBuilderModule, AXP_WIDGETS_ADVANCE_GROUP, AXP_WIDGETS_EDITOR_GROUP } from '@acorex/platform/layout/builder';
9
9
  import { RouterModule, ROUTES } from '@angular/router';
@@ -13,11 +13,11 @@ import * as i1$1 from '@angular/common';
13
13
  import { CommonModule } from '@angular/common';
14
14
  import * as i7$1 from '@acorex/components/collapse';
15
15
  import { AXCollapseModule } from '@acorex/components/collapse';
16
- import * as i5$1 from '@acorex/components/decorators';
16
+ import * as i3 from '@acorex/components/decorators';
17
17
  import { AXDecoratorModule } from '@acorex/components/decorators';
18
18
  import * as i7 from '@acorex/components/form';
19
19
  import { AXFormModule } from '@acorex/components/form';
20
- import * as i5 from '@acorex/components/label';
20
+ import * as i4 from '@acorex/components/label';
21
21
  import { AXLabelModule } from '@acorex/components/label';
22
22
  import * as i1 from '@acorex/components/select-box';
23
23
  import { AXSelectBoxModule } from '@acorex/components/select-box';
@@ -26,18 +26,31 @@ import { FormsModule } from '@angular/forms';
26
26
  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
+ import * as i3$2 from '@acorex/components/media-viewer';
30
+ import { AXMediaViewerModule } from '@acorex/components/media-viewer';
31
+ import * as i3$4 from '@acorex/platform/workflow';
32
+ import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
33
+ import * as i2$1 from '@acorex/components/button';
34
+ import { AXButtonModule, AXButtonComponent } from '@acorex/components/button';
35
+ import { AXButtonGroupModule } from '@acorex/components/button-group';
36
+ import * as i2$2 from '@acorex/components/dropdown';
37
+ import { AXDropdownModule } from '@acorex/components/dropdown';
38
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
39
+ import * as i3$3 from '@acorex/core/translation';
40
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
29
41
  import { AXLoadingModule } from '@acorex/components/loading';
30
- import * as i4 from '@acorex/components/menu';
42
+ import * as i3$1 from '@acorex/components/menu';
31
43
  import { AXMenuModule } from '@acorex/components/menu';
32
44
  import { AXDateTimeModule } from '@acorex/core/date-time';
33
- import * as i3 from '@acorex/core/format';
34
45
  import { AXFormatModule } from '@acorex/core/format';
35
- import { AXTranslationService } from '@acorex/core/translation';
36
- import { AXPDataGenerator, AXPElementDataDirective } from '@acorex/platform/core';
37
- import { get as get$1 } from 'lodash-es';
46
+ import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
47
+ import { get as get$1, set as set$1 } from 'lodash-es';
38
48
  import { AXDialogService } from '@acorex/components/dialog';
39
49
  import { AXPopupService } from '@acorex/components/popup';
50
+ import { AXFileService } from '@acorex/core/file';
40
51
  import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
52
+ import { AXBasePageComponent } from '@acorex/components/page';
53
+ import { AXUploaderService } from '@acorex/components/uploader';
41
54
 
42
55
  const config = {
43
56
  i18n: 'document-management',
@@ -105,11 +118,11 @@ class AXMEntityProvider {
105
118
  if (moduleName == RootConfig.module.name) {
106
119
  switch (entityName) {
107
120
  case RootConfig.entities.document.name:
108
- return (await Promise.resolve().then(function () { return index; })).documentFactory(this.injector);
121
+ return (await Promise.resolve().then(function () { return index$1; })).documentFactory(this.injector);
109
122
  case RootConfig.entities.documentType.name:
110
- return (await Promise.resolve().then(function () { return index; })).documentTypeFactory(this.injector);
123
+ return (await Promise.resolve().then(function () { return index$1; })).documentTypeFactory(this.injector);
111
124
  case RootConfig.entities.folder.name:
112
- return (await Promise.resolve().then(function () { return index; })).folderFactory(this.injector);
125
+ return (await Promise.resolve().then(function () { return index$1; })).folderFactory(this.injector);
113
126
  }
114
127
  }
115
128
  return null;
@@ -659,9 +672,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
659
672
  }]
660
673
  }] });
661
674
 
662
- class AXMDocumentManagementDocumentTypeEntityService extends AXMEntityCrudServiceImpl {
675
+ class AXMDocumentTypeService extends AXMEntityCrudServiceImpl {
663
676
  }
664
- class AXMDocumentManagementDocumentTypeEntityServiceImpl extends AXMDocumentManagementDocumentTypeEntityService {
677
+ class AXMDocumentManagementDocumentTypeEntityServiceImpl extends AXMDocumentTypeService {
665
678
  constructor() {
666
679
  super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
667
680
  }
@@ -673,7 +686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
673
686
  }], ctorParameters: () => [] });
674
687
 
675
688
  async function documentTypeFactory(injector) {
676
- const dataService = injector.get(AXMDocumentManagementDocumentTypeEntityService);
689
+ const dataService = injector.get(AXMDocumentTypeService);
677
690
  const metaDefinitionService = injector.get(AXMMetaDataDefinitionService);
678
691
  const i18n = RootConfig.config.i18n;
679
692
  const entityDef = {
@@ -842,9 +855,7 @@ async function documentTypeFactory(injector) {
842
855
  queries: {
843
856
  byKey: {
844
857
  execute: async (id) => {
845
- const x = await dataService.getOne(id);
846
- console.log(x);
847
- return x;
858
+ return await dataService.getOne(id);
848
859
  },
849
860
  type: AXPEntityQueryType.Single,
850
861
  },
@@ -1117,7 +1128,7 @@ class AXMDocumentManagementDocumentTypeEntityModule {
1117
1128
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule }); }
1118
1129
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
1119
1130
  {
1120
- provide: AXMDocumentManagementDocumentTypeEntityService,
1131
+ provide: AXMDocumentTypeService,
1121
1132
  useClass: AXMDocumentManagementDocumentTypeEntityServiceImpl,
1122
1133
  },
1123
1134
  ] }); }
@@ -1130,7 +1141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1130
1141
  declarations: [],
1131
1142
  providers: [
1132
1143
  {
1133
- provide: AXMDocumentManagementDocumentTypeEntityService,
1144
+ provide: AXMDocumentTypeService,
1134
1145
  useClass: AXMDocumentManagementDocumentTypeEntityServiceImpl,
1135
1146
  },
1136
1147
  ],
@@ -2194,11 +2205,10 @@ async function folderFactory(injector) {
2194
2205
  return entityDef;
2195
2206
  }
2196
2207
 
2197
- var index = /*#__PURE__*/Object.freeze({
2208
+ var index$1 = /*#__PURE__*/Object.freeze({
2198
2209
  __proto__: null,
2199
2210
  AXMDocumentManagementDocumentEntityModule: AXMDocumentManagementDocumentEntityModule,
2200
2211
  AXMDocumentManagementDocumentTypeEntityModule: AXMDocumentManagementDocumentTypeEntityModule,
2201
- AXMDocumentManagementDocumentTypeEntityService: AXMDocumentManagementDocumentTypeEntityService,
2202
2212
  AXMDocumentManagementDocumentTypeEntityServiceImpl: AXMDocumentManagementDocumentTypeEntityServiceImpl,
2203
2213
  AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
2204
2214
  AXMDocumentManagementDocumentTypeMetaDefinitionEntityService: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
@@ -2211,6 +2221,7 @@ var index = /*#__PURE__*/Object.freeze({
2211
2221
  AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
2212
2222
  AXMDocumentService: AXMDocumentService,
2213
2223
  AXMDocumentServiceImpl: AXMDocumentServiceImpl,
2224
+ AXMDocumentTypeService: AXMDocumentTypeService,
2214
2225
  AXMFolderService: AXMFolderService,
2215
2226
  AXMFolderServiceImpl: AXMFolderServiceImpl,
2216
2227
  documentFactory: documentFactory,
@@ -2596,22 +2607,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2596
2607
  }]
2597
2608
  }] });
2598
2609
 
2599
- // @if(allowSearch()) {
2600
- // <ax-search-box><ax-clear-button></ax-clear-button></ax-search-box>
2601
- // } @if(hasClearButton()) {
2602
- // <ax-clear-button></ax-clear-button>
2603
- // } @for (validation of validationRules(); track $index) {
2604
- // <ax-validation-rule
2605
- // [rule]="validation.rule"
2606
- // [message]="validation.options?.message"
2607
- // [options]="validation.options"
2608
- // ></ax-validation-rule>
2609
- // } @for (validation of validationRules(); track $index) {
2610
- // <ax-validation-rule
2611
- // [rule]="validation.rule"
2612
- // [message]="validation.options?.message"
2613
- // [options]="validation.options"
2614
- // ></ax-validation-rule>
2615
2610
  class AXMFileTypeExtensionWidgetEditComponent extends AXPWidgetComponent {
2616
2611
  constructor() {
2617
2612
  super(...arguments);
@@ -2656,6 +2651,7 @@ class AXMFileTypeExtensionWidgetEditComponent extends AXPWidgetComponent {
2656
2651
  super.ngOnInit();
2657
2652
  this.selectedItems.set(this.getValue()?.selectedItems ?? []);
2658
2653
  this.context.set(this.getValue()?.context ?? {});
2654
+ console.log(this.selectedItems());
2659
2655
  }
2660
2656
  outputs() {
2661
2657
  return ['selectedItems', 'context'];
@@ -2714,137 +2710,143 @@ class AXMFileTypeExtensionWidgetEditComponent extends AXPWidgetComponent {
2714
2710
  }
2715
2711
  return false;
2716
2712
  }
2713
+ hasMetaInExtensions(extensions) {
2714
+ return extensions.some((ext) => ext.meta && ext.meta.length > 0);
2715
+ }
2717
2716
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2718
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMFileTypeExtensionWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
2719
- <div>
2720
- <ax-select-box
2721
- #dd
2722
- [dataSource]="dataSource"
2723
- valueField="name"
2724
- textField="title"
2725
- [multiple]="true"
2726
- [ngModel]="getValue()?.selectedItems"
2727
- (onValueChanged)="handleValueChange($event)"
2728
- >
2729
- </ax-select-box>
2730
- <div class="ax-py-3"></div>
2731
- <axp-widgets-container (onContextChanged)="handleOnContextChange($event)" [context]="context()">
2732
- @if (selectedItems().length > 0) {
2733
- <ax-collapse-group look="fill">
2734
- @for (item of selectedItems(); track item.name) {
2735
- <!-- File Types -->
2736
- <ax-collapse [caption]="item.title">
2737
- <div class="ax-flex ax-flex-col ax-gap-5">
2738
- @if (item.meta && item.meta.length > 0) {
2739
- <div class="ax-flex ax-flex-col ax-gap-2">
2740
- <ax-text [textContent]="'Global Meta Data'" class="ax-font-bold ax-text-sm"></ax-text>
2741
- @for (metaFile of item.meta; track metaFile.name) {
2742
- <!-- File Meta Data -->
2743
- <ax-form-field>
2744
- <ax-label [required]="filedIsRequired(metaFile)">{{ metaFile.title }}</ax-label>
2745
- <ng-container axp-widget-renderer [node]="getNode(metaFile)" [mode]="'edit'"></ng-container>
2746
- </ax-form-field>
2747
- }
2748
- </div>
2749
- }
2750
- @if (item.extensions && item.extensions.length > 0) {
2751
- <div class="ax-flex ax-flex-col ax-gap-3">
2752
- @for (ext of item.extensions; track ext.name) {
2753
- <!-- Extensions -->
2754
- @if (ext.meta && ext.meta.length > 0) {
2755
- <ax-text [textContent]="ext.title" class="ax-font-bold ax-text-sm"></ax-text>
2756
- <div class="ax-flex ax-flex-col ax-gap-2">
2757
- @for (extMeta of ext.meta; track $index) {
2758
- <!-- Extension Meta Data -->
2759
- <ax-form-field>
2760
- <ax-label [required]="filedIsRequired(extMeta)">{{ extMeta.title }}</ax-label>
2761
- <ng-container axp-widget-renderer [node]="getNode(extMeta)"
2762
- [mode]="'edit'"></ng-container>
2763
- </ax-form-field>
2764
- }
2765
- </div>
2766
- }
2767
- <!-- End Extension Meta Data -->
2768
- }
2769
- </div>
2770
- <!-- End Extensions -->
2771
- }
2772
- </div>
2773
- </ax-collapse>
2717
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMFileTypeExtensionWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ` <div>
2718
+ <ax-select-box
2719
+ #dd
2720
+ [dataSource]="dataSource"
2721
+ valueField="name"
2722
+ textField="title"
2723
+ [multiple]="true"
2724
+ [ngModel]="getValue()?.selectedItems"
2725
+ (onValueChanged)="handleValueChange($event)"
2726
+ >
2727
+ </ax-select-box>
2728
+ <div class="ax-py-3"></div>
2729
+ <axp-widgets-container (onContextChanged)="handleOnContextChange($event)" [context]="context()">
2730
+ @if (selectedItems().length > 0) {
2731
+ <ax-collapse-group look="fill">
2732
+ @for (item of selectedItems(); track item.name) {
2733
+ <!-- File Types -->
2734
+ <ax-collapse [caption]="item.title">
2735
+ <div class="ax-flex ax-flex-col ax-gap-5">
2736
+ @if (item.meta && item.meta.length > 0) {
2737
+ <div class="ax-flex ax-flex-col ax-gap-2">
2738
+ <ax-text [textContent]="'Global Meta Data'" class="ax-font-bold ax-text-sm"></ax-text>
2739
+ @for (metaFile of item.meta; track metaFile.name) {
2740
+ <!-- File Meta Data -->
2741
+ <ax-form-field>
2742
+ <ax-label [required]="filedIsRequired(metaFile)">{{ metaFile.title }}</ax-label>
2743
+ <ng-container axp-widget-renderer [node]="getNode(metaFile)" [mode]="'edit'"></ng-container>
2744
+ </ax-form-field>
2745
+ }
2746
+ </div>
2747
+ } @if (item.extensions && item.extensions.length > 0) {
2748
+ <div class="ax-flex ax-flex-col ax-gap-3">
2749
+ @for (ext of item.extensions; track ext.name) {
2750
+ <!-- Extensions -->
2751
+ @if (ext.meta && ext.meta.length > 0) {
2752
+ <ax-text [textContent]="ext.title" class="ax-font-bold ax-text-sm"></ax-text>
2753
+ <div class="ax-flex ax-flex-col ax-gap-2">
2754
+ @for (extMeta of ext.meta; track $index) {
2755
+ <!-- Extension Meta Data -->
2756
+ <ax-form-field>
2757
+ <ax-label [required]="filedIsRequired(extMeta)">{{ extMeta.title }}</ax-label>
2758
+ <ng-container axp-widget-renderer [node]="getNode(extMeta)" [mode]="'edit'"></ng-container>
2759
+ </ax-form-field>
2760
+ }
2761
+ </div>
2762
+ }
2763
+ <!-- End Extension Meta Data -->
2764
+ }
2765
+ </div>
2766
+ <!-- End Extensions -->
2774
2767
  }
2775
- <!-- End File Types -->
2776
- </ax-collapse-group>
2777
- }
2778
- </axp-widgets-container>
2779
- </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: i7.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i5.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5$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$1.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i7$1.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2768
+ </div>
2769
+ </ax-collapse>
2770
+ }
2771
+ <!-- End File Types -->
2772
+ </ax-collapse-group>
2773
+ }
2774
+ </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: i7.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: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: 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$1.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i7$1.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2780
2776
  }
2781
2777
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetEditComponent, decorators: [{
2782
2778
  type: Component,
2783
2779
  args: [{
2784
- template: `
2785
- <div>
2786
- <ax-select-box
2787
- #dd
2788
- [dataSource]="dataSource"
2789
- valueField="name"
2790
- textField="title"
2791
- [multiple]="true"
2792
- [ngModel]="getValue()?.selectedItems"
2793
- (onValueChanged)="handleValueChange($event)"
2794
- >
2795
- </ax-select-box>
2796
- <div class="ax-py-3"></div>
2797
- <axp-widgets-container (onContextChanged)="handleOnContextChange($event)" [context]="context()">
2798
- @if (selectedItems().length > 0) {
2799
- <ax-collapse-group look="fill">
2800
- @for (item of selectedItems(); track item.name) {
2801
- <!-- File Types -->
2802
- <ax-collapse [caption]="item.title">
2803
- <div class="ax-flex ax-flex-col ax-gap-5">
2804
- @if (item.meta && item.meta.length > 0) {
2805
- <div class="ax-flex ax-flex-col ax-gap-2">
2806
- <ax-text [textContent]="'Global Meta Data'" class="ax-font-bold ax-text-sm"></ax-text>
2807
- @for (metaFile of item.meta; track metaFile.name) {
2808
- <!-- File Meta Data -->
2809
- <ax-form-field>
2810
- <ax-label [required]="filedIsRequired(metaFile)">{{ metaFile.title }}</ax-label>
2811
- <ng-container axp-widget-renderer [node]="getNode(metaFile)" [mode]="'edit'"></ng-container>
2812
- </ax-form-field>
2813
- }
2814
- </div>
2815
- }
2816
- @if (item.extensions && item.extensions.length > 0) {
2817
- <div class="ax-flex ax-flex-col ax-gap-3">
2818
- @for (ext of item.extensions; track ext.name) {
2819
- <!-- Extensions -->
2820
- @if (ext.meta && ext.meta.length > 0) {
2821
- <ax-text [textContent]="ext.title" class="ax-font-bold ax-text-sm"></ax-text>
2822
- <div class="ax-flex ax-flex-col ax-gap-2">
2823
- @for (extMeta of ext.meta; track $index) {
2824
- <!-- Extension Meta Data -->
2825
- <ax-form-field>
2826
- <ax-label [required]="filedIsRequired(extMeta)">{{ extMeta.title }}</ax-label>
2827
- <ng-container axp-widget-renderer [node]="getNode(extMeta)"
2828
- [mode]="'edit'"></ng-container>
2829
- </ax-form-field>
2830
- }
2831
- </div>
2832
- }
2833
- <!-- End Extension Meta Data -->
2834
- }
2835
- </div>
2836
- <!-- End Extensions -->
2837
- }
2838
- </div>
2839
- </ax-collapse>
2780
+ template: ` <div>
2781
+ <ax-select-box
2782
+ #dd
2783
+ [dataSource]="dataSource"
2784
+ valueField="name"
2785
+ textField="title"
2786
+ [multiple]="true"
2787
+ [ngModel]="getValue()?.selectedItems"
2788
+ (onValueChanged)="handleValueChange($event)"
2789
+ >
2790
+ </ax-select-box>
2791
+ <div class="ax-py-3"></div>
2792
+ <axp-widgets-container (onContextChanged)="handleOnContextChange($event)" [context]="context()">
2793
+ @if (selectedItems().length > 0) {
2794
+ <ax-collapse-group look="fill">
2795
+ @for (item of selectedItems(); track item.name) {
2796
+ <!-- File Types -->
2797
+ <ax-collapse [caption]="item.title">
2798
+ <div class="ax-flex ax-flex-col ax-gap-5">
2799
+ @if (item.meta && item.meta.length > 0) {
2800
+ <div class="ax-flex ax-flex-col ax-gap-2">
2801
+ <ax-text [textContent]="'Global Meta Data'" class="ax-font-bold ax-text-sm"></ax-text>
2802
+ @for (metaFile of item.meta; track metaFile.name) {
2803
+ <!-- File Meta Data -->
2804
+ <ax-form-field>
2805
+ <ax-label [required]="filedIsRequired(metaFile)">{{ metaFile.title }}</ax-label>
2806
+ <ng-container axp-widget-renderer [node]="getNode(metaFile)" [mode]="'edit'"></ng-container>
2807
+ </ax-form-field>
2808
+ }
2809
+ </div>
2810
+ } @if (item.extensions && item.extensions.length > 0) {
2811
+ <div class="ax-flex ax-flex-col ax-gap-3">
2812
+ @for (ext of item.extensions; track ext.name) {
2813
+ <!-- Extensions -->
2814
+ @if (ext.meta && ext.meta.length > 0) {
2815
+ <ax-text [textContent]="ext.title" class="ax-font-bold ax-text-sm"></ax-text>
2816
+ <div class="ax-flex ax-flex-col ax-gap-2">
2817
+ @for (extMeta of ext.meta; track $index) {
2818
+ <!-- Extension Meta Data -->
2819
+ <ax-form-field>
2820
+ <ax-label [required]="filedIsRequired(extMeta)">{{ extMeta.title }}</ax-label>
2821
+ <ng-container axp-widget-renderer [node]="getNode(extMeta)" [mode]="'edit'"></ng-container>
2822
+ </ax-form-field>
2823
+ }
2824
+ </div>
2825
+ }
2826
+ <!-- End Extension Meta Data -->
2827
+ }
2828
+ </div>
2829
+ <!-- End Extensions -->
2840
2830
  }
2841
- <!-- End File Types -->
2842
- </ax-collapse-group>
2843
- }
2844
- </axp-widgets-container>
2845
- </div>`,
2831
+ </div>
2832
+ </ax-collapse>
2833
+ }
2834
+ <!-- End File Types -->
2835
+ </ax-collapse-group>
2836
+ }
2837
+ </axp-widgets-container>
2838
+ </div>`,
2846
2839
  changeDetection: ChangeDetectionStrategy.OnPush,
2847
- imports: [CommonModule, AXSelectBoxModule, FormsModule, AXFormModule, AXLabelModule, AXDecoratorModule, AXPLayoutBuilderModule, AXCollapseModule],
2840
+ imports: [
2841
+ CommonModule,
2842
+ AXSelectBoxModule,
2843
+ FormsModule,
2844
+ AXFormModule,
2845
+ AXLabelModule,
2846
+ AXDecoratorModule,
2847
+ AXPLayoutBuilderModule,
2848
+ AXCollapseModule,
2849
+ ],
2848
2850
  inputs: [],
2849
2851
  }]
2850
2852
  }] });
@@ -3013,6 +3015,9 @@ class AXMDocumentManagerService {
3013
3015
  this.documentService = inject(AXMDocumentService);
3014
3016
  this.popupService = inject(AXPopupService);
3015
3017
  this.dialogService = inject(AXDialogService);
3018
+ this.fileService = inject(AXPFileStorageService);
3019
+ this.fileMangerService = inject(AXFileService);
3020
+ this.workflow = inject(AXPWorkflowService);
3016
3021
  this.scopedDriveCache = new Map();
3017
3022
  }
3018
3023
  scope(scope, options) {
@@ -3023,7 +3028,6 @@ class AXMDocumentManagerService {
3023
3028
  return this.scopedDriveCache.get(cacheKey);
3024
3029
  }
3025
3030
  getScopeCacheKey(scope, options) {
3026
- // در آینده می‌توان این را برای کش کردن بر اساس ترکیب scope و options گسترش داد
3027
3031
  return scope;
3028
3032
  }
3029
3033
  /**
@@ -3112,23 +3116,32 @@ class AXMDocumentManagerService {
3112
3116
  name: folder.name,
3113
3117
  type: 'folder',
3114
3118
  parentId: folder.parentId || null,
3115
- lastModified: folder.updatedAt,
3119
+ modifiedAt: folder.updatedAt,
3120
+ createdAt: folder.createdAt,
3121
+ description: folder.description,
3122
+ childrenCount: folder.nodeCount,
3123
+ size: folder.size,
3116
3124
  children: [
3117
3125
  ...(folder.folders?.map((child) => ({
3118
3126
  id: child.id,
3119
3127
  name: child.name,
3120
3128
  type: 'folder',
3121
3129
  parentId: child.parentId || null,
3122
- lastModified: child.updatedAt,
3123
- size: AXPDataGenerator.number(50, 9000000),
3130
+ modifiedAt: child.updatedAt,
3131
+ createdAt: child.createdAt,
3132
+ childrenCount: child.nodeCount,
3133
+ description: child.description,
3134
+ size: child.size,
3124
3135
  })) || []),
3125
3136
  ...(folder.documents?.map((doc) => ({
3126
3137
  id: doc.id,
3127
3138
  name: doc.name,
3128
3139
  type: 'file',
3129
3140
  parentId: doc.parentId,
3130
- lastModified: AXPDataGenerator.date(),
3131
- size: AXPDataGenerator.number(50, 9000000),
3141
+ modifiedAt: doc.updatedAt,
3142
+ createdAt: doc.createdAt,
3143
+ size: doc.size,
3144
+ description: doc.description,
3132
3145
  })) || []),
3133
3146
  ],
3134
3147
  };
@@ -3220,6 +3233,7 @@ class AXMDocumentManagerService {
3220
3233
  isSystem: false,
3221
3234
  isHidden: false,
3222
3235
  isDeleted: false,
3236
+ size: 0,
3223
3237
  };
3224
3238
  const createdFolder = await this.folderService.insertOne(folderToCreate);
3225
3239
  const folder = await this.folderService.getOne(createdFolder);
@@ -3250,7 +3264,10 @@ class AXMDocumentManagerService {
3250
3264
  name: file.name,
3251
3265
  type: 'file',
3252
3266
  parentId: file.parentId,
3253
- lastModified: new Date(),
3267
+ modifiedAt: file.updatedAt,
3268
+ createdAt: file.createdAt,
3269
+ size: file.size,
3270
+ fileId: file.fileId,
3254
3271
  };
3255
3272
  }
3256
3273
  async createFile(data) {
@@ -3268,23 +3285,19 @@ class AXMDocumentManagerService {
3268
3285
  async deleteFile(fileId) {
3269
3286
  await this.documentService.deleteOne(fileId);
3270
3287
  }
3271
- async deleteNodes(nodeIds) {
3272
- for (const nodeId of nodeIds) {
3273
- try {
3274
- await this.deleteFolder(nodeId);
3288
+ async deleteNodes(nodes) {
3289
+ for (const node of nodes) {
3290
+ if (node.type == 'folder') {
3291
+ await this.deleteFolder(node.id);
3275
3292
  }
3276
- catch {
3277
- try {
3278
- await this.deleteFile(nodeId);
3279
- }
3280
- catch (error) {
3281
- console.error(`Failed to delete node with id ${nodeId}:`, error);
3282
- }
3293
+ else {
3294
+ await this.deleteFile(node.id);
3283
3295
  }
3284
3296
  }
3285
3297
  }
3286
3298
  async showCreateFolderDialog(parentId) {
3287
- const comp = (await import('./acorex-modules-document-management-create-folder-dialog.component-BnRaCq_Q.mjs')).AXMCreateFolderDialog;
3299
+ const comp = (await import('./acorex-modules-document-management-create-folder-dialog.component-Cp26sAs9.mjs'))
3300
+ .AXMCreateFolderDialog;
3288
3301
  const popup = await this.popupService.open(comp, {
3289
3302
  title: 't("actions.create-folder")',
3290
3303
  data: {
@@ -3293,79 +3306,138 @@ class AXMDocumentManagerService {
3293
3306
  });
3294
3307
  return popup.data?.folder;
3295
3308
  }
3309
+ async moveTo(options) {
3310
+ const comp = (await import('./acorex-modules-document-management-drive-choose.component-HSZ-b7-z.mjs')).AXMDocumentDriveChooseComponent;
3311
+ //
3312
+ const popup = await this.popupService.open(comp, {
3313
+ title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
3314
+ data: {
3315
+ selectionMode: options.multiple ? 'multiple' : 'single',
3316
+ browseMode: options.browseMode ?? 'file',
3317
+ },
3318
+ });
3319
+ //
3320
+ const selectedFolders = popup.data.result ? popup.data?.items ?? [] : [];
3321
+ if (selectedFolders.length > 0) {
3322
+ const selectedFolder = selectedFolders[0];
3323
+ if (selectedFolder) {
3324
+ if (options.node.type === 'folder') {
3325
+ await this.updateFolder(options.node.id, { parentId: selectedFolder.id });
3326
+ }
3327
+ else {
3328
+ await this.updateFile(options.node.id, { parentId: selectedFolder.id });
3329
+ }
3330
+ return true;
3331
+ }
3332
+ else {
3333
+ return false;
3334
+ }
3335
+ }
3336
+ else {
3337
+ return false;
3338
+ }
3339
+ }
3340
+ async copyTo(options) {
3341
+ const comp = (await import('./acorex-modules-document-management-drive-choose.component-HSZ-b7-z.mjs')).AXMDocumentDriveChooseComponent;
3342
+ //
3343
+ const popup = await this.popupService.open(comp, {
3344
+ title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
3345
+ data: {
3346
+ selectionMode: options.multiple ? 'multiple' : 'single',
3347
+ browseMode: options.browseMode ?? 'file',
3348
+ },
3349
+ });
3350
+ //
3351
+ const selectedFolders = popup.data.result ? popup.data?.items ?? [] : [];
3352
+ if (selectedFolders.length > 0) {
3353
+ const selectedFolder = selectedFolders[0];
3354
+ if (selectedFolder) {
3355
+ if (options.node.type === 'folder') {
3356
+ await this.createFolder({
3357
+ name: options.node.name,
3358
+ parentId: selectedFolder.id,
3359
+ color: '#ffffff',
3360
+ size: options.node.size,
3361
+ });
3362
+ }
3363
+ else {
3364
+ await this.createFile({
3365
+ title: options.node.name,
3366
+ name: options.node.name,
3367
+ parentId: selectedFolder.id,
3368
+ //TODO upload file to file storage
3369
+ fileId: '',
3370
+ size: 0,
3371
+ });
3372
+ }
3373
+ return true;
3374
+ }
3375
+ else {
3376
+ return false;
3377
+ }
3378
+ }
3379
+ else {
3380
+ return false;
3381
+ }
3382
+ }
3383
+ async showFileViewerPopup(node) {
3384
+ const parentFolder = await this.folderService.getOne(node.parentId);
3385
+ const parentFolderName = parentFolder.name;
3386
+ const nodes = await Promise.all(parentFolder.documents?.map(async (doc) => {
3387
+ return {
3388
+ id: doc.id || '',
3389
+ name: doc.name,
3390
+ type: doc.meta?.['type'],
3391
+ url: doc.fileId,
3392
+ size: doc.size.toString(),
3393
+ thumbnail: doc.fileId,
3394
+ };
3395
+ }) || []);
3396
+ console.log(nodes);
3397
+ const comp = (await Promise.resolve().then(function () { return fileViewerPopup_component; }))
3398
+ .AXMFileViewerPopupComponent;
3399
+ await this.popupService.open(comp, {
3400
+ title: `t("gallery" , ${RootConfig.module.name})` + ' - ' + parentFolderName,
3401
+ data: {
3402
+ nodes,
3403
+ },
3404
+ });
3405
+ }
3406
+ async openFile(node) {
3407
+ console.log(node);
3408
+ const file = await this.documentService.getOne(node.id);
3409
+ console.log(file);
3410
+ }
3296
3411
  async rename(node) {
3297
- const comp = (await import('./acorex-modules-document-management-rename-node-dialog.component-EBf1XqU8.mjs')).AXMRenameNodeDialog;
3412
+ const comp = (await import('./acorex-modules-document-management-rename-node-dialog.component-D3Cg9_5d.mjs'))
3413
+ .AXMRenameNodeDialog;
3298
3414
  const popup = await this.popupService.open(comp, {
3299
3415
  title: 't("actions.rename")',
3300
3416
  data: {
3301
3417
  node,
3302
3418
  },
3303
3419
  });
3304
- return popup.data?.folder;
3420
+ return popup.data?.result;
3305
3421
  }
3306
3422
  async showDeleteNodesDialog(nodeIds) {
3307
- const subject = new Subject();
3308
- subject.subscribe((status) => {
3309
- console.log(`The process has been "${status}".`);
3310
- });
3311
- const dialog = this.dialogService.open({
3312
- content: 'Are you sure?',
3313
- title: 'Delete',
3314
- type: 'danger',
3315
- buttons: [
3316
- {
3317
- text: 'Yes',
3318
- color: 'danger',
3319
- onClick: async (e) => {
3320
- e.handled = true;
3321
- e.source.text = 'Deleting...';
3322
- e.source.disabled = true;
3323
- e.source.loading = true;
3324
- subject.next('Started');
3325
- await this.deleteNodes(nodeIds);
3326
- subject.complete();
3327
- dialog.close();
3328
- },
3329
- },
3330
- {
3331
- text: 'No',
3332
- color: 'default',
3333
- autofocus: true,
3334
- onClick: () => {
3335
- dialog.close();
3336
- },
3337
- },
3338
- ],
3423
+ const result = await this.workflow.execute('delete-entity', {
3424
+ entities: nodeIds.map((node) => ({
3425
+ source: `${RootConfig.module.name}.${node.type == 'folder' ? RootConfig.entities.folder.name : RootConfig.entities.document.name}`,
3426
+ ids: [node.id],
3427
+ })),
3339
3428
  });
3429
+ return result.getOutput('result') ?? false;
3340
3430
  }
3341
- /**
3342
- * جستجوی فولدرها با نام مشخص شده در اسکوپ
3343
- * @param searchTerm عبارت جستجو
3344
- * @param scope اسکوپ جستجو
3345
- * @param options گزینه‌های اضافی مانند tenantId و userId
3346
- */
3347
3431
  async searchFolders(searchTerm, scope, options) {
3348
3432
  const { result: rootNode } = await this.getRoot(scope, options);
3349
3433
  const folders = await this.folderService.searchFolders(searchTerm, rootNode.id);
3350
3434
  return folders.map((folder) => this.mapFolderDtoToFolderNode(folder));
3351
3435
  }
3352
- /**
3353
- * جستجوی فایل‌ها با نام مشخص شده در اسکوپ
3354
- * @param searchTerm عبارت جستجو
3355
- * @param scope اسکوپ جستجو
3356
- * @param options گزینه‌های اضافی مانند tenantId و userId
3357
- */
3358
3436
  async searchFiles(searchTerm, scope, options) {
3359
3437
  const { result: rootNode } = await this.getRoot(scope, options);
3360
3438
  const files = await this.documentService.searchFiles(searchTerm, rootNode.id);
3361
3439
  return files.map((file) => this.mapFileToNode(file));
3362
3440
  }
3363
- /**
3364
- * جستجوی تمام نودها (فولدرها و فایل‌ها) با نام مشخص شده در اسکوپ
3365
- * @param searchTerm عبارت جستجو
3366
- * @param scope اسکوپ جستجو
3367
- * @param options گزینه‌های اضافی مانند tenantId و userId
3368
- */
3369
3441
  async searchNodes(searchTerm, scope, options) {
3370
3442
  const [folders, files] = await Promise.all([
3371
3443
  this.searchFolders(searchTerm, scope, options),
@@ -3373,6 +3445,125 @@ class AXMDocumentManagerService {
3373
3445
  ]);
3374
3446
  return [...folders, ...files];
3375
3447
  }
3448
+ async getAllFolders() {
3449
+ //TODO filter by scope
3450
+ return (await this.folderService.query()).items.map(this.mapFolderDtoToFolderNode);
3451
+ }
3452
+ async getAllFiles() {
3453
+ //TODO filter by scope
3454
+ return (await this.documentService.query()).items.map(this.mapFileToNode);
3455
+ }
3456
+ async getAllNodes() {
3457
+ return [...(await this.getAllFolders()), ...(await this.getAllFiles())];
3458
+ }
3459
+ async showChooseFileDialog() {
3460
+ const comp = (await import('./acorex-modules-document-management-drive-choose.component-HSZ-b7-z.mjs')).AXMDocumentDriveChooseComponent;
3461
+ await this.popupService.open(comp);
3462
+ }
3463
+ async downloadFile(node) {
3464
+ const file = await this.documentService.getOne(node.id);
3465
+ if (file && file.fileId) {
3466
+ const fileInfo = await this.fileService.getInfo(file.fileId);
3467
+ const link = document.createElement('a');
3468
+ link.href = fileInfo.url ?? '';
3469
+ link.download = file.name; // Set the desired file name
3470
+ document.body.appendChild(link);
3471
+ link.click();
3472
+ document.body.removeChild(link);
3473
+ }
3474
+ else {
3475
+ console.log('id is null');
3476
+ }
3477
+ }
3478
+ /**
3479
+ * Creates a copy of a node (file or folder)
3480
+ * @param node The node to copy
3481
+ * @returns The newly created copied node
3482
+ */
3483
+ async copy(node) {
3484
+ if (!node) {
3485
+ throw new Error('Node to copy cannot be null or undefined');
3486
+ }
3487
+ // Create a name with " copy" before the extension
3488
+ const newName = this.createCopyName(node.name);
3489
+ if (node.type === 'file') {
3490
+ // Get the original file to copy all its data
3491
+ const originalFile = await this.documentService.getOne(node.id);
3492
+ if (!originalFile) {
3493
+ throw new Error(`File with ID ${node.id} not found`);
3494
+ }
3495
+ // Create a document model from the original with the new name
3496
+ // Extract needed properties without id
3497
+ const { id, ...fileDataWithoutId } = originalFile;
3498
+ const fileData = {
3499
+ ...fileDataWithoutId,
3500
+ name: newName,
3501
+ title: newName,
3502
+ };
3503
+ // Create the new file
3504
+ return await this.createFile(fileData);
3505
+ }
3506
+ else if (node.type === 'folder') {
3507
+ // Get the original folder to copy all its data
3508
+ const originalFolder = await this.folderService.getOne(node.id);
3509
+ if (!originalFolder) {
3510
+ throw new Error(`Folder with ID ${node.id} not found`);
3511
+ }
3512
+ // Create a folder model from the original with the new name
3513
+ // Extract needed properties without id
3514
+ const { id, ...folderDataWithoutId } = originalFolder;
3515
+ const folderData = {
3516
+ ...folderDataWithoutId,
3517
+ name: newName,
3518
+ };
3519
+ // Create the new folder
3520
+ return await this.createFolder(folderData);
3521
+ }
3522
+ else {
3523
+ throw new Error(`Unsupported node type: ${node.type}`);
3524
+ }
3525
+ }
3526
+ /**
3527
+ * Creates a copy name by adding " copy" before the extension
3528
+ * @param originalName The original filename
3529
+ * @returns The new filename with " copy" added before the extension
3530
+ */
3531
+ createCopyName(originalName) {
3532
+ const lastDotIndex = originalName.lastIndexOf('.');
3533
+ if (lastDotIndex === -1) {
3534
+ // No extension
3535
+ return `${originalName} copy`;
3536
+ }
3537
+ const nameWithoutExt = originalName.substring(0, lastDotIndex);
3538
+ const extension = originalName.substring(lastDotIndex);
3539
+ return `${nameWithoutExt} copy${extension}`;
3540
+ }
3541
+ async uploadFile(folderId) {
3542
+ const folder = await this.folderService.getOne(folderId);
3543
+ var docTypes = folder.documentType;
3544
+ if (folder && docTypes == null) {
3545
+ const comp = (await Promise.resolve().then(function () { return index; })).AXMChooseDocumentTypeComponent;
3546
+ const result = await this.popupService.open(comp);
3547
+ if (result.data != null && result.data.documentType != null) {
3548
+ const { upload, ...metaContext } = result.data.context;
3549
+ //Todo
3550
+ const fileInfo = await this.fileService.getInfo(upload[0]);
3551
+ const file = await this.documentService.insertOne({
3552
+ fileId: upload[0],
3553
+ meta: metaContext,
3554
+ parentId: folderId,
3555
+ size: fileInfo.size,
3556
+ name: `test.${fileInfo.mimeType.split('/')[1]}`,
3557
+ title: 'Test',
3558
+ });
3559
+ return true;
3560
+ }
3561
+ else {
3562
+ return false;
3563
+ }
3564
+ }
3565
+ return false;
3566
+ }
3376
3567
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3377
3568
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, providedIn: 'root' }); }
3378
3569
  }
@@ -3426,30 +3617,27 @@ class ScopedDriveService {
3426
3617
  async getAvailableSpace() {
3427
3618
  return this.parent.getAvailableSpace();
3428
3619
  }
3429
- /**
3430
- * جستجوی فولدرها با نام مشخص شده در اسکوپ فعلی
3431
- * @param searchTerm عبارت جستجو
3432
- */
3433
3620
  async searchFolders(searchTerm) {
3434
3621
  this.validateScopeOptions();
3435
3622
  return this.parent.searchFolders(searchTerm, this.scope, this.options);
3436
3623
  }
3437
- /**
3438
- * جستجوی فایل‌ها با نام مشخص شده در اسکوپ فعلی
3439
- * @param searchTerm عبارت جستجو
3440
- */
3441
3624
  async searchFiles(searchTerm) {
3442
3625
  this.validateScopeOptions();
3443
3626
  return this.parent.searchFiles(searchTerm, this.scope, this.options);
3444
3627
  }
3445
- /**
3446
- * جستجوی تمام نودها (فولدرها و فایل‌ها) با نام مشخص شده در اسکوپ فعلی
3447
- * @param searchTerm عبارت جستجو
3448
- */
3449
3628
  async searchNodes(searchTerm) {
3450
3629
  this.validateScopeOptions();
3451
3630
  return this.parent.searchNodes(searchTerm, this.scope, this.options);
3452
3631
  }
3632
+ /**
3633
+ * Creates a copy of a node (file or folder)
3634
+ * @param node The node to copy
3635
+ * @returns The newly created copied node
3636
+ */
3637
+ async copy(node) {
3638
+ this.validateScopeOptions();
3639
+ return this.parent.copy(node);
3640
+ }
3453
3641
  }
3454
3642
 
3455
3643
  var AXPDocumentExplorerSettings;
@@ -3461,13 +3649,19 @@ var AXPDocumentExplorerSettings;
3461
3649
 
3462
3650
  const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withState(() => ({
3463
3651
  // View State
3464
- viewMode: 'grid',
3652
+ viewMode: 'large-tiles',
3465
3653
  isLoading: false,
3466
3654
  // Navigation State
3467
3655
  currentPath: [],
3468
3656
  currentNode: null,
3469
3657
  loadingFolderId: null,
3470
3658
  navigatingFolderId: null,
3659
+ backHistory: [],
3660
+ // Selection State
3661
+ selectionMode: 'none',
3662
+ selectedNodes: [],
3663
+ // Browse State
3664
+ browseMode: 'file',
3471
3665
  // Sort State
3472
3666
  sortField: 'name',
3473
3667
  sortDirection: 'asc',
@@ -3480,36 +3674,49 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3480
3674
  currentDrive: null,
3481
3675
  // File Type State
3482
3676
  fileTypes: [],
3677
+ // Detail Panel State
3678
+ detailPanel: false,
3483
3679
  })), withComputed((store) => ({
3484
3680
  isRoot: computed(() => {
3485
3681
  const node = store.currentNode();
3486
3682
  return node?.id === 'root' || !node?.parentId;
3487
3683
  }),
3488
- breadcrumb: computed(() => store.currentPath()),
3489
3684
  currentFolder: computed(() => store.currentNode()),
3490
3685
  currentFolderContents: computed(() => ({
3491
3686
  folders: store.folders(),
3492
3687
  files: store.files(),
3493
3688
  })),
3494
- parentFolder: computed(() => {
3495
- const currentNode = store.currentNode();
3496
- return currentNode?.parentId ? store.folders().find((folder) => folder.id === currentNode.parentId) : null;
3497
- }),
3498
- isGridView: computed(() => store.viewMode() === 'grid'),
3689
+ isLargeTilesView: computed(() => store.viewMode() === 'large-tiles'),
3690
+ isSmallTilesView: computed(() => store.viewMode() === 'small-tiles'),
3499
3691
  isListView: computed(() => store.viewMode() === 'list'),
3500
- })), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), driveService = inject(AXMDocumentManagerService), settingService = inject(AXPSettingService)) => ({
3501
- async initialize(path = 'root') {
3692
+ isDetailsView: computed(() => store.viewMode() === 'details'),
3693
+ isLargeIconsView: computed(() => store.viewMode() === 'large-icons'),
3694
+ isSmallIconsView: computed(() => store.viewMode() === 'small-icons'),
3695
+ isBackAvailable: computed(() => store.backHistory().length > 0),
3696
+ isUpAvailable: computed(() => {
3697
+ const node = store.currentNode();
3698
+ return node?.parentId != null;
3699
+ }),
3700
+ selectedCount: computed(() => store.selectedNodes().length),
3701
+ hasSelectedItems: computed(() => store.selectedNodes().length > 0),
3702
+ hasMultipleSelectedItems: computed(() => store.selectedNodes().length > 1),
3703
+ isMultiSelect: computed(() => store.selectionMode() === 'multiple'),
3704
+ selectedNode: computed(() => store.selectedNodes()[0] ?? null),
3705
+ isDetailPanelOpen: computed(() => store.detailPanel()),
3706
+ })), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), driveService = inject(AXMDocumentManagerService), settingService = inject(AXPSettingService), translateService = inject(AXTranslationService)) => ({
3707
+ async initialize(options) {
3502
3708
  // Load file types
3503
3709
  const fileTypes = await fileTypeService.items();
3504
3710
  patchState(store, { fileTypes });
3505
3711
  // Load initial settings
3506
- const viewMode = await settingService.get(AXPDocumentExplorerSettings.ViewMode);
3507
- const sortField = await settingService.get(AXPDocumentExplorerSettings.SortField);
3508
- const sortDirection = await settingService.get(AXPDocumentExplorerSettings.SortDirection);
3712
+ const viewMode = await settingService.scope(AXPSettingScope.User).get(AXPDocumentExplorerSettings.ViewMode);
3713
+ const sortField = await settingService.scope(AXPSettingScope.User).get(AXPDocumentExplorerSettings.SortField);
3714
+ const sortDirection = await settingService.scope(AXPSettingScope.User).get(AXPDocumentExplorerSettings.SortDirection);
3509
3715
  patchState(store, {
3510
- viewMode: viewMode || 'grid',
3716
+ viewMode: viewMode || 'large-tiles',
3511
3717
  sortField: sortField || 'name',
3512
3718
  sortDirection: sortDirection || 'asc',
3719
+ browseMode: options?.browseMode || 'file',
3513
3720
  });
3514
3721
  },
3515
3722
  _load: async (folderId) => {
@@ -3521,7 +3728,7 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3521
3728
  currentNode: node.result,
3522
3729
  currentPath: node.path,
3523
3730
  folders: node.result.children?.filter((item) => item.type === 'folder') || [],
3524
- files: node.result.children?.filter((item) => item.type === 'file') || [],
3731
+ files: node.result.children?.filter((item) => store.browseMode() == 'file' && item.type === 'file') || [],
3525
3732
  itemsCount: node.result.children?.length || 0,
3526
3733
  availableSpace: await driveService.getAvailableSpace(),
3527
3734
  loadingFolderId: null,
@@ -3538,15 +3745,25 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3538
3745
  }
3539
3746
  },
3540
3747
  navigateToFolder(folderId) {
3748
+ const currentNode = store.currentNode();
3749
+ if (currentNode) {
3750
+ patchState(store, {
3751
+ backHistory: [...store.backHistory(), { folderId: currentNode.id, path: store.currentPath() }],
3752
+ });
3753
+ }
3541
3754
  patchState(store, { navigatingFolderId: folderId });
3542
3755
  },
3543
3756
  async loadFolderContents(folderId) {
3544
3757
  await this._load(folderId);
3758
+ this.deselectAll();
3545
3759
  },
3546
3760
  setViewMode(mode) {
3547
3761
  patchState(store, { viewMode: mode });
3548
3762
  settingService.scope(AXPSettingScope.User).set(AXPDocumentExplorerSettings.ViewMode, mode);
3549
3763
  },
3764
+ isViewMode(mode) {
3765
+ return store.viewMode() === mode;
3766
+ },
3550
3767
  setSortField(field) {
3551
3768
  patchState(store, { sortField: field });
3552
3769
  settingService.scope(AXPSettingScope.User).set(AXPDocumentExplorerSettings.SortField, field);
@@ -3555,6 +3772,9 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3555
3772
  patchState(store, { sortDirection: direction });
3556
3773
  settingService.scope(AXPSettingScope.User).set(AXPDocumentExplorerSettings.SortDirection, direction);
3557
3774
  },
3775
+ setSelectionMode(mode) {
3776
+ patchState(store, { selectionMode: mode });
3777
+ },
3558
3778
  setDrive(scope) {
3559
3779
  patchState(store, { currentDrive: scope });
3560
3780
  },
@@ -3571,6 +3791,107 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3571
3791
  type: fileType?.name || 'Unknown',
3572
3792
  };
3573
3793
  },
3794
+ getNodeInfo(node) {
3795
+ // If no node, return a default object
3796
+ if (!node) {
3797
+ return {
3798
+ name: '---',
3799
+ icon: 'fa-light fa-folder',
3800
+ type: 'Folder',
3801
+ sections: [
3802
+ {
3803
+ title: 'Details',
3804
+ details: [],
3805
+ },
3806
+ ],
3807
+ };
3808
+ }
3809
+ // If the node is a file, return the file info
3810
+ if (node.type === 'file') {
3811
+ const fileTypes = store.fileTypes();
3812
+ const extension = node.name.split('.').pop()?.toLowerCase() || '';
3813
+ const extensions = fileTypes.flatMap((type) => type.extensions);
3814
+ const fileType = extensions.find((e) => e.name === extension);
3815
+ return {
3816
+ name: node.name,
3817
+ icon: fileType?.icon || 'fa-light fa-file',
3818
+ type: 'File',
3819
+ sections: [
3820
+ {
3821
+ title: 'Details',
3822
+ details: [
3823
+ {
3824
+ title: 'Description',
3825
+ content: node.description,
3826
+ icon: 'fa-solid fa-file-lines',
3827
+ },
3828
+ {
3829
+ title: 'Size',
3830
+ content: node.size || 0,
3831
+ format: 'filesize',
3832
+ icon: 'fa-solid fa-file-lines',
3833
+ },
3834
+ {
3835
+ title: 'Created at',
3836
+ content: node.createdAt || new Date(),
3837
+ format: 'datetime',
3838
+ icon: 'fa-solid fa-calendar-days',
3839
+ },
3840
+ {
3841
+ title: 'Modified at',
3842
+ content: node.modifiedAt || new Date(),
3843
+ format: 'datetime',
3844
+ icon: 'fa-solid fa-calendar-days',
3845
+ }
3846
+ ]
3847
+ }
3848
+ ]
3849
+ };
3850
+ }
3851
+ // If the node is a folder, return the folder info
3852
+ else {
3853
+ return {
3854
+ name: node.name,
3855
+ icon: 'fa-light fa-folder ax-text-yellow-500',
3856
+ type: 'Folder',
3857
+ sections: [
3858
+ {
3859
+ title: 'Details',
3860
+ details: [
3861
+ {
3862
+ title: 'Description',
3863
+ content: node.description,
3864
+ icon: 'fa-solid fa-file-lines',
3865
+ },
3866
+ {
3867
+ title: 'Items',
3868
+ content: node.childrenCount,
3869
+ icon: 'fa-solid fa-file-lines',
3870
+ },
3871
+ {
3872
+ title: 'Size',
3873
+ content: node.size || 0,
3874
+ format: 'filesize',
3875
+ icon: 'fa-solid fa-file-lines',
3876
+ },
3877
+ {
3878
+ title: 'Created at',
3879
+ content: node.createdAt || new Date(),
3880
+ format: 'datetime',
3881
+ icon: 'fa-solid fa-calendar-days',
3882
+ },
3883
+ {
3884
+ title: 'Modified at',
3885
+ content: node.modifiedAt || new Date(),
3886
+ format: 'datetime',
3887
+ icon: 'fa-solid fa-calendar-days',
3888
+ }
3889
+ ]
3890
+ }
3891
+ ]
3892
+ };
3893
+ }
3894
+ },
3574
3895
  sortItems(items) {
3575
3896
  const field = store.sortField();
3576
3897
  const direction = store.sortDirection();
@@ -3581,8 +3902,8 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3581
3902
  comparison = a.name.localeCompare(b.name);
3582
3903
  break;
3583
3904
  case 'modified':
3584
- const aDate = a.lastModified ? new Date(a.lastModified) : new Date(0);
3585
- const bDate = b.lastModified ? new Date(b.lastModified) : new Date(0);
3905
+ const aDate = a.modifiedAt ? new Date(a.modifiedAt) : new Date(0);
3906
+ const bDate = b.modifiedAt ? new Date(b.modifiedAt) : new Date(0);
3586
3907
  comparison = aDate.getTime() - bDate.getTime();
3587
3908
  break;
3588
3909
  case 'size':
@@ -3598,6 +3919,99 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
3598
3919
  await this._load(currentFolder.id);
3599
3920
  }
3600
3921
  },
3922
+ navigateToUp() {
3923
+ const currentNode = store.currentNode();
3924
+ const parentId = currentNode?.parentId;
3925
+ if (parentId && currentNode) {
3926
+ patchState(store, {
3927
+ backHistory: [...store.backHistory(), { folderId: currentNode.id, path: store.currentPath() }],
3928
+ });
3929
+ patchState(store, { navigatingFolderId: parentId });
3930
+ this.loadFolderContents(parentId);
3931
+ }
3932
+ },
3933
+ async navigateBack() {
3934
+ const history = store.backHistory();
3935
+ if (history.length === 0) {
3936
+ return;
3937
+ }
3938
+ const lastEntry = history[history.length - 1];
3939
+ patchState(store, { backHistory: history.slice(0, history.length - 1) });
3940
+ patchState(store, { navigatingFolderId: lastEntry.folderId });
3941
+ await this.loadFolderContents(lastEntry.folderId);
3942
+ },
3943
+ async openFile(file) {
3944
+ await driveService.openFile(file);
3945
+ },
3946
+ //TODO: Delete only one node at a time
3947
+ async deleteNodes(nodes = store.selectedNodes()) {
3948
+ const result = await driveService.showDeleteNodesDialog(nodes);
3949
+ if (result) {
3950
+ this.deselectAll();
3951
+ await this.refresh();
3952
+ }
3953
+ },
3954
+ toggleSelect(node) {
3955
+ if (store.selectionMode() === 'multiple') {
3956
+ patchState(store, { selectedNodes: store.selectedNodes().includes(node) ? store.selectedNodes().filter(n => n.id !== node.id) : [...store.selectedNodes(), node] });
3957
+ }
3958
+ else {
3959
+ patchState(store, { selectedNodes: [node] });
3960
+ }
3961
+ console.log(store.currentPath());
3962
+ },
3963
+ isItemSelected(node) {
3964
+ return store.selectedNodes().some(selectedNode => selectedNode.id === node.id);
3965
+ },
3966
+ selectAll() {
3967
+ patchState(store, { selectedNodes: [...store.folders(), ...store.files()] });
3968
+ },
3969
+ deselectAll() {
3970
+ patchState(store, { selectedNodes: [] });
3971
+ },
3972
+ openDetailPanel() {
3973
+ patchState(store, { detailPanel: true });
3974
+ },
3975
+ closeDetailPanel() {
3976
+ patchState(store, { detailPanel: false });
3977
+ },
3978
+ toggleDetailPanel() {
3979
+ patchState(store, { detailPanel: !store.detailPanel() });
3980
+ },
3981
+ //#region Menu Items
3982
+ getFolderAddMenuItems() {
3983
+ const scope = RootConfig.config.i18n;
3984
+ return [
3985
+ {
3986
+ name: 'new-folder',
3987
+ title: `t("actions.create-folder",{scope:"${scope}"})`,
3988
+ icon: 'fa-light fa-folder-plus',
3989
+ break: true,
3990
+ },
3991
+ {
3992
+ name: 'upload-file',
3993
+ title: `t("actions.upload-file",{scope:"${scope}"})`,
3994
+ icon: 'fa-light fa-file-arrow-up',
3995
+ },
3996
+ ];
3997
+ },
3998
+ getFolderActionMenuItems() {
3999
+ return [
4000
+ {
4001
+ name: 'refresh',
4002
+ title: 'Refresh',
4003
+ icon: 'fa-light fa-rotate-right',
4004
+ break: true,
4005
+ },
4006
+ {
4007
+ name: 'delete',
4008
+ title: 'Delete',
4009
+ color: 'danger',
4010
+ icon: 'fa-light fa-trash',
4011
+ },
4012
+ ];
4013
+ }
4014
+ //#endregion
3601
4015
  })));
3602
4016
 
3603
4017
  class AXMDocumentExplorerComponent {
@@ -3607,21 +4021,51 @@ class AXMDocumentExplorerComponent {
3607
4021
  this.rootContextMenu = viewChild('rootContextMenu');
3608
4022
  this.driveService = inject(AXMDocumentManagerService);
3609
4023
  this.translateService = inject(AXTranslationService);
4024
+ this.layout = inject(AXPLayoutThemeService);
4025
+ this.browseMode = input('file');
4026
+ this.viewMode = input();
4027
+ this.selectionMode = input('none');
4028
+ this.showContextMenu = input(true);
4029
+ this.view = signal(null);
4030
+ this.viewMap = {
4031
+ list: async () => (await import('./acorex-modules-document-management-list-view.component-DjULM8Me.mjs')).AXMDocumentExplorerListViewComponent,
4032
+ 'small-tiles': async () => (await import('./acorex-modules-document-management-small-tiles-view.component-CXPXrH4g.mjs')).AXMDocumentExplorerSmallTilesViewComponent,
4033
+ 'large-tiles': async () => (await import('./acorex-modules-document-management-large-tiles-view.component-D9PFgzMQ.mjs')).AXMDocumentExplorerLargeTilesViewComponent,
4034
+ details: async () => (await import('./acorex-modules-document-management-details-view.component-CZyOdjEl.mjs')).AXMDocumentExplorerDetailsViewComponent,
4035
+ 'large-icons': async () => (await import('./acorex-modules-document-management-large-icons-view.component-C5pB5bc2.mjs')).AXMDocumentExplorerLargeIconsViewComponent,
4036
+ 'small-icons': async () => (await import('./acorex-modules-document-management-small-icons-view.component-4M8c_1Dt.mjs')).AXMDocumentExplorerSmallIconsViewComponent,
4037
+ };
3610
4038
  this.#effect = effect(() => {
3611
4039
  const navigatingFolderId = this.vm.loadingFolderId();
3612
4040
  if (!navigatingFolderId) {
3613
4041
  setTimeout(() => {
3614
4042
  this.contextMenu()?.refresh();
3615
4043
  this.rootContextMenu()?.refresh();
3616
- }, 100);
4044
+ }, 300);
4045
+ }
4046
+ });
4047
+ this.#effect2 = effect(() => {
4048
+ if (this.viewMode()) {
4049
+ this.vm.setViewMode(this.viewMode());
4050
+ }
4051
+ if (this.selectionMode()) {
4052
+ this.vm.setSelectionMode(this.selectionMode());
3617
4053
  }
3618
4054
  });
4055
+ this.#effect3 = effect(async () => {
4056
+ const func = get$1(this.viewMap, this.vm.viewMode()) ?? this.viewMap['large-tiles'];
4057
+ const comp = await func();
4058
+ this.view.set(comp);
4059
+ });
3619
4060
  }
3620
4061
  #effect;
4062
+ #effect2;
4063
+ #effect3;
3621
4064
  handleNavigateToFolder(folderId) {
3622
4065
  this.vm.navigateToFolder(folderId);
4066
+ console.log(this.vm.currentFolder());
3623
4067
  }
3624
- // Context Menu Handlers
4068
+ //#region Menu and Context Menu
3625
4069
  async handleContextMenuOnOpening(e) {
3626
4070
  const node = get$1(e.targetElement, '__data__');
3627
4071
  if (!node) {
@@ -3688,6 +4132,20 @@ class AXMDocumentExplorerComponent {
3688
4132
  ],
3689
4133
  break: true,
3690
4134
  };
4135
+ const openWith = {
4136
+ name: 'open-with',
4137
+ text: 'Open with',
4138
+ icon: 'fa-light fa-circle-info',
4139
+ items: [
4140
+ {
4141
+ name: 'open-gallery',
4142
+ text: 'Gallery',
4143
+ icon: 'fa-light fa-images',
4144
+ data: node,
4145
+ },
4146
+ ],
4147
+ break: true,
4148
+ };
3691
4149
  e.items = [
3692
4150
  ...open,
3693
4151
  {
@@ -3741,35 +4199,16 @@ class AXMDocumentExplorerComponent {
3741
4199
  data: node,
3742
4200
  },
3743
4201
  ];
4202
+ if (node.type == 'file') {
4203
+ e.items.splice(1, 0, openWith);
4204
+ }
3744
4205
  }
3745
4206
  handleContextMenuRootOnOpening(e) {
3746
4207
  //TODO: check async translate method in acorex
3747
- const scope = RootConfig.config.i18n;
3748
- e.items = [
3749
- {
3750
- name: 'new-folder',
3751
- text: this.translateService.translateSync('actions.create-folder', { scope }),
3752
- icon: 'fa-light fa-folder-plus',
3753
- },
3754
- {
3755
- name: 'upload-file',
3756
- text: this.translateService.translateSync('actions.upload-file', { scope }),
3757
- icon: 'fa-light fa-file-arrow-up',
3758
- break: true,
3759
- },
3760
- {
3761
- name: 'refresh',
3762
- text: 'Refresh',
3763
- icon: 'fa-light fa-rotate-right',
3764
- break: true,
3765
- },
3766
- {
3767
- name: 'delete',
3768
- text: 'Delete',
3769
- color: 'danger',
3770
- icon: 'fa-light fa-trash',
3771
- },
3772
- ];
4208
+ e.items = [...this.vm.getFolderAddMenuItems(), ...this.vm.getFolderActionMenuItems()].map(m => ({
4209
+ ...m,
4210
+ text: `t("${m.name}")`,
4211
+ }));
3773
4212
  }
3774
4213
  async handleContextMenuItemClick(e) {
3775
4214
  const node = e.item.data;
@@ -3777,6 +4216,15 @@ class AXMDocumentExplorerComponent {
3777
4216
  case 'open-folder':
3778
4217
  this.handleNavigateToFolder(node.id);
3779
4218
  break;
4219
+ case 'open-file':
4220
+ this.openFile(node);
4221
+ break;
4222
+ case 'open-gallery':
4223
+ this.openGallery(node);
4224
+ break;
4225
+ case 'download':
4226
+ this.handleDownloadFile(node);
4227
+ break;
3780
4228
  case 'new-folder':
3781
4229
  await this.createFolder(node);
3782
4230
  // Handle new folder creation
@@ -3787,32 +4235,45 @@ class AXMDocumentExplorerComponent {
3787
4235
  case 'paste':
3788
4236
  // Handle paste operation
3789
4237
  break;
4238
+ case 'move-to':
4239
+ this.moveTo(node);
4240
+ break;
4241
+ case 'copy-to':
4242
+ this.copyTo(node);
4243
+ break;
3790
4244
  case 'rename':
3791
4245
  this.renameNode(node);
3792
4246
  break;
3793
4247
  case 'delete':
3794
- this.deleteNode(node);
4248
+ this.vm.deleteNodes([node]);
3795
4249
  break;
3796
4250
  case 'refresh':
3797
4251
  this.vm.refresh();
3798
4252
  break;
4253
+ case 'copy':
4254
+ this.makeCopy(node);
4255
+ break;
3799
4256
  }
3800
4257
  }
4258
+ //#endregion
4259
+ async openGallery(node) {
4260
+ await this.driveService.showFileViewerPopup(node);
4261
+ }
4262
+ async openFile(node) {
4263
+ await this.driveService.openFile(node);
4264
+ }
4265
+ handleDownloadFile(node) {
4266
+ this.driveService.downloadFile(node);
4267
+ }
3801
4268
  async createFolder(node) {
3802
- const folderId = node?.id ?? this.vm.currentFolder()?.id;
3803
- if (folderId) {
3804
- const result = await this.driveService.showCreateFolderDialog(this.vm.currentFolder()?.id);
4269
+ const parentId = node?.id ?? this.vm.currentFolder()?.id;
4270
+ if (parentId) {
4271
+ const result = await this.driveService.showCreateFolderDialog(parentId);
3805
4272
  if (result) {
3806
4273
  await this.vm.refresh();
3807
4274
  }
3808
4275
  }
3809
4276
  }
3810
- async deleteNode(node) {
3811
- if (node) {
3812
- await this.driveService.showDeleteNodesDialog([node.id]);
3813
- await this.vm.refresh();
3814
- }
3815
- }
3816
4277
  async renameNode(node) {
3817
4278
  if (node) {
3818
4279
  const result = await this.driveService.rename(node);
@@ -3824,18 +4285,49 @@ class AXMDocumentExplorerComponent {
3824
4285
  async uploadFile(node) {
3825
4286
  const folderId = node?.id ?? this.vm.currentFolder()?.id;
3826
4287
  if (folderId) {
3827
- // const result = await this.driveService.showCreateFolderDialog(this.vm.currentFolder()?.id);
3828
- // if (result) {
3829
- // await this.vm.refresh();
3830
- // }
4288
+ const res = await this.driveService.uploadFile(folderId);
4289
+ if (res) {
4290
+ await this.vm.refresh();
4291
+ }
4292
+ }
4293
+ }
4294
+ async chooseFile() {
4295
+ await this.driveService.showChooseFileDialog();
4296
+ await this.vm.refresh();
4297
+ }
4298
+ async makeCopy(node) {
4299
+ if (node) {
4300
+ try {
4301
+ const copiedNode = await this.driveService.copy(node);
4302
+ await this.vm.refresh();
4303
+ }
4304
+ catch (error) {
4305
+ console.error('Error copying node:', error);
4306
+ }
4307
+ }
4308
+ }
4309
+ async moveTo(node) {
4310
+ if (node) {
4311
+ const result = await this.driveService.moveTo({ browseMode: 'folder', node: node });
4312
+ if (result) {
4313
+ await this.vm.refresh();
4314
+ }
4315
+ }
4316
+ }
4317
+ async copyTo(node) {
4318
+ if (node) {
4319
+ const result = await this.driveService.copyTo({ browseMode: 'folder', node: node });
4320
+ if (result) {
4321
+ await this.vm.refresh();
4322
+ }
3831
4323
  }
3832
4324
  }
3833
4325
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3834
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentExplorerComponent, isStandalone: true, selector: "axm-document-explorer", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["itemsContextMenu"], descendants: true, isSignal: true }, { propertyName: "rootContextMenu", first: true, predicate: ["rootContextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Content -->\n<div class=\"content\">\n <!-- Empty State -->\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 <!-- Grid View -->\n @if (vm.isGridView()) {\n <!-- Folders Section -->\n @if (vm.folders().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Folders</h3>\n <div class=\"items-grid\">\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"gridFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n }\n </div>\n </div>\n }\n\n <!-- Files Section -->\n @if (vm.files().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Files</h3>\n <div class=\"items-grid\">\n @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"gridFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </div>\n </div>\n }\n <!-- Grid View End -->\n }\n\n <!-- List View -->\n @if (vm.isListView()) {\n <div class=\"list-view\">\n <table class=\"items-table\">\n <thead>\n <tr>\n <th class=\"name-column\">Name</th>\n <th class=\"type-column\">Type</th>\n <th class=\"size-column\">Size</th>\n <th class=\"date-column\">Last Modified</th>\n </tr>\n </thead>\n <tbody>\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"listFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n } @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"listFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </tbody>\n </table>\n </div>\n } }\n</div>\n\n<!-- Grid View Templates -->\n<ng-template #gridFolderTemplate let-folder>\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"folder\"\n (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <ax-icon icon=\"fa-solid fa-folder-closed \"></ax-icon>\n }\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ folder.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">15 items</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ folder.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #gridFileTemplate let-file>\n @let fileInfo = vm.getFileInfo(file.name);\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"file\"\n (dblclick)=\"handleNavigateToFolder(file.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ file.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.size | format : 'filesize' | async }}</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- List View Templates -->\n<ng-template #listFolderTemplate let-folder>\n <tr class=\"folder-row\" (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"folder\">\n <div class=\"item-name\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n <span>{{ folder.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"folder\">Folder</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"folder\">{{ folder.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"folder\">\n {{ folder.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #listFileTemplate let-file>\n <tr class=\"file-row\">\n @let fileInfo = vm.getFileInfo(file.name);\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"file\">\n <div class=\"item-name hover:ax-underline\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n <span>{{ file.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"file\">{{ fileInfo.type }}</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"file\">{{ file.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"file\">\n {{ file.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #folderLoading>\n <i class=\"fa-light fa-spinner fa-spin-pulse ax-text-2xl\"></i>\n</ng-template>\n\n<!-- Context Menu-->\n<ax-context-menu #itemsContextMenu [target]=\"'.axp-explorer-item'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuOnOpening($event)\">\n</ax-context-menu>\n\n<ax-context-menu #rootContextMenu [target]=\"'axm-document-explorer'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuRootOnOpening($event)\">\n</ax-context-menu>", styles: [":host{display:flex;height:100%;flex:1 1 0%;flex-direction:column;gap:1rem}:host .content{flex:1 1 0%;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;overflow-y:auto}:host .content .loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem}:host .content .loading-state i{font-size:1.5rem;line-height:2rem}:host .content .section{margin-bottom:2rem}:host .content .section:last-child{margin-bottom:0}:host .content .section .section-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:500}:host .content .section .items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}:host .content .list-view .items-table{width:100%;border-collapse:collapse}:host .content .list-view .items-table th{border-bottom-width:1px;padding:.75rem;text-align:start;font-weight:500;background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host .content .list-view .items-table th.name-column{width:50%}:host .content .list-view .items-table th.type-column{width:20%}:host .content .list-view .items-table th.size-column{width:15%}:host .content .list-view .items-table th.date-column{width:15%}:host .content .list-view .items-table td{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-surface),var(--tw-border-opacity, 1));padding:.75rem}:host .content .list-view .items-table td.name-column .item-name{display:flex;align-items:center;gap:.5rem}:host .content .list-view .items-table td.name-column .item-name i{font-size:1.25rem;line-height:1.75rem}:host .content .list-view .items-table tr{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content .list-view .items-table tr:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1))}:host .content .list-view .items-table tr.folder-row td .item-name i{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i3.AXFormatPipe, name: "format" }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i4.AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening"] }, { kind: "directive", type: AXPElementDataDirective, selector: "[axp-data]", inputs: ["axp-data", "axp-data-path"] }] }); }
4326
+ 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:100%;width:100%;flex-direction:row;gap:1rem;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))}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: i3.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 }); }
3835
4327
  }
3836
4328
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerComponent, decorators: [{
3837
4329
  type: Component,
3838
- args: [{ selector: 'axm-document-explorer', standalone: true, imports: [
4330
+ args: [{ selector: 'axm-document-explorer', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
3839
4331
  CommonModule,
3840
4332
  RouterModule,
3841
4333
  AXDecoratorModule,
@@ -3843,23 +4335,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
3843
4335
  AXFormatModule,
3844
4336
  AXDateTimeModule,
3845
4337
  AXMenuModule,
3846
- AXPElementDataDirective,
3847
- ], template: "<!-- Content -->\n<div class=\"content\">\n <!-- Empty State -->\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 <!-- Grid View -->\n @if (vm.isGridView()) {\n <!-- Folders Section -->\n @if (vm.folders().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Folders</h3>\n <div class=\"items-grid\">\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"gridFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n }\n </div>\n </div>\n }\n\n <!-- Files Section -->\n @if (vm.files().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Files</h3>\n <div class=\"items-grid\">\n @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"gridFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </div>\n </div>\n }\n <!-- Grid View End -->\n }\n\n <!-- List View -->\n @if (vm.isListView()) {\n <div class=\"list-view\">\n <table class=\"items-table\">\n <thead>\n <tr>\n <th class=\"name-column\">Name</th>\n <th class=\"type-column\">Type</th>\n <th class=\"size-column\">Size</th>\n <th class=\"date-column\">Last Modified</th>\n </tr>\n </thead>\n <tbody>\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"listFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n } @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"listFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </tbody>\n </table>\n </div>\n } }\n</div>\n\n<!-- Grid View Templates -->\n<ng-template #gridFolderTemplate let-folder>\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"folder\"\n (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <ax-icon icon=\"fa-solid fa-folder-closed \"></ax-icon>\n }\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ folder.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">15 items</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ folder.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #gridFileTemplate let-file>\n @let fileInfo = vm.getFileInfo(file.name);\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"file\"\n (dblclick)=\"handleNavigateToFolder(file.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ file.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.size | format : 'filesize' | async }}</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- List View Templates -->\n<ng-template #listFolderTemplate let-folder>\n <tr class=\"folder-row\" (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"folder\">\n <div class=\"item-name\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n <span>{{ folder.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"folder\">Folder</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"folder\">{{ folder.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"folder\">\n {{ folder.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #listFileTemplate let-file>\n <tr class=\"file-row\">\n @let fileInfo = vm.getFileInfo(file.name);\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"file\">\n <div class=\"item-name hover:ax-underline\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n <span>{{ file.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"file\">{{ fileInfo.type }}</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"file\">{{ file.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"file\">\n {{ file.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #folderLoading>\n <i class=\"fa-light fa-spinner fa-spin-pulse ax-text-2xl\"></i>\n</ng-template>\n\n<!-- Context Menu-->\n<ax-context-menu #itemsContextMenu [target]=\"'.axp-explorer-item'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuOnOpening($event)\">\n</ax-context-menu>\n\n<ax-context-menu #rootContextMenu [target]=\"'axm-document-explorer'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuRootOnOpening($event)\">\n</ax-context-menu>", styles: [":host{display:flex;height:100%;flex:1 1 0%;flex-direction:column;gap:1rem}:host .content{flex:1 1 0%;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;overflow-y:auto}:host .content .loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem}:host .content .loading-state i{font-size:1.5rem;line-height:2rem}:host .content .section{margin-bottom:2rem}:host .content .section:last-child{margin-bottom:0}:host .content .section .section-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:500}:host .content .section .items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}:host .content .list-view .items-table{width:100%;border-collapse:collapse}:host .content .list-view .items-table th{border-bottom-width:1px;padding:.75rem;text-align:start;font-weight:500;background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host .content .list-view .items-table th.name-column{width:50%}:host .content .list-view .items-table th.type-column{width:20%}:host .content .list-view .items-table th.size-column{width:15%}:host .content .list-view .items-table th.date-column{width:15%}:host .content .list-view .items-table td{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-surface),var(--tw-border-opacity, 1));padding:.75rem}:host .content .list-view .items-table td.name-column .item-name{display:flex;align-items:center;gap:.5rem}:host .content .list-view .items-table td.name-column .item-name i{font-size:1.25rem;line-height:1.75rem}:host .content .list-view .items-table tr{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content .list-view .items-table tr:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1))}:host .content .list-view .items-table tr.folder-row td .item-name i{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}\n"] }]
4338
+ ], 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:100%;width:100%;flex-direction:row;gap:1rem;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))}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"] }]
4339
+ }] });
4340
+
4341
+ class AXMChooseDocumentTypeComponent extends AXBasePageComponent {
4342
+ constructor() {
4343
+ super(...arguments);
4344
+ this.documentTypeService = inject(AXMDocumentTypeService);
4345
+ this.fileTypeService = inject(AXPFileTypeProviderService);
4346
+ this.documentTypeSelected = signal([]);
4347
+ this.context = signal({});
4348
+ this.documentTypesSource = new AXDataSource({
4349
+ load: async (_) => {
4350
+ return await this.documentTypeService.query();
4351
+ },
4352
+ pageSize: 10,
4353
+ key: 'id',
4354
+ });
4355
+ this.uploadNode = signal({
4356
+ name: 'upload',
4357
+ path: 'upload',
4358
+ type: 'file',
4359
+ options: {
4360
+ accept: '.pdf',
4361
+ multiple: false,
4362
+ },
4363
+ });
4364
+ }
4365
+ async handleChangeDocumentType(event) {
4366
+ const item = event.component.selectedItems[0];
4367
+ this.uploadNode.update((old) => {
4368
+ return {
4369
+ ...old,
4370
+ options: {
4371
+ multiple: item.isMultiple,
4372
+ accept: item.name == 'any' ? '' : item.type.selectedItems.map((i) => `.${i.name.split('.')[1]}`).join(','),
4373
+ },
4374
+ };
4375
+ });
4376
+ for (const i of item.meta) {
4377
+ console.log(JSON.parse(i.interface)['children'][0]);
4378
+ if (!get(i, '__node__')) {
4379
+ set$1(i, '__node__', typeof i.interface == 'function' ? await i.interface() :
4380
+ JSON.parse(i.interface)['children'][0]['children'][0]);
4381
+ }
4382
+ }
4383
+ this.documentTypeSelected.set([item]);
4384
+ }
4385
+ handleContextChanged(e) {
4386
+ this.context.set(e.data);
4387
+ }
4388
+ handleCancel() {
4389
+ this.close();
4390
+ }
4391
+ handlesubmit() {
4392
+ this.close({
4393
+ documentType: this.documentTypeSelected(),
4394
+ context: this.context(),
4395
+ });
4396
+ }
4397
+ getNode(meta) {
4398
+ console.log(meta);
4399
+ return get(meta, '__node__');
4400
+ }
4401
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMChooseDocumentTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4402
+ 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\n <ng-container axp-widget-renderer [node]=\"uploadNode()\" mode=\"edit\"></ng-container>\n\n </ax-form>\n </axp-widgets-container>\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button text=\"Cancel\" look=\"blank\" (onClick)=\"handleCancel()\"> </ax-button>\n <ax-button text=\"Next\" (onClick)=\"handlesubmit()\"> </ax-button>\n </ax-suffix>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i7.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i7.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 }); }
4403
+ }
4404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMChooseDocumentTypeComponent, decorators: [{
4405
+ type: Component,
4406
+ 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\n <ng-container axp-widget-renderer [node]=\"uploadNode()\" mode=\"edit\"></ng-container>\n\n </ax-form>\n </axp-widgets-container>\n }\n </div>\n</ax-content>\n<ax-footer>\n <ax-suffix>\n <ax-button text=\"Cancel\" look=\"blank\" (onClick)=\"handleCancel()\"> </ax-button>\n <ax-button text=\"Next\" (onClick)=\"handlesubmit()\"> </ax-button>\n </ax-suffix>\n</ax-footer>\n" }]
4407
+ }] });
4408
+
4409
+ class AXMFileViewerPopupComponent extends AXBasePageComponent {
4410
+ onClose() {
4411
+ this.close();
4412
+ }
4413
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileViewerPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4414
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFileViewerPopupComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div>\n <ax-content>\n <ax-media-viewer-container #c [dataArray]=\"nodes\">\n <ax-header>\n <ax-file-info></ax-file-info>\n </ax-header>\n\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\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\n <ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'close'\" (click)=\"onClose()\" />\n </ax-suffix>\n </ax-footer>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.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 }); }
4415
+ }
4416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileViewerPopupComponent, decorators: [{
4417
+ type: Component,
4418
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXMediaViewerModule], template: "<div>\n <ax-content>\n <ax-media-viewer-container #c [dataArray]=\"nodes\">\n <ax-header>\n <ax-file-info></ax-file-info>\n </ax-header>\n\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\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\n <ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'close'\" (click)=\"onClose()\" />\n </ax-suffix>\n </ax-footer>\n</div>\n" }]
4419
+ }] });
4420
+
4421
+ var fileViewerPopup_component = /*#__PURE__*/Object.freeze({
4422
+ __proto__: null,
4423
+ AXMFileViewerPopupComponent: AXMFileViewerPopupComponent
4424
+ });
4425
+
4426
+ class AXMFolderPathBreadcrumbsComponent {
4427
+ constructor() {
4428
+ this.vm = inject(AXPDocumentExplorerViewModel);
4429
+ this.layout = inject(AXPLayoutThemeService);
4430
+ }
4431
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderPathBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4432
+ 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$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
4433
+ }
4434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderPathBreadcrumbsComponent, decorators: [{
4435
+ type: Component,
4436
+ args: [{ selector: 'axm-folder-path-breadcrumbs', standalone: true, imports: [
4437
+ AXButtonModule,
4438
+ AXDecoratorModule,
4439
+ ], 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"] }]
3848
4440
  }] });
3849
4441
 
4442
+ var index = /*#__PURE__*/Object.freeze({
4443
+ __proto__: null,
4444
+ AXMChooseDocumentTypeComponent: AXMChooseDocumentTypeComponent,
4445
+ AXMFileViewerPopupComponent: AXMFileViewerPopupComponent,
4446
+ AXMFolderPathBreadcrumbsComponent: AXMFolderPathBreadcrumbsComponent
4447
+ });
4448
+
3850
4449
  class AXMDocumentAttachmentWidgetEditComponent extends AXPWidgetComponent {
4450
+ constructor() {
4451
+ super(...arguments);
4452
+ this.driveService = inject(AXMDocumentManagerService);
4453
+ this.vm = inject(AXPDocumentExplorerViewModel);
4454
+ this.rootConfig = RootConfig;
4455
+ this.documentExplorer = viewChild(AXMDocumentExplorerComponent);
4456
+ this.#navigateEffect = effect(() => {
4457
+ const navigatingFolderId = this.vm.navigatingFolderId();
4458
+ if (navigatingFolderId) {
4459
+ this.loadDrive(navigatingFolderId);
4460
+ }
4461
+ });
4462
+ }
4463
+ #navigateEffect;
4464
+ ngOnInit() {
4465
+ super.ngOnInit();
4466
+ this.vm.initialize({ browseMode: 'file' });
4467
+ this.loadDrive();
4468
+ }
4469
+ async loadDrive(folderId) {
4470
+ if (folderId) {
4471
+ await this.vm.loadFolderContents(folderId);
4472
+ }
4473
+ else {
4474
+ const root = await this.driveService.getRoot(AXMDriveScope.Platform);
4475
+ if (root.result) {
4476
+ await this.vm.loadFolderContents(root.result.id);
4477
+ }
4478
+ }
4479
+ }
4480
+ handleNavigateToFolder(folderId) {
4481
+ this.vm.navigateToFolder(folderId);
4482
+ }
3851
4483
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3852
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetEditComponent, isStandalone: true, selector: "axm-document-attachment-widget", usesInheritance: true, ngImport: i0, template: `<axm-document-explorer></axm-document-explorer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMDocumentExplorerComponent, selector: "axm-document-explorer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4484
+ 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-between\">\n <ax-button\n (onClick)=\"handleNavigateToFolder(vm.currentFolder()?.parentId!)\"\n [ngClass]=\"{ 'ax-invisible': !vm.currentFolder()?.parentId }\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-arrow-left\"></ax-icon>\n </ax-prefix>\n </ax-button>\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)=\"documentExplorer()?.chooseFile()\"\n [text]=\"(t('drive-types.platform-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-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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i2$2.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$3.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXButtonGroupModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3853
4485
  }
3854
4486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetEditComponent, decorators: [{
3855
4487
  type: Component,
3856
- args: [{
3857
- selector: 'axm-document-attachment-widget',
3858
- template: `<axm-document-explorer></axm-document-explorer>`,
3859
- changeDetection: ChangeDetectionStrategy.OnPush,
3860
- imports: [CommonModule, AXMDocumentExplorerComponent],
3861
- inputs: [],
3862
- }]
4488
+ args: [{ selector: 'axm-document-attachment-edit-widget', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
4489
+ CommonModule,
4490
+ AXMDocumentExplorerComponent,
4491
+ AXButtonComponent,
4492
+ AXDropdownButtonModule,
4493
+ AXDropdownModule,
4494
+ AXDecoratorModule,
4495
+ AXTranslationModule,
4496
+ AXButtonModule,
4497
+ AXButtonGroupModule,
4498
+ ], inputs: [], 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-between\">\n <ax-button\n (onClick)=\"handleNavigateToFolder(vm.currentFolder()?.parentId!)\"\n [ngClass]=\"{ 'ax-invisible': !vm.currentFolder()?.parentId }\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-arrow-left\"></ax-icon>\n </ax-prefix>\n </ax-button>\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)=\"documentExplorer()?.chooseFile()\"\n [text]=\"(t('drive-types.platform-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-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n <axm-document-explorer></axm-document-explorer>\n</div>\n" }]
3863
4499
  }] });
3864
4500
 
3865
4501
  var documentAttachmentWidgetEdit_component = /*#__PURE__*/Object.freeze({
@@ -3956,22 +4592,103 @@ const AXMDocumentAttachmentWidget = {
3956
4592
  },
3957
4593
  };
3958
4594
 
4595
+ class AXMCheckDocumentTypeWorkflowAction extends AXPWorkflowAction {
4596
+ async execute(context) {
4597
+ const documentType = context.getVariable('documentType');
4598
+ if (documentType) {
4599
+ context.setOutput('need-choose-document-type', false);
4600
+ }
4601
+ else {
4602
+ context.setOutput('need-choose-document-type', true);
4603
+ }
4604
+ }
4605
+ }
4606
+ class AXMChooseDocumentTypeWorkflowAction extends AXPWorkflowAction {
4607
+ constructor() {
4608
+ super(...arguments);
4609
+ this.popupService = inject(AXPopupService);
4610
+ }
4611
+ async execute(context) {
4612
+ const comp = (await Promise.resolve().then(function () { return index; })).AXMChooseDocumentTypeComponent;
4613
+ const result = await this.popupService.open(comp);
4614
+ if (result.data != null && result.data.documentTypeId != null) {
4615
+ context.setVariable('documentTypeId', result.data.documentTypeId);
4616
+ context.setOutput('isCanceled', false);
4617
+ }
4618
+ else {
4619
+ context.setOutput('isCanceled', true);
4620
+ }
4621
+ }
4622
+ }
4623
+ class AXMChooseFileWorkflowAction extends AXPWorkflowAction {
4624
+ constructor() {
4625
+ super(...arguments);
4626
+ this.documentTypeService = inject(AXMDocumentTypeService);
4627
+ this.uploadService = inject(AXUploaderService);
4628
+ }
4629
+ async execute(context) {
4630
+ var doc = context.getVariable('documentType');
4631
+ if (!doc) {
4632
+ const docId = context.getVariable('documentTypeId');
4633
+ doc = await this.documentTypeService.getOne(docId);
4634
+ }
4635
+ this.uploadService.browse({
4636
+ //accept: doc.type,
4637
+ multiple: doc.isMultiple,
4638
+ });
4639
+ }
4640
+ }
4641
+ const AXMUploadWorkflow = {
4642
+ startStepId: 'check-document-type',
4643
+ steps: {
4644
+ 'check-document-type': {
4645
+ action: 'AXMCheckDocumentTypeWorkflowAction',
4646
+ nextSteps: [
4647
+ {
4648
+ conditions: [{ type: 'SINGLE', expression: 'context.getOutput("need-choose-document-type") == true' }],
4649
+ nextStepId: 'choose-document-type',
4650
+ },
4651
+ ],
4652
+ },
4653
+ 'choose-document-type': {
4654
+ action: 'AXMChooseDocumentTypeWorkflowAction',
4655
+ nextSteps: [
4656
+ {
4657
+ conditions: [{ type: 'SINGLE', expression: 'context.getOutput("isCanceled") == false' }],
4658
+ nextStepId: 'file-browser',
4659
+ },
4660
+ ],
4661
+ },
4662
+ 'file-browser': {
4663
+ action: 'AXMChooseFileWorkflowAction',
4664
+ nextSteps: [
4665
+ {
4666
+ conditions: [],
4667
+ nextStepId: 'dispatch-event',
4668
+ },
4669
+ ],
4670
+ },
4671
+ },
4672
+ };
4673
+
3959
4674
  function routesFacory() {
3960
4675
  const config = inject(AXP_ENTITY_CONFIG_TOKEN);
3961
4676
  const routes = [
3962
4677
  {
3963
4678
  path: ':app/drive/:scope',
3964
- component: config.viewers.root(),
4679
+ loadComponent: () => {
4680
+ return config.viewers.root();
4681
+ },
3965
4682
  canActivate: [AXPAuthGuard],
3966
4683
  data: { reuse: true },
3967
4684
  children: [
3968
4685
  {
3969
4686
  path: '',
3970
- loadComponent: () => import('./acorex-modules-document-management-drive.component-Sz198sA6.mjs').then((c) => c.AXMDocumentDriveComponent),
4687
+ loadComponent: () => import('./acorex-modules-document-management-drive.component-CZR-optD.mjs').then((c) => c.AXMDocumentDriveComponent),
3971
4688
  },
3972
4689
  {
3973
4690
  path: ':id',
3974
- loadComponent: () => import('./acorex-modules-document-management-drive.component-Sz198sA6.mjs').then((c) => c.AXMDocumentDriveComponent),
4691
+ loadComponent: () => import('./acorex-modules-document-management-drive.component-CZR-optD.mjs').then((c) => c.AXMDocumentDriveComponent),
3975
4692
  },
3976
4693
  ],
3977
4694
  },
@@ -3984,7 +4701,7 @@ class AXMDocumentManagementModule {
3984
4701
  AXMDocumentManagementDocumentTypeMetaValueEntityModule,
3985
4702
  AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
3986
4703
  AXMDocumentManagementDocumentTypeEntityModule,
3987
- AXMDocumentManagementDocumentEntityModule, i6.AXPLayoutBuilderModule, AXMFileTypeModule] }); }
4704
+ AXMDocumentManagementDocumentEntityModule, i6.AXPLayoutBuilderModule, AXMFileTypeModule, i3$2.AXMediaViewerModule, i3$4.AXPWorkflowModule] }); }
3988
4705
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementModule, providers: [
3989
4706
  {
3990
4707
  provide: AXMFolderService,
@@ -4028,7 +4745,18 @@ class AXMDocumentManagementModule {
4028
4745
  AXPLayoutBuilderModule.forChild({
4029
4746
  widgets: [AXmFileTypeExtensionWidget, AXMDocumentAttachmentWidget],
4030
4747
  }),
4031
- AXMFileTypeModule] }); }
4748
+ AXMFileTypeModule,
4749
+ AXMediaViewerModule.forRoot(),
4750
+ AXPWorkflowModule.forChild({
4751
+ actions: {
4752
+ AXMCheckDocumentTypeWorkflowAction,
4753
+ AXMChooseDocumentTypeWorkflowAction,
4754
+ AXMChooseFileWorkflowAction,
4755
+ },
4756
+ workflows: {
4757
+ 'upload-document': AXMUploadWorkflow,
4758
+ },
4759
+ })] }); }
4032
4760
  }
4033
4761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementModule, decorators: [{
4034
4762
  type: NgModule,
@@ -4043,6 +4771,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
4043
4771
  widgets: [AXmFileTypeExtensionWidget, AXMDocumentAttachmentWidget],
4044
4772
  }),
4045
4773
  AXMFileTypeModule,
4774
+ AXMediaViewerModule.forRoot(),
4775
+ AXPWorkflowModule.forChild({
4776
+ actions: {
4777
+ AXMCheckDocumentTypeWorkflowAction,
4778
+ AXMChooseDocumentTypeWorkflowAction,
4779
+ AXMChooseFileWorkflowAction,
4780
+ },
4781
+ workflows: {
4782
+ 'upload-document': AXMUploadWorkflow,
4783
+ },
4784
+ }),
4046
4785
  ],
4047
4786
  exports: [],
4048
4787
  providers: [
@@ -4088,5 +4827,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
4088
4827
  * Generated bundle index. Do not edit.
4089
4828
  */
4090
4829
 
4091
- export { AXMDocumentManagerService as A, AXMFolderServiceImpl as B, AXMEntityProvider as C, AXMMenuProvider as D, AXMSearchCommandProvider as E, AXMSettingProvider as F, RootConfig as R, AXPDocumentExplorerViewModel as a, AXMDocumentExplorerComponent as b, AXMDriveScope as c, AXMDocumentManagementModule as d, documentFactory as e, AXMDocumentManagementDocumentEntityModule as f, AXMDocumentService as g, AXMDocumentServiceImpl as h, documentTypeFactory as i, AXMDocumentManagementDocumentTypeEntityModule as j, AXMDocumentManagementDocumentTypeEntityService as k, AXMDocumentManagementDocumentTypeEntityServiceImpl 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 };
4092
- //# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-C9ZCejjs.mjs.map
4830
+ export { AXPDocumentExplorerViewModel as A, AXMFolderService as B, AXMFolderServiceImpl as C, AXMEntityProvider as D, AXMMenuProvider as E, AXMSearchCommandProvider as F, AXMSettingProvider as G, RootConfig as R, AXMDocumentManagerService as a, AXMDocumentExplorerComponent as b, AXMDriveScope 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, AXMDocumentTypeService as l, AXMDocumentManagementDocumentTypeEntityServiceImpl as m, documentTypeMetaDefinitionfactory as n, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule as o, AXMDocumentManagementDocumentTypeMetaDefinitionEntityService as p, AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl as q, documentTypeMetaValueFactory as r, AXMDocumentManagementDocumentTypeMetaValueEntityModule as s, AXMDocumentManagementDocumentTypeMetaValueEntityService as t, AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl as u, documentTypeStatusDefinitionFactory as v, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule as w, AXMDocumentManagementDocumentTypeStatusDefinitionEntityService as x, AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl as y, folderFactory as z };
4831
+ //# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-CpoLrul7.mjs.map