improve compatibility (#2256)

* improve compatibility

* fix

* fix

* fix

* fix
This commit is contained in:
Eugenio Romano 2021-08-16 16:33:31 +02:00 committed by GitHub
parent 016bc0ac81
commit 0bc3d7c45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 267 additions and 417 deletions

100
package-lock.json generated
View File

@ -10,10 +10,10 @@
"hasInstallScript": true,
"license": "LGPL-3.0",
"dependencies": {
"@alfresco/adf-content-services": "4.6.0-33212",
"@alfresco/adf-core": "4.6.0-33212",
"@alfresco/adf-extensions": "4.6.0-33212",
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/adf-content-services": "4.6.0-33262",
"@alfresco/adf-core": "4.6.0-33262",
"@alfresco/adf-extensions": "4.6.0-33262",
"@alfresco/js-api": "4.6.0-3780",
"@angular/animations": "10.0.4",
"@angular/cdk": "^10.0.2",
"@angular/common": "10.0.4",
@ -42,8 +42,8 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@alfresco/adf-cli": "4.6.0-33212",
"@alfresco/adf-testing": "4.6.0-33212",
"@alfresco/adf-cli": "4.6.0-33262",
"@alfresco/adf-testing": "4.6.0-33262",
"@angular-custom-builders/lite-serve": "^0.2.3",
"@angular-devkit/build-angular": "^0.1002.0",
"@angular-devkit/build-ng-packagr": "^0.1002.0",
@ -100,12 +100,12 @@
}
},
"node_modules/@alfresco/adf-cli": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-4.6.0-33212.tgz",
"integrity": "sha512-vnBkFg7gTDsoseMbeADq1N6vJir9UbwTu+5DCXud0rNFSvG35BFa/0W3YTrMdei2xQ5FeoVyWCBxRsCgFobMpw==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-4.6.0-33262.tgz",
"integrity": "sha512-5KLtw9Hdk9RzBfWlTw6GKRPKMfjA3ETC7TrYQlU50wf83p0XVSLLh31z+3YDq6bD8gkyGRtGh34xfg5jS/hXbw==",
"dev": true,
"dependencies": {
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/js-api": "4.6.0-3780",
"commander": "^4.0.0",
"ejs": "^2.6.1",
"license-checker": "^25.0.1",
@ -130,15 +130,15 @@
}
},
"node_modules/@alfresco/adf-content-services": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-4.6.0-33212.tgz",
"integrity": "sha512-B8wulX9axEHw/DyxhGFAeeiy7R+gJw3HF+j2WuBJfIfF2me5q2c89wySltqH0jjcn6P3zkHBfYVabC8XdDwNLQ==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-4.6.0-33262.tgz",
"integrity": "sha512-C8UJERqiTyeEC8b89VI/3Ts6BLWj3/fkahTpcA6nhANxdx2hRLqTfrunIDhBcnYmI7L97lnhFPXUzELdyCjo6A==",
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"@alfresco/adf-core": "4.6.0-33212",
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/adf-core": "4.6.0-33262",
"@alfresco/js-api": "4.6.0-3780",
"@angular/animations": ">=10.0.2",
"@angular/cdk": ">=10.0.1",
"@angular/common": ">10.0.2",
@ -152,16 +152,16 @@
}
},
"node_modules/@alfresco/adf-core": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-4.6.0-33212.tgz",
"integrity": "sha512-RQ7S5UGFc5G1cgUWclPfejpbnWfly0v2qgijFT0OK/J1vUQ5Pt6YvwsZ3P54Uk8LxJf41lqpYWAFFR0kDtjPwQ==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-4.6.0-33262.tgz",
"integrity": "sha512-vOSReILvIXlEL9MkUHJmskQCbQ2FU2YxLIip7i22Yq9I1wHpK1Oj1bNwfPE3qoZo4XyS3CW+mk/7kypi3ZVylQ==",
"dependencies": {
"cropperjs": "1.5.11",
"tslib": "^2.0.0"
},
"peerDependencies": {
"@alfresco/adf-extensions": "4.6.0-33212",
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/adf-extensions": "4.6.0-33262",
"@alfresco/js-api": "4.6.0-3780",
"@angular/animations": ">=10.0.2",
"@angular/cdk": ">=10.0.1",
"@angular/common": ">=10.0.2",
@ -180,34 +180,34 @@
}
},
"node_modules/@alfresco/adf-extensions": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-4.6.0-33212.tgz",
"integrity": "sha512-pR46X55aEDINhLNwH/+JB/yJvDLrQ18MR4XFlVlrKZbr5/695CJ9ksGeL0JuEZZmp2ZaEq7bjnF9VG3sUox6yA==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-4.6.0-33262.tgz",
"integrity": "sha512-KTCE/6iDZcnIbv+81XufddGQizyv/cmrw+gcc2F1OD6fFj2b+Gnj4JECCAaNhSc0akJxXrY1BHWhL9So5oeuyA==",
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/js-api": "4.6.0-3780",
"@angular/common": ">=10.0.2",
"@angular/core": ">=10.0.2"
}
},
"node_modules/@alfresco/adf-testing": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-4.6.0-33212.tgz",
"integrity": "sha512-Ke/xigVpBuTqHyF+7MfJ5n03/V4+cgFpJwcsTdom2nRsZsklfMs6SZ28AUZkrT3NPvxfz0iqbvwb24ZglQXxbQ==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-4.6.0-33262.tgz",
"integrity": "sha512-yDAY82OxIBM3qj14G+l1IoNWEU4GLq4t49dhzY7+37lQwlfIVNlHkSRN0R2nvjZ4zfLxZtMDTQPEXO+IGguFwg==",
"dev": true,
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"@alfresco/js-api": "4.6.0-3694"
"@alfresco/js-api": "4.6.0-3780"
}
},
"node_modules/@alfresco/js-api": {
"version": "4.6.0-3694",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-4.6.0-3694.tgz",
"integrity": "sha512-fgK2csttJMqK4zH7CL7I7+u2IbfFepCQSdYXeLoxjjtP8zG7uzIs6H5AXxsTEXUPo+x7sOihtymlckG3tuYzvg==",
"version": "4.6.0-3780",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-4.6.0-3780.tgz",
"integrity": "sha512-/D5BbxXIh0GMpQh+ALGTPXDMOYi9yzBtLIfvpVgD6nHGbMwxVgZ0k5+zHM+fA3x4+OT/brXRZRkfDwTHsiwn6Q==",
"dependencies": {
"event-emitter": "^0.3.5",
"minimatch": "3.0.4",
@ -21407,12 +21407,12 @@
},
"dependencies": {
"@alfresco/adf-cli": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-4.6.0-33212.tgz",
"integrity": "sha512-vnBkFg7gTDsoseMbeADq1N6vJir9UbwTu+5DCXud0rNFSvG35BFa/0W3YTrMdei2xQ5FeoVyWCBxRsCgFobMpw==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-4.6.0-33262.tgz",
"integrity": "sha512-5KLtw9Hdk9RzBfWlTw6GKRPKMfjA3ETC7TrYQlU50wf83p0XVSLLh31z+3YDq6bD8gkyGRtGh34xfg5jS/hXbw==",
"dev": true,
"requires": {
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/js-api": "4.6.0-3780",
"commander": "^4.0.0",
"ejs": "^2.6.1",
"license-checker": "^25.0.1",
@ -21432,43 +21432,43 @@
}
},
"@alfresco/adf-content-services": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-4.6.0-33212.tgz",
"integrity": "sha512-B8wulX9axEHw/DyxhGFAeeiy7R+gJw3HF+j2WuBJfIfF2me5q2c89wySltqH0jjcn6P3zkHBfYVabC8XdDwNLQ==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-4.6.0-33262.tgz",
"integrity": "sha512-C8UJERqiTyeEC8b89VI/3Ts6BLWj3/fkahTpcA6nhANxdx2hRLqTfrunIDhBcnYmI7L97lnhFPXUzELdyCjo6A==",
"requires": {
"tslib": "^2.0.0"
}
},
"@alfresco/adf-core": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-4.6.0-33212.tgz",
"integrity": "sha512-RQ7S5UGFc5G1cgUWclPfejpbnWfly0v2qgijFT0OK/J1vUQ5Pt6YvwsZ3P54Uk8LxJf41lqpYWAFFR0kDtjPwQ==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-4.6.0-33262.tgz",
"integrity": "sha512-vOSReILvIXlEL9MkUHJmskQCbQ2FU2YxLIip7i22Yq9I1wHpK1Oj1bNwfPE3qoZo4XyS3CW+mk/7kypi3ZVylQ==",
"requires": {
"cropperjs": "1.5.11",
"tslib": "^2.0.0"
}
},
"@alfresco/adf-extensions": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-4.6.0-33212.tgz",
"integrity": "sha512-pR46X55aEDINhLNwH/+JB/yJvDLrQ18MR4XFlVlrKZbr5/695CJ9ksGeL0JuEZZmp2ZaEq7bjnF9VG3sUox6yA==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-4.6.0-33262.tgz",
"integrity": "sha512-KTCE/6iDZcnIbv+81XufddGQizyv/cmrw+gcc2F1OD6fFj2b+Gnj4JECCAaNhSc0akJxXrY1BHWhL9So5oeuyA==",
"requires": {
"tslib": "^2.0.0"
}
},
"@alfresco/adf-testing": {
"version": "4.6.0-33212",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-4.6.0-33212.tgz",
"integrity": "sha512-Ke/xigVpBuTqHyF+7MfJ5n03/V4+cgFpJwcsTdom2nRsZsklfMs6SZ28AUZkrT3NPvxfz0iqbvwb24ZglQXxbQ==",
"version": "4.6.0-33262",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-4.6.0-33262.tgz",
"integrity": "sha512-yDAY82OxIBM3qj14G+l1IoNWEU4GLq4t49dhzY7+37lQwlfIVNlHkSRN0R2nvjZ4zfLxZtMDTQPEXO+IGguFwg==",
"dev": true,
"requires": {
"tslib": "^2.0.0"
}
},
"@alfresco/js-api": {
"version": "4.6.0-3694",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-4.6.0-3694.tgz",
"integrity": "sha512-fgK2csttJMqK4zH7CL7I7+u2IbfFepCQSdYXeLoxjjtP8zG7uzIs6H5AXxsTEXUPo+x7sOihtymlckG3tuYzvg==",
"version": "4.6.0-3780",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-4.6.0-3780.tgz",
"integrity": "sha512-/D5BbxXIh0GMpQh+ALGTPXDMOYi9yzBtLIfvpVgD6nHGbMwxVgZ0k5+zHM+fA3x4+OT/brXRZRkfDwTHsiwn6Q==",
"requires": {
"event-emitter": "^0.3.5",
"minimatch": "3.0.4",

View File

@ -24,10 +24,10 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "4.6.0-33212",
"@alfresco/adf-core": "4.6.0-33212",
"@alfresco/adf-extensions": "4.6.0-33212",
"@alfresco/js-api": "4.6.0-3694",
"@alfresco/adf-content-services": "4.6.0-33262",
"@alfresco/adf-core": "4.6.0-33262",
"@alfresco/adf-extensions": "4.6.0-33262",
"@alfresco/js-api": "4.6.0-3780",
"@angular/animations": "10.0.4",
"@angular/cdk": "^10.0.2",
"@angular/common": "10.0.4",
@ -56,8 +56,8 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@alfresco/adf-cli": "4.6.0-33212",
"@alfresco/adf-testing": "4.6.0-33212",
"@alfresco/adf-cli": "4.6.0-33262",
"@alfresco/adf-testing": "4.6.0-33262",
"@angular-custom-builders/lite-serve": "^0.2.3",
"@angular-devkit/build-angular": "^0.1002.0",
"@angular-devkit/build-ng-packagr": "^0.1002.0",

View File

@ -5,7 +5,8 @@ This library was generated with [Angular CLI](https://github.com/angular/angular
## Code scaffolding
Run `ng generate component component-name --project aca-shared` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-shared`.
> Note: Don't forget to add `--project aca-shared` or else it will be added to the default project in your `angular.json` file.
> Note: Don't forget to add `--project aca-shared` or else it will be added to the default project in your `angular.json` file.
## Build

View File

@ -1,7 +1,7 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function(config) {
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],

View File

@ -2,28 +2,15 @@
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div>
<ng-container *ngIf="!isLoading && !!displayNode">
<adf-info-drawer
[title]="'APP.INFO_DRAWER.TITLE'"
cdkTrapFocus
cdkTrapFocusAutoCapture
>
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE'" cdkTrapFocus cdkTrapFocusAutoCapture>
<adf-toolbar class="adf-toolbar--inline" info-drawer-buttons>
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="entry" [color]="getEntryColor(entry)"></aca-toolbar-action>
</ng-container>
</adf-toolbar>
<adf-info-drawer-tab
*ngFor="let tab of tabs"
[icon]="tab.icon"
[label]="tab.title"
>
<adf-dynamic-tab
[node]="$any(displayNode)"
[id]="tab.component"
[attr.data-automation-id]="tab.component"
>
</adf-dynamic-tab>
<adf-info-drawer-tab *ngFor="let tab of tabs" [icon]="tab.icon" [label]="tab.title">
<adf-dynamic-tab [node]="$any(displayNode)" [id]="tab.component" [attr.data-automation-id]="tab.component"> </adf-dynamic-tab>
</adf-info-drawer-tab>
</adf-info-drawer>
</ng-container>

View File

@ -1,28 +1,19 @@
<ng-container [ngSwitch]="actionRef.type">
<ng-container *ngSwitchCase="'default'">
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color">
</app-toolbar-button>
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color"> </app-toolbar-button>
</ng-container>
<ng-container *ngSwitchCase="'button'">
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color">
</app-toolbar-button>
<app-toolbar-button [type]="type" [actionRef]="actionRef" [color]="color"> </app-toolbar-button>
</ng-container>
<adf-toolbar-divider
*ngSwitchCase="'separator'"
[id]="actionRef.id"
></adf-toolbar-divider>
<adf-toolbar-divider *ngSwitchCase="'separator'" [id]="actionRef.id"></adf-toolbar-divider>
<ng-container *ngSwitchCase="'menu'">
<app-toolbar-menu [actionRef]="actionRef" [color]="color">
</app-toolbar-menu>
<app-toolbar-menu [actionRef]="actionRef" [color]="color"> </app-toolbar-menu>
</ng-container>
<ng-container *ngSwitchCase="'custom'">
<adf-dynamic-component
[data]="actionRef.data"
[id]="actionRef.component"
></adf-dynamic-component>
<adf-dynamic-component [data]="actionRef.data" [id]="actionRef.component"></adf-dynamic-component>
</ng-container>
</ng-container>

View File

@ -58,28 +58,62 @@ import { map } from 'rxjs/operators';
providedIn: 'root'
})
export class ContentApiService {
private nodesApi: NodesApi;
private trashcanApi: TrashcanApi;
private sharedLinksApi: SharedlinksApi;
private discoveryApi: DiscoveryApi;
private favoritesApi: FavoritesApi;
private contentApi: ContentApi;
private sitesApi: SitesApi;
private searchApi: SearchApi;
private peopleApi: PeopleApi;
constructor(private api: AlfrescoApiService, private preferences: UserPreferencesService) {
this.nodesApi = new NodesApi(this.api.getInstance());
this.trashcanApi = new TrashcanApi(this.api.getInstance());
this.sharedLinksApi = new SharedlinksApi(this.api.getInstance());
this.discoveryApi = new DiscoveryApi(this.api.getInstance());
this.favoritesApi = new FavoritesApi(this.api.getInstance());
this.contentApi = new ContentApi(this.api.getInstance());
this.sitesApi = new SitesApi(this.api.getInstance());
this.searchApi = new SearchApi(this.api.getInstance());
this.peopleApi = new PeopleApi(this.api.getInstance());
_nodesApi: NodesApi;
get nodesApi(): NodesApi {
this._nodesApi = this._nodesApi ?? new NodesApi(this.api.getInstance());
return this._nodesApi;
}
_trashcanApi: TrashcanApi;
get trashcanApi(): TrashcanApi {
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.api.getInstance());
return this._trashcanApi;
}
_sharedLinksApi: SharedlinksApi;
get sharedLinksApi(): SharedlinksApi {
this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.api.getInstance());
return this._sharedLinksApi;
}
_discoveryApi: DiscoveryApi;
get discoveryApi(): DiscoveryApi {
this._discoveryApi = this._discoveryApi ?? new DiscoveryApi(this.api.getInstance());
return this._discoveryApi;
}
_favoritesApi: FavoritesApi;
get favoritesApi(): FavoritesApi {
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.api.getInstance());
return this._favoritesApi;
}
_contentApi: ContentApi;
get contentApi(): ContentApi {
this._contentApi = this._contentApi ?? new ContentApi(this.api.getInstance());
return this._contentApi;
}
_sitesApi: SitesApi;
get sitesApi(): SitesApi {
this._sitesApi = this._sitesApi ?? new SitesApi(this.api.getInstance());
return this._sitesApi;
}
_searchApi: SearchApi;
get searchApi(): SearchApi {
this._searchApi = this._searchApi ?? new SearchApi(this.api.getInstance());
return this._searchApi;
}
_peopleApi: PeopleApi;
get peopleApi(): PeopleApi {
this._peopleApi = this._peopleApi ?? new PeopleApi(this.api.getInstance());
return this._peopleApi;
}
constructor(private api: AlfrescoApiService, private preferences: UserPreferencesService) {}
/**
* Moves a node to the trashcan.
* @param nodeId ID of the target node

View File

@ -1,52 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { APP_BOOTSTRAP_LISTENER, InjectionToken, Inject, Type } from '@angular/core';
import { EffectSources } from '@ngrx/effects';
export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects');
export function bootstrapEffects(effects: Type<any>[], sources: EffectSources) {
return () => {
effects.forEach((effect) => sources.addEffects(effect));
};
}
export function createInstances(...instances: any[]) {
return instances;
}
export function provideBootstrapEffects(effects: Type<any>[]) {
return [
effects,
{ provide: BOOTSTRAP_EFFECTS, deps: effects, useFactory: createInstances },
{
provide: APP_BOOTSTRAP_LISTENER,
multi: true,
useFactory: bootstrapEffects,
deps: [[new Inject(BOOTSTRAP_EFFECTS)], EffectSources]
}
];
}

View File

@ -49,4 +49,3 @@ export * from './selectors/app.selectors';
export * from './states/app.state';
export * from './store.module';
export * from './bootstrap-effect';

View File

@ -3,4 +3,4 @@
"angularCompilerOptions": {
"enableIvy": false
}
}
}

View File

@ -1,10 +1,6 @@
<ng-container *ngIf="selection$ | async as selection">
<ng-container *ngIf="!data.iconButton">
<button
mat-menu-item
data-automation-id="share-action-button"
(click)="editSharedNode(selection)"
>
<button mat-menu-item data-automation-id="share-action-button" (click)="editSharedNode(selection)">
<mat-icon>link</mat-icon>
<ng-container *ngIf="isShared(selection); else not_shared">
<span>{{ 'APP.ACTIONS.SHARE_EDIT' | translate }}</span>

View File

@ -7,9 +7,7 @@
</button>
<mat-menu #childMenu="matMenu">
<ng-container
*ngFor="let child of actionRef.children; trackBy: trackByActionId"
>
<ng-container *ngFor="let child of actionRef.children; trackBy: trackByActionId">
<app-context-menu-item [actionRef]="child"></app-context-menu-item>
</ng-container>
</mat-menu>
@ -20,19 +18,11 @@
</ng-container>
<ng-container *ngSwitchCase="'custom'">
<adf-dynamic-component
[data]="actionRef.data"
[id]="actionRef.component"
></adf-dynamic-component>
<adf-dynamic-component [data]="actionRef.data" [id]="actionRef.component"></adf-dynamic-component>
</ng-container>
<ng-container *ngSwitchDefault>
<button
mat-menu-item
color="primary"
[id]="actionRef.id"
(click)="runAction()"
>
<button mat-menu-item color="primary" [id]="actionRef.id" (click)="runAction()">
<adf-icon [value]="actionRef.icon"></adf-icon>
<span>{{ actionRef.title | translate }}</span>
</button>

View File

@ -1,5 +1,5 @@
<div [dir]="direction">
<div style="visibility: hidden" [matMenuTriggerFor]="rootMenu"></div>
<div style="visibility: hidden;" [matMenuTriggerFor]="rootMenu"></div>
<mat-menu #rootMenu="matMenu" class="aca-context-menu" hasBackdrop="false" acaContextMenuOutsideEvent (clickOutside)="onClickOutsideEvent()">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId" [ngSwitch]="entry.type">

View File

@ -1,16 +1,7 @@
<ng-container *ngIf="expanded">
<button
data-automation-id="create-button"
mat-raised-button
[matMenuTriggerFor]="rootMenu"
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>
<span class="app-create-menu__text">{{
'APP.NEW_MENU.LABEL' | translate
}}</span>
<mat-icon title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>arrow_drop_down</mat-icon
>
<button data-automation-id="create-button" mat-raised-button [matMenuTriggerFor]="rootMenu" title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">
<span class="app-create-menu__text">{{ 'APP.NEW_MENU.LABEL' | translate }}</span>
<mat-icon title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">arrow_drop_down</mat-icon>
</button>
</ng-container>
@ -23,20 +14,11 @@
#createMenu="matMenuTrigger"
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>
<mat-icon
class="app-create-menu--icon"
title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}"
>queue</mat-icon
>
<mat-icon class="app-create-menu--icon" title="{{ 'APP.NEW_MENU.TOOLTIP' | translate }}">queue</mat-icon>
</button>
</ng-container>
<mat-menu
#rootMenu="matMenu"
class="app-create-menu__root-menu app-create-menu__sub-menu"
[overlapTrigger]="false"
yPosition="below"
>
<mat-menu #rootMenu="matMenu" class="app-create-menu__root-menu app-create-menu__sub-menu" [overlapTrigger]="false" yPosition="below">
<div role="menu" *ngFor="let action of createActions; trackBy: trackByActionId">
<app-toolbar-menu-item [actionRef]="action"></app-toolbar-menu-item>
</div>

View File

@ -1,9 +1,6 @@
<aca-page-layout>
<aca-page-layout-header>
<adf-breadcrumb [root]="title"
[folderNode]="node"
(navigate)="goBack()">
</adf-breadcrumb>
<adf-breadcrumb [root]="title" [folderNode]="node" (navigate)="goBack()"> </adf-breadcrumb>
<adf-toolbar class="adf-toolbar--inline">
<ng-container *ngFor="let entry of actions; trackBy: trackByActionId">
@ -15,45 +12,33 @@
<aca-page-layout-content>
<div class="acs-details-container">
<div class="acs-details-title">
<div class="acs-details-breadcrumb"
*ngIf="node">
<span class="acs-details-breadcrumb-library"> {{node.name}} </span>
<div class="acs-details-breadcrumb" *ngIf="node">
<span class="acs-details-breadcrumb-library"> {{ node.name }} </span>
-
<span class="acs-details-breadcrumb-item">{{'APP.INFO_DRAWER.TITLE' | translate}}</span>
<span class="acs-details-breadcrumb-item">{{ 'APP.INFO_DRAWER.TITLE' | translate }}</span>
</div>
<div class="acs-close-members-container">
<button mat-icon-button
data-automation-id="close-library"
(click)="goBack()">
<button mat-icon-button data-automation-id="close-library" (click)="goBack()">
<mat-icon>close</mat-icon>
</button>
</div>
</div>
<mat-tab-group [selectedIndex]="activeTab"
class="adw-details-tabs">
<mat-tab-group [selectedIndex]="activeTab" class="adw-details-tabs">
<mat-tab label="{{ 'APP.INFO_DRAWER.TABS.PROPERTIES' | translate }}">
<app-metadata-tab *ngIf="node && !isLoading; else loading"
[node]="node">
</app-metadata-tab>
<app-metadata-tab *ngIf="node && !isLoading; else loading" [node]="node"> </app-metadata-tab>
</mat-tab>
<mat-tab label="{{ 'APP.INFO_DRAWER.TABS.COMMENTS' | translate }}">
<app-comments-tab *ngIf="node && !isLoading; else loading"
[node]="node">
</app-comments-tab>
<app-comments-tab *ngIf="node && !isLoading; else loading" [node]="node"> </app-comments-tab>
</mat-tab>
<mat-tab label="{{ 'APP.INFO_DRAWER.TABS.PERMISSIONS' | translate }}">
<adf-permission-list *ngIf="node && !isLoading; else loading"
[nodeId]="node.id"></adf-permission-list>
<adf-permission-list *ngIf="node && !isLoading; else loading" [nodeId]="node.id"></adf-permission-list>
</mat-tab>
</mat-tab-group>
</div>
</aca-page-layout-content>
</aca-page-layout>
<ng-template #loading>
<mat-progress-bar color="primary"
mode="indeterminate">
</mat-progress-bar>
<mat-progress-bar color="primary" mode="indeterminate"> </mat-progress-bar>
</ng-template>

View File

@ -1,41 +1,41 @@
.acs-details-container {
background-color: var(--theme-card-background-color);
width: 100%;
background-color: var(--theme-card-background-color);
width: 100%;
}
.adw-details-tabs {
margin-top: 40px;
height: calc(100% - 80px);
margin-top: 40px;
height: calc(100% - 80px);
.mat-tab-body-wrapper {
height: 100%;
}
.mat-tab-body-wrapper {
height: 100%;
}
.mat-tab-labels {
text-transform: uppercase;
}
.mat-tab-labels {
text-transform: uppercase;
}
}
.acs-details-title {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.acs-close-members-container {
margin-right: 15px;
}
.acs-close-members-container {
margin-right: 15px;
}
}
.acs-details-breadcrumb {
font-size: 18px;
margin-left: 20px;
font-size: 18px;
margin-left: 20px;
.acs-details-breadcrumb-library {
font-weight: 900;
}
.acs-details-breadcrumb-library {
font-weight: 900;
}
.acs-details-breadcrumb-item {
font-weight: 100;
}
.acs-details-breadcrumb-item {
font-weight: 100;
}
}

View File

@ -26,10 +26,7 @@
(name-click)="handleNodeClick($event)"
>
<adf-custom-empty-content-template>
<adf-empty-content
icon="star_rate"
[title]="'APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE'"
subtitle="APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT">
<adf-empty-content icon="star_rate" [title]="'APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE'" subtitle="APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT">
</adf-empty-content>
</adf-custom-empty-content-template>

View File

@ -14,7 +14,6 @@
<adf-toolbar-divider></adf-toolbar-divider>
<ng-container *ngFor="let actionRef of actions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="actionRef">
</aca-toolbar-action>
<aca-toolbar-action [actionRef]="actionRef"> </aca-toolbar-action>
</ng-container>
</adf-layout-header>

View File

@ -45,7 +45,11 @@ export class InstantErrorStateMatcher implements ErrorStateMatcher {
templateUrl: './library-metadata-form.component.html'
})
export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestroy {
private queriesApi: QueriesApi;
_queriesApi: QueriesApi;
get queriesApi(): QueriesApi {
this._queriesApi = this._queriesApi ?? new QueriesApi(this.alfrescoApiService.getInstance());
return this._queriesApi;
}
@Input()
node: SiteEntry;
@ -70,9 +74,7 @@ export class LibraryMetadataFormComponent implements OnInit, OnChanges, OnDestro
onDestroy$: Subject<boolean> = new Subject<boolean>();
constructor(private alfrescoApiService: AlfrescoApiService, protected store: Store<AppStore>) {
this.queriesApi = new QueriesApi(this.alfrescoApiService.getInstance());
}
constructor(private alfrescoApiService: AlfrescoApiService, protected store: Store<AppStore>) {}
get canUpdateLibrary() {
return this.node && this.node.entry && this.node.entry.role === 'SiteManager';

View File

@ -3,24 +3,30 @@
</button>
<mat-menu #dataSorting="matMenu">
<button mat-menu-item [matMenuTriggerFor]="sorting" id="aca-button-sorting-menu">{{'SEARCH.SORT.SORTING_OPTION' | translate}}</button>
<button mat-menu-item [matMenuTriggerFor]="sorting" id="aca-button-sorting-menu">{{ 'SEARCH.SORT.SORTING_OPTION' | translate }}</button>
</mat-menu>
<mat-menu #sorting="matMenu">
<ng-template matMenuContent>
<button mat-menu-item *ngFor="let option of options" [id]="option.key+'-sorting-option'"
[matMenuTriggerFor]="direction" [matMenuTriggerData]="{option: option}">
{{option.label | translate}}
<button
mat-menu-item
*ngFor="let option of options"
[id]="option.key + '-sorting-option'"
[matMenuTriggerFor]="direction"
[matMenuTriggerData]="{ option: option }"
>
{{ option.label | translate }}
</button>
</ng-template>
</mat-menu>
<mat-menu #direction="matMenu">
<ng-template matMenuContent let-option="option">
<button mat-menu-item [id]="option.key+'-sorting-option-asc'"
(click)="onAscSortingClicked(option)">{{'SEARCH.SORT.ASCENDING' | translate}}</button>
<button mat-menu-item [id]="option.key+'-sorting-option-desc'"
(click)="onDescSortingClicked(option)">{{'SEARCH.SORT.DESCENDING' | translate}}</button>
<button mat-menu-item [id]="option.key + '-sorting-option-asc'" (click)="onAscSortingClicked(option)">
{{ 'SEARCH.SORT.ASCENDING' | translate }}
</button>
<button mat-menu-item [id]="option.key + '-sorting-option-desc'" (click)="onDescSortingClicked(option)">
{{ 'SEARCH.SORT.DESCENDING' | translate }}
</button>
</ng-template>
</mat-menu>

View File

@ -6,9 +6,7 @@
(click)="searchSubmit(searchTerm)"
[title]="'SEARCH.BUTTON.TOOLTIP' | translate"
>
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate"
>search</mat-icon
>
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate">search</mat-icon>
</button>
<mat-form-field class="app-input-form-field" [floatLabel]="'never'">
<input
@ -23,12 +21,7 @@
[placeholder]="'SEARCH.INPUT.PLACEHOLDER' | translate"
/>
<div matSuffix class="app-suffix-search-icon-wrapper">
<mat-icon
*ngIf="searchTerm.length"
(click)="clear()"
class="app-clear-icon"
>clear</mat-icon
>
<mat-icon *ngIf="searchTerm.length" (click)="clear()" class="app-clear-icon">clear</mat-icon>
</div>
</mat-form-field>
</div>

View File

@ -4,15 +4,8 @@
(menuOpened)="onMenuOpened()"
(menuClosed)="syncInputValues()"
>
<button
mat-icon-button
class="app-search-button"
(click)="searchByOption()"
[title]="'SEARCH.BUTTON.TOOLTIP' | translate"
>
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate"
>search</mat-icon
>
<button mat-icon-button class="app-search-button" (click)="searchByOption()" [title]="'SEARCH.BUTTON.TOOLTIP' | translate">
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate">search</mat-icon>
</button>
<mat-form-field class="app-input-form-field" [floatLabel]="'never'">
<input
@ -30,15 +23,8 @@
</mat-form-field>
</div>
<mat-menu
#searchOptionsMenu="matMenu"
[overlapTrigger]="true"
class="app-search-options-menu"
>
<div
(keydown.tab)="$event.stopPropagation()"
(keydown.shift.tab)="$event.stopPropagation()"
>
<mat-menu #searchOptionsMenu="matMenu" [overlapTrigger]="true" class="app-search-options-menu">
<div (keydown.tab)="$event.stopPropagation()" (keydown.shift.tab)="$event.stopPropagation()">
<div cdkTrapFocus>
<app-search-input-control
#searchInputControl
@ -47,9 +33,7 @@
(searchChange)="onSearchChange($event)"
>
</app-search-input-control>
<mat-hint *ngIf="hasLibraryConstraint()" class="app-search-hint">{{
'SEARCH.INPUT.HINT' | translate
}}</mat-hint>
<mat-hint *ngIf="hasLibraryConstraint()" class="app-search-hint">{{ 'SEARCH.INPUT.HINT' | translate }}</mat-hint>
<div id="search-options">
<mat-checkbox

View File

@ -40,8 +40,13 @@ export interface LibrarySearchQuery {
providedIn: 'root'
})
export class SearchLibrariesQueryBuilderService {
_queriesApi: QueriesApi;
get queriesApi(): QueriesApi {
this._queriesApi = this._queriesApi ?? new QueriesApi(this.alfrescoApiService.getInstance());
return this._queriesApi;
}
private _userQuery = '';
private queriesApi: QueriesApi;
updated: Subject<any> = new Subject();
executed: Subject<any> = new Subject();
@ -57,9 +62,7 @@ export class SearchLibrariesQueryBuilderService {
this._userQuery = value ? value.trim() : '';
}
constructor(private alfrescoApiService: AlfrescoApiService) {
this.queriesApi = new QueriesApi(this.alfrescoApiService.getInstance());
}
constructor(private alfrescoApiService: AlfrescoApiService) {}
update(): void {
const query = this.buildQuery();

View File

@ -12,34 +12,14 @@
<div class="main-content">
<div class="adf-search-results">
<div class="adf-search-results__content">
<mat-progress-bar
*ngIf="isLoading"
color="primary"
mode="indeterminate"
>
</mat-progress-bar>
<div
class="adf-search-results__content-header content"
*ngIf="data?.list.entries.length"
>
<mat-progress-bar *ngIf="isLoading" color="primary" mode="indeterminate"> </mat-progress-bar>
<div class="adf-search-results__content-header content" *ngIf="data?.list.entries.length">
<div class="content__side--left">
<div
class="adf-search-results--info-text"
*ngIf="totalResults !== 1"
>
{{
'APP.BROWSE.SEARCH_LIBRARIES.FOUND_RESULTS'
| translate: { number: totalResults }
}}
<div class="adf-search-results--info-text" *ngIf="totalResults !== 1">
{{ 'APP.BROWSE.SEARCH_LIBRARIES.FOUND_RESULTS' | translate: { number: totalResults } }}
</div>
<div
class="adf-search-results--info-text"
*ngIf="totalResults === 1"
>
{{
'APP.BROWSE.SEARCH_LIBRARIES.FOUND_ONE_RESULT'
| translate: { number: totalResults }
}}
<div class="adf-search-results--info-text" *ngIf="totalResults === 1">
{{ 'APP.BROWSE.SEARCH_LIBRARIES.FOUND_ONE_RESULT' | translate: { number: totalResults } }}
</div>
</div>
</div>
@ -58,11 +38,7 @@
>
<data-columns>
<ng-container *ngFor="let column of columns; trackBy: trackByColumnId">
<ng-container
*ngIf="
column.template && !(column.desktopOnly && isSmallScreen)
"
>
<ng-container *ngIf="column.template && !(column.desktopOnly && isSmallScreen)">
<data-column
[key]="column.key"
[title]="column.title"
@ -72,20 +48,12 @@
[sortable]="column.sortable"
>
<ng-template let-context>
<adf-dynamic-column
[id]="column.template"
[context]="context"
>
</adf-dynamic-column>
<adf-dynamic-column [id]="column.template" [context]="context"> </adf-dynamic-column>
</ng-template>
</data-column>
</ng-container>
<ng-container
*ngIf="
!column.template && !(column.desktopOnly && isSmallScreen)
"
>
<ng-container *ngIf="!column.template && !(column.desktopOnly && isSmallScreen)">
<data-column
[key]="column.key"
[title]="column.title"
@ -110,12 +78,7 @@
</adf-custom-empty-content-template>
</adf-document-list>
<adf-pagination
*ngIf="!documentList.isEmpty()"
acaPagination
[target]="documentList"
(change)="onPaginationChanged($event)"
>
<adf-pagination *ngIf="!documentList.isEmpty()" acaPagination [target]="documentList" (change)="onPaginationChanged($event)">
</adf-pagination>
</div>
</div>

View File

@ -12,12 +12,7 @@
<div class="main-content">
<div class="adf-search-results">
<div class="adf-search-results__content">
<mat-progress-bar
*ngIf="isLoading"
color="primary"
mode="indeterminate"
>
</mat-progress-bar>
<mat-progress-bar *ngIf="isLoading" color="primary" mode="indeterminate"> </mat-progress-bar>
<div class="adf-search-results__content-header content">
<adf-search-form class="content__side--left"></adf-search-form>
@ -25,7 +20,7 @@
<adf-search-filter-chips class="content__filter"></adf-search-filter-chips>
<button mat-button adf-reset-search class='content__reset-action'><mat-icon> refresh </mat-icon></button>
<button mat-button adf-reset-search class="content__reset-action"><mat-icon> refresh </mat-icon></button>
</div>
<div>
<aca-search-action-menu (sortingSelected)="onSearchSortingUpdate($event)"></aca-search-action-menu>
@ -44,19 +39,11 @@
(node-dblclick)="handleNodeClick($event)"
>
<data-columns>
<data-column
[key]="'$thumbnail'"
[type]="'image'"
[sr-title]="'ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL'"
[sortable]="false"
>
</data-column>
<data-column [key]="'$thumbnail'" [type]="'image'" [sr-title]="'ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL'" [sortable]="false"> </data-column>
<data-column key type="text">
<ng-template let-context>
<aca-search-results-row
[context]="context"
></aca-search-results-row>
<aca-search-results-row [context]="context"></aca-search-results-row>
</ng-template>
</data-column>
</data-columns>
@ -72,20 +59,22 @@
</adf-custom-empty-content-template>
</adf-document-list>
<adf-pagination
*ngIf="!documentList.isEmpty()"
acaPagination
[target]="documentList"
(change)="onPaginationChanged($event)"
>
<adf-pagination *ngIf="!documentList.isEmpty()" acaPagination [target]="documentList" (change)="onPaginationChanged($event)">
</adf-pagination>
</div>
</div>
</div>
<div
[ngClass]="(infoDrawerPreview$ | async) === true ? 'adf-search-results--right_panel_section-extended' : 'adf-search-results--right_panel_section'"
*ngIf="infoDrawerOpened$ | async">
<adf-viewer class="adf-search-results--embedded_viewer" [nodeId]="selection.last.entry.id" *ngIf="(infoDrawerPreview$ | async); else infoDrawerPanel">
[ngClass]="
(infoDrawerPreview$ | async) === true ? 'adf-search-results--right_panel_section-extended' : 'adf-search-results--right_panel_section'
"
*ngIf="infoDrawerOpened$ | async"
>
<adf-viewer
class="adf-search-results--embedded_viewer"
[nodeId]="selection.last.entry.id"
*ngIf="infoDrawerPreview$ | async; else infoDrawerPanel"
>
<adf-viewer-toolbar>
<div class="adf-search-results--preview-toolbar">
<div>
@ -94,7 +83,12 @@
</button>
</div>
<div>
<button mat-icon-button title="{{ 'ADF_VIEWER.ACTIONS.PREVIEW' | translate }}" color="accent" class="adf-search-results--visibility_button">
<button
mat-icon-button
title="{{ 'ADF_VIEWER.ACTIONS.PREVIEW' | translate }}"
color="accent"
class="adf-search-results--visibility_button"
>
<mat-icon>visibility</mat-icon>
</button>
<button mat-icon-button title="{{ 'ADF_VIEWER.ACTIONS.CLOSE' | translate }}" (click)="onPreviewClosed()">

View File

@ -1,15 +1,7 @@
<ng-container *ngIf="sharedLinkId">
<adf-viewer
[allowPrint]="false"
[allowDownload]="false"
[allowFullScreen]="false"
[sharedLinkId]="sharedLinkId"
[allowGoBack]="false"
>
<adf-viewer [allowPrint]="false" [allowDownload]="false" [allowFullScreen]="false" [sharedLinkId]="sharedLinkId" [allowGoBack]="false">
<adf-viewer-toolbar-actions>
<ng-container
*ngFor="let action of viewerToolbarActions; trackBy: trackByActionId"
>
<ng-container *ngFor="let action of viewerToolbarActions; trackBy: trackByActionId">
<aca-toolbar-action [actionRef]="action"></aca-toolbar-action>
</ng-container>
</adf-viewer-toolbar-actions>

View File

@ -38,9 +38,7 @@
class="action-button full-width"
>
<adf-icon *ngIf="item.icon" [value]="item.icon"></adf-icon>
<span class="action-button__label">{{
item.title | translate
}}</span>
<span class="action-button__label">{{ item.title | translate }}</span>
</button>
</div>
</mat-panel-title>

View File

@ -54,7 +54,11 @@ import { Actions, ofType } from '@ngrx/effects';
host: { class: 'app-viewer' }
})
export class AppViewerComponent implements OnInit, OnDestroy {
private versionsApi: VersionsApi;
_versionsApi: VersionsApi;
get versionsApi(): VersionsApi {
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
return this._versionsApi;
}
onDestroy$ = new Subject<boolean>();
@ -115,9 +119,7 @@ export class AppViewerComponent implements OnInit, OnDestroy {
private apiService: AlfrescoApiService,
private uploadService: UploadService,
private appHookService: AppHookService
) {
this.versionsApi = new VersionsApi(apiService.getInstance());
}
) {}
ngOnInit() {
this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened);

View File

@ -57,7 +57,11 @@ export class NodeActionsService {
moveDeletedEntries: any[] = [];
isSitesDestinationAvailable = false;
private nodesApi: NodesApi;
_nodesApi: NodesApi;
get nodesApi(): NodesApi {
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
return this._nodesApi;
}
constructor(
private contentService: ContentService,
@ -67,9 +71,7 @@ export class NodeActionsService {
private apiService: AlfrescoApiService,
private translation: TranslationService,
private thumbnailService: ThumbnailService
) {
this.nodesApi = new NodesApi(this.apiService.getInstance());
}
) {}
/**
* Copy node list

View File

@ -45,16 +45,19 @@ export interface TemplateDialogConfig {
export class NodeTemplateService {
private currentTemplateConfig: TemplateDialogConfig = null;
private rootNode: ResultNode;
private searchApi: SearchApi;
_searchApi: SearchApi;
get searchApi(): SearchApi {
this._searchApi = this._searchApi ?? new SearchApi(this.alfrescoApiService.getInstance());
return this._searchApi;
}
constructor(
private store: Store<AppStore>,
private alfrescoApiService: AlfrescoApiService,
private translation: TranslationService,
public dialog: MatDialog
) {
this.searchApi = new SearchApi(this.alfrescoApiService.getInstance());
}
) {}
selectTemplateDialog(config: TemplateDialogConfig): Subject<Node[]> {
this.currentTemplateConfig = config;

View File

@ -30,7 +30,7 @@ import { StoreRouterConnectingModule, DefaultRouterStateSerializer } from '@ngrx
import { EffectsModule } from '@ngrx/effects';
import { environment } from '../../environments/environment';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { provideBootstrapEffects, SharedStoreModule } from '@alfresco/aca-shared/store';
import { SharedStoreModule } from '@alfresco/aca-shared/store';
import {
AppEffects,
NodeEffects,
@ -62,11 +62,7 @@ import { INITIAL_STATE } from './initial-state';
stateKey: 'router'
}),
SharedStoreModule,
EffectsModule.forRoot([]),
!environment.production ? StoreDevtoolsModule.instrument({ maxAge: 25 }) : []
],
providers: [
provideBootstrapEffects([
EffectsModule.forRoot([
AppEffects,
NodeEffects,
DownloadEffects,
@ -77,7 +73,8 @@ import { INITIAL_STATE } from './initial-state';
FavoriteEffects,
TemplateEffects,
ContextMenuEffects
])
]),
!environment.production ? StoreDevtoolsModule.instrument({ maxAge: 25 }) : []
]
})
export class AppStoreModule {}

View File

@ -46,7 +46,11 @@ import { MatDialog } from '@angular/material/dialog';
@Injectable()
export class TemplateEffects {
private nodesApi: NodesApi;
_nodesApi: NodesApi;
get nodesApi(): NodesApi {
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
return this._nodesApi;
}
constructor(
private matDialog: MatDialog,
@ -55,9 +59,7 @@ export class TemplateEffects {
private apiService: AlfrescoApiService,
private actions$: Actions,
private nodeTemplateService: NodeTemplateService
) {
this.nodesApi = new NodesApi(this.apiService.getInstance());
}
) {}
@Effect({ dispatch: false })
fileFromTemplate$ = this.actions$.pipe(