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",
|
||||
"tsConfig": "app/tsconfig.app.json",
|
||||
"polyfills": "app/src/polyfills.ts",
|
||||
"preserveSymlinks": true,
|
||||
"allowedCommonJsDependencies": ["minimatch", "cropperjs"],
|
||||
"stylePreprocessorOptions": {
|
||||
"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 { NgModule } from '@angular/core';
|
||||
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 { AppExtensionsModule } from './extensions.module';
|
||||
@ -51,9 +51,9 @@ import localeSv from '@angular/common/locales/sv';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
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 { 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 { APP_ROUTES } from './app.routes';
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
|
@ -22,16 +22,16 @@ export class MyComponent {
|
||||
Below is the list of public hooks you can use in the plugin:
|
||||
|
||||
| Version | Name | Details | Description |
|
||||
| ------- | ---------------------- | ---------------------------------------------| -----------------------------------------------------------------------------------|
|
||||
| ------- | ---------------------- |-----------| -----------------------------------------------------------------------------------|
|
||||
| 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 | nodesDeleted | n/a | Notifies the node deleted. |
|
||||
| 2.2.2 | libraryDeleted | n/a | Notifies the library deleted. |
|
||||
| 2.2.2 | libraryCreated | SiteEntry | Notifies the library created. |
|
||||
| 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 | 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 | favoriteLibraryToggle | n/a | Notifies user toggle favorite library. |
|
||||
|
12700
package-lock.json
generated
12700
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,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "7.0.0-alpha.4-11462485517",
|
||||
"@alfresco/adf-core": "7.0.0-alpha.4-11462485517",
|
||||
"@alfresco/adf-extensions": "7.0.0-alpha.4-11462485517",
|
||||
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11462485517",
|
||||
"@alfresco/js-api": "8.0.0-alpha.4-11462485517",
|
||||
"@angular/animations": "15.2.10",
|
||||
"@angular/cdk": "15.2.9",
|
||||
"@angular/common": "15.2.10",
|
||||
"@angular/compiler": "15.2.10",
|
||||
"@angular/core": "15.2.10",
|
||||
"@angular/forms": "15.2.10",
|
||||
"@angular/material": "15.2.9",
|
||||
"@angular/material-date-fns-adapter": "15.2.9",
|
||||
"@angular/platform-browser": "15.2.10",
|
||||
"@angular/platform-browser-dynamic": "15.2.10",
|
||||
"@angular/router": "15.2.10",
|
||||
"@alfresco/adf-content-services": "7.0.0-alpha.4-11480441882",
|
||||
"@alfresco/adf-core": "7.0.0-alpha.4-11480441882",
|
||||
"@alfresco/adf-extensions": "7.0.0-alpha.4-11480441882",
|
||||
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11480441882",
|
||||
"@alfresco/js-api": ">=8.0.0-alpha.4-11480441882",
|
||||
"@angular/animations": "16.2.9",
|
||||
"@angular/cdk": "16.2.9",
|
||||
"@angular/common": "16.2.9",
|
||||
"@angular/compiler": "16.2.9",
|
||||
"@angular/core": "16.2.9",
|
||||
"@angular/forms": "16.2.9",
|
||||
"@angular/material": "16.2.9",
|
||||
"@angular/material-date-fns-adapter": "16.2.9",
|
||||
"@angular/platform-browser": "16.2.9",
|
||||
"@angular/platform-browser-dynamic": "16.2.9",
|
||||
"@angular/router": "16.2.9",
|
||||
"@fontsource/open-sans": "^5.1.0",
|
||||
"@mat-datetimepicker/core": "11.0.3",
|
||||
"@ngrx/effects": "^15.2.0",
|
||||
"@ngrx/router-store": "^15.2.0",
|
||||
"@ngrx/store": "^15.2.0",
|
||||
"@ngrx/store-devtools": "^15.2.0",
|
||||
"@mat-datetimepicker/core": "12.0.1",
|
||||
"@ngrx/effects": "16.3.0",
|
||||
"@ngrx/router-store": "16.3.0",
|
||||
"@ngrx/store": "16.3.0",
|
||||
"@ngrx/store-devtools": "16.3.0",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"material-icons": "^1.13.12",
|
||||
"minimatch-browser": "^1.0.0",
|
||||
"pdfjs-dist": "3.3.122",
|
||||
"rxjs": "6.6.6",
|
||||
"rxjs": "7.5.7",
|
||||
"tslib": "^2.7.0",
|
||||
"zone.js": "0.11.8"
|
||||
"zone.js": "0.13.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alfresco/adf-cli": "7.0.0-alpha.4-11462485517",
|
||||
"@angular-devkit/build-angular": "15.2.10",
|
||||
"@angular-devkit/core": "15.2.10",
|
||||
"@angular-devkit/schematics": "15.2.10",
|
||||
"@angular-eslint/builder": "^15.2.1",
|
||||
"@alfresco/adf-cli": "7.0.0-alpha.4-11480441882",
|
||||
"@angular-devkit/build-angular": "16.2.9",
|
||||
"@angular-devkit/core": "16.2.9",
|
||||
"@angular-devkit/schematics": "16.2.9",
|
||||
"@angular-eslint/builder": "17.0.0",
|
||||
"@angular-eslint/eslint-plugin": "^16.1.2",
|
||||
"@angular-eslint/eslint-plugin-template": "^16.0.2",
|
||||
"@angular-eslint/schematics": "15.2.1",
|
||||
"@angular-eslint/template-parser": "^15.2.1",
|
||||
"@angular/cli": "15.2.10",
|
||||
"@angular/compiler-cli": "15.2.10",
|
||||
"@angular/language-service": "15.2.10",
|
||||
"@angular-eslint/schematics": "^16.3.0",
|
||||
"@angular-eslint/template-parser": "^16.3.1",
|
||||
"@angular/cli": "16.2.9",
|
||||
"@angular/compiler-cli": "16.2.9",
|
||||
"@angular/language-service": "16.2.9",
|
||||
"@cspell/eslint-plugin": "^8.14.1",
|
||||
"@nx/angular": "17.0.2",
|
||||
"@nx/eslint-plugin": "17.0.2",
|
||||
@ -110,13 +110,13 @@
|
||||
"karma-jasmine-html-reporter": "^2.0.0",
|
||||
"karma-mocha-reporter": "^2.2.5",
|
||||
"lint-staged": "^15.2.7",
|
||||
"ng-packagr": "^15.2.1",
|
||||
"ng-packagr": "^16.2.1",
|
||||
"node-stream-zip": "^1.14.0",
|
||||
"nx": "17.3.1",
|
||||
"prettier": "2.8.8",
|
||||
"stylelint": "^15.11.0",
|
||||
"stylelint-config-standard-scss": "^7.0.1",
|
||||
"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[] = [];
|
||||
parameters: { [key: string]: unknown } = {};
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
private onDestroy$ = new Subject<void>();
|
||||
|
||||
get selectedActionDefinitionId(): string {
|
||||
return this.form.get('actionDefinitionId').value;
|
||||
|
@ -16,7 +16,7 @@
|
||||
</mat-select>
|
||||
</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
|
||||
[formControl]="booleanModeControl">
|
||||
<mat-option value="and">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LOGIC_OPERATORS.AND' | translate }}</mat-option>
|
||||
|
@ -37,6 +37,14 @@
|
||||
& > :nth-child(2) {
|
||||
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 {
|
||||
|
@ -36,6 +36,7 @@
|
||||
& > label,
|
||||
& > .aca-label {
|
||||
font-weight: bold;
|
||||
color: var(--adf-theme-foreground-text-color);
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
max-width: 150px;
|
||||
|
@ -115,7 +115,7 @@ export class RuleDetailsUiComponent implements OnInit, OnDestroy {
|
||||
@Output()
|
||||
formValueChanged = new EventEmitter<Partial<Rule>>();
|
||||
|
||||
private onDestroy$ = new Subject();
|
||||
private onDestroy$ = new Subject<void>();
|
||||
form: UntypedFormGroup;
|
||||
|
||||
errorScriptConstraint: ActionParameterConstraint;
|
||||
|
@ -22,8 +22,8 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { AOS_ACTION, AosAction } from '../actions/aos.actions';
|
||||
@ -31,7 +31,8 @@ import { AosEditOnlineService } from '../aos-extension.service';
|
||||
|
||||
@Injectable()
|
||||
export class AosEffects {
|
||||
constructor(private actions$: Actions, private aosEditOnlineService: AosEditOnlineService) {}
|
||||
private actions$ = inject(Actions);
|
||||
private aosEditOnlineService = inject(AosEditOnlineService);
|
||||
|
||||
openOffice$ = createEffect(
|
||||
() =>
|
||||
|
@ -25,7 +25,7 @@
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { AppStore, getSearchItemsTotalCount } from '@alfresco/aca-shared/store';
|
||||
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 { Store } from '@ngrx/store';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@ -50,11 +50,12 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy {
|
||||
tooltip: string;
|
||||
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();
|
||||
|
||||
constructor(private store: Store<AppStore>, private translationService: TranslationService, private extensions: AppExtensionService) {}
|
||||
|
||||
private readonly totalItems$: Observable<number> = this.store.select(getSearchItemsTotalCount);
|
||||
ngOnInit() {
|
||||
this.totalItems$
|
||||
.pipe(
|
||||
@ -88,7 +89,7 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.onDestroy$.next();
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ export class OutsideEventDirective implements OnInit, OnDestroy {
|
||||
private subscriptions: Subscription[] = [];
|
||||
|
||||
@Output()
|
||||
clickOutside: EventEmitter<null> = new EventEmitter();
|
||||
clickOutside: EventEmitter<void> = new EventEmitter();
|
||||
|
||||
ngOnInit() {
|
||||
this.subscriptions = this.subscriptions.concat([
|
||||
|
@ -67,7 +67,7 @@ import { FileSizePipe, InfoDrawerButtonsDirective } from '@alfresco/adf-core';
|
||||
export class DetailsComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
nodeId: string;
|
||||
isLoading: boolean;
|
||||
onDestroy$ = new Subject<boolean>();
|
||||
onDestroy$ = new Subject<void>();
|
||||
activeTab = 1;
|
||||
aspectActions: Array<ContentActionRef> = [];
|
||||
nodeIcon: string;
|
||||
|
@ -138,12 +138,12 @@ describe('FavoriteLibrariesComponent', () => {
|
||||
});
|
||||
|
||||
it('should reload on libraryDeleted action', () => {
|
||||
appHookService.libraryDeleted.next();
|
||||
appHookService.libraryDeleted.next('');
|
||||
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should reload on libraryUpdated action', () => {
|
||||
appHookService.libraryUpdated.next();
|
||||
appHookService.libraryUpdated.next({} as any);
|
||||
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@ -158,7 +158,7 @@ describe('FavoriteLibrariesComponent', () => {
|
||||
});
|
||||
|
||||
it('should reload on libraryLeft action', () => {
|
||||
appHookService.libraryLeft.next();
|
||||
appHookService.libraryLeft.next({} as any);
|
||||
expect(contentApiService.getFavoriteLibraries).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
@ -79,6 +79,10 @@
|
||||
width: 100%;
|
||||
user-select: none;
|
||||
|
||||
.aca-action-button__label {
|
||||
color: var(--theme-action-button-text-color);
|
||||
}
|
||||
|
||||
&:hover .aca-action-button__label {
|
||||
color: var(--theme-sidenav-active-text-color);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ import { MatMenuModule } from '@angular/material/menu';
|
||||
})
|
||||
export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy {
|
||||
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) {}
|
||||
|
||||
@ -78,7 +78,7 @@ export class ToggleFavoriteLibraryComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.next();
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
|
@ -141,14 +141,14 @@ describe('DocumentListDirective', () => {
|
||||
|
||||
it('should reset store selection on `reload` event', () => {
|
||||
documentListDirective.ngOnInit();
|
||||
documentListServiceMock.reload$.next();
|
||||
documentListServiceMock.reload$.next({});
|
||||
|
||||
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
||||
});
|
||||
|
||||
it('should reset selection state on `reset` event', () => {
|
||||
documentListDirective.ngOnInit();
|
||||
documentListServiceMock.resetSelection$.next();
|
||||
documentListServiceMock.resetSelection$.next({});
|
||||
|
||||
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetSelectedNodesAction([]));
|
||||
expect(documentListDirective.selectedNode).toBeNull();
|
||||
|
@ -220,7 +220,7 @@ describe('ContentManagementService', () => {
|
||||
const selection: any[] = [{ entry: { id: 'node-to-copy-id', name: 'name' } }];
|
||||
|
||||
store.dispatch(new CopyNodesAction(selection));
|
||||
nodeActions.contentCopied.next();
|
||||
nodeActions.contentCopied.next({} as any);
|
||||
subject.next('');
|
||||
|
||||
expect(nodeActions.copyNodes).toHaveBeenCalled();
|
||||
@ -608,7 +608,7 @@ describe('ContentManagementService', () => {
|
||||
} as MatSnackBarRef<SimpleSnackBar>);
|
||||
});
|
||||
|
||||
afterEach(() => subject.next());
|
||||
afterEach(() => subject.next({} as any));
|
||||
|
||||
it('should move node back to initial parent, after succeeded move', () => {
|
||||
const initialParent = 'parent-id-0';
|
||||
|
@ -117,7 +117,7 @@ describe('NodeActionsService', () => {
|
||||
it('should validate selection when allowableOperation has `create`', () => {
|
||||
spyOn(dialog, 'open').and.returnValue({
|
||||
afterClosed: of
|
||||
} as MatDialogRef<any>);
|
||||
} as unknown as MatDialogRef<any>);
|
||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||
|
||||
@ -135,7 +135,7 @@ describe('NodeActionsService', () => {
|
||||
it('should invalidate selection when allowableOperation does not have `create`', () => {
|
||||
spyOn(dialog, 'open').and.returnValue({
|
||||
afterClosed: of
|
||||
} as MatDialogRef<any>);
|
||||
} as unknown as MatDialogRef<any>);
|
||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||
|
||||
@ -153,7 +153,7 @@ describe('NodeActionsService', () => {
|
||||
it('should invalidate selection if isSite', () => {
|
||||
spyOn(dialog, 'open').and.returnValue({
|
||||
afterClosed: of
|
||||
} as MatDialogRef<any>);
|
||||
} as unknown as MatDialogRef<any>);
|
||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||
|
||||
@ -172,7 +172,7 @@ describe('NodeActionsService', () => {
|
||||
it('should validate selection if not a Site', () => {
|
||||
spyOn(dialog, 'open').and.returnValue({
|
||||
afterClosed: of
|
||||
} as MatDialogRef<any>);
|
||||
} as unknown as MatDialogRef<any>);
|
||||
const contentEntities = [new TestNode(), { entry: { nodeId: '1234' } }];
|
||||
service.getContentNodeSelection(NodeAction.CHOOSE, contentEntities as NodeEntry[]);
|
||||
|
||||
@ -288,7 +288,7 @@ describe('NodeActionsService', () => {
|
||||
|
||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||
dialogData = data;
|
||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
||||
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||
});
|
||||
|
||||
service.copyNodes([fileToCopy, folderToCopy]);
|
||||
@ -354,7 +354,7 @@ describe('NodeActionsService', () => {
|
||||
let dialogData = null;
|
||||
const spyOnDialog = spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||
dialogData = data;
|
||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
||||
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||
});
|
||||
|
||||
service.copyNodes([fileToCopy, folderToCopy]);
|
||||
@ -396,7 +396,7 @@ describe('NodeActionsService', () => {
|
||||
let dialogData: any;
|
||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||
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' } }]);
|
||||
@ -418,7 +418,7 @@ describe('NodeActionsService', () => {
|
||||
let dialogData = null;
|
||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||
dialogData = data;
|
||||
return { componentInstance: {}, afterClosed: of } as MatDialogRef<any>;
|
||||
return { componentInstance: {}, afterClosed: of } as unknown as MatDialogRef<any>;
|
||||
});
|
||||
|
||||
service.copyNodes([{ entry: { id: 'entry-id' } }]);
|
||||
|
@ -22,15 +22,16 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AppActionTypes, ReloadDocumentListAction, ResetSelectionAction } from '@alfresco/aca-shared/store';
|
||||
import { DocumentListService } from '@alfresco/adf-content-services';
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(private actions$: Actions, private documentListService: DocumentListService) {}
|
||||
actions$ = inject(Actions);
|
||||
documentListService = inject(DocumentListService);
|
||||
|
||||
reload = createEffect(
|
||||
() =>
|
||||
|
@ -22,9 +22,9 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ContextMenuActionTypes, ContextMenu } from '@alfresco/aca-shared/store';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { ContextMenu, ContextMenuActionTypes } from '@alfresco/aca-shared/store';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ContextMenuOverlayRef } from '../../components/context-menu/context-menu-overlay';
|
||||
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 {
|
||||
private overlayRef: ContextMenuOverlayRef = null;
|
||||
|
||||
constructor(private contextMenuService: ContextMenuService, private actions$: Actions) {}
|
||||
contextMenuService = inject(ContextMenuService);
|
||||
actions$ = inject(Actions);
|
||||
|
||||
contextMenu$ = createEffect(
|
||||
() =>
|
||||
|
@ -22,12 +22,12 @@
|
||||
* 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 { NodeEntry, Version } from '@alfresco/js-api';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
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 { map, take } from 'rxjs/operators';
|
||||
import { ContentApiService } from '@alfresco/aca-shared';
|
||||
@ -35,13 +35,11 @@ import { ContentUrlService } from '../../services/content-url.service';
|
||||
|
||||
@Injectable()
|
||||
export class DownloadEffects {
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private contentApi: ContentApiService,
|
||||
private dialog: MatDialog,
|
||||
private contentUrlService: ContentUrlService
|
||||
) {}
|
||||
private store = inject(Store<AppStore>);
|
||||
private actions$ = inject(Actions);
|
||||
private contentApi = inject(ContentApiService);
|
||||
private dialog = inject(MatDialog);
|
||||
private contentUrlService = inject(ContentUrlService);
|
||||
|
||||
downloadNode$ = createEffect(
|
||||
() =>
|
||||
|
@ -22,16 +22,18 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
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 { ContentManagementService } from '../../services/content-management.service';
|
||||
|
||||
@Injectable()
|
||||
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(
|
||||
() =>
|
||||
|
@ -26,15 +26,15 @@ import {
|
||||
AppStore,
|
||||
CreateLibraryAction,
|
||||
DeleteLibraryAction,
|
||||
getAppSelection,
|
||||
LeaveLibraryAction,
|
||||
LibraryActionTypes,
|
||||
NavigateLibraryAction,
|
||||
NavigateRouteAction,
|
||||
UpdateLibraryAction,
|
||||
getAppSelection
|
||||
UpdateLibraryAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
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 { map, mergeMap, take } from 'rxjs/operators';
|
||||
import { ContentApiService } from '@alfresco/aca-shared';
|
||||
@ -44,13 +44,10 @@ import { NotificationService } from '@alfresco/adf-core';
|
||||
@Injectable()
|
||||
export class LibraryEffects {
|
||||
private notificationService = inject(NotificationService);
|
||||
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private content: ContentManagementService,
|
||||
private contentApi: ContentApiService
|
||||
) {}
|
||||
private store = inject(Store<AppStore>);
|
||||
private actions$ = inject(Actions);
|
||||
private content = inject(ContentManagementService);
|
||||
private contentApi = inject(ContentApiService);
|
||||
|
||||
deleteLibrary$ = createEffect(
|
||||
() =>
|
||||
|
@ -22,36 +22,36 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { Injectable, SecurityContext } from '@angular/core';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { inject, Injectable, SecurityContext } from '@angular/core';
|
||||
import { first, map, take } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
import {
|
||||
AppStore,
|
||||
NodeActionTypes,
|
||||
PurgeDeletedNodesAction,
|
||||
DeleteNodesAction,
|
||||
UndoDeleteNodesAction,
|
||||
CreateFolderAction,
|
||||
EditFolderAction,
|
||||
RestoreDeletedNodesAction,
|
||||
ShareNodeAction,
|
||||
ManageVersionsAction,
|
||||
UnlockWriteAction,
|
||||
UnshareNodesAction,
|
||||
CopyNodesAction,
|
||||
MoveNodesAction,
|
||||
ManagePermissionsAction,
|
||||
PrintFileAction,
|
||||
getCurrentFolder,
|
||||
getAppSelection,
|
||||
ManageAspectsAction,
|
||||
NavigateRouteAction,
|
||||
CreateFolderAction,
|
||||
DeleteNodesAction,
|
||||
EditFolderAction,
|
||||
ExpandInfoDrawerAction,
|
||||
getAppSelection,
|
||||
getCurrentFolder,
|
||||
ManageAspectsAction,
|
||||
ManagePermissionsAction,
|
||||
ManageRulesAction,
|
||||
ShowLoaderAction,
|
||||
ManageVersionsAction,
|
||||
MoveNodesAction,
|
||||
NavigateRouteAction,
|
||||
NavigateUrlAction,
|
||||
NodeActionTypes,
|
||||
PrintFileAction,
|
||||
PurgeDeletedNodesAction,
|
||||
RestoreDeletedNodesAction,
|
||||
SetInfoDrawerStateAction,
|
||||
NavigateUrlAction
|
||||
ShareNodeAction,
|
||||
ShowLoaderAction,
|
||||
UndoDeleteNodesAction,
|
||||
UnlockWriteAction,
|
||||
UnshareNodesAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { RenditionService } from '@alfresco/adf-content-services';
|
||||
@ -60,15 +60,13 @@ import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Injectable()
|
||||
export class NodeEffects {
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private router: Router,
|
||||
private contentService: ContentManagementService,
|
||||
private renditionViewer: RenditionService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer
|
||||
) {}
|
||||
private readonly store = inject(Store<AppStore>);
|
||||
private readonly actions$ = inject(Actions);
|
||||
private readonly router = inject(Router);
|
||||
private readonly contentService = inject(ContentManagementService);
|
||||
private readonly renditionViewer = inject(RenditionService);
|
||||
private readonly activatedRoute = inject(ActivatedRoute);
|
||||
private readonly sanitizer = inject(DomSanitizer);
|
||||
|
||||
shareNode$ = createEffect(
|
||||
() =>
|
||||
|
@ -22,7 +22,7 @@
|
||||
* 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 { SearchAiActionTypes, SearchByTermAiAction, ToggleAISearchInput } from '@alfresco/aca-shared/store';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -32,8 +32,9 @@ import { Params } from '@angular/router';
|
||||
|
||||
@Injectable()
|
||||
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(
|
||||
() =>
|
||||
this.actions$.pipe(
|
||||
|
@ -22,23 +22,23 @@
|
||||
* 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 { map, switchMap, debounceTime, take, catchError } from 'rxjs/operators';
|
||||
import { catchError, debounceTime, map, switchMap, take } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
import {
|
||||
FileFromTemplate,
|
||||
FolderFromTemplate,
|
||||
AppStore,
|
||||
CreateFromTemplate,
|
||||
CreateFromTemplateSuccess,
|
||||
TemplateActionTypes,
|
||||
FileFromTemplate,
|
||||
FolderFromTemplate,
|
||||
getCurrentFolder,
|
||||
AppStore
|
||||
TemplateActionTypes
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { NodeTemplateService, TemplateDialogConfig } from '../../services/node-template.service';
|
||||
import { NotificationService } from '@alfresco/adf-core';
|
||||
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 { AlfrescoApiService, DocumentListService } from '@alfresco/adf-content-services';
|
||||
|
||||
@ -53,13 +53,11 @@ export class TemplateEffects {
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private matDialog: MatDialog,
|
||||
private store: Store<AppStore>,
|
||||
private apiService: AlfrescoApiService,
|
||||
private actions$: Actions,
|
||||
private nodeTemplateService: NodeTemplateService
|
||||
) {}
|
||||
matDialog = inject(MatDialog);
|
||||
store = inject(Store<AppStore>);
|
||||
apiService = inject(AlfrescoApiService);
|
||||
actions$ = inject(Actions);
|
||||
nodeTemplateService = inject(NodeTemplateService);
|
||||
|
||||
fileFromTemplate$ = createEffect(
|
||||
() =>
|
||||
|
@ -24,22 +24,22 @@
|
||||
|
||||
import {
|
||||
AppStore,
|
||||
getCurrentFolder,
|
||||
UnlockWriteAction,
|
||||
UploadActionTypes,
|
||||
UploadFilesAction,
|
||||
UploadFileVersionAction,
|
||||
UploadFolderAction,
|
||||
getCurrentFolder
|
||||
UploadFolderAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { FileUtils, NotificationService } from '@alfresco/adf-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 { of } from 'rxjs';
|
||||
import { catchError, map, take } from 'rxjs/operators';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { UploadService, FileModel } from '@alfresco/adf-content-services';
|
||||
import { FileModel, UploadService } from '@alfresco/adf-content-services';
|
||||
|
||||
@Injectable()
|
||||
export class UploadEffects {
|
||||
@ -50,15 +50,14 @@ export class UploadEffects {
|
||||
private readonly fileVersionInput: HTMLInputElement;
|
||||
private readonly uploadMenuButtonSelector = 'app-toolbar-menu button[id="app.toolbar.upload"]';
|
||||
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private ngZone: NgZone,
|
||||
private uploadService: UploadService,
|
||||
rendererFactory: RendererFactory2,
|
||||
private contentService: ContentManagementService
|
||||
) {
|
||||
const renderer = rendererFactory.createRenderer(null, null);
|
||||
store = inject(Store<AppStore>);
|
||||
actions$ = inject(Actions);
|
||||
ngZone = inject(NgZone);
|
||||
uploadService = inject(UploadService);
|
||||
contentService = inject(ContentManagementService);
|
||||
|
||||
constructor() {
|
||||
const renderer = inject(RendererFactory2).createRenderer(null, null);
|
||||
|
||||
this.fileInput = renderer.createElement('input') as HTMLInputElement;
|
||||
this.fileInput.id = 'app-upload-files';
|
||||
|
@ -22,22 +22,22 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { map, take, tap } from 'rxjs/operators';
|
||||
import {
|
||||
AppStore,
|
||||
FullscreenViewerAction,
|
||||
getAppSelection,
|
||||
getCurrentFolder,
|
||||
PluginPreviewAction,
|
||||
ViewerActionTypes,
|
||||
ViewFileAction,
|
||||
ViewNodeAction,
|
||||
getCurrentFolder,
|
||||
getAppSelection,
|
||||
FullscreenViewerAction,
|
||||
ViewNodeVersionAction,
|
||||
PluginPreviewAction
|
||||
ViewNodeVersionAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { Router, UrlTree, UrlSegmentGroup, PRIMARY_OUTLET, UrlSegment } from '@angular/router';
|
||||
import { Store, createSelector } from '@ngrx/store';
|
||||
import { PRIMARY_OUTLET, Router, UrlSegment, UrlSegmentGroup, UrlTree } from '@angular/router';
|
||||
import { createSelector, Store } from '@ngrx/store';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@ -48,13 +48,11 @@ export const fileToPreview = createSelector(getAppSelection, getCurrentFolder, (
|
||||
|
||||
@Injectable()
|
||||
export class ViewerEffects {
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private router: Router,
|
||||
private extensions: AppExtensionService,
|
||||
private dialog: MatDialog
|
||||
) {}
|
||||
private store = inject(Store<AppStore>);
|
||||
private actions$ = inject(Actions);
|
||||
private router = inject(Router);
|
||||
private extensions = inject(AppExtensionService);
|
||||
private dialog = inject(MatDialog);
|
||||
|
||||
fullscreenViewer$ = createEffect(
|
||||
() =>
|
||||
|
@ -6,6 +6,10 @@
|
||||
@include custom-theme($custom-theme);
|
||||
@include mat.core;
|
||||
|
||||
:root {
|
||||
--mdc-filled-text-field-container-color: transparent;
|
||||
}
|
||||
|
||||
mat-toolbar {
|
||||
color: var(--adf-theme-foreground-text-color-054);
|
||||
}
|
||||
@ -15,7 +19,6 @@ mat-toolbar {
|
||||
}
|
||||
|
||||
#{$mat-text-field-filled}:not(#{$mat-text-field-disabled}) {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@ -308,9 +311,11 @@ adf-dynamic-component {
|
||||
}
|
||||
}
|
||||
|
||||
#{$mat-menu-item} #{$mat-icon-no-color},
|
||||
#{$mat-mdc-submenu-icon} {
|
||||
#{$mat-menu-item} #{$mat-icon} {
|
||||
&#{$mat-icon-no-color},
|
||||
&#{$mat-mdc-submenu-icon} {
|
||||
color: var(--theme-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
#{$mat-notched-outline-trailing},
|
||||
|
@ -275,7 +275,7 @@ describe('PreviewComponent', () => {
|
||||
spyOn(component, 'navigateToFileLocation');
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
uploadService.fileUploadDeleted.next();
|
||||
uploadService.fileUploadDeleted.next({} as any);
|
||||
|
||||
expect(component.navigateToFileLocation).toHaveBeenCalled();
|
||||
});
|
||||
|
@ -175,7 +175,7 @@ describe('AcaViewerComponent', () => {
|
||||
});
|
||||
|
||||
it('should return to parent folder on fileUploadDeleted event', async () => {
|
||||
uploadService.fileUploadDeleted.next();
|
||||
uploadService.fileUploadDeleted.next({} as any);
|
||||
|
||||
expect(component['navigateToFileLocation']).toHaveBeenCalled();
|
||||
});
|
||||
|
@ -22,7 +22,7 @@
|
||||
* 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';
|
||||
|
||||
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 actualMoreActions: string[] = await Promise.all(
|
||||
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 || '';
|
||||
})
|
||||
);
|
||||
|
@ -84,8 +84,8 @@ describe('ExtensionsDataLoaderGuard', () => {
|
||||
const guard = setupTest([() => subject1.asObservable(), () => subject2.asObservable()]);
|
||||
|
||||
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
||||
subject1.next();
|
||||
subject2.next();
|
||||
subject1.next(true);
|
||||
subject2.next(true);
|
||||
subject1.complete();
|
||||
|
||||
expect(emittedSpy).not.toHaveBeenCalled();
|
||||
@ -99,8 +99,8 @@ describe('ExtensionsDataLoaderGuard', () => {
|
||||
const guard = setupTest([() => subject1.asObservable(), () => subject2.asObservable()]);
|
||||
|
||||
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
||||
subject1.next();
|
||||
subject2.next();
|
||||
subject1.next(true);
|
||||
subject2.next(true);
|
||||
subject1.complete();
|
||||
subject2.complete();
|
||||
|
||||
@ -114,7 +114,7 @@ describe('ExtensionsDataLoaderGuard', () => {
|
||||
const guard = setupTest([() => subject1.asObservable(), () => throwError(new Error())]);
|
||||
|
||||
guard.subscribe(emittedSpy, erroredSpy, completedSpy);
|
||||
subject1.next();
|
||||
subject1.next(true);
|
||||
|
||||
expect(emittedSpy).toHaveBeenCalledWith(true);
|
||||
expect(erroredSpy).not.toHaveBeenCalled();
|
||||
|
@ -58,7 +58,7 @@ import { NavigationHistoryService } from '../../services/navigation-history.serv
|
||||
/* eslint-disable @angular-eslint/directive-class-suffix */
|
||||
@Directive()
|
||||
export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
onDestroy$: Subject<boolean> = new Subject<boolean>();
|
||||
onDestroy$: Subject<void> = new Subject<void>();
|
||||
|
||||
@ViewChild(DocumentListComponent)
|
||||
documentList: DocumentListComponent;
|
||||
@ -173,7 +173,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
||||
this.subscriptions = [];
|
||||
|
||||
this.onDestroy$.next(true);
|
||||
this.onDestroy$.next();
|
||||
this.onDestroy$.complete();
|
||||
this.store.dispatch(new SetSelectedNodesAction([]));
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ describe('InfoDrawerComponent', () => {
|
||||
|
||||
it('should show the icons from extension', () => {
|
||||
fixture.detectChanges();
|
||||
mockStream.next();
|
||||
mockStream.next({});
|
||||
expect(component.actions).toEqual([
|
||||
{
|
||||
id: 'app.sidebar.close',
|
||||
|
@ -33,7 +33,7 @@ export class AppHookService {
|
||||
/**
|
||||
* Gets emitted when user delete the node
|
||||
*/
|
||||
nodesDeleted = new Subject<any>();
|
||||
nodesDeleted = new Subject<void>();
|
||||
|
||||
/**
|
||||
* Gets emitted when user delete the library
|
||||
@ -53,7 +53,7 @@ export class AppHookService {
|
||||
/**
|
||||
* Gets emitted when user join the library
|
||||
*/
|
||||
libraryJoined = new Subject<string>();
|
||||
libraryJoined = new Subject<void>();
|
||||
|
||||
/**
|
||||
* Gets emitted when user left the library
|
||||
@ -63,20 +63,20 @@ export class AppHookService {
|
||||
/**
|
||||
* Gets emitted when library throws 400 error code
|
||||
*/
|
||||
library400Error = new Subject<any>();
|
||||
library400Error = new Subject<void>();
|
||||
|
||||
/**
|
||||
* Gets emitted when user join the library
|
||||
*/
|
||||
joinLibraryToggle = new Subject<string>();
|
||||
joinLibraryToggle = new Subject<void>();
|
||||
|
||||
/**
|
||||
* Gets emitted when user unlink the node
|
||||
*/
|
||||
linksUnshared = new Subject<any>();
|
||||
linksUnshared = new Subject<void>();
|
||||
|
||||
/**
|
||||
* 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) => {
|
||||
isReady = value;
|
||||
});
|
||||
auth.onLogin.next();
|
||||
auth.onLogin.next({});
|
||||
await expect(isReady).toEqual(true);
|
||||
});
|
||||
|
||||
it('should set local storage prefix after login', () => {
|
||||
spyOn(preferencesService, 'setStoragePrefix');
|
||||
spyOn(auth, 'getUsername').and.returnValue('test-username');
|
||||
auth.onLogin.next();
|
||||
auth.onLogin.next({});
|
||||
|
||||
expect(preferencesService.setStoragePrefix).toHaveBeenCalledWith('test-username');
|
||||
});
|
||||
|
@ -62,7 +62,7 @@ export class AppService implements ShellAppService, OnDestroy {
|
||||
pageHeading$ = this.pageHeading.asObservable();
|
||||
|
||||
appNavNarMode$: Subject<'collapsed' | 'expanded'> = new BehaviorSubject('expanded');
|
||||
toggleAppNavBar$ = new Subject();
|
||||
toggleAppNavBar$ = new Subject<void>();
|
||||
|
||||
hideSidenavConditions = ['/preview/'];
|
||||
minimizeSidenavConditions = ['search'];
|
||||
|
@ -24,19 +24,20 @@
|
||||
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
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 { map } from 'rxjs/operators';
|
||||
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 { NotificationService } from '@alfresco/adf-core';
|
||||
|
||||
@Injectable()
|
||||
export class RouterEffects {
|
||||
private notificationService = inject(NotificationService);
|
||||
|
||||
constructor(private actions$: Actions, private router: Router, private location: Location) {}
|
||||
private actions$ = inject(Actions);
|
||||
private router = inject(Router);
|
||||
private location = inject(Location);
|
||||
|
||||
navigateUrl$ = createEffect(
|
||||
() =>
|
||||
|
@ -23,22 +23,20 @@
|
||||
*/
|
||||
|
||||
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 { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { map } from 'rxjs/operators';
|
||||
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()
|
||||
export class SnackbarEffects {
|
||||
constructor(
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private snackBar: MatSnackBar,
|
||||
private translationService: TranslationService
|
||||
) {}
|
||||
private store = inject(Store<AppStore>);
|
||||
private actions$ = inject(Actions);
|
||||
private snackBar = inject(MatSnackBar);
|
||||
private translationService = inject(TranslationService);
|
||||
|
||||
infoEffect = createEffect(
|
||||
() =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user