Favorite remove the route evaluation (#1470)

* Remove the evaluation of routing

* Remove the data from json

* Use JSON parse to evaluate
This commit is contained in:
Maurizio Vitale
2020-05-14 12:54:16 +01:00
committed by GitHub
parent c8c73acd3d
commit 523d9e5bcb
3 changed files with 28 additions and 34 deletions
+19 -19
View File
@@ -5,12 +5,12 @@
"requires": true,
"dependencies": {
"@alfresco/adf-cli": {
"version": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1.tgz",
"integrity": "sha512-j0D6SobqhTbdvCO1wq+hylSBp/sJNsB6yEMfrTbFEtu3j0CiQl7EaWm+lvkQOH1i8W1iGFuzLAbm4WtFeyNr7w==",
"version": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-3.9.0-78332449a5edf309638e846c05b8231dbc95baf5.tgz",
"integrity": "sha512-rn9knJXX8wuXCfZrfV2y2OqqsT1zW6GM4yV/UYKkMFBdfq927AQDEpjJa/qxO4XkpG6PXotJeJijePHkot9Jiw==",
"dev": true,
"requires": {
"@alfresco/adf-testing": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"@alfresco/adf-testing": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"@angular-devkit/core": "^7.2.15",
"commander": "^4.0.0",
"ejs": "^2.6.1",
@@ -30,42 +30,42 @@
}
},
"@alfresco/adf-content-services": {
"version": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1.tgz",
"integrity": "sha512-eeCyiwR1ZE5gFLazSDeMOGSxy/ATOILfjwjizjUJHPIRzN7L1RkiuSJvBVYNteMyuhNt8y8gQPqM1VdOwpM5Eg==",
"version": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.9.0-78332449a5edf309638e846c05b8231dbc95baf5.tgz",
"integrity": "sha512-B+b7E4ZjRtSVeK77GGZrk6h8NT5VjJ8WP5payTcXhy9AFZ0AcE9Pt2RP9IGLxaZZpLF4Cq/TQDL/9vSs46mSog==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-core": {
"version": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1.tgz",
"integrity": "sha512-zCStw/o7LkOjthvyZ6hBJpVJMlFe0xuQsFaVgVsm8OXlS8FYY5cuF8oCxMKZ7Z1QmtAHmxpYTXLsWfUljPx1Rw==",
"version": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.9.0-78332449a5edf309638e846c05b8231dbc95baf5.tgz",
"integrity": "sha512-iH+4bVU6APIuSzq2U6NWoDjsY3g9PxKw95qEjFRFzKlrMdATkWlF7EZkqOz3FhnhldezmcQtlxEVtQiLFhibJw==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-extensions": {
"version": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1.tgz",
"integrity": "sha512-rcyYHlvkP8taLaGArbWEwdo3CI4PbI4J4PMiuqEV+eS/gIXGtrC8KazDqyRpekMbtYgISUdFde+SzatGi1y5xQ==",
"version": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.9.0-78332449a5edf309638e846c05b8231dbc95baf5.tgz",
"integrity": "sha512-1jHfzYY6yXoWUDwOTts1cbbHP4hQtUxegLzTTQiehQes85/cyFDsOpgJgW5n/vy9uEOAKQ4A0J4YMftKtM6yQA==",
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/adf-testing": {
"version": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1.tgz",
"integrity": "sha512-FTSz6/BmXl9IQCLirIfYqcwHa3xSYT6fpnUklW3whJAM5yG1xFmMXg9oNGHRaHK89MLShqMjGtg8bQApzb9mUg==",
"version": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-3.9.0-78332449a5edf309638e846c05b8231dbc95baf5.tgz",
"integrity": "sha512-Fyg+If1SHcZL561xyNPW8+k+/VKE2E8K6YudiHkfrr7g/7/ddwbTC8ZjQh91FlBP66My2Gbds44Nf+ufqpqFGQ==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
}
},
"@alfresco/js-api": {
"version": "3.9.0-60f7d7e3507a85b4118fc326097e53b987530dcc",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.9.0-60f7d7e3507a85b4118fc326097e53b987530dcc.tgz",
"integrity": "sha512-tNjXuT5Mc43xAZ+ZtwTXHfp5BGonvH5CG8vbK5+MKt8gItRnP8rRPCxzT1diTSvaeCLLoBr0QLwdC9HARAs6fg==",
"version": "3.9.0-e493d078d3320858e4dcb2e1c9aab2a0a3c67214",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.9.0-e493d078d3320858e4dcb2e1c9aab2a0a3c67214.tgz",
"integrity": "sha512-PMLSQ/L1s4L7wh4BTvmtAgJUxzptN/GYsY2mbEzNBp5xF+BBsrvgcxJUb56MFo+Gf1rPJo2uJAYdsSu7sl+EqQ==",
"requires": {
"event-emitter": "^0.3.5",
"minimatch": "3.0.4",
+6 -6
View File
@@ -30,10 +30,10 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"@alfresco/adf-core": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"@alfresco/adf-extensions": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"@alfresco/js-api": "3.9.0-60f7d7e3507a85b4118fc326097e53b987530dcc",
"@alfresco/adf-content-services": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"@alfresco/adf-core": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"@alfresco/adf-extensions": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"@alfresco/js-api": "3.9.0-e493d078d3320858e4dcb2e1c9aab2a0a3c67214",
"@angular-custom-builders/lite-serve": "0.0.2",
"@angular/animations": "7.2.15",
"@angular/cdk": "^7.3.7",
@@ -66,8 +66,8 @@
"zone.js": "0.8.29"
},
"devDependencies": {
"@alfresco/adf-cli": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"@alfresco/adf-testing": "3.9.0-8ef91ce98d8d0e20127b826fccec830077585fb1",
"@alfresco/adf-cli": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"@alfresco/adf-testing": "3.9.0-78332449a5edf309638e846c05b8231dbc95baf5",
"@angular-devkit/build-angular": "~0.13.9",
"@angular-devkit/build-ng-packagr": "^0.13.10",
"@angular/cli": "^7.3.9",
@@ -26,7 +26,7 @@
import { Component, ViewEncapsulation, OnInit, Input } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs';
import { SelectionState, ExtensionService } from '@alfresco/adf-extensions';
import { SelectionState } from '@alfresco/adf-extensions';
import {
AppStore,
ReloadDocumentListAction,
@@ -60,19 +60,13 @@ export class ToggleFavoriteComponent implements OnInit {
selection$: Observable<SelectionState>;
private reloadOnRoutes: string[] = [];
constructor(
private store: Store<AppStore>,
private extensionService: ExtensionService,
private router: Router
) {
constructor(private store: Store<AppStore>, private router: Router) {
this.selection$ = this.store.select(getAppSelection);
}
ngOnInit() {
if (this.data) {
this.reloadOnRoutes = this.extensionService.runExpression(
`$( ${this.data} )`
);
this.reloadOnRoutes = JSON.parse(this.data.replace(/'/g, '"'));
}
}