mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
AAE-37292 Bug fixes and code improvements (#4733)
This commit is contained in:
@@ -22,11 +22,20 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { importProvidersFrom, ApplicationConfig } from '@angular/core';
|
||||
import { importProvidersFrom, ApplicationConfig, Provider, EnvironmentProviders } from '@angular/core';
|
||||
import { provideNoopAnimations, provideAnimations } from '@angular/platform-browser/animations';
|
||||
import { AuthGuard, CoreModule, AuthModule, provideTranslations } from '@alfresco/adf-core';
|
||||
import { AppService } from '@alfresco/aca-shared';
|
||||
import { AppExtensionsModule } from './extensions.module';
|
||||
import {
|
||||
AuthGuard,
|
||||
AuthModule,
|
||||
provideTranslations,
|
||||
provideAppConfig,
|
||||
FORM_FIELD_MODEL_RENDER_MIDDLEWARE,
|
||||
DecimalRenderMiddlewareService,
|
||||
AuthenticationService,
|
||||
TranslateLoaderService
|
||||
} from '@alfresco/adf-core';
|
||||
import { AppService, provideContentAppExtensions } from '@alfresco/aca-shared';
|
||||
import { provideApplicationExtensions } from './extensions.module';
|
||||
import { environment } from '../environments/environment';
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
import localeFr from '@angular/common/locales/fr';
|
||||
@@ -46,10 +55,14 @@ import localeFi from '@angular/common/locales/fi';
|
||||
import localeDa from '@angular/common/locales/da';
|
||||
import localeSv from '@angular/common/locales/sv';
|
||||
import { provideRouter, withHashLocation } from '@angular/router';
|
||||
import { CONTENT_LAYOUT_ROUTES, ContentServiceExtensionModule, ContentUrlService, provideExtensions } from '@alfresco/aca-content';
|
||||
import { CONTENT_LAYOUT_ROUTES, ContentServiceExtensionModule, ContentUrlService } from '@alfresco/aca-content';
|
||||
import { ContentVersionService } from '@alfresco/adf-content-services';
|
||||
import { SHELL_APP_SERVICE, SHELL_AUTH_TOKEN, provideShellRoutes } from '@alfresco/adf-core/shell';
|
||||
import { APP_ROUTES } from './app.routes';
|
||||
import { HTTP_INTERCEPTORS, HttpClient, provideHttpClient, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
|
||||
import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
||||
import { Authentication, AuthenticationInterceptor } from '@alfresco/adf-core/auth';
|
||||
import { provideTranslateService, TranslateLoader } from '@ngx-translate/core';
|
||||
|
||||
registerLocaleData(localeFr);
|
||||
registerLocaleData(localeDe);
|
||||
@@ -68,11 +81,42 @@ registerLocaleData(localeFi);
|
||||
registerLocaleData(localeDa);
|
||||
registerLocaleData(localeSv);
|
||||
|
||||
/* The replacement for the CoreModule.forRoot() */
|
||||
function provideAdfCore(): (Provider | EnvironmentProviders)[] {
|
||||
return [
|
||||
provideAppConfig(),
|
||||
provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({ cookieName: 'CSRF-TOKEN', headerName: 'X-CSRF-TOKEN' })),
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: AuthenticationInterceptor, multi: true },
|
||||
{ provide: Authentication, useClass: AuthenticationService },
|
||||
{
|
||||
provide: MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
||||
useValue: {
|
||||
duration: 10000
|
||||
}
|
||||
},
|
||||
{
|
||||
provide: FORM_FIELD_MODEL_RENDER_MIDDLEWARE,
|
||||
useClass: DecimalRenderMiddlewareService,
|
||||
multi: true
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
export const AppConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
importProvidersFrom(AuthModule.forRoot({ useHash: true })),
|
||||
importProvidersFrom(CoreModule.forRoot(), AppExtensionsModule, ContentServiceExtensionModule),
|
||||
provideExtensions(),
|
||||
importProvidersFrom(ContentServiceExtensionModule),
|
||||
provideTranslateService({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderService,
|
||||
deps: [HttpClient]
|
||||
},
|
||||
defaultLanguage: 'en'
|
||||
}),
|
||||
provideAdfCore(),
|
||||
provideContentAppExtensions(),
|
||||
provideApplicationExtensions(),
|
||||
provideRouter(APP_ROUTES, withHashLocation()),
|
||||
environment.e2e ? provideNoopAnimations() : provideAnimations(),
|
||||
provideShellRoutes(CONTENT_LAYOUT_ROUTES),
|
||||
|
@@ -22,18 +22,25 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AcaFolderRulesModule } from '@alfresco/aca-content/folder-rules';
|
||||
import { AosExtensionModule } from '@alfresco/aca-content/ms-office';
|
||||
import { AcaAboutModule, DEV_MODE_TOKEN, PACKAGE_JSON } from '@alfresco/aca-content/about';
|
||||
import { EnvironmentProviders, NgModule, Provider } from '@angular/core';
|
||||
import { provideFolderRulesExtension } from '@alfresco/aca-content/folder-rules';
|
||||
import { provideAosExtension } from '@alfresco/aca-content/ms-office';
|
||||
import { DEV_MODE_TOKEN, PACKAGE_JSON, provideAboutExtension } from '@alfresco/aca-content/about';
|
||||
import { environment } from '../environments/environment';
|
||||
import packageJson from 'package.json';
|
||||
|
||||
@NgModule({
|
||||
imports: [AosExtensionModule, AcaAboutModule, AcaFolderRulesModule],
|
||||
providers: [
|
||||
export function provideApplicationExtensions(): (Provider | EnvironmentProviders)[] {
|
||||
return [
|
||||
...provideAboutExtension(),
|
||||
...provideAosExtension(),
|
||||
...provideFolderRulesExtension(),
|
||||
{ provide: PACKAGE_JSON, useValue: packageJson },
|
||||
{ provide: DEV_MODE_TOKEN, useValue: !environment.production }
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
/* @deprecated use `provideApplicationExtensions()` provider api instead */
|
||||
@NgModule({
|
||||
providers: [...provideApplicationExtensions()]
|
||||
})
|
||||
export class AppExtensionsModule {}
|
||||
|
@@ -22,17 +22,23 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule, Provider } from '@angular/core';
|
||||
import { AboutComponent } from './about.component';
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { provideExtensionConfig, provideExtensions } from '@alfresco/adf-extensions';
|
||||
|
||||
@NgModule({
|
||||
providers: [provideExtensionConfig(['about.plugin.json'])]
|
||||
})
|
||||
export class AcaAboutModule {
|
||||
constructor(extensions: ExtensionService) {
|
||||
extensions.setComponents({
|
||||
export function provideAboutExtension(): Provider[] {
|
||||
return [
|
||||
provideExtensionConfig(['about.plugin.json']),
|
||||
provideExtensions({
|
||||
components: {
|
||||
'app.about.component': AboutComponent
|
||||
});
|
||||
}
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
/* @deprecated use `provideAboutExtension()` provider api instead */
|
||||
@NgModule({
|
||||
providers: [...provideAboutExtension()]
|
||||
})
|
||||
export class AcaAboutModule {}
|
||||
|
@@ -23,14 +23,14 @@
|
||||
*/
|
||||
|
||||
import { provideTranslations } from '@alfresco/adf-core';
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { provideExtensionConfig, provideExtensions } from '@alfresco/adf-extensions';
|
||||
import { EnvironmentProviders, NgModule, Provider } from '@angular/core';
|
||||
import * as rules from './folder-rules.rules';
|
||||
import { provideRouter, Routes } from '@angular/router';
|
||||
import { ManageRulesSmartComponent } from './manage-rules/manage-rules.smart-component';
|
||||
import { PluginEnabledGuard } from '@alfresco/aca-shared';
|
||||
|
||||
const routes: Routes = [
|
||||
export const FOLDER_RULES_ROUTES: Routes = [
|
||||
{
|
||||
path: 'rules',
|
||||
component: ManageRulesSmartComponent,
|
||||
@@ -41,13 +41,21 @@ const routes: Routes = [
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
providers: [provideTranslations('folder-rules', 'assets/folder-rules'), provideExtensionConfig(['folder-rules.plugin.json']), provideRouter(routes)]
|
||||
})
|
||||
export class AcaFolderRulesModule {
|
||||
constructor(extensions: ExtensionService) {
|
||||
extensions.setEvaluators({
|
||||
export function provideFolderRulesExtension(): (Provider | EnvironmentProviders)[] {
|
||||
return [
|
||||
provideTranslations('folder-rules', 'assets/folder-rules'),
|
||||
provideExtensionConfig(['folder-rules.plugin.json']),
|
||||
provideRouter(FOLDER_RULES_ROUTES),
|
||||
provideExtensions({
|
||||
evaluators: {
|
||||
'rules.isFolderRulesEnabled': rules.isFolderRulesEnabled
|
||||
});
|
||||
}
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
/** @deprecated use `provideFolderRulesExtension()` instead **/
|
||||
@NgModule({
|
||||
providers: [...provideFolderRulesExtension()]
|
||||
})
|
||||
export class AcaFolderRulesModule {}
|
||||
|
@@ -22,20 +22,28 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { provideExtensionConfig, provideExtensions } from '@alfresco/adf-extensions';
|
||||
import { EnvironmentProviders, NgModule, Provider } from '@angular/core';
|
||||
import { provideEffects } from '@ngrx/effects';
|
||||
import { AosEffects } from './effects/aos.effects';
|
||||
import { provideTranslations } from '@alfresco/adf-core';
|
||||
import { canOpenWithOffice } from '@alfresco/aca-shared/rules';
|
||||
|
||||
@NgModule({
|
||||
providers: [provideExtensionConfig(['aos.plugin.json']), provideTranslations('ms-office', 'assets/ms-office'), provideEffects(AosEffects)]
|
||||
})
|
||||
export class AosExtensionModule {
|
||||
constructor(extensions: ExtensionService) {
|
||||
extensions.setEvaluators({
|
||||
export function provideAosExtension(): (Provider | EnvironmentProviders)[] {
|
||||
return [
|
||||
provideExtensionConfig(['aos.plugin.json']),
|
||||
provideTranslations('ms-office', 'assets/ms-office'),
|
||||
provideEffects(AosEffects),
|
||||
provideExtensions({
|
||||
evaluators: {
|
||||
'aos.canOpenWithOffice': canOpenWithOffice
|
||||
});
|
||||
}
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
/* @deprecated use `provideAosExtension()` provider api instead */
|
||||
@NgModule({
|
||||
providers: [...provideAosExtension()]
|
||||
})
|
||||
export class AosExtensionModule {}
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
import { HammerModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { AuthGuardEcm, LanguagePickerComponent, NotificationHistoryComponent, provideTranslations } from '@alfresco/adf-core';
|
||||
import {
|
||||
ContentModule,
|
||||
@@ -34,17 +33,11 @@ import {
|
||||
LibraryStatusColumnComponent,
|
||||
TrashcanNameColumnComponent
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { DocumentBasePageService, ExtensionsDataLoaderGuard } from '@alfresco/aca-shared';
|
||||
import { DocumentBasePageService, ExtensionsDataLoaderGuard, provideContentAppExtensions } from '@alfresco/aca-shared';
|
||||
import * as rules from '@alfresco/aca-shared/rules';
|
||||
import { AppStoreModule } from './store/app-store.module';
|
||||
import { CoreExtensionsModule } from './extensions/core.extensions.module';
|
||||
import { ExtensionService, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { APP_TOOLBAR_DIRECTIVES } from './components/toolbar';
|
||||
import { APP_SIDENAV_DIRECTIVES } from './components/sidenav';
|
||||
import { APP_COMMON_DIRECTIVES } from './components/common';
|
||||
import { APP_SEARCH_DIRECTIVES } from './components/search';
|
||||
import { provideAppExtensions, provideExtensions } from '@alfresco/adf-extensions';
|
||||
import { ContentUrlService } from './services/content-url.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { LocationLinkComponent } from './components/common/location-link/location-link.component';
|
||||
import { LogoutComponent } from './components/common/logout/logout.component';
|
||||
import { ToggleSharedComponent } from './components/common/toggle-shared/toggle-shared.component';
|
||||
@@ -62,16 +55,15 @@ import { ToggleJoinLibraryButtonComponent } from './components/toolbar/toggle-jo
|
||||
import { ToggleJoinLibraryMenuComponent } from './components/toolbar/toggle-join-library/toggle-join-library-menu.component';
|
||||
import { ViewNodeComponent } from './components/toolbar/view-node/view-node.component';
|
||||
import { CONTENT_ROUTES } from './aca-content.routes';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { provideRouter } from '@angular/router';
|
||||
import { UploadFilesDialogComponent } from './components/upload-files-dialog/upload-files-dialog.component';
|
||||
import { AcaFolderRulesModule } from '@alfresco/aca-content/folder-rules';
|
||||
import { provideFolderRulesExtension } from '@alfresco/aca-content/folder-rules';
|
||||
import { TagsColumnComponent } from './components/dl-custom-components/tags-column/tags-column.component';
|
||||
import { UserInfoComponent } from './components/common/user-info/user-info.component';
|
||||
import { SidenavComponent } from './components/sidenav/sidenav.component';
|
||||
import { ContentManagementService } from './services/content-management.service';
|
||||
import { SHELL_NAVBAR_MIN_WIDTH, ShellLayoutComponent } from '@alfresco/adf-core/shell';
|
||||
import { UserMenuComponent } from './components/sidenav/user-menu/user-menu.component';
|
||||
import { ContextMenuComponent } from './components/context-menu/context-menu.component';
|
||||
import { MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
||||
import { SearchResultsRowComponent } from './components/search/search-results-row/search-results-row.component';
|
||||
import { BulkActionsDropdownComponent } from './components/bulk-actions-dropdown/bulk-actions-dropdown.component';
|
||||
@@ -79,42 +71,26 @@ import { AgentsButtonComponent } from './components/knowledge-retrieval/search-a
|
||||
import { SaveSearchSidenavComponent } from './components/search/search-save/sidenav/save-search-sidenav.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ContentModule.forRoot(),
|
||||
RouterModule.forChild(CONTENT_ROUTES),
|
||||
ExtensionsModule,
|
||||
CoreExtensionsModule,
|
||||
AppStoreModule,
|
||||
...APP_COMMON_DIRECTIVES,
|
||||
...APP_TOOLBAR_DIRECTIVES,
|
||||
...APP_SIDENAV_DIRECTIVES,
|
||||
...APP_SEARCH_DIRECTIVES,
|
||||
ContextMenuComponent,
|
||||
HammerModule,
|
||||
AcaFolderRulesModule
|
||||
],
|
||||
imports: [ContentModule.forRoot(), AppStoreModule, HammerModule],
|
||||
providers: [
|
||||
provideRouter(CONTENT_ROUTES),
|
||||
{ provide: ContentVersionService, useClass: ContentUrlService },
|
||||
{ provide: DocumentBasePageService, useExisting: ContentManagementService },
|
||||
provideAppExtensions(),
|
||||
provideContentAppExtensions(),
|
||||
provideFolderRulesExtension(),
|
||||
provideTranslations('app', 'assets'),
|
||||
{ provide: SHELL_NAVBAR_MIN_WIDTH, useValue: 0 },
|
||||
{
|
||||
provide: MAT_DIALOG_DEFAULT_OPTIONS,
|
||||
useValue: { closeOnNavigation: true, hasBackdrop: true, autoFocus: true }
|
||||
}
|
||||
]
|
||||
})
|
||||
export class ContentServiceExtensionModule {
|
||||
constructor(public extensions: ExtensionService) {
|
||||
extensions.setAuthGuards({
|
||||
},
|
||||
provideExtensions({
|
||||
authGuards: {
|
||||
'app.auth': AuthGuardEcm,
|
||||
'app.extensions.dataLoaderGuard': ExtensionsDataLoaderGuard
|
||||
});
|
||||
|
||||
extensions.setComponents({
|
||||
},
|
||||
components: {
|
||||
'app.layout.main': ShellLayoutComponent,
|
||||
'app.layout.sidenav': SidenavComponent,
|
||||
'app.shell.sibling': UploadFilesDialogComponent,
|
||||
@@ -147,9 +123,8 @@ export class ContentServiceExtensionModule {
|
||||
'app.user.menu': UserMenuComponent,
|
||||
'app.search.columns.name': SearchResultsRowComponent,
|
||||
'app.search.navbar': SaveSearchSidenavComponent
|
||||
});
|
||||
|
||||
extensions.setEvaluators({
|
||||
},
|
||||
evaluators: {
|
||||
canToggleJoinLibrary: rules.canToggleJoinLibrary,
|
||||
canToggleSharedLink: rules.canToggleSharedLink,
|
||||
canToggleFileLock: rules.canToggleFileLock,
|
||||
@@ -189,6 +164,8 @@ export class ContentServiceExtensionModule {
|
||||
'app.isContentServiceEnabled': rules.isContentServiceEnabled,
|
||||
'app.areTagsEnabled': rules.areTagsEnabled,
|
||||
'app.areCategoriesEnabled': rules.areCategoriesEnabled
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
export class ContentServiceExtensionModule {}
|
||||
|
@@ -337,7 +337,7 @@ export const CONTENT_LAYOUT_ROUTES: Route[] = [
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('@alfresco/aca-content/folder-rules').then((m) => m.AcaFolderRulesModule)
|
||||
loadChildren: () => import('@alfresco/aca-content/folder-rules').then((m) => m.FOLDER_RULES_ROUTES)
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -28,6 +28,7 @@ import { LanguagePickerComponent } from './language-picker/language-picker.compo
|
||||
import { LogoutComponent } from './logout/logout.component';
|
||||
import { UserInfoComponent } from './user-info/user-info.component';
|
||||
|
||||
/* @deprecated import standalone components instead */
|
||||
export const APP_COMMON_DIRECTIVES = [
|
||||
LanguagePickerComponent,
|
||||
LocationLinkComponent,
|
||||
|
@@ -29,6 +29,7 @@ import { SearchResultsRowComponent } from './search-results-row/search-results-r
|
||||
import { SearchInputComponent } from './search-input/search-input.component';
|
||||
import { SearchInputControlComponent } from './search-input-control/search-input-control.component';
|
||||
|
||||
/* @deprecated import standalone components instead */
|
||||
export const APP_SEARCH_DIRECTIVES = [
|
||||
SearchActionMenuComponent,
|
||||
SearchLibrariesResultsComponent,
|
||||
|
@@ -32,6 +32,7 @@ import { ActionDirective } from './directives/action.directive';
|
||||
import { SidenavHeaderComponent } from './components/sidenav-header.component';
|
||||
import { UserMenuComponent } from './user-menu/user-menu.component';
|
||||
|
||||
/* @deprecated import standalone components instead */
|
||||
export const APP_SIDENAV_DIRECTIVES = [
|
||||
ButtonMenuComponent,
|
||||
ActiveLinkDirective,
|
||||
|
@@ -30,6 +30,7 @@ import { ToggleFavoriteLibraryComponent } from './toggle-favorite-library/toggle
|
||||
import { ToggleEditOfflineComponent } from './toggle-edit-offline/toggle-edit-offline.component';
|
||||
import { ViewNodeComponent } from './view-node/view-node.component';
|
||||
|
||||
/* @deprecated import standalone components instead */
|
||||
export const APP_TOOLBAR_DIRECTIVES = [
|
||||
ToggleFavoriteComponent,
|
||||
ToggleEditOfflineComponent,
|
||||
|
@@ -1,42 +0,0 @@
|
||||
/*!
|
||||
* 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 { inject, ModuleWithProviders, NgModule, provideAppInitializer } from '@angular/core';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
|
||||
/** @deprecated use provideExtensions() api instead */
|
||||
@NgModule()
|
||||
export class CoreExtensionsModule {
|
||||
static forRoot(): ModuleWithProviders<CoreExtensionsModule> {
|
||||
return {
|
||||
ngModule: CoreExtensionsModule,
|
||||
providers: [
|
||||
provideAppInitializer(() => {
|
||||
const service = inject(AppExtensionService);
|
||||
return service.load();
|
||||
})
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
/*!
|
||||
* 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 { EnvironmentProviders, inject, provideAppInitializer, Provider } from '@angular/core';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
|
||||
export function provideExtensions(): (Provider | EnvironmentProviders)[] {
|
||||
return [
|
||||
provideAppInitializer(() => {
|
||||
const service = inject(AppExtensionService);
|
||||
return service.load();
|
||||
})
|
||||
];
|
||||
}
|
@@ -28,10 +28,8 @@
|
||||
|
||||
export * from './lib/aca-content.module';
|
||||
export * from './lib/aca-content.routes';
|
||||
export * from './lib/extensions/core.extensions.module';
|
||||
export * from './lib/store/initial-state';
|
||||
export * from './lib/services/content-url.service';
|
||||
export * from './lib/services/content-management.service';
|
||||
export * from './lib/components/info-drawer/comments-tab/external-node-permission-comments-tab.service';
|
||||
export * from './lib/utils/aca-search-utils';
|
||||
export * from './lib/extensions/provide-extensions';
|
||||
|
@@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
import { ApiClientFactory } from './api-client-factory';
|
||||
import { AcaFolderRulesModule } from '@alfresco/aca-content/folder-rules';
|
||||
import * as crypto from 'crypto';
|
||||
|
||||
export class RulesApi {
|
||||
@@ -199,7 +198,7 @@ export interface Rule {
|
||||
errorScript: string;
|
||||
isShared: boolean;
|
||||
triggers: RuleTrigger[];
|
||||
conditions: AcaFolderRulesModule;
|
||||
conditions: any;
|
||||
actions: RuleAction[];
|
||||
}
|
||||
|
||||
@@ -288,6 +287,6 @@ export class ConditionsTypes {
|
||||
static readonly conditions = [ConditionsTypes.MIMETYPE.value, ConditionsTypes.CMNAME.value, ConditionsTypes.SIZE.value, ConditionsTypes.TAG.value];
|
||||
constructor(
|
||||
public key: string,
|
||||
public value: AcaFolderRulesModule
|
||||
public value: any
|
||||
) {}
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { EnvironmentProviders, inject, Injectable, provideAppInitializer } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
@@ -58,6 +58,15 @@ import { NodePermissionService } from '../services/node-permission.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { SearchCategory } from '@alfresco/adf-content-services';
|
||||
|
||||
export function provideContentAppExtensions(): EnvironmentProviders[] {
|
||||
return [
|
||||
provideAppInitializer(() => {
|
||||
const service = inject(AppExtensionService);
|
||||
return service.load();
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
Reference in New Issue
Block a user