@alfresco/aca-content 4.4.1 → 4.5.0-10004013253

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 (288) hide show
  1. package/about/about.component.d.ts +2 -2
  2. package/about/dev-mode.tokens.d.ts +1 -1
  3. package/about/package-json.token.d.ts +1 -1
  4. package/about/public-api.d.ts +1 -1
  5. package/assets/app.extensions.json +13 -19
  6. package/assets/i18n/ar.json +1 -1
  7. package/assets/i18n/cs.json +1 -1
  8. package/assets/i18n/da.json +1 -1
  9. package/assets/i18n/de.json +1 -1
  10. package/assets/i18n/en.json +1 -1
  11. package/assets/i18n/es.json +1 -1
  12. package/assets/i18n/fi.json +1 -1
  13. package/assets/i18n/fr.json +1 -1
  14. package/assets/i18n/it.json +1 -1
  15. package/assets/i18n/ja.json +1 -1
  16. package/assets/i18n/nb.json +1 -1
  17. package/assets/i18n/nl.json +1 -1
  18. package/assets/i18n/pl.json +1 -1
  19. package/assets/i18n/pt-BR.json +1 -1
  20. package/assets/i18n/ru.json +1 -1
  21. package/assets/i18n/sv.json +1 -1
  22. package/assets/i18n/zh-CN.json +1 -1
  23. package/esm2020/about/about.component.mjs +7 -7
  24. package/esm2020/about/aca-about.module.mjs +2 -2
  25. package/esm2020/about/dev-mode.tokens.mjs +2 -2
  26. package/esm2020/about/package-json.token.mjs +2 -2
  27. package/esm2020/about/public-api.mjs +2 -2
  28. package/esm2020/folder-rules/folder-rules.module.mjs +8 -3
  29. package/esm2020/folder-rules/folder-rules.rules.mjs +2 -2
  30. package/esm2020/folder-rules/manage-rules/manage-rules.smart-component.mjs +6 -5
  31. package/esm2020/folder-rules/model/action-parameter-constraint.model.mjs +2 -2
  32. package/esm2020/folder-rules/model/rule-action.model.mjs +2 -2
  33. package/esm2020/folder-rules/model/rule-composite-condition.model.mjs +2 -2
  34. package/esm2020/folder-rules/model/rule-grouping-item.model.mjs +2 -2
  35. package/esm2020/folder-rules/model/rule-set.model.mjs +2 -2
  36. package/esm2020/folder-rules/model/rule-simple-condition.model.mjs +2 -2
  37. package/esm2020/folder-rules/model/rule.model.mjs +2 -2
  38. package/esm2020/folder-rules/public-api.mjs +2 -2
  39. package/esm2020/folder-rules/rule-details/actions/rule-action-list.ui-component.mjs +2 -2
  40. package/esm2020/folder-rules/rule-details/actions/rule-action.ui-component.mjs +77 -10
  41. package/esm2020/folder-rules/rule-details/conditions/rule-composite-condition.ui-component.mjs +2 -2
  42. package/esm2020/folder-rules/rule-details/conditions/rule-condition-comparators.mjs +2 -2
  43. package/esm2020/folder-rules/rule-details/conditions/rule-condition-fields.mjs +2 -2
  44. package/esm2020/folder-rules/rule-details/conditions/rule-simple-condition.ui-component.mjs +21 -22
  45. package/esm2020/folder-rules/rule-details/edit-rule-dialog.ui-component.mjs +2 -2
  46. package/esm2020/folder-rules/rule-details/options/rule-options.ui-component.mjs +2 -2
  47. package/esm2020/folder-rules/rule-details/rule-details.ui-component.mjs +2 -2
  48. package/esm2020/folder-rules/rule-details/triggers/rule-triggers.ui-component.mjs +2 -2
  49. package/esm2020/folder-rules/rule-details/validators/rule-actions.validator.mjs +2 -2
  50. package/esm2020/folder-rules/rule-details/validators/rule-composite-condition.validator.mjs +2 -2
  51. package/esm2020/folder-rules/rule-list/rule-list/rule-list.ui-component.mjs +25 -19
  52. package/esm2020/folder-rules/rule-list/rule-list-grouping/rule-list-grouping.ui-component.mjs +2 -2
  53. package/esm2020/folder-rules/rule-list/rule-list-item/rule-list-item.ui-component.mjs +2 -2
  54. package/esm2020/folder-rules/rule-set-picker/rule-set-picker.smart-component.mjs +2 -2
  55. package/esm2020/folder-rules/services/actions.service.mjs +2 -2
  56. package/esm2020/folder-rules/services/folder-rule-sets.service.mjs +7 -3
  57. package/esm2020/folder-rules/services/folder-rules.service.mjs +2 -2
  58. package/esm2020/lib/aca-content.module.mjs +39 -87
  59. package/esm2020/lib/aca-content.routes.mjs +2 -2
  60. package/esm2020/lib/components/common/index.mjs +2 -2
  61. package/esm2020/lib/components/common/language-picker/language-picker.component.mjs +2 -2
  62. package/esm2020/lib/components/common/location-link/location-link.component.mjs +2 -2
  63. package/esm2020/lib/components/common/logout/logout.component.mjs +5 -6
  64. package/esm2020/lib/components/common/toggle-shared/toggle-shared.component.mjs +2 -2
  65. package/esm2020/lib/components/common/user-info/user-info.component.mjs +2 -2
  66. package/esm2020/lib/components/context-menu/context-menu-item.component.mjs +7 -9
  67. package/esm2020/lib/components/context-menu/context-menu-outside-event.directive.mjs +2 -2
  68. package/esm2020/lib/components/context-menu/context-menu-overlay.mjs +2 -2
  69. package/esm2020/lib/components/context-menu/context-menu.component.mjs +8 -10
  70. package/esm2020/lib/components/context-menu/context-menu.service.mjs +2 -2
  71. package/esm2020/lib/components/context-menu/direction.token.mjs +2 -2
  72. package/esm2020/lib/components/context-menu/interfaces.mjs +2 -2
  73. package/esm2020/lib/components/details/details.component.mjs +2 -2
  74. package/esm2020/lib/components/dl-custom-components/name-column/name-column.component.mjs +7 -9
  75. package/esm2020/lib/components/dl-custom-components/tags-column/tags-column.component.mjs +2 -2
  76. package/esm2020/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.mjs +2 -2
  77. package/esm2020/lib/components/favorite-libraries/favorite-libraries.component.mjs +11 -12
  78. package/esm2020/lib/components/favorites/favorites.component.mjs +11 -12
  79. package/esm2020/lib/components/files/files.component.mjs +29 -27
  80. package/esm2020/lib/components/home/home.component.mjs +10 -14
  81. package/esm2020/lib/components/info-drawer/comments-tab/comments-tab.component.mjs +2 -2
  82. package/esm2020/lib/components/info-drawer/info.drawer.module.mjs +2 -2
  83. package/esm2020/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.mjs +2 -2
  84. package/esm2020/lib/components/info-drawer/library-metadata-tab/library-metadata-tab.component.mjs +2 -2
  85. package/esm2020/lib/components/info-drawer/metadata-tab/metadata-tab.component.mjs +2 -2
  86. package/esm2020/lib/components/info-drawer/versions-tab/versions-tab.component.mjs +7 -8
  87. package/esm2020/lib/components/libraries/libraries.component.mjs +11 -12
  88. package/esm2020/lib/components/recent-files/recent-files.component.mjs +11 -12
  89. package/esm2020/lib/components/search/index.mjs +2 -2
  90. package/esm2020/lib/components/search/search-action-menu/search-action-menu.component.mjs +2 -2
  91. package/esm2020/lib/components/search/search-input/search-input.component.mjs +2 -2
  92. package/esm2020/lib/components/search/search-input-control/search-input-control.component.mjs +2 -2
  93. package/esm2020/lib/components/search/search-libraries-results/search-libraries-query-builder.service.mjs +2 -2
  94. package/esm2020/lib/components/search/search-libraries-results/search-libraries-results.component.mjs +9 -10
  95. package/esm2020/lib/components/search/search-navigation.service.mjs +2 -2
  96. package/esm2020/lib/components/search/search-results/search-results.component.mjs +17 -22
  97. package/esm2020/lib/components/search/search-results-row/search-results-row.component.mjs +2 -2
  98. package/esm2020/lib/components/shared-files/shared-files.component.mjs +11 -12
  99. package/esm2020/lib/components/shared-link-view/shared-link-view.component.mjs +2 -2
  100. package/esm2020/lib/components/sidenav/components/button-menu.component.mjs +2 -2
  101. package/esm2020/lib/components/sidenav/components/expand-menu.component.mjs +2 -2
  102. package/esm2020/lib/components/sidenav/components/sidenav-header.component.mjs +11 -16
  103. package/esm2020/lib/components/sidenav/directives/action.directive.mjs +2 -2
  104. package/esm2020/lib/components/sidenav/directives/active-link.directive.mjs +2 -2
  105. package/esm2020/lib/components/sidenav/directives/expansion-panel.directive.mjs +2 -2
  106. package/esm2020/lib/components/sidenav/directives/menu-panel.directive.mjs +2 -2
  107. package/esm2020/lib/components/sidenav/index.mjs +2 -2
  108. package/esm2020/lib/components/sidenav/sidenav.component.mjs +5 -6
  109. package/esm2020/lib/components/sidenav/user-menu/user-menu.component.mjs +2 -2
  110. package/esm2020/lib/components/toolbar/index.mjs +2 -2
  111. package/esm2020/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.mjs +2 -2
  112. package/esm2020/lib/components/toolbar/toggle-favorite/toggle-favorite.component.mjs +7 -8
  113. package/esm2020/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.mjs +7 -8
  114. package/esm2020/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.mjs +2 -2
  115. package/esm2020/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.mjs +6 -7
  116. package/esm2020/lib/components/toolbar/toggle-join-library/toggle-join-library-menu.component.mjs +7 -8
  117. package/esm2020/lib/components/toolbar/view-node/view-node.component.mjs +2 -2
  118. package/esm2020/lib/components/trashcan/trashcan.component.mjs +10 -11
  119. package/esm2020/lib/components/upload-files-dialog/upload-files-dialog.component.mjs +2 -2
  120. package/esm2020/lib/components/view-profile/view-profile.component.mjs +2 -2
  121. package/esm2020/lib/components/view-profile/view-profile.guard.mjs +2 -2
  122. package/esm2020/lib/dialogs/node-template/create-from-template.dialog.mjs +2 -2
  123. package/esm2020/lib/directives/document-list.directive.mjs +44 -16
  124. package/esm2020/lib/extensions/core.extensions.module.mjs +2 -7
  125. package/esm2020/lib/services/content-management.service.mjs +26 -28
  126. package/esm2020/lib/services/content-url.service.mjs +2 -2
  127. package/esm2020/lib/services/node-actions.service.mjs +2 -2
  128. package/esm2020/lib/services/node-template.service.mjs +2 -2
  129. package/esm2020/lib/store/app-store.module.mjs +2 -2
  130. package/esm2020/lib/store/effects/app.effects.mjs +2 -2
  131. package/esm2020/lib/store/effects/contextmenu.effects.mjs +2 -2
  132. package/esm2020/lib/store/effects/download.effects.mjs +2 -2
  133. package/esm2020/lib/store/effects/favorite.effects.mjs +2 -2
  134. package/esm2020/lib/store/effects/library.effects.mjs +2 -2
  135. package/esm2020/lib/store/effects/node.effects.mjs +2 -2
  136. package/esm2020/lib/store/effects/search.effects.mjs +3 -3
  137. package/esm2020/lib/store/effects/template.effects.mjs +2 -2
  138. package/esm2020/lib/store/effects/upload.effects.mjs +2 -2
  139. package/esm2020/lib/store/effects/viewer.effects.mjs +2 -2
  140. package/esm2020/lib/store/effects.mjs +2 -2
  141. package/esm2020/lib/store/initial-state.mjs +3 -39
  142. package/esm2020/lib/store/reducers/app.reducer.mjs +3 -7
  143. package/esm2020/ms-office/actions/aos.actions.mjs +2 -2
  144. package/esm2020/ms-office/aos-extension.module.mjs +2 -2
  145. package/esm2020/ms-office/aos-extension.service.mjs +10 -12
  146. package/esm2020/ms-office/effects/aos.effects.mjs +2 -2
  147. package/esm2020/ms-office/public-api.mjs +2 -2
  148. package/esm2020/public-api.mjs +2 -2
  149. package/esm2020/viewer/lib/components/preview/preview.component.mjs +236 -0
  150. package/esm2020/viewer/lib/components/viewer/viewer.component.mjs +42 -203
  151. package/esm2020/viewer/lib/services/viewer.service.mjs +215 -0
  152. package/esm2020/viewer/lib/viewer.module.mjs +7 -6
  153. package/esm2020/viewer/public-api.mjs +3 -2
  154. package/fesm2015/alfresco-aca-content-about.mjs +10 -10
  155. package/fesm2015/alfresco-aca-content-about.mjs.map +1 -1
  156. package/fesm2015/alfresco-aca-content-folder-rules.mjs +167 -93
  157. package/fesm2015/alfresco-aca-content-folder-rules.mjs.map +1 -1
  158. package/fesm2015/alfresco-aca-content-ms-office.mjs +10 -13
  159. package/fesm2015/alfresco-aca-content-ms-office.mjs.map +1 -1
  160. package/fesm2015/alfresco-aca-content-viewer.mjs +414 -195
  161. package/fesm2015/alfresco-aca-content-viewer.mjs.map +1 -1
  162. package/fesm2015/alfresco-aca-content.mjs +5995 -6053
  163. package/fesm2015/alfresco-aca-content.mjs.map +1 -1
  164. package/fesm2020/alfresco-aca-content-about.mjs +10 -10
  165. package/fesm2020/alfresco-aca-content-about.mjs.map +1 -1
  166. package/fesm2020/alfresco-aca-content-folder-rules.mjs +178 -96
  167. package/fesm2020/alfresco-aca-content-folder-rules.mjs.map +1 -1
  168. package/fesm2020/alfresco-aca-content-ms-office.mjs +11 -14
  169. package/fesm2020/alfresco-aca-content-ms-office.mjs.map +1 -1
  170. package/fesm2020/alfresco-aca-content-viewer.mjs +449 -186
  171. package/fesm2020/alfresco-aca-content-viewer.mjs.map +1 -1
  172. package/fesm2020/alfresco-aca-content.mjs +4935 -4993
  173. package/fesm2020/alfresco-aca-content.mjs.map +1 -1
  174. package/folder-rules/folder-rules.module.d.ts +1 -1
  175. package/folder-rules/folder-rules.rules.d.ts +1 -1
  176. package/folder-rules/manage-rules/manage-rules.smart-component.d.ts +1 -1
  177. package/folder-rules/model/action-parameter-constraint.model.d.ts +1 -1
  178. package/folder-rules/model/rule-action.model.d.ts +1 -1
  179. package/folder-rules/model/rule-composite-condition.model.d.ts +1 -1
  180. package/folder-rules/model/rule-grouping-item.model.d.ts +1 -1
  181. package/folder-rules/model/rule-set.model.d.ts +1 -1
  182. package/folder-rules/model/rule-simple-condition.model.d.ts +1 -1
  183. package/folder-rules/model/rule.model.d.ts +1 -1
  184. package/folder-rules/public-api.d.ts +1 -1
  185. package/folder-rules/rule-details/actions/rule-action-list.ui-component.d.ts +1 -1
  186. package/folder-rules/rule-details/actions/rule-action.ui-component.d.ts +10 -5
  187. package/folder-rules/rule-details/conditions/rule-composite-condition.ui-component.d.ts +1 -1
  188. package/folder-rules/rule-details/conditions/rule-condition-comparators.d.ts +1 -1
  189. package/folder-rules/rule-details/conditions/rule-condition-fields.d.ts +1 -1
  190. package/folder-rules/rule-details/conditions/rule-simple-condition.ui-component.d.ts +5 -6
  191. package/folder-rules/rule-details/edit-rule-dialog.ui-component.d.ts +1 -1
  192. package/folder-rules/rule-details/options/rule-options.ui-component.d.ts +1 -1
  193. package/folder-rules/rule-details/rule-details.ui-component.d.ts +1 -1
  194. package/folder-rules/rule-details/triggers/rule-triggers.ui-component.d.ts +1 -1
  195. package/folder-rules/rule-details/validators/rule-actions.validator.d.ts +1 -1
  196. package/folder-rules/rule-details/validators/rule-composite-condition.validator.d.ts +1 -1
  197. package/folder-rules/rule-list/rule-list/rule-list.ui-component.d.ts +14 -9
  198. package/folder-rules/rule-list/rule-list-grouping/rule-list-grouping.ui-component.d.ts +1 -1
  199. package/folder-rules/rule-list/rule-list-item/rule-list-item.ui-component.d.ts +1 -1
  200. package/folder-rules/rule-set-picker/rule-set-picker.smart-component.d.ts +1 -1
  201. package/lib/aca-content.module.d.ts +5 -16
  202. package/lib/aca-content.routes.d.ts +1 -1
  203. package/lib/components/common/index.d.ts +1 -1
  204. package/lib/components/common/location-link/location-link.component.d.ts +1 -1
  205. package/lib/components/common/toggle-shared/toggle-shared.component.d.ts +1 -1
  206. package/lib/components/context-menu/context-menu-outside-event.directive.d.ts +1 -1
  207. package/lib/components/context-menu/context-menu-overlay.d.ts +1 -1
  208. package/lib/components/context-menu/context-menu.component.d.ts +1 -1
  209. package/lib/components/context-menu/context-menu.service.d.ts +1 -1
  210. package/lib/components/context-menu/direction.token.d.ts +1 -1
  211. package/lib/components/context-menu/interfaces.d.ts +1 -1
  212. package/lib/components/details/details.component.d.ts +1 -1
  213. package/lib/components/dl-custom-components/name-column/name-column.component.d.ts +1 -1
  214. package/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.d.ts +1 -1
  215. package/lib/components/favorite-libraries/favorite-libraries.component.d.ts +1 -1
  216. package/lib/components/favorites/favorites.component.d.ts +1 -1
  217. package/lib/components/files/files.component.d.ts +3 -3
  218. package/lib/components/home/home.component.d.ts +2 -6
  219. package/lib/components/info-drawer/comments-tab/comments-tab.component.d.ts +1 -1
  220. package/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.d.ts +1 -1
  221. package/lib/components/info-drawer/metadata-tab/metadata-tab.component.d.ts +1 -1
  222. package/lib/components/info-drawer/versions-tab/versions-tab.component.d.ts +1 -1
  223. package/lib/components/recent-files/recent-files.component.d.ts +1 -1
  224. package/lib/components/search/index.d.ts +1 -1
  225. package/lib/components/search/search-action-menu/search-action-menu.component.d.ts +1 -1
  226. package/lib/components/search/search-input/search-input.component.d.ts +1 -1
  227. package/lib/components/search/search-input-control/search-input-control.component.d.ts +1 -1
  228. package/lib/components/search/search-libraries-results/search-libraries-query-builder.service.d.ts +1 -1
  229. package/lib/components/search/search-results/search-results.component.d.ts +1 -2
  230. package/lib/components/search/search-results-row/search-results-row.component.d.ts +1 -1
  231. package/lib/components/shared-files/shared-files.component.d.ts +1 -1
  232. package/lib/components/shared-link-view/shared-link-view.component.d.ts +1 -1
  233. package/lib/components/sidenav/components/button-menu.component.d.ts +1 -1
  234. package/lib/components/sidenav/components/expand-menu.component.d.ts +1 -1
  235. package/lib/components/sidenav/components/sidenav-header.component.d.ts +4 -5
  236. package/lib/components/sidenav/directives/active-link.directive.d.ts +1 -1
  237. package/lib/components/sidenav/directives/expansion-panel.directive.d.ts +1 -1
  238. package/lib/components/sidenav/directives/menu-panel.directive.d.ts +1 -1
  239. package/lib/components/sidenav/index.d.ts +1 -1
  240. package/lib/components/sidenav/sidenav.component.d.ts +1 -1
  241. package/lib/components/sidenav/user-menu/user-menu.component.d.ts +1 -1
  242. package/lib/components/toolbar/index.d.ts +1 -1
  243. package/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.d.ts +1 -1
  244. package/lib/components/toolbar/toggle-favorite/toggle-favorite.component.d.ts +1 -1
  245. package/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.d.ts +1 -1
  246. package/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.d.ts +1 -1
  247. package/lib/components/upload-files-dialog/upload-files-dialog.component.d.ts +1 -1
  248. package/lib/components/view-profile/view-profile.component.d.ts +1 -1
  249. package/lib/dialogs/node-template/create-from-template.dialog.d.ts +1 -1
  250. package/lib/directives/document-list.directive.d.ts +4 -1
  251. package/lib/extensions/core.extensions.module.d.ts +1 -2
  252. package/lib/services/content-management.service.d.ts +4 -3
  253. package/lib/store/effects/app.effects.d.ts +1 -1
  254. package/lib/store/effects/download.effects.d.ts +1 -1
  255. package/lib/store/effects/favorite.effects.d.ts +1 -1
  256. package/lib/store/effects/library.effects.d.ts +1 -1
  257. package/lib/store/effects/node.effects.d.ts +1 -1
  258. package/lib/store/effects/search.effects.d.ts +1 -1
  259. package/lib/store/effects/template.effects.d.ts +1 -1
  260. package/lib/store/effects/upload.effects.d.ts +1 -1
  261. package/lib/store/effects/viewer.effects.d.ts +1 -1
  262. package/lib/store/effects.d.ts +1 -1
  263. package/lib/store/initial-state.d.ts +2 -4
  264. package/lib/store/reducers/app.reducer.d.ts +1 -1
  265. package/ms-office/actions/aos.actions.d.ts +1 -1
  266. package/ms-office/aos-extension.module.d.ts +1 -1
  267. package/ms-office/aos-extension.service.d.ts +5 -5
  268. package/ms-office/public-api.d.ts +1 -1
  269. package/package.json +5 -13
  270. package/public-api.d.ts +1 -1
  271. package/{preview/lib/components → viewer/lib/components/preview}/preview.component.d.ts +16 -43
  272. package/viewer/lib/components/viewer/viewer.component.d.ts +20 -46
  273. package/viewer/lib/services/viewer.service.d.ts +65 -0
  274. package/viewer/lib/viewer.module.d.ts +2 -1
  275. package/viewer/public-api.d.ts +2 -1
  276. package/esm2020/folder-rules/rule-details/conditions/rule-mime-types.mjs +0 -25
  277. package/esm2020/preview/alfresco-aca-content-preview.mjs +0 -5
  278. package/esm2020/preview/lib/components/preview.component.mjs +0 -394
  279. package/esm2020/preview/lib/preview.module.mjs +0 -39
  280. package/esm2020/preview/public-api.mjs +0 -29
  281. package/fesm2015/alfresco-aca-content-preview.mjs +0 -447
  282. package/fesm2015/alfresco-aca-content-preview.mjs.map +0 -1
  283. package/fesm2020/alfresco-aca-content-preview.mjs +0 -461
  284. package/fesm2020/alfresco-aca-content-preview.mjs.map +0 -1
  285. package/folder-rules/rule-details/conditions/rule-mime-types.d.ts +0 -27
  286. package/preview/index.d.ts +0 -5
  287. package/preview/lib/preview.module.d.ts +0 -7
  288. package/preview/public-api.d.ts +0 -25
