mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Ng16 migration (#4104)
* Updated ACA to Angular 16 * Updated Subject types to void in cases where no values was being emitted * [ACS-8375] [ACA] [General] Selecting a checkbox gives a light green color on focus (#3937) * [ACS-8376] [ACA] [[Manage Rules] Multiple UI issues in create rule dialog (#3943) * [ACS-8378] Fixed inputs having fill styling throughout ACA (#3944) * [ACS-8378] Mat form fields now have white background instead of grey * [ACS-8378] Fixed issue where the background of the boolean mode control dropdown was appearing as white when in condition groups. Labels in create rules window are now black * [ACS-8415] Sidenav labels are now grey (#3946) * [ACS-8379] Fixed issue where icons in menus were coming as black after ng16 upgrade (#3935) * refactor DI into inject() methods (#3954) * Cleanup and remove unneeded commits and changes * Fix eslint (#4032) * [REVERTABLE] - this is a quick temp fix to be able to release ACA with NG16 * [MIGRATION] - added some fix after rebase * Refactor AppEffects (#4079) * Refactor effects to use inject() (#4080) * Refactor effects to use inject() (#4081) * Rebase fixes * [ACS-8739] Fix e2e tests (#4106) * Updated ADF deps * Fixed unit passing mandatory value * Updated ADF version * Updated ADF version * [ACS-8743] [ADW] click on search button open a blank page (#4125) * Updating ADF dep * Updating ADF * Refactor injections in effects (#4137) * Upstream dependencies * Refactor SearchAiEffects * Updating ADF and rebased * Rebased and updated * Rebased and updated * Updating deps * Updating deps * Updating deps * Rebased and updated deps * Pushing package-lock.json * Moved the JWT storage injection token at app level * Updated dependencies * Fixed unit test * Improved solutio for token with no need to set it explicitly * Updating dependencies * Updated package version * Updated ADF deps * Use latest ADF --------- Co-authored-by: swapnil.verma <swapnil.verma@globallogic.com> Co-authored-by: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com> Co-authored-by: VitoAlbano <vito.albano.123@gmail.com> Co-authored-by: Ehsan Rezaei <ehsan.rezaei@hyland.com> Co-authored-by: MichalKinas <michal.kinas@hyland.com>
This commit is contained in:
parent
e97fd97e7c
commit
3fbdc93c51
@ -12,6 +12,7 @@
|
|||||||
"main": "app/src/main.ts",
|
"main": "app/src/main.ts",
|
||||||
"tsConfig": "app/tsconfig.app.json",
|
"tsConfig": "app/tsconfig.app.json",
|
||||||
"polyfills": "app/src/polyfills.ts",
|
"polyfills": "app/src/polyfills.ts",
|
||||||
|
"preserveSymlinks": true,
|
||||||
"allowedCommonJsDependencies": ["minimatch", "cropperjs"],
|
"allowedCommonJsDependencies": ["minimatch", "cropperjs"],
|
||||||
"stylePreprocessorOptions": {
|
"stylePreprocessorOptions": {
|
||||||
"includePaths": ["projects/aca-content/src/lib/ui", "node_modules", "node_modules/@alfresco/adf-core/lib"]
|
"includePaths": ["projects/aca-content/src/lib/ui", "node_modules", "node_modules/@alfresco/adf-core/lib"]
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { TRANSLATION_PROVIDER, CoreModule, AuthGuard, AuthModule } from '@alfresco/adf-core';
|
import { AuthGuard, AuthModule, CoreModule, TRANSLATION_PROVIDER } from '@alfresco/adf-core';
|
||||||
import { AppService } from '@alfresco/aca-shared';
|
import { AppService } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
import { AppExtensionsModule } from './extensions.module';
|
import { AppExtensionsModule } from './extensions.module';
|
||||||
@ -51,9 +51,9 @@ import localeSv from '@angular/common/locales/sv';
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { AppComponent } from './app.components';
|
import { AppComponent } from './app.components';
|
||||||
import { ContentUrlService, CONTENT_LAYOUT_ROUTES, ContentServiceExtensionModule, CoreExtensionsModule } from '@alfresco/aca-content';
|
import { CONTENT_LAYOUT_ROUTES, ContentServiceExtensionModule, ContentUrlService, CoreExtensionsModule } from '@alfresco/aca-content';
|
||||||
import { ContentVersionService } from '@alfresco/adf-content-services';
|
import { ContentVersionService } from '@alfresco/adf-content-services';
|
||||||
import { ShellModule, SHELL_APP_SERVICE, SHELL_AUTH_TOKEN } from '@alfresco/adf-core/shell';
|
import { SHELL_APP_SERVICE, SHELL_AUTH_TOKEN, ShellModule } from '@alfresco/adf-core/shell';
|
||||||
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
||||||
import { APP_ROUTES } from './app.routes';
|
import { APP_ROUTES } from './app.routes';
|
||||||
import { MatIconRegistry } from '@angular/material/icon';
|
import { MatIconRegistry } from '@angular/material/icon';
|
||||||
|
@ -21,17 +21,17 @@ export class MyComponent {
|
|||||||
|
|
||||||
Below is the list of public hooks you can use in the plugin:
|
Below is the list of public hooks you can use in the plugin:
|
||||||
|
|
||||||
| Version | Name | Details | Description |
|
| Version | Name | Details | Description |
|
||||||
| ------- | ---------------------- | ---------------------------------------------| -----------------------------------------------------------------------------------|
|
| ------- | ---------------------- |-----------| -----------------------------------------------------------------------------------|
|
||||||
| 2.2.2 | reload | n/a | Reloads the details in the current page. |
|
| 2.2.2 | reload | n/a | Reloads the details in the current page. |
|
||||||
| 2.2.2 | reset | n/a | Resets the document list. |
|
| 2.2.2 | reset | n/a | Resets the document list. |
|
||||||
| 2.2.2 | nodesDeleted | n/a | Notifies the node deleted. |
|
| 2.2.2 | nodesDeleted | n/a | Notifies the node deleted. |
|
||||||
| 2.2.2 | libraryDeleted | n/a | Notifies the library deleted. |
|
| 2.2.2 | libraryDeleted | n/a | Notifies the library deleted. |
|
||||||
| 2.2.2 | libraryCreated | SiteEntry | Notifies the library created. |
|
| 2.2.2 | libraryCreated | SiteEntry | Notifies the library created. |
|
||||||
| 2.2.2 | libraryUpdated | SiteEntry | Notifies the library updated. |
|
| 2.2.2 | libraryUpdated | SiteEntry | Notifies the library updated. |
|
||||||
| 2.2.2 | libraryJoined | string | Notifies user joined to library. |
|
| 2.2.2 | libraryJoined | n/a | Notifies user joined to library. |
|
||||||
| 2.2.2 | libraryLeft | n/a | Notifies user left to library. |
|
| 2.2.2 | libraryLeft | n/a | Notifies user left to library. |
|
||||||
| 2.2.2 | library400Error | n/a | Notifies library errored operation. |
|
| 2.2.2 | library400Error | n/a | Notifies library errored operation. |
|
||||||
| 2.2.2 | joinLibraryToggle | string | Notifies user toggled join library. |
|
| 2.2.2 | joinLibraryToggle | n/a | Notifies user toggled join library. |
|
||||||
| 2.2.2 | linksUnshared | n/a | Notifies the shared link unshared. |
|
| 2.2.2 | linksUnshared | n/a | Notifies the shared link unshared. |
|
||||||
| 2.2.2 | favoriteLibraryToggle | n/a | Notifies user toggle favorite library. |
|
| 2.2.2 | favoriteLibraryToggle | n/a | Notifies user toggle favorite library. |
|
||||||
|
12708
package-lock.json
generated
12708
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
70
package.json
70
package.json
@ -30,50 +30,50 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alfresco/adf-content-services": "7.0.0-alpha.4-11462485517",
|
"@alfresco/adf-content-services": "7.0.0-alpha.4-11480441882",
|
||||||
"@alfresco/adf-core": "7.0.0-alpha.4-11462485517",
|
"@alfresco/adf-core": "7.0.0-alpha.4-11480441882",
|
||||||
"@alfresco/adf-extensions": "7.0.0-alpha.4-11462485517",
|
"@alfresco/adf-extensions": "7.0.0-alpha.4-11480441882",
|
||||||
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11462485517",
|
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11480441882",
|
||||||
"@alfresco/js-api": "8.0.0-alpha.4-11462485517",
|
"@alfresco/js-api": ">=8.0.0-alpha.4-11480441882",
|
||||||
"@angular/animations": "15.2.10",
|
"@angular/animations": "16.2.9",
|
||||||
"@angular/cdk": "15.2.9",
|
"@angular/cdk": "16.2.9",
|
||||||
"@angular/common": "15.2.10",
|
"@angular/common": "16.2.9",
|
||||||
"@angular/compiler": "15.2.10",
|
"@angular/compiler": "16.2.9",
|
||||||
"@angular/core": "15.2.10",
|
"@angular/core": "16.2.9",
|
||||||
"@angular/forms": "15.2.10",
|
"@angular/forms": "16.2.9",
|
||||||
"@angular/material": "15.2.9",
|
"@angular/material": "16.2.9",
|
||||||
"@angular/material-date-fns-adapter": "15.2.9",
|
"@angular/material-date-fns-adapter": "16.2.9",
|
||||||
"@angular/platform-browser": "15.2.10",
|
"@angular/platform-browser": "16.2.9",
|
||||||
"@angular/platform-browser-dynamic": "15.2.10",
|
"@angular/platform-browser-dynamic": "16.2.9",
|
||||||
"@angular/router": "15.2.10",
|
"@angular/router": "16.2.9",
|
||||||
"@fontsource/open-sans": "^5.1.0",
|
"@fontsource/open-sans": "^5.1.0",
|
||||||
"@mat-datetimepicker/core": "11.0.3",
|
"@mat-datetimepicker/core": "12.0.1",
|
||||||
"@ngrx/effects": "^15.2.0",
|
"@ngrx/effects": "16.3.0",
|
||||||
"@ngrx/router-store": "^15.2.0",
|
"@ngrx/router-store": "16.3.0",
|
||||||
"@ngrx/store": "^15.2.0",
|
"@ngrx/store": "16.3.0",
|
||||||
"@ngrx/store-devtools": "^15.2.0",
|
"@ngrx/store-devtools": "16.3.0",
|
||||||
"@ngx-translate/core": "^14.0.0",
|
"@ngx-translate/core": "^14.0.0",
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
"material-icons": "^1.13.12",
|
"material-icons": "^1.13.12",
|
||||||
"minimatch-browser": "^1.0.0",
|
"minimatch-browser": "^1.0.0",
|
||||||
"pdfjs-dist": "3.3.122",
|
"pdfjs-dist": "3.3.122",
|
||||||
"rxjs": "6.6.6",
|
"rxjs": "7.5.7",
|
||||||
"tslib": "^2.7.0",
|
"tslib": "^2.7.0",
|
||||||
"zone.js": "0.11.8"
|
"zone.js": "0.13.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alfresco/adf-cli": "7.0.0-alpha.4-11462485517",
|
"@alfresco/adf-cli": "7.0.0-alpha.4-11480441882",
|
||||||
"@angular-devkit/build-angular": "15.2.10",
|
"@angular-devkit/build-angular": "16.2.9",
|
||||||
"@angular-devkit/core": "15.2.10",
|
"@angular-devkit/core": "16.2.9",
|
||||||
"@angular-devkit/schematics": "15.2.10",
|
"@angular-devkit/schematics": "16.2.9",
|
||||||
"@angular-eslint/builder": "^15.2.1",
|
"@angular-eslint/builder": "17.0.0",
|
||||||
"@angular-eslint/eslint-plugin": "^16.1.2",
|
"@angular-eslint/eslint-plugin": "^16.1.2",
|
||||||
"@angular-eslint/eslint-plugin-template": "^16.0.2",
|
"@angular-eslint/eslint-plugin-template": "^16.0.2",
|
||||||
"@angular-eslint/schematics": "15.2.1",
|
"@angular-eslint/schematics": "^16.3.0",
|
||||||
"@angular-eslint/template-parser": "^15.2.1",
|
"@angular-eslint/template-parser": "^16.3.1",
|
||||||
"@angular/cli": "15.2.10",
|
"@angular/cli": "16.2.9",
|
||||||
"@angular/compiler-cli": "15.2.10",
|
"@angular/compiler-cli": "16.2.9",
|
||||||
"@angular/language-service": "15.2.10",
|
"@angular/language-service": "16.2.9",
|
||||||
"@cspell/eslint-plugin": "^8.14.1",
|
"@cspell/eslint-plugin": "^8.14.1",
|
||||||
"@nx/angular": "17.0.2",
|
"@nx/angular": "17.0.2",
|
||||||
"@nx/eslint-plugin": "17.0.2",
|
"@nx/eslint-plugin": "17.0.2",
|
||||||
@ -110,13 +110,13 @@
|
|||||||
"karma-jasmine-html-reporter": "^2.0.0",
|
"karma-jasmine-html-reporter": "^2.0.0",
|
||||||
"karma-mocha-reporter": "^2.2.5",
|
"karma-mocha-reporter": "^2.2.5",
|
||||||
"lint-staged": "^15.2.7",
|
"lint-staged": "^15.2.7",
|
||||||
"ng-packagr": "^15.2.1",
|
"ng-packagr": "^16.2.1",
|
||||||
"node-stream-zip": "^1.14.0",
|
"node-stream-zip": "^1.14.0",
|
||||||
"nx": "17.3.1",
|
"nx": "17.3.1",
|
||||||
"prettier": "2.8.8",
|
"prettier": "2.8.8",
|
||||||
"stylelint": "^15.11.0",
|
"stylelint": "^15.11.0",
|
||||||
"stylelint-config-standard-scss": "^7.0.1",
|
"stylelint-config-standard-scss": "^7.0.1",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "4.9.5"
|
"typescript": "5.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh
|
|||||||
|
|
||||||
cardViewItems: CardViewItem[] = [];
|
cardViewItems: CardViewItem[] = [];
|
||||||
parameters: { [key: string]: unknown } = {};
|
parameters: { [key: string]: unknown } = {};
|
||||||
private onDestroy$ = new Subject<boolean>();
|
private onDestroy$ = new Subject<void>();
|
||||||
|
|
||||||
get selectedActionDefinitionId(): string {
|
get selectedActionDefinitionId(): string {
|
||||||
return this.form.get('actionDefinitionId').value;
|
return this.form.get('actionDefinitionId').value;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="i > 0" subscriptSizing="dynamic">
|
<mat-form-field *ngIf="i > 0" subscriptSizing="dynamic" class="aca-rule-composite-condition__boolean-mode-control">
|
||||||
<mat-select
|
<mat-select
|
||||||
[formControl]="booleanModeControl">
|
[formControl]="booleanModeControl">
|
||||||
<mat-option value="and">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LOGIC_OPERATORS.AND' | translate }}</mat-option>
|
<mat-option value="and">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LOGIC_OPERATORS.AND' | translate }}</mat-option>
|
||||||
|
@ -37,6 +37,14 @@
|
|||||||
& > :nth-child(2) {
|
& > :nth-child(2) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aca-rule-composite-condition__boolean-mode-control #{$mat-form-field-wrapper} {
|
||||||
|
background-color: unset;
|
||||||
|
|
||||||
|
#{$mat-select-disabled} {
|
||||||
|
color: var(--adf-theme-foreground-text-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__no-conditions {
|
&__no-conditions {
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
& > label,
|
& > label,
|
||||||
& > .aca-label {
|
& > .aca-label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
color: var(--adf-theme-foreground-text-color);
|
||||||
width: 20%;
|
width: 20%;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
|
@ -115,7 +115,7 @@ export class RuleDetailsUiComponent implements OnInit, OnDestroy {
|
|||||||
@Output()
|
@Output()
|
||||||
formValueChanged = new EventEmitter<Partial<Rule>>();
|
formValueChanged = new EventEmitter<Partial<Rule>>();
|
||||||
|
|
||||||
private onDestroy$ = new Subject();
|
private onDestroy$ = new Subject<void>();
|
||||||
form: UntypedFormGroup;
|
form: UntypedFormGroup;
|
||||||
|
|
||||||
errorScriptConstraint: ActionParameterConstraint;
|
errorScriptConstraint: ActionParameterConstraint;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
import { AOS_ACTION, AosAction } from '../actions/aos.actions';
|
import { AOS_ACTION, AosAction } from '../actions/aos.actions';
|
||||||
@ -31,7 +31,8 @@ import { AosEditOnlineService } from '../aos-extension.service';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AosEffects {
|
export class AosEffects {
|
||||||
constructor(private actions$: Actions, private aosEditOnlineService: AosEditOnlineService) {}
|
private actions$ = inject(Actions);
|
||||||
|
private aosEditOnlineService = inject(AosEditOnlineService);
|
||||||
|
|
||||||
openOffice$ = createEffect(
|
openOffice$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||||
import { AppStore, getSearchItemsTotalCount } from '@alfresco/aca-shared/store';
|
import { AppStore, getSearchItemsTotalCount } from '@alfresco/aca-shared/store';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, inject, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
@ -50,11 +50,12 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy {
|
|||||||
tooltip: string;
|
tooltip: string;
|
||||||
bulkSelectControl = new FormControl();
|
bulkSelectControl = new FormControl();
|
||||||
|
|
||||||
private readonly totalItems$: Observable<number> = this.store.select(getSearchItemsTotalCount);
|
private readonly store = inject<Store<AppStore>>(Store);
|
||||||
|
private readonly translationService = inject(TranslationService);
|
||||||
|
private readonly extensions = inject(AppExtensionService);
|
||||||
|
|
||||||
private readonly onDestroy$ = new Subject();
|
private readonly onDestroy$ = new Subject();
|
||||||
|
private readonly totalItems$: Observable<number> = this.store.select(getSearchItemsTotalCount);
|
||||||
constructor(private store: Store<AppStore>, private translationService: TranslationService, private extensions: AppExtensionService) {}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.totalItems$
|
this.totalItems$
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -88,7 +89,7 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.onDestroy$.next();
|
this.onDestroy$.next(true);
|
||||||
this.onDestroy$.complete();
|
this.onDestroy$.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ export class OutsideEventDirective implements OnInit, OnDestroy {
|
|||||||
private subscriptions: Subscription[] = [];
|
private subscriptions: Subscription[] = [];
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
clickOutside: EventEmitter<null> = new EventEmitter();
|
clickOutside: EventEmitter<void> = new EventEmitter();
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions = this.subscriptions.concat([
|
this.subscriptions = this.subscriptions.concat([
|
||||||
|
@ -67,7 +67,7 @@ import { FileSizePipe, InfoDrawerButtonsDirective } from '@alfresco/adf-core';
|
|||||||
export class DetailsComponent extends PageComponent implements OnInit, OnDestroy {
|
export class DetailsComponent extends PageComponent implements OnInit, OnDestroy {
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
onDestroy$ = new Subject<boolean>();
|
onDestroy$ = new Subject<void>();
|
||||||
activeTab = 1;
|
activeTab = 1;
|
||||||
aspectActions: Array<ContentActionRef> = [];
|
aspectActions: Array<ContentActionRef> = [];
|
||||||
nodeIcon: string;
|
nodeIcon: string;
|
||||||
|
@ -138,12 +138,12 @@ describe('FavoriteLibrariesComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should reload on libraryDeleted action', () => {
|
it('should reload on libraryDeleted action', () => {
|
||||||
appHookService.libraryDeleted.next();
|
appHookService.libraryDeleted.next('');
|
||||||
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reload on libraryUpdated action', () => {
|
it('should reload on libraryUpdated action', () => {
|
||||||
appHookService.libraryUpdated.next();
|
appHookService.libraryUpdated.next({} as any);
|
||||||
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ describe('FavoriteLibrariesComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should reload on libraryLeft action', () => {
|
it('should reload on libraryLeft action', () => {
|
||||||
appHookService.libraryLeft.next();
|
appHookService.libraryLeft.next({} as any);
|
||||||
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -79,6 +79,10 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
.aca-action-button__label {
|
||||||
|
color: var(--theme-action-button-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
&:hover .aca-action-button__label {
|
&:hover .aca-action-button__label {
|
||||||
color: var(--theme-sidenav-active-text-color);
|
color: var(--theme-sidenav-active-text-color);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ import { MatMenuModule } from '@angular/material/menu';
|
|||||||
})
|
})
|
||||||
export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy {
|
export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy {
|
||||||
library;
|
library;
|
||||||
private onDestroy$: Subject<boolean> = new Subject<boolean>();
|
private onDestroy$: Subject<void> = new Subject<void>();
|
||||||
|
|
||||||
constructor(private store: Store<AppStore>, private appHookService: AppHookService, private router: Router) {}
|
constructor(private store: Store<AppStore>, private appHookService: AppHookService, private router: Router) {}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.onDestroy$.next(true);
|
this.onDestroy$.next();
|
||||||
this.onDestroy$.complete();
|
this.onDestroy$.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,14 +141,14 @@ describe('DocumentListDirective', () => {
|
|||||||
|
|
||||||
it('should reset store selection on `reload` event', () => {
|
it('should reset store selection on `reload` event', () => {
|
||||||
documentListDirective.ngOnInit();
|
documentListDirective.ngOnInit();
|
||||||
documentListServiceMock.reload$.next();
|
documentListServiceMock.reload$.next({});
|
||||||
|
|
||||||
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reset selection state on `reset` event', () => {
|
it('should reset selection state on `reset` event', () => {
|
||||||
documentListDirective.ngOnInit();
|
documentListDirective.ngOnInit();
|
||||||
documentListServiceMock.resetSelection$.next();
|
documentListServiceMock.resetSelection$.next({});
|
||||||
|
|
||||||
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
||||||
expect(documentListDirective.selectedNode).toBeNull();
|
expect(documentListDirective.selectedNode).toBeNull();
|
||||||
|
@ -220,7 +220,7 @@ describe('ContentManagementService', () => {
|
|||||||
const selection: any[] = [{ entry: { id: 'node-to-copy-id', name: 'name' } }];
|
const selection: any[] = [{ entry: { id: 'node-to-copy-id', name: 'name' } }];
|
||||||
|
|
||||||
store.dispatch(new CopyNodesAction(selection));
|
store.dispatch(new CopyNodesAction(selection));
|
||||||
nodeActions.contentCopied.next();
|
nodeActions.contentCopied.next({} as any);
|
||||||
subject.next('');
|
subject.next('');
|
||||||
|
|
||||||
expect(nodeActions.copyNodes).toHaveBeenCalled();
|
expect(nodeActions.copyNodes).toHaveBeenCalled();
|
||||||
@ -608,7 +608,7 @@ describe('ContentManagementService', () => {
|
|||||||
} as MatSnackBarRef<SimpleSnackBar>);
|
} as MatSnackBarRef<SimpleSnackBar>);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => subject.next());
|
afterEach(() => subject.next({} as any));
|
||||||
|
|
||||||
it('should move node back to initial parent, after succeeded move', () => {
|
it('should move node back to initial parent, after succeeded move', () => {
|
||||||
const initialParent = 'parent-id-0';
|
const initialParent = 'parent-id-0';
|
||||||
|
@ -117,7 +117,7 @@ describe('NodeActionsService', () => {
|
|||||||
it('should validate selection when allowableOperation has `create`', () => {
|
it('should validate selection when allowableOperation has `create`', () => {
|
||||||
spyOn(dialog, 'open').and.returnValue({
|
spyOn(dialog, 'open').and.returnValue({
|
||||||
afterClosed: of
|
afterClosed: of
|
||||||
} as MatDialogRef<any>);
|
} as unknown as MatDialogRef<any>);
|
||||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ describe('NodeActionsService', () => {
|
|||||||
it('should invalidate selection when allowableOperation does not have `create`', () => {
|
it('should invalidate selection when allowableOperation does not have `create`', () => {
|
||||||
spyOn(dialog, 'open').and.returnValue({
|
spyOn(dialog, 'open').and.returnValue({
|
||||||
afterClosed: of
|
afterClosed: of
|
||||||
} as MatDialogRef<any>);
|
} as unknown as MatDialogRef<any>);
|
||||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ describe('NodeActionsService', () => {
|
|||||||
it('should invalidate selection if isSite', () => {
|
it('should invalidate selection if isSite', () => {
|
||||||
spyOn(dialog, 'open').and.returnValue({
|
spyOn(dialog, 'open').and.returnValue({
|
||||||
afterClosed: of
|
afterClosed: of
|
||||||
} as MatDialogRef<any>);
|
} as unknown as MatDialogRef<any>);
|
||||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ describe('NodeActionsService', () => {
|
|||||||
it('should validate selection if not a Site', () => {
|
it('should validate selection if not a Site', () => {
|
||||||
spyOn(dialog, 'open').and.returnValue({
|
spyOn(dialog, 'open').and.returnValue({
|
||||||
afterClosed: of
|
afterClosed: of
|
||||||
} as MatDialogRef<any>);
|
} as unknown as MatDialogRef<any>);
|
||||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ describe('NodeActionsService', () => {
|
|||||||
|
|
||||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||||
dialogData = data;
|
dialogData = data;
|
||||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||||
});
|
});
|
||||||
|
|
||||||
service.copyNodes([fileToCopy, folderToCopy]);
|
service.copyNodes([fileToCopy, folderToCopy]);
|
||||||
@ -354,7 +354,7 @@ describe('NodeActionsService', () => {
|
|||||||
let dialogData = null;
|
let dialogData = null;
|
||||||
const spyOnDialog = spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
const spyOnDialog = spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||||
dialogData = data;
|
dialogData = data;
|
||||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||||
});
|
});
|
||||||
|
|
||||||
service.copyNodes([fileToCopy, folderToCopy]);
|
service.copyNodes([fileToCopy, folderToCopy]);
|
||||||
@ -396,7 +396,7 @@ describe('NodeActionsService', () => {
|
|||||||
let dialogData: any;
|
let dialogData: any;
|
||||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||||
dialogData = data;
|
dialogData = data;
|
||||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||||
});
|
});
|
||||||
|
|
||||||
service.copyNodes([{ entry: { id: 'entry-id', name: 'entry-name' } }]);
|
service.copyNodes([{ entry: { id: 'entry-id', name: 'entry-name' } }]);
|
||||||
@ -418,7 +418,7 @@ describe('NodeActionsService', () => {
|
|||||||
let dialogData = null;
|
let dialogData = null;
|
||||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||||
dialogData = data;
|
dialogData = data;
|
||||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||||
});
|
});
|
||||||
|
|
||||||
service.copyNodes([{ entry: { id: 'entry-id' } }]);
|
service.copyNodes([{ entry: { id: 'entry-id' } }]);
|
||||||
|
@ -22,15 +22,16 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { AppActionTypes, ReloadDocumentListAction, ResetSelectionAction } from '@alfresco/aca-shared/store';
|
import { AppActionTypes, ReloadDocumentListAction, ResetSelectionAction } from '@alfresco/aca-shared/store';
|
||||||
import { DocumentListService } from '@alfresco/adf-content-services';
|
import { DocumentListService } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(private actions$: Actions, private documentListService: DocumentListService) {}
|
actions$ = inject(Actions);
|
||||||
|
documentListService = inject(DocumentListService);
|
||||||
|
|
||||||
reload = createEffect(
|
reload = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ContextMenuActionTypes, ContextMenu } from '@alfresco/aca-shared/store';
|
import { ContextMenu, ContextMenuActionTypes } from '@alfresco/aca-shared/store';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { ContextMenuOverlayRef } from '../../components/context-menu/context-menu-overlay';
|
import { ContextMenuOverlayRef } from '../../components/context-menu/context-menu-overlay';
|
||||||
import { ContextMenuService } from '../../components/context-menu/context-menu.service';
|
import { ContextMenuService } from '../../components/context-menu/context-menu.service';
|
||||||
@ -33,7 +33,8 @@ import { ContextMenuService } from '../../components/context-menu/context-menu.s
|
|||||||
export class ContextMenuEffects {
|
export class ContextMenuEffects {
|
||||||
private overlayRef: ContextMenuOverlayRef = null;
|
private overlayRef: ContextMenuOverlayRef = null;
|
||||||
|
|
||||||
constructor(private contextMenuService: ContextMenuService, private actions$: Actions) {}
|
contextMenuService = inject(ContextMenuService);
|
||||||
|
actions$ = inject(Actions);
|
||||||
|
|
||||||
contextMenu$ = createEffect(
|
contextMenu$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -22,12 +22,12 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AppStore, DownloadNodesAction, NodeActionTypes, NodeInfo, getAppSelection, getCurrentVersion } from '@alfresco/aca-shared/store';
|
import { AppStore, DownloadNodesAction, getAppSelection, getCurrentVersion, NodeActionTypes, NodeInfo } from '@alfresco/aca-shared/store';
|
||||||
import { DownloadZipDialogComponent } from '@alfresco/adf-content-services';
|
import { DownloadZipDialogComponent } from '@alfresco/adf-content-services';
|
||||||
import { NodeEntry, Version } from '@alfresco/js-api';
|
import { NodeEntry, Version } from '@alfresco/js-api';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { map, take } from 'rxjs/operators';
|
import { map, take } from 'rxjs/operators';
|
||||||
import { ContentApiService } from '@alfresco/aca-shared';
|
import { ContentApiService } from '@alfresco/aca-shared';
|
||||||
@ -35,13 +35,11 @@ import { ContentUrlService } from '../../services/content-url.service';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DownloadEffects {
|
export class DownloadEffects {
|
||||||
constructor(
|
private store = inject(Store<AppStore>);
|
||||||
private store: Store<AppStore>,
|
private actions$ = inject(Actions);
|
||||||
private actions$: Actions,
|
private contentApi = inject(ContentApiService);
|
||||||
private contentApi: ContentApiService,
|
private dialog = inject(MatDialog);
|
||||||
private dialog: MatDialog,
|
private contentUrlService = inject(ContentUrlService);
|
||||||
private contentUrlService: ContentUrlService
|
|
||||||
) {}
|
|
||||||
|
|
||||||
downloadNode$ = createEffect(
|
downloadNode$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -22,16 +22,18 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { map, take } from 'rxjs/operators';
|
import { map, take } from 'rxjs/operators';
|
||||||
import { AppStore, NodeActionTypes, AddFavoriteAction, RemoveFavoriteAction, getAppSelection } from '@alfresco/aca-shared/store';
|
import { AddFavoriteAction, AppStore, getAppSelection, NodeActionTypes, RemoveFavoriteAction } from '@alfresco/aca-shared/store';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { ContentManagementService } from '../../services/content-management.service';
|
import { ContentManagementService } from '../../services/content-management.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FavoriteEffects {
|
export class FavoriteEffects {
|
||||||
constructor(private store: Store<AppStore>, private actions$: Actions, private content: ContentManagementService) {}
|
private store = inject(Store<AppStore>);
|
||||||
|
private actions$ = inject(Actions);
|
||||||
|
private content = inject(ContentManagementService);
|
||||||
|
|
||||||
addFavorite$ = createEffect(
|
addFavorite$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -26,15 +26,15 @@ import {
|
|||||||
AppStore,
|
AppStore,
|
||||||
CreateLibraryAction,
|
CreateLibraryAction,
|
||||||
DeleteLibraryAction,
|
DeleteLibraryAction,
|
||||||
|
getAppSelection,
|
||||||
LeaveLibraryAction,
|
LeaveLibraryAction,
|
||||||
LibraryActionTypes,
|
LibraryActionTypes,
|
||||||
NavigateLibraryAction,
|
NavigateLibraryAction,
|
||||||
NavigateRouteAction,
|
NavigateRouteAction,
|
||||||
UpdateLibraryAction,
|
UpdateLibraryAction
|
||||||
getAppSelection
|
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { inject, Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { map, mergeMap, take } from 'rxjs/operators';
|
import { map, mergeMap, take } from 'rxjs/operators';
|
||||||
import { ContentApiService } from '@alfresco/aca-shared';
|
import { ContentApiService } from '@alfresco/aca-shared';
|
||||||
@ -44,13 +44,10 @@ import { NotificationService } from '@alfresco/adf-core';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class LibraryEffects {
|
export class LibraryEffects {
|
||||||
private notificationService = inject(NotificationService);
|
private notificationService = inject(NotificationService);
|
||||||
|
private store = inject(Store<AppStore>);
|
||||||
constructor(
|
private actions$ = inject(Actions);
|
||||||
private store: Store<AppStore>,
|
private content = inject(ContentManagementService);
|
||||||
private actions$: Actions,
|
private contentApi = inject(ContentApiService);
|
||||||
private content: ContentManagementService,
|
|
||||||
private contentApi: ContentApiService
|
|
||||||
) {}
|
|
||||||
|
|
||||||
deleteLibrary$ = createEffect(
|
deleteLibrary$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -22,36 +22,36 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Injectable, SecurityContext } from '@angular/core';
|
import { inject, Injectable, SecurityContext } from '@angular/core';
|
||||||
import { first, map, take } from 'rxjs/operators';
|
import { first, map, take } from 'rxjs/operators';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import {
|
import {
|
||||||
AppStore,
|
AppStore,
|
||||||
NodeActionTypes,
|
|
||||||
PurgeDeletedNodesAction,
|
|
||||||
DeleteNodesAction,
|
|
||||||
UndoDeleteNodesAction,
|
|
||||||
CreateFolderAction,
|
|
||||||
EditFolderAction,
|
|
||||||
RestoreDeletedNodesAction,
|
|
||||||
ShareNodeAction,
|
|
||||||
ManageVersionsAction,
|
|
||||||
UnlockWriteAction,
|
|
||||||
UnshareNodesAction,
|
|
||||||
CopyNodesAction,
|
CopyNodesAction,
|
||||||
MoveNodesAction,
|
CreateFolderAction,
|
||||||
ManagePermissionsAction,
|
DeleteNodesAction,
|
||||||
PrintFileAction,
|
EditFolderAction,
|
||||||
getCurrentFolder,
|
|
||||||
getAppSelection,
|
|
||||||
ManageAspectsAction,
|
|
||||||
NavigateRouteAction,
|
|
||||||
ExpandInfoDrawerAction,
|
ExpandInfoDrawerAction,
|
||||||
|
getAppSelection,
|
||||||
|
getCurrentFolder,
|
||||||
|
ManageAspectsAction,
|
||||||
|
ManagePermissionsAction,
|
||||||
ManageRulesAction,
|
ManageRulesAction,
|
||||||
ShowLoaderAction,
|
ManageVersionsAction,
|
||||||
|
MoveNodesAction,
|
||||||
|
NavigateRouteAction,
|
||||||
|
NavigateUrlAction,
|
||||||
|
NodeActionTypes,
|
||||||
|
PrintFileAction,
|
||||||
|
PurgeDeletedNodesAction,
|
||||||
|
RestoreDeletedNodesAction,
|
||||||
SetInfoDrawerStateAction,
|
SetInfoDrawerStateAction,
|
||||||
NavigateUrlAction
|
ShareNodeAction,
|
||||||
|
ShowLoaderAction,
|
||||||
|
UndoDeleteNodesAction,
|
||||||
|
UnlockWriteAction,
|
||||||
|
UnshareNodesAction
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { ContentManagementService } from '../../services/content-management.service';
|
import { ContentManagementService } from '../../services/content-management.service';
|
||||||
import { RenditionService } from '@alfresco/adf-content-services';
|
import { RenditionService } from '@alfresco/adf-content-services';
|
||||||
@ -60,15 +60,13 @@ import { DomSanitizer } from '@angular/platform-browser';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NodeEffects {
|
export class NodeEffects {
|
||||||
constructor(
|
private readonly store = inject(Store<AppStore>);
|
||||||
private store: Store<AppStore>,
|
private readonly actions$ = inject(Actions);
|
||||||
private actions$: Actions,
|
private readonly router = inject(Router);
|
||||||
private router: Router,
|
private readonly contentService = inject(ContentManagementService);
|
||||||
private contentService: ContentManagementService,
|
private readonly renditionViewer = inject(RenditionService);
|
||||||
private renditionViewer: RenditionService,
|
private readonly activatedRoute = inject(ActivatedRoute);
|
||||||
private activatedRoute: ActivatedRoute,
|
private readonly sanitizer = inject(DomSanitizer);
|
||||||
private sanitizer: DomSanitizer
|
|
||||||
) {}
|
|
||||||
|
|
||||||
shareNode$ = createEffect(
|
shareNode$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { SearchAiActionTypes, SearchByTermAiAction, ToggleAISearchInput } from '@alfresco/aca-shared/store';
|
import { SearchAiActionTypes, SearchByTermAiAction, ToggleAISearchInput } from '@alfresco/aca-shared/store';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
@ -32,8 +32,9 @@ import { Params } from '@angular/router';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SearchAiEffects {
|
export class SearchAiEffects {
|
||||||
constructor(private actions$: Actions, private searchNavigationService: SearchAiNavigationService, private searchAiService: SearchAiService) {}
|
private actions$ = inject(Actions);
|
||||||
|
private searchNavigationService = inject(SearchAiNavigationService);
|
||||||
|
private searchAiService = inject(SearchAiService);
|
||||||
searchByTerm$ = createEffect(
|
searchByTerm$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
|
@ -22,23 +22,23 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { inject, Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { map, switchMap, debounceTime, take, catchError } from 'rxjs/operators';
|
import { catchError, debounceTime, map, switchMap, take } from 'rxjs/operators';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import {
|
import {
|
||||||
FileFromTemplate,
|
AppStore,
|
||||||
FolderFromTemplate,
|
|
||||||
CreateFromTemplate,
|
CreateFromTemplate,
|
||||||
CreateFromTemplateSuccess,
|
CreateFromTemplateSuccess,
|
||||||
TemplateActionTypes,
|
FileFromTemplate,
|
||||||
|
FolderFromTemplate,
|
||||||
getCurrentFolder,
|
getCurrentFolder,
|
||||||
AppStore
|
TemplateActionTypes
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { NodeTemplateService, TemplateDialogConfig } from '../../services/node-template.service';
|
import { NodeTemplateService, TemplateDialogConfig } from '../../services/node-template.service';
|
||||||
import { NotificationService } from '@alfresco/adf-core';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
import { from, Observable, of } from 'rxjs';
|
import { from, Observable, of } from 'rxjs';
|
||||||
import { NodeEntry, NodeBodyUpdate, Node, NodesApi } from '@alfresco/js-api';
|
import { Node, NodeBodyUpdate, NodeEntry, NodesApi } from '@alfresco/js-api';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { AlfrescoApiService, DocumentListService } from '@alfresco/adf-content-services';
|
import { AlfrescoApiService, DocumentListService } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
@ -53,13 +53,11 @@ export class TemplateEffects {
|
|||||||
return this._nodesApi;
|
return this._nodesApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
matDialog = inject(MatDialog);
|
||||||
private matDialog: MatDialog,
|
store = inject(Store<AppStore>);
|
||||||
private store: Store<AppStore>,
|
apiService = inject(AlfrescoApiService);
|
||||||
private apiService: AlfrescoApiService,
|
actions$ = inject(Actions);
|
||||||
private actions$: Actions,
|
nodeTemplateService = inject(NodeTemplateService);
|
||||||
private nodeTemplateService: NodeTemplateService
|
|
||||||
) {}
|
|
||||||
|
|
||||||
fileFromTemplate$ = createEffect(
|
fileFromTemplate$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -24,22 +24,22 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
AppStore,
|
AppStore,
|
||||||
|
getCurrentFolder,
|
||||||
UnlockWriteAction,
|
UnlockWriteAction,
|
||||||
UploadActionTypes,
|
UploadActionTypes,
|
||||||
UploadFilesAction,
|
UploadFilesAction,
|
||||||
UploadFileVersionAction,
|
UploadFileVersionAction,
|
||||||
UploadFolderAction,
|
UploadFolderAction
|
||||||
getCurrentFolder
|
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { FileUtils, NotificationService } from '@alfresco/adf-core';
|
import { FileUtils, NotificationService } from '@alfresco/adf-core';
|
||||||
import { inject, Injectable, NgZone, RendererFactory2 } from '@angular/core';
|
import { inject, Injectable, NgZone, RendererFactory2 } from '@angular/core';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { catchError, map, take } from 'rxjs/operators';
|
import { catchError, map, take } from 'rxjs/operators';
|
||||||
import { ContentManagementService } from '../../services/content-management.service';
|
import { ContentManagementService } from '../../services/content-management.service';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { UploadService, FileModel } from '@alfresco/adf-content-services';
|
import { FileModel, UploadService } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UploadEffects {
|
export class UploadEffects {
|
||||||
@ -50,15 +50,14 @@ export class UploadEffects {
|
|||||||
private readonly fileVersionInput: HTMLInputElement;
|
private readonly fileVersionInput: HTMLInputElement;
|
||||||
private readonly uploadMenuButtonSelector = 'app-toolbar-menu button[id="app.toolbar.upload"]';
|
private readonly uploadMenuButtonSelector = 'app-toolbar-menu button[id="app.toolbar.upload"]';
|
||||||
|
|
||||||
constructor(
|
store = inject(Store<AppStore>);
|
||||||
private store: Store<AppStore>,
|
actions$ = inject(Actions);
|
||||||
private actions$: Actions,
|
ngZone = inject(NgZone);
|
||||||
private ngZone: NgZone,
|
uploadService = inject(UploadService);
|
||||||
private uploadService: UploadService,
|
contentService = inject(ContentManagementService);
|
||||||
rendererFactory: RendererFactory2,
|
|
||||||
private contentService: ContentManagementService
|
constructor() {
|
||||||
) {
|
const renderer = inject(RendererFactory2).createRenderer(null, null);
|
||||||
const renderer = rendererFactory.createRenderer(null, null);
|
|
||||||
|
|
||||||
this.fileInput = renderer.createElement('input') as HTMLInputElement;
|
this.fileInput = renderer.createElement('input') as HTMLInputElement;
|
||||||
this.fileInput.id = 'app-upload-files';
|
this.fileInput.id = 'app-upload-files';
|
||||||
|
@ -22,22 +22,22 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { map, take, tap } from 'rxjs/operators';
|
import { map, take, tap } from 'rxjs/operators';
|
||||||
import {
|
import {
|
||||||
AppStore,
|
AppStore,
|
||||||
|
FullscreenViewerAction,
|
||||||
|
getAppSelection,
|
||||||
|
getCurrentFolder,
|
||||||
|
PluginPreviewAction,
|
||||||
ViewerActionTypes,
|
ViewerActionTypes,
|
||||||
ViewFileAction,
|
ViewFileAction,
|
||||||
ViewNodeAction,
|
ViewNodeAction,
|
||||||
getCurrentFolder,
|
ViewNodeVersionAction
|
||||||
getAppSelection,
|
|
||||||
FullscreenViewerAction,
|
|
||||||
ViewNodeVersionAction,
|
|
||||||
PluginPreviewAction
|
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { Router, UrlTree, UrlSegmentGroup, PRIMARY_OUTLET, UrlSegment } from '@angular/router';
|
import { PRIMARY_OUTLET, Router, UrlSegment, UrlSegmentGroup, UrlTree } from '@angular/router';
|
||||||
import { Store, createSelector } from '@ngrx/store';
|
import { createSelector, Store } from '@ngrx/store';
|
||||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
|
||||||
@ -48,13 +48,11 @@ export const fileToPreview = createSelector(getAppSelection, getCurrentFolder, (
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ViewerEffects {
|
export class ViewerEffects {
|
||||||
constructor(
|
private store = inject(Store<AppStore>);
|
||||||
private store: Store<AppStore>,
|
private actions$ = inject(Actions);
|
||||||
private actions$: Actions,
|
private router = inject(Router);
|
||||||
private router: Router,
|
private extensions = inject(AppExtensionService);
|
||||||
private extensions: AppExtensionService,
|
private dialog = inject(MatDialog);
|
||||||
private dialog: MatDialog
|
|
||||||
) {}
|
|
||||||
|
|
||||||
fullscreenViewer$ = createEffect(
|
fullscreenViewer$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
@include custom-theme($custom-theme);
|
@include custom-theme($custom-theme);
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--mdc-filled-text-field-container-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
mat-toolbar {
|
mat-toolbar {
|
||||||
color: var(--adf-theme-foreground-text-color-054);
|
color: var(--adf-theme-foreground-text-color-054);
|
||||||
}
|
}
|
||||||
@ -15,7 +19,6 @@ mat-toolbar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#{$mat-text-field-filled}:not(#{$mat-text-field-disabled}) {
|
#{$mat-text-field-filled}:not(#{$mat-text-field-disabled}) {
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,9 +311,11 @@ adf-dynamic-component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#{$mat-menu-item} #{$mat-icon-no-color},
|
#{$mat-menu-item} #{$mat-icon} {
|
||||||
#{$mat-mdc-submenu-icon} {
|
&#{$mat-icon-no-color},
|
||||||
color: var(--theme-text-color);
|
&#{$mat-mdc-submenu-icon} {
|
||||||
|
color: var(--theme-text-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#{$mat-notched-outline-trailing},
|
#{$mat-notched-outline-trailing},
|
||||||
|
@ -275,7 +275,7 @@ describe('PreviewComponent', () => {
|
|||||||
spyOn(component, 'navigateToFileLocation');
|
spyOn(component, 'navigateToFileLocation');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
uploadService.fileUploadDeleted.next();
|
uploadService.fileUploadDeleted.next({} as any);
|
||||||
|
|
||||||
expect(component.navigateToFileLocation).toHaveBeenCalled();
|
expect(component.navigateToFileLocation).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
@ -175,7 +175,7 @@ describe('AcaViewerComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return to parent folder on fileUploadDeleted event', async () => {
|
it('should return to parent folder on fileUploadDeleted event', async () => {
|
||||||
uploadService.fileUploadDeleted.next();
|
uploadService.fileUploadDeleted.next({} as any);
|
||||||
|
|
||||||
expect(component['navigateToFileLocation']).toHaveBeenCalled();
|
expect(component['navigateToFileLocation']).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Page, expect } from '@playwright/test';
|
import { expect, Page } from '@playwright/test';
|
||||||
import { BaseComponent } from '../base.component';
|
import { BaseComponent } from '../base.component';
|
||||||
|
|
||||||
export class MatMenuComponent extends BaseComponent {
|
export class MatMenuComponent extends BaseComponent {
|
||||||
@ -64,7 +64,7 @@ export class MatMenuComponent extends BaseComponent {
|
|||||||
const menus = await this.page.$$('.mat-mdc-menu-content .mat-mdc-menu-item');
|
const menus = await this.page.$$('.mat-mdc-menu-content .mat-mdc-menu-item');
|
||||||
const actualMoreActions: string[] = await Promise.all(
|
const actualMoreActions: string[] = await Promise.all(
|
||||||
menus.map(async (button) => {
|
menus.map(async (button) => {
|
||||||
const title = await (await button.$('.mdc-list-item__primary-text span')).innerText();
|
const title = await (await button.$('.mat-mdc-menu-item-text span')).innerText();
|
||||||
return title || '';
|
return title || '';
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -84,8 +84,8 @@ describe('ExtensionsDataLoaderGuard', () => {
|
|||||||
const guard = setupTest([() => subject1.asObservable(), () => subject2.asObservable()]);
|
const guard = setupTest([() => subject1.asObservable(), () => subject2.asObservable()]);
|
||||||
|
|
||||||
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
||||||
subject1.next();
|
subject1.next(true);
|
||||||
subject2.next();
|
subject2.next(true);
|
||||||
subject1.complete();
|
subject1.complete();
|
||||||
|
|
||||||
expect(emittedSpy).not.toHaveBeenCalled();
|
expect(emittedSpy).not.toHaveBeenCalled();
|
||||||
@ -99,8 +99,8 @@ describe('ExtensionsDataLoaderGuard', () => {
|
|||||||
const guard = setupTest([() => subject1.asObservable(), () => subject2.asObservable()]);
|
const guard = setupTest([() => subject1.asObservable(), () => subject2.asObservable()]);
|
||||||
|
|
||||||
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
||||||
subject1.next();
|
subject1.next(true);
|
||||||
subject2.next();
|
subject2.next(true);
|
||||||
subject1.complete();
|
subject1.complete();
|
||||||
subject2.complete();
|
subject2.complete();
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ describe('ExtensionsDataLoaderGuard', () => {
|
|||||||
const guard = setupTest([() => subject1.asObservable(), () => throwError(new Error())]);
|
const guard = setupTest([() => subject1.asObservable(), () => throwError(new Error())]);
|
||||||
|
|
||||||
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
||||||
subject1.next();
|
subject1.next(true);
|
||||||
|
|
||||||
expect(emittedSpy).toHaveBeenCalledWith(true);
|
expect(emittedSpy).toHaveBeenCalledWith(true);
|
||||||
expect(erroredSpy).not.toHaveBeenCalled();
|
expect(erroredSpy).not.toHaveBeenCalled();
|
||||||
|
@ -58,7 +58,7 @@ import { NavigationHistoryService } from '../../services/navigation-history.serv
|
|||||||
/* eslint-disable @angular-eslint/directive-class-suffix */
|
/* eslint-disable @angular-eslint/directive-class-suffix */
|
||||||
@Directive()
|
@Directive()
|
||||||
export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
onDestroy$: Subject<boolean> = new Subject<boolean>();
|
onDestroy$: Subject<void> = new Subject<void>();
|
||||||
|
|
||||||
@ViewChild(DocumentListComponent)
|
@ViewChild(DocumentListComponent)
|
||||||
documentList: DocumentListComponent;
|
documentList: DocumentListComponent;
|
||||||
@ -173,7 +173,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
|||||||
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
||||||
this.subscriptions = [];
|
this.subscriptions = [];
|
||||||
|
|
||||||
this.onDestroy$.next(true);
|
this.onDestroy$.next();
|
||||||
this.onDestroy$.complete();
|
this.onDestroy$.complete();
|
||||||
this.store.dispatch(new SetSelectedNodesAction([]));
|
this.store.dispatch(new SetSelectedNodesAction([]));
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ describe('InfoDrawerComponent', () => {
|
|||||||
|
|
||||||
it('should show the icons from extension', () => {
|
it('should show the icons from extension', () => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
mockStream.next();
|
mockStream.next({});
|
||||||
expect(component.actions).toEqual([
|
expect(component.actions).toEqual([
|
||||||
{
|
{
|
||||||
id: 'app.sidebar.close',
|
id: 'app.sidebar.close',
|
||||||
|
@ -33,7 +33,7 @@ export class AppHookService {
|
|||||||
/**
|
/**
|
||||||
* Gets emitted when user delete the node
|
* Gets emitted when user delete the node
|
||||||
*/
|
*/
|
||||||
nodesDeleted = new Subject<any>();
|
nodesDeleted = new Subject<void>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets emitted when user delete the library
|
* Gets emitted when user delete the library
|
||||||
@ -53,7 +53,7 @@ export class AppHookService {
|
|||||||
/**
|
/**
|
||||||
* Gets emitted when user join the library
|
* Gets emitted when user join the library
|
||||||
*/
|
*/
|
||||||
libraryJoined = new Subject<string>();
|
libraryJoined = new Subject<void>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets emitted when user left the library
|
* Gets emitted when user left the library
|
||||||
@ -63,20 +63,20 @@ export class AppHookService {
|
|||||||
/**
|
/**
|
||||||
* Gets emitted when library throws 400 error code
|
* Gets emitted when library throws 400 error code
|
||||||
*/
|
*/
|
||||||
library400Error = new Subject<any>();
|
library400Error = new Subject<void>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets emitted when user join the library
|
* Gets emitted when user join the library
|
||||||
*/
|
*/
|
||||||
joinLibraryToggle = new Subject<string>();
|
joinLibraryToggle = new Subject<void>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets emitted when user unlink the node
|
* Gets emitted when user unlink the node
|
||||||
*/
|
*/
|
||||||
linksUnshared = new Subject<any>();
|
linksUnshared = new Subject<void>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets emitted when user mark the favorite library
|
* Gets emitted when user mark the favorite library
|
||||||
*/
|
*/
|
||||||
favoriteLibraryToggle = new Subject<any>();
|
favoriteLibraryToggle = new Subject<void>();
|
||||||
}
|
}
|
||||||
|
@ -137,14 +137,14 @@ describe('AppService', () => {
|
|||||||
service.ready$.subscribe((value) => {
|
service.ready$.subscribe((value) => {
|
||||||
isReady = value;
|
isReady = value;
|
||||||
});
|
});
|
||||||
auth.onLogin.next();
|
auth.onLogin.next({});
|
||||||
await expect(isReady).toEqual(true);
|
await expect(isReady).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set local storage prefix after login', () => {
|
it('should set local storage prefix after login', () => {
|
||||||
spyOn(preferencesService, 'setStoragePrefix');
|
spyOn(preferencesService, 'setStoragePrefix');
|
||||||
spyOn(auth, 'getUsername').and.returnValue('test-username');
|
spyOn(auth, 'getUsername').and.returnValue('test-username');
|
||||||
auth.onLogin.next();
|
auth.onLogin.next({});
|
||||||
|
|
||||||
expect(preferencesService.setStoragePrefix).toHaveBeenCalledWith('test-username');
|
expect(preferencesService.setStoragePrefix).toHaveBeenCalledWith('test-username');
|
||||||
});
|
});
|
||||||
|
@ -62,7 +62,7 @@ export class AppService implements ShellAppService, OnDestroy {
|
|||||||
pageHeading$ = this.pageHeading.asObservable();
|
pageHeading$ = this.pageHeading.asObservable();
|
||||||
|
|
||||||
appNavNarMode$: Subject<'collapsed' | 'expanded'> = new BehaviorSubject('expanded');
|
appNavNarMode$: Subject<'collapsed' | 'expanded'> = new BehaviorSubject('expanded');
|
||||||
toggleAppNavBar$ = new Subject();
|
toggleAppNavBar$ = new Subject<void>();
|
||||||
|
|
||||||
hideSidenavConditions = ['/preview/'];
|
hideSidenavConditions = ['/preview/'];
|
||||||
minimizeSidenavConditions = ['search'];
|
minimizeSidenavConditions = ['search'];
|
||||||
|
@ -24,19 +24,20 @@
|
|||||||
|
|
||||||
import { inject, Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Node, PathInfo } from '@alfresco/js-api';
|
import { Node, PathInfo } from '@alfresco/js-api';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { NavigateUrlAction, NavigateRouteAction, NavigateToFolder, NavigateToParentFolder, NavigateToPreviousPage } from '../actions/router.actions';
|
import { NavigateRouteAction, NavigateToFolder, NavigateToParentFolder, NavigateToPreviousPage, NavigateUrlAction } from '../actions/router.actions';
|
||||||
import { RouterActionTypes } from '../actions/router-action-types';
|
import { RouterActionTypes } from '../actions/router-action-types';
|
||||||
import { NotificationService } from '@alfresco/adf-core';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class RouterEffects {
|
export class RouterEffects {
|
||||||
private notificationService = inject(NotificationService);
|
private notificationService = inject(NotificationService);
|
||||||
|
private actions$ = inject(Actions);
|
||||||
constructor(private actions$: Actions, private router: Router, private location: Location) {}
|
private router = inject(Router);
|
||||||
|
private location = inject(Location);
|
||||||
|
|
||||||
navigateUrl$ = createEffect(
|
navigateUrl$ = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
@ -23,22 +23,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { SnackbarContentComponent, SnackBarData, TranslationService } from '@alfresco/adf-core';
|
import { SnackbarContentComponent, SnackBarData, TranslationService } from '@alfresco/adf-core';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { AppStore } from '../states/app.state';
|
import { AppStore } from '../states/app.state';
|
||||||
import { SnackbarInfoAction, SnackbarActionTypes, SnackbarWarningAction, SnackbarErrorAction, SnackbarAction } from '../actions/snackbar.actions';
|
import { SnackbarAction, SnackbarActionTypes, SnackbarErrorAction, SnackbarInfoAction, SnackbarWarningAction } from '../actions/snackbar.actions';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SnackbarEffects {
|
export class SnackbarEffects {
|
||||||
constructor(
|
private store = inject(Store<AppStore>);
|
||||||
private store: Store<AppStore>,
|
private actions$ = inject(Actions);
|
||||||
private actions$: Actions,
|
private snackBar = inject(MatSnackBar);
|
||||||
private snackBar: MatSnackBar,
|
private translationService = inject(TranslationService);
|
||||||
private translationService: TranslationService
|
|
||||||
) {}
|
|
||||||
|
|
||||||
infoEffect = createEffect(
|
infoEffect = createEffect(
|
||||||
() =>
|
() =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user