@alfresco/aca-content 4.0.0-A.2-9984
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/README.md +24 -0
- package/assets/app.extensions.json +2496 -0
- package/assets/i18n/ar.json +634 -0
- package/assets/i18n/cs.json +634 -0
- package/assets/i18n/da.json +634 -0
- package/assets/i18n/de.json +634 -0
- package/assets/i18n/en.json +634 -0
- package/assets/i18n/es.json +634 -0
- package/assets/i18n/fi.json +634 -0
- package/assets/i18n/fr.json +634 -0
- package/assets/i18n/it.json +634 -0
- package/assets/i18n/ja.json +634 -0
- package/assets/i18n/nb.json +634 -0
- package/assets/i18n/nl.json +634 -0
- package/assets/i18n/pl.json +634 -0
- package/assets/i18n/pt-BR.json +634 -0
- package/assets/i18n/ru.json +634 -0
- package/assets/i18n/sv.json +634 -0
- package/assets/i18n/zh-CN.json +634 -0
- package/assets/images/Wallpaper-BG-generic.svg +39 -0
- package/assets/images/adf-move-file-24px.svg +1 -0
- package/assets/images/baseline-library_books-24px.svg +2 -0
- package/assets/images/baseline-lock-24px.svg +1 -0
- package/assets/images/join-library.svg +32 -0
- package/assets/images/mastHead-bg-shapesPattern.svg +53 -0
- package/esm2020/alfresco-aca-content.mjs +5 -0
- package/esm2020/lib/aca-content.module.mjs +364 -0
- package/esm2020/lib/aca-content.routes.mjs +582 -0
- package/esm2020/lib/components/common/common.module.mjs +49 -0
- package/esm2020/lib/components/common/language-picker/language-picker.component.mjs +58 -0
- package/esm2020/lib/components/common/location-link/location-link.component.mjs +178 -0
- package/esm2020/lib/components/common/logout/logout.component.mjs +61 -0
- package/esm2020/lib/components/common/toggle-shared/toggle-shared.component.mjs +66 -0
- package/esm2020/lib/components/context-menu/context-menu-item.component.mjs +59 -0
- package/esm2020/lib/components/context-menu/context-menu-outside-event.directive.mjs +66 -0
- package/esm2020/lib/components/context-menu/context-menu-overlay.mjs +33 -0
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +103 -0
- package/esm2020/lib/components/context-menu/context-menu.module.mjs +77 -0
- package/esm2020/lib/components/context-menu/context-menu.service.mjs +104 -0
- package/esm2020/lib/components/context-menu/direction.token.mjs +30 -0
- package/esm2020/lib/components/context-menu/interfaces.mjs +26 -0
- package/esm2020/lib/components/create-menu/create-menu.component.mjs +74 -0
- package/esm2020/lib/components/create-menu/create-menu.module.mjs +45 -0
- package/esm2020/lib/components/details/details.component.mjs +100 -0
- package/esm2020/lib/components/dl-custom-components/document-list-custom-components.module.mjs +49 -0
- package/esm2020/lib/components/dl-custom-components/name-column/name-column.component.mjs +93 -0
- package/esm2020/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.mjs +52 -0
- package/esm2020/lib/components/favorite-libraries/favorite-libraries.component.mjs +114 -0
- package/esm2020/lib/components/favorites/favorites.component.mjs +99 -0
- package/esm2020/lib/components/files/files.component.mjs +312 -0
- package/esm2020/lib/components/header/header.component.mjs +98 -0
- package/esm2020/lib/components/header/header.module.mjs +46 -0
- package/esm2020/lib/components/home/home.component.mjs +50 -0
- package/esm2020/lib/components/info-drawer/comments-tab/comments-tab.component.mjs +57 -0
- package/esm2020/lib/components/info-drawer/info.drawer.module.mjs +93 -0
- package/esm2020/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.mjs +144 -0
- package/esm2020/lib/components/info-drawer/library-metadata-tab/library-metadata-tab.component.mjs +43 -0
- package/esm2020/lib/components/info-drawer/metadata-tab/metadata-tab.component.mjs +89 -0
- package/esm2020/lib/components/info-drawer/versions-tab/versions-tab.component.mjs +96 -0
- package/esm2020/lib/components/layout/app-layout/app-layout.component.mjs +147 -0
- package/esm2020/lib/components/layout/layout.module.mjs +75 -0
- package/esm2020/lib/components/libraries/libraries.component.mjs +71 -0
- package/esm2020/lib/components/main-action/main-action.component.mjs +60 -0
- package/esm2020/lib/components/main-action/main-action.module.mjs +46 -0
- package/esm2020/lib/components/node-version/node-version-form.component.mjs +71 -0
- package/esm2020/lib/components/node-version/node-version.module.mjs +79 -0
- package/esm2020/lib/components/recent-files/recent-files.component.mjs +82 -0
- package/esm2020/lib/components/search/search-action-menu/search-action-menu.component.mjs +60 -0
- package/esm2020/lib/components/search/search-input/search-input.component.mjs +263 -0
- package/esm2020/lib/components/search/search-input-control/search-input-control.component.mjs +88 -0
- package/esm2020/lib/components/search/search-input.module.mjs +48 -0
- package/esm2020/lib/components/search/search-libraries-results/search-libraries-query-builder.service.mjs +92 -0
- package/esm2020/lib/components/search/search-libraries-results/search-libraries-results.component.mjs +140 -0
- package/esm2020/lib/components/search/search-results/search-results.component.mjs +218 -0
- package/esm2020/lib/components/search/search-results-row/search-results-row.component.mjs +94 -0
- package/esm2020/lib/components/search/search-results.module.mjs +86 -0
- package/esm2020/lib/components/shared-files/shared-files.component.mjs +79 -0
- package/esm2020/lib/components/shared-link-view/shared-link-view.component.mjs +81 -0
- package/esm2020/lib/components/shared-link-view/shared-link-view.module.mjs +66 -0
- package/esm2020/lib/components/sidenav/components/button-menu.component.mjs +58 -0
- package/esm2020/lib/components/sidenav/components/expand-menu.component.mjs +54 -0
- package/esm2020/lib/components/sidenav/directives/action.directive.mjs +75 -0
- package/esm2020/lib/components/sidenav/directives/active-link.directive.mjs +93 -0
- package/esm2020/lib/components/sidenav/directives/expansion-panel.directive.mjs +102 -0
- package/esm2020/lib/components/sidenav/directives/menu-panel.directive.mjs +99 -0
- package/esm2020/lib/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.mjs +45 -0
- package/esm2020/lib/components/sidenav/sidenav.component.mjs +76 -0
- package/esm2020/lib/components/sidenav/sidenav.module.mjs +104 -0
- package/esm2020/lib/components/toolbar/document-display-mode/document-display-mode.component.mjs +85 -0
- package/esm2020/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.mjs +151 -0
- package/esm2020/lib/components/toolbar/toggle-favorite/toggle-favorite.component.mjs +80 -0
- package/esm2020/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.mjs +102 -0
- package/esm2020/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.mjs +76 -0
- package/esm2020/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.mjs +99 -0
- package/esm2020/lib/components/toolbar/toggle-join-library/toggle-join-library-menu.component.mjs +81 -0
- package/esm2020/lib/components/toolbar/toolbar.module.mjs +89 -0
- package/esm2020/lib/components/toolbar/view-node/view-node.component.mjs +102 -0
- package/esm2020/lib/components/trashcan/trashcan.component.mjs +64 -0
- package/esm2020/lib/components/trashcan/trashcan.module.mjs +71 -0
- package/esm2020/lib/components/upload-files-dialog/upload-files-dialog.component.mjs +34 -0
- package/esm2020/lib/components/view-profile/view-profile.component.mjs +158 -0
- package/esm2020/lib/components/view-profile/view-profile.guard.mjs +31 -0
- package/esm2020/lib/components/view-profile/view-profile.module.mjs +43 -0
- package/esm2020/lib/dialogs/node-template/create-from-template.dialog.mjs +120 -0
- package/esm2020/lib/directives/directives.module.mjs +43 -0
- package/esm2020/lib/directives/document-list.directive.mjs +142 -0
- package/esm2020/lib/extensions/core.extensions.module.mjs +66 -0
- package/esm2020/lib/material.module.mjs +58 -0
- package/esm2020/lib/services/content-management.service.mjs +871 -0
- package/esm2020/lib/services/content-service-extension.service.mjs +47 -0
- package/esm2020/lib/services/content-url.service.mjs +73 -0
- package/esm2020/lib/services/node-actions.service.mjs +601 -0
- package/esm2020/lib/services/node-template.service.mjs +150 -0
- package/esm2020/lib/store/app-store.module.mjs +96 -0
- package/esm2020/lib/store/effects/app.effects.mjs +62 -0
- package/esm2020/lib/store/effects/contextmenu.effects.mjs +56 -0
- package/esm2020/lib/store/effects/download.effects.mjs +160 -0
- package/esm2020/lib/store/effects/favorite.effects.mjs +77 -0
- package/esm2020/lib/store/effects/library.effects.mjs +112 -0
- package/esm2020/lib/store/effects/node.effects.mjs +310 -0
- package/esm2020/lib/store/effects/search.effects.mjs +55 -0
- package/esm2020/lib/store/effects/template.effects.mjs +122 -0
- package/esm2020/lib/store/effects/upload.effects.mjs +169 -0
- package/esm2020/lib/store/effects/viewer.effects.mjs +176 -0
- package/esm2020/lib/store/effects.mjs +36 -0
- package/esm2020/lib/store/initial-state.mjs +66 -0
- package/esm2020/lib/store/reducers/app.reducer.mjs +218 -0
- package/esm2020/public-api.mjs +9 -0
- package/fesm2015/alfresco-aca-content.mjs +9937 -0
- package/fesm2015/alfresco-aca-content.mjs.map +1 -0
- package/fesm2020/alfresco-aca-content.mjs +10103 -0
- package/fesm2020/alfresco-aca-content.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/aca-content.module.d.ts +49 -0
- package/lib/aca-content.routes.d.ts +28 -0
- package/lib/components/common/common.module.d.ts +14 -0
- package/lib/components/common/language-picker/language-picker.component.d.ts +5 -0
- package/lib/components/common/location-link/location-link.component.d.ts +49 -0
- package/lib/components/common/logout/logout.component.d.ts +10 -0
- package/lib/components/common/toggle-shared/toggle-shared.component.d.ts +44 -0
- package/lib/components/context-menu/context-menu-item.component.d.ts +13 -0
- package/lib/components/context-menu/context-menu-outside-event.directive.d.ts +36 -0
- package/lib/components/context-menu/context-menu-overlay.d.ts +30 -0
- package/lib/components/context-menu/context-menu.component.d.ts +49 -0
- package/lib/components/context-menu/context-menu.module.d.ts +18 -0
- package/lib/components/context-menu/context-menu.service.d.ts +44 -0
- package/lib/components/context-menu/direction.token.d.ts +26 -0
- package/lib/components/context-menu/interfaces.d.ts +31 -0
- package/lib/components/create-menu/create-menu.component.d.ts +43 -0
- package/lib/components/create-menu/create-menu.module.d.ts +10 -0
- package/lib/components/details/details.component.d.ts +47 -0
- package/lib/components/dl-custom-components/document-list-custom-components.module.d.ts +13 -0
- package/lib/components/dl-custom-components/name-column/name-column.component.d.ts +43 -0
- package/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.d.ts +17 -0
- package/lib/components/favorite-libraries/favorite-libraries.component.d.ts +55 -0
- package/lib/components/favorites/favorites.component.d.ts +50 -0
- package/lib/components/files/files.component.d.ts +80 -0
- package/lib/components/header/header.component.d.ts +59 -0
- package/lib/components/header/header.module.d.ts +11 -0
- package/lib/components/home/home.component.d.ts +37 -0
- package/lib/components/info-drawer/comments-tab/comments-tab.component.d.ts +11 -0
- package/lib/components/info-drawer/info.drawer.module.d.ts +19 -0
- package/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.d.ts +65 -0
- package/lib/components/info-drawer/library-metadata-tab/library-metadata-tab.component.d.ts +7 -0
- package/lib/components/info-drawer/metadata-tab/metadata-tab.component.d.ts +50 -0
- package/lib/components/info-drawer/versions-tab/versions-tab.component.d.ts +36 -0
- package/lib/components/layout/app-layout/app-layout.component.d.ts +63 -0
- package/lib/components/layout/layout.module.d.ts +16 -0
- package/lib/components/libraries/libraries.component.d.ts +45 -0
- package/lib/components/main-action/main-action.component.d.ts +42 -0
- package/lib/components/main-action/main-action.module.d.ts +11 -0
- package/lib/components/node-version/node-version-form.component.d.ts +47 -0
- package/lib/components/node-version/node-version.module.d.ts +16 -0
- package/lib/components/recent-files/recent-files.component.d.ts +49 -0
- package/lib/components/search/search-action-menu/search-action-menu.component.d.ts +39 -0
- package/lib/components/search/search-input/search-input.component.d.ts +82 -0
- package/lib/components/search/search-input-control/search-input-control.component.d.ts +51 -0
- package/lib/components/search/search-input.module.d.ts +12 -0
- package/lib/components/search/search-libraries-results/search-libraries-query-builder.service.d.ts +57 -0
- package/lib/components/search/search-libraries-results/search-libraries-results.component.d.ts +58 -0
- package/lib/components/search/search-results/search-results.component.d.ts +70 -0
- package/lib/components/search/search-results-row/search-results-row.component.d.ts +49 -0
- package/lib/components/search/search-results.module.d.ts +21 -0
- package/lib/components/shared-files/shared-files.component.d.ts +48 -0
- package/lib/components/shared-link-view/shared-link-view.component.d.ts +48 -0
- package/lib/components/shared-link-view/shared-link-view.module.d.ts +14 -0
- package/lib/components/sidenav/components/button-menu.component.d.ts +38 -0
- package/lib/components/sidenav/components/expand-menu.component.d.ts +36 -0
- package/lib/components/sidenav/directives/action.directive.d.ts +14 -0
- package/lib/components/sidenav/directives/active-link.directive.d.ts +46 -0
- package/lib/components/sidenav/directives/expansion-panel.directive.d.ts +45 -0
- package/lib/components/sidenav/directives/menu-panel.directive.d.ts +43 -0
- package/lib/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.d.ts +12 -0
- package/lib/components/sidenav/sidenav.component.d.ts +44 -0
- package/lib/components/sidenav/sidenav.module.d.ts +21 -0
- package/lib/components/toolbar/document-display-mode/document-display-mode.component.d.ts +13 -0
- package/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.d.ts +48 -0
- package/lib/components/toolbar/toggle-favorite/toggle-favorite.component.d.ts +43 -0
- package/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.d.ts +43 -0
- package/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.d.ts +11 -0
- package/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.d.ts +42 -0
- package/lib/components/toolbar/toggle-join-library/toggle-join-library-menu.component.d.ts +10 -0
- package/lib/components/toolbar/toolbar.module.d.ts +20 -0
- package/lib/components/toolbar/view-node/view-node.component.d.ts +17 -0
- package/lib/components/trashcan/trashcan.component.d.ts +43 -0
- package/lib/components/trashcan/trashcan.module.d.ts +15 -0
- package/lib/components/upload-files-dialog/upload-files-dialog.component.d.ts +14 -0
- package/lib/components/view-profile/view-profile.component.d.ts +36 -0
- package/lib/components/view-profile/view-profile.guard.d.ts +12 -0
- package/lib/components/view-profile/view-profile.module.d.ts +9 -0
- package/lib/dialogs/node-template/create-from-template.dialog.d.ts +50 -0
- package/lib/directives/directives.module.d.ts +9 -0
- package/lib/directives/document-list.directive.d.ts +57 -0
- package/lib/extensions/core.extensions.module.d.ts +14 -0
- package/lib/material.module.d.ts +14 -0
- package/lib/services/content-management.service.d.ts +101 -0
- package/lib/services/content-service-extension.service.d.ts +11 -0
- package/lib/services/content-url.service.d.ts +17 -0
- package/lib/services/node-actions.service.d.ts +93 -0
- package/lib/services/node-template.service.d.ts +34 -0
- package/lib/store/app-store.module.d.ts +10 -0
- package/lib/store/effects/app.effects.d.ts +42 -0
- package/lib/store/effects/contextmenu.effects.d.ts +12 -0
- package/lib/store/effects/download.effects.d.ts +50 -0
- package/lib/store/effects/favorite.effects.d.ts +39 -0
- package/lib/store/effects/library.effects.d.ts +44 -0
- package/lib/store/effects/node.effects.d.ts +57 -0
- package/lib/store/effects/search.effects.d.ts +35 -0
- package/lib/store/effects/template.effects.d.ts +55 -0
- package/lib/store/effects/upload.effects.d.ts +53 -0
- package/lib/store/effects/viewer.effects.d.ts +56 -0
- package/lib/store/effects.d.ts +35 -0
- package/lib/store/initial-state.d.ts +27 -0
- package/lib/store/reducers/app.reducer.d.ts +27 -0
- package/package.json +34 -0
- package/public-api.d.ts +5 -0
- package/ui/application.scss +49 -0
- package/ui/colors.scss +98 -0
- package/ui/custom-theme.scss +28 -0
- package/ui/dynamic-theme/custom-background-color.scss +16 -0
- package/ui/dynamic-theme/custom-palette-creator.scss +138 -0
- package/ui/dynamic-theme/custom-text-color.scss +8 -0
- package/ui/dynamic-theme/custom-theme-palettes.scss +29 -0
- package/ui/dynamic-theme/custom-theme.scss.tpl +60 -0
- package/ui/dynamic-theme/index.scss +1 -0
- package/ui/dynamic-theme/theme-configuration.scss.tpl +14 -0
- package/ui/dynamic-theme/typography.scss +63 -0
- package/ui/mixins.scss +26 -0
- package/ui/overrides/adf-about.theme.scss +39 -0
- package/ui/overrides/adf-pagination.theme.scss +47 -0
- package/ui/overrides/adf-style-fixes.theme.scss +18 -0
- package/ui/overrides/ay11.scss +204 -0
- package/ui/theme.scss +57 -0
- package/ui/variables/font-family.scss +1 -0
- package/ui/variables/variables.scss +83 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2005 - 2021 Alfresco Software, Ltd. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
|
5
|
+
* pursuant to a written agreement and any use of this program without such an
|
|
6
|
+
* agreement is prohibited.
|
|
7
|
+
*/
|
|
8
|
+
import { Injectable } from '@angular/core';
|
|
9
|
+
import { AppConfigService } from '@alfresco/adf-core';
|
|
10
|
+
import { take } from 'rxjs/operators';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
import * as i1 from "@alfresco/adf-core";
|
|
13
|
+
export class ContentServiceExtensionService {
|
|
14
|
+
constructor(appConfigService) {
|
|
15
|
+
this.appConfigService = appConfigService;
|
|
16
|
+
this.updateContentServiceAvailability();
|
|
17
|
+
}
|
|
18
|
+
updateContentServiceAvailability() {
|
|
19
|
+
this.appConfigService.onLoad.pipe(take(1)).subscribe((config) => {
|
|
20
|
+
if (config.plugins && config.plugins.contentService === false) {
|
|
21
|
+
this.disableContentServices();
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.enableContentServices();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
disableContentServices() {
|
|
29
|
+
if (localStorage) {
|
|
30
|
+
localStorage.setItem('contentService', 'false');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
enableContentServices() {
|
|
34
|
+
if (localStorage && localStorage.getItem('contentService') === 'false') {
|
|
35
|
+
localStorage.setItem('contentService', 'true');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
ContentServiceExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentServiceExtensionService, deps: [{ token: i1.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
40
|
+
ContentServiceExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentServiceExtensionService, providedIn: 'root' });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentServiceExtensionService, decorators: [{
|
|
42
|
+
type: Injectable,
|
|
43
|
+
args: [{
|
|
44
|
+
providedIn: 'root'
|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ICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbSgnY29udGVudFNlcnZpY2UnLCAndHJ1ZScpO1xuICAgIH1cbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Alfresco Example Content Application
|
|
4
|
+
*
|
|
5
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
6
|
+
*
|
|
7
|
+
* This file is part of the Alfresco Example Content Application.
|
|
8
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
9
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
10
|
+
* provided under the following open source license terms:
|
|
11
|
+
*
|
|
12
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
13
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
14
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
15
|
+
* (at your option) any later version.
|
|
16
|
+
*
|
|
17
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
18
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
+
* GNU Lesser General Public License for more details.
|
|
21
|
+
*
|
|
22
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
23
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
24
|
+
*/
|
|
25
|
+
import { Injectable } from '@angular/core';
|
|
26
|
+
import { of } from 'rxjs';
|
|
27
|
+
import { getRepositoryStatus } from '@alfresco/aca-shared/store';
|
|
28
|
+
import { take, map, catchError, mergeMap } from 'rxjs/operators';
|
|
29
|
+
import { Store } from '@ngrx/store';
|
|
30
|
+
import { ContentApiService } from '@alfresco/aca-shared';
|
|
31
|
+
import { ContentVersionService } from '@alfresco/adf-content-services';
|
|
32
|
+
import { AlfrescoApiService } from '@alfresco/adf-core';
|
|
33
|
+
import * as i0 from "@angular/core";
|
|
34
|
+
import * as i1 from "@ngrx/store";
|
|
35
|
+
import * as i2 from "@alfresco/aca-shared";
|
|
36
|
+
import * as i3 from "@alfresco/adf-core";
|
|
37
|
+
export class ContentUrlService extends ContentVersionService {
|
|
38
|
+
constructor(store, contentApiService, alfrescoApiService) {
|
|
39
|
+
super(alfrescoApiService);
|
|
40
|
+
this.store = store;
|
|
41
|
+
this.contentApiService = contentApiService;
|
|
42
|
+
}
|
|
43
|
+
getNodeContentUrl(nodeId, attachment = true) {
|
|
44
|
+
return this.isDirectAccessUrlEnabled().pipe(mergeMap((dauEnabled) => {
|
|
45
|
+
if (dauEnabled) {
|
|
46
|
+
return this.contentApiService.requestNodeDirectAccessUrl(nodeId).pipe(map((dauObj) => dauObj.entry.contentUrl), catchError(() => of(this.contentApiService.getContentUrl(nodeId, true))));
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return of(this.contentApiService.getContentUrl(nodeId, attachment));
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
getVersionContentUrl(nodeId, versionId, attachment = true) {
|
|
54
|
+
return this.isDirectAccessUrlEnabled().pipe(mergeMap((dauEnabled) => {
|
|
55
|
+
if (dauEnabled) {
|
|
56
|
+
return this.contentApiService.requestVersionDirectAccessUrl(nodeId, versionId).pipe(map((dauObj) => dauObj.entry.contentUrl), catchError(() => of(this.contentApiService.getVersionContentUrl(nodeId, versionId, true))));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return of(this.contentApiService.getVersionContentUrl(nodeId, versionId, attachment));
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
isDirectAccessUrlEnabled() {
|
|
64
|
+
return this.store.select(getRepositoryStatus).pipe(take(1), map((repository) => !!repository?.status?.isDirectAccessUrlEnabled));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
ContentUrlService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentUrlService, deps: [{ token: i1.Store }, { token: i2.ContentApiService }, { token: i3.AlfrescoApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
68
|
+
ContentUrlService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentUrlService, providedIn: 'root' });
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentUrlService, decorators: [{
|
|
70
|
+
type: Injectable,
|
|
71
|
+
args: [{ providedIn: 'root' }]
|
|
72
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.ContentApiService }, { type: i3.AlfrescoApiService }]; } });
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC11cmwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FjYS1jb250ZW50L3NyYy9saWIvc2VydmljZXMvY29udGVudC11cmwuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0F1Qkc7QUFFSCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxFQUFFLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDdEMsT0FBTyxFQUFZLG1CQUFtQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDM0UsT0FBTyxFQUFFLElBQUksRUFBRSxHQUFHLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2pFLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDcEMsT0FBTyxFQUFFLGlCQUFpQixFQUF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