@alfresco/aca-content 4.4.1 → 4.5.0-10007555309
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/about/about.component.d.ts +2 -2
- package/about/dev-mode.tokens.d.ts +1 -1
- package/about/package-json.token.d.ts +1 -1
- package/about/public-api.d.ts +1 -1
- package/assets/app.extensions.json +13 -19
- package/assets/i18n/ar.json +1 -1
- package/assets/i18n/cs.json +1 -1
- package/assets/i18n/da.json +1 -1
- package/assets/i18n/de.json +1 -1
- package/assets/i18n/en.json +1 -1
- package/assets/i18n/es.json +1 -1
- package/assets/i18n/fi.json +1 -1
- package/assets/i18n/fr.json +1 -1
- package/assets/i18n/it.json +1 -1
- package/assets/i18n/ja.json +1 -1
- package/assets/i18n/nb.json +1 -1
- package/assets/i18n/nl.json +1 -1
- package/assets/i18n/pl.json +1 -1
- package/assets/i18n/pt-BR.json +1 -1
- package/assets/i18n/ru.json +1 -1
- package/assets/i18n/sv.json +1 -1
- package/assets/i18n/zh-CN.json +1 -1
- package/esm2020/about/about.component.mjs +7 -7
- package/esm2020/about/aca-about.module.mjs +2 -2
- package/esm2020/about/dev-mode.tokens.mjs +2 -2
- package/esm2020/about/package-json.token.mjs +2 -2
- package/esm2020/about/public-api.mjs +2 -2
- package/esm2020/folder-rules/folder-rules.module.mjs +8 -3
- package/esm2020/folder-rules/folder-rules.rules.mjs +2 -2
- package/esm2020/folder-rules/manage-rules/manage-rules.smart-component.mjs +6 -5
- package/esm2020/folder-rules/model/action-parameter-constraint.model.mjs +2 -2
- package/esm2020/folder-rules/model/rule-action.model.mjs +2 -2
- package/esm2020/folder-rules/model/rule-composite-condition.model.mjs +2 -2
- package/esm2020/folder-rules/model/rule-grouping-item.model.mjs +2 -2
- package/esm2020/folder-rules/model/rule-set.model.mjs +2 -2
- package/esm2020/folder-rules/model/rule-simple-condition.model.mjs +2 -2
- package/esm2020/folder-rules/model/rule.model.mjs +2 -2
- package/esm2020/folder-rules/public-api.mjs +2 -2
- package/esm2020/folder-rules/rule-details/actions/rule-action-list.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-details/actions/rule-action.ui-component.mjs +77 -10
- package/esm2020/folder-rules/rule-details/conditions/rule-composite-condition.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-details/conditions/rule-condition-comparators.mjs +2 -2
- package/esm2020/folder-rules/rule-details/conditions/rule-condition-fields.mjs +2 -2
- package/esm2020/folder-rules/rule-details/conditions/rule-simple-condition.ui-component.mjs +21 -22
- package/esm2020/folder-rules/rule-details/edit-rule-dialog.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-details/options/rule-options.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-details/rule-details.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-details/triggers/rule-triggers.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-details/validators/rule-actions.validator.mjs +2 -2
- package/esm2020/folder-rules/rule-details/validators/rule-composite-condition.validator.mjs +2 -2
- package/esm2020/folder-rules/rule-list/rule-list/rule-list.ui-component.mjs +25 -19
- package/esm2020/folder-rules/rule-list/rule-list-grouping/rule-list-grouping.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-list/rule-list-item/rule-list-item.ui-component.mjs +2 -2
- package/esm2020/folder-rules/rule-set-picker/rule-set-picker.smart-component.mjs +2 -2
- package/esm2020/folder-rules/services/actions.service.mjs +2 -2
- package/esm2020/folder-rules/services/folder-rule-sets.service.mjs +7 -3
- package/esm2020/folder-rules/services/folder-rules.service.mjs +2 -2
- package/esm2020/lib/aca-content.module.mjs +39 -87
- package/esm2020/lib/aca-content.routes.mjs +2 -2
- package/esm2020/lib/components/common/index.mjs +2 -2
- package/esm2020/lib/components/common/language-picker/language-picker.component.mjs +2 -2
- package/esm2020/lib/components/common/location-link/location-link.component.mjs +2 -2
- package/esm2020/lib/components/common/logout/logout.component.mjs +5 -6
- package/esm2020/lib/components/common/toggle-shared/toggle-shared.component.mjs +2 -2
- package/esm2020/lib/components/common/user-info/user-info.component.mjs +2 -2
- package/esm2020/lib/components/context-menu/context-menu-item.component.mjs +7 -9
- package/esm2020/lib/components/context-menu/context-menu-outside-event.directive.mjs +2 -2
- package/esm2020/lib/components/context-menu/context-menu-overlay.mjs +2 -2
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +8 -10
- package/esm2020/lib/components/context-menu/context-menu.service.mjs +2 -2
- package/esm2020/lib/components/context-menu/direction.token.mjs +2 -2
- package/esm2020/lib/components/context-menu/interfaces.mjs +2 -2
- package/esm2020/lib/components/details/details.component.mjs +2 -2
- package/esm2020/lib/components/dl-custom-components/name-column/name-column.component.mjs +7 -9
- package/esm2020/lib/components/dl-custom-components/tags-column/tags-column.component.mjs +2 -2
- package/esm2020/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.mjs +2 -2
- package/esm2020/lib/components/favorite-libraries/favorite-libraries.component.mjs +11 -12
- package/esm2020/lib/components/favorites/favorites.component.mjs +11 -12
- package/esm2020/lib/components/files/files.component.mjs +29 -27
- package/esm2020/lib/components/home/home.component.mjs +10 -14
- package/esm2020/lib/components/info-drawer/comments-tab/comments-tab.component.mjs +2 -2
- package/esm2020/lib/components/info-drawer/info.drawer.module.mjs +2 -2
- package/esm2020/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.mjs +2 -2
- package/esm2020/lib/components/info-drawer/library-metadata-tab/library-metadata-tab.component.mjs +2 -2
- package/esm2020/lib/components/info-drawer/metadata-tab/metadata-tab.component.mjs +2 -2
- package/esm2020/lib/components/info-drawer/versions-tab/versions-tab.component.mjs +7 -8
- package/esm2020/lib/components/libraries/libraries.component.mjs +11 -12
- package/esm2020/lib/components/recent-files/recent-files.component.mjs +11 -12
- package/esm2020/lib/components/search/index.mjs +2 -2
- package/esm2020/lib/components/search/search-action-menu/search-action-menu.component.mjs +2 -2
- package/esm2020/lib/components/search/search-input/search-input.component.mjs +2 -2
- package/esm2020/lib/components/search/search-input-control/search-input-control.component.mjs +2 -2
- package/esm2020/lib/components/search/search-libraries-results/search-libraries-query-builder.service.mjs +2 -2
- package/esm2020/lib/components/search/search-libraries-results/search-libraries-results.component.mjs +9 -10
- package/esm2020/lib/components/search/search-navigation.service.mjs +2 -2
- package/esm2020/lib/components/search/search-results/search-results.component.mjs +17 -22
- package/esm2020/lib/components/search/search-results-row/search-results-row.component.mjs +2 -2
- package/esm2020/lib/components/shared-files/shared-files.component.mjs +11 -12
- package/esm2020/lib/components/shared-link-view/shared-link-view.component.mjs +2 -2
- package/esm2020/lib/components/sidenav/components/button-menu.component.mjs +2 -2
- package/esm2020/lib/components/sidenav/components/expand-menu.component.mjs +2 -2
- package/esm2020/lib/components/sidenav/components/sidenav-header.component.mjs +11 -16
- package/esm2020/lib/components/sidenav/directives/action.directive.mjs +2 -2
- package/esm2020/lib/components/sidenav/directives/active-link.directive.mjs +2 -2
- package/esm2020/lib/components/sidenav/directives/expansion-panel.directive.mjs +2 -2
- package/esm2020/lib/components/sidenav/directives/menu-panel.directive.mjs +2 -2
- package/esm2020/lib/components/sidenav/index.mjs +2 -2
- package/esm2020/lib/components/sidenav/sidenav.component.mjs +5 -6
- package/esm2020/lib/components/sidenav/user-menu/user-menu.component.mjs +2 -2
- package/esm2020/lib/components/toolbar/index.mjs +2 -2
- package/esm2020/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.mjs +2 -2
- package/esm2020/lib/components/toolbar/toggle-favorite/toggle-favorite.component.mjs +7 -8
- package/esm2020/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.mjs +7 -8
- package/esm2020/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.mjs +2 -2
- package/esm2020/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.mjs +6 -7
- package/esm2020/lib/components/toolbar/toggle-join-library/toggle-join-library-menu.component.mjs +7 -8
- package/esm2020/lib/components/toolbar/view-node/view-node.component.mjs +2 -2
- package/esm2020/lib/components/trashcan/trashcan.component.mjs +10 -11
- package/esm2020/lib/components/upload-files-dialog/upload-files-dialog.component.mjs +2 -2
- package/esm2020/lib/components/view-profile/view-profile.component.mjs +2 -2
- package/esm2020/lib/components/view-profile/view-profile.guard.mjs +2 -2
- package/esm2020/lib/dialogs/node-template/create-from-template.dialog.mjs +2 -2
- package/esm2020/lib/directives/document-list.directive.mjs +44 -16
- package/esm2020/lib/extensions/core.extensions.module.mjs +2 -7
- package/esm2020/lib/services/content-management.service.mjs +26 -28
- package/esm2020/lib/services/content-url.service.mjs +2 -2
- package/esm2020/lib/services/node-actions.service.mjs +2 -2
- package/esm2020/lib/services/node-template.service.mjs +2 -2
- package/esm2020/lib/store/app-store.module.mjs +2 -2
- package/esm2020/lib/store/effects/app.effects.mjs +2 -2
- package/esm2020/lib/store/effects/contextmenu.effects.mjs +2 -2
- package/esm2020/lib/store/effects/download.effects.mjs +2 -2
- package/esm2020/lib/store/effects/favorite.effects.mjs +2 -2
- package/esm2020/lib/store/effects/library.effects.mjs +2 -2
- package/esm2020/lib/store/effects/node.effects.mjs +2 -2
- package/esm2020/lib/store/effects/search.effects.mjs +3 -3
- package/esm2020/lib/store/effects/template.effects.mjs +2 -2
- package/esm2020/lib/store/effects/upload.effects.mjs +2 -2
- package/esm2020/lib/store/effects/viewer.effects.mjs +2 -2
- package/esm2020/lib/store/effects.mjs +2 -2
- package/esm2020/lib/store/initial-state.mjs +3 -39
- package/esm2020/lib/store/reducers/app.reducer.mjs +3 -7
- package/esm2020/ms-office/actions/aos.actions.mjs +2 -2
- package/esm2020/ms-office/aos-extension.module.mjs +2 -2
- package/esm2020/ms-office/aos-extension.service.mjs +10 -12
- package/esm2020/ms-office/effects/aos.effects.mjs +2 -2
- package/esm2020/ms-office/public-api.mjs +2 -2
- package/esm2020/public-api.mjs +2 -2
- package/esm2020/viewer/lib/components/preview/preview.component.mjs +236 -0
- package/esm2020/viewer/lib/components/viewer/viewer.component.mjs +42 -203
- package/esm2020/viewer/lib/services/viewer.service.mjs +215 -0
- package/esm2020/viewer/lib/viewer.module.mjs +7 -6
- package/esm2020/viewer/public-api.mjs +3 -2
- package/fesm2015/alfresco-aca-content-about.mjs +10 -10
- package/fesm2015/alfresco-aca-content-about.mjs.map +1 -1
- package/fesm2015/alfresco-aca-content-folder-rules.mjs +167 -93
- package/fesm2015/alfresco-aca-content-folder-rules.mjs.map +1 -1
- package/fesm2015/alfresco-aca-content-ms-office.mjs +10 -13
- package/fesm2015/alfresco-aca-content-ms-office.mjs.map +1 -1
- package/fesm2015/alfresco-aca-content-viewer.mjs +414 -195
- package/fesm2015/alfresco-aca-content-viewer.mjs.map +1 -1
- package/fesm2015/alfresco-aca-content.mjs +5995 -6053
- package/fesm2015/alfresco-aca-content.mjs.map +1 -1
- package/fesm2020/alfresco-aca-content-about.mjs +10 -10
- package/fesm2020/alfresco-aca-content-about.mjs.map +1 -1
- package/fesm2020/alfresco-aca-content-folder-rules.mjs +178 -96
- package/fesm2020/alfresco-aca-content-folder-rules.mjs.map +1 -1
- package/fesm2020/alfresco-aca-content-ms-office.mjs +11 -14
- package/fesm2020/alfresco-aca-content-ms-office.mjs.map +1 -1
- package/fesm2020/alfresco-aca-content-viewer.mjs +449 -186
- package/fesm2020/alfresco-aca-content-viewer.mjs.map +1 -1
- package/fesm2020/alfresco-aca-content.mjs +4935 -4993
- package/fesm2020/alfresco-aca-content.mjs.map +1 -1
- package/folder-rules/folder-rules.module.d.ts +1 -1
- package/folder-rules/folder-rules.rules.d.ts +1 -1
- package/folder-rules/manage-rules/manage-rules.smart-component.d.ts +1 -1
- package/folder-rules/model/action-parameter-constraint.model.d.ts +1 -1
- package/folder-rules/model/rule-action.model.d.ts +1 -1
- package/folder-rules/model/rule-composite-condition.model.d.ts +1 -1
- package/folder-rules/model/rule-grouping-item.model.d.ts +1 -1
- package/folder-rules/model/rule-set.model.d.ts +1 -1
- package/folder-rules/model/rule-simple-condition.model.d.ts +1 -1
- package/folder-rules/model/rule.model.d.ts +1 -1
- package/folder-rules/public-api.d.ts +1 -1
- package/folder-rules/rule-details/actions/rule-action-list.ui-component.d.ts +1 -1
- package/folder-rules/rule-details/actions/rule-action.ui-component.d.ts +10 -5
- package/folder-rules/rule-details/conditions/rule-composite-condition.ui-component.d.ts +1 -1
- package/folder-rules/rule-details/conditions/rule-condition-comparators.d.ts +1 -1
- package/folder-rules/rule-details/conditions/rule-condition-fields.d.ts +1 -1
- package/folder-rules/rule-details/conditions/rule-simple-condition.ui-component.d.ts +5 -6
- package/folder-rules/rule-details/edit-rule-dialog.ui-component.d.ts +1 -1
- package/folder-rules/rule-details/options/rule-options.ui-component.d.ts +1 -1
- package/folder-rules/rule-details/rule-details.ui-component.d.ts +1 -1
- package/folder-rules/rule-details/triggers/rule-triggers.ui-component.d.ts +1 -1
- package/folder-rules/rule-details/validators/rule-actions.validator.d.ts +1 -1
- package/folder-rules/rule-details/validators/rule-composite-condition.validator.d.ts +1 -1
- package/folder-rules/rule-list/rule-list/rule-list.ui-component.d.ts +14 -9
- package/folder-rules/rule-list/rule-list-grouping/rule-list-grouping.ui-component.d.ts +1 -1
- package/folder-rules/rule-list/rule-list-item/rule-list-item.ui-component.d.ts +1 -1
- package/folder-rules/rule-set-picker/rule-set-picker.smart-component.d.ts +1 -1
- package/lib/aca-content.module.d.ts +5 -16
- package/lib/aca-content.routes.d.ts +1 -1
- package/lib/components/common/index.d.ts +1 -1
- package/lib/components/common/location-link/location-link.component.d.ts +1 -1
- package/lib/components/common/toggle-shared/toggle-shared.component.d.ts +1 -1
- package/lib/components/context-menu/context-menu-outside-event.directive.d.ts +1 -1
- package/lib/components/context-menu/context-menu-overlay.d.ts +1 -1
- package/lib/components/context-menu/context-menu.component.d.ts +1 -1
- package/lib/components/context-menu/context-menu.service.d.ts +1 -1
- package/lib/components/context-menu/direction.token.d.ts +1 -1
- package/lib/components/context-menu/interfaces.d.ts +1 -1
- package/lib/components/details/details.component.d.ts +1 -1
- package/lib/components/dl-custom-components/name-column/name-column.component.d.ts +1 -1
- package/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.d.ts +1 -1
- package/lib/components/favorite-libraries/favorite-libraries.component.d.ts +1 -1
- package/lib/components/favorites/favorites.component.d.ts +1 -1
- package/lib/components/files/files.component.d.ts +3 -3
- package/lib/components/home/home.component.d.ts +2 -6
- package/lib/components/info-drawer/comments-tab/comments-tab.component.d.ts +1 -1
- package/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.d.ts +1 -1
- package/lib/components/info-drawer/metadata-tab/metadata-tab.component.d.ts +1 -1
- package/lib/components/info-drawer/versions-tab/versions-tab.component.d.ts +1 -1
- package/lib/components/recent-files/recent-files.component.d.ts +1 -1
- package/lib/components/search/index.d.ts +1 -1
- package/lib/components/search/search-action-menu/search-action-menu.component.d.ts +1 -1
- package/lib/components/search/search-input/search-input.component.d.ts +1 -1
- package/lib/components/search/search-input-control/search-input-control.component.d.ts +1 -1
- package/lib/components/search/search-libraries-results/search-libraries-query-builder.service.d.ts +1 -1
- package/lib/components/search/search-results/search-results.component.d.ts +1 -2
- package/lib/components/search/search-results-row/search-results-row.component.d.ts +1 -1
- package/lib/components/shared-files/shared-files.component.d.ts +1 -1
- package/lib/components/shared-link-view/shared-link-view.component.d.ts +1 -1
- package/lib/components/sidenav/components/button-menu.component.d.ts +1 -1
- package/lib/components/sidenav/components/expand-menu.component.d.ts +1 -1
- package/lib/components/sidenav/components/sidenav-header.component.d.ts +4 -5
- package/lib/components/sidenav/directives/active-link.directive.d.ts +1 -1
- package/lib/components/sidenav/directives/expansion-panel.directive.d.ts +1 -1
- package/lib/components/sidenav/directives/menu-panel.directive.d.ts +1 -1
- package/lib/components/sidenav/index.d.ts +1 -1
- package/lib/components/sidenav/sidenav.component.d.ts +1 -1
- package/lib/components/sidenav/user-menu/user-menu.component.d.ts +1 -1
- package/lib/components/toolbar/index.d.ts +1 -1
- package/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.d.ts +1 -1
- package/lib/components/toolbar/toggle-favorite/toggle-favorite.component.d.ts +1 -1
- package/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.d.ts +1 -1
- package/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.d.ts +1 -1
- package/lib/components/upload-files-dialog/upload-files-dialog.component.d.ts +1 -1
- package/lib/components/view-profile/view-profile.component.d.ts +1 -1
- package/lib/dialogs/node-template/create-from-template.dialog.d.ts +1 -1
- package/lib/directives/document-list.directive.d.ts +4 -1
- package/lib/extensions/core.extensions.module.d.ts +1 -2
- package/lib/services/content-management.service.d.ts +4 -3
- package/lib/store/effects/app.effects.d.ts +1 -1
- package/lib/store/effects/download.effects.d.ts +1 -1
- package/lib/store/effects/favorite.effects.d.ts +1 -1
- package/lib/store/effects/library.effects.d.ts +1 -1
- package/lib/store/effects/node.effects.d.ts +1 -1
- package/lib/store/effects/search.effects.d.ts +1 -1
- package/lib/store/effects/template.effects.d.ts +1 -1
- package/lib/store/effects/upload.effects.d.ts +1 -1
- package/lib/store/effects/viewer.effects.d.ts +1 -1
- package/lib/store/effects.d.ts +1 -1
- package/lib/store/initial-state.d.ts +2 -4
- package/lib/store/reducers/app.reducer.d.ts +1 -1
- package/ms-office/actions/aos.actions.d.ts +1 -1
- package/ms-office/aos-extension.module.d.ts +1 -1
- package/ms-office/aos-extension.service.d.ts +5 -5
- package/ms-office/public-api.d.ts +1 -1
- package/package.json +5 -13
- package/public-api.d.ts +1 -1
- package/{preview/lib/components → viewer/lib/components/preview}/preview.component.d.ts +16 -43
- package/viewer/lib/components/viewer/viewer.component.d.ts +20 -46
- package/viewer/lib/services/viewer.service.d.ts +65 -0
- package/viewer/lib/viewer.module.d.ts +2 -1
- package/viewer/public-api.d.ts +2 -1
- package/esm2020/folder-rules/rule-details/conditions/rule-mime-types.mjs +0 -25
- package/esm2020/preview/alfresco-aca-content-preview.mjs +0 -5
- package/esm2020/preview/lib/components/preview.component.mjs +0 -394
- package/esm2020/preview/lib/preview.module.mjs +0 -39
- package/esm2020/preview/public-api.mjs +0 -29
- package/fesm2015/alfresco-aca-content-preview.mjs +0 -447
- package/fesm2015/alfresco-aca-content-preview.mjs.map +0 -1
- package/fesm2020/alfresco-aca-content-preview.mjs +0 -461
- package/fesm2020/alfresco-aca-content-preview.mjs.map +0 -1
- package/folder-rules/rule-details/conditions/rule-mime-types.d.ts +0 -27
- package/preview/index.d.ts +0 -5
- package/preview/lib/preview.module.d.ts +0 -7
- package/preview/public-api.d.ts +0 -25
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as i3 from '@alfresco/aca-shared';
|
|
2
|
-
import { InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent } from '@alfresco/aca-shared';
|
|
2
|
+
import { InfoDrawerComponent, ToolbarMenuItemComponent, ToolbarComponent, PageComponent } from '@alfresco/aca-shared';
|
|
3
3
|
import { isInfoDrawerOpened, getAppSelection, SetCurrentNodeVersionAction, ViewerActionTypes, ReloadDocumentListAction, SetSelectedNodesAction, ViewNodeAction } from '@alfresco/aca-shared/store';
|
|
4
4
|
import { VersionsApi } from '@alfresco/js-api';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Component, ViewEncapsulation, HostListener, NgModule } from '@angular/core';
|
|
7
|
-
import * as
|
|
6
|
+
import { Injectable, Component, ViewEncapsulation, HostListener, NgModule } from '@angular/core';
|
|
7
|
+
import * as i5 from '@angular/router';
|
|
8
8
|
import { PRIMARY_OUTLET, RouterModule } from '@angular/router';
|
|
9
|
-
import * as
|
|
10
|
-
import { ObjectUtils, ViewerModule,
|
|
11
|
-
import * as
|
|
9
|
+
import * as i2 from '@alfresco/adf-core';
|
|
10
|
+
import { ObjectUtils, ViewerModule, AppConfigPipe } from '@alfresco/adf-core';
|
|
11
|
+
import * as i6 from '@ngrx/store';
|
|
12
12
|
import { Subject, from } from 'rxjs';
|
|
13
|
-
import { takeUntil, debounceTime } from 'rxjs/operators';
|
|
14
|
-
import * as
|
|
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
|
|
16
|
+
import * as i4 from '@alfresco/adf-content-services';
|
|
17
17
|
import { AlfrescoViewerModule } from '@alfresco/adf-content-services';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i3$1 from '@angular/common';
|
|
19
19
|
import { CommonModule } from '@angular/common';
|
|
20
20
|
|
|
21
21
|
/*!
|
|
22
|
-
* Copyright © 2005-
|
|
22
|
+
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
23
23
|
*
|
|
24
24
|
* Alfresco Example Content Application
|
|
25
25
|
*
|
|
@@ -41,30 +41,10 @@ import { CommonModule } from '@angular/common';
|
|
|
41
41
|
* You should have received a copy of the GNU Lesser General Public License
|
|
42
42
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
43
43
|
*/
|
|
44
|
-
class
|
|
45
|
-
constructor(
|
|
46
|
-
this.router = router;
|
|
47
|
-
this.route = route;
|
|
48
|
-
this.store = store;
|
|
49
|
-
this.extensions = extensions;
|
|
50
|
-
this.contentApi = contentApi;
|
|
51
|
-
this.actions$ = actions$;
|
|
44
|
+
class ViewerService {
|
|
45
|
+
constructor(preferences, contentApi) {
|
|
52
46
|
this.preferences = preferences;
|
|
53
|
-
this.
|
|
54
|
-
this.nodesApiService = nodesApiService;
|
|
55
|
-
this.uploadService = uploadService;
|
|
56
|
-
this.appHookService = appHookService;
|
|
57
|
-
this.onDestroy$ = new Subject();
|
|
58
|
-
this.folderId = null;
|
|
59
|
-
this.nodeId = null;
|
|
60
|
-
this.versionId = null;
|
|
61
|
-
this.showRightSide = false;
|
|
62
|
-
this.openWith = [];
|
|
63
|
-
this.toolbarActions = [];
|
|
64
|
-
this.navigateSource = null;
|
|
65
|
-
this.navigateMultiple = true;
|
|
66
|
-
this.routesSkipNavigation = ['shared', 'recent-files', 'favorites'];
|
|
67
|
-
this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
|
|
47
|
+
this.contentApi = contentApi;
|
|
68
48
|
this.recentFileFilters = [
|
|
69
49
|
'TYPE:"content"',
|
|
70
50
|
'-PATH:"//cm:wiki/*"',
|
|
@@ -88,6 +68,211 @@ class AcaViewerComponent {
|
|
|
88
68
|
'-TYPE:"ia:calendarEvent"',
|
|
89
69
|
'-TYPE:"lnk:link"'
|
|
90
70
|
];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves nearest node information for the given node and folder.
|
|
74
|
+
*
|
|
75
|
+
* @param nodeId Unique identifier of the document node
|
|
76
|
+
* @param folderId Unique identifier of the containing folder node.
|
|
77
|
+
* @param source Data source name. Returns file ids for personal-files, libraries, favorites, shared and recent-files, otherwise returns empty.
|
|
78
|
+
*/
|
|
79
|
+
async getNearestNodes(nodeId, folderId, source) {
|
|
80
|
+
const empty = {
|
|
81
|
+
left: null,
|
|
82
|
+
right: null
|
|
83
|
+
};
|
|
84
|
+
if (nodeId && folderId) {
|
|
85
|
+
try {
|
|
86
|
+
const ids = await this.getFileIds(source, folderId);
|
|
87
|
+
const idx = ids.indexOf(nodeId);
|
|
88
|
+
if (idx >= 0) {
|
|
89
|
+
return {
|
|
90
|
+
left: ids[idx - 1] || null,
|
|
91
|
+
right: ids[idx + 1] || null
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch { }
|
|
96
|
+
}
|
|
97
|
+
return empty;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves a list of node identifiers for the folder and data source.
|
|
101
|
+
*
|
|
102
|
+
* @param source Data source name. Returns file ids for personal-files, libraries, favorites, shared and recent-files, otherwise returns empty.
|
|
103
|
+
* @param folderId Optional parameter containing folder node identifier for 'personal-files' and 'libraries' sources.
|
|
104
|
+
*/
|
|
105
|
+
async getFileIds(source, folderId) {
|
|
106
|
+
if (source === 'libraries') {
|
|
107
|
+
source = 'libraries-files';
|
|
108
|
+
}
|
|
109
|
+
const isClient = this.preferences.get(`${source}.sorting.mode`) === 'client';
|
|
110
|
+
const [sortKey, sortDirection, previousSortKey, previousSortDir] = this.getSortKeyDir(source);
|
|
111
|
+
let entries = [];
|
|
112
|
+
let nodes;
|
|
113
|
+
if (source === 'personal-files' || source === 'libraries-files') {
|
|
114
|
+
if (!folderId) {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
const orderBy = isClient ? null : ['isFolder desc', `${sortKey} ${sortDirection}`];
|
|
118
|
+
nodes = await this.contentApi
|
|
119
|
+
.getNodeChildren(folderId, {
|
|
120
|
+
orderBy: orderBy,
|
|
121
|
+
fields: this.getFields(sortKey, previousSortKey),
|
|
122
|
+
where: '(isFile=true)'
|
|
123
|
+
})
|
|
124
|
+
.toPromise();
|
|
125
|
+
}
|
|
126
|
+
if (source === 'favorites') {
|
|
127
|
+
nodes = await this.contentApi
|
|
128
|
+
.getFavorites('-me-', {
|
|
129
|
+
where: '(EXISTS(target/file))',
|
|
130
|
+
fields: ['target']
|
|
131
|
+
})
|
|
132
|
+
.toPromise();
|
|
133
|
+
}
|
|
134
|
+
if (source === 'shared') {
|
|
135
|
+
nodes = await this.contentApi
|
|
136
|
+
.findSharedLinks({
|
|
137
|
+
fields: ['nodeId', this.getRootField(sortKey)]
|
|
138
|
+
})
|
|
139
|
+
.toPromise();
|
|
140
|
+
}
|
|
141
|
+
if (source === 'recent-files') {
|
|
142
|
+
const person = await this.contentApi.getPerson('-me-').toPromise();
|
|
143
|
+
const username = person.entry.id;
|
|
144
|
+
const query = {
|
|
145
|
+
query: {
|
|
146
|
+
query: '*',
|
|
147
|
+
language: 'afts'
|
|
148
|
+
},
|
|
149
|
+
filterQueries: [
|
|
150
|
+
{ query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
|
|
151
|
+
{ query: `cm:modifier:${username} OR cm:creator:${username}` },
|
|
152
|
+
{
|
|
153
|
+
query: this.recentFileFilters.join(' AND ')
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
fields: this.getFields(sortKey, previousSortKey),
|
|
157
|
+
include: ['path', 'properties', 'allowableOperations'],
|
|
158
|
+
sort: [
|
|
159
|
+
{
|
|
160
|
+
type: 'FIELD',
|
|
161
|
+
field: 'cm:modified',
|
|
162
|
+
ascending: false
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
};
|
|
166
|
+
nodes = await this.contentApi.search(query).toPromise();
|
|
167
|
+
}
|
|
168
|
+
entries = nodes.list.entries.map((obj) => obj.entry.target?.file ?? obj.entry);
|
|
169
|
+
if (isClient) {
|
|
170
|
+
if (previousSortKey) {
|
|
171
|
+
this.sort(entries, previousSortKey, previousSortDir);
|
|
172
|
+
}
|
|
173
|
+
this.sort(entries, sortKey, sortDirection);
|
|
174
|
+
}
|
|
175
|
+
return entries.map((entry) => entry.id ?? entry.nodeId);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the root field name from the property path.
|
|
179
|
+
* Example: 'property1.some.child.property' => 'property1'
|
|
180
|
+
*
|
|
181
|
+
* @param path Property path
|
|
182
|
+
*/
|
|
183
|
+
getRootField(path) {
|
|
184
|
+
if (path) {
|
|
185
|
+
return path.split('.')[0];
|
|
186
|
+
}
|
|
187
|
+
return path;
|
|
188
|
+
}
|
|
189
|
+
sort(items, key, direction) {
|
|
190
|
+
const options = {};
|
|
191
|
+
if (key.includes('sizeInBytes') || key === 'name') {
|
|
192
|
+
options.numeric = true;
|
|
193
|
+
}
|
|
194
|
+
items.sort((a, b) => {
|
|
195
|
+
let left = ObjectUtils.getValue(a, key) ?? '';
|
|
196
|
+
left = left instanceof Date ? left.valueOf().toString() : left.toString();
|
|
197
|
+
let right = ObjectUtils.getValue(b, key) ?? '';
|
|
198
|
+
right = right instanceof Date ? right.valueOf().toString() : right.toString();
|
|
199
|
+
return direction === 'asc' ? left.localeCompare(right, undefined, options) : right.localeCompare(left, undefined, options);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
getFields(sortKey, previousSortKey) {
|
|
203
|
+
return ['id', this.getRootField(sortKey), this.getRootField(previousSortKey)];
|
|
204
|
+
}
|
|
205
|
+
getSortKeyDir(source) {
|
|
206
|
+
const previousSortKey = this.preferences.get(`${source}.sorting.previousKey`);
|
|
207
|
+
const previousSortDir = this.preferences.get(`${source}.sorting.previousDirection`);
|
|
208
|
+
const sortKey = this.preferences.get(`${source}.sorting.key`) || this.getDefaults(source)[0];
|
|
209
|
+
const sortDirection = this.preferences.get(`${source}.sorting.direction`) || this.getDefaults(source)[1];
|
|
210
|
+
return [sortKey, sortDirection, previousSortKey, previousSortDir];
|
|
211
|
+
}
|
|
212
|
+
getDefaults(source) {
|
|
213
|
+
if (source === 'personal-files' || source === 'libraries-files') {
|
|
214
|
+
return ['name', 'asc'];
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
return ['modifiedAt', 'desc'];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
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 });
|
|
222
|
+
ViewerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ViewerService, providedIn: 'root' });
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ViewerService, decorators: [{
|
|
224
|
+
type: Injectable,
|
|
225
|
+
args: [{
|
|
226
|
+
providedIn: 'root'
|
|
227
|
+
}]
|
|
228
|
+
}], ctorParameters: function () { return [{ type: i2.UserPreferencesService }, { type: i3.ContentApiService }]; } });
|
|
229
|
+
|
|
230
|
+
/*!
|
|
231
|
+
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
232
|
+
*
|
|
233
|
+
* Alfresco Example Content Application
|
|
234
|
+
*
|
|
235
|
+
* This file is part of the Alfresco Example Content Application.
|
|
236
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
237
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
238
|
+
* provided under the following open source license terms:
|
|
239
|
+
*
|
|
240
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
241
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
242
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
243
|
+
* (at your option) any later version.
|
|
244
|
+
*
|
|
245
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
246
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
247
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
248
|
+
* GNU Lesser General Public License for more details.
|
|
249
|
+
*
|
|
250
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
251
|
+
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
252
|
+
*/
|
|
253
|
+
class AcaViewerComponent {
|
|
254
|
+
constructor(actions$, apiService, appHookService, contentApi, extensions, nodesApiService, route, router, store, uploadService, viewerService) {
|
|
255
|
+
this.actions$ = actions$;
|
|
256
|
+
this.apiService = apiService;
|
|
257
|
+
this.appHookService = appHookService;
|
|
258
|
+
this.contentApi = contentApi;
|
|
259
|
+
this.extensions = extensions;
|
|
260
|
+
this.nodesApiService = nodesApiService;
|
|
261
|
+
this.route = route;
|
|
262
|
+
this.router = router;
|
|
263
|
+
this.store = store;
|
|
264
|
+
this.uploadService = uploadService;
|
|
265
|
+
this.viewerService = viewerService;
|
|
266
|
+
this.onDestroy$ = new Subject();
|
|
267
|
+
this.folderId = null;
|
|
268
|
+
this.navigateMultiple = true;
|
|
269
|
+
this.navigateSource = null;
|
|
270
|
+
this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
|
|
271
|
+
this.nodeId = null;
|
|
272
|
+
this.openWith = [];
|
|
273
|
+
this.showRightSide = false;
|
|
274
|
+
this.toolbarActions = [];
|
|
275
|
+
this.versionId = null;
|
|
91
276
|
this.containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer'];
|
|
92
277
|
}
|
|
93
278
|
get versionsApi() {
|
|
@@ -124,14 +309,14 @@ class AcaViewerComponent {
|
|
|
124
309
|
const { nodeId } = params;
|
|
125
310
|
this.versionId = params.versionId;
|
|
126
311
|
if (this.versionId) {
|
|
127
|
-
this.versionsApi.getVersion(nodeId, this.versionId).then((version) => {
|
|
312
|
+
void this.versionsApi.getVersion(nodeId, this.versionId).then((version) => {
|
|
128
313
|
if (version) {
|
|
129
314
|
this.store.dispatch(new SetCurrentNodeVersionAction(version));
|
|
130
315
|
}
|
|
131
316
|
});
|
|
132
317
|
}
|
|
133
318
|
if (nodeId) {
|
|
134
|
-
this.displayNode(nodeId);
|
|
319
|
+
void this.displayNode(nodeId);
|
|
135
320
|
}
|
|
136
321
|
});
|
|
137
322
|
this.route.queryParams.subscribe((params) => {
|
|
@@ -150,13 +335,14 @@ class AcaViewerComponent {
|
|
|
150
335
|
this.actions$
|
|
151
336
|
.pipe(ofType(ViewerActionTypes.RefreshPreview), takeUntil(this.onDestroy$))
|
|
152
337
|
.subscribe((action) => {
|
|
153
|
-
this.
|
|
338
|
+
this.nodesApiService.nodeUpdated.next(action.node);
|
|
339
|
+
void this.displayNode(action.node.id);
|
|
154
340
|
});
|
|
155
341
|
this.appHookService.nodesDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation());
|
|
156
342
|
this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation());
|
|
157
343
|
this.uploadService.fileUploadComplete.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((file) => {
|
|
158
344
|
this.nodesApiService.nodeUpdated.next(file.data.entry);
|
|
159
|
-
this.displayNode(file.data.entry.id);
|
|
345
|
+
void this.displayNode(file.data.entry.id);
|
|
160
346
|
});
|
|
161
347
|
this.previewLocation = this.router.url.substring(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
|
|
162
348
|
}
|
|
@@ -178,25 +364,23 @@ class AcaViewerComponent {
|
|
|
178
364
|
this.node = await this.contentApi.getNodeInfo(nodeId).toPromise();
|
|
179
365
|
this.store.dispatch(new SetSelectedNodesAction([{ entry: this.node }]));
|
|
180
366
|
this.navigateMultiple = this.extensions.canShowViewerNavigation({ entry: this.node });
|
|
181
|
-
if (!this.navigateMultiple) {
|
|
182
|
-
this.nodeId = this.node.id;
|
|
183
|
-
this.fileName = this.node.name + this.node?.properties?.['cm:versionLabel'];
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
367
|
if (this.node?.isFile) {
|
|
187
|
-
const nearest = await this.getNearestNodes(this.node.id, this.node.parentId);
|
|
188
368
|
this.nodeId = this.node.id;
|
|
189
|
-
this.previousNodeId = nearest.left;
|
|
190
|
-
this.nextNodeId = nearest.right;
|
|
191
369
|
this.fileName = this.node.name + this.node?.properties?.['cm:versionLabel'];
|
|
370
|
+
if (this.navigateMultiple) {
|
|
371
|
+
const nearest = await this.viewerService.getNearestNodes(this.node.id, this.node.parentId, this.navigateSource);
|
|
372
|
+
this.previousNodeId = nearest.left;
|
|
373
|
+
this.nextNodeId = nearest.right;
|
|
374
|
+
}
|
|
192
375
|
return;
|
|
193
376
|
}
|
|
377
|
+
this.navigateToFileLocation();
|
|
194
378
|
}
|
|
195
379
|
catch (error) {
|
|
196
380
|
const statusCode = JSON.parse(error.message).error.statusCode;
|
|
197
381
|
if (statusCode !== 401) {
|
|
198
|
-
this.router.navigate([this.previewLocation, { outlets: { viewer: null } }]).then(() => {
|
|
199
|
-
this.router.navigate([this.previewLocation, nodeId]);
|
|
382
|
+
await this.router.navigate([this.previewLocation, { outlets: { viewer: null } }]).then(() => {
|
|
383
|
+
void this.router.navigate([this.previewLocation, nodeId]);
|
|
200
384
|
});
|
|
201
385
|
}
|
|
202
386
|
}
|
|
@@ -216,157 +400,236 @@ class AcaViewerComponent {
|
|
|
216
400
|
const location = this.getFileLocation();
|
|
217
401
|
this.store.dispatch(new ViewNodeAction(this.nextNodeId, { location }));
|
|
218
402
|
}
|
|
403
|
+
handleKeyboardEvent(event) {
|
|
404
|
+
const key = event.key;
|
|
405
|
+
if (key === 'ArrowRight' || key === 'ArrowLeft') {
|
|
406
|
+
event.preventDefault();
|
|
407
|
+
event.stopImmediatePropagation();
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
navigateToFileLocation() {
|
|
411
|
+
const location = this.getFileLocation();
|
|
412
|
+
void this.router.navigateByUrl(location);
|
|
413
|
+
}
|
|
414
|
+
getFileLocation() {
|
|
415
|
+
return this.navigationPath || this.router.parseUrl(this.router.url).root.children[PRIMARY_OUTLET].toString();
|
|
416
|
+
}
|
|
417
|
+
shouldNavigate(element) {
|
|
418
|
+
let currentElement = element.parentElement;
|
|
419
|
+
while (currentElement && !this.isChild(currentElement.classList)) {
|
|
420
|
+
currentElement = currentElement.parentElement;
|
|
421
|
+
}
|
|
422
|
+
return !!currentElement;
|
|
423
|
+
}
|
|
424
|
+
isChild(list) {
|
|
425
|
+
return Array.from(list).some((className) => this.containersSkipNavigation.includes(className));
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
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 });
|
|
429
|
+
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 });
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerComponent, decorators: [{
|
|
431
|
+
type: Component,
|
|
432
|
+
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"] }]
|
|
433
|
+
}], 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: [{
|
|
434
|
+
type: HostListener,
|
|
435
|
+
args: ['document:keydown', ['$event']]
|
|
436
|
+
}] } });
|
|
437
|
+
|
|
438
|
+
/*!
|
|
439
|
+
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
440
|
+
*
|
|
441
|
+
* Alfresco Example Content Application
|
|
442
|
+
*
|
|
443
|
+
* This file is part of the Alfresco Example Content Application.
|
|
444
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
445
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
446
|
+
* provided under the following open source license terms:
|
|
447
|
+
*
|
|
448
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
449
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
450
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
451
|
+
* (at your option) any later version.
|
|
452
|
+
*
|
|
453
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
454
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
455
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
456
|
+
* GNU Lesser General Public License for more details.
|
|
457
|
+
*
|
|
458
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
459
|
+
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
460
|
+
*/
|
|
461
|
+
class PreviewComponent extends PageComponent {
|
|
462
|
+
constructor(actions$, appHookService, contentApi, location, nodesApiService, route, viewerService) {
|
|
463
|
+
super();
|
|
464
|
+
this.actions$ = actions$;
|
|
465
|
+
this.appHookService = appHookService;
|
|
466
|
+
this.contentApi = contentApi;
|
|
467
|
+
this.location = location;
|
|
468
|
+
this.nodesApiService = nodesApiService;
|
|
469
|
+
this.route = route;
|
|
470
|
+
this.viewerService = viewerService;
|
|
471
|
+
this.folderId = null;
|
|
472
|
+
this.navigateBackAsClose = false;
|
|
473
|
+
this.navigateMultiple = false;
|
|
474
|
+
this.navigateSource = null;
|
|
475
|
+
this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
|
|
476
|
+
this.nodeId = null;
|
|
477
|
+
this.openWith = [];
|
|
478
|
+
this.previewLocation = null;
|
|
479
|
+
this.routesSkipNavigation = ['favorites', 'recent-files', 'shared'];
|
|
480
|
+
this.showRightSide = false;
|
|
481
|
+
this.simplestMode = false;
|
|
482
|
+
this.containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer'];
|
|
483
|
+
}
|
|
484
|
+
ngOnInit() {
|
|
485
|
+
super.ngOnInit();
|
|
486
|
+
from(this.infoDrawerOpened$)
|
|
487
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
488
|
+
.subscribe((val) => {
|
|
489
|
+
this.showRightSide = val;
|
|
490
|
+
});
|
|
491
|
+
this.previewLocation = this.router.url.substr(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
|
|
492
|
+
const routeData = this.route.snapshot.data;
|
|
493
|
+
this.navigateBackAsClose = !!routeData.navigateBackAsClose;
|
|
494
|
+
this.simplestMode = !!routeData.simplestMode;
|
|
495
|
+
if (routeData.navigateMultiple) {
|
|
496
|
+
this.navigateMultiple = true;
|
|
497
|
+
}
|
|
498
|
+
if (routeData.navigateSource) {
|
|
499
|
+
const source = routeData.navigateSource.toLowerCase();
|
|
500
|
+
if (this.navigationSources.includes(source)) {
|
|
501
|
+
this.navigateSource = routeData.navigateSource;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
this.route.params.subscribe((params) => {
|
|
505
|
+
this.folderId = params.folderId;
|
|
506
|
+
const id = params.nodeId;
|
|
507
|
+
if (id) {
|
|
508
|
+
void this.displayNode(id);
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
this.subscriptions = this.subscriptions.concat([
|
|
512
|
+
this.appHookService.nodesDeleted.subscribe(() => this.navigateToFileLocation(true)),
|
|
513
|
+
this.uploadService.fileUploadDeleted.subscribe(() => this.navigateToFileLocation(true)),
|
|
514
|
+
this.uploadService.fileUploadComplete.pipe(debounceTime(300)).subscribe((file) => this.nodesApiService.nodeUpdated.next(file.data.entry)),
|
|
515
|
+
this.actions$
|
|
516
|
+
.pipe(ofType(ViewerActionTypes.ClosePreview), map(() => this.navigateToFileLocation(true)))
|
|
517
|
+
.subscribe(() => { })
|
|
518
|
+
]);
|
|
519
|
+
this.extensions
|
|
520
|
+
.getOpenWithActions()
|
|
521
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
522
|
+
.subscribe((actions) => {
|
|
523
|
+
this.openWith = actions;
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
ngOnDestroy() {
|
|
527
|
+
super.ngOnDestroy();
|
|
528
|
+
}
|
|
219
529
|
/**
|
|
220
|
-
*
|
|
530
|
+
* Loads the particular node into the Viewer
|
|
221
531
|
*
|
|
222
|
-
* @param
|
|
223
|
-
* @param folderId Unique identifier of the containing folder node.
|
|
532
|
+
* @param id Unique identifier for the Node to display
|
|
224
533
|
*/
|
|
225
|
-
async
|
|
226
|
-
|
|
227
|
-
left: null,
|
|
228
|
-
right: null
|
|
229
|
-
};
|
|
230
|
-
if (nodeId && folderId) {
|
|
534
|
+
async displayNode(id) {
|
|
535
|
+
if (id) {
|
|
231
536
|
try {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
return
|
|
537
|
+
this.node = await this.contentApi.getNodeInfo(id).toPromise();
|
|
538
|
+
this.store.dispatch(new SetSelectedNodesAction([{ entry: this.node }]));
|
|
539
|
+
if (this.node?.isFile) {
|
|
540
|
+
this.nodeId = this.node.id;
|
|
541
|
+
if (this.navigateMultiple) {
|
|
542
|
+
const nearest = await this.viewerService.getNearestNodes(this.node.id, this.node.parentId, this.navigateSource);
|
|
543
|
+
this.previousNodeId = nearest.left;
|
|
544
|
+
this.nextNodeId = nearest.right;
|
|
545
|
+
}
|
|
546
|
+
return;
|
|
242
547
|
}
|
|
548
|
+
await this.router.navigate([this.previewLocation, id]);
|
|
243
549
|
}
|
|
244
|
-
catch {
|
|
245
|
-
|
|
550
|
+
catch (err) {
|
|
551
|
+
if (!err || err.status !== 401) {
|
|
552
|
+
await this.router.navigate([this.previewLocation, id]);
|
|
553
|
+
}
|
|
246
554
|
}
|
|
247
555
|
}
|
|
248
|
-
|
|
249
|
-
|
|
556
|
+
}
|
|
557
|
+
handleKeyboardEvent(event) {
|
|
558
|
+
const key = event.key;
|
|
559
|
+
if (key === 'ArrowRight' || key === 'ArrowLeft') {
|
|
560
|
+
event.preventDefault();
|
|
561
|
+
event.stopImmediatePropagation();
|
|
250
562
|
}
|
|
251
563
|
}
|
|
252
564
|
/**
|
|
253
|
-
*
|
|
565
|
+
* Handles the visibility change of the Viewer component.
|
|
254
566
|
*
|
|
255
|
-
* @param
|
|
256
|
-
* @param folderId Containing folder node identifier for 'personal-files' and 'libraries' sources.
|
|
567
|
+
* @param isVisible Indicator whether Viewer is visible or hidden.
|
|
257
568
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
569
|
+
onVisibilityChanged(isVisible) {
|
|
570
|
+
const shouldNavigate = !isVisible;
|
|
571
|
+
this.navigateToFileLocation(shouldNavigate);
|
|
572
|
+
}
|
|
573
|
+
navigateToFileLocation(shouldNavigate) {
|
|
574
|
+
if (shouldNavigate) {
|
|
575
|
+
if (this.navigateBackAsClose) {
|
|
576
|
+
this.location.back();
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
const shouldSkipNavigation = this.routesSkipNavigation.includes(this.previewLocation);
|
|
580
|
+
const route = this.getNavigationCommands(this.previewLocation);
|
|
581
|
+
if (!shouldSkipNavigation && this.folderId) {
|
|
582
|
+
route.push(this.folderId);
|
|
583
|
+
}
|
|
584
|
+
void this.router.navigate(route);
|
|
585
|
+
}
|
|
272
586
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
})
|
|
279
|
-
.toPromise();
|
|
280
|
-
const sortKey = this.preferences.get('favorites.sorting.key') || 'modifiedAt';
|
|
281
|
-
const sortDirection = this.preferences.get('favorites.sorting.direction') || 'desc';
|
|
282
|
-
const files = nodes.list.entries.map((obj) => obj.entry.target.file);
|
|
283
|
-
this.sort(files, sortKey, sortDirection);
|
|
284
|
-
return files.map((f) => f.id);
|
|
587
|
+
}
|
|
588
|
+
/** Handles navigation to a previous document */
|
|
589
|
+
onNavigateBefore(event) {
|
|
590
|
+
if (event.type !== 'click' && this.shouldNavigate(event.target)) {
|
|
591
|
+
return;
|
|
285
592
|
}
|
|
286
|
-
if (
|
|
287
|
-
|
|
288
|
-
const sortingDirection = this.preferences.get('shared.sorting.direction') || 'desc';
|
|
289
|
-
const nodes = await this.contentApi
|
|
290
|
-
.findSharedLinks({
|
|
291
|
-
fields: ['nodeId', this.getRootField(sortingKey)]
|
|
292
|
-
})
|
|
293
|
-
.toPromise();
|
|
294
|
-
const entries = nodes.list.entries.map((obj) => obj.entry);
|
|
295
|
-
this.sort(entries, sortingKey, sortingDirection);
|
|
296
|
-
return entries.map((obj) => obj.nodeId);
|
|
593
|
+
if (this.previousNodeId) {
|
|
594
|
+
void this.router.navigate(this.getPreviewPath(this.folderId, this.previousNodeId));
|
|
297
595
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
language: 'afts'
|
|
307
|
-
},
|
|
308
|
-
filterQueries: [
|
|
309
|
-
{ query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
|
|
310
|
-
{ query: `cm:modifier:${username} OR cm:creator:${username}` },
|
|
311
|
-
{
|
|
312
|
-
query: this.recentFileFilters.join(' AND ')
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
fields: ['id', this.getRootField(sortingKey)],
|
|
316
|
-
include: ['path', 'properties', 'allowableOperations'],
|
|
317
|
-
sort: [
|
|
318
|
-
{
|
|
319
|
-
type: 'FIELD',
|
|
320
|
-
field: 'cm:modified',
|
|
321
|
-
ascending: false
|
|
322
|
-
}
|
|
323
|
-
]
|
|
324
|
-
};
|
|
325
|
-
const nodes = await this.contentApi.search(query).toPromise();
|
|
326
|
-
const entries = nodes.list.entries.map((obj) => obj.entry);
|
|
327
|
-
this.sort(entries, sortingKey, sortingDirection);
|
|
328
|
-
return entries.map((obj) => obj.id);
|
|
596
|
+
}
|
|
597
|
+
/** Handles navigation to a next document */
|
|
598
|
+
onNavigateNext(event) {
|
|
599
|
+
if (event.type !== 'click' && this.shouldNavigate(event.target)) {
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
if (this.nextNodeId) {
|
|
603
|
+
void this.router.navigate(this.getPreviewPath(this.folderId, this.nextNodeId));
|
|
329
604
|
}
|
|
330
|
-
return [];
|
|
331
605
|
}
|
|
332
606
|
/**
|
|
333
|
-
*
|
|
334
|
-
* Example: 'property1.some.child.property' => 'property1'
|
|
607
|
+
* Generates a node preview route based on folder and node IDs.
|
|
335
608
|
*
|
|
336
|
-
* @param
|
|
609
|
+
* @param folderId Folder ID
|
|
610
|
+
* @param nodeId Node ID
|
|
337
611
|
*/
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
612
|
+
getPreviewPath(folderId, nodeId) {
|
|
613
|
+
const route = [this.previewLocation];
|
|
614
|
+
if (folderId) {
|
|
615
|
+
route.push(folderId);
|
|
341
616
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
handleKeyboardEvent(event) {
|
|
345
|
-
const key = event.key;
|
|
346
|
-
if (key === 'ArrowRight' || key === 'ArrowLeft') {
|
|
347
|
-
event.preventDefault();
|
|
348
|
-
event.stopImmediatePropagation();
|
|
617
|
+
if (nodeId) {
|
|
618
|
+
route.push('preview', nodeId);
|
|
349
619
|
}
|
|
620
|
+
return route;
|
|
350
621
|
}
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
|
|
622
|
+
getNavigationCommands(url) {
|
|
623
|
+
const urlTree = this.router.parseUrl(url);
|
|
624
|
+
const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
|
|
625
|
+
if (!urlSegmentGroup) {
|
|
626
|
+
return [url];
|
|
355
627
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
return direction === 'asc' ? left.localeCompare(right, undefined, options) : right.localeCompare(left, undefined, options);
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
navigateToFileLocation() {
|
|
365
|
-
const location = this.getFileLocation();
|
|
366
|
-
this.router.navigateByUrl(location);
|
|
367
|
-
}
|
|
368
|
-
getFileLocation() {
|
|
369
|
-
return this.navigationPath || this.router.parseUrl(this.router.url).root.children[PRIMARY_OUTLET].toString();
|
|
628
|
+
const urlSegments = urlSegmentGroup.segments;
|
|
629
|
+
return urlSegments.reduce(function (acc, item) {
|
|
630
|
+
acc.push(item.path, item.parameters);
|
|
631
|
+
return acc;
|
|
632
|
+
}, []);
|
|
370
633
|
}
|
|
371
634
|
shouldNavigate(element) {
|
|
372
635
|
let currentElement = element.parentElement;
|
|
@@ -379,18 +642,18 @@ class AcaViewerComponent {
|
|
|
379
642
|
return Array.from(list).some((className) => this.containersSkipNavigation.includes(className));
|
|
380
643
|
}
|
|
381
644
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type:
|
|
645
|
+
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 });
|
|
646
|
+
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 });
|
|
647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewComponent, decorators: [{
|
|
385
648
|
type: Component,
|
|
386
|
-
args: [{ standalone: true, imports: [CommonModule, ViewerModule, AlfrescoViewerModule, InfoDrawerComponent,
|
|
387
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
649
|
+
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"] }]
|
|
650
|
+
}], 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: [{
|
|
388
651
|
type: HostListener,
|
|
389
652
|
args: ['document:keydown', ['$event']]
|
|
390
653
|
}] } });
|
|
391
654
|
|
|
392
655
|
/*!
|
|
393
|
-
* Copyright © 2005-
|
|
656
|
+
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
394
657
|
*
|
|
395
658
|
* Alfresco Example Content Application
|
|
396
659
|
*
|
|
@@ -425,18 +688,18 @@ const routes = [
|
|
|
425
688
|
class AcaViewerModule {
|
|
426
689
|
}
|
|
427
690
|
AcaViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
428
|
-
AcaViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [
|
|
429
|
-
AcaViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [RouterModule.forChild(routes), AcaViewerComponent] });
|
|
691
|
+
AcaViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [i5.RouterModule, AcaViewerComponent, PreviewComponent], exports: [AcaViewerComponent, PreviewComponent] });
|
|
692
|
+
AcaViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, imports: [RouterModule.forChild(routes), AcaViewerComponent, PreviewComponent] });
|
|
430
693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaViewerModule, decorators: [{
|
|
431
694
|
type: NgModule,
|
|
432
695
|
args: [{
|
|
433
|
-
imports: [RouterModule.forChild(routes), AcaViewerComponent],
|
|
434
|
-
exports: [AcaViewerComponent]
|
|
696
|
+
imports: [RouterModule.forChild(routes), AcaViewerComponent, PreviewComponent],
|
|
697
|
+
exports: [AcaViewerComponent, PreviewComponent]
|
|
435
698
|
}]
|
|
436
699
|
}] });
|
|
437
700
|
|
|
438
701
|
/*!
|
|
439
|
-
* Copyright © 2005-
|
|
702
|
+
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
440
703
|
*
|
|
441
704
|
* Alfresco Example Content Application
|
|
442
705
|
*
|
|
@@ -463,5 +726,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
463
726
|
* Generated bundle index. Do not edit.
|
|
464
727
|
*/
|
|
465
728
|
|
|
466
|
-
export { AcaViewerComponent, AcaViewerModule };
|
|
729
|
+
export { AcaViewerComponent, AcaViewerModule, PreviewComponent };
|
|
467
730
|
//# sourceMappingURL=alfresco-aca-content-viewer.mjs.map
|