mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
migrate cloud components
This commit is contained in:
parent
5a503603e7
commit
7fa18879f5
@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs';
|
||||
import { GroupCloudComponent } from './group-cloud.component';
|
||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { DebugElement, SimpleChange } from '@angular/core';
|
||||
import { IdentityGroupService } from '../services/identity-group.service';
|
||||
import { mockFoodGroups, mockMeatChicken, mockVegetableAubergine } from '../mock/group-cloud.mock';
|
||||
@ -28,6 +27,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatChipGridHarness, MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatIconHarness } from '@angular/material/icon/testing';
|
||||
import { MatInputHarness } from '@angular/material/input/testing';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
|
||||
describe('GroupCloudComponent', () => {
|
||||
let loader: HarnessLoader;
|
||||
@ -71,7 +71,7 @@ describe('GroupCloudComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule, GroupCloudComponent]
|
||||
imports: [ProcessServiceCloudTestingModule, GroupCloudComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(GroupCloudComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -48,7 +48,6 @@ import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { InitialGroupNamePipe } from '../pipe/group-initial.pipe';
|
||||
import { IdentityGroupService } from '../services/identity-group.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-group',
|
||||
@ -67,7 +66,6 @@ import { IdentityGroupService } from '../services/identity-group.service';
|
||||
MatButtonModule,
|
||||
InitialGroupNamePipe
|
||||
],
|
||||
providers: [{ provide: IDENTITY_GROUP_SERVICE_TOKEN, useExisting: IdentityGroupService }],
|
||||
templateUrl: './group-cloud.component.html',
|
||||
styleUrls: ['./group-cloud.component.scss'],
|
||||
animations: [
|
||||
|
@ -47,7 +47,6 @@ import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { IdentityUserService } from '../services/identity-user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-people',
|
||||
@ -72,7 +71,7 @@ import { IdentityUserService } from '../services/identity-user.service';
|
||||
transition('void => enter', [style({ opacity: 0, transform: 'translateY(-100%)' }), animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)')])
|
||||
])
|
||||
],
|
||||
providers: [FullNamePipe, { provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService }],
|
||||
providers: [FullNamePipe],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
||||
|
@ -36,6 +36,10 @@ import { PeopleCloudComponent } from './people/components/people-cloud.component
|
||||
import { RichTextEditorComponent } from './rich-text-editor';
|
||||
import { TaskFormCloudComponent } from './task/task-form/components/task-form-cloud.component';
|
||||
import { GroupCloudComponent } from './group/components/group-cloud.component';
|
||||
import { IDENTITY_GROUP_SERVICE_TOKEN } from './group/services/identity-group-service.token';
|
||||
import { IdentityGroupService } from './group/services/identity-group.service';
|
||||
import { IDENTITY_USER_SERVICE_TOKEN } from './people/services/identity-user-service.token';
|
||||
import { IdentityUserService } from './people/services/identity-user.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -77,6 +81,8 @@ export class ProcessServicesCloudModule {
|
||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useExisting: filterPreferenceServiceInstance ?? LocalPreferenceCloudService },
|
||||
{ provide: PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN, useExisting: listPreferenceServiceInstance ?? LocalPreferenceCloudService },
|
||||
{ provide: TASK_LIST_PREFERENCES_SERVICE_TOKEN, useExisting: listPreferenceServiceInstance ?? LocalPreferenceCloudService },
|
||||
{ provide: IDENTITY_GROUP_SERVICE_TOKEN, useExisting: IdentityGroupService },
|
||||
{ provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService },
|
||||
FormRenderingService,
|
||||
{ provide: FormRenderingService, useClass: CloudFormRenderingService }
|
||||
]
|
||||
|
@ -64,7 +64,6 @@ import { VariableMapperService } from '../../../services/variable-mapper.sevice'
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { LocalPreferenceCloudService } from '../../../services/local-preference-cloud.service';
|
||||
|
||||
const PRESET_KEY = 'adf-cloud-process-list.presets';
|
||||
|
||||
@ -82,12 +81,6 @@ const PRESET_KEY = 'adf-cloud-process-list.presets';
|
||||
ColumnsSelectorComponent,
|
||||
DataTableComponent
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN,
|
||||
useClass: LocalPreferenceCloudService
|
||||
}
|
||||
],
|
||||
templateUrl: './process-list-cloud.component.html',
|
||||
styleUrls: ['./process-list-cloud.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
Loading…
x
Reference in New Issue
Block a user