mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
* [ACS-10035]: adds evaluator and helper functions * [ACS-10035]: disables navbar savedSearch for non-supported versions * [ACS-10035]: extends app extension service to allow manual rule evaluation; clean up * [ACS-10035]: introduces pipe as an alternative option for compatibility check * [ACS-10035]: disables save search feature if is not supported * [ACS-10035]: adds test for new method * [ACS-10035]: sonarQube issue * [10035]: adds unit tests for evaluators and helper fns * [ACS-10035]: fixes failed test * [ACS-10035]: fixes naming * [ACS-10035]: fixes race condition issue on direct page refresh * [ACS-10035]: fixes import * [ACS-10035]: sonarQube issues * [ACS-10035]: fixes sonarQube with fake versions * [ACS-10035]: fixes tests * [ACS-10035]: improves pipe logic stream * [ACS-10035]: fixes sonarQube; adjusts tests * [ACS-10035]: adds documentation * [ACS-10035]: exposes isFeatureSupportedInCurrentAcs from aca-content lib * [ACS-10035]: minor fixes * [ACS-10035]: typo fix
44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
/*!
|
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
*
|
|
* Alfresco Example Content Application
|
|
*
|
|
* This file is part of the Alfresco Example Content Application.
|
|
* If the software was purchased under a paid Alfresco license, the terms of
|
|
* the paid license agreement will prevail. Otherwise, the software is
|
|
* provided under the following open source license terms:
|
|
*
|
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
import { AppExtensionService } from '@alfresco/aca-shared';
|
|
import { Pipe, PipeTransform } from '@angular/core';
|
|
import { AppStore, getRepositoryStatus } from '@alfresco/aca-shared/store';
|
|
import { Store } from '@ngrx/store';
|
|
import { map, Observable } from 'rxjs';
|
|
|
|
@Pipe({
|
|
name: 'isFeatureSupportedInCurrentAcs'
|
|
})
|
|
export class IsFeatureSupportedInCurrentAcsPipe implements PipeTransform {
|
|
constructor(
|
|
private readonly appExtensionsService: AppExtensionService,
|
|
private readonly store: Store<AppStore>
|
|
) {}
|
|
|
|
transform(evaluatorId: string): Observable<boolean> {
|
|
return this.store.select(getRepositoryStatus).pipe(map(() => this.appExtensionsService.isFeatureSupported(evaluatorId)));
|
|
}
|
|
}
|