diff --git a/demo-shell-ng2/app/components/files/files.component.ts b/demo-shell-ng2/app/components/files/files.component.ts index 828f9f5181..4d549d15e9 100644 --- a/demo-shell-ng2/app/components/files/files.component.ts +++ b/demo-shell-ng2/app/components/files/files.component.ts @@ -25,10 +25,9 @@ import { MDL, AlfrescoContentService, CONTEXT_MENU_DIRECTIVES, - AlfrescoPipeTranslate/*, - PaginationComponent*/ + AlfrescoPipeTranslate } from 'ng2-alfresco-core'; -import { PaginationComponent } from 'ng2-alfresco-core'; +import { PaginationComponent } from 'ng2-alfresco-datatable'; import { ALFRESCO_ULPOAD_COMPONENTS } from 'ng2-alfresco-upload'; import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer'; diff --git a/ng2-components/ng2-alfresco-core/src/components/index.ts b/ng2-components/ng2-alfresco-core/src/components/index.ts index 7c6259e8a1..ecc9adaed9 100644 --- a/ng2-components/ng2-alfresco-core/src/components/index.ts +++ b/ng2-components/ng2-alfresco-core/src/components/index.ts @@ -17,4 +17,3 @@ export * from './context-menu/index'; export * from './material/index'; -export * from './pagination/index'; diff --git a/ng2-components/ng2-alfresco-datatable/index.ts b/ng2-components/ng2-alfresco-datatable/index.ts index 2c4b5b3e3d..bb3a843a1b 100644 --- a/ng2-components/ng2-alfresco-datatable/index.ts +++ b/ng2-components/ng2-alfresco-datatable/index.ts @@ -15,18 +15,5 @@ * limitations under the License. */ -import { DataTableComponent } from './src/components/datatable.component'; -import { NoContentTemplateComponent } from './src/components/no-content-template.component'; - -// components -export * from './src/components/datatable.component'; -export * from './src/components/no-content-template.component'; - -// data -export * from './src/data/datatable-adapter'; -export * from './src/data/object-datatable-adapter'; - -export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [ - DataTableComponent, - NoContentTemplateComponent -]; +export * from './src/data/index'; +export * from './src/components/index'; diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable.component.css b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.css similarity index 100% rename from ng2-components/ng2-alfresco-datatable/src/components/datatable.component.css rename to ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.css diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable.component.html b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html similarity index 100% rename from ng2-components/ng2-alfresco-datatable/src/components/datatable.component.html rename to ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable.component.spec.ts b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts similarity index 98% rename from ng2-components/ng2-alfresco-datatable/src/components/datatable.component.spec.ts rename to ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts index 19be5990c6..e605788a8f 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/datatable.component.spec.ts +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts @@ -26,12 +26,10 @@ import { DataTableComponent } from './datatable.component'; import { DataRow, DataColumn, - DataSorting -} from './../data/datatable-adapter'; -import { + DataSorting, ObjectDataTableAdapter, ObjectDataColumn -} from './../data/object-datatable-adapter'; +} from './../../data/index'; describe('DataTable', () => { diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable.component.ts b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts similarity index 97% rename from ng2-components/ng2-alfresco-datatable/src/components/datatable.component.ts rename to ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts index 8c6533544c..8c1ac4e0e4 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/datatable.component.ts +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts @@ -36,9 +36,9 @@ import { DataRow, DataColumn, DataSorting, - DataRowEvent -} from './../data/datatable-adapter'; -import { ObjectDataTableAdapter } from '../data/object-datatable-adapter'; + DataRowEvent, + ObjectDataTableAdapter +} from '../../data/index'; declare var componentHandler; declare let __moduleName: string; diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable/index.ts b/ng2-components/ng2-alfresco-datatable/src/components/datatable/index.ts new file mode 100644 index 0000000000..2bb8515e6d --- /dev/null +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/index.ts @@ -0,0 +1,27 @@ +/*! + * @license + * Copyright 2016 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 { DataTableComponent } from './datatable.component'; +import { NoContentTemplateComponent } from './no-content-template.component'; + +export * from './datatable.component'; +export * from './no-content-template.component'; + +export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [ + DataTableComponent, + NoContentTemplateComponent +]; diff --git a/ng2-components/ng2-alfresco-datatable/src/components/no-content-template.component.ts b/ng2-components/ng2-alfresco-datatable/src/components/datatable/no-content-template.component.ts similarity index 100% rename from ng2-components/ng2-alfresco-datatable/src/components/no-content-template.component.ts rename to ng2-components/ng2-alfresco-datatable/src/components/datatable/no-content-template.component.ts diff --git a/ng2-components/ng2-alfresco-datatable/src/components/index.ts b/ng2-components/ng2-alfresco-datatable/src/components/index.ts new file mode 100644 index 0000000000..6139cb70a5 --- /dev/null +++ b/ng2-components/ng2-alfresco-datatable/src/components/index.ts @@ -0,0 +1,19 @@ +/*! + * @license + * Copyright 2016 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. + */ + +export * from './datatable/index'; +export * from './pagination/index'; diff --git a/ng2-components/ng2-alfresco-core/src/components/pagination/index.ts b/ng2-components/ng2-alfresco-datatable/src/components/pagination/index.ts similarity index 100% rename from ng2-components/ng2-alfresco-core/src/components/pagination/index.ts rename to ng2-components/ng2-alfresco-datatable/src/components/pagination/index.ts diff --git a/ng2-components/ng2-alfresco-core/src/components/pagination/pagination-provider.ts b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination-provider.ts similarity index 100% rename from ng2-components/ng2-alfresco-core/src/components/pagination/pagination-provider.ts rename to ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination-provider.ts diff --git a/ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.css b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.css similarity index 100% rename from ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.css rename to ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.css diff --git a/ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.html b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.html similarity index 100% rename from ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.html rename to ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.html diff --git a/ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.ts b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.ts similarity index 97% rename from ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.ts rename to ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.ts index 01a5c2bb08..f4e9cc85d6 100644 --- a/ng2-components/ng2-alfresco-core/src/components/pagination/pagination.component.ts +++ b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.ts @@ -17,7 +17,7 @@ import { Component, Input } from '@angular/core'; -import { MATERIAL_DESIGN_DIRECTIVES } from './../material/index'; +import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core'; import { PaginationProvider } from './pagination-provider'; declare let __moduleName: string; diff --git a/ng2-components/ng2-alfresco-datatable/src/data/index.ts b/ng2-components/ng2-alfresco-datatable/src/data/index.ts new file mode 100644 index 0000000000..47d38e2aa2 --- /dev/null +++ b/ng2-components/ng2-alfresco-datatable/src/data/index.ts @@ -0,0 +1,19 @@ +/*! + * @license + * Copyright 2016 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. + */ + +export * from './datatable-adapter'; +export * from './object-datatable-adapter';