mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#70 better component partitioning
This commit is contained in:
@@ -21,7 +21,7 @@ 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/document-list-breadcrumb.component';
|
||||
import { DocumentListBreadcrumb } from './src/components/breadcrumb/breadcrumb.component';
|
||||
|
||||
import { FolderActionsService } from './src/services/folder-actions.service';
|
||||
import { DocumentActionsService } from './src/services/document-actions.service';
|
||||
@@ -34,7 +34,7 @@ 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-breadcrumb.component';
|
||||
export * from './src/components/breadcrumb/breadcrumb.component';
|
||||
|
||||
// services
|
||||
export * from './src/services/folder-actions.service';
|
||||
|
@@ -25,8 +25,8 @@ import {
|
||||
import {
|
||||
DocumentListBreadcrumb,
|
||||
PathNode
|
||||
} from './document-list-breadcrumb.component';
|
||||
import { DocumentList } from './document-list';
|
||||
} from './breadcrumb.component';
|
||||
import { DocumentList } from '../document-list';
|
||||
|
||||
describe('DocumentListBreadcrumb', () => {
|
||||
|
@@ -21,15 +21,15 @@ import {
|
||||
Output,
|
||||
EventEmitter
|
||||
} from '@angular/core';
|
||||
import { DocumentList } from './document-list';
|
||||
import { DocumentList } from '../document-list';
|
||||
|
||||
declare let __moduleName: string;
|
||||
|
||||
@Component({
|
||||
moduleId: __moduleName,
|
||||
selector: 'alfresco-document-list-breadcrumb',
|
||||
templateUrl: './document-list-breadcrumb.component.html',
|
||||
styleUrls: ['./document-list-breadcrumb.component.css']
|
||||
templateUrl: './breadcrumb.component.html',
|
||||
styleUrls: ['./breadcrumb.component.css']
|
||||
})
|
||||
export class DocumentListBreadcrumb {
|
||||
|
@@ -26,6 +26,7 @@ export class NodePagingList {
|
||||
entries: MinimalNodeEntity[];
|
||||
}
|
||||
|
||||
// TODO: rename to NodeMinimalEntry
|
||||
export class MinimalNodeEntity {
|
||||
entry: MinimalNodeEntryEntity;
|
||||
}
|
||||
@@ -38,6 +39,7 @@ export class Pagination {
|
||||
maxItems: number;
|
||||
}
|
||||
|
||||
// TODO: rename to NodeMinimal
|
||||
export class MinimalNodeEntryEntity {
|
||||
id: string;
|
||||
parentId: string;
|
||||
|
@@ -82,7 +82,6 @@ export class DocumentListService {
|
||||
};
|
||||
return apiInstance.getNodeChildren(nodeId, opts);
|
||||
}
|
||||
|
||||
deleteNode(nodeId: string) {
|
||||
let client = this.getAlfrescoClient();
|
||||
let nodesApi = new AlfrescoApi.Core.NodesApi(client);
|
||||
@@ -95,7 +94,7 @@ export class DocumentListService {
|
||||
* @param folder Path to folder.
|
||||
* @returns {Observable<NodePaging>} Folder entity.
|
||||
*/
|
||||
getFolder(folder: string) {
|
||||
getFolder(folder: string): Observable<NodePaging> {
|
||||
return Observable.fromPromise(this.getNodesPromise(folder))
|
||||
.map(res => <NodePaging> res)
|
||||
// .do(data => console.log('Node data', data)) // eyeball results in the console
|
||||
@@ -107,7 +106,7 @@ export class DocumentListService {
|
||||
* @param node Node to get URL for.
|
||||
* @returns {string} URL address.
|
||||
*/
|
||||
getDocumentThumbnailUrl(node: MinimalNodeEntity) {
|
||||
getDocumentThumbnailUrl(node: MinimalNodeEntity): string {
|
||||
if (node && this.contentService) {
|
||||
return this.contentService.getDocumentThumbnailUrl(node);
|
||||
}
|
||||
|
Reference in New Issue
Block a user