mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4793] The filters don't work on community-edition [ Use local storage for community version ] (#4973)
* * Use local storage for community version. * * Created a communityModule. * * Updated unit tests the recent changes * * Updated documents. * * Modified process/task filters doc.
This commit is contained in:
committed by
Eugenio Romano
parent
964e89f6ef
commit
0bca6607a9
@@ -79,18 +79,15 @@ import { CloudBreadcrumbsComponent } from './components/cloud/cloud-breadcrumb-c
|
||||
import { CloudFiltersDemoComponent } from './components/cloud/cloud-filters-demo.component';
|
||||
import { TemplateDemoComponent } from './components/template-list/template-demo.component';
|
||||
import { PeopleGroupCloudDemoComponent } from './components/cloud/people-groups-cloud-demo.component';
|
||||
import { CloudSettingsComponent } from './components/cloud/cloud-settings.component';
|
||||
import { ConfirmDialogExampleComponent } from './components/confirm-dialog/confirm-dialog-example.component';
|
||||
import { FormCloudDemoComponent } from './components/app-layout/cloud/form-demo/cloud-form-demo.component';
|
||||
import { CommunityCloudComponent } from './components/cloud/community/community-cloud.component';
|
||||
import { CommunityTasksCloudDemoComponent } from './components/cloud/community/community-task-cloud.component';
|
||||
import { CommunityCloudFiltersDemoComponent } from './components/cloud/community/community-filters.component';
|
||||
import { CommunityStartProcessCloudDemoComponent } from './components/cloud/community/community-start-process-cloud.component';
|
||||
import { CommunityStartTaskCloudDemoComponent } from './components/cloud/community/community-start-task-cloud.component';
|
||||
import { CommunityProcessDetailsCloudDemoComponent } from './components/cloud/community/community-process-details-cloud.component';
|
||||
import { CommunityProcessesCloudDemoComponent } from './components/cloud/community/community-processes-cloud.component';
|
||||
import { CommunityTaskDetailsCloudDemoComponent } from './components/cloud/community/community-task-details-cloud.component';
|
||||
import { environment } from '../environments/environment';
|
||||
import { AppCloudSharedModule } from './components/cloud/shared/cloud.shared.module';
|
||||
import {
|
||||
UserPreferenceCloudService,
|
||||
PROCESS_FILTERS_SERVICE_TOKEN,
|
||||
TASK_FILTERS_SERVICE_TOKEN
|
||||
} from '@alfresco/adf-process-services-cloud';
|
||||
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
import localeFr from '@angular/common/locales/fr';
|
||||
@@ -146,6 +143,7 @@ registerLocaleData(localeSv);
|
||||
ExtensionsModule.forRoot(),
|
||||
ThemePickerModule,
|
||||
ChartsModule,
|
||||
AppCloudSharedModule,
|
||||
MonacoEditorModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
@@ -189,24 +187,17 @@ registerLocaleData(localeSv);
|
||||
CloudFiltersDemoComponent,
|
||||
TemplateDemoComponent,
|
||||
PeopleGroupCloudDemoComponent,
|
||||
CloudSettingsComponent,
|
||||
ConfirmDialogExampleComponent,
|
||||
FormCloudDemoComponent,
|
||||
ConfirmDialogExampleComponent,
|
||||
CommunityCloudComponent,
|
||||
CommunityTasksCloudDemoComponent,
|
||||
CommunityCloudFiltersDemoComponent,
|
||||
CommunityProcessesCloudDemoComponent,
|
||||
CommunityStartProcessCloudDemoComponent,
|
||||
CommunityStartTaskCloudDemoComponent,
|
||||
CommunityProcessDetailsCloudDemoComponent,
|
||||
CommunityTaskDetailsCloudDemoComponent
|
||||
ConfirmDialogExampleComponent
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS, useClass:
|
||||
AuthBearerInterceptor, multi: true
|
||||
},
|
||||
{ provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService },
|
||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService },
|
||||
{ provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
|
||||
{
|
||||
provide: TRANSLATION_PROVIDER,
|
||||
|
@@ -57,14 +57,6 @@ import { ProcessDetailsCloudDemoComponent } from './components/cloud/process-det
|
||||
import { TemplateDemoComponent } from './components/template-list/template-demo.component';
|
||||
import { FormCloudDemoComponent } from './components/app-layout/cloud/form-demo/cloud-form-demo.component';
|
||||
import { ConfirmDialogExampleComponent } from './components/confirm-dialog/confirm-dialog-example.component';
|
||||
import { CommunityTasksCloudDemoComponent } from './components/cloud/community/community-task-cloud.component';
|
||||
import { CommunityCloudComponent } from './components/cloud/community/community-cloud.component';
|
||||
import { CommunityStartProcessCloudDemoComponent } from './components/cloud/community/community-start-process-cloud.component';
|
||||
import { CommunityStartTaskCloudDemoComponent } from './components/cloud/community/community-start-task-cloud.component';
|
||||
import { CommunityProcessDetailsCloudDemoComponent } from './components/cloud/community/community-process-details-cloud.component';
|
||||
import { CommunityProcessesCloudDemoComponent } from './components/cloud/community/community-processes-cloud.component';
|
||||
import { CommunityTaskDetailsCloudDemoComponent } from './components/cloud/community/community-task-details-cloud.component';
|
||||
|
||||
export const appRoutes: Routes = [
|
||||
{ path: 'login', loadChildren: 'app/components/login/login.module#AppLoginModule' },
|
||||
{ path: 'logout', component: LogoutComponent },
|
||||
@@ -186,33 +178,7 @@ export const appRoutes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'community',
|
||||
component: CommunityCloudComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'tasks',
|
||||
component: CommunityTasksCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'processes',
|
||||
component: CommunityProcessesCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'start-task',
|
||||
component: CommunityStartTaskCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'start-process',
|
||||
component: CommunityStartProcessCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'task-details/:taskId',
|
||||
component: CommunityTaskDetailsCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'process-details/:processInstanceId',
|
||||
component: CommunityProcessDetailsCloudDemoComponent
|
||||
}
|
||||
]
|
||||
loadChildren: 'app/components/cloud/community/community.module#AppCommunityModule'
|
||||
},
|
||||
{
|
||||
path: ':appName',
|
||||
|
@@ -29,7 +29,7 @@ import { CloudLayoutService } from '../services/cloud-layout.service';
|
||||
height: 100% !important;
|
||||
}
|
||||
`],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class CommunityCloudComponent {
|
||||
|
||||
|
@@ -0,0 +1,97 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import {
|
||||
ProcessServicesCloudModule,
|
||||
LocalPreferenceCloudService,
|
||||
PROCESS_FILTERS_SERVICE_TOKEN,
|
||||
TASK_FILTERS_SERVICE_TOKEN
|
||||
} from '@alfresco/adf-process-services-cloud';
|
||||
|
||||
import { CommunityCloudComponent } from './community-cloud.component';
|
||||
import { CommunityTasksCloudDemoComponent } from './community-task-cloud.component';
|
||||
import { CommunityCloudFiltersDemoComponent } from './community-filters.component';
|
||||
import { CommunityProcessesCloudDemoComponent } from './community-processes-cloud.component';
|
||||
import { CommunityStartProcessCloudDemoComponent } from './community-start-process-cloud.component';
|
||||
import { CommunityStartTaskCloudDemoComponent } from './community-start-task-cloud.component';
|
||||
import { CommunityProcessDetailsCloudDemoComponent } from './community-process-details-cloud.component';
|
||||
import { CommunityTaskDetailsCloudDemoComponent } from './community-task-details-cloud.component';
|
||||
import { AppCloudSharedModule } from '../shared/cloud.shared.module';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: CommunityCloudComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'tasks',
|
||||
component: CommunityTasksCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'processes',
|
||||
component: CommunityProcessesCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'start-task',
|
||||
component: CommunityStartTaskCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'start-process',
|
||||
component: CommunityStartProcessCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'task-details/:taskId',
|
||||
component: CommunityTaskDetailsCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'process-details/:processInstanceId',
|
||||
component: CommunityProcessDetailsCloudDemoComponent
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
CoreModule.forChild(),
|
||||
ProcessServicesCloudModule,
|
||||
RouterModule.forChild(routes),
|
||||
AppCloudSharedModule,
|
||||
FlexLayoutModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityCloudComponent,
|
||||
CommunityTasksCloudDemoComponent,
|
||||
CommunityCloudFiltersDemoComponent,
|
||||
CommunityProcessesCloudDemoComponent,
|
||||
CommunityStartProcessCloudDemoComponent,
|
||||
CommunityStartTaskCloudDemoComponent,
|
||||
CommunityProcessDetailsCloudDemoComponent,
|
||||
CommunityTaskDetailsCloudDemoComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService },
|
||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
|
||||
]
|
||||
})
|
||||
export class AppCommunityModule {}
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { CloudLayoutService } from './services/cloud-layout.service';
|
||||
import { CloudLayoutService } from '../services/cloud-layout.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
@@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CloudSettingsComponent } from './cloud-settings.component';
|
||||
import { MatDialogModule, MatInputModule, MatSelectModule, MatSlideToggleModule } from '@angular/material';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
CoreModule.forChild(),
|
||||
MatDialogModule,
|
||||
MatInputModule,
|
||||
MatSelectModule,
|
||||
MatSlideToggleModule
|
||||
],
|
||||
declarations: [ CloudSettingsComponent ],
|
||||
exports: [ CommonModule, CloudSettingsComponent]
|
||||
})
|
||||
|
||||
export class AppCloudSharedModule {}
|
Reference in New Issue
Block a user