@alfresco/aca-shared 2.0.1 → 4.0.0-A.2-9919
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 +2 -1
- package/{esm2015/alfresco-aca-shared.js → esm2020/alfresco-aca-shared.mjs} +0 -0
- package/esm2020/lib/adf-extensions/extensions-data-loader.guard.mjs +74 -0
- package/esm2020/lib/components/document-base-page/document-base-page.component.mjs +160 -0
- package/esm2020/lib/components/document-base-page/document-base-page.service.mjs +10 -0
- package/esm2020/lib/components/generic-error/generic-error.component.mjs +42 -0
- package/esm2020/lib/components/generic-error/generic-error.module.mjs +45 -0
- package/esm2020/lib/components/info-drawer/info-drawer.component.mjs +124 -0
- package/esm2020/lib/components/info-drawer/shared-info-drawer.module.mjs +47 -0
- package/esm2020/lib/components/locked-by/locked-by.component.mjs +53 -0
- package/esm2020/lib/components/locked-by/locked-by.module.mjs +45 -0
- package/esm2020/lib/components/page-layout/page-layout-content.component.mjs +49 -0
- package/esm2020/lib/components/page-layout/page-layout-error.component.mjs +41 -0
- package/esm2020/lib/components/page-layout/page-layout-header.component.mjs +41 -0
- package/esm2020/lib/components/page-layout/page-layout.component.mjs +41 -0
- package/esm2020/lib/components/page-layout/page-layout.module.mjs +45 -0
- package/esm2020/lib/components/tool-bar/shared-toolbar.module.mjs +47 -0
- package/esm2020/lib/components/tool-bar/toolbar-action/toolbar-action.component.mjs +58 -0
- package/esm2020/lib/components/tool-bar/toolbar-button/toolbar-button.component.mjs +67 -0
- package/esm2020/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.mjs +78 -0
- package/esm2020/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.mjs +69 -0
- package/esm2020/lib/directives/contextmenu/contextmenu.directive.mjs +107 -0
- package/{esm2015/lib/components/info-drawer/shared-info-drawer.module.js → esm2020/lib/directives/contextmenu/contextmenu.module.mjs} +17 -15
- package/esm2020/lib/directives/pagination.directive.mjs +55 -0
- package/esm2020/lib/directives/shared.directives.module.mjs +42 -0
- package/esm2020/lib/models/modal-configuration.mjs +2 -0
- package/{esm2015/lib/models/types.js → esm2020/lib/models/types.mjs} +1 -0
- package/{esm2015/lib/models/viewer.rules.js → esm2020/lib/models/viewer.rules.mjs} +2 -1
- package/esm2020/lib/routing/shared.guard.mjs +49 -0
- package/esm2020/lib/services/alfresco-office-extension.service.mjs +64 -0
- package/esm2020/lib/services/app-hook.service.mjs +88 -0
- package/esm2020/lib/services/app.extension.service.mjs +453 -0
- package/esm2020/lib/services/app.service.mjs +213 -0
- package/esm2020/lib/services/content-api.service.mjs +268 -0
- package/{esm2015/lib/services/node-permission.service.js → esm2020/lib/services/node-permission.service.mjs} +9 -7
- package/esm2020/lib/services/router.extension.service.mjs +106 -0
- package/esm2020/lib/shared.module.mjs +49 -0
- package/esm2020/lib/testing/lib-testing-module.mjs +118 -0
- package/{esm2015/store/actions/contextmenu.actions.js → esm2020/lib/testing/translation.service.mjs} +19 -9
- package/{esm2015/lib/utils/node.utils.js → esm2020/lib/utils/node.utils.mjs} +0 -0
- package/esm2020/public-api.mjs +63 -0
- package/{esm2015/rules/alfresco-aca-shared-rules.js → esm2020/rules/alfresco-aca-shared-rules.mjs} +0 -0
- package/esm2020/rules/app.rules.mjs +503 -0
- package/esm2020/rules/navigation.rules.mjs +152 -0
- package/{esm2015/rules/public-api.js → esm2020/rules/public-api.mjs} +0 -0
- package/{esm2015/store/states/app.state.js → esm2020/rules/repository.rules.mjs} +10 -1
- package/esm2020/rules/user.rules.mjs +30 -0
- package/esm2020/store/actions/app-action-types.mjs +48 -0
- package/esm2020/store/actions/app.actions.mjs +135 -0
- package/esm2020/store/actions/context-menu-action-types.mjs +29 -0
- package/esm2020/store/actions/contextmenu.actions.mjs +32 -0
- package/esm2020/store/actions/library.actions.mjs +64 -0
- package/{esm2015/store/actions/metadata-aspect.actions.js → esm2020/store/actions/metadata-aspect.actions.mjs} +0 -0
- package/esm2020/store/actions/node.actions.mjs +189 -0
- package/{esm2015/lib/components/generic-error/generic-error.module.js → esm2020/store/actions/router-action-types.mjs} +9 -15
- package/esm2020/store/actions/router.actions.mjs +55 -0
- package/esm2020/store/actions/search.actions.mjs +36 -0
- package/esm2020/store/actions/snackbar.actions.mjs +58 -0
- package/esm2020/store/actions/template-action-types.mjs +32 -0
- package/{esm2015/lib/components/generic-error/generic-error.component.js → esm2020/store/actions/template.actions.mjs} +21 -17
- package/esm2020/store/actions/upload.actions.mjs +50 -0
- package/esm2020/store/actions/viewer.actions.mjs +82 -0
- package/{esm2015/store/alfresco-aca-shared-store.js → esm2020/store/alfresco-aca-shared-store.mjs} +0 -0
- package/esm2020/store/effects/dialog.effects.mjs +45 -0
- package/esm2020/store/effects/router.effects.mjs +117 -0
- package/esm2020/store/effects/snackbar.effects.mjs +86 -0
- package/{esm2015/store/models/delete-status.model.js → esm2020/store/models/delete-status.model.mjs} +1 -0
- package/{esm2015/store/models/deleted-node-info.model.js → esm2020/store/models/deleted-node-info.model.mjs} +1 -0
- package/esm2020/store/models/modal-configuration.mjs +2 -0
- package/{esm2015/store/models/node-info.model.js → esm2020/store/models/node-info.model.mjs} +1 -0
- package/{esm2015/store/models/search-option.model.js → esm2020/store/models/search-option.model.mjs} +0 -0
- package/esm2020/store/public-api.mjs +50 -0
- package/esm2020/store/selectors/app.selectors.mjs +60 -0
- package/esm2020/store/states/app.state.mjs +27 -0
- package/esm2020/store/store.module.mjs +43 -0
- package/fesm2015/alfresco-aca-shared-rules.mjs +751 -0
- package/fesm2015/alfresco-aca-shared-rules.mjs.map +1 -0
- package/fesm2015/{alfresco-aca-shared-store.js → alfresco-aca-shared-store.mjs} +302 -276
- package/fesm2015/alfresco-aca-shared-store.mjs.map +1 -0
- package/fesm2015/alfresco-aca-shared.mjs +2726 -0
- package/fesm2015/alfresco-aca-shared.mjs.map +1 -0
- package/{fesm2015/alfresco-aca-shared-rules.js → fesm2020/alfresco-aca-shared-rules.mjs} +220 -150
- package/fesm2020/alfresco-aca-shared-rules.mjs.map +1 -0
- package/fesm2020/alfresco-aca-shared-store.mjs +1406 -0
- package/fesm2020/alfresco-aca-shared-store.mjs.map +1 -0
- package/fesm2020/alfresco-aca-shared.mjs +2841 -0
- package/fesm2020/alfresco-aca-shared.mjs.map +1 -0
- package/{alfresco-aca-shared.d.ts → index.d.ts} +1 -0
- package/lib/adf-extensions/extensions-data-loader.guard.d.ts +4 -1
- package/lib/components/document-base-page/document-base-page.component.d.ts +74 -0
- package/lib/components/document-base-page/document-base-page.service.d.ts +5 -0
- package/lib/components/generic-error/generic-error.component.d.ts +3 -24
- package/lib/components/generic-error/generic-error.module.d.ts +8 -24
- package/lib/components/info-drawer/info-drawer.component.d.ts +6 -0
- package/lib/components/info-drawer/shared-info-drawer.module.d.ts +11 -24
- package/lib/components/locked-by/locked-by.component.d.ts +5 -30
- package/lib/components/locked-by/locked-by.module.d.ts +8 -24
- package/lib/components/page-layout/page-layout-content.component.d.ts +3 -24
- package/lib/components/page-layout/page-layout-error.component.d.ts +3 -24
- package/lib/components/page-layout/page-layout-header.component.d.ts +3 -24
- package/lib/components/page-layout/page-layout.component.d.ts +3 -24
- package/lib/components/page-layout/page-layout.module.d.ts +9 -24
- package/lib/components/tool-bar/shared-toolbar.module.d.ts +11 -24
- package/lib/components/tool-bar/toolbar-action/toolbar-action.component.d.ts +7 -2
- package/lib/components/tool-bar/toolbar-button/toolbar-button.component.d.ts +5 -25
- package/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.d.ts +13 -7
- package/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.d.ts +7 -27
- package/lib/directives/contextmenu/contextmenu.directive.d.ts +5 -1
- package/lib/directives/contextmenu/contextmenu.module.d.ts +5 -24
- package/lib/directives/pagination.directive.d.ts +3 -0
- package/lib/directives/shared.directives.module.d.ts +6 -24
- package/lib/models/modal-configuration.d.ts +3 -0
- package/lib/models/viewer.rules.d.ts +4 -0
- package/lib/routing/shared.guard.d.ts +3 -24
- package/lib/services/alfresco-office-extension.service.d.ts +11 -0
- package/lib/services/app-hook.service.d.ts +55 -0
- package/lib/services/app.extension.service.d.ts +30 -45
- package/lib/services/app.service.d.ts +42 -6
- package/lib/services/content-api.service.d.ts +34 -25
- package/lib/services/node-permission.service.d.ts +3 -24
- package/lib/services/router.extension.service.d.ts +3 -24
- package/lib/shared.module.d.ts +5 -0
- package/lib/testing/lib-testing-module.d.ts +43 -0
- package/lib/testing/translation.service.d.ts +10 -0
- package/package.json +57 -18
- package/public-api.d.ts +7 -1
- package/rules/app.rules.d.ts +104 -30
- package/rules/{alfresco-aca-shared-rules.d.ts → index.d.ts} +1 -0
- package/rules/navigation.rules.d.ts +6 -6
- package/rules/repository.rules.d.ts +2 -1
- package/rules/user.rules.d.ts +1 -1
- package/store/actions/app-action-types.d.ts +46 -0
- package/store/actions/app.actions.d.ts +19 -18
- package/{lib/routing/app.routes.strategy.d.ts → store/actions/context-menu-action-types.d.ts} +2 -15
- package/store/actions/contextmenu.actions.d.ts +1 -3
- package/store/actions/library.actions.d.ts +3 -1
- package/store/actions/node.actions.d.ts +33 -7
- package/store/actions/router-action-types.d.ts +31 -0
- package/store/actions/router.actions.d.ts +5 -6
- package/store/actions/search.actions.d.ts +1 -13
- package/store/actions/snackbar.actions.d.ts +8 -11
- package/store/actions/template-action-types.d.ts +30 -0
- package/store/actions/template.actions.d.ts +1 -6
- package/store/actions/upload.actions.d.ts +3 -1
- package/store/actions/viewer.actions.d.ts +6 -0
- package/store/effects/dialog.effects.d.ts +4 -1
- package/store/effects/router.effects.d.ts +11 -29
- package/store/effects/snackbar.effects.d.ts +6 -3
- package/store/{alfresco-aca-shared-store.d.ts → index.d.ts} +1 -0
- package/store/models/modal-configuration.d.ts +3 -0
- package/store/public-api.d.ts +4 -0
- package/store/selectors/app.selectors.d.ts +6 -1
- package/store/states/app.state.d.ts +8 -1
- package/store/store.module.d.ts +5 -24
- package/alfresco-aca-shared.metadata.json +0 -1
- package/bundles/alfresco-aca-shared-rules.umd.js +0 -745
- package/bundles/alfresco-aca-shared-rules.umd.js.map +0 -1
- package/bundles/alfresco-aca-shared-rules.umd.min.js +0 -125
- package/bundles/alfresco-aca-shared-rules.umd.min.js.map +0 -1
- package/bundles/alfresco-aca-shared-store.umd.js +0 -1784
- package/bundles/alfresco-aca-shared-store.umd.js.map +0 -1
- package/bundles/alfresco-aca-shared-store.umd.min.js +0 -462
- package/bundles/alfresco-aca-shared-store.umd.min.js.map +0 -1
- package/bundles/alfresco-aca-shared.umd.js +0 -2523
- package/bundles/alfresco-aca-shared.umd.js.map +0 -1
- package/bundles/alfresco-aca-shared.umd.min.js +0 -740
- package/bundles/alfresco-aca-shared.umd.min.js.map +0 -1
- package/esm2015/lib/adf-extensions/extensions-data-loader.guard.js +0 -74
- package/esm2015/lib/components/info-drawer/info-drawer.component.js +0 -105
- package/esm2015/lib/components/locked-by/locked-by.component.js +0 -54
- package/esm2015/lib/components/locked-by/locked-by.module.js +0 -38
- package/esm2015/lib/components/page-layout/page-layout-content.component.js +0 -43
- package/esm2015/lib/components/page-layout/page-layout-error.component.js +0 -37
- package/esm2015/lib/components/page-layout/page-layout-header.component.js +0 -37
- package/esm2015/lib/components/page-layout/page-layout.component.js +0 -44
- package/esm2015/lib/components/page-layout/page-layout.module.js +0 -40
- package/esm2015/lib/components/tool-bar/shared-toolbar.module.js +0 -42
- package/esm2015/lib/components/tool-bar/toolbar-action/toolbar-action.component.js +0 -57
- package/esm2015/lib/components/tool-bar/toolbar-button/toolbar-button.component.js +0 -66
- package/esm2015/lib/components/tool-bar/toolbar-menu/toolbar-menu.component.js +0 -55
- package/esm2015/lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component.js +0 -65
- package/esm2015/lib/directives/contextmenu/contextmenu.directive.js +0 -97
- package/esm2015/lib/directives/contextmenu/contextmenu.module.js +0 -38
- package/esm2015/lib/directives/pagination.directive.js +0 -55
- package/esm2015/lib/directives/shared.directives.module.js +0 -37
- package/esm2015/lib/routing/app.routes.strategy.js +0 -105
- package/esm2015/lib/routing/shared.guard.js +0 -50
- package/esm2015/lib/services/app.extension.service.js +0 -398
- package/esm2015/lib/services/app.service.js +0 -69
- package/esm2015/lib/services/content-api.service.js +0 -205
- package/esm2015/lib/services/router.extension.service.js +0 -110
- package/esm2015/lib/shared.module.js +0 -44
- package/esm2015/public-api.js +0 -57
- package/esm2015/rules/app.rules.js +0 -420
- package/esm2015/rules/navigation.rules.js +0 -164
- package/esm2015/rules/repository.rules.js +0 -32
- package/esm2015/rules/user.rules.js +0 -32
- package/esm2015/store/actions/app.actions.js +0 -130
- package/esm2015/store/actions/library.actions.js +0 -63
- package/esm2015/store/actions/node.actions.js +0 -161
- package/esm2015/store/actions/router.actions.js +0 -56
- package/esm2015/store/actions/search.actions.js +0 -54
- package/esm2015/store/actions/snackbar.actions.js +0 -61
- package/esm2015/store/actions/template.actions.js +0 -54
- package/esm2015/store/actions/upload.actions.js +0 -49
- package/esm2015/store/actions/viewer.actions.js +0 -75
- package/esm2015/store/effects/dialog.effects.js +0 -49
- package/esm2015/store/effects/router.effects.js +0 -132
- package/esm2015/store/effects/snackbar.effects.js +0 -90
- package/esm2015/store/public-api.js +0 -46
- package/esm2015/store/selectors/app.selectors.js +0 -80
- package/esm2015/store/store.module.js +0 -37
- package/fesm2015/alfresco-aca-shared-rules.js.map +0 -1
- package/fesm2015/alfresco-aca-shared-store.js.map +0 -1
- package/fesm2015/alfresco-aca-shared.js +0 -2167
- package/fesm2015/alfresco-aca-shared.js.map +0 -1
- package/rules/alfresco-aca-shared-rules.metadata.json +0 -1
- package/rules/package.json +0 -11
- package/store/alfresco-aca-shared-store.metadata.json +0 -1
- package/store/package.json +0 -11
|
@@ -0,0 +1,2726 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, HostBinding, NgModule, ViewChild, QueryList, ViewChildren, HostListener, Directive } from '@angular/core';
|
|
3
|
+
import { of, forkJoin, BehaviorSubject, from, Subject } from 'rxjs';
|
|
4
|
+
import { map, tap, catchError, filter, takeUntil, debounceTime, take } from 'rxjs/operators';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i1$1 from '@angular/material/icon';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
+
import * as i2 from '@ngx-translate/core';
|
|
10
|
+
import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';
|
|
11
|
+
import * as i4 from '@angular/material/menu';
|
|
12
|
+
import { MatMenuItem, MatMenu } from '@angular/material/menu';
|
|
13
|
+
import { __awaiter } from 'tslib';
|
|
14
|
+
import { getRuleContext, infoDrawerPreview, SetInfoDrawerStateAction, ToggleInfoDrawerAction, getSharedUrl, isInfoDrawerOpened, getDocumentDisplayMode, getAppSelection, getCurrentFolder, SetSelectedNodesAction, ViewNodeAction, ReloadDocumentListAction, ContextMenu, isQuickShareEnabled, CloseModalDialogsAction, SetCurrentUrlAction, ResetSelectionAction, SnackbarErrorAction, SetRepositoryInfoAction, SetUserProfileAction, SetInitialStateAction, getCustomCssPath, getCustomWebFontPath, STORE_INITIAL_APP_DATA } from '@alfresco/aca-shared/store';
|
|
15
|
+
import * as i3 from '@alfresco/adf-extensions';
|
|
16
|
+
import { sortByOrder, reduceEmptyMenus, mergeObjects, mergeArrays, ContentActionType, reduceSeparators, ExtensionsModule } from '@alfresco/adf-extensions';
|
|
17
|
+
import * as i1$2 from '@alfresco/adf-core';
|
|
18
|
+
import { CoreModule, InfoDrawerModule, ToolbarModule, ShowHeaderMode, PipeModule, AlfrescoApiService, AlfrescoApiServiceMock, TranslationService, TranslationMock, TranslateLoaderService } from '@alfresco/adf-core';
|
|
19
|
+
import * as i1$3 from '@ngrx/store';
|
|
20
|
+
import { StoreModule } from '@ngrx/store';
|
|
21
|
+
import * as i6 from '@angular/platform-browser';
|
|
22
|
+
import * as i3$1 from '@angular/material/divider';
|
|
23
|
+
import * as i2$1 from '@angular/material/button';
|
|
24
|
+
import { NodesApi, TrashcanApi, SharedlinksApi, DiscoveryApi, FavoritesApi, ContentApi, SitesApi, SearchApi, PeopleApi, VersionsApi } from '@alfresco/js-api';
|
|
25
|
+
import * as i6$1 from '@angular/material/progress-bar';
|
|
26
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
27
|
+
import * as i6$2 from '@alfresco/adf-content-services';
|
|
28
|
+
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
|
29
|
+
import * as i3$2 from '@angular/router';
|
|
30
|
+
import { ActivationEnd, NavigationStart } from '@angular/router';
|
|
31
|
+
import * as i7 from '@angular/cdk/overlay';
|
|
32
|
+
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
|
33
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
34
|
+
import { RouterTestingModule } from '@angular/router/testing';
|
|
35
|
+
import * as i1$4 from '@ngrx/effects';
|
|
36
|
+
import { EffectsModule } from '@ngrx/effects';
|
|
37
|
+
|
|
38
|
+
/*!
|
|
39
|
+
* @license
|
|
40
|
+
* Alfresco Example Content Application
|
|
41
|
+
*
|
|
42
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
43
|
+
*
|
|
44
|
+
* This file is part of the Alfresco Example Content Application.
|
|
45
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
46
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
47
|
+
* provided under the following open source license terms:
|
|
48
|
+
*
|
|
49
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
50
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
51
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
52
|
+
* (at your option) any later version.
|
|
53
|
+
*
|
|
54
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
55
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
56
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
57
|
+
* GNU Lesser General Public License for more details.
|
|
58
|
+
*
|
|
59
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
60
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
61
|
+
*/
|
|
62
|
+
const DefaultExtensionLoaderFactory = () => [];
|
|
63
|
+
const EXTENSION_DATA_LOADERS = new InjectionToken('EXTENSION_DATA_LOADERS', {
|
|
64
|
+
providedIn: 'root',
|
|
65
|
+
factory: DefaultExtensionLoaderFactory
|
|
66
|
+
});
|
|
67
|
+
class ExtensionsDataLoaderGuard {
|
|
68
|
+
constructor(extensionDataLoaders) {
|
|
69
|
+
this.extensionDataLoaders = extensionDataLoaders;
|
|
70
|
+
this.invoked = false;
|
|
71
|
+
}
|
|
72
|
+
canActivate(route) {
|
|
73
|
+
if (!this.invoked) {
|
|
74
|
+
if (!this.extensionDataLoaders.length) {
|
|
75
|
+
this.invoked = true;
|
|
76
|
+
return of(true);
|
|
77
|
+
}
|
|
78
|
+
const dataLoaderCallbacks = this.extensionDataLoaders.map((callback) => callback(route));
|
|
79
|
+
// Undocumented forkJoin behaviour/bug:
|
|
80
|
+
// https://github.com/ReactiveX/rxjs/issues/3246
|
|
81
|
+
// So all callbacks need to emit before completion, otherwise forkJoin will short circuit
|
|
82
|
+
return forkJoin(...dataLoaderCallbacks).pipe(map(() => true), tap(() => (this.invoked = true)), catchError((e) => {
|
|
83
|
+
// eslint-disable-next-line no-console
|
|
84
|
+
console.error('Some of the extension data loader guards has been errored.');
|
|
85
|
+
// eslint-disable-next-line no-console
|
|
86
|
+
console.error(e);
|
|
87
|
+
return of(true);
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return of(true);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
canActivateChild() {
|
|
95
|
+
return of(true);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
ExtensionsDataLoaderGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ExtensionsDataLoaderGuard, deps: [{ token: EXTENSION_DATA_LOADERS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
99
|
+
ExtensionsDataLoaderGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ExtensionsDataLoaderGuard, providedIn: 'root' });
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ExtensionsDataLoaderGuard, decorators: [{
|
|
101
|
+
type: Injectable,
|
|
102
|
+
args: [{ providedIn: 'root' }]
|
|
103
|
+
}], ctorParameters: function () {
|
|
104
|
+
return [{ type: undefined, decorators: [{
|
|
105
|
+
type: Inject,
|
|
106
|
+
args: [EXTENSION_DATA_LOADERS]
|
|
107
|
+
}] }];
|
|
108
|
+
} });
|
|
109
|
+
|
|
110
|
+
/*!
|
|
111
|
+
* @license
|
|
112
|
+
* Alfresco Example Content Application
|
|
113
|
+
*
|
|
114
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
115
|
+
*
|
|
116
|
+
* This file is part of the Alfresco Example Content Application.
|
|
117
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
118
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
119
|
+
* provided under the following open source license terms:
|
|
120
|
+
*
|
|
121
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
122
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
123
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
124
|
+
* (at your option) any later version.
|
|
125
|
+
*
|
|
126
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
127
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
128
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
129
|
+
* GNU Lesser General Public License for more details.
|
|
130
|
+
*
|
|
131
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
132
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
133
|
+
*/
|
|
134
|
+
class PageLayoutContentComponent {
|
|
135
|
+
constructor() {
|
|
136
|
+
this.scrollable = false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
PageLayoutContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
+
PageLayoutContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutContentComponent, selector: "aca-page-layout-content", inputs: { scrollable: "scrollable" }, host: { properties: { "class.scrollable": "this.scrollable" }, classAttribute: "aca-page-layout-content" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutContentComponent, decorators: [{
|
|
142
|
+
type: Component,
|
|
143
|
+
args: [{
|
|
144
|
+
selector: 'aca-page-layout-content',
|
|
145
|
+
template: `<ng-content></ng-content>`,
|
|
146
|
+
encapsulation: ViewEncapsulation.None,
|
|
147
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
148
|
+
host: { class: 'aca-page-layout-content' }
|
|
149
|
+
}]
|
|
150
|
+
}], propDecorators: { scrollable: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}, {
|
|
153
|
+
type: HostBinding,
|
|
154
|
+
args: ['class.scrollable']
|
|
155
|
+
}] } });
|
|
156
|
+
|
|
157
|
+
/*!
|
|
158
|
+
* @license
|
|
159
|
+
* Alfresco Example Content Application
|
|
160
|
+
*
|
|
161
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
162
|
+
*
|
|
163
|
+
* This file is part of the Alfresco Example Content Application.
|
|
164
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
165
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
166
|
+
* provided under the following open source license terms:
|
|
167
|
+
*
|
|
168
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
169
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
170
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
171
|
+
* (at your option) any later version.
|
|
172
|
+
*
|
|
173
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
174
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
175
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
176
|
+
* GNU Lesser General Public License for more details.
|
|
177
|
+
*
|
|
178
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
179
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
180
|
+
*/
|
|
181
|
+
class PageLayoutErrorComponent {
|
|
182
|
+
}
|
|
183
|
+
PageLayoutErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
+
PageLayoutErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutErrorComponent, selector: "aca-page-layout-error", host: { classAttribute: "aca-page-layout-error" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutErrorComponent, decorators: [{
|
|
186
|
+
type: Component,
|
|
187
|
+
args: [{
|
|
188
|
+
selector: 'aca-page-layout-error',
|
|
189
|
+
template: `<ng-content></ng-content>`,
|
|
190
|
+
encapsulation: ViewEncapsulation.None,
|
|
191
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
192
|
+
host: { class: 'aca-page-layout-error' }
|
|
193
|
+
}]
|
|
194
|
+
}] });
|
|
195
|
+
|
|
196
|
+
/*!
|
|
197
|
+
* @license
|
|
198
|
+
* Alfresco Example Content Application
|
|
199
|
+
*
|
|
200
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
201
|
+
*
|
|
202
|
+
* This file is part of the Alfresco Example Content Application.
|
|
203
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
204
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
205
|
+
* provided under the following open source license terms:
|
|
206
|
+
*
|
|
207
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
208
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
209
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
210
|
+
* (at your option) any later version.
|
|
211
|
+
*
|
|
212
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
213
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
214
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
215
|
+
* GNU Lesser General Public License for more details.
|
|
216
|
+
*
|
|
217
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
218
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
219
|
+
*/
|
|
220
|
+
class PageLayoutHeaderComponent {
|
|
221
|
+
}
|
|
222
|
+
PageLayoutHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
223
|
+
PageLayoutHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutHeaderComponent, selector: "aca-page-layout-header", host: { classAttribute: "aca-page-layout-header" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutHeaderComponent, decorators: [{
|
|
225
|
+
type: Component,
|
|
226
|
+
args: [{
|
|
227
|
+
selector: 'aca-page-layout-header',
|
|
228
|
+
template: '<ng-content></ng-content>',
|
|
229
|
+
encapsulation: ViewEncapsulation.None,
|
|
230
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
231
|
+
host: { class: 'aca-page-layout-header' }
|
|
232
|
+
}]
|
|
233
|
+
}] });
|
|
234
|
+
|
|
235
|
+
/*!
|
|
236
|
+
* @license
|
|
237
|
+
* Alfresco Example Content Application
|
|
238
|
+
*
|
|
239
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
240
|
+
*
|
|
241
|
+
* This file is part of the Alfresco Example Content Application.
|
|
242
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
243
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
244
|
+
* provided under the following open source license terms:
|
|
245
|
+
*
|
|
246
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
247
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
248
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
249
|
+
* (at your option) any later version.
|
|
250
|
+
*
|
|
251
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
252
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
253
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
254
|
+
* GNU Lesser General Public License for more details.
|
|
255
|
+
*
|
|
256
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
257
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
258
|
+
*/
|
|
259
|
+
class PageLayoutComponent {
|
|
260
|
+
constructor() {
|
|
261
|
+
this.hasError = false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
PageLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
265
|
+
PageLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PageLayoutComponent, selector: "aca-page-layout", inputs: { hasError: "hasError" }, host: { classAttribute: "aca-page-layout" }, ngImport: i0, template: "<ng-content select=\"aca-page-layout-header\"></ng-content>\n<ng-content select=\"aca-page-layout-error\" *ngIf=\"hasError\"></ng-content>\n<ng-content select=\"aca-page-layout-content\" *ngIf=\"!hasError\"></ng-content>\n", styles: [".aca-page-layout{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .aca-page-layout-header{display:flex;align-items:center;flex:0 0 65px;flex-basis:48px;background:var(--theme-background-color);border-bottom:1px solid var(--theme-border-color, rgba(0, 0, 0, .07));padding:0 24px}.aca-page-layout .aca-page-layout-content,.aca-page-layout .aca-page-layout-error{display:flex;flex-direction:row;flex:1;height:100%;overflow:hidden}.aca-page-layout .main-content{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .scrollable,.aca-page-layout .scrollable .main-content{overflow:auto!important}.aca-page-layout .sidebar{display:block;height:100%;overflow-y:scroll;max-width:350px;width:350px}[dir=rtl] .aca-page-layout .main-content{border-left:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}[dir=ltr] .aca-page-layout .main-content{border-right:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutComponent, decorators: [{
|
|
267
|
+
type: Component,
|
|
268
|
+
args: [{ selector: 'aca-page-layout', encapsulation: ViewEncapsulation.None, host: { class: 'aca-page-layout' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"aca-page-layout-header\"></ng-content>\n<ng-content select=\"aca-page-layout-error\" *ngIf=\"hasError\"></ng-content>\n<ng-content select=\"aca-page-layout-content\" *ngIf=\"!hasError\"></ng-content>\n", styles: [".aca-page-layout{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .aca-page-layout-header{display:flex;align-items:center;flex:0 0 65px;flex-basis:48px;background:var(--theme-background-color);border-bottom:1px solid var(--theme-border-color, rgba(0, 0, 0, .07));padding:0 24px}.aca-page-layout .aca-page-layout-content,.aca-page-layout .aca-page-layout-error{display:flex;flex-direction:row;flex:1;height:100%;overflow:hidden}.aca-page-layout .main-content{display:flex;flex-direction:column;flex:1;height:100%;overflow:hidden;min-height:0}.aca-page-layout .scrollable,.aca-page-layout .scrollable .main-content{overflow:auto!important}.aca-page-layout .sidebar{display:block;height:100%;overflow-y:scroll;max-width:350px;width:350px}[dir=rtl] .aca-page-layout .main-content{border-left:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}[dir=ltr] .aca-page-layout .main-content{border-right:1px solid var(--theme-border-color, rgba(0, 0, 0, .07))}\n"] }]
|
|
269
|
+
}], propDecorators: { hasError: [{
|
|
270
|
+
type: Input
|
|
271
|
+
}] } });
|
|
272
|
+
|
|
273
|
+
/*!
|
|
274
|
+
* @license
|
|
275
|
+
* Alfresco Example Content Application
|
|
276
|
+
*
|
|
277
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
278
|
+
*
|
|
279
|
+
* This file is part of the Alfresco Example Content Application.
|
|
280
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
281
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
282
|
+
* provided under the following open source license terms:
|
|
283
|
+
*
|
|
284
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
285
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
286
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
287
|
+
* (at your option) any later version.
|
|
288
|
+
*
|
|
289
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
290
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
291
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
292
|
+
* GNU Lesser General Public License for more details.
|
|
293
|
+
*
|
|
294
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
295
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
296
|
+
*/
|
|
297
|
+
class PageLayoutModule {
|
|
298
|
+
}
|
|
299
|
+
PageLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
300
|
+
PageLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, declarations: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent], imports: [CommonModule], exports: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent] });
|
|
301
|
+
PageLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, imports: [CommonModule] });
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageLayoutModule, decorators: [{
|
|
303
|
+
type: NgModule,
|
|
304
|
+
args: [{
|
|
305
|
+
imports: [CommonModule],
|
|
306
|
+
declarations: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent],
|
|
307
|
+
exports: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent]
|
|
308
|
+
}]
|
|
309
|
+
}] });
|
|
310
|
+
|
|
311
|
+
/*!
|
|
312
|
+
* @license
|
|
313
|
+
* Alfresco Example Content Application
|
|
314
|
+
*
|
|
315
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
316
|
+
*
|
|
317
|
+
* This file is part of the Alfresco Example Content Application.
|
|
318
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
319
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
320
|
+
* provided under the following open source license terms:
|
|
321
|
+
*
|
|
322
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
323
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
324
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
325
|
+
* (at your option) any later version.
|
|
326
|
+
*
|
|
327
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
328
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
329
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
330
|
+
* GNU Lesser General Public License for more details.
|
|
331
|
+
*
|
|
332
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
333
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
334
|
+
*/
|
|
335
|
+
class LockedByComponent {
|
|
336
|
+
get text() {
|
|
337
|
+
return (this.node && this.node.entry.properties && this.node.entry.properties['cm:lockOwner'] && this.node.entry.properties['cm:lockOwner'].displayName);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
LockedByComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
341
|
+
LockedByComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: LockedByComponent, selector: "aca-locked-by", inputs: { node: "node" }, host: { classAttribute: "aca-locked-by" }, ngImport: i0, template: `
|
|
342
|
+
<mat-icon class="locked_by--icon">lock</mat-icon>
|
|
343
|
+
<span class="locked_by--label">{{ 'APP.LOCKED_BY' | translate }}</span>
|
|
344
|
+
<span class="locked_by--name">{{ text }}</span>
|
|
345
|
+
`, isInline: true, styles: [".aca-locked-by{display:flex;align-items:center;color:var(--theme-text-color, rgba(0, 0, 0, .54))}.aca-locked-by .locked_by--icon{font-size:14px;width:14px;height:14px}.aca-locked-by .locked_by--label,.aca-locked-by .locked_by--name{font-size:12px;padding:0 2px}\n"], dependencies: [{ kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByComponent, decorators: [{
|
|
347
|
+
type: Component,
|
|
348
|
+
args: [{ selector: 'aca-locked-by', template: `
|
|
349
|
+
<mat-icon class="locked_by--icon">lock</mat-icon>
|
|
350
|
+
<span class="locked_by--label">{{ 'APP.LOCKED_BY' | translate }}</span>
|
|
351
|
+
<span class="locked_by--name">{{ text }}</span>
|
|
352
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
353
|
+
class: 'aca-locked-by'
|
|
354
|
+
}, styles: [".aca-locked-by{display:flex;align-items:center;color:var(--theme-text-color, rgba(0, 0, 0, .54))}.aca-locked-by .locked_by--icon{font-size:14px;width:14px;height:14px}.aca-locked-by .locked_by--label,.aca-locked-by .locked_by--name{font-size:12px;padding:0 2px}\n"] }]
|
|
355
|
+
}], propDecorators: { node: [{
|
|
356
|
+
type: Input
|
|
357
|
+
}] } });
|
|
358
|
+
|
|
359
|
+
/*!
|
|
360
|
+
* @license
|
|
361
|
+
* Alfresco Example Content Application
|
|
362
|
+
*
|
|
363
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
364
|
+
*
|
|
365
|
+
* This file is part of the Alfresco Example Content Application.
|
|
366
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
367
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
368
|
+
* provided under the following open source license terms:
|
|
369
|
+
*
|
|
370
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
371
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
372
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
373
|
+
* (at your option) any later version.
|
|
374
|
+
*
|
|
375
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
376
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
377
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
378
|
+
* GNU Lesser General Public License for more details.
|
|
379
|
+
*
|
|
380
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
381
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
382
|
+
*/
|
|
383
|
+
class LockedByModule {
|
|
384
|
+
}
|
|
385
|
+
LockedByModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
386
|
+
LockedByModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, declarations: [LockedByComponent], imports: [CommonModule, MatIconModule, i2.TranslateModule], exports: [LockedByComponent] });
|
|
387
|
+
LockedByModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, imports: [CommonModule, MatIconModule, TranslateModule.forChild()] });
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LockedByModule, decorators: [{
|
|
389
|
+
type: NgModule,
|
|
390
|
+
args: [{
|
|
391
|
+
imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
|
|
392
|
+
declarations: [LockedByComponent],
|
|
393
|
+
exports: [LockedByComponent]
|
|
394
|
+
}]
|
|
395
|
+
}] });
|
|
396
|
+
|
|
397
|
+
/*!
|
|
398
|
+
* @license
|
|
399
|
+
* Alfresco Example Content Application
|
|
400
|
+
*
|
|
401
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
402
|
+
*
|
|
403
|
+
* This file is part of the Alfresco Example Content Application.
|
|
404
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
405
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
406
|
+
* provided under the following open source license terms:
|
|
407
|
+
*
|
|
408
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
409
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
410
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
411
|
+
* (at your option) any later version.
|
|
412
|
+
*
|
|
413
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
414
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
415
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
416
|
+
* GNU Lesser General Public License for more details.
|
|
417
|
+
*
|
|
418
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
419
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
420
|
+
*/
|
|
421
|
+
class GenericErrorComponent {
|
|
422
|
+
constructor() {
|
|
423
|
+
this.text = 'APP.MESSAGES.ERRORS.MISSING_CONTENT';
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
GenericErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
427
|
+
GenericErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: GenericErrorComponent, selector: "aca-generic-error", inputs: { text: "text" }, host: { classAttribute: "aca-generic-error" }, ngImport: i0, template: "<mat-icon>error</mat-icon>\n<p class=\"generic-error__title\">\n {{ text | translate }}\n</p>\n", styles: [".aca-generic-error{color:var(--theme-text-color, rgba(0, 0, 0, .54));display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%}.aca-generic-error__title{font-size:16px}.aca-generic-error mat-icon{color:var(--theme-warn-color, #f44336);font-size:52px;height:52px;width:52px}\n"], dependencies: [{ kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorComponent, decorators: [{
|
|
429
|
+
type: Component,
|
|
430
|
+
args: [{ selector: 'aca-generic-error', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-generic-error' }, template: "<mat-icon>error</mat-icon>\n<p class=\"generic-error__title\">\n {{ text | translate }}\n</p>\n", styles: [".aca-generic-error{color:var(--theme-text-color, rgba(0, 0, 0, .54));display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%}.aca-generic-error__title{font-size:16px}.aca-generic-error mat-icon{color:var(--theme-warn-color, #f44336);font-size:52px;height:52px;width:52px}\n"] }]
|
|
431
|
+
}], propDecorators: { text: [{
|
|
432
|
+
type: Input
|
|
433
|
+
}] } });
|
|
434
|
+
|
|
435
|
+
/*!
|
|
436
|
+
* @license
|
|
437
|
+
* Alfresco Example Content Application
|
|
438
|
+
*
|
|
439
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
440
|
+
*
|
|
441
|
+
* This file is part of the Alfresco Example Content Application.
|
|
442
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
443
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
444
|
+
* provided under the following open source license terms:
|
|
445
|
+
*
|
|
446
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
447
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
448
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
449
|
+
* (at your option) any later version.
|
|
450
|
+
*
|
|
451
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
452
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
453
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
454
|
+
* GNU Lesser General Public License for more details.
|
|
455
|
+
*
|
|
456
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
457
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
458
|
+
*/
|
|
459
|
+
class GenericErrorModule {
|
|
460
|
+
}
|
|
461
|
+
GenericErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
462
|
+
GenericErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, declarations: [GenericErrorComponent], imports: [CommonModule, MatIconModule, i2.TranslateModule], exports: [GenericErrorComponent] });
|
|
463
|
+
GenericErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, imports: [CommonModule, MatIconModule, TranslateModule.forChild()] });
|
|
464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GenericErrorModule, decorators: [{
|
|
465
|
+
type: NgModule,
|
|
466
|
+
args: [{
|
|
467
|
+
imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
|
|
468
|
+
declarations: [GenericErrorComponent],
|
|
469
|
+
exports: [GenericErrorComponent]
|
|
470
|
+
}]
|
|
471
|
+
}] });
|
|
472
|
+
|
|
473
|
+
/*!
|
|
474
|
+
* @license
|
|
475
|
+
* Alfresco Example Content Application
|
|
476
|
+
*
|
|
477
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
478
|
+
*
|
|
479
|
+
* This file is part of the Alfresco Example Content Application.
|
|
480
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
481
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
482
|
+
* provided under the following open source license terms:
|
|
483
|
+
*
|
|
484
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
485
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
486
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
487
|
+
* (at your option) any later version.
|
|
488
|
+
*
|
|
489
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
490
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
491
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
492
|
+
* GNU Lesser General Public License for more details.
|
|
493
|
+
*
|
|
494
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
495
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
496
|
+
*/
|
|
497
|
+
class NodePermissionService {
|
|
498
|
+
constructor() {
|
|
499
|
+
this.defaultOptions = {
|
|
500
|
+
operation: NodePermissionService.DEFAULT_OPERATION,
|
|
501
|
+
target: null
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
check(source, permissions, options) {
|
|
505
|
+
const opts = Object.assign({}, this.defaultOptions, options || {});
|
|
506
|
+
if (!source) {
|
|
507
|
+
return false;
|
|
508
|
+
}
|
|
509
|
+
if (Array.isArray(source)) {
|
|
510
|
+
source = source.filter((item) => item);
|
|
511
|
+
if (source.length > 0) {
|
|
512
|
+
return source.every((node) => this.isOperationAllowed(node, permissions, opts));
|
|
513
|
+
}
|
|
514
|
+
return false;
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
return this.isOperationAllowed(source, permissions, opts);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
isOperationAllowed(node, permissions, options) {
|
|
521
|
+
const allowableOperations = this.getAllowableOperations(node, options.target);
|
|
522
|
+
if (allowableOperations.length) {
|
|
523
|
+
if (options.operation === NodePermissionService.DEFAULT_OPERATION) {
|
|
524
|
+
return permissions.some((permission) => allowableOperations.includes(permission));
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
return permissions.every((permission) => allowableOperations.includes(permission));
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
532
|
+
getAllowableOperations(node, property) {
|
|
533
|
+
let entry;
|
|
534
|
+
if ('entry' in node) {
|
|
535
|
+
entry = node.entry;
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
entry = node;
|
|
539
|
+
}
|
|
540
|
+
if (property) {
|
|
541
|
+
return entry[property] || [];
|
|
542
|
+
}
|
|
543
|
+
if ('allowableOperationsOnTarget' in entry) {
|
|
544
|
+
return entry.allowableOperationsOnTarget || [];
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
return entry.allowableOperations || [];
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
NodePermissionService.DEFAULT_OPERATION = 'OR';
|
|
552
|
+
NodePermissionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NodePermissionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
553
|
+
NodePermissionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NodePermissionService, providedIn: 'root' });
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: NodePermissionService, decorators: [{
|
|
555
|
+
type: Injectable,
|
|
556
|
+
args: [{
|
|
557
|
+
providedIn: 'root'
|
|
558
|
+
}]
|
|
559
|
+
}] });
|
|
560
|
+
|
|
561
|
+
class AppExtensionService {
|
|
562
|
+
constructor(auth, store, loader, extensions, permissions, appConfig, matIconRegistry, sanitizer, logger) {
|
|
563
|
+
this.auth = auth;
|
|
564
|
+
this.store = store;
|
|
565
|
+
this.loader = loader;
|
|
566
|
+
this.extensions = extensions;
|
|
567
|
+
this.permissions = permissions;
|
|
568
|
+
this.appConfig = appConfig;
|
|
569
|
+
this.matIconRegistry = matIconRegistry;
|
|
570
|
+
this.sanitizer = sanitizer;
|
|
571
|
+
this.logger = logger;
|
|
572
|
+
this._references = new BehaviorSubject([]);
|
|
573
|
+
this.navbar = [];
|
|
574
|
+
this.sidebarTabs = [];
|
|
575
|
+
this.viewerRules = {};
|
|
576
|
+
this.settingGroups = [];
|
|
577
|
+
this._headerActions = new BehaviorSubject([]);
|
|
578
|
+
this._toolbarActions = new BehaviorSubject([]);
|
|
579
|
+
this._viewerToolbarActions = new BehaviorSubject([]);
|
|
580
|
+
this._sharedLinkViewerToolbarActions = new BehaviorSubject([]);
|
|
581
|
+
this._contextMenuActions = new BehaviorSubject([]);
|
|
582
|
+
this._openWithActions = new BehaviorSubject([]);
|
|
583
|
+
this._createActions = new BehaviorSubject([]);
|
|
584
|
+
this._mainActions = new BehaviorSubject(null);
|
|
585
|
+
this._sidebarActions = new BehaviorSubject([]);
|
|
586
|
+
this.documentListPresets = {
|
|
587
|
+
files: [],
|
|
588
|
+
libraries: [],
|
|
589
|
+
favoriteLibraries: [],
|
|
590
|
+
shared: [],
|
|
591
|
+
recent: [],
|
|
592
|
+
favorites: [],
|
|
593
|
+
trashcan: [],
|
|
594
|
+
searchLibraries: []
|
|
595
|
+
};
|
|
596
|
+
this.references$ = this._references.asObservable();
|
|
597
|
+
this.store.select(getRuleContext).subscribe((result) => {
|
|
598
|
+
this.selection = result.selection;
|
|
599
|
+
this.navigation = result.navigation;
|
|
600
|
+
this.profile = result.profile;
|
|
601
|
+
this.repository = result.repository;
|
|
602
|
+
if (this.config) {
|
|
603
|
+
this.setup(this.config);
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
load() {
|
|
608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
609
|
+
this.config = yield this.extensions.load();
|
|
610
|
+
this.setup(this.config);
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
setup(config) {
|
|
614
|
+
if (!config) {
|
|
615
|
+
this.logger.error('Extension configuration not found');
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
this.settingGroups = this.loader.getElements(config, 'settings');
|
|
619
|
+
this._headerActions.next(this.loader.getContentActions(config, 'features.header'));
|
|
620
|
+
this._sidebarActions.next(this.loader.getContentActions(config, 'features.sidebar.toolbar'));
|
|
621
|
+
this._toolbarActions.next(this.loader.getContentActions(config, 'features.toolbar'));
|
|
622
|
+
this._viewerToolbarActions.next(this.loader.getContentActions(config, 'features.viewer.toolbarActions'));
|
|
623
|
+
this._sharedLinkViewerToolbarActions.next(this.loader.getContentActions(config, 'features.viewer.shared.toolbarActions'));
|
|
624
|
+
this._contextMenuActions.next(this.loader.getContentActions(config, 'features.contextMenu'));
|
|
625
|
+
this._openWithActions.next(this.loader.getContentActions(config, 'features.viewer.openWith'));
|
|
626
|
+
this._createActions.next(this.loader.getElements(config, 'features.create'));
|
|
627
|
+
this._mainActions.next(this.loader.getFeatures(config).mainAction);
|
|
628
|
+
this.navbar = this.loadNavBar(config);
|
|
629
|
+
this.sidebarTabs = this.loader.getElements(config, 'features.sidebar.tabs');
|
|
630
|
+
this.contentMetadata = this.loadContentMetadata(config);
|
|
631
|
+
this.search = this.loadSearchForms(config);
|
|
632
|
+
this.documentListPresets = {
|
|
633
|
+
files: this.getDocumentListPreset(config, 'files'),
|
|
634
|
+
libraries: this.getDocumentListPreset(config, 'libraries'),
|
|
635
|
+
favoriteLibraries: this.getDocumentListPreset(config, 'favoriteLibraries'),
|
|
636
|
+
shared: this.getDocumentListPreset(config, 'shared'),
|
|
637
|
+
recent: this.getDocumentListPreset(config, 'recent'),
|
|
638
|
+
favorites: this.getDocumentListPreset(config, 'favorites'),
|
|
639
|
+
trashcan: this.getDocumentListPreset(config, 'trashcan'),
|
|
640
|
+
searchLibraries: this.getDocumentListPreset(config, 'search-libraries')
|
|
641
|
+
};
|
|
642
|
+
this.withCredentials = this.appConfig.get('auth.withCredentials', false);
|
|
643
|
+
if (config.features && config.features.viewer) {
|
|
644
|
+
this.viewerRules = config.features.viewer['rules'] || {};
|
|
645
|
+
}
|
|
646
|
+
this.registerIcons(config);
|
|
647
|
+
const references = (config.$references || []).filter((entry) => typeof entry === 'object').map((entry) => entry);
|
|
648
|
+
this._references.next(references);
|
|
649
|
+
}
|
|
650
|
+
registerIcons(config) {
|
|
651
|
+
const icons = this.loader.getElements(config, 'features.icons').filter((entry) => !entry.disabled);
|
|
652
|
+
for (const icon of icons) {
|
|
653
|
+
const [ns, id] = icon.id.split(':');
|
|
654
|
+
const value = icon.value;
|
|
655
|
+
if (!value) {
|
|
656
|
+
console.warn(`Missing icon value for "${icon.id}".`);
|
|
657
|
+
}
|
|
658
|
+
else if (!ns || !id) {
|
|
659
|
+
console.warn(`Incorrect icon id format: "${icon.id}".`);
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
this.matIconRegistry.addSvgIconInNamespace(ns, id, this.sanitizer.bypassSecurityTrustResourceUrl(value));
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
loadNavBar(config) {
|
|
667
|
+
return this.loader.getElements(config, 'features.navbar');
|
|
668
|
+
}
|
|
669
|
+
getDocumentListPreset(config, key) {
|
|
670
|
+
return this.loader
|
|
671
|
+
.getElements(config, `features.documentList.${key}`)
|
|
672
|
+
.filter((group) => this.filterVisible(group))
|
|
673
|
+
.filter((entry) => !entry.disabled)
|
|
674
|
+
.sort(sortByOrder);
|
|
675
|
+
}
|
|
676
|
+
getApplicationNavigation(elements) {
|
|
677
|
+
return elements
|
|
678
|
+
.filter((group) => this.filterVisible(group))
|
|
679
|
+
.map((group) => (Object.assign(Object.assign({}, group), { items: (group.items || [])
|
|
680
|
+
.filter((entry) => !entry.disabled)
|
|
681
|
+
.filter((item) => this.filterVisible(item))
|
|
682
|
+
.sort(sortByOrder)
|
|
683
|
+
.map((item) => {
|
|
684
|
+
if (item.children && item.children.length > 0) {
|
|
685
|
+
item.children = item.children
|
|
686
|
+
.filter((entry) => !entry.disabled)
|
|
687
|
+
.filter((child) => this.filterVisible(child))
|
|
688
|
+
.sort(sortByOrder)
|
|
689
|
+
.map((child) => {
|
|
690
|
+
if (child.component) {
|
|
691
|
+
return Object.assign({}, child);
|
|
692
|
+
}
|
|
693
|
+
if (!child.click) {
|
|
694
|
+
const childRouteRef = this.extensions.getRouteById(child.route);
|
|
695
|
+
const childUrl = `/${childRouteRef ? childRouteRef.path : child.route}`;
|
|
696
|
+
return Object.assign(Object.assign({}, child), { url: childUrl });
|
|
697
|
+
}
|
|
698
|
+
return Object.assign(Object.assign({}, child), { action: child.click });
|
|
699
|
+
});
|
|
700
|
+
return Object.assign({}, item);
|
|
701
|
+
}
|
|
702
|
+
if (item.component) {
|
|
703
|
+
return Object.assign({}, item);
|
|
704
|
+
}
|
|
705
|
+
if (!item.click) {
|
|
706
|
+
const routeRef = this.extensions.getRouteById(item.route);
|
|
707
|
+
const url = `/${routeRef ? routeRef.path : item.route}`;
|
|
708
|
+
return Object.assign(Object.assign({}, item), { url });
|
|
709
|
+
}
|
|
710
|
+
return Object.assign(Object.assign({}, item), { action: item.click });
|
|
711
|
+
})
|
|
712
|
+
.reduce(reduceEmptyMenus, []) })));
|
|
713
|
+
}
|
|
714
|
+
loadContentMetadata(config) {
|
|
715
|
+
const elements = this.loader.getElements(config, 'features.content-metadata-presets');
|
|
716
|
+
if (!elements.length) {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
719
|
+
let presets = {};
|
|
720
|
+
presets = this.filterDisabled(mergeObjects(presets, ...elements));
|
|
721
|
+
try {
|
|
722
|
+
this.appConfig.config['content-metadata'].presets = presets;
|
|
723
|
+
}
|
|
724
|
+
catch (error) {
|
|
725
|
+
this.logger.error(error, '- could not change content-metadata presets from app.config -');
|
|
726
|
+
}
|
|
727
|
+
return { presets };
|
|
728
|
+
}
|
|
729
|
+
loadSearchForms(config) {
|
|
730
|
+
const elements = this.loader.getElements(config, 'features.search');
|
|
731
|
+
if (!elements.length) {
|
|
732
|
+
return null;
|
|
733
|
+
}
|
|
734
|
+
const search = mergeArrays([], elements)
|
|
735
|
+
.filter((entry) => !entry.disabled)
|
|
736
|
+
.filter((entry) => this.filterVisible(entry))
|
|
737
|
+
.sort(sortByOrder);
|
|
738
|
+
try {
|
|
739
|
+
this.appConfig.config['search'] = search;
|
|
740
|
+
}
|
|
741
|
+
catch (error) {
|
|
742
|
+
this.logger.error(error, '- could not change search from app.config -');
|
|
743
|
+
}
|
|
744
|
+
return search;
|
|
745
|
+
}
|
|
746
|
+
filterDisabled(object) {
|
|
747
|
+
if (Array.isArray(object)) {
|
|
748
|
+
return object.filter((item) => !item.disabled).map((item) => this.filterDisabled(item));
|
|
749
|
+
}
|
|
750
|
+
else if (typeof object === 'object') {
|
|
751
|
+
if (!object.disabled) {
|
|
752
|
+
Object.keys(object).forEach((prop) => {
|
|
753
|
+
object[prop] = this.filterDisabled(object[prop]);
|
|
754
|
+
});
|
|
755
|
+
return object;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
return object;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
getNavigationGroups() {
|
|
763
|
+
return this.navbar;
|
|
764
|
+
}
|
|
765
|
+
getSidebarTabs() {
|
|
766
|
+
return this.sidebarTabs.filter((action) => this.filterVisible(action));
|
|
767
|
+
}
|
|
768
|
+
setActionDisabledFromRule(action) {
|
|
769
|
+
let disabled = false;
|
|
770
|
+
if (action && action.rules && action.rules.enabled) {
|
|
771
|
+
disabled = !this.extensions.evaluateRule(action.rules.enabled, this);
|
|
772
|
+
}
|
|
773
|
+
return Object.assign(Object.assign({}, action), { disabled });
|
|
774
|
+
}
|
|
775
|
+
getCreateActions() {
|
|
776
|
+
return this._createActions.pipe(map((createActions) => createActions
|
|
777
|
+
.filter((action) => this.filterVisible(action))
|
|
778
|
+
.map((action) => this.copyAction(action))
|
|
779
|
+
.map((action) => this.buildMenu(action))
|
|
780
|
+
.map((action) => this.setActionDisabledFromRule(action))));
|
|
781
|
+
}
|
|
782
|
+
getMainAction() {
|
|
783
|
+
return this._mainActions.pipe(filter((mainAction) => mainAction && this.filterVisible(mainAction)), map((mainAction) => {
|
|
784
|
+
let actionCopy = this.copyAction(mainAction);
|
|
785
|
+
actionCopy = this.setActionDisabledFromRule(actionCopy);
|
|
786
|
+
return actionCopy;
|
|
787
|
+
}));
|
|
788
|
+
}
|
|
789
|
+
buildMenu(actionRef) {
|
|
790
|
+
if (actionRef.type === ContentActionType.menu && actionRef.children && actionRef.children.length > 0) {
|
|
791
|
+
const children = actionRef.children.filter((action) => this.filterVisible(action)).map((action) => this.buildMenu(action));
|
|
792
|
+
actionRef.children = children
|
|
793
|
+
.map((action) => this.setActionDisabledFromRule(action))
|
|
794
|
+
.sort(sortByOrder)
|
|
795
|
+
.reduce(reduceEmptyMenus, [])
|
|
796
|
+
.reduce(reduceSeparators, []);
|
|
797
|
+
}
|
|
798
|
+
return actionRef;
|
|
799
|
+
}
|
|
800
|
+
getAllowedActions(actions) {
|
|
801
|
+
return (actions || [])
|
|
802
|
+
.filter((action) => this.filterVisible(action))
|
|
803
|
+
.map((action) => {
|
|
804
|
+
if (action.type === ContentActionType.menu) {
|
|
805
|
+
const copy = this.copyAction(action);
|
|
806
|
+
if (copy.children && copy.children.length > 0) {
|
|
807
|
+
copy.children = copy.children
|
|
808
|
+
.filter((entry) => !entry.disabled)
|
|
809
|
+
.filter((childAction) => this.filterVisible(childAction))
|
|
810
|
+
.sort(sortByOrder)
|
|
811
|
+
.reduce(reduceSeparators, []);
|
|
812
|
+
}
|
|
813
|
+
return copy;
|
|
814
|
+
}
|
|
815
|
+
return action;
|
|
816
|
+
})
|
|
817
|
+
.map((action) => this.setActionDisabledFromRule(action))
|
|
818
|
+
.reduce(reduceEmptyMenus, [])
|
|
819
|
+
.reduce(reduceSeparators, []);
|
|
820
|
+
}
|
|
821
|
+
getAllowedSidebarActions() {
|
|
822
|
+
return this._sidebarActions.pipe(map((sidebarActions) => this.getAllowedActions(sidebarActions)));
|
|
823
|
+
}
|
|
824
|
+
getAllowedToolbarActions() {
|
|
825
|
+
return this._toolbarActions.pipe(map((toolbarActions) => this.getAllowedActions(toolbarActions)));
|
|
826
|
+
}
|
|
827
|
+
getViewerToolbarActions() {
|
|
828
|
+
return this._viewerToolbarActions.pipe(map((viewerToolbarActions) => this.getAllowedActions(viewerToolbarActions)));
|
|
829
|
+
}
|
|
830
|
+
getOpenWithActions() {
|
|
831
|
+
return this._openWithActions.pipe(map((openWithActions) => this.getAllowedActions(openWithActions)));
|
|
832
|
+
}
|
|
833
|
+
getSharedLinkViewerToolbarActions() {
|
|
834
|
+
return this._sharedLinkViewerToolbarActions.pipe(map((sharedLinkViewerToolbarActions) => (!this.selection.isEmpty ? this.getAllowedActions(sharedLinkViewerToolbarActions) : [])));
|
|
835
|
+
}
|
|
836
|
+
getHeaderActions() {
|
|
837
|
+
return this._headerActions.pipe(map((headerActions) => headerActions
|
|
838
|
+
.filter((action) => this.filterVisible(action))
|
|
839
|
+
.map((action) => {
|
|
840
|
+
if (action.type === ContentActionType.menu) {
|
|
841
|
+
const copy = this.copyAction(action);
|
|
842
|
+
if (copy.children && copy.children.length > 0) {
|
|
843
|
+
copy.children = copy.children
|
|
844
|
+
.filter((childAction) => this.filterVisible(childAction))
|
|
845
|
+
.sort(sortByOrder)
|
|
846
|
+
.reduce(reduceEmptyMenus, [])
|
|
847
|
+
.reduce(reduceSeparators, []);
|
|
848
|
+
}
|
|
849
|
+
return copy;
|
|
850
|
+
}
|
|
851
|
+
return action;
|
|
852
|
+
})
|
|
853
|
+
.map((action) => this.setActionDisabledFromRule(action))
|
|
854
|
+
.sort(sortByOrder)
|
|
855
|
+
.reduce(reduceEmptyMenus, [])
|
|
856
|
+
.reduce(reduceSeparators, [])));
|
|
857
|
+
}
|
|
858
|
+
getAllowedContextMenuActions() {
|
|
859
|
+
return this._contextMenuActions.pipe(map((contextMenuActions) => (!this.selection.isEmpty ? this.getAllowedActions(contextMenuActions) : [])));
|
|
860
|
+
}
|
|
861
|
+
getSettingsGroups() {
|
|
862
|
+
return this.settingGroups.filter((group) => this.filterVisible(group));
|
|
863
|
+
}
|
|
864
|
+
copyAction(action) {
|
|
865
|
+
return Object.assign(Object.assign({}, action), { children: (action.children || []).map((child) => this.copyAction(child)) });
|
|
866
|
+
}
|
|
867
|
+
filterVisible(action) {
|
|
868
|
+
if (action && action.rules && action.rules.visible) {
|
|
869
|
+
return this.extensions.evaluateRule(action.rules.visible, this);
|
|
870
|
+
}
|
|
871
|
+
return true;
|
|
872
|
+
}
|
|
873
|
+
isViewerExtensionDisabled(extension) {
|
|
874
|
+
if (extension) {
|
|
875
|
+
if (extension.disabled) {
|
|
876
|
+
return true;
|
|
877
|
+
}
|
|
878
|
+
if (extension.rules && extension.rules.disabled) {
|
|
879
|
+
return this.extensions.evaluateRule(extension.rules.disabled, this);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return false;
|
|
883
|
+
}
|
|
884
|
+
runActionById(id, additionalPayload) {
|
|
885
|
+
const action = this.extensions.getActionById(id);
|
|
886
|
+
if (action) {
|
|
887
|
+
const { type, payload } = action;
|
|
888
|
+
const context = {
|
|
889
|
+
selection: this.selection
|
|
890
|
+
};
|
|
891
|
+
const expression = this.extensions.runExpression(payload, context);
|
|
892
|
+
this.store.dispatch({
|
|
893
|
+
type,
|
|
894
|
+
payload: expression,
|
|
895
|
+
configuration: additionalPayload
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
this.store.dispatch({
|
|
900
|
+
type: id,
|
|
901
|
+
configuration: additionalPayload
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
// todo: move to ADF/RuleService
|
|
906
|
+
isRuleDefined(ruleId) {
|
|
907
|
+
return !!(ruleId && this.getEvaluator(ruleId));
|
|
908
|
+
}
|
|
909
|
+
// todo: move to ADF/RuleService
|
|
910
|
+
evaluateRule(ruleId, ...args) {
|
|
911
|
+
const evaluator = this.getEvaluator(ruleId);
|
|
912
|
+
if (evaluator) {
|
|
913
|
+
return evaluator(this, ...args);
|
|
914
|
+
}
|
|
915
|
+
return false;
|
|
916
|
+
}
|
|
917
|
+
getEvaluator(key) {
|
|
918
|
+
return this.extensions.getEvaluator(key);
|
|
919
|
+
}
|
|
920
|
+
canPreviewNode(node) {
|
|
921
|
+
const rules = this.viewerRules;
|
|
922
|
+
if (this.isRuleDefined(rules.canPreview)) {
|
|
923
|
+
const canPreview = this.evaluateRule(rules.canPreview, node);
|
|
924
|
+
if (!canPreview) {
|
|
925
|
+
return false;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
return true;
|
|
929
|
+
}
|
|
930
|
+
canShowViewerNavigation(node) {
|
|
931
|
+
const rules = this.viewerRules;
|
|
932
|
+
if (this.isRuleDefined(rules.showNavigation)) {
|
|
933
|
+
const showNavigation = this.evaluateRule(rules.showNavigation, node);
|
|
934
|
+
if (!showNavigation) {
|
|
935
|
+
return false;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
return true;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
AppExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppExtensionService, deps: [{ token: i1$2.AuthenticationService }, { token: i1$3.Store }, { token: i3.ExtensionLoaderService }, { token: i3.ExtensionService }, { token: NodePermissionService }, { token: i1$2.AppConfigService }, { token: i1$1.MatIconRegistry }, { token: i6.DomSanitizer }, { token: i1$2.LogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
942
|
+
AppExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppExtensionService, providedIn: 'root' });
|
|
943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppExtensionService, decorators: [{
|
|
944
|
+
type: Injectable,
|
|
945
|
+
args: [{
|
|
946
|
+
providedIn: 'root'
|
|
947
|
+
}]
|
|
948
|
+
}], ctorParameters: function () { return [{ type: i1$2.AuthenticationService }, { type: i1$3.Store }, { type: i3.ExtensionLoaderService }, { type: i3.ExtensionService }, { type: NodePermissionService }, { type: i1$2.AppConfigService }, { type: i1$1.MatIconRegistry }, { type: i6.DomSanitizer }, { type: i1$2.LogService }]; } });
|
|
949
|
+
|
|
950
|
+
/*!
|
|
951
|
+
* @license
|
|
952
|
+
* Alfresco Example Content Application
|
|
953
|
+
*
|
|
954
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
955
|
+
*
|
|
956
|
+
* This file is part of the Alfresco Example Content Application.
|
|
957
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
958
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
959
|
+
* provided under the following open source license terms:
|
|
960
|
+
*
|
|
961
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
962
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
963
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
964
|
+
* (at your option) any later version.
|
|
965
|
+
*
|
|
966
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
967
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
968
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
969
|
+
* GNU Lesser General Public License for more details.
|
|
970
|
+
*
|
|
971
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
972
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
973
|
+
*/
|
|
974
|
+
class ToolbarMenuItemComponent {
|
|
975
|
+
constructor(extensions) {
|
|
976
|
+
this.extensions = extensions;
|
|
977
|
+
}
|
|
978
|
+
runAction() {
|
|
979
|
+
if (this.hasClickAction(this.actionRef)) {
|
|
980
|
+
this.extensions.runActionById(this.actionRef.actions.click, this.menuId
|
|
981
|
+
? {
|
|
982
|
+
focusedElementOnCloseSelector: `#${this.menuId.replace(/\./g, '\\.')}`
|
|
983
|
+
}
|
|
984
|
+
: undefined);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
hasClickAction(actionRef) {
|
|
988
|
+
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
|
989
|
+
}
|
|
990
|
+
trackByActionId(_, obj) {
|
|
991
|
+
return obj.id;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
ToolbarMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuItemComponent, deps: [{ token: AppExtensionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
995
|
+
ToolbarMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: { actionRef: "actionRef", menuId: "menuId" }, host: { classAttribute: "app-toolbar-menu-item" }, viewQueries: [{ propertyName: "menuItem", first: true, predicate: MatMenuItem, descendants: true }], ngImport: i0, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'menu'\">\n <button [id]=\"actionRef.id\" mat-menu-item role=\"menuitem\" tabindex=\"0\" [disabled]=\"actionRef.disabled\" [matMenuTriggerFor]=\"childMenu\">\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n\n <mat-menu #childMenu=\"matMenu\" class=\"app-create-menu__sub-menu\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"child\"></app-toolbar-menu-item>\n </ng-container>\n </mat-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'separator'\">\n <mat-divider></mat-divider>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button\n [id]=\"actionRef.id\"\n role=\"menuitem\"\n mat-menu-item\n [role]=\"'menuitem'\"\n tabindex=\"0\"\n [disabled]=\"actionRef.disabled\"\n [attr.title]=\"(actionRef.disabled ? actionRef['description-disabled'] : actionRef.description || actionRef.title) | translate\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n </ng-container>\n</ng-container>\n", styles: [".app-toolbar-menu-item:last-child>.mat-divider-horizontal{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i3$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$2.IconComponent, selector: "adf-icon", inputs: ["color", "value"] }, { kind: "component", type: i3.DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuItemComponent, decorators: [{
|
|
997
|
+
type: Component,
|
|
998
|
+
args: [{ selector: 'app-toolbar-menu-item', encapsulation: ViewEncapsulation.None, host: { class: 'app-toolbar-menu-item' }, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'menu'\">\n <button [id]=\"actionRef.id\" mat-menu-item role=\"menuitem\" tabindex=\"0\" [disabled]=\"actionRef.disabled\" [matMenuTriggerFor]=\"childMenu\">\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n\n <mat-menu #childMenu=\"matMenu\" class=\"app-create-menu__sub-menu\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"child\"></app-toolbar-menu-item>\n </ng-container>\n </mat-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'separator'\">\n <mat-divider></mat-divider>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button\n [id]=\"actionRef.id\"\n role=\"menuitem\"\n mat-menu-item\n [role]=\"'menuitem'\"\n tabindex=\"0\"\n [disabled]=\"actionRef.disabled\"\n [attr.title]=\"(actionRef.disabled ? actionRef['description-disabled'] : actionRef.description || actionRef.title) | translate\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n <span data-automation-id=\"menu-item-title\">{{ actionRef.title | translate }}</span>\n </button>\n </ng-container>\n</ng-container>\n", styles: [".app-toolbar-menu-item:last-child>.mat-divider-horizontal{display:none}\n"] }]
|
|
999
|
+
}], ctorParameters: function () { return [{ type: AppExtensionService }]; }, propDecorators: { actionRef: [{
|
|
1000
|
+
type: Input
|
|
1001
|
+
}], menuId: [{
|
|
1002
|
+
type: Input
|
|
1003
|
+
}], menuItem: [{
|
|
1004
|
+
type: ViewChild,
|
|
1005
|
+
args: [MatMenuItem]
|
|
1006
|
+
}] } });
|
|
1007
|
+
|
|
1008
|
+
/*!
|
|
1009
|
+
* @license
|
|
1010
|
+
* Alfresco Example Content Application
|
|
1011
|
+
*
|
|
1012
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1013
|
+
*
|
|
1014
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1015
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1016
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1017
|
+
* provided under the following open source license terms:
|
|
1018
|
+
*
|
|
1019
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1020
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1021
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1022
|
+
* (at your option) any later version.
|
|
1023
|
+
*
|
|
1024
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1025
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1026
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1027
|
+
* GNU Lesser General Public License for more details.
|
|
1028
|
+
*
|
|
1029
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1030
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1031
|
+
*/
|
|
1032
|
+
class ToolbarMenuComponent {
|
|
1033
|
+
handleKeydownEscape() {
|
|
1034
|
+
this.matTrigger.closeMenu();
|
|
1035
|
+
}
|
|
1036
|
+
ngAfterViewInit() {
|
|
1037
|
+
const menuItems = [];
|
|
1038
|
+
this.toolbarMenuItems.forEach((toolbarMenuItem) => {
|
|
1039
|
+
if (toolbarMenuItem.menuItem !== undefined) {
|
|
1040
|
+
menuItems.push(toolbarMenuItem.menuItem);
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
const menuItemsQueryList = new QueryList();
|
|
1044
|
+
menuItemsQueryList.reset(menuItems);
|
|
1045
|
+
this.menu._allItems = menuItemsQueryList;
|
|
1046
|
+
this.menu.ngAfterContentInit();
|
|
1047
|
+
}
|
|
1048
|
+
trackByActionId(_, obj) {
|
|
1049
|
+
return obj.id;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
ToolbarMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1053
|
+
ToolbarMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarMenuComponent, selector: "app-toolbar-menu", inputs: { actionRef: "actionRef", color: "color" }, host: { listeners: { "document:keydown.Escape": "handleKeydownEscape()" }, classAttribute: "app-toolbar-menu" }, viewQueries: [{ propertyName: "matTrigger", first: true, predicate: ["matTrigger"], descendants: true }, { propertyName: "menu", first: true, predicate: MatMenu, descendants: true }, { propertyName: "toolbarMenuItems", predicate: ToolbarMenuItemComponent, descendants: true }], ngImport: i0, template: "<button\n [id]=\"actionRef.id\"\n [color]=\"color\"\n mat-icon-button\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"actionRef.disabled\"\n #matTrigger=\"matMenuTrigger\"\n>\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" [overlapTrigger]=\"false\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <ng-container [ngSwitch]=\"child.type\">\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"child.component\" [data]=\"child.data\"></adf-dynamic-component>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <app-toolbar-menu-item [actionRef]=\"child\" [menuId]=\"actionRef.id\"></app-toolbar-menu-item>\n </ng-container>\n </ng-container>\n </ng-container>\n</mat-menu>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$2.IconComponent, selector: "adf-icon", inputs: ["color", "value"] }, { kind: "component", type: i3.DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarMenuComponent, decorators: [{
|
|
1055
|
+
type: Component,
|
|
1056
|
+
args: [{ selector: 'app-toolbar-menu', encapsulation: ViewEncapsulation.None, host: { class: 'app-toolbar-menu' }, template: "<button\n [id]=\"actionRef.id\"\n [color]=\"color\"\n mat-icon-button\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"actionRef.disabled\"\n #matTrigger=\"matMenuTrigger\"\n>\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" [overlapTrigger]=\"false\">\n <ng-container *ngFor=\"let child of actionRef.children; trackBy: trackByActionId\">\n <ng-container [ngSwitch]=\"child.type\">\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [id]=\"child.component\" [data]=\"child.data\"></adf-dynamic-component>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <app-toolbar-menu-item [actionRef]=\"child\" [menuId]=\"actionRef.id\"></app-toolbar-menu-item>\n </ng-container>\n </ng-container>\n </ng-container>\n</mat-menu>\n" }]
|
|
1057
|
+
}], propDecorators: { actionRef: [{
|
|
1058
|
+
type: Input
|
|
1059
|
+
}], color: [{
|
|
1060
|
+
type: Input
|
|
1061
|
+
}], matTrigger: [{
|
|
1062
|
+
type: ViewChild,
|
|
1063
|
+
args: ['matTrigger']
|
|
1064
|
+
}], menu: [{
|
|
1065
|
+
type: ViewChild,
|
|
1066
|
+
args: [MatMenu]
|
|
1067
|
+
}], toolbarMenuItems: [{
|
|
1068
|
+
type: ViewChildren,
|
|
1069
|
+
args: [ToolbarMenuItemComponent]
|
|
1070
|
+
}], handleKeydownEscape: [{
|
|
1071
|
+
type: HostListener,
|
|
1072
|
+
args: ['document:keydown.Escape']
|
|
1073
|
+
}] } });
|
|
1074
|
+
|
|
1075
|
+
/*!
|
|
1076
|
+
* @license
|
|
1077
|
+
* Alfresco Example Content Application
|
|
1078
|
+
*
|
|
1079
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1080
|
+
*
|
|
1081
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1082
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1083
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1084
|
+
* provided under the following open source license terms:
|
|
1085
|
+
*
|
|
1086
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1087
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1088
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1089
|
+
* (at your option) any later version.
|
|
1090
|
+
*
|
|
1091
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1092
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1093
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1094
|
+
* GNU Lesser General Public License for more details.
|
|
1095
|
+
*
|
|
1096
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1097
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1098
|
+
*/
|
|
1099
|
+
var ToolbarButtonType;
|
|
1100
|
+
(function (ToolbarButtonType) {
|
|
1101
|
+
ToolbarButtonType["ICON_BUTTON"] = "icon-button";
|
|
1102
|
+
ToolbarButtonType["MENU_ITEM"] = "menu-item";
|
|
1103
|
+
})(ToolbarButtonType || (ToolbarButtonType = {}));
|
|
1104
|
+
class ToolbarButtonComponent {
|
|
1105
|
+
constructor(extensions) {
|
|
1106
|
+
this.extensions = extensions;
|
|
1107
|
+
this.type = ToolbarButtonType.ICON_BUTTON;
|
|
1108
|
+
}
|
|
1109
|
+
runAction() {
|
|
1110
|
+
if (this.hasClickAction(this.actionRef)) {
|
|
1111
|
+
this.extensions.runActionById(this.actionRef.actions.click, {
|
|
1112
|
+
focusedElementOnCloseSelector: `#${this.actionRef.id.replace(/\./g, '\\.')}`
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
hasClickAction(actionRef) {
|
|
1117
|
+
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
ToolbarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarButtonComponent, deps: [{ token: AppExtensionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1121
|
+
ToolbarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarButtonComponent, selector: "app-toolbar-button", inputs: { type: "type", color: "color", actionRef: "actionRef" }, host: { classAttribute: "app-toolbar-button" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'icon-button'\">\n <button\n [id]=\"actionRef.id\"\n mat-icon-button\n [color]=\"color\"\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [disabled]=\"actionRef.disabled\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"'menu-item'\">\n <app-toolbar-menu-item [actionRef]=\"actionRef\"></app-toolbar-menu-item>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$2.IconComponent, selector: "adf-icon", inputs: ["color", "value"] }, { kind: "component", type: ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarButtonComponent, decorators: [{
|
|
1123
|
+
type: Component,
|
|
1124
|
+
args: [{ selector: 'app-toolbar-button', encapsulation: ViewEncapsulation.None, host: { class: 'app-toolbar-button' }, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'icon-button'\">\n <button\n [id]=\"actionRef.id\"\n mat-icon-button\n [color]=\"color\"\n [attr.aria-label]=\"actionRef.description || actionRef.title | translate\"\n [attr.title]=\"actionRef.description || actionRef.title | translate\"\n [disabled]=\"actionRef.disabled\"\n (click)=\"runAction()\"\n >\n <adf-icon [value]=\"actionRef.icon\"></adf-icon>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"'menu-item'\">\n <app-toolbar-menu-item [actionRef]=\"actionRef\"></app-toolbar-menu-item>\n </ng-container>\n</ng-container>\n" }]
|
|
1125
|
+
}], ctorParameters: function () { return [{ type: AppExtensionService }]; }, propDecorators: { type: [{
|
|
1126
|
+
type: Input
|
|
1127
|
+
}], color: [{
|
|
1128
|
+
type: Input
|
|
1129
|
+
}], actionRef: [{
|
|
1130
|
+
type: Input
|
|
1131
|
+
}] } });
|
|
1132
|
+
|
|
1133
|
+
/*!
|
|
1134
|
+
* @license
|
|
1135
|
+
* Alfresco Example Content Application
|
|
1136
|
+
*
|
|
1137
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1138
|
+
*
|
|
1139
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1140
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1141
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1142
|
+
* provided under the following open source license terms:
|
|
1143
|
+
*
|
|
1144
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1145
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1146
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1147
|
+
* (at your option) any later version.
|
|
1148
|
+
*
|
|
1149
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1150
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1151
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1152
|
+
* GNU Lesser General Public License for more details.
|
|
1153
|
+
*
|
|
1154
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1155
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1156
|
+
*/
|
|
1157
|
+
class ToolbarActionComponent {
|
|
1158
|
+
constructor(cd) {
|
|
1159
|
+
this.cd = cd;
|
|
1160
|
+
this.type = ToolbarButtonType.ICON_BUTTON;
|
|
1161
|
+
}
|
|
1162
|
+
// todo: review after ADF 2.6
|
|
1163
|
+
// preview component : change detection workaround for children without input
|
|
1164
|
+
ngDoCheck() {
|
|
1165
|
+
if (this.actionRef.id.includes('app.viewer')) {
|
|
1166
|
+
this.cd.markForCheck();
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
ToolbarActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarActionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1171
|
+
ToolbarActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ToolbarActionComponent, selector: "aca-toolbar-action", inputs: { type: "type", color: "color", actionRef: "actionRef" }, host: { classAttribute: "aca-toolbar-action" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <adf-toolbar-divider *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\"></adf-toolbar-divider>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i1$2.ToolbarDividerComponent, selector: "adf-toolbar-divider" }, { kind: "component", type: i3.DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }, { kind: "component", type: ToolbarButtonComponent, selector: "app-toolbar-button", inputs: ["type", "color", "actionRef"] }, { kind: "component", type: ToolbarMenuComponent, selector: "app-toolbar-menu", inputs: ["actionRef", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ToolbarActionComponent, decorators: [{
|
|
1173
|
+
type: Component,
|
|
1174
|
+
args: [{ selector: 'aca-toolbar-action', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-toolbar-action' }, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <adf-toolbar-divider *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\"></adf-toolbar-divider>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"] }]
|
|
1175
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { type: [{
|
|
1176
|
+
type: Input
|
|
1177
|
+
}], color: [{
|
|
1178
|
+
type: Input
|
|
1179
|
+
}], actionRef: [{
|
|
1180
|
+
type: Input
|
|
1181
|
+
}] } });
|
|
1182
|
+
|
|
1183
|
+
/*!
|
|
1184
|
+
* @license
|
|
1185
|
+
* Alfresco Example Content Application
|
|
1186
|
+
*
|
|
1187
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1188
|
+
*
|
|
1189
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1190
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1191
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1192
|
+
* provided under the following open source license terms:
|
|
1193
|
+
*
|
|
1194
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1195
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1196
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1197
|
+
* (at your option) any later version.
|
|
1198
|
+
*
|
|
1199
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1200
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1201
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1202
|
+
* GNU Lesser General Public License for more details.
|
|
1203
|
+
*
|
|
1204
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1205
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1206
|
+
*/
|
|
1207
|
+
class SharedToolbarModule {
|
|
1208
|
+
}
|
|
1209
|
+
SharedToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1210
|
+
SharedToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, declarations: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent], imports: [CommonModule, CoreModule, ExtensionsModule], exports: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent] });
|
|
1211
|
+
SharedToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, imports: [CommonModule, CoreModule, ExtensionsModule] });
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedToolbarModule, decorators: [{
|
|
1213
|
+
type: NgModule,
|
|
1214
|
+
args: [{
|
|
1215
|
+
imports: [CommonModule, CoreModule, ExtensionsModule],
|
|
1216
|
+
declarations: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent],
|
|
1217
|
+
exports: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent]
|
|
1218
|
+
}]
|
|
1219
|
+
}] });
|
|
1220
|
+
|
|
1221
|
+
/*!
|
|
1222
|
+
* @license
|
|
1223
|
+
* Alfresco Example Content Application
|
|
1224
|
+
*
|
|
1225
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1226
|
+
*
|
|
1227
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1228
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1229
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1230
|
+
* provided under the following open source license terms:
|
|
1231
|
+
*
|
|
1232
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1233
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1234
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1235
|
+
* (at your option) any later version.
|
|
1236
|
+
*
|
|
1237
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1238
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1239
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1240
|
+
* GNU Lesser General Public License for more details.
|
|
1241
|
+
*
|
|
1242
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1243
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1244
|
+
*/
|
|
1245
|
+
class ContentApiService {
|
|
1246
|
+
constructor(api, preferences) {
|
|
1247
|
+
this.api = api;
|
|
1248
|
+
this.preferences = preferences;
|
|
1249
|
+
}
|
|
1250
|
+
get nodesApi() {
|
|
1251
|
+
var _a;
|
|
1252
|
+
this._nodesApi = (_a = this._nodesApi) !== null && _a !== void 0 ? _a : new NodesApi(this.api.getInstance());
|
|
1253
|
+
return this._nodesApi;
|
|
1254
|
+
}
|
|
1255
|
+
get trashcanApi() {
|
|
1256
|
+
var _a;
|
|
1257
|
+
this._trashcanApi = (_a = this._trashcanApi) !== null && _a !== void 0 ? _a : new TrashcanApi(this.api.getInstance());
|
|
1258
|
+
return this._trashcanApi;
|
|
1259
|
+
}
|
|
1260
|
+
get sharedLinksApi() {
|
|
1261
|
+
var _a;
|
|
1262
|
+
this._sharedLinksApi = (_a = this._sharedLinksApi) !== null && _a !== void 0 ? _a : new SharedlinksApi(this.api.getInstance());
|
|
1263
|
+
return this._sharedLinksApi;
|
|
1264
|
+
}
|
|
1265
|
+
get discoveryApi() {
|
|
1266
|
+
var _a;
|
|
1267
|
+
this._discoveryApi = (_a = this._discoveryApi) !== null && _a !== void 0 ? _a : new DiscoveryApi(this.api.getInstance());
|
|
1268
|
+
return this._discoveryApi;
|
|
1269
|
+
}
|
|
1270
|
+
get favoritesApi() {
|
|
1271
|
+
var _a;
|
|
1272
|
+
this._favoritesApi = (_a = this._favoritesApi) !== null && _a !== void 0 ? _a : new FavoritesApi(this.api.getInstance());
|
|
1273
|
+
return this._favoritesApi;
|
|
1274
|
+
}
|
|
1275
|
+
get contentApi() {
|
|
1276
|
+
var _a;
|
|
1277
|
+
this._contentApi = (_a = this._contentApi) !== null && _a !== void 0 ? _a : new ContentApi(this.api.getInstance());
|
|
1278
|
+
return this._contentApi;
|
|
1279
|
+
}
|
|
1280
|
+
get sitesApi() {
|
|
1281
|
+
var _a;
|
|
1282
|
+
this._sitesApi = (_a = this._sitesApi) !== null && _a !== void 0 ? _a : new SitesApi(this.api.getInstance());
|
|
1283
|
+
return this._sitesApi;
|
|
1284
|
+
}
|
|
1285
|
+
get searchApi() {
|
|
1286
|
+
var _a;
|
|
1287
|
+
this._searchApi = (_a = this._searchApi) !== null && _a !== void 0 ? _a : new SearchApi(this.api.getInstance());
|
|
1288
|
+
return this._searchApi;
|
|
1289
|
+
}
|
|
1290
|
+
get peopleApi() {
|
|
1291
|
+
var _a;
|
|
1292
|
+
this._peopleApi = (_a = this._peopleApi) !== null && _a !== void 0 ? _a : new PeopleApi(this.api.getInstance());
|
|
1293
|
+
return this._peopleApi;
|
|
1294
|
+
}
|
|
1295
|
+
get versionsApi() {
|
|
1296
|
+
var _a;
|
|
1297
|
+
this._versionsApi = (_a = this._versionsApi) !== null && _a !== void 0 ? _a : new VersionsApi(this.api.getInstance());
|
|
1298
|
+
return this._versionsApi;
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Moves a node to the trashcan.
|
|
1302
|
+
*
|
|
1303
|
+
* @param nodeId ID of the target node
|
|
1304
|
+
* @param options Optional parameters supported by JS-API
|
|
1305
|
+
* @returns Empty result that notifies when the deletion is complete
|
|
1306
|
+
*/
|
|
1307
|
+
deleteNode(nodeId, options = {}) {
|
|
1308
|
+
return from(this.nodesApi.deleteNode(nodeId, options));
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Gets the stored information about a node.
|
|
1312
|
+
*
|
|
1313
|
+
* @param nodeId ID of the target node
|
|
1314
|
+
* @param options Optional parameters supported by JS-API
|
|
1315
|
+
* @returns Node information
|
|
1316
|
+
*/
|
|
1317
|
+
getNode(nodeId, options = {}) {
|
|
1318
|
+
const defaults = {
|
|
1319
|
+
include: ['path', 'properties', 'allowableOperations', 'permissions', 'definition']
|
|
1320
|
+
};
|
|
1321
|
+
const queryOptions = Object.assign(defaults, options);
|
|
1322
|
+
return from(this.nodesApi.getNode(nodeId, queryOptions));
|
|
1323
|
+
}
|
|
1324
|
+
getNodeInfo(nodeId, options) {
|
|
1325
|
+
const defaults = {
|
|
1326
|
+
include: ['isFavorite', 'allowableOperations', 'path', 'definition']
|
|
1327
|
+
};
|
|
1328
|
+
const queryOptions = Object.assign(defaults, options || {});
|
|
1329
|
+
// @ts-ignore
|
|
1330
|
+
return from(new Promise((resolve, reject) => {
|
|
1331
|
+
this.nodesApi.getNode(nodeId, queryOptions).then((nodeEntry) => {
|
|
1332
|
+
resolve(nodeEntry.entry);
|
|
1333
|
+
}, (error) => {
|
|
1334
|
+
reject(error);
|
|
1335
|
+
});
|
|
1336
|
+
}));
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Gets the items contained in a folder node.
|
|
1340
|
+
*
|
|
1341
|
+
* @param nodeId ID of the target node
|
|
1342
|
+
* @param options Optional parameters supported by JS-API
|
|
1343
|
+
* @returns List of child items from the folder
|
|
1344
|
+
*/
|
|
1345
|
+
getNodeChildren(nodeId, options = {}) {
|
|
1346
|
+
const defaults = {
|
|
1347
|
+
maxItems: this.preferences.paginationSize,
|
|
1348
|
+
skipCount: 0,
|
|
1349
|
+
include: ['isLocked', 'path', 'properties', 'allowableOperations', 'permissions']
|
|
1350
|
+
};
|
|
1351
|
+
const queryOptions = Object.assign(defaults, options);
|
|
1352
|
+
return from(this.nodesApi.listNodeChildren(nodeId, queryOptions));
|
|
1353
|
+
}
|
|
1354
|
+
deleteSharedLink(linkId) {
|
|
1355
|
+
return from(this.sharedLinksApi.deleteSharedLink(linkId));
|
|
1356
|
+
}
|
|
1357
|
+
getDeletedNodes(options = {}) {
|
|
1358
|
+
const defaults = {
|
|
1359
|
+
include: ['path']
|
|
1360
|
+
};
|
|
1361
|
+
const queryOptions = Object.assign(defaults, options);
|
|
1362
|
+
return from(this.trashcanApi.listDeletedNodes(queryOptions));
|
|
1363
|
+
}
|
|
1364
|
+
restoreNode(nodeId) {
|
|
1365
|
+
return from(this.trashcanApi.restoreDeletedNode(nodeId));
|
|
1366
|
+
}
|
|
1367
|
+
purgeDeletedNode(nodeId) {
|
|
1368
|
+
return from(this.trashcanApi.deleteDeletedNode(nodeId));
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Gets information about a user identified by their username.
|
|
1372
|
+
*
|
|
1373
|
+
* @param personId ID of the target user
|
|
1374
|
+
* @param options Api options
|
|
1375
|
+
* @returns User information
|
|
1376
|
+
*/
|
|
1377
|
+
getPerson(personId, options) {
|
|
1378
|
+
return from(this.peopleApi.getPerson(personId, options));
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Copy a node to destination node
|
|
1382
|
+
*
|
|
1383
|
+
* @param nodeId The id of the node to be copied
|
|
1384
|
+
* @param targetParentId The id of the folder-node where the node have to be copied to
|
|
1385
|
+
* @param name The new name for the copy that would be added on the destination folder
|
|
1386
|
+
* @param opts Api options
|
|
1387
|
+
*/
|
|
1388
|
+
copyNode(nodeId, targetParentId, name, opts) {
|
|
1389
|
+
return from(this.nodesApi.copyNode(nodeId, { targetParentId, name }, opts));
|
|
1390
|
+
}
|
|
1391
|
+
/**
|
|
1392
|
+
* Gets product information for Content Services.
|
|
1393
|
+
*
|
|
1394
|
+
* @returns ProductVersionModel containing product details
|
|
1395
|
+
*/
|
|
1396
|
+
getRepositoryInformation() {
|
|
1397
|
+
return from(this.discoveryApi.getRepositoryInformation());
|
|
1398
|
+
}
|
|
1399
|
+
getFavorites(personId, opts) {
|
|
1400
|
+
return from(this.favoritesApi.listFavorites(personId, opts));
|
|
1401
|
+
}
|
|
1402
|
+
getFavoriteLibraries(personId = '-me-', opts) {
|
|
1403
|
+
return this.getFavorites(personId, Object.assign(Object.assign({}, opts), { where: '(EXISTS(target/site))' })).pipe(map((response) => ({
|
|
1404
|
+
list: {
|
|
1405
|
+
entries: response.list.entries.map(({ entry }) => {
|
|
1406
|
+
entry.target.site.createdAt = entry.createdAt;
|
|
1407
|
+
return {
|
|
1408
|
+
entry: entry.target.site
|
|
1409
|
+
};
|
|
1410
|
+
}),
|
|
1411
|
+
pagination: response.list.pagination
|
|
1412
|
+
}
|
|
1413
|
+
})));
|
|
1414
|
+
}
|
|
1415
|
+
findSharedLinks(opts) {
|
|
1416
|
+
return from(this.sharedLinksApi.listSharedLinks(opts));
|
|
1417
|
+
}
|
|
1418
|
+
getSharedLinkContent(sharedId, attachment) {
|
|
1419
|
+
return this.contentApi.getSharedLinkContentUrl(sharedId, attachment);
|
|
1420
|
+
}
|
|
1421
|
+
search(request) {
|
|
1422
|
+
return from(this.searchApi.search(request));
|
|
1423
|
+
}
|
|
1424
|
+
getContentUrl(nodeId, attachment) {
|
|
1425
|
+
return this.contentApi.getContentUrl(nodeId, attachment);
|
|
1426
|
+
}
|
|
1427
|
+
getVersionContentUrl(nodeId, versionId, attachment) {
|
|
1428
|
+
return this.contentApi.getVersionContentUrl(nodeId, versionId, attachment);
|
|
1429
|
+
}
|
|
1430
|
+
deleteSite(siteId, opts) {
|
|
1431
|
+
return from(this.sitesApi.deleteSite(siteId, opts));
|
|
1432
|
+
}
|
|
1433
|
+
leaveSite(siteId) {
|
|
1434
|
+
return from(this.sitesApi.deleteSiteMembership(siteId, '-me-'));
|
|
1435
|
+
}
|
|
1436
|
+
createSite(siteBody, opts) {
|
|
1437
|
+
return from(this.sitesApi.createSite(siteBody, opts));
|
|
1438
|
+
}
|
|
1439
|
+
getSite(siteId, opts) {
|
|
1440
|
+
return from(this.sitesApi.getSite(siteId, opts));
|
|
1441
|
+
}
|
|
1442
|
+
updateLibrary(siteId, siteBody) {
|
|
1443
|
+
return from(this.sitesApi.updateSite(siteId, siteBody));
|
|
1444
|
+
}
|
|
1445
|
+
addFavorite(nodes) {
|
|
1446
|
+
const payload = nodes.map((node) => {
|
|
1447
|
+
const { isFolder, nodeId, id } = node.entry;
|
|
1448
|
+
const siteId = node.entry['guid'];
|
|
1449
|
+
const type = siteId ? 'site' : isFolder ? 'folder' : 'file';
|
|
1450
|
+
const guid = siteId || nodeId || id;
|
|
1451
|
+
return {
|
|
1452
|
+
target: {
|
|
1453
|
+
[type]: {
|
|
1454
|
+
guid
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
});
|
|
1459
|
+
return from(this.favoritesApi.createFavorite('-me-', payload));
|
|
1460
|
+
}
|
|
1461
|
+
removeFavorite(nodes) {
|
|
1462
|
+
return from(Promise.all(nodes.map((node) => {
|
|
1463
|
+
const id = node.entry.nodeId || node.entry.id;
|
|
1464
|
+
return this.favoritesApi.deleteFavorite('-me-', id);
|
|
1465
|
+
})));
|
|
1466
|
+
}
|
|
1467
|
+
unlockNode(nodeId, opts) {
|
|
1468
|
+
return this.nodesApi.unlockNode(nodeId, opts);
|
|
1469
|
+
}
|
|
1470
|
+
getNodeVersions(nodeId, opts) {
|
|
1471
|
+
return from(this.versionsApi.listVersionHistory(nodeId, opts));
|
|
1472
|
+
}
|
|
1473
|
+
requestNodeDirectAccessUrl(nodeId) {
|
|
1474
|
+
return from(this.nodesApi.requestDirectAccessUrl(nodeId));
|
|
1475
|
+
}
|
|
1476
|
+
requestVersionDirectAccessUrl(nodeId, versionId) {
|
|
1477
|
+
return from(this.versionsApi.requestDirectAccessUrl(nodeId, versionId));
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
ContentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentApiService, deps: [{ token: i1$2.AlfrescoApiService }, { token: i1$2.UserPreferencesService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1481
|
+
ContentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentApiService, providedIn: 'root' });
|
|
1482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContentApiService, decorators: [{
|
|
1483
|
+
type: Injectable,
|
|
1484
|
+
args: [{
|
|
1485
|
+
providedIn: 'root'
|
|
1486
|
+
}]
|
|
1487
|
+
}], ctorParameters: function () { return [{ type: i1$2.AlfrescoApiService }, { type: i1$2.UserPreferencesService }]; } });
|
|
1488
|
+
|
|
1489
|
+
/*!
|
|
1490
|
+
* @license
|
|
1491
|
+
* Alfresco Example Content Application
|
|
1492
|
+
*
|
|
1493
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1494
|
+
*
|
|
1495
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1496
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1497
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1498
|
+
* provided under the following open source license terms:
|
|
1499
|
+
*
|
|
1500
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1501
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1502
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1503
|
+
* (at your option) any later version.
|
|
1504
|
+
*
|
|
1505
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1506
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1507
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1508
|
+
* GNU Lesser General Public License for more details.
|
|
1509
|
+
*
|
|
1510
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1511
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1512
|
+
*/
|
|
1513
|
+
class InfoDrawerComponent {
|
|
1514
|
+
constructor(store, contentApi, extensions) {
|
|
1515
|
+
this.store = store;
|
|
1516
|
+
this.contentApi = contentApi;
|
|
1517
|
+
this.extensions = extensions;
|
|
1518
|
+
this.isLoading = false;
|
|
1519
|
+
this.tabs = [];
|
|
1520
|
+
this.actions = [];
|
|
1521
|
+
this.onDestroy$ = new Subject();
|
|
1522
|
+
this.preventFromClosing = false;
|
|
1523
|
+
}
|
|
1524
|
+
onEscapeKeyboardEvent() {
|
|
1525
|
+
this.close();
|
|
1526
|
+
}
|
|
1527
|
+
ngOnInit() {
|
|
1528
|
+
this.tabs = this.extensions.getSidebarTabs();
|
|
1529
|
+
this.extensions
|
|
1530
|
+
.getAllowedSidebarActions()
|
|
1531
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
1532
|
+
.subscribe((actions) => {
|
|
1533
|
+
this.actions = actions;
|
|
1534
|
+
});
|
|
1535
|
+
this.store
|
|
1536
|
+
.select(infoDrawerPreview)
|
|
1537
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
1538
|
+
.subscribe((isInfoDrawerPreviewOpened) => {
|
|
1539
|
+
this.preventFromClosing = isInfoDrawerPreviewOpened;
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
ngOnDestroy() {
|
|
1543
|
+
this.onDestroy$.next(true);
|
|
1544
|
+
this.onDestroy$.complete();
|
|
1545
|
+
if (!this.preventFromClosing) {
|
|
1546
|
+
this.store.dispatch(new SetInfoDrawerStateAction(false));
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
ngOnChanges() {
|
|
1550
|
+
if (this.node) {
|
|
1551
|
+
if (this.node['isLibrary']) {
|
|
1552
|
+
return this.setDisplayNode(this.node);
|
|
1553
|
+
}
|
|
1554
|
+
const entry = this.node.entry;
|
|
1555
|
+
const id = entry.nodeId || entry.id;
|
|
1556
|
+
return this.loadNodeInfo(id);
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
trackByActionId(_, action) {
|
|
1560
|
+
return action.id;
|
|
1561
|
+
}
|
|
1562
|
+
getEntryColor(entry) {
|
|
1563
|
+
return entry === null || entry === void 0 ? void 0 : entry.color;
|
|
1564
|
+
}
|
|
1565
|
+
close() {
|
|
1566
|
+
this.store.dispatch(new ToggleInfoDrawerAction());
|
|
1567
|
+
}
|
|
1568
|
+
loadNodeInfo(nodeId) {
|
|
1569
|
+
if (nodeId) {
|
|
1570
|
+
this.isLoading = true;
|
|
1571
|
+
this.contentApi.getNodeInfo(nodeId).subscribe((entity) => {
|
|
1572
|
+
this.setDisplayNode(entity);
|
|
1573
|
+
this.isLoading = false;
|
|
1574
|
+
}, () => (this.isLoading = false));
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
setDisplayNode(node) {
|
|
1578
|
+
this.displayNode = node;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
InfoDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InfoDrawerComponent, deps: [{ token: i1$3.Store }, { token: ContentApiService }, { token: AppExtensionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1582
|
+
InfoDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: InfoDrawerComponent, selector: "aca-info-drawer", inputs: { nodeId: "nodeId", node: "node" }, host: { listeners: { "keydown.escape": "onEscapeKeyboardEvent()" } }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [title]=\"'APP.INFO_DRAWER.TITLE'\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <adf-toolbar class=\"adf-toolbar--inline\" info-drawer-buttons>\n <ng-container *ngFor=\"let entry of actions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"entry\" [color]=\"getEntryColor(entry)\"></aca-toolbar-action>\n </ng-container>\n </adf-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.InfoDrawerTabComponent, selector: "adf-info-drawer-tab", inputs: ["label", "icon"] }, { kind: "component", type: i1$2.InfoDrawerComponent, selector: "adf-info-drawer", inputs: ["title", "selectedIndex", "showHeader"], outputs: ["currentTab"] }, { kind: "directive", type: i1$2.InfoDrawerButtonsDirective, selector: "[adf-info-drawer-buttons], [info-drawer-buttons]" }, { kind: "component", type: i6$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i3.DynamicTabComponent, selector: "adf-dynamic-tab", inputs: ["id", "node"] }, { kind: "component", type: i1$2.ToolbarComponent, selector: "adf-toolbar", inputs: ["title", "color"] }, { kind: "component", type: ToolbarActionComponent, selector: "aca-toolbar-action", inputs: ["type", "color", "actionRef"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
1583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InfoDrawerComponent, decorators: [{
|
|
1584
|
+
type: Component,
|
|
1585
|
+
args: [{ selector: 'aca-info-drawer', template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [title]=\"'APP.INFO_DRAWER.TITLE'\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <adf-toolbar class=\"adf-toolbar--inline\" info-drawer-buttons>\n <ng-container *ngFor=\"let entry of actions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"entry\" [color]=\"getEntryColor(entry)\"></aca-toolbar-action>\n </ng-container>\n </adf-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n" }]
|
|
1586
|
+
}], ctorParameters: function () { return [{ type: i1$3.Store }, { type: ContentApiService }, { type: AppExtensionService }]; }, propDecorators: { nodeId: [{
|
|
1587
|
+
type: Input
|
|
1588
|
+
}], node: [{
|
|
1589
|
+
type: Input
|
|
1590
|
+
}], onEscapeKeyboardEvent: [{
|
|
1591
|
+
type: HostListener,
|
|
1592
|
+
args: ['keydown.escape']
|
|
1593
|
+
}] } });
|
|
1594
|
+
|
|
1595
|
+
/*!
|
|
1596
|
+
* @license
|
|
1597
|
+
* Alfresco Example Content Application
|
|
1598
|
+
*
|
|
1599
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1600
|
+
*
|
|
1601
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1602
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1603
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1604
|
+
* provided under the following open source license terms:
|
|
1605
|
+
*
|
|
1606
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1607
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1608
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1609
|
+
* (at your option) any later version.
|
|
1610
|
+
*
|
|
1611
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1612
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1613
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1614
|
+
* GNU Lesser General Public License for more details.
|
|
1615
|
+
*
|
|
1616
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1617
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1618
|
+
*/
|
|
1619
|
+
class SharedInfoDrawerModule {
|
|
1620
|
+
}
|
|
1621
|
+
SharedInfoDrawerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1622
|
+
SharedInfoDrawerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, declarations: [InfoDrawerComponent], imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule], exports: [InfoDrawerComponent] });
|
|
1623
|
+
SharedInfoDrawerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule] });
|
|
1624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedInfoDrawerModule, decorators: [{
|
|
1625
|
+
type: NgModule,
|
|
1626
|
+
args: [{
|
|
1627
|
+
imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule],
|
|
1628
|
+
declarations: [InfoDrawerComponent],
|
|
1629
|
+
exports: [InfoDrawerComponent]
|
|
1630
|
+
}]
|
|
1631
|
+
}] });
|
|
1632
|
+
|
|
1633
|
+
/*!
|
|
1634
|
+
* @license
|
|
1635
|
+
* Alfresco Example Content Application
|
|
1636
|
+
*
|
|
1637
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1638
|
+
*
|
|
1639
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1640
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1641
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1642
|
+
* provided under the following open source license terms:
|
|
1643
|
+
*
|
|
1644
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1645
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1646
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1647
|
+
* (at your option) any later version.
|
|
1648
|
+
*
|
|
1649
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1650
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1651
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1652
|
+
* GNU Lesser General Public License for more details.
|
|
1653
|
+
*
|
|
1654
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1655
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1656
|
+
*/
|
|
1657
|
+
function isLocked(node) {
|
|
1658
|
+
const { entry } = node;
|
|
1659
|
+
return ((entry && entry.isLocked) ||
|
|
1660
|
+
(entry.properties && (entry.properties['cm:lockType'] === 'READ_ONLY_LOCK' || entry.properties['cm:lockType'] === 'WRITE_LOCK')));
|
|
1661
|
+
}
|
|
1662
|
+
function isLibrary(node) {
|
|
1663
|
+
const { entry } = node;
|
|
1664
|
+
return (entry.guid && entry.id && entry.preset && entry.title && entry.visibility) || entry.nodeType === 'st:site';
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/*
|
|
1668
|
+
* Copyright © 2005 - 2021 Alfresco Software, Ltd. All rights reserved.
|
|
1669
|
+
*
|
|
1670
|
+
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
|
1671
|
+
* pursuant to a written agreement and any use of this program without such an
|
|
1672
|
+
* agreement is prohibited.
|
|
1673
|
+
*/
|
|
1674
|
+
class DocumentBasePageService {
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/*!
|
|
1678
|
+
* @license
|
|
1679
|
+
* Alfresco Example Content Application
|
|
1680
|
+
*
|
|
1681
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1682
|
+
*
|
|
1683
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1684
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1685
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1686
|
+
* provided under the following open source license terms:
|
|
1687
|
+
*
|
|
1688
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1689
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1690
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1691
|
+
* (at your option) any later version.
|
|
1692
|
+
*
|
|
1693
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1694
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1695
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1696
|
+
* GNU Lesser General Public License for more details.
|
|
1697
|
+
*
|
|
1698
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1699
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1700
|
+
*/
|
|
1701
|
+
/* eslint-disable @angular-eslint/directive-class-suffix */
|
|
1702
|
+
class PageComponent {
|
|
1703
|
+
constructor(store, extensions, content) {
|
|
1704
|
+
this.store = store;
|
|
1705
|
+
this.extensions = extensions;
|
|
1706
|
+
this.content = content;
|
|
1707
|
+
this.onDestroy$ = new Subject();
|
|
1708
|
+
this.title = 'Page';
|
|
1709
|
+
this.actions = [];
|
|
1710
|
+
this.viewerToolbarActions = [];
|
|
1711
|
+
this.canUpdateNode = false;
|
|
1712
|
+
this.canUpload = false;
|
|
1713
|
+
this.showHeader = ShowHeaderMode.Data;
|
|
1714
|
+
this.filterSorting = 'name-asc';
|
|
1715
|
+
this.subscriptions = [];
|
|
1716
|
+
}
|
|
1717
|
+
ngOnInit() {
|
|
1718
|
+
this.sharedPreviewUrl$ = this.store.select(getSharedUrl);
|
|
1719
|
+
this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened).pipe(map((infoDrawerState) => !this.isOutletPreviewUrl() && infoDrawerState));
|
|
1720
|
+
this.documentDisplayMode$ = this.store.select(getDocumentDisplayMode);
|
|
1721
|
+
this.store
|
|
1722
|
+
.select(getAppSelection)
|
|
1723
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
1724
|
+
.subscribe((selection) => {
|
|
1725
|
+
this.selection = selection;
|
|
1726
|
+
this.canUpdateNode = this.selection.count === 1 && this.content.canUpdateNode(selection.first);
|
|
1727
|
+
});
|
|
1728
|
+
this.extensions
|
|
1729
|
+
.getAllowedToolbarActions()
|
|
1730
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
1731
|
+
.subscribe((actions) => {
|
|
1732
|
+
this.actions = actions;
|
|
1733
|
+
});
|
|
1734
|
+
this.extensions
|
|
1735
|
+
.getViewerToolbarActions()
|
|
1736
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
1737
|
+
.subscribe((actions) => {
|
|
1738
|
+
this.viewerToolbarActions = actions;
|
|
1739
|
+
});
|
|
1740
|
+
this.store
|
|
1741
|
+
.select(getCurrentFolder)
|
|
1742
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
1743
|
+
.subscribe((node) => {
|
|
1744
|
+
this.canUpload = node && this.content.canUploadContent(node);
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
ngOnChanges(changes) {
|
|
1748
|
+
if (changes.nodeResult && changes.nodeResult.currentValue) {
|
|
1749
|
+
this.nodeResult = changes.nodeResult.currentValue;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
ngOnDestroy() {
|
|
1753
|
+
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
1754
|
+
this.subscriptions = [];
|
|
1755
|
+
this.onDestroy$.next(true);
|
|
1756
|
+
this.onDestroy$.complete();
|
|
1757
|
+
this.store.dispatch(new SetSelectedNodesAction([]));
|
|
1758
|
+
}
|
|
1759
|
+
showPreview(node, extras) {
|
|
1760
|
+
if (node && node.entry) {
|
|
1761
|
+
let id;
|
|
1762
|
+
if (node.entry.nodeType === 'app:filelink') {
|
|
1763
|
+
id = node.entry.properties['cm:destination'];
|
|
1764
|
+
}
|
|
1765
|
+
else {
|
|
1766
|
+
id = node.entry.nodeId || node.entry.guid || node.entry.id;
|
|
1767
|
+
}
|
|
1768
|
+
this.store.dispatch(new ViewNodeAction(id, extras));
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
getParentNodeId() {
|
|
1772
|
+
return this.node ? this.node.id : null;
|
|
1773
|
+
}
|
|
1774
|
+
imageResolver(row) {
|
|
1775
|
+
if (isLocked(row.node)) {
|
|
1776
|
+
return 'assets/images/baseline-lock-24px.svg';
|
|
1777
|
+
}
|
|
1778
|
+
if (isLibrary(row.node)) {
|
|
1779
|
+
return 'assets/images/baseline-library_books-24px.svg';
|
|
1780
|
+
}
|
|
1781
|
+
return null;
|
|
1782
|
+
}
|
|
1783
|
+
reload(selectedNode) {
|
|
1784
|
+
if (this.isOutletPreviewUrl()) {
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
this.store.dispatch(new ReloadDocumentListAction());
|
|
1788
|
+
if (selectedNode) {
|
|
1789
|
+
this.store.dispatch(new SetSelectedNodesAction([selectedNode]));
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
trackByActionId(_, action) {
|
|
1793
|
+
return action.id;
|
|
1794
|
+
}
|
|
1795
|
+
trackById(_, obj) {
|
|
1796
|
+
return obj.id;
|
|
1797
|
+
}
|
|
1798
|
+
trackByColumnId(_, obj) {
|
|
1799
|
+
return obj.id;
|
|
1800
|
+
}
|
|
1801
|
+
isOutletPreviewUrl() {
|
|
1802
|
+
return location.href.includes('viewer:view');
|
|
1803
|
+
}
|
|
1804
|
+
onSortingChanged(event) {
|
|
1805
|
+
this.filterSorting = event.detail.key + '-' + event.detail.direction;
|
|
1806
|
+
}
|
|
1807
|
+
onAllFilterCleared() {
|
|
1808
|
+
if (!this.isOutletPreviewUrl()) {
|
|
1809
|
+
this.documentList.node = null;
|
|
1810
|
+
this.store.dispatch(new ReloadDocumentListAction());
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageComponent, deps: [{ token: i1$3.Store }, { token: AppExtensionService }, { token: DocumentBasePageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1815
|
+
PageComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: PageComponent, viewQueries: [{ propertyName: "documentList", first: true, predicate: DocumentListComponent, descendants: true }], usesOnChanges: true, ngImport: i0 });
|
|
1816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PageComponent, decorators: [{
|
|
1817
|
+
type: Directive
|
|
1818
|
+
}], ctorParameters: function () { return [{ type: i1$3.Store }, { type: AppExtensionService }, { type: DocumentBasePageService }]; }, propDecorators: { documentList: [{
|
|
1819
|
+
type: ViewChild,
|
|
1820
|
+
args: [DocumentListComponent]
|
|
1821
|
+
}] } });
|
|
1822
|
+
|
|
1823
|
+
/*!
|
|
1824
|
+
* @license
|
|
1825
|
+
* Alfresco Example Content Application
|
|
1826
|
+
*
|
|
1827
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1828
|
+
*
|
|
1829
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1830
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1831
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1832
|
+
* provided under the following open source license terms:
|
|
1833
|
+
*
|
|
1834
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1835
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1836
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1837
|
+
* (at your option) any later version.
|
|
1838
|
+
*
|
|
1839
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1840
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1841
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1842
|
+
* GNU Lesser General Public License for more details.
|
|
1843
|
+
*
|
|
1844
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1845
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1846
|
+
*/
|
|
1847
|
+
class ContextActionsDirective {
|
|
1848
|
+
constructor(store) {
|
|
1849
|
+
this.store = store;
|
|
1850
|
+
this.execute$ = new Subject();
|
|
1851
|
+
this.onDestroy$ = new Subject();
|
|
1852
|
+
// eslint-disable-next-line
|
|
1853
|
+
this.enabled = true;
|
|
1854
|
+
}
|
|
1855
|
+
onContextMenuEvent(event) {
|
|
1856
|
+
if (event) {
|
|
1857
|
+
event.preventDefault();
|
|
1858
|
+
if (this.enabled) {
|
|
1859
|
+
const target = this.getTarget(event);
|
|
1860
|
+
if (target) {
|
|
1861
|
+
this.execute(event, target);
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
ngOnInit() {
|
|
1867
|
+
this.execute$.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((event) => {
|
|
1868
|
+
this.store.dispatch(new ContextMenu(event));
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
ngOnDestroy() {
|
|
1872
|
+
this.onDestroy$.next(true);
|
|
1873
|
+
this.onDestroy$.complete();
|
|
1874
|
+
}
|
|
1875
|
+
execute(event, target) {
|
|
1876
|
+
if (!this.isSelected(target)) {
|
|
1877
|
+
target.dispatchEvent(new MouseEvent('click'));
|
|
1878
|
+
}
|
|
1879
|
+
if (this.isEmptyTable(target)) {
|
|
1880
|
+
return null;
|
|
1881
|
+
}
|
|
1882
|
+
this.execute$.next(event);
|
|
1883
|
+
}
|
|
1884
|
+
getTarget(event) {
|
|
1885
|
+
const target = event.target;
|
|
1886
|
+
return this.findAncestor(target, 'adf-datatable-cell');
|
|
1887
|
+
}
|
|
1888
|
+
isSelected(target) {
|
|
1889
|
+
if (!target) {
|
|
1890
|
+
return false;
|
|
1891
|
+
}
|
|
1892
|
+
return this.findAncestor(target, 'adf-datatable-row').classList.contains('adf-is-selected');
|
|
1893
|
+
}
|
|
1894
|
+
isEmptyTable(target) {
|
|
1895
|
+
return this.findAncestor(target, 'adf-datatable-cell').classList.contains('adf-no-content-container');
|
|
1896
|
+
}
|
|
1897
|
+
findAncestor(el, className) {
|
|
1898
|
+
if (el.classList.contains(className)) {
|
|
1899
|
+
return el;
|
|
1900
|
+
}
|
|
1901
|
+
// eslint-disable-next-line curly
|
|
1902
|
+
while ((el = el.parentElement) && !el.classList.contains(className))
|
|
1903
|
+
;
|
|
1904
|
+
return el;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
ContextActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsDirective, deps: [{ token: i1$3.Store }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1908
|
+
ContextActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: ContextActionsDirective, selector: "[acaContextActions]", inputs: { enabled: ["acaContextEnable", "enabled"] }, host: { listeners: { "contextmenu": "onContextMenuEvent($event)" } }, exportAs: ["acaContextActions"], ngImport: i0 });
|
|
1909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsDirective, decorators: [{
|
|
1910
|
+
type: Directive,
|
|
1911
|
+
args: [{
|
|
1912
|
+
selector: '[acaContextActions]',
|
|
1913
|
+
exportAs: 'acaContextActions'
|
|
1914
|
+
}]
|
|
1915
|
+
}], ctorParameters: function () { return [{ type: i1$3.Store }]; }, propDecorators: { enabled: [{
|
|
1916
|
+
type: Input,
|
|
1917
|
+
args: ['acaContextEnable']
|
|
1918
|
+
}], onContextMenuEvent: [{
|
|
1919
|
+
type: HostListener,
|
|
1920
|
+
args: ['contextmenu', ['$event']]
|
|
1921
|
+
}] } });
|
|
1922
|
+
|
|
1923
|
+
/*!
|
|
1924
|
+
* @license
|
|
1925
|
+
* Alfresco Example Content Application
|
|
1926
|
+
*
|
|
1927
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1928
|
+
*
|
|
1929
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1930
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1931
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1932
|
+
* provided under the following open source license terms:
|
|
1933
|
+
*
|
|
1934
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1935
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1936
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1937
|
+
* (at your option) any later version.
|
|
1938
|
+
*
|
|
1939
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1940
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1941
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1942
|
+
* GNU Lesser General Public License for more details.
|
|
1943
|
+
*
|
|
1944
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1945
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1946
|
+
*/
|
|
1947
|
+
/**
|
|
1948
|
+
* @deprecated in 1.11.0, use SharedDirectivesModule instead.
|
|
1949
|
+
*/
|
|
1950
|
+
class ContextActionsModule {
|
|
1951
|
+
}
|
|
1952
|
+
ContextActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1953
|
+
ContextActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule, declarations: [ContextActionsDirective], exports: [ContextActionsDirective] });
|
|
1954
|
+
ContextActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule });
|
|
1955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ContextActionsModule, decorators: [{
|
|
1956
|
+
type: NgModule,
|
|
1957
|
+
args: [{
|
|
1958
|
+
declarations: [ContextActionsDirective],
|
|
1959
|
+
exports: [ContextActionsDirective]
|
|
1960
|
+
}]
|
|
1961
|
+
}] });
|
|
1962
|
+
|
|
1963
|
+
/*!
|
|
1964
|
+
* @license
|
|
1965
|
+
* Alfresco Example Content Application
|
|
1966
|
+
*
|
|
1967
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
1968
|
+
*
|
|
1969
|
+
* This file is part of the Alfresco Example Content Application.
|
|
1970
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
1971
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
1972
|
+
* provided under the following open source license terms:
|
|
1973
|
+
*
|
|
1974
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
1975
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
1976
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
1977
|
+
* (at your option) any later version.
|
|
1978
|
+
*
|
|
1979
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
1980
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1981
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
1982
|
+
* GNU Lesser General Public License for more details.
|
|
1983
|
+
*
|
|
1984
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
1985
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
1986
|
+
*/
|
|
1987
|
+
class PaginationDirective {
|
|
1988
|
+
constructor(pagination, preferences, config) {
|
|
1989
|
+
this.pagination = pagination;
|
|
1990
|
+
this.preferences = preferences;
|
|
1991
|
+
this.config = config;
|
|
1992
|
+
this.subscriptions = [];
|
|
1993
|
+
}
|
|
1994
|
+
ngOnInit() {
|
|
1995
|
+
this.pagination.supportedPageSizes = this.config.get('pagination.supportedPageSizes');
|
|
1996
|
+
this.subscriptions.push(this.pagination.changePageSize.subscribe((event) => {
|
|
1997
|
+
this.preferences.paginationSize = event.maxItems;
|
|
1998
|
+
}));
|
|
1999
|
+
}
|
|
2000
|
+
ngOnDestroy() {
|
|
2001
|
+
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
2002
|
+
this.subscriptions = [];
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
PaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PaginationDirective, deps: [{ token: i1$2.PaginationComponent }, { token: i1$2.UserPreferencesService }, { token: i1$2.AppConfigService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2006
|
+
PaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: PaginationDirective, selector: "[acaPagination]", ngImport: i0 });
|
|
2007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PaginationDirective, decorators: [{
|
|
2008
|
+
type: Directive,
|
|
2009
|
+
args: [{
|
|
2010
|
+
selector: '[acaPagination]'
|
|
2011
|
+
}]
|
|
2012
|
+
}], ctorParameters: function () { return [{ type: i1$2.PaginationComponent }, { type: i1$2.UserPreferencesService }, { type: i1$2.AppConfigService }]; } });
|
|
2013
|
+
|
|
2014
|
+
/*!
|
|
2015
|
+
* @license
|
|
2016
|
+
* Alfresco Example Content Application
|
|
2017
|
+
*
|
|
2018
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2019
|
+
*
|
|
2020
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2021
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2022
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2023
|
+
* provided under the following open source license terms:
|
|
2024
|
+
*
|
|
2025
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2026
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2027
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2028
|
+
* (at your option) any later version.
|
|
2029
|
+
*
|
|
2030
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2031
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2032
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2033
|
+
* GNU Lesser General Public License for more details.
|
|
2034
|
+
*
|
|
2035
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2036
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2037
|
+
*/
|
|
2038
|
+
class SharedDirectivesModule {
|
|
2039
|
+
}
|
|
2040
|
+
SharedDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2041
|
+
SharedDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, declarations: [PaginationDirective], imports: [ContextActionsModule], exports: [PaginationDirective, ContextActionsModule] });
|
|
2042
|
+
SharedDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, imports: [ContextActionsModule, ContextActionsModule] });
|
|
2043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedDirectivesModule, decorators: [{
|
|
2044
|
+
type: NgModule,
|
|
2045
|
+
args: [{
|
|
2046
|
+
imports: [ContextActionsModule],
|
|
2047
|
+
declarations: [PaginationDirective],
|
|
2048
|
+
exports: [PaginationDirective, ContextActionsModule]
|
|
2049
|
+
}]
|
|
2050
|
+
}] });
|
|
2051
|
+
|
|
2052
|
+
/*!
|
|
2053
|
+
* @license
|
|
2054
|
+
* Alfresco Example Content Application
|
|
2055
|
+
*
|
|
2056
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2057
|
+
*
|
|
2058
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2059
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2060
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2061
|
+
* provided under the following open source license terms:
|
|
2062
|
+
*
|
|
2063
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2064
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2065
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2066
|
+
* (at your option) any later version.
|
|
2067
|
+
*
|
|
2068
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2069
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2070
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2071
|
+
* GNU Lesser General Public License for more details.
|
|
2072
|
+
*
|
|
2073
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2074
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2075
|
+
*/
|
|
2076
|
+
class AppSharedRuleGuard {
|
|
2077
|
+
constructor(store) {
|
|
2078
|
+
this.isQuickShareEnabled$ = store.select(isQuickShareEnabled);
|
|
2079
|
+
}
|
|
2080
|
+
canActivate(_) {
|
|
2081
|
+
return this.isQuickShareEnabled$;
|
|
2082
|
+
}
|
|
2083
|
+
canActivateChild(route) {
|
|
2084
|
+
return this.canActivate(route);
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
AppSharedRuleGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppSharedRuleGuard, deps: [{ token: i1$3.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2088
|
+
AppSharedRuleGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppSharedRuleGuard, providedIn: 'root' });
|
|
2089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppSharedRuleGuard, decorators: [{
|
|
2090
|
+
type: Injectable,
|
|
2091
|
+
args: [{
|
|
2092
|
+
providedIn: 'root'
|
|
2093
|
+
}]
|
|
2094
|
+
}], ctorParameters: function () { return [{ type: i1$3.Store }]; } });
|
|
2095
|
+
|
|
2096
|
+
/*!
|
|
2097
|
+
* @license
|
|
2098
|
+
* Alfresco Example Content Application
|
|
2099
|
+
*
|
|
2100
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2101
|
+
*
|
|
2102
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2103
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2104
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2105
|
+
* provided under the following open source license terms:
|
|
2106
|
+
*
|
|
2107
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2108
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2109
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2110
|
+
* (at your option) any later version.
|
|
2111
|
+
*
|
|
2112
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2113
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2114
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2115
|
+
* GNU Lesser General Public License for more details.
|
|
2116
|
+
*
|
|
2117
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2118
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2119
|
+
*/
|
|
2120
|
+
class RouterExtensionService {
|
|
2121
|
+
constructor(router, extensions) {
|
|
2122
|
+
this.router = router;
|
|
2123
|
+
this.extensions = extensions;
|
|
2124
|
+
this.defaults = {
|
|
2125
|
+
layout: 'app.layout.main',
|
|
2126
|
+
auth: ['app.auth']
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
mapExtensionRoutes() {
|
|
2130
|
+
const routesWithoutParent = [];
|
|
2131
|
+
this.getApplicationRoutes().forEach((extensionRoute) => {
|
|
2132
|
+
if (this.extensionRouteHasChild(extensionRoute)) {
|
|
2133
|
+
const parentRoute = this.findRoute(extensionRoute.parentRoute);
|
|
2134
|
+
if (parentRoute) {
|
|
2135
|
+
this.convertExtensionRouteToRoute(extensionRoute);
|
|
2136
|
+
parentRoute.children.unshift(extensionRoute);
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
else {
|
|
2140
|
+
routesWithoutParent.push(extensionRoute);
|
|
2141
|
+
}
|
|
2142
|
+
});
|
|
2143
|
+
this.router.config.unshift(...routesWithoutParent);
|
|
2144
|
+
}
|
|
2145
|
+
getApplicationRoutes() {
|
|
2146
|
+
return this.extensions.routes.map((route) => {
|
|
2147
|
+
var _a;
|
|
2148
|
+
const guards = this.extensions.getAuthGuards(route.auth && route.auth.length > 0 ? route.auth : this.defaults.auth);
|
|
2149
|
+
return {
|
|
2150
|
+
path: route.path,
|
|
2151
|
+
component: this.getComponentById((_a = route.layout) !== null && _a !== void 0 ? _a : this.defaults.layout),
|
|
2152
|
+
canActivateChild: guards,
|
|
2153
|
+
canActivate: guards,
|
|
2154
|
+
parentRoute: route.parentRoute,
|
|
2155
|
+
children: [
|
|
2156
|
+
...(route['children']
|
|
2157
|
+
? route['children'].map(({ path, component, outlet, data }) => ({
|
|
2158
|
+
path,
|
|
2159
|
+
outlet,
|
|
2160
|
+
data,
|
|
2161
|
+
component: this.getComponentById(component)
|
|
2162
|
+
}))
|
|
2163
|
+
: []),
|
|
2164
|
+
{
|
|
2165
|
+
path: '',
|
|
2166
|
+
component: this.getComponentById(route.component),
|
|
2167
|
+
data: route.data
|
|
2168
|
+
}
|
|
2169
|
+
]
|
|
2170
|
+
};
|
|
2171
|
+
});
|
|
2172
|
+
}
|
|
2173
|
+
getComponentById(id) {
|
|
2174
|
+
return this.extensions.getComponentById(id);
|
|
2175
|
+
}
|
|
2176
|
+
extensionRouteHasChild(route) {
|
|
2177
|
+
return route.parentRoute !== undefined;
|
|
2178
|
+
}
|
|
2179
|
+
convertExtensionRouteToRoute(extensionRoute) {
|
|
2180
|
+
delete extensionRoute.parentRoute;
|
|
2181
|
+
delete extensionRoute.component;
|
|
2182
|
+
}
|
|
2183
|
+
findRoute(parentRoute) {
|
|
2184
|
+
const routeIndex = this.router.config.findIndex((route) => route.path === parentRoute);
|
|
2185
|
+
return this.router.config[routeIndex];
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
RouterExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RouterExtensionService, deps: [{ token: i3$2.Router }, { token: i3.ExtensionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2189
|
+
RouterExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RouterExtensionService, providedIn: 'root' });
|
|
2190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RouterExtensionService, decorators: [{
|
|
2191
|
+
type: Injectable,
|
|
2192
|
+
args: [{
|
|
2193
|
+
providedIn: 'root'
|
|
2194
|
+
}]
|
|
2195
|
+
}], ctorParameters: function () { return [{ type: i3$2.Router }, { type: i3.ExtensionService }]; } });
|
|
2196
|
+
|
|
2197
|
+
// After moving shell to ADF to core, AppService will implement ShellAppService
|
|
2198
|
+
class AppService {
|
|
2199
|
+
constructor(preferencesService, authenticationService, store, router, activatedRoute, config, pageTitle, alfrescoApiService, uploadService, routerExtensionService, contentApi, sharedLinksApiService, groupService, overlayContainer, initialAppState, searchQueryBuilderService) {
|
|
2200
|
+
this.preferencesService = preferencesService;
|
|
2201
|
+
this.authenticationService = authenticationService;
|
|
2202
|
+
this.store = store;
|
|
2203
|
+
this.router = router;
|
|
2204
|
+
this.activatedRoute = activatedRoute;
|
|
2205
|
+
this.config = config;
|
|
2206
|
+
this.pageTitle = pageTitle;
|
|
2207
|
+
this.alfrescoApiService = alfrescoApiService;
|
|
2208
|
+
this.uploadService = uploadService;
|
|
2209
|
+
this.routerExtensionService = routerExtensionService;
|
|
2210
|
+
this.contentApi = contentApi;
|
|
2211
|
+
this.sharedLinksApiService = sharedLinksApiService;
|
|
2212
|
+
this.groupService = groupService;
|
|
2213
|
+
this.overlayContainer = overlayContainer;
|
|
2214
|
+
this.initialAppState = initialAppState;
|
|
2215
|
+
this.hideSidenavConditions = ['/preview/'];
|
|
2216
|
+
this.minimizeSidenavConditions = ['search'];
|
|
2217
|
+
this.onDestroy$ = new Subject();
|
|
2218
|
+
this.ready = new BehaviorSubject(this.authenticationService.isLoggedIn() || this.withCredentials);
|
|
2219
|
+
this.ready$ = this.ready.asObservable();
|
|
2220
|
+
this.authenticationService.onLogin.subscribe(() => {
|
|
2221
|
+
this.ready.next(true);
|
|
2222
|
+
});
|
|
2223
|
+
this.authenticationService.onLogout.subscribe(() => {
|
|
2224
|
+
searchQueryBuilderService.resetToDefaults();
|
|
2225
|
+
});
|
|
2226
|
+
this.pageHeading$ = this.router.events.pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0), map((event) => { var _a, _b, _c; return (_c = (_b = (_a = event.snapshot) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : ''; }), tap((title) => this.pageTitle.setTitle(title)));
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Whether `withCredentials` mode is enabled.
|
|
2230
|
+
* Usually means that `Kerberos` mode is used.
|
|
2231
|
+
*/
|
|
2232
|
+
get withCredentials() {
|
|
2233
|
+
return this.config.get('auth.withCredentials', false);
|
|
2234
|
+
}
|
|
2235
|
+
ngOnDestroy() {
|
|
2236
|
+
this.onDestroy$.next(true);
|
|
2237
|
+
this.onDestroy$.complete();
|
|
2238
|
+
}
|
|
2239
|
+
init() {
|
|
2240
|
+
this.alfrescoApiService.getInstance().on('error', (error) => {
|
|
2241
|
+
var _a, _b;
|
|
2242
|
+
if (error.status === 401 && !this.alfrescoApiService.isExcludedErrorListener((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.req) === null || _b === void 0 ? void 0 : _b.url)) {
|
|
2243
|
+
if (!this.authenticationService.isLoggedIn()) {
|
|
2244
|
+
this.store.dispatch(new CloseModalDialogsAction());
|
|
2245
|
+
let redirectUrl = this.activatedRoute.snapshot.queryParams['redirectUrl'];
|
|
2246
|
+
if (!redirectUrl) {
|
|
2247
|
+
redirectUrl = this.router.url;
|
|
2248
|
+
}
|
|
2249
|
+
this.router.navigate(['/login'], {
|
|
2250
|
+
queryParams: { redirectUrl }
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
});
|
|
2255
|
+
this.loadAppSettings();
|
|
2256
|
+
this.loadCustomCss();
|
|
2257
|
+
this.loadCustomWebFont();
|
|
2258
|
+
const { router } = this;
|
|
2259
|
+
this.router.events
|
|
2260
|
+
.pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0))
|
|
2261
|
+
.subscribe((_event) => {
|
|
2262
|
+
this.store.dispatch(new SetCurrentUrlAction(router.url));
|
|
2263
|
+
});
|
|
2264
|
+
this.router.events
|
|
2265
|
+
.pipe(filter((event) => event instanceof NavigationStart), takeUntil(this.onDestroy$))
|
|
2266
|
+
.subscribe(() => {
|
|
2267
|
+
this.store.dispatch(new ResetSelectionAction());
|
|
2268
|
+
});
|
|
2269
|
+
this.routerExtensionService.mapExtensionRoutes();
|
|
2270
|
+
this.uploadService.fileUploadError.subscribe((error) => this.onFileUploadedError(error));
|
|
2271
|
+
this.sharedLinksApiService.error.pipe(takeUntil(this.onDestroy$)).subscribe((err) => {
|
|
2272
|
+
this.store.dispatch(new SnackbarErrorAction(err.message));
|
|
2273
|
+
});
|
|
2274
|
+
this.ready$.pipe(takeUntil(this.onDestroy$)).subscribe((isReady) => {
|
|
2275
|
+
if (isReady) {
|
|
2276
|
+
this.loadRepositoryStatus();
|
|
2277
|
+
this.loadUserProfile();
|
|
2278
|
+
}
|
|
2279
|
+
});
|
|
2280
|
+
this.overlayContainer.getContainerElement().setAttribute('role', 'region');
|
|
2281
|
+
}
|
|
2282
|
+
loadRepositoryStatus() {
|
|
2283
|
+
this.contentApi.getRepositoryInformation().subscribe((response) => {
|
|
2284
|
+
this.store.dispatch(new SetRepositoryInfoAction(response.entry.repository));
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
loadUserProfile() {
|
|
2288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2289
|
+
const groupsEntries = yield this.groupService.listAllGroupMembershipsForPerson('-me-', { maxItems: 250 });
|
|
2290
|
+
const groups = [];
|
|
2291
|
+
if (groupsEntries) {
|
|
2292
|
+
groups.push(...groupsEntries.map((obj) => obj.entry));
|
|
2293
|
+
}
|
|
2294
|
+
this.contentApi.getPerson('-me-').subscribe((person) => {
|
|
2295
|
+
this.store.dispatch(new SetUserProfileAction({ person: person.entry, groups }));
|
|
2296
|
+
});
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
loadAppSettings() {
|
|
2300
|
+
let baseShareUrl = this.config.get('baseShareUrl');
|
|
2301
|
+
if (!baseShareUrl.endsWith('/')) {
|
|
2302
|
+
baseShareUrl += '/';
|
|
2303
|
+
}
|
|
2304
|
+
const state = Object.assign(Object.assign({}, this.initialAppState), { appName: this.config.get('application.name'), headerColor: this.config.get('headerColor'), headerTextColor: this.config.get('headerTextColor', '#000000'), logoPath: this.config.get('application.logo'), headerImagePath: this.config.get('application.headerImagePath'), customCssPath: this.config.get('customCssPath'), webFontPath: this.config.get('webFontPath'), sharedUrl: baseShareUrl });
|
|
2305
|
+
this.store.dispatch(new SetInitialStateAction(state));
|
|
2306
|
+
}
|
|
2307
|
+
onFileUploadedError(error) {
|
|
2308
|
+
let message = 'APP.MESSAGES.UPLOAD.ERROR.GENERIC';
|
|
2309
|
+
if (error.error.status === 403) {
|
|
2310
|
+
message = 'APP.MESSAGES.UPLOAD.ERROR.403';
|
|
2311
|
+
}
|
|
2312
|
+
if (error.error.status === 404) {
|
|
2313
|
+
message = 'APP.MESSAGES.UPLOAD.ERROR.404';
|
|
2314
|
+
}
|
|
2315
|
+
if (error.error.status === 409) {
|
|
2316
|
+
message = 'APP.MESSAGES.UPLOAD.ERROR.CONFLICT';
|
|
2317
|
+
}
|
|
2318
|
+
if (error.error.status === 500) {
|
|
2319
|
+
message = 'APP.MESSAGES.UPLOAD.ERROR.500';
|
|
2320
|
+
}
|
|
2321
|
+
if (error.error.status === 504) {
|
|
2322
|
+
message = 'APP.MESSAGES.UPLOAD.ERROR.504';
|
|
2323
|
+
}
|
|
2324
|
+
this.store.dispatch(new SnackbarErrorAction(message));
|
|
2325
|
+
}
|
|
2326
|
+
loadCustomCss() {
|
|
2327
|
+
this.store.select(getCustomCssPath).subscribe((cssPath) => {
|
|
2328
|
+
if (cssPath) {
|
|
2329
|
+
this.createLink(cssPath);
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
}
|
|
2333
|
+
loadCustomWebFont() {
|
|
2334
|
+
this.store.select(getCustomWebFontPath).subscribe((fontUrl) => {
|
|
2335
|
+
if (fontUrl) {
|
|
2336
|
+
this.createLink(fontUrl);
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
createLink(url) {
|
|
2341
|
+
const cssLinkElement = document.createElement('link');
|
|
2342
|
+
cssLinkElement.setAttribute('rel', 'stylesheet');
|
|
2343
|
+
cssLinkElement.setAttribute('type', 'text/css');
|
|
2344
|
+
cssLinkElement.setAttribute('href', url);
|
|
2345
|
+
document.head.appendChild(cssLinkElement);
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppService, deps: [{ token: i1$2.UserPreferencesService }, { token: i1$2.AuthenticationService }, { token: i1$3.Store }, { token: i3$2.Router }, { token: i3$2.ActivatedRoute }, { token: i1$2.AppConfigService }, { token: i1$2.PageTitleService }, { token: i1$2.AlfrescoApiService }, { token: i1$2.UploadService }, { token: RouterExtensionService }, { token: ContentApiService }, { token: i6$2.SharedLinksApiService }, { token: i6$2.GroupService }, { token: i7.OverlayContainer }, { token: STORE_INITIAL_APP_DATA }, { token: i6$2.SearchQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2349
|
+
AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppService, providedIn: 'root' });
|
|
2350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppService, decorators: [{
|
|
2351
|
+
type: Injectable,
|
|
2352
|
+
args: [{
|
|
2353
|
+
providedIn: 'root'
|
|
2354
|
+
}]
|
|
2355
|
+
}], ctorParameters: function () {
|
|
2356
|
+
return [{ type: i1$2.UserPreferencesService }, { type: i1$2.AuthenticationService }, { type: i1$3.Store }, { type: i3$2.Router }, { type: i3$2.ActivatedRoute }, { type: i1$2.AppConfigService }, { type: i1$2.PageTitleService }, { type: i1$2.AlfrescoApiService }, { type: i1$2.UploadService }, { type: RouterExtensionService }, { type: ContentApiService }, { type: i6$2.SharedLinksApiService }, { type: i6$2.GroupService }, { type: i7.OverlayContainer }, { type: undefined, decorators: [{
|
|
2357
|
+
type: Inject,
|
|
2358
|
+
args: [STORE_INITIAL_APP_DATA]
|
|
2359
|
+
}] }, { type: i6$2.SearchQueryBuilderService }];
|
|
2360
|
+
} });
|
|
2361
|
+
|
|
2362
|
+
/*!
|
|
2363
|
+
* @license
|
|
2364
|
+
* Alfresco Example Content Application
|
|
2365
|
+
*
|
|
2366
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2367
|
+
*
|
|
2368
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2369
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2370
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2371
|
+
* provided under the following open source license terms:
|
|
2372
|
+
*
|
|
2373
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2374
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2375
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2376
|
+
* (at your option) any later version.
|
|
2377
|
+
*
|
|
2378
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2379
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2380
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2381
|
+
* GNU Lesser General Public License for more details.
|
|
2382
|
+
*
|
|
2383
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2384
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2385
|
+
*/
|
|
2386
|
+
class AppHookService {
|
|
2387
|
+
constructor() {
|
|
2388
|
+
/**
|
|
2389
|
+
* Gets emitted when reloads event fired
|
|
2390
|
+
*/
|
|
2391
|
+
this.reload = new Subject();
|
|
2392
|
+
/**
|
|
2393
|
+
* Gets emitted when user reset the node
|
|
2394
|
+
*/
|
|
2395
|
+
this.reset = new Subject();
|
|
2396
|
+
/**
|
|
2397
|
+
* Gets emitted when user delete the node
|
|
2398
|
+
*/
|
|
2399
|
+
this.nodesDeleted = new Subject();
|
|
2400
|
+
/**
|
|
2401
|
+
* Gets emitted when user delete the library
|
|
2402
|
+
*/
|
|
2403
|
+
this.libraryDeleted = new Subject();
|
|
2404
|
+
/**
|
|
2405
|
+
* Gets emitted when user create the library
|
|
2406
|
+
*/
|
|
2407
|
+
this.libraryCreated = new Subject();
|
|
2408
|
+
/**
|
|
2409
|
+
* Gets emitted when user update the library
|
|
2410
|
+
*/
|
|
2411
|
+
this.libraryUpdated = new Subject();
|
|
2412
|
+
/**
|
|
2413
|
+
* Gets emitted when user join the library
|
|
2414
|
+
*/
|
|
2415
|
+
this.libraryJoined = new Subject();
|
|
2416
|
+
/**
|
|
2417
|
+
* Gets emitted when user left the library
|
|
2418
|
+
*/
|
|
2419
|
+
this.libraryLeft = new Subject();
|
|
2420
|
+
/**
|
|
2421
|
+
* Gets emitted when library throws 400 error code
|
|
2422
|
+
*/
|
|
2423
|
+
this.library400Error = new Subject();
|
|
2424
|
+
/**
|
|
2425
|
+
* Gets emitted when user join the library
|
|
2426
|
+
*/
|
|
2427
|
+
this.joinLibraryToggle = new Subject();
|
|
2428
|
+
/**
|
|
2429
|
+
* Gets emitted when user unlink the node
|
|
2430
|
+
*/
|
|
2431
|
+
this.linksUnshared = new Subject();
|
|
2432
|
+
/**
|
|
2433
|
+
* Gets emitted when user mark the the favorite library
|
|
2434
|
+
*/
|
|
2435
|
+
this.favoriteLibraryToggle = new Subject();
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
AppHookService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppHookService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2439
|
+
AppHookService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppHookService, providedIn: 'root' });
|
|
2440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AppHookService, decorators: [{
|
|
2441
|
+
type: Injectable,
|
|
2442
|
+
args: [{
|
|
2443
|
+
providedIn: 'root'
|
|
2444
|
+
}]
|
|
2445
|
+
}] });
|
|
2446
|
+
|
|
2447
|
+
/*!
|
|
2448
|
+
* @license
|
|
2449
|
+
* Alfresco Example Content Application
|
|
2450
|
+
*
|
|
2451
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2452
|
+
*
|
|
2453
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2454
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2455
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2456
|
+
* provided under the following open source license terms:
|
|
2457
|
+
*
|
|
2458
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2459
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2460
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2461
|
+
* (at your option) any later version.
|
|
2462
|
+
*
|
|
2463
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2464
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2465
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2466
|
+
* GNU Lesser General Public License for more details.
|
|
2467
|
+
*
|
|
2468
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2469
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2470
|
+
*/
|
|
2471
|
+
class AlfrescoOfficeExtensionService {
|
|
2472
|
+
constructor(appConfigService) {
|
|
2473
|
+
this.appConfigService = appConfigService;
|
|
2474
|
+
this.appConfigService.onLoad
|
|
2475
|
+
.pipe(take(1), map((appConfig) => appConfig.plugins && appConfig.plugins.aosPlugin))
|
|
2476
|
+
.subscribe((aosPlugin) => {
|
|
2477
|
+
if (aosPlugin) {
|
|
2478
|
+
this.enablePlugin();
|
|
2479
|
+
}
|
|
2480
|
+
else {
|
|
2481
|
+
this.disablePlugin();
|
|
2482
|
+
}
|
|
2483
|
+
});
|
|
2484
|
+
}
|
|
2485
|
+
enablePlugin() {
|
|
2486
|
+
if (localStorage && localStorage.getItem('aosPlugin') === null) {
|
|
2487
|
+
localStorage.setItem('aosPlugin', 'true');
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
disablePlugin() {
|
|
2491
|
+
localStorage.removeItem('aosPlugin');
|
|
2492
|
+
}
|
|
2493
|
+
isAosPluginEnabled() {
|
|
2494
|
+
return localStorage && localStorage.getItem('aosPlugin') === 'true';
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
AlfrescoOfficeExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlfrescoOfficeExtensionService, deps: [{ token: i1$2.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2498
|
+
AlfrescoOfficeExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlfrescoOfficeExtensionService, providedIn: 'root' });
|
|
2499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlfrescoOfficeExtensionService, decorators: [{
|
|
2500
|
+
type: Injectable,
|
|
2501
|
+
args: [{
|
|
2502
|
+
providedIn: 'root'
|
|
2503
|
+
}]
|
|
2504
|
+
}], ctorParameters: function () { return [{ type: i1$2.AppConfigService }]; } });
|
|
2505
|
+
|
|
2506
|
+
/*!
|
|
2507
|
+
* @license
|
|
2508
|
+
* Alfresco Example Content Application
|
|
2509
|
+
*
|
|
2510
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2511
|
+
*
|
|
2512
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2513
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2514
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2515
|
+
* provided under the following open source license terms:
|
|
2516
|
+
*
|
|
2517
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2518
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2519
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2520
|
+
* (at your option) any later version.
|
|
2521
|
+
*
|
|
2522
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2523
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2524
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2525
|
+
* GNU Lesser General Public License for more details.
|
|
2526
|
+
*
|
|
2527
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2528
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2529
|
+
*/
|
|
2530
|
+
class SharedModule {
|
|
2531
|
+
static forRoot() {
|
|
2532
|
+
return {
|
|
2533
|
+
ngModule: SharedModule,
|
|
2534
|
+
providers: [ContentApiService, NodePermissionService, AppService]
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2539
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, imports: [ContextActionsModule], exports: [ContextActionsModule] });
|
|
2540
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, imports: [ContextActionsModule, ContextActionsModule] });
|
|
2541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SharedModule, decorators: [{
|
|
2542
|
+
type: NgModule,
|
|
2543
|
+
args: [{
|
|
2544
|
+
imports: [ContextActionsModule],
|
|
2545
|
+
exports: [ContextActionsModule]
|
|
2546
|
+
}]
|
|
2547
|
+
}] });
|
|
2548
|
+
|
|
2549
|
+
/*!
|
|
2550
|
+
* @license
|
|
2551
|
+
* Alfresco Example Content Application
|
|
2552
|
+
*
|
|
2553
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2554
|
+
*
|
|
2555
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2556
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2557
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2558
|
+
* provided under the following open source license terms:
|
|
2559
|
+
*
|
|
2560
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2561
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2562
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2563
|
+
* (at your option) any later version.
|
|
2564
|
+
*
|
|
2565
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2566
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2567
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2568
|
+
* GNU Lesser General Public License for more details.
|
|
2569
|
+
*
|
|
2570
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2571
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2572
|
+
*/
|
|
2573
|
+
const initialState = {
|
|
2574
|
+
app: {
|
|
2575
|
+
appName: 'Alfresco Content Application',
|
|
2576
|
+
headerColor: '#ffffff',
|
|
2577
|
+
logoPath: 'assets/images/alfresco-logo-white.svg',
|
|
2578
|
+
headerImagePath: 'assets/images/mastHead-bg-shapesPattern.svg',
|
|
2579
|
+
sharedUrl: '',
|
|
2580
|
+
user: {
|
|
2581
|
+
isAdmin: null,
|
|
2582
|
+
id: null,
|
|
2583
|
+
firstName: '',
|
|
2584
|
+
lastName: ''
|
|
2585
|
+
},
|
|
2586
|
+
selection: {
|
|
2587
|
+
nodes: [],
|
|
2588
|
+
libraries: [],
|
|
2589
|
+
isEmpty: true,
|
|
2590
|
+
count: 0
|
|
2591
|
+
},
|
|
2592
|
+
navigation: {
|
|
2593
|
+
currentFolder: null
|
|
2594
|
+
},
|
|
2595
|
+
infoDrawerOpened: false,
|
|
2596
|
+
infoDrawerMetadataAspect: '',
|
|
2597
|
+
showFacetFilter: true,
|
|
2598
|
+
documentDisplayMode: 'list',
|
|
2599
|
+
repository: {
|
|
2600
|
+
status: {
|
|
2601
|
+
isQuickShareEnabled: true
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
class LibTestingModule {
|
|
2607
|
+
}
|
|
2608
|
+
LibTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2609
|
+
LibTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, imports: [NoopAnimationsModule,
|
|
2610
|
+
CommonModule,
|
|
2611
|
+
HttpClientModule,
|
|
2612
|
+
RouterTestingModule,
|
|
2613
|
+
StoreModule, i1$4.EffectsRootModule, i2.TranslateModule, PipeModule] });
|
|
2614
|
+
LibTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, providers: [
|
|
2615
|
+
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
|
2616
|
+
{ provide: TranslationService, useClass: TranslationMock }
|
|
2617
|
+
], imports: [NoopAnimationsModule,
|
|
2618
|
+
CommonModule,
|
|
2619
|
+
HttpClientModule,
|
|
2620
|
+
RouterTestingModule,
|
|
2621
|
+
StoreModule,
|
|
2622
|
+
EffectsModule.forRoot([]),
|
|
2623
|
+
TranslateModule.forRoot({
|
|
2624
|
+
loader: {
|
|
2625
|
+
provide: TranslateLoader,
|
|
2626
|
+
useClass: TranslateLoaderService
|
|
2627
|
+
}
|
|
2628
|
+
}),
|
|
2629
|
+
PipeModule] });
|
|
2630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: LibTestingModule, decorators: [{
|
|
2631
|
+
type: NgModule,
|
|
2632
|
+
args: [{
|
|
2633
|
+
imports: [
|
|
2634
|
+
NoopAnimationsModule,
|
|
2635
|
+
CommonModule,
|
|
2636
|
+
HttpClientModule,
|
|
2637
|
+
RouterTestingModule,
|
|
2638
|
+
StoreModule,
|
|
2639
|
+
EffectsModule.forRoot([]),
|
|
2640
|
+
TranslateModule.forRoot({
|
|
2641
|
+
loader: {
|
|
2642
|
+
provide: TranslateLoader,
|
|
2643
|
+
useClass: TranslateLoaderService
|
|
2644
|
+
}
|
|
2645
|
+
}),
|
|
2646
|
+
PipeModule
|
|
2647
|
+
],
|
|
2648
|
+
providers: [
|
|
2649
|
+
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
|
2650
|
+
{ provide: TranslationService, useClass: TranslationMock }
|
|
2651
|
+
]
|
|
2652
|
+
}]
|
|
2653
|
+
}] });
|
|
2654
|
+
|
|
2655
|
+
/*!
|
|
2656
|
+
* @license
|
|
2657
|
+
* Alfresco Example Content Application
|
|
2658
|
+
*
|
|
2659
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2660
|
+
*
|
|
2661
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2662
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2663
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2664
|
+
* provided under the following open source license terms:
|
|
2665
|
+
*
|
|
2666
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2667
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2668
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2669
|
+
* (at your option) any later version.
|
|
2670
|
+
*
|
|
2671
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2672
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2673
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2674
|
+
* GNU Lesser General Public License for more details.
|
|
2675
|
+
*
|
|
2676
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2677
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2678
|
+
*/
|
|
2679
|
+
class TranslateServiceMock extends TranslateService {
|
|
2680
|
+
constructor() {
|
|
2681
|
+
super(null, null, null, null, null, null, true, null, null);
|
|
2682
|
+
}
|
|
2683
|
+
get(key) {
|
|
2684
|
+
return of(key);
|
|
2685
|
+
}
|
|
2686
|
+
instant(key) {
|
|
2687
|
+
return key;
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
TranslateServiceMock.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TranslateServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2691
|
+
TranslateServiceMock.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TranslateServiceMock });
|
|
2692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TranslateServiceMock, decorators: [{
|
|
2693
|
+
type: Injectable
|
|
2694
|
+
}], ctorParameters: function () { return []; } });
|
|
2695
|
+
|
|
2696
|
+
/*!
|
|
2697
|
+
* @license
|
|
2698
|
+
* Alfresco Example Content Application
|
|
2699
|
+
*
|
|
2700
|
+
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
|
2701
|
+
*
|
|
2702
|
+
* This file is part of the Alfresco Example Content Application.
|
|
2703
|
+
* If the software was purchased under a paid Alfresco license, the terms of
|
|
2704
|
+
* the paid license agreement will prevail. Otherwise, the software is
|
|
2705
|
+
* provided under the following open source license terms:
|
|
2706
|
+
*
|
|
2707
|
+
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
2708
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
2709
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
2710
|
+
* (at your option) any later version.
|
|
2711
|
+
*
|
|
2712
|
+
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
2713
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
2714
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
2715
|
+
* GNU Lesser General Public License for more details.
|
|
2716
|
+
*
|
|
2717
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
2718
|
+
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
2719
|
+
*/
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* Generated bundle index. Do not edit.
|
|
2723
|
+
*/
|
|
2724
|
+
|
|
2725
|
+
export { AlfrescoOfficeExtensionService, AppExtensionService, AppHookService, AppService, AppSharedRuleGuard, ContentApiService, ContextActionsDirective, ContextActionsModule, DefaultExtensionLoaderFactory, DocumentBasePageService, EXTENSION_DATA_LOADERS, ExtensionsDataLoaderGuard, GenericErrorComponent, GenericErrorModule, InfoDrawerComponent, LibTestingModule, LockedByComponent, LockedByModule, NodePermissionService, PageComponent, PageLayoutComponent, PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutModule, PaginationDirective, RouterExtensionService, SharedDirectivesModule, SharedInfoDrawerModule, SharedModule, SharedToolbarModule, ToolbarActionComponent, ToolbarButtonComponent, ToolbarButtonType, ToolbarMenuComponent, ToolbarMenuItemComponent, TranslateServiceMock, initialState, isLibrary, isLocked };
|
|
2726
|
+
//# sourceMappingURL=alfresco-aca-shared.mjs.map
|