@@ -1,48 +1,28 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import * as i3 from '@alfresco/aca-shared';
3
- import { InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent } from '@alfresco/aca-shared';
3
+ import { InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent, PageComponent } from '@alfresco/aca-shared';
4
4
  import { isInfoDrawerOpened, getAppSelection, SetCurrentNodeVersionAction, ViewerActionTypes, ReloadDocumentListAction, SetSelectedNodesAction, ViewNodeAction } from '@alfresco/aca-shared/store';
5
5
  import { VersionsApi } from '@alfresco/js-api';
6
6
  import * as i0 from '@angular/core';
7
- import { Component, ViewEncapsulation, HostListener, NgModule } from '@angular/core';
8
- import * as i1 from '@angular/router';
7
+ import { Injectable, Component, ViewEncapsulation, HostListener, NgModule } from '@angular/core';
8
+ import * as i5 from '@angular/router';
9
9
  import { PRIMARY_OUTLET, RouterModule } from '@angular/router';
10
- import * as i5 from '@alfresco/adf-core';
11
- import { ObjectUtils, ViewerModule, AppConfigModule } from '@alfresco/adf-core';
10
+ import * as i2 from '@alfresco/adf-core';
11
+ import { ObjectUtils, ViewerModule, AppConfigPipe } from '@alfresco/adf-core';
12
12
  import { Subject, from } from 'rxjs';
