mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Upgrade ng2-alfresco-upload
This commit is contained in:
@@ -64,7 +64,6 @@
|
||||
</div>
|
||||
<main class="mdl-layout__content">
|
||||
<div class="page-content">
|
||||
<alfresco-login></alfresco-login>
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</main>
|
||||
|
@@ -26,23 +26,14 @@ import { SearchModule } from 'ng2-alfresco-search';
|
||||
import { LoginModule } from 'ng2-alfresco-login';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { DocumentListModule } from 'ng2-alfresco-documentlist';
|
||||
import { UploadModule } from 'ng2-alfresco-upload'
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { routing } from './app.routes';
|
||||
|
||||
/*
|
||||
import {
|
||||
MDL,
|
||||
ALFRESCO_CORE_PROVIDERS,
|
||||
CONTEXT_MENU_DIRECTIVES,
|
||||
CONTEXT_MENU_PROVIDERS,
|
||||
MATERIAL_DESIGN_DIRECTIVES
|
||||
} from 'ng2-alfresco-core';
|
||||
*/
|
||||
import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
|
||||
import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist';
|
||||
import { ActivitiForm, ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
|
||||
import { ALFRESCO_ULPOAD_COMPONENTS, ALFRESCO_ULPOAD_DIRECTIVES, ALFRESCO_ULPOAD_SERVICES } from 'ng2-alfresco-upload';
|
||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
|
||||
import { TAGCOMPONENT, TAGSERVICES } from 'ng2-alfresco-tag';
|
||||
import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
|
||||
@@ -51,7 +42,6 @@ import { AlfrescoTranslationLoader } from 'ng2-alfresco-core';
|
||||
import { Http } from '@angular/http';
|
||||
|
||||
import {
|
||||
UploadButtonComponent,
|
||||
DataTableDemoComponent,
|
||||
SearchComponent,
|
||||
SearchBarComponent,
|
||||
@@ -121,24 +111,19 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
||||
LoginModule,
|
||||
SearchModule.forRoot(),
|
||||
DataTableModule,
|
||||
DocumentListModule.forRoot()
|
||||
DocumentListModule.forRoot(),
|
||||
UploadModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
SearchBarComponent,
|
||||
// MDL,
|
||||
...ALFRESCO_TASKLIST_DIRECTIVES,
|
||||
...ACTIVITI_PROCESSLIST_DIRECTIVES,
|
||||
...ACTIVITI_FORM_DIRECTIVES,
|
||||
// ...CONTEXT_MENU_DIRECTIVES,
|
||||
...ALFRESCO_ULPOAD_COMPONENTS,
|
||||
...VIEWERCOMPONENT,
|
||||
...TAGCOMPONENT,
|
||||
...WEBSCRIPTCOMPONENT,
|
||||
...ALFRESCO_ULPOAD_COMPONENTS, ...ALFRESCO_ULPOAD_DIRECTIVES,
|
||||
// ...MATERIAL_DESIGN_DIRECTIVES,
|
||||
|
||||
UploadButtonComponent,
|
||||
DataTableDemoComponent,
|
||||
SearchComponent,
|
||||
SearchBarComponent,
|
||||
@@ -152,11 +137,8 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
||||
FormNodeViewer
|
||||
],
|
||||
providers: [
|
||||
// ...ALFRESCO_CORE_PROVIDERS,
|
||||
...ATIVITI_FORM_PROVIDERS,
|
||||
...TAGSERVICES,
|
||||
...ALFRESCO_ULPOAD_SERVICES// ,
|
||||
// ...CONTEXT_MENU_PROVIDERS
|
||||
...TAGSERVICES
|
||||
],
|
||||
bootstrap: [ AppComponent ]
|
||||
})
|
||||
|
@@ -20,7 +20,6 @@ import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import {
|
||||
FilesComponent,
|
||||
UploadButtonComponent,
|
||||
DataTableDemoComponent,
|
||||
SearchComponent,
|
||||
LoginDemoComponent,
|
||||
@@ -32,6 +31,8 @@ import {
|
||||
FormNodeViewer
|
||||
} from './components/index';
|
||||
|
||||
import { UploadButtonComponent } from 'ng2-alfresco-upload';
|
||||
|
||||
export const appRoutes: Routes = [
|
||||
{ path: 'home', component: FilesComponent },
|
||||
{ path: 'files', component: FilesComponent },
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { UploadButtonComponent } from 'ng2-alfresco-upload';
|
||||
export { DataTableDemoComponent } from './datatable/datatable-demo.component';
|
||||
export { SearchComponent } from './search/search.component';
|
||||
export { SearchBarComponent } from './search/search-bar.component';
|
||||
|
@@ -22,9 +22,6 @@ import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
|
||||
// import { ALFRESCO_CORE_PROVIDERS/*, CONTEXT_MENU_DIRECTIVES*/ } from 'ng2-alfresco-core';
|
||||
// import { ALFRESCO_DATATABLE_DIRECTIVES } from 'ng2-alfresco-datatable';
|
||||
|
||||
import { DocumentList } from './src/components/document-list';
|
||||
import { ContentColumn } from './src/components/content-column';
|
||||
import { ContentColumnList } from './src/components/content-column-list';
|
||||
@@ -58,7 +55,7 @@ export * from './src/services/document-list.service';
|
||||
export * from './src/models/content-action.model';
|
||||
export * from './src/models/document-library.model';
|
||||
|
||||
export const DOCUMENT_LIST_DIRECTIVES: [any] = [
|
||||
export const DOCUMENT_LIST_DIRECTIVES: any[] = [
|
||||
DocumentList,
|
||||
ContentColumn,
|
||||
ContentColumnList,
|
||||
@@ -68,7 +65,7 @@ export const DOCUMENT_LIST_DIRECTIVES: [any] = [
|
||||
DocumentListBreadcrumb
|
||||
];
|
||||
|
||||
export const DOCUMENT_LIST_PROVIDERS: [any] = [
|
||||
export const DOCUMENT_LIST_PROVIDERS: any[] = [
|
||||
DocumentListService,
|
||||
FolderActionsService,
|
||||
DocumentActionsService
|
||||
@@ -86,7 +83,6 @@ export const DOCUMENT_LIST_PROVIDERS: [any] = [
|
||||
...DOCUMENT_LIST_DIRECTIVES
|
||||
],
|
||||
providers: [
|
||||
// ...ALFRESCO_CORE_PROVIDERS,
|
||||
...DOCUMENT_LIST_PROVIDERS
|
||||
],
|
||||
exports: [
|
||||
|
@@ -20,14 +20,13 @@ import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
|
||||
import { ALFRESCO_CORE_PROVIDERS } from 'ng2-alfresco-core';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { AlfrescoLoginComponent } from './src/components/alfresco-login.component';
|
||||
|
||||
export * from './src/components/alfresco-login.component';
|
||||
|
||||
export const ALFRESCO_LOGIN_DIRECTIVES: [any] = [AlfrescoLoginComponent];
|
||||
export const ALFRESCO_LOGIN_DIRECTIVES: any[] = [AlfrescoLoginComponent];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -35,14 +34,13 @@ export const ALFRESCO_LOGIN_DIRECTIVES: [any] = [AlfrescoLoginComponent];
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
TranslateModule
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
...ALFRESCO_LOGIN_DIRECTIVES
|
||||
],
|
||||
providers: [
|
||||
...ALFRESCO_CORE_PROVIDERS
|
||||
],
|
||||
providers: [],
|
||||
exports: [
|
||||
...ALFRESCO_LOGIN_DIRECTIVES
|
||||
]
|
||||
|
@@ -15,6 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
|
||||
import { UploadDragAreaComponent } from './src/components/upload-drag-area.component';
|
||||
import { FileDraggableDirective } from './src/directives/file-draggable.directive';
|
||||
import { UploadButtonComponent } from './src/components/upload-button.component';
|
||||
@@ -45,17 +51,42 @@ export * from './src/services/upload.service';
|
||||
export * from './src/directives/file-draggable.directive';
|
||||
export * from './src/components/file-uploading-list.component';
|
||||
|
||||
export const ALFRESCO_ULPOAD_COMPONENTS: [any] = [
|
||||
export const UPLOAD_DIRECTIVES: any[] = [
|
||||
FileDraggableDirective,
|
||||
UploadDragAreaComponent,
|
||||
UploadButtonComponent,
|
||||
FileUploadingDialogComponent,
|
||||
FileUploadingListComponent
|
||||
];
|
||||
|
||||
export const ALFRESCO_ULPOAD_DIRECTIVES: [any] = [
|
||||
FileDraggableDirective
|
||||
];
|
||||
|
||||
export const ALFRESCO_ULPOAD_SERVICES: [any] = [
|
||||
export const UPLOAD_PROVIDERS: any[] = [
|
||||
UploadService
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpModule,
|
||||
TranslateModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
...UPLOAD_DIRECTIVES
|
||||
],
|
||||
providers: [
|
||||
...UPLOAD_PROVIDERS
|
||||
],
|
||||
exports: [
|
||||
...UPLOAD_DIRECTIVES
|
||||
]
|
||||
})
|
||||
export class UploadModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: UploadModule,
|
||||
providers: [
|
||||
...UPLOAD_PROVIDERS
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -53,29 +53,25 @@
|
||||
"alfresco"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/common": "2.0.0-rc.3",
|
||||
"@angular/compiler": "2.0.0-rc.3",
|
||||
"@angular/core": "2.0.0-rc.3",
|
||||
"@angular/forms": "0.1.1",
|
||||
"@angular/http": "2.0.0-rc.3",
|
||||
"@angular/platform-browser": "2.0.0-rc.3",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
||||
"@angular/router": "3.0.0-alpha.7",
|
||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
||||
"@angular/upgrade": "2.0.0-rc.3",
|
||||
"@angular/common": "2.0.0",
|
||||
"@angular/compiler": "2.0.0",
|
||||
"@angular/core": "2.0.0",
|
||||
"@angular/forms": "2.0.0",
|
||||
"@angular/http": "2.0.0",
|
||||
"@angular/platform-browser": "2.0.0",
|
||||
"@angular/platform-browser-dynamic": "2.0.0",
|
||||
"@angular/router": "3.0.0",
|
||||
"@angular/upgrade": "2.0.0",
|
||||
"core-js": "^2.4.1",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"systemjs": "0.19.27",
|
||||
"core-js": "2.4.0",
|
||||
"reflect-metadata": "0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"zone.js": "0.6.12",
|
||||
"ng2-translate": "2.2.2",
|
||||
"zone.js": "^0.6.23",
|
||||
|
||||
"ng2-translate": "2.5.0",
|
||||
"alfresco-js-api": "^0.3.0",
|
||||
"ng2-alfresco-core": "0.3.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"material-design-icons": "^2.2.3",
|
||||
"material-design-lite": "^1.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/core-js": "^0.9.32",
|
||||
"@types/jasmine": "^2.2.33",
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
import { PLATFORM_PIPES } from '@angular/core';
|
||||
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
@@ -163,3 +164,4 @@ describe('FileUploadDialog', () => {
|
||||
expect(compiled.querySelector('.minimize-button').getAttribute('class')).toEqual('minimize-button active');
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { Component, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
|
||||
import { FileModel } from '../models/file.model';
|
||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { UploadService } from '../services/upload.service';
|
||||
|
||||
@@ -37,7 +36,6 @@ declare let __moduleName: string;
|
||||
@Component({
|
||||
selector: 'file-uploading-dialog',
|
||||
moduleId: __moduleName,
|
||||
directives: [FileUploadingListComponent],
|
||||
templateUrl: './file-uploading-dialog.component.html',
|
||||
styleUrls: ['./file-uploading-dialog.component.css'],
|
||||
host: {'[class.dialog-show]': 'toggleShowDialog'}
|
||||
|
@@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
import { PLATFORM_PIPES } from '@angular/core';
|
||||
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||
import { beforeEachProviders } from '@angular/core/testing';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
|
||||
@@ -163,3 +164,4 @@ describe('AlfrescoUploadButton', () => {
|
||||
component.onDirectoryAdded(fakeEvent);
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
import { PLATFORM_PIPES } from '@angular/core';
|
||||
import { describe, expect, it, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
@@ -223,3 +224,4 @@ describe('AlfrescoUploadDragArea', () => {
|
||||
component.onFolderEntityDropped(folderEntry);
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { UploadService } from '../services/upload.service';
|
||||
import { FileDraggableDirective } from '../directives/file-draggable.directive';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { FileModel } from '../models/file.model';
|
||||
|
||||
@@ -38,7 +37,6 @@ const ERROR_FOLDER_ALREADY_EXIST = 409;
|
||||
@Component({
|
||||
selector: 'alfresco-upload-drag-area',
|
||||
moduleId: __moduleName,
|
||||
directives: [FileDraggableDirective],
|
||||
templateUrl: './upload-drag-area.component.html',
|
||||
styleUrls: ['./upload-drag-area.component.css']
|
||||
})
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { describe, expect, beforeEach, it } from '@angular/core/testing';
|
||||
import { FileDraggableDirective } from '../directives/file-draggable.directive';
|
||||
|
||||
describe('AlfrescoDirectiveFileDraggable', () => {
|
||||
|
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { UploadService } from './upload.service';
|
||||
@@ -234,3 +235,4 @@ describe('AlfrescoUploadService', () => {
|
||||
expect(jasmine.Ajax.requests.mostRecent().params.has('majorVersion')).toBe(true);
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
Reference in New Issue
Block a user