Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1400 component naming convention fixes #1418

Merged
merged 1 commit into from
Jan 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions demo-shell-ng2/app/components/files/files.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { AuthService, LogService } from 'ng2-alfresco-core';
import {
DocumentActionsService,
DocumentList,
ContentActionHandler,
DocumentActionModel,
FolderActionModel
} from 'ng2-alfresco-documentlist';
import { DocumentActionsService, DocumentListComponent, ContentActionHandler, DocumentActionModel, FolderActionModel } from 'ng2-alfresco-documentlist';
import { FormService } from 'ng2-activiti-form';

@Component({
Expand All @@ -45,8 +39,8 @@ export class FilesComponent implements OnInit {
versioning: boolean = false;
acceptedFilesType: string = '.jpg,.pdf,.js';

@ViewChild(DocumentList)
documentList: DocumentList;
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;

constructor(private documentActions: DocumentActionsService,
private authService: AuthService,
Expand Down
4 changes: 2 additions & 2 deletions ng2-components/ng2-alfresco-documentlist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfr
class DocumentListDemo {

@ViewChild(DocumentList)
documentList: DocumentList;
documentList: DocumentListComponent;

constructor(private authService: AlfrescoAuthenticationService,
private settingsService: AlfrescoSettingsService) {
Expand Down Expand Up @@ -210,7 +210,7 @@ DocumentList provides simple breadcrumb element to indicate the current position

| Name | Type | Description |
| --- | --- | --- |
| `target` | DocumentList | DocumentList component to operate with. Upon clicks will instruct the given component to update. |
| `target` | DocumentListComponent | DocumentList component to operate with. Upon clicks will instruct the given component to update. |
| `folderNode` | MinimalNodeEntryEntity | Active node, builds UI based on `folderNode.path.elements` collection. |

### Creation Menu Action
Expand Down
6 changes: 3 additions & 3 deletions ng2-components/ng2-alfresco-documentlist/demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { NgModule, Component, OnInit, ViewChild } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { DocumentListModule, DocumentList, DocumentActionsService } from 'ng2-alfresco-documentlist';
import { DocumentListModule, DocumentListComponent, DocumentActionsService } from 'ng2-alfresco-documentlist';
import { CoreModule, StorageService, SettingsService, AuthService, AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';

@Component({
Expand Down Expand Up @@ -124,8 +124,8 @@ class DocumentListDemo implements OnInit {
ecmHost: string = 'http://localhost:8080';
ticket: string;

@ViewChild(DocumentList)
documentList: DocumentList;
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;

constructor(private authService: AuthService,
private settingsService: SettingsService,
Expand Down
44 changes: 22 additions & 22 deletions ng2-components/ng2-alfresco-documentlist/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ import { NgModule, ModuleWithProviders } from '@angular/core';
import { CoreModule } from 'ng2-alfresco-core';
import { DataTableModule } from 'ng2-alfresco-datatable';

import { DocumentList } from './src/components/document-list';
import { DocumentMenuAction } from './src/components/document-menu-action';
import { ContentColumn } from './src/components/content-column';
import { ContentColumnList } from './src/components/content-column-list';
import { ContentAction } from './src/components/content-action';
import { ContentActionList } from './src/components/content-action-list';
import { EmptyFolderContent } from './src/components/empty-folder-content';
import { DocumentListBreadcrumb } from './src/components/breadcrumb/breadcrumb.component';
import { DocumentListComponent } from './src/components/document-list.component';
import { DocumentMenuActionComponent } from './src/components/document-menu-action.component';
import { ContentColumnComponent } from './src/components/content-column/content-column.component';
import { ContentColumnListComponent } from './src/components/content-column/content-column-list.component';
import { ContentActionComponent } from './src/components/content-action/content-action.component';
import { ContentActionListComponent } from './src/components/content-action/content-action-list.component';
import { EmptyFolderContentComponent } from './src/components/empty-folder/empty-folder-content.component';
import { DocumentListBreadcrumbComponent } from './src/components/breadcrumb/breadcrumb.component';

import { FolderActionsService } from './src/services/folder-actions.service';
import { DocumentActionsService } from './src/services/document-actions.service';
import { DocumentListService } from './src/services/document-list.service';

// components
export * from './src/components/document-list';
export * from './src/components/content-column';
export * from './src/components/content-column-list';
export * from './src/components/content-action';
export * from './src/components/content-action-list';
export * from './src/components/empty-folder-content';
export * from './src/components/document-list.component';
export * from './src/components/content-column/content-column.component';
export * from './src/components/content-column/content-column-list.component';
export * from './src/components/content-action/content-action.component';
export * from './src/components/content-action/content-action-list.component';
export * from './src/components/empty-folder/empty-folder-content.component';
export * from './src/components/breadcrumb/breadcrumb.component';

// data
Expand All @@ -54,14 +54,14 @@ export * from './src/models/content-action.model';
export * from './src/models/document-library.model';

export const DOCUMENT_LIST_DIRECTIVES: any[] = [
DocumentList,
DocumentMenuAction,
ContentColumn,
ContentColumnList,
ContentAction,
ContentActionList,
EmptyFolderContent,
DocumentListBreadcrumb
DocumentListComponent,
DocumentMenuActionComponent,
ContentColumnComponent,
ContentColumnListComponent,
ContentActionComponent,
ContentActionListComponent,
EmptyFolderContentComponent,
DocumentListBreadcrumbComponent
];

export const DOCUMENT_LIST_PROVIDERS: any[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/

import { PathElementEntity } from 'alfresco-js-api';
import { DocumentListBreadcrumb } from './breadcrumb.component';
import { DocumentList } from '../document-list';
import { DocumentListBreadcrumbComponent } from './breadcrumb.component';
import { DocumentListComponent } from '../document-list.component';

describe('DocumentListBreadcrumb', () => {

let component;

beforeEach(() => {
component = new DocumentListBreadcrumb();
component = new DocumentListBreadcrumbComponent();
});

it('should set current path', () => {
Expand All @@ -50,7 +50,7 @@ describe('DocumentListBreadcrumb', () => {
});

it('should update document list on click', (done) => {
let documentList = new DocumentList(null, null, null);
let documentList = new DocumentListComponent(null, null, null);
spyOn(documentList, 'loadFolderByNodeId').and.stub();

let node = <PathElementEntity> { id: '-id-', name: 'name' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@

import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { MinimalNodeEntryEntity, PathElementEntity } from 'alfresco-js-api';
import { DocumentList } from '../document-list';
import { DocumentListComponent } from '../document-list.component';

@Component({
moduleId: module.id,
selector: 'alfresco-document-list-breadcrumb',
templateUrl: './breadcrumb.component.html',
styleUrls: ['./breadcrumb.component.css']
})
export class DocumentListBreadcrumb implements OnChanges {
export class DocumentListBreadcrumbComponent implements OnChanges {

@Input()
folderNode: MinimalNodeEntryEntity;

@Input()
target: DocumentList;
target: DocumentListComponent;

route: PathElementEntity[] = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
* limitations under the License.
*/

import { DocumentList } from './document-list';
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
import { ContentActionModel } from './../models/content-action.model';
import { ContentActionList } from './content-action-list';
import { DocumentListComponent } from './../document-list.component';
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
import { ContentActionModel } from './../../models/content-action.model';
import { ContentActionListComponent } from './content-action-list.component';

describe('ContentColumnList', () => {

let documentList: DocumentList;
let actionList: ContentActionList;
let documentList: DocumentListComponent;
let actionList: ContentActionListComponent;

beforeEach(() => {
let documentListService = new DocumentListServiceMock();
documentList = new DocumentList(documentListService, null, null);
actionList = new ContentActionList(documentList);
documentList = new DocumentListComponent(documentListService, null, null);
actionList = new ContentActionListComponent(documentList);
});

it('should register action', () => {
Expand All @@ -42,7 +42,7 @@ describe('ContentColumnList', () => {
});

it('should require document list instance to register action', () => {
actionList = new ContentActionList(null);
actionList = new ContentActionListComponent(null);
let action = new ContentActionModel();
expect(actionList.registerAction(action)).toBeFalsy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
* limitations under the License.
*/

import {Component} from '@angular/core';
import {DocumentList} from './document-list';
import {ContentActionModel} from './../models/content-action.model';
import { Component } from '@angular/core';

import { DocumentListComponent } from './../document-list.component';
import { ContentActionModel } from './../../models/content-action.model';

@Component({
selector: 'content-actions',
template: ''
})
export class ContentActionList {
export class ContentActionListComponent {

constructor(
private documentList: DocumentList) {
constructor(private documentList: DocumentListComponent) {
}

/**
Expand Down
Loading