13
- import { takeUntil, debounceTime } from 'rxjs/operators';
14
- import * as i4 from '@ngrx/effects';
13
+ import { takeUntil, debounceTime, map } from 'rxjs/operators';
14
+ import * as i1 from '@ngrx/effects';
15
15
  import { ofType } from '@ngrx/effects';
16
- import * as i6 from '@alfresco/adf-content-services';
16
+ import * as i4 from '@alfresco/adf-content-services';
17
17
  import { AlfrescoViewerModule } from '@alfresco/adf-content-services';
18
- import * as i7 from '@angular/common';
18
+ import * as i3$1 from '@angular/common';
19
19
  import { CommonModule } from '@angular/common';
20
- import * as i2 from '@ngrx/store';
20
+ import * as i6 from '@ngrx/store';
21
21
 
22
- class AcaViewerComponent {
23
- constructor(router, route, store, extensions, contentApi, actions$, preferences, apiService, nodesApiService, uploadService, appHookService) {
24
- this.router = router;
25
- this.route = route;
26
- this.store = store;
27
- this.extensions = extensions;
28
- this.contentApi = contentApi;
29
- this.actions$ = actions$;
22
+ class ViewerService {
23
+ constructor(preferences, contentApi) {
30
24
  this.preferences = preferences;
31
- this.apiService = apiService;
32
- this.nodesApiService = nodesApiService;
33
- this.uploadService = uploadService;
34
- this.appHookService = appHookService;
35
- this.onDestroy$ = new Subject();
36
- this.folderId = null;
37
- this.nodeId = null;
38
- this.versionId = null;
39
- this.showRightSide = false;
40
- this.openWith = [];
41
- this.toolbarActions = [];
42
- this.navigateSource = null;
43
- this.navigateMultiple = true;
44
- this.routesSkipNavigation = ['shared', 'recent-files', 'favorites'];
45
- this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
25
+ this.contentApi = contentApi;
46
26
  this.recentFileFilters = [
47
27
  'TYPE:"content"',
48
28
  '-PATH:"//cm:wiki/*"',
@@ -66,6 +46,193 @@ class AcaViewerComponent {
66
46
  '-TYPE:"ia:calendarEvent"',
67
47
  '-TYPE:"lnk:link"'
68
48
  ];
49
+ }
50
+ /**
51
+ * Retrieves nearest node information for the given node and folder.
52
+ *
53
+ * @param nodeId Unique identifier of the document node
54
+ * @param folderId Unique identifier of the containing folder node.
55
+ * @param source Data source name. Returns file ids for personal-files, libraries, favorites, shared and recent-files, otherwise returns empty.
56
+ */
57
+ getNearestNodes(nodeId, folderId, source) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ const empty = {
60
+ left: null,
61
+ right: null
62
+ };
63
+ if (nodeId && folderId) {
64
+ try {
65
+ const ids = yield this.getFileIds(source, folderId);
66
+ const idx = ids.indexOf(nodeId);
67
+ if (idx >= 0) {
68
+ return {
69
+ left: ids[idx - 1] || null,
70
+ right: ids[idx + 1] || null
71
+ };
72
+ }
73
+ }
74
+ catch (_a) { }
75
+ }
76
+ return empty;
77
+ });
78
+ }
79
+ /**
80
+ * Retrieves a list of node identifiers for the folder and data source.
81
+ *
82
+ * @param source Data source name. Returns file ids for personal-files, libraries, favorites, shared and recent-files, otherwise returns empty.
83
+ * @param folderId Optional parameter containing folder node identifier for 'personal-files' and 'libraries' sources.
84
+ */
85
+ getFileIds(source, folderId) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ if (source === 'libraries') {
88
+ source = 'libraries-files';
89
+ }
90
+ const isClient = this.preferences.get(`${source}.sorting.mode`) === 'client';
91
+ const [sortKey, sortDirection, previousSortKey, previousSortDir] = this.getSortKeyDir(source);
92
+ let entries = [];
93
+ let nodes;
94
+ if (source === 'personal-files' || source === 'libraries-files') {
95
+ if (!folderId) {
96
+ return [];
97
+ }
98
+ const orderBy = isClient ? null : ['isFolder desc', `${sortKey} ${sortDirection}`];
99
+ nodes = yield this.contentApi
100
+ .getNodeChildren(folderId, {
101
+ orderBy: orderBy,
102
+ fields: this.getFields(sortKey, previousSortKey),
103
+ where: '(isFile=true)'
104
+ })
105
+ .toPromise();
106
+ }
107
+ if (source === 'favorites') {
108
+ nodes = yield this.contentApi
109
+ .getFavorites('-me-', {
110
+ where: '(EXISTS(target/file))',
111
+ fields: ['target']
112
+ })
113
+ .toPromise();
114
+ }
115
+ if (source === 'shared') {
116
+ nodes = yield this.contentApi
117
+ .findSharedLinks({
118
+ fields: ['nodeId', this.getRootField(sortKey)]
119
+ })
120
+ .toPromise();
121
+ }
122
+ if (source === 'recent-files') {
123
+ const person = yield this.contentApi.getPerson('-me-').toPromise();
124
+ const username = person.entry.id;
125
+ const query = {
126
+ query: {
127
+ query: '*',
128
+ language: 'afts'
129
+ },
130
+ filterQueries: [
131
+ { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
132
+ { query: `cm:modifier:${username} OR cm:creator:${username}` },
133
+ {
134
+ query: this.recentFileFilters.join(' AND ')
135
+ }
136
+ ],
137
+ fields: this.getFields(sortKey, previousSortKey),
138
+ include: ['path', 'properties', 'allowableOperations'],
139
+ sort: [
140
+ {
141
+ type: 'FIELD',
142
+ field: 'cm:modified',
143
+ ascending: false
144
+ }
145
+ ]
146
+ };
147
+ nodes = yield this.contentApi.search(query).toPromise();
148
+ }
149
+ entries = nodes.list.entries.map((obj) => { var _a, _b; return (_b = (_a = obj.entry.target) === null || _a === void 0 ? void 0 : _a.file) !== null && _b !== void 0 ? _b : obj.entry; });
150
+ if (isClient) {
151
+ if (previousSortKey) {
152
+ this.sort(entries, previousSortKey, previousSortDir);
153
+ }
154
+ this.sort(entries, sortKey, sortDirection);
155
+ }
156
+ return entries.map((entry) => { var _a; return (_a = entry.id) !== null && _a !== void 0 ? _a : entry.nodeId; });
157
+ });
158
+ }
159
+ /**
160
+ * Get the root field name from the property path.
161
+ * Example: 'property1.some.child.property' => 'property1'
162
+ *
163
+ * @param path Property path
164
+ */
165
+ getRootField(path) {
166
+ if (path) {
167
+ return path.split('.')[0];
168
+ }
169
+ return path;
170
+ }
171
+ sort(items, key, direction) {
172
+ const options = {};
173
+ if (key.includes('sizeInBytes') || key === 'name') {
174
+ options.numeric = true;
175
+ }
176
+ items.sort((a, b) => {
177
+ var _a, _b;
178
+ let left = (_a = ObjectUtils.getValue(a, key)) !== null && _a !== void 0 ? _a : '';
179
+ left = left instanceof Date ? left.valueOf().toString() : left.toString();
180
+ let right = (_b = ObjectUtils.getValue(b, key)) !== null && _b !== void 0 ? _b : '';
181
+ right = right instanceof Date ? right.valueOf().toString() : right.toString();
182
+ return direction === 'asc' ? left.localeCompare(right, undefined, options) : right.localeCompare(left, undefined, options);
183
+ });
184
+ }
185
+ getFields(sortKey, previousSortKey) {
186
+ return ['id', this.getRootField(sortKey), this.getRootField(previousSortKey)];
187
+ }
188
+ getSortKeyDir(source) {
189
+ const previousSortKey = this.preferences.get(`${source}.sorting.previousKey`);
190
+ const previousSortDir = this.preferences.get(`${source}.sorting.previousDirection`);
191
+ const sortKey = this.preferences.get(`${source}.sorting.key`) || this.getDefaults(source)[0];
192
+ const sortDirection = this.preferences.get(`${source}.sorting.direction`) || this.getDefaults(source)[1];
193
+ return [sortKey, sortDirection, previousSortKey, previousSortDir];
194
+ }
195
+ getDefaults(source) {
196
+ if (source === 'personal-files' || source === 'libraries-files') {
197
+ return ['name', 'asc'];
198
+ }
199
+ else {
200
+ return ['modifiedAt', 'desc'];
201
+ }
202
+ }
203
+ }
204
+ ViewerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ViewerService, deps: [{ token: i2.UserPreferencesService }, { token: i3.ContentApiService }], target: i0.ɵɵFactoryTarget.Injectable });
205
+ ViewerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ViewerService, providedIn: 'root' });
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ViewerService, decorators: [{
207
+ type: Injectable,
208
+ args: [{
209
+ providedIn: 'root'
210
+ }]
211
+ }], ctorParameters: function () { return [{ type: i2.UserPreferencesService }, { type: i3.ContentApiService }]; } });
212
+
213
+ class AcaViewerComponent {
214
+ constructor(actions$, apiService, appHookService, contentApi, extensions, nodesApiService, route, router, store, uploadService, viewerService) {
215
+ this.actions$ = actions$;
216
+ this.apiService = apiService;
217
+ this.appHookService = appHookService;
218
+ this.contentApi = contentApi;
219
+ this.extensions = extensions;
220
+ this.nodesApiService = nodesApiService;
221
+ this.route = route;
222
+ this.router = router;
223
+ this.store = store;
224
+ this.uploadService = uploadService;
225
+ this.viewerService = viewerService;
226
+ this.onDestroy$ = new Subject();
227
+ this.folderId = null;
228
+ this.navigateMultiple = true;
229
+ this.navigateSource = null;
230
+ this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
231
+ this.nodeId = null;
232
+ this.openWith = [];
233
+ this.showRightSide = false;
234
+ this.toolbarActions = [];
235
+ this.versionId = null;
69
236
  this.containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer'];
70
237
  }
71
238
  get versionsApi() {
@@ -104,14 +271,14 @@ class AcaViewerComponent {
104
271
  const { nodeId } = params;
105
272
  this.versionId = params.versionId;
106
273
  if (this.versionId) {
107
- this.versionsApi.getVersion(nodeId, this.versionId).then((version) => {
274
+ void this.versionsApi.getVersion(nodeId, this.versionId).then((version) => {
108
275
  if (version) {
109
276
  this.store.dispatch(new SetCurrentNodeVersionAction(version));
110
277
  }
111
278
  });
112
279
  }
113
280
  if (nodeId) {
114
- this.displayNode(nodeId);
281
+ void this.displayNode(nodeId);
115
282
  }
116
283
  });
117
284
  this.route.queryParams.subscribe((params) => {
@@ -130,14 +297,14 @@ class AcaViewerComponent {
130
297
  this.actions$
131
298
  .pipe(ofType(ViewerActionTypes.RefreshPreview), takeUntil(this.onDestroy$))
132
299
  .subscribe((action) => {
133
- var _a, _b;
134
- this.displayNode((_b = (_a = action === null || action === void 0 ? void 0 : action.payload) === null || _a === void 0 ? void 0 : _a.entry) === null || _b === void 0 ? void 0 : _b.id);
300
+ this.nodesApiService.nodeUpdated.next(action.node);
301
+ void this.displayNode(action.node.id);
135
302
  });
136
303
  this.appHookService.nodesDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation());
137
304
  this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation());
138
305
  this.uploadService.fileUploadComplete.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((file) => {
139
306
  this.nodesApiService.nodeUpdated.next(file.data.entry);
140
- this.displayNode(file.data.entry.id);
307
+ void this.displayNode(file.data.entry.id);
141
308
  });
142
309
  this.previewLocation = this.router.url.substring(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
143
310
  }
@@ -154,32 +321,30 @@ class AcaViewerComponent {
154
321
  return obj.id;
155
322
  }
156
323
  displayNode(nodeId) {
157
- var _a, _b, _c, _d, _e;
324
+ var _a, _b, _c;
158
325
  return __awaiter(this, void 0, void 0, function* () {
159
326
  if (nodeId) {
160
327
  try {
161
328
  this.node = yield this.contentApi.getNodeInfo(nodeId).toPromise();
162
329
  this.store.dispatch(new SetSelectedNodesAction([{ entry: this.node }]));
163
330
  this.navigateMultiple = this.extensions.canShowViewerNavigation({ entry: this.node });
164
- if (!this.navigateMultiple) {
331
+ if ((_a = this.node) === null || _a === void 0 ? void 0 : _a.isFile) {
165
332
  this.nodeId = this.node.id;
166
- this.fileName = this.node.name + ((_b = (_a = this.node) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b['cm:versionLabel']);
167
- return;
168
- }
169
- if ((_c = this.node) === null || _c === void 0 ? void 0 : _c.isFile) {
170
- const nearest = yield this.getNearestNodes(this.node.id, this.node.parentId);
171
- this.nodeId = this.node.id;
172
- this.previousNodeId = nearest.left;
173
- this.nextNodeId = nearest.right;
174
- this.fileName = this.node.name + ((_e = (_d = this.node) === null || _d === void 0 ? void 0 : _d.properties) === null || _e === void 0 ? void 0 : _e['cm:versionLabel']);
333
+ this.fileName = this.node.name + ((_c = (_b = this.node) === null || _b === void 0 ? void 0 : _b.properties) === null || _c === void 0 ? void 0 : _c['cm:versionLabel']);
334
+ if (this.navigateMultiple) {
335
+ const nearest = yield this.viewerService.getNearestNodes(this.node.id, this.node.parentId, this.navigateSource);
336
+ this.previousNodeId = nearest.left;
337
+ this.nextNodeId = nearest.right;
338
+ }
175
339
  return;
176
340
  }
341
+ this.navigateToFileLocation();
177
342
  }
178
343
  catch (error) {
179
344
  const statusCode = JSON.parse(error.message).error.statusCode;
180
345
  if (statusCode !== 401) {
181
- this.router.navigate([this.previewLocation, { outlets: { viewer: null } }]).then(() => {
182
- this.router.navigate([this.previewLocation, nodeId]);
346
+ yield this.router.navigate([this.previewLocation, { outlets: { viewer: null } }]).then(() => {
347
+ void this.router.navigate([this.previewLocation, nodeId]);
183
348
  });
184
349
  }
185
350
  }
@@ -200,162 +365,216 @@ class AcaViewerComponent {
200
365
  const location = this.getFileLocation();
201
366
  this.store.dispatch(new ViewNodeAction(this.nextNodeId, { location }));
202
367
  }
368
+ handleKeyboardEvent(event) {
369
+ const key = event.key;
370
+ if (key === 'ArrowRight' || key === 'ArrowLeft') {
371
+ event.preventDefault();
372
+ event.stopImmediatePropagation();
373
+ }
374
+ }
375
+ navigateToFileLocation() {
376
+ const location = this.getFileLocation();
377
+ void this.router.navigateByUrl(location);
378
+ }
379
+ getFileLocation() {
380
+ return this.navigationPath || this.router.parseUrl(this.router.url).root.children[PRIMARY_OUTLET].toString();
381
+ }
382
+ shouldNavigate(element) {
383
+ let currentElement = element.parentElement;
384
+ while (currentElement && !this.isChild(currentElement.classList)) {
385
+ currentElement = currentElement.parentElement;
386
+ }
387
+ return !!currentElement;
388
+ }
389
+ isChild(list) {
390
+ return Array.from(list).some((className) => this.containersSkipNavigation.includes(className));
391
+ }
392
+ }
393
+ AcaViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerComponent, deps: [{ token: i1.Actions }, { token: i2.AlfrescoApiService }, { token: i3.AppHookService }, { token: i3.ContentApiService }, { token: i3.AppExtensionService }, { token: i4.NodesApiService }, { token: i5.ActivatedRoute }, { token: i5.Router }, { token: i6.Store }, { token: i4.UploadService }, { token: ViewerService }], target: i0.ɵɵFactoryTarget.Component });
394
+ AcaViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: AcaViewerComponent, isStandalone: true, selector: "aca-viewer", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" }, classAttribute: "app-viewer" }, ngImport: i0, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'aca-right_side--hide': !showRightSide\n }\"\n [maxRetries]=\"'viewer.maxRetries' | adfAppConfig\"\n [nodeId]=\"nodeId\"\n [versionId]=\"versionId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [overlayMode]=\"true\"\n [hideInfoButton]=\"true\"\n [closeButtonPosition]=\"'viewer.closeButtonPosition' | adfAppConfig: 'right'\"\n (showViewerChange)=\"onViewerVisibilityChanged()\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions>\n <aca-toolbar [items]=\"toolbarActions\"></aca-toolbar>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-viewer{width:100%;height:100%}.app-viewer .adf-viewer-toolbar .adf-toolbar-divider{display:none}.app-viewer .adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.app-viewer .adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.app-viewer .adf-alfresco-viewer.aca-right_side--hide .adf-viewer__sidebar__right{width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ViewerModule }, { kind: "component", type: i2.ViewerSidebarComponent, selector: "adf-viewer-sidebar" }, { kind: "component", type: i2.ViewerOpenWithComponent, selector: "adf-viewer-open-with" }, { kind: "component", type: i2.ViewerToolbarActionsComponent, selector: "adf-viewer-toolbar-actions" }, { kind: "ngmodule", type: AlfrescoViewerModule }, { kind: "component", type: i4.AlfrescoViewerComponent, selector: "adf-alfresco-viewer", inputs: ["nodeId", "versionId", "sharedLinkId", "showViewer", "maxRetries", "allowGoBack", "showToolbar", "overlayMode", "allowNavigate", "canNavigateBefore", "canNavigateNext", "allowLeftSidebar", "allowRightSidebar", "showRightSidebar", "showLeftSidebar", "allowDownload", "allowPrint", "allowFullScreen", "hideInfoButton", "closeButtonPosition", "sidebarRightTemplate", "sidebarLeftTemplate"], outputs: ["invalidSharedLink", "navigateBefore", "navigateNext", "showViewerChange"] }, { kind: "component", type: InfoDrawerComponent, selector: "aca-info-drawer", inputs: ["nodeId", "node"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "component", type: ToolbarComponent, selector: "aca-toolbar", inputs: ["items"] }, { kind: "pipe", type: AppConfigPipe, name: "adfAppConfig" }], encapsulation: i0.ViewEncapsulation.None });
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerComponent, decorators: [{
396
+ type: Component,
397
+ args: [{ standalone: true, imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent, AppConfigPipe], selector: 'aca-viewer', encapsulation: ViewEncapsulation.None, host: { class: 'app-viewer' }, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'aca-right_side--hide': !showRightSide\n }\"\n [maxRetries]=\"'viewer.maxRetries' | adfAppConfig\"\n [nodeId]=\"nodeId\"\n [versionId]=\"versionId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [overlayMode]=\"true\"\n [hideInfoButton]=\"true\"\n [closeButtonPosition]=\"'viewer.closeButtonPosition' | adfAppConfig: 'right'\"\n (showViewerChange)=\"onViewerVisibilityChanged()\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions>\n <aca-toolbar [items]=\"toolbarActions\"></aca-toolbar>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-viewer{width:100%;height:100%}.app-viewer .adf-viewer-toolbar .adf-toolbar-divider{display:none}.app-viewer .adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.app-viewer .adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.app-viewer .adf-alfresco-viewer.aca-right_side--hide .adf-viewer__sidebar__right{width:0}\n"] }]
398
+ }], ctorParameters: function () { return [{ type: i1.Actions }, { type: i2.AlfrescoApiService }, { type: i3.AppHookService }, { type: i3.ContentApiService }, { type: i3.AppExtensionService }, { type: i4.NodesApiService }, { type: i5.ActivatedRoute }, { type: i5.Router }, { type: i6.Store }, { type: i4.UploadService }, { type: ViewerService }]; }, propDecorators: { handleKeyboardEvent: [{
399
+ type: HostListener,
400
+ args: ['document:keydown', ['$event']]
401
+ }] } });
402
+
403
+ class PreviewComponent extends PageComponent {
404
+ constructor(actions$, appHookService, contentApi, location, nodesApiService, route, viewerService) {
405
+ super();
406
+ this.actions$ = actions$;
407
+ this.appHookService = appHookService;
408
+ this.contentApi = contentApi;
409
+ this.location = location;
410
+ this.nodesApiService = nodesApiService;
411
+ this.route = route;
412
+ this.viewerService = viewerService;
413
+ this.folderId = null;
414
+ this.navigateBackAsClose = false;
415
+ this.navigateMultiple = false;
416
+ this.navigateSource = null;
417
+ this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
418
+ this.nodeId = null;
419
+ this.openWith = [];
420
+ this.previewLocation = null;
421
+ this.routesSkipNavigation = ['favorites', 'recent-files', 'shared'];
422
+ this.showRightSide = false;
423
+ this.simplestMode = false;
424
+ this.containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer'];
425
+ }
426
+ ngOnInit() {
427
+ super.ngOnInit();
428
+ from(this.infoDrawerOpened$)
429
+ .pipe(takeUntil(this.onDestroy$))
430
+ .subscribe((val) => {
431
+ this.showRightSide = val;
432
+ });
433
+ this.previewLocation = this.router.url.substr(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
434
+ const routeData = this.route.snapshot.data;
435
+ this.navigateBackAsClose = !!routeData.navigateBackAsClose;
436
+ this.simplestMode = !!routeData.simplestMode;
437
+ if (routeData.navigateMultiple) {
438
+ this.navigateMultiple = true;
439
+ }
440
+ if (routeData.navigateSource) {
441
+ const source = routeData.navigateSource.toLowerCase();
442
+ if (this.navigationSources.includes(source)) {
443
+ this.navigateSource = routeData.navigateSource;
444
+ }
445
+ }
446
+ this.route.params.subscribe((params) => {
447
+ this.folderId = params.folderId;
448
+ const id = params.nodeId;
449
+ if (id) {
450
+ void this.displayNode(id);
451
+ }
452
+ });
453
+ this.subscriptions = this.subscriptions.concat([
454
+ this.appHookService.nodesDeleted.subscribe(() => this.navigateToFileLocation(true)),
455
+ this.uploadService.fileUploadDeleted.subscribe(() => this.navigateToFileLocation(true)),
456
+ this.uploadService.fileUploadComplete.pipe(debounceTime(300)).subscribe((file) => this.nodesApiService.nodeUpdated.next(file.data.entry)),
457
+ this.actions$
458
+ .pipe(ofType(ViewerActionTypes.ClosePreview), map(() => this.navigateToFileLocation(true)))
459
+ .subscribe(() => { })
460
+ ]);
461
+ this.extensions
462
+ .getOpenWithActions()
463
+ .pipe(takeUntil(this.onDestroy$))
464
+ .subscribe((actions) => {
465
+ this.openWith = actions;
466
+ });
467
+ }
468
+ ngOnDestroy() {
469
+ super.ngOnDestroy();
470
+ }
203
471
  /**
204
- * Retrieves nearest node information for the given node and folder.
472
+ * Loads the particular node into the Viewer
205
473
  *
206
- * @param nodeId Unique identifier of the document node
207
- * @param folderId Unique identifier of the containing folder node.
474
+ * @param id Unique identifier for the Node to display
208
475
  */
209
- getNearestNodes(nodeId, folderId) {
476
+ displayNode(id) {
477
+ var _a;
210
478
  return __awaiter(this, void 0, void 0, function* () {
211
- const empty = {
212
- left: null,
213
- right: null
214
- };
215
- if (nodeId && folderId) {
479
+ if (id) {
216
480
  try {
217
- const ids = yield this.getFileIds(this.navigateSource, folderId);
218
- const idx = ids.indexOf(nodeId);
219
- if (idx >= 0) {
220
- return {
221
- left: ids[idx - 1] || null,
222
- right: ids[idx + 1] || null
223
- };
224
- }
225
- else {
226
- return empty;
481
+ this.node = yield this.contentApi.getNodeInfo(id).toPromise();
482
+ this.store.dispatch(new SetSelectedNodesAction([{ entry: this.node }]));
483
+ if ((_a = this.node) === null || _a === void 0 ? void 0 : _a.isFile) {
484
+ this.nodeId = this.node.id;
485
+ if (this.navigateMultiple) {
486
+ const nearest = yield this.viewerService.getNearestNodes(this.node.id, this.node.parentId, this.navigateSource);
487
+ this.previousNodeId = nearest.left;
488
+ this.nextNodeId = nearest.right;
489
+ }
490
+ return;
227
491
  }
492
+ yield this.router.navigate([this.previewLocation, id]);
228
493
  }
229
- catch (_a) {
230
- return empty;
494
+ catch (err) {
495
+ if (!err || err.status !== 401) {
496
+ yield this.router.navigate([this.previewLocation, id]);
497
+ }
231
498
  }
232
499
  }
233
- else {
234
- return empty;
235
- }
236
500
  });
237
501
  }
502
+ handleKeyboardEvent(event) {
503
+ const key = event.key;
504
+ if (key === 'ArrowRight' || key === 'ArrowLeft') {
505
+ event.preventDefault();
506
+ event.stopImmediatePropagation();
507
+ }
508
+ }
238
509
  /**
239
- * Retrieves a list of node identifiers for the folder and data source.
510
+ * Handles the visibility change of the Viewer component.
240
511
  *
241
- * @param source Data source name. Allowed values are: personal-files, libraries, favorites, shared, recent-files.
242
- * @param folderId Containing folder node identifier for 'personal-files' and 'libraries' sources.
512
+ * @param isVisible Indicator whether Viewer is visible or hidden.
243
513
  */
244
- getFileIds(source, folderId) {
245
- return __awaiter(this, void 0, void 0, function* () {
246
- if ((source === 'personal-files' || source === 'libraries') && folderId) {
247
- const sortKey = this.preferences.get('personal-files.sorting.key') || 'modifiedAt';
248
- const sortDirection = this.preferences.get('personal-files.sorting.direction') || 'desc';
249
- const nodes = yield this.contentApi
250
- .getNodeChildren(folderId, {
251
- // orderBy: `${sortKey} ${sortDirection}`,
252
- fields: ['id', this.getRootField(sortKey)],
253
- where: '(isFile=true)'
254
- })
255
- .toPromise();
256
- const entries = nodes.list.entries.map((obj) => obj.entry);
257
- this.sort(entries, sortKey, sortDirection);
258
- return entries.map((obj) => obj.id);
259
- }
260
- if (source === 'favorites') {
261
- const nodes = yield this.contentApi
262
- .getFavorites('-me-', {
263
- where: '(EXISTS(target/file))',
264
- fields: ['target']
265
- })
266
- .toPromise();
267
- const sortKey = this.preferences.get('favorites.sorting.key') || 'modifiedAt';
268
- const sortDirection = this.preferences.get('favorites.sorting.direction') || 'desc';
269
- const files = nodes.list.entries.map((obj) => obj.entry.target.file);
270
- this.sort(files, sortKey, sortDirection);
271
- return files.map((f) => f.id);
272
- }
273
- if (source === 'shared') {
274
- const sortingKey = this.preferences.get('shared.sorting.key') || 'modifiedAt';
275
- const sortingDirection = this.preferences.get('shared.sorting.direction') || 'desc';
276
- const nodes = yield this.contentApi
277
- .findSharedLinks({
278
- fields: ['nodeId', this.getRootField(sortingKey)]
279
- })
280
- .toPromise();
281
- const entries = nodes.list.entries.map((obj) => obj.entry);
282
- this.sort(entries, sortingKey, sortingDirection);
283
- return entries.map((obj) => obj.nodeId);
514
+ onVisibilityChanged(isVisible) {
515
+ const shouldNavigate = !isVisible;
516
+ this.navigateToFileLocation(shouldNavigate);
517
+ }
518
+ navigateToFileLocation(shouldNavigate) {
519
+ if (shouldNavigate) {
520
+ if (this.navigateBackAsClose) {
521
+ this.location.back();
284
522
  }
285
- if (source === 'recent-files') {
286
- const person = yield this.contentApi.getPerson('-me-').toPromise();
287
- const username = person.entry.id;
288
- const sortingKey = this.preferences.get('recent-files.sorting.key') || 'modifiedAt';
289
- const sortingDirection = this.preferences.get('recent-files.sorting.direction') || 'desc';
290
- const query = {
291
- query: {
292
- query: '*',
293
- language: 'afts'
294
- },
295
- filterQueries: [
296
- { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
297
- { query: `cm:modifier:${username} OR cm:creator:${username}` },
298
- {
299
- query: this.recentFileFilters.join(' AND ')
300
- }
301
- ],
302
- fields: ['id', this.getRootField(sortingKey)],
303
- include: ['path', 'properties', 'allowableOperations'],
304
- sort: [
305
- {
306
- type: 'FIELD',
307
- field: 'cm:modified',
308
- ascending: false
309
- }
310
- ]
311
- };
312
- const nodes = yield this.contentApi.search(query).toPromise();
313
- const entries = nodes.list.entries.map((obj) => obj.entry);
314
- this.sort(entries, sortingKey, sortingDirection);
315
- return entries.map((obj) => obj.id);
523
+ else {
524
+ const shouldSkipNavigation = this.routesSkipNavigation.includes(this.previewLocation);
525
+ const route = this.getNavigationCommands(this.previewLocation);
526
+ if (!shouldSkipNavigation && this.folderId) {
527
+ route.push(this.folderId);
528
+ }
529
+ void this.router.navigate(route);
316
530
  }
317
- return [];
318
- });
531
+ }
532
+ }
533
+ /** Handles navigation to a previous document */
534
+ onNavigateBefore(event) {
535
+ if (event.type !== 'click' && this.shouldNavigate(event.target)) {
536
+ return;
537
+ }
538
+ if (this.previousNodeId) {
539
+ void this.router.navigate(this.getPreviewPath(this.folderId, this.previousNodeId));
540
+ }
541
+ }
542
+ /** Handles navigation to a next document */
543
+ onNavigateNext(event) {
544
+ if (event.type !== 'click' && this.shouldNavigate(event.target)) {
545
+ return;
546
+ }
547
+ if (this.nextNodeId) {
548
+ void this.router.navigate(this.getPreviewPath(this.folderId, this.nextNodeId));
549
+ }
319
550
  }
320
551
  /**
321
- * Get the root field name from the property path.
322
- * Example: 'property1.some.child.property' => 'property1'
552
+ * Generates a node preview route based on folder and node IDs.
323
553
  *
324
- * @param path Property path
554
+ * @param folderId Folder ID
555
+ * @param nodeId Node ID
325
556
  */
326
- getRootField(path) {
327
- if (path) {
328
- return path.split('.')[0];
557
+ getPreviewPath(folderId, nodeId) {
558
+ const route = [this.previewLocation];
559
+ if (folderId) {
560
+ route.push(folderId);
329
561
  }
330
- return path;
331
- }
332
- handleKeyboardEvent(event) {
333
- const key = event.key;
334
- if (key === 'ArrowRight' || key === 'ArrowLeft') {
335
- event.preventDefault();
336
- event.stopImmediatePropagation();
562
+ if (nodeId) {
563
+ route.push('preview', nodeId);
337
564
  }
565
+ return route;
338
566
  }
339
- sort(items, key, direction) {
340
- const options = {};
341
- if (key.includes('sizeInBytes') || key === 'name') {
342
- options.numeric = true;
567
+ getNavigationCommands(url) {
568
+ const urlTree = this.router.parseUrl(url);
569
+ const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
570
+ if (!urlSegmentGroup) {
571
+ return [url];
343
572
  }
344
- items.sort((a, b) => {
345
- var _a, _b;
346
- let left = (_a = ObjectUtils.getValue(a, key)) !== null && _a !== void 0 ? _a : '';
347
- left = left instanceof Date ? left.valueOf().toString() : left.toString();
348
- let right = (_b = ObjectUtils.getValue(b, key)) !== null && _b !== void 0 ? _b : '';
349
- right = right instanceof Date ? right.valueOf().toString() : right.toString();
350
- return direction === 'asc' ? left.localeCompare(right, undefined, options) : right.localeCompare(left, undefined, options);
351
- });
352
- }
353
- navigateToFileLocation() {
354
- const location = this.getFileLocation();
355
- this.router.navigateByUrl(location);
356
- }
357
- getFileLocation() {
358
- return this.navigationPath || this.router.parseUrl(this.router.url).root.children[PRIMARY_OUTLET].toString();
573
+ const urlSegments = urlSegmentGroup.segments;
574
+ return urlSegments.reduce(function (acc, item) {
575
+ acc.push(item.path, item.parameters);
576
+ return acc;
577
+ }, []);
359
578
  }
360
579
  shouldNavigate(element) {
361
580
  let currentElement = element.parentElement;
@@ -368,18 +587,18 @@ class AcaViewerComponent {
368
587
  return Array.from(list).some((className) => this.containersSkipNavigation.includes(className));
369
588
  }
370
589
  }
371
- AcaViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.Store }, { token: i3.AppExtensionService }, { token: i3.ContentApiService }, { token: i4.Actions }, { token: i5.UserPreferencesService }, { token: i5.AlfrescoApiService }, { token: i6.NodesApiService }, { token: i6.UploadService }, { token: i3.AppHookService }], target: i0.ɵɵFactoryTarget.Component });
372
- AcaViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: AcaViewerComponent, isStandalone: true, selector: "aca-viewer", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" }, classAttribute: "app-viewer" }, ngImport: i0, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'aca-right_side--hide': !showRightSide\n }\"\n [maxRetries]=\"'viewer.maxRetries' | adfAppConfig\"\n [nodeId]=\"nodeId\"\n [versionId]=\"versionId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [overlayMode]=\"true\"\n [hideInfoButton]=\"true\"\n [closeButtonPosition]=\"'viewer.closeButtonPosition' | adfAppConfig: 'right'\"\n (showViewerChange)=\"onViewerVisibilityChanged()\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions>\n <aca-toolbar [items]=\"toolbarActions\"></aca-toolbar>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-viewer{width:100%;height:100%}.app-viewer .adf-viewer-toolbar .adf-toolbar-divider{display:none}.app-viewer .adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.app-viewer .adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.app-viewer .adf-alfresco-viewer.aca-right_side--hide .adf-viewer__sidebar__right{width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ViewerModule }, { kind: "component", type: i5.ViewerSidebarComponent, selector: "adf-viewer-sidebar" }, { kind: "component", type: i5.ViewerOpenWithComponent, selector: "adf-viewer-open-with" }, { kind: "component", type: i5.ViewerToolbarActionsComponent, selector: "adf-viewer-toolbar-actions" }, { kind: "ngmodule", type: AlfrescoViewerModule }, { kind: "component", type: i6.AlfrescoViewerComponent, selector: "adf-alfresco-viewer", inputs: ["nodeId", "versionId", "sharedLinkId", "showViewer", "maxRetries", "allowGoBack", "showToolbar", "overlayMode", "allowNavigate", "canNavigateBefore", "canNavigateNext", "allowLeftSidebar", "allowRightSidebar", "showRightSidebar", "showLeftSidebar", "allowDownload", "allowPrint", "allowFullScreen", "hideInfoButton", "closeButtonPosition", "sidebarRightTemplate", "sidebarLeftTemplate"], outputs: ["invalidSharedLink", "navigateBefore", "navigateNext", "showViewerChange"] }, { kind: "component", type: InfoDrawerComponent, selector: "aca-info-drawer", inputs: ["nodeId", "node"] }, { kind: "ngmodule", type: AppConfigModule }, { kind: "pipe", type: i5.AppConfigPipe, name: "adfAppConfig" }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "component", type: ToolbarComponent, selector: "aca-toolbar", inputs: ["items"] }], encapsulation: i0.ViewEncapsulation.None });
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerComponent, decorators: [{
590
+ PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewComponent, deps: [{ token: i1.Actions }, { token: i3.AppHookService }, { token: i3.ContentApiService }, { token: i3$1.Location }, { token: i4.NodesApiService }, { token: i5.ActivatedRoute }, { token: ViewerService }], target: i0.ɵɵFactoryTarget.Component });
591
+ PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: PreviewComponent, isStandalone: true, selector: "app-preview", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" }, classAttribute: "app-preview" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'aca-right_side--hide': !showRightSide\n }\"\n [nodeId]=\"nodeId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n [overlayMode]=\"true\"\n (showViewerChange)=\"onVisibilityChanged($event)\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions *ngIf=\"!simplestMode\">\n <aca-toolbar [items]=\"viewerToolbarActions\"></aca-toolbar>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-preview{width:100%;height:100%}.adf-viewer-toolbar .adf-toolbar-divider{display:none}.adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.adf-viewer-toolbar>*>button:last-child{display:none}.adf-alfresco-viewer.aca-right_side--hide .adf-viewer__sidebar__right{width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ViewerModule }, { kind: "component", type: i2.ViewerSidebarComponent, selector: "adf-viewer-sidebar" }, { kind: "component", type: i2.ViewerOpenWithComponent, selector: "adf-viewer-open-with" }, { kind: "component", type: i2.ViewerToolbarActionsComponent, selector: "adf-viewer-toolbar-actions" }, { kind: "ngmodule", type: AlfrescoViewerModule }, { kind: "component", type: i4.AlfrescoViewerComponent, selector: "adf-alfresco-viewer", inputs: ["nodeId", "versionId", "sharedLinkId", "showViewer", "maxRetries", "allowGoBack", "showToolbar", "overlayMode", "allowNavigate", "canNavigateBefore", "canNavigateNext", "allowLeftSidebar", "allowRightSidebar", "showRightSidebar", "showLeftSidebar", "allowDownload", "allowPrint", "allowFullScreen", "hideInfoButton", "closeButtonPosition", "sidebarRightTemplate", "sidebarLeftTemplate"], outputs: ["invalidSharedLink", "navigateBefore", "navigateNext", "showViewerChange"] }, { kind: "component", type: InfoDrawerComponent, selector: "aca-info-drawer", inputs: ["nodeId", "node"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "component", type: ToolbarComponent, selector: "aca-toolbar", inputs: ["items"] }], encapsulation: i0.ViewEncapsulation.None });
592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewComponent, decorators: [{
374
593
  type: Component,
375
- args: [{ standalone: true, imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, AppConfigModule, ToolbarMenuItemComponent, ToolbarComponent], selector: 'aca-viewer', encapsulation: ViewEncapsulation.None, host: { class: 'app-viewer' }, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'aca-right_side--hide': !showRightSide\n }\"\n [maxRetries]=\"'viewer.maxRetries' | adfAppConfig\"\n [nodeId]=\"nodeId\"\n [versionId]=\"versionId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [overlayMode]=\"true\"\n [hideInfoButton]=\"true\"\n [closeButtonPosition]=\"'viewer.closeButtonPosition' | adfAppConfig: 'right'\"\n (showViewerChange)=\"onViewerVisibilityChanged()\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions>\n <aca-toolbar [items]=\"toolbarActions\"></aca-toolbar>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-viewer{width:100%;height:100%}.app-viewer .adf-viewer-toolbar .adf-toolbar-divider{display:none}.app-viewer .adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.app-viewer .adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.app-viewer .adf-alfresco-viewer.aca-right_side--hide .adf-viewer__sidebar__right{width:0}\n"] }]
376
- }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.Store }, { type: i3.AppExtensionService }, { type: i3.ContentApiService }, { type: i4.Actions }, { type: i5.UserPreferencesService }, { type: i5.AlfrescoApiService }, { type: i6.NodesApiService }, { type: i6.UploadService }, { type: i3.AppHookService }]; }, propDecorators: { handleKeyboardEvent: [{
594
+ args: [{ standalone: true, imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent], selector: 'app-preview', encapsulation: ViewEncapsulation.None, host: { class: 'app-preview' }, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'aca-right_side--hide': !showRightSide\n }\"\n [nodeId]=\"nodeId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n [overlayMode]=\"true\"\n (showViewerChange)=\"onVisibilityChanged($event)\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions *ngIf=\"!simplestMode\">\n <aca-toolbar [items]=\"viewerToolbarActions\"></aca-toolbar>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-preview{width:100%;height:100%}.adf-viewer-toolbar .adf-toolbar-divider{display:none}.adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.adf-viewer-toolbar>*>button:last-child{display:none}.adf-alfresco-viewer.aca-right_side--hide .adf-viewer__sidebar__right{width:0}\n"] }]
595
+ }], ctorParameters: function () { return [{ type: i1.Actions }, { type: i3.AppHookService }, { type: i3.ContentApiService }, { type: i3$1.Location }, { type: i4.NodesApiService }, { type: i5.ActivatedRoute }, { type: ViewerService }]; }, propDecorators: { handleKeyboardEvent: [{
377
596
  type: HostListener,
378
597
  args: ['document:keydown', ['$event']]
379
598
  }] } });
380
599
 
381
600
  /*!
382
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
601
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
383
602
  *
384
603
  * Alfresco Example Content Application
385
604
  *
@@ -414,18 +633,18 @@ const routes = [
414
633
  class AcaViewerModule {
415
634
  }
416
635
  AcaViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
417
- AcaViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [i1.RouterModule, AcaViewerComponent], exports: [AcaViewerComponent] });
418
- AcaViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [RouterModule.forChild(routes), AcaViewerComponent] });
636
+ AcaViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [i5.RouterModule, AcaViewerComponent, PreviewComponent], exports: [AcaViewerComponent, PreviewComponent] });
637
+ AcaViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [RouterModule.forChild(routes), AcaViewerComponent, PreviewComponent] });
419
638
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, decorators: [{
420
639
  type: NgModule,
421
640
  args: [{
422
- imports: [RouterModule.forChild(routes), AcaViewerComponent],
423
- exports: [AcaViewerComponent]
641
+ imports: [RouterModule.forChild(routes), AcaViewerComponent, PreviewComponent],
642
+ exports: [AcaViewerComponent, PreviewComponent]
424
643
  }]
425
644
  }] });
426
645
 
427
646
  /*!
428
- * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
647
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
429
648
  *
430
649
  * Alfresco Example Content Application
431
650
  *
@@ -452,5 +671,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
452
671
  * Generated bundle index. Do not edit.
453
672
  */
454
673
 
455
- export { AcaViewerComponent, AcaViewerModule };
674
+ export { AcaViewerComponent, AcaViewerModule, PreviewComponent };
456
675
  //# sourceMappingURL=alfresco-aca-content-viewer.mjs.map