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