[ADF-897] - ActivitiPeopleList - use the adf prefix (#2001)

* Use the adf as prexif instead of activiti

* Fix typo

* Fix wrong import
This commit is contained in:
Maurizio Vitale
2017-06-21 17:10:22 +02:00
committed by Eugenio Romano
parent f1f6c5095e
commit 859bf7a01d
12 changed files with 40 additions and 40 deletions
@@ -37,7 +37,7 @@ import {
ActivitiPeopleSearch, ActivitiPeopleSearch,
TaskAttachmentListComponent, TaskAttachmentListComponent,
ActivitiCreateTaskAttachmentComponent, ActivitiCreateTaskAttachmentComponent,
ActivitiPeopleList PeopleList
} from './src/components/index'; } from './src/components/index';
export * from './src/components/index'; export * from './src/components/index';
@@ -59,7 +59,7 @@ export const ACTIVITI_TASKLIST_DIRECTIVES: any[] = [
ActivitiPeopleSearch, ActivitiPeopleSearch,
TaskAttachmentListComponent, TaskAttachmentListComponent,
ActivitiCreateTaskAttachmentComponent, ActivitiCreateTaskAttachmentComponent,
ActivitiPeopleList PeopleList
]; ];
export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
@@ -46,7 +46,7 @@
overflow-y: auto; overflow-y: auto;
} }
activiti-people-list >>> alfresco-datatable >>> thead { adf-people-list >>> alfresco-datatable >>> thead {
display: none; display: none;
} }
@@ -66,11 +66,11 @@ activiti-people-list >>> alfresco-datatable >>> thead {
color: rgb(255, 152, 0); color: rgb(255, 152, 0);
} }
activiti-people-list >>> alfresco-datatable >>> .people-full-name { adf-people-list >>> alfresco-datatable >>> .people-full-name {
font-family: 'Muli'; font-family: 'Muli';
} }
activiti-people-list >>> alfresco-datatable >>> .people-pic { adf-people-list >>> alfresco-datatable >>> .people-pic {
background: #ffc800; background: #ffc800;
padding: 10px 6px; padding: 10px 6px;
border-radius: 100px; border-radius: 100px;
@@ -83,7 +83,7 @@ activiti-people-list >>> alfresco-datatable >>> .people-pic {
min-width: 30px; min-width: 30px;
} }
activiti-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{ adf-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{
padding: 4px 12px; padding: 4px 12px;
} }
@@ -6,7 +6,7 @@
</div> </div>
</div> </div>
<div class="search-list-container" id="search-people-list" *ngIf="hasUsers()"> <div class="search-list-container" id="search-people-list" *ngIf="hasUsers()">
<activiti-people-list <adf-people-list
[users]="users" [users]="users"
(clickRow)="onRowClick($event)"> (clickRow)="onRowClick($event)">
<data-columns> <data-columns>
@@ -21,7 +21,7 @@
</ng-template> </ng-template>
</data-column> </data-column>
</data-columns> </data-columns>
</activiti-people-list> </adf-people-list>
</div> </div>
<div class="search-list-action-container"> <div class="search-list-action-container">
<button type="button" id="close-people-search" (click)="closeSearchList()" class="mdl-button close"> <button type="button" id="close-people-search" (click)="closeSearchList()" class="mdl-button close">
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core'; import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
import { ActivitiPeopleSearch } from './activiti-people-search.component'; import { ActivitiPeopleSearch } from './activiti-people-search.component';
import { ActivitiPeopleList } from './activiti-people-list.component'; import { PeopleList } from './adf-people-list.component';
import { DataTableModule } from 'ng2-alfresco-datatable'; import { DataTableModule } from 'ng2-alfresco-datatable';
import { User } from '../models/user.model'; import { User } from '../models/user.model';
@@ -56,7 +56,7 @@ describe('ActivitiPeopleSearch', () => {
], ],
declarations: [ declarations: [
ActivitiPeopleSearch, ActivitiPeopleSearch,
ActivitiPeopleList PeopleList
] ]
}).compileComponents().then(() => { }).compileComponents().then(() => {
@@ -40,24 +40,24 @@
padding: 0px; padding: 0px;
} }
activiti-people-list >>> alfresco-datatable >>> thead { adf-people-list >>> alfresco-datatable >>> thead {
display: none; display: none;
} }
activiti-people-list >>> alfresco-datatable >>> .people-full-name { adf-people-list >>> alfresco-datatable >>> .people-full-name {
font-family: 'Muli'; font-family: 'Muli';
} }
activiti-people-list >>> alfresco-datatable >>> .people-email { adf-people-list >>> alfresco-datatable >>> .people-email {
font-family: 'Muli'; font-family: 'Muli';
opacity: 0.54; opacity: 0.54;
} }
activiti-people-list >>> alfresco-datatable >>> .people-edit-label { adf-people-list >>> alfresco-datatable >>> .people-edit-label {
font-family: 'Muli'; font-family: 'Muli';
} }
activiti-people-list >>> alfresco-datatable >>> .people-pic { adf-people-list >>> alfresco-datatable >>> .people-pic {
background: #ffc800; background: #ffc800;
padding: 12px 10px; padding: 12px 10px;
border-radius: 100px; border-radius: 100px;
@@ -69,6 +69,6 @@ activiti-people-list >>> alfresco-datatable >>> .people-pic {
text-transform: uppercase text-transform: uppercase
} }
activiti-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{ adf-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{
padding: 10px; padding: 10px;
} }
@@ -19,7 +19,7 @@
</activiti-people-search> </activiti-people-search>
</div> </div>
<div class="assignment-list-container" id="assignment-people-list" *ngIf="hasPeople()"> <div class="assignment-list-container" id="assignment-people-list" *ngIf="hasPeople()">
<activiti-people-list <adf-people-list
[users]="people" [users]="people"
[actions]="isEditMode()" [actions]="isEditMode()"
(clickAction)="onClickAction($event)"> (clickAction)="onClickAction($event)">
@@ -37,6 +37,6 @@
</ng-template> </ng-template>
</data-column> </data-column>
</data-columns> </data-columns>
</activiti-people-list> </adf-people-list>
</div> </div>
</div> </div>
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { CoreModule, AlfrescoTranslationService, LogService } from 'ng2-alfresco-core'; import { CoreModule, AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
import { ActivitiPeopleSearch } from './activiti-people-search.component'; import { ActivitiPeopleSearch } from './activiti-people-search.component';
import { ActivitiPeopleList } from './activiti-people-list.component'; import { PeopleList } from './adf-people-list.component';
import { ActivitiPeople } from './activiti-people.component'; import { ActivitiPeople } from './activiti-people.component';
import { DataTableModule } from 'ng2-alfresco-datatable'; import { DataTableModule } from 'ng2-alfresco-datatable';
import { User } from '../models/user.model'; import { User } from '../models/user.model';
@@ -58,7 +58,7 @@ describe('ActivitiPeople', () => {
], ],
declarations: [ declarations: [
ActivitiPeopleSearch, ActivitiPeopleSearch,
ActivitiPeopleList, PeopleList,
ActivitiPeople ActivitiPeople
], ],
providers: [ providers: [
@@ -18,7 +18,7 @@
import { ComponentFixture, TestBed, async } from '@angular/core/testing'; import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core'; import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
import { ActivitiPeopleList } from './activiti-people-list.component'; import { PeopleList } from './adf-people-list.component';
import { User, UserEventModel } from '../models/index'; import { User, UserEventModel } from '../models/index';
import { DataTableModule, ObjectDataRow, DataRowEvent, DataRowActionEvent } from 'ng2-alfresco-datatable'; import { DataTableModule, ObjectDataRow, DataRowEvent, DataRowActionEvent } from 'ng2-alfresco-datatable';
@@ -31,10 +31,10 @@ const fakeUser: User = new User({
email: 'fake@mail.com' email: 'fake@mail.com'
}); });
describe('ActivitiPeopleList', () => { describe('PeopleList', () => {
let activitiPeopleListComponent: ActivitiPeopleList; let peopleListComponent: PeopleList;
let fixture: ComponentFixture<ActivitiPeopleList>; let fixture: ComponentFixture<PeopleList>;
let element: HTMLElement; let element: HTMLElement;
let componentHandler; let componentHandler;
@@ -45,7 +45,7 @@ describe('ActivitiPeopleList', () => {
DataTableModule DataTableModule
], ],
declarations: [ declarations: [
ActivitiPeopleList PeopleList
] ]
}).compileComponents().then(() => { }).compileComponents().then(() => {
@@ -53,8 +53,8 @@ describe('ActivitiPeopleList', () => {
spyOn(translateService, 'addTranslationFolder').and.stub(); spyOn(translateService, 'addTranslationFolder').and.stub();
spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); }); spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); });
fixture = TestBed.createComponent(ActivitiPeopleList); fixture = TestBed.createComponent(PeopleList);
activitiPeopleListComponent = fixture.componentInstance; peopleListComponent = fixture.componentInstance;
element = fixture.nativeElement; element = fixture.nativeElement;
componentHandler = jasmine.createSpyObj('componentHandler', [ componentHandler = jasmine.createSpyObj('componentHandler', [
'upgradeAllRegistered' 'upgradeAllRegistered'
@@ -69,15 +69,15 @@ describe('ActivitiPeopleList', () => {
let row = new ObjectDataRow(fakeUser); let row = new ObjectDataRow(fakeUser);
let rowEvent = new DataRowEvent(row, null); let rowEvent = new DataRowEvent(row, null);
activitiPeopleListComponent.clickRow.subscribe(selectedUser => { peopleListComponent.clickRow.subscribe(selectedUser => {
expect(selectedUser.id).toEqual('1'); expect(selectedUser.id).toEqual('1');
expect(selectedUser.email).toEqual('fake@mail.com'); expect(selectedUser.email).toEqual('fake@mail.com');
expect(activitiPeopleListComponent.user.id).toEqual('1'); expect(peopleListComponent.user.id).toEqual('1');
expect(activitiPeopleListComponent.user.email).toEqual('fake@mail.com'); expect(peopleListComponent.user.email).toEqual('fake@mail.com');
done(); done();
}); });
activitiPeopleListComponent.selectUser(rowEvent); peopleListComponent.selectUser(rowEvent);
}); });
it('should emit row action event', (done) => { it('should emit row action event', (done) => {
@@ -88,13 +88,13 @@ describe('ActivitiPeopleList', () => {
}; };
let rowActionEvent = new DataRowActionEvent(row, removeObj); let rowActionEvent = new DataRowActionEvent(row, removeObj);
activitiPeopleListComponent.clickAction.subscribe((selectedAction: UserEventModel) => { peopleListComponent.clickAction.subscribe((selectedAction: UserEventModel) => {
expect(selectedAction.type).toEqual('remove'); expect(selectedAction.type).toEqual('remove');
expect(selectedAction.value.id).toEqual('1'); expect(selectedAction.value.id).toEqual('1');
expect(selectedAction.value.email).toEqual('fake@mail.com'); expect(selectedAction.value.email).toEqual('fake@mail.com');
done(); done();
}); });
activitiPeopleListComponent.onExecuteRowAction(rowActionEvent); peopleListComponent.onExecuteRowAction(rowActionEvent);
}); });
}); });
@@ -23,12 +23,12 @@ import { DataTableComponent } from 'ng2-alfresco-datatable';
declare let componentHandler: any; declare let componentHandler: any;
@Component({ @Component({
selector: 'activiti-people-list', selector: 'adf-people-list',
templateUrl: './activiti-people-list.component.html', templateUrl: './adf-people-list.component.html',
styleUrls: ['./activiti-people-list.component.css'] styleUrls: ['./adf-people-list.component.css']
}) })
export class ActivitiPeopleList { export class PeopleList {
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent; @ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
@@ -28,4 +28,4 @@ export * from './activiti-task-details.component';
export * from './activiti-start-task.component'; export * from './activiti-start-task.component';
export * from './activiti-people-search.component'; export * from './activiti-people-search.component';
export * from './adf-create-task-attachment.component'; export * from './adf-create-task-attachment.component';
export * from './activiti-people-list.component'; export * from './adf-people-list.component';