mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Merge pull request #808 from Alfresco/dev-denys-749
Upgrade to Angular 2.0.0 and TypeScript 2.0.3
This commit is contained in:
+13
-4
@@ -1,10 +1,19 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[{src,scripts}/**.{ts,json,js}]
|
[*]
|
||||||
end_of_line = crlf
|
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|||||||
@@ -64,7 +64,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<main class="mdl-layout__content">
|
<main class="mdl-layout__content">
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<alfresco-login method="{{methodName}}"></alfresco-login>
|
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -16,24 +16,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { ROUTER_DIRECTIVES, Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
MDL,
|
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
AlfrescoAuthenticationService
|
AlfrescoAuthenticationService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { SearchBarComponent } from './components/index';
|
|
||||||
|
|
||||||
declare var document: any;
|
declare var document: any;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-app',
|
selector: 'alfresco-app',
|
||||||
templateUrl: 'app/app.component.html',
|
templateUrl: 'app/app.component.html',
|
||||||
styleUrls: ['app/app.component.css'],
|
styleUrls: ['app/app.component.css']
|
||||||
directives: [SearchBarComponent, ROUTER_DIRECTIVES, MDL]
|
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
translate: AlfrescoTranslationService;
|
translate: AlfrescoTranslationService;
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/*!
|
||||||
|
* @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 { NgModule } from '@angular/core';
|
||||||
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
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 { TagModule } from 'ng2-alfresco-tag';
|
||||||
|
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
||||||
|
import { ViewerModule } from 'ng2-alfresco-viewer';
|
||||||
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
|
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
|
||||||
|
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
|
||||||
|
|
||||||
|
import { AppComponent } from './app.component';
|
||||||
|
import { routing } from './app.routes';
|
||||||
|
|
||||||
|
import {
|
||||||
|
DataTableDemoComponent,
|
||||||
|
SearchComponent,
|
||||||
|
SearchBarComponent,
|
||||||
|
LoginDemoComponent,
|
||||||
|
ActivitiDemoComponent,
|
||||||
|
FormViewer,
|
||||||
|
WebscriptComponent,
|
||||||
|
TagComponent,
|
||||||
|
AboutComponent,
|
||||||
|
FilesComponent,
|
||||||
|
FormNodeViewer
|
||||||
|
} from './components/index';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
BrowserModule,
|
||||||
|
routing,
|
||||||
|
CoreModule.forRoot(),
|
||||||
|
LoginModule,
|
||||||
|
SearchModule.forRoot(),
|
||||||
|
DataTableModule,
|
||||||
|
DocumentListModule.forRoot(),
|
||||||
|
UploadModule.forRoot(),
|
||||||
|
TagModule.forRoot(),
|
||||||
|
WebScriptModule,
|
||||||
|
ViewerModule.forRoot(),
|
||||||
|
ActivitiFormModule.forRoot(),
|
||||||
|
ActivitiTaskListModule.forRoot(),
|
||||||
|
ActivitiProcessListModule.forRoot()
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
AppComponent,
|
||||||
|
SearchBarComponent,
|
||||||
|
DataTableDemoComponent,
|
||||||
|
SearchComponent,
|
||||||
|
SearchBarComponent,
|
||||||
|
LoginDemoComponent,
|
||||||
|
ActivitiDemoComponent,
|
||||||
|
FormViewer,
|
||||||
|
WebscriptComponent,
|
||||||
|
TagComponent,
|
||||||
|
AboutComponent,
|
||||||
|
FilesComponent,
|
||||||
|
FormNodeViewer
|
||||||
|
],
|
||||||
|
providers: [],
|
||||||
|
bootstrap: [ AppComponent ]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
||||||
|
|
||||||
@@ -15,11 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { provideRouter, RouterConfig } from '@angular/router';
|
import { ModuleWithProviders } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
FilesComponent,
|
FilesComponent,
|
||||||
UploadButtonComponent,
|
|
||||||
DataTableDemoComponent,
|
DataTableDemoComponent,
|
||||||
SearchComponent,
|
SearchComponent,
|
||||||
LoginDemoComponent,
|
LoginDemoComponent,
|
||||||
@@ -27,11 +27,13 @@ import {
|
|||||||
WebscriptComponent,
|
WebscriptComponent,
|
||||||
TagComponent,
|
TagComponent,
|
||||||
AboutComponent,
|
AboutComponent,
|
||||||
FormViewer
|
FormViewer,
|
||||||
|
FormNodeViewer
|
||||||
} from './components/index';
|
} from './components/index';
|
||||||
import { FormNodeViewer } from './components/activiti/form-node-viewer.component';
|
|
||||||
|
|
||||||
export const routes: RouterConfig = [
|
import { UploadButtonComponent } from 'ng2-alfresco-upload';
|
||||||
|
|
||||||
|
export const appRoutes: Routes = [
|
||||||
{ path: 'home', component: FilesComponent },
|
{ path: 'home', component: FilesComponent },
|
||||||
{ path: 'files', component: FilesComponent },
|
{ path: 'files', component: FilesComponent },
|
||||||
{ path: 'datatable', component: DataTableDemoComponent },
|
{ path: 'datatable', component: DataTableDemoComponent },
|
||||||
@@ -48,6 +50,4 @@ export const routes: RouterConfig = [
|
|||||||
{ path: 'about', component: AboutComponent }
|
{ path: 'about', component: AboutComponent }
|
||||||
];
|
];
|
||||||
|
|
||||||
export const appRouterProviders = [
|
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
|
||||||
provideRouter(routes)
|
|
||||||
];
|
|
||||||
|
|||||||
@@ -17,21 +17,14 @@
|
|||||||
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Http } from '@angular/http';
|
import { Http } from '@angular/http';
|
||||||
import {
|
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
|
||||||
ObjectDataTableAdapter /*,
|
|
||||||
DataSorting,
|
|
||||||
ObjectDataRow,
|
|
||||||
ObjectDataColumn*/
|
|
||||||
} from 'ng2-alfresco-datatable';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'about-page',
|
selector: 'about-page',
|
||||||
templateUrl: './about.component.html',
|
templateUrl: './about.component.html'
|
||||||
directives: [ALFRESCO_DATATABLE_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class AboutComponent implements OnInit {
|
export class AboutComponent implements OnInit {
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, AfterViewChecked, ViewChild, Input } from '@angular/core';
|
import { Component, AfterViewChecked, ViewChild, Input } from '@angular/core';
|
||||||
import { ALFRESCO_TASKLIST_DIRECTIVES,
|
import {
|
||||||
AppDefinitionRepresentationModel,
|
AppDefinitionRepresentationModel,
|
||||||
FilterRepresentationModel,
|
FilterRepresentationModel,
|
||||||
UserTaskFilterRepresentationModel,
|
UserTaskFilterRepresentationModel,
|
||||||
ActivitiApps,
|
ActivitiApps,
|
||||||
ActivitiTaskList
|
ActivitiTaskList
|
||||||
} from 'ng2-activiti-tasklist';
|
} from 'ng2-activiti-tasklist';
|
||||||
import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist';
|
|
||||||
import { ActivitiForm } from 'ng2-activiti-form';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { Subscription } from 'rxjs/Rx';
|
import { Subscription } from 'rxjs/Rx';
|
||||||
import {
|
import {
|
||||||
@@ -39,8 +37,7 @@ declare var componentHandler;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'activiti-demo',
|
selector: 'activiti-demo',
|
||||||
templateUrl: './activiti-demo.component.html',
|
templateUrl: './activiti-demo.component.html',
|
||||||
styleUrls: ['./activiti-demo.component.css'],
|
styleUrls: ['./activiti-demo.component.css']
|
||||||
directives: [ALFRESCO_TASKLIST_DIRECTIVES, ACTIVITI_PROCESSLIST_DIRECTIVES, ActivitiForm]
|
|
||||||
})
|
})
|
||||||
export class ActivitiDemoComponent implements AfterViewChecked {
|
export class ActivitiDemoComponent implements AfterViewChecked {
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
|
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ActivitiForm, FormService, EcmModelService, NodeService } from 'ng2-activiti-form';
|
|
||||||
import { Subscription } from 'rxjs/Rx';
|
import { Subscription } from 'rxjs/Rx';
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -27,9 +26,7 @@ declare var componentHandler;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'form-node-viewer',
|
selector: 'form-node-viewer',
|
||||||
templateUrl: './form-node-viewer.component.html',
|
templateUrl: './form-node-viewer.component.html',
|
||||||
styleUrls: ['./form-node-viewer.component.css'],
|
styleUrls: ['./form-node-viewer.component.css']
|
||||||
directives: [ActivitiForm],
|
|
||||||
providers: [FormService, EcmModelService, NodeService]
|
|
||||||
})
|
})
|
||||||
export class FormNodeViewer implements OnInit, OnDestroy, AfterViewChecked {
|
export class FormNodeViewer implements OnInit, OnDestroy, AfterViewChecked {
|
||||||
|
|
||||||
@@ -37,9 +34,7 @@ export class FormNodeViewer implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
|
|
||||||
private sub: Subscription;
|
private sub: Subscription;
|
||||||
|
|
||||||
constructor(private formService: FormService,
|
constructor(private route: ActivatedRoute) {
|
||||||
private route: ActivatedRoute,
|
|
||||||
private router: Router) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
|
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ActivitiForm, FormService, EcmModelService, NodeService } from 'ng2-activiti-form';
|
|
||||||
import { Subscription } from 'rxjs/Rx';
|
import { Subscription } from 'rxjs/Rx';
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -27,9 +26,7 @@ declare var componentHandler;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'form-viewer',
|
selector: 'form-viewer',
|
||||||
templateUrl: './form-viewer.component.html',
|
templateUrl: './form-viewer.component.html',
|
||||||
styleUrls: ['./form-viewer.component.css'],
|
styleUrls: ['./form-viewer.component.css']
|
||||||
directives: [ActivitiForm],
|
|
||||||
providers: [FormService, EcmModelService, NodeService]
|
|
||||||
})
|
})
|
||||||
export class FormViewer implements OnInit, OnDestroy, AfterViewChecked {
|
export class FormViewer implements OnInit, OnDestroy, AfterViewChecked {
|
||||||
|
|
||||||
@@ -37,9 +34,7 @@ export class FormViewer implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
|
|
||||||
private sub: Subscription;
|
private sub: Subscription;
|
||||||
|
|
||||||
constructor(private formService: FormService,
|
constructor(private route: ActivatedRoute) {
|
||||||
private route: ActivatedRoute,
|
|
||||||
private router: Router) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
|
||||||
ObjectDataTableAdapter,
|
ObjectDataTableAdapter,
|
||||||
DataSorting,
|
DataSorting,
|
||||||
ObjectDataRow,
|
ObjectDataRow,
|
||||||
@@ -29,8 +28,7 @@ declare let __moduleName: string;
|
|||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'datatable-demo',
|
selector: 'datatable-demo',
|
||||||
templateUrl: './datatable-demo.component.html',
|
templateUrl: './datatable-demo.component.html'
|
||||||
directives: [ALFRESCO_DATATABLE_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class DataTableDemoComponent {
|
export class DataTableDemoComponent {
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<div *ngIf="!fileShowed">
|
<div *ngIf="!fileShowed">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<alfresco-upload-drag-area
|
<alfresco-upload-drag-area
|
||||||
[showUploadDialog]="true"
|
|
||||||
[currentFolderPath]="currentPath"
|
[currentFolderPath]="currentPath"
|
||||||
[uploaddirectory]=""
|
|
||||||
[versioning] = "versioning"
|
[versioning] = "versioning"
|
||||||
(onSuccess)="documentList.reload()">
|
(onSuccess)="documentList.reload()">
|
||||||
<alfresco-document-list-breadcrumb
|
<alfresco-document-list-breadcrumb
|
||||||
@@ -166,7 +164,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="!acceptedFilesTypeShow">
|
<div *ngIf="!acceptedFilesTypeShow">
|
||||||
<alfresco-upload-button data-automation-id="multiple-file-upload"
|
<alfresco-upload-button data-automation-id="multiple-file-upload"
|
||||||
[uploaddirectory]="currentPath"
|
|
||||||
[currentFolderPath]="currentPath"
|
[currentFolderPath]="currentPath"
|
||||||
[multipleFiles]="multipleFileUpload"
|
[multipleFiles]="multipleFileUpload"
|
||||||
[uploadFolders]="folderUpload"
|
[uploadFolders]="folderUpload"
|
||||||
@@ -177,7 +174,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="acceptedFilesTypeShow">
|
<div *ngIf="acceptedFilesTypeShow">
|
||||||
<alfresco-upload-button data-automation-id="multiple-file-upload"
|
<alfresco-upload-button data-automation-id="multiple-file-upload"
|
||||||
[uploaddirectory]="currentPath"
|
|
||||||
[currentFolderPath]="currentPath"
|
[currentFolderPath]="currentPath"
|
||||||
acceptedFilesType="{{acceptedFilesType}}"
|
acceptedFilesType="{{acceptedFilesType}}"
|
||||||
[multipleFiles]="multipleFileUpload"
|
[multipleFiles]="multipleFileUpload"
|
||||||
|
|||||||
@@ -18,22 +18,12 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import {
|
import {
|
||||||
DOCUMENT_LIST_DIRECTIVES,
|
|
||||||
DOCUMENT_LIST_PROVIDERS,
|
|
||||||
DocumentActionsService,
|
DocumentActionsService,
|
||||||
DocumentList,
|
DocumentList,
|
||||||
ContentActionHandler,
|
ContentActionHandler,
|
||||||
DocumentActionModel,
|
DocumentActionModel,
|
||||||
FolderActionModel
|
FolderActionModel
|
||||||
} from 'ng2-alfresco-documentlist';
|
} from 'ng2-alfresco-documentlist';
|
||||||
import {
|
|
||||||
MDL,
|
|
||||||
AlfrescoContentService,
|
|
||||||
CONTEXT_MENU_DIRECTIVES
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
import { PaginationComponent } from 'ng2-alfresco-datatable';
|
|
||||||
import { ALFRESCO_ULPOAD_COMPONENTS } from 'ng2-alfresco-upload';
|
|
||||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
|
|
||||||
import { FormService } from 'ng2-activiti-form';
|
import { FormService } from 'ng2-activiti-form';
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -42,16 +32,7 @@ declare let __moduleName: string;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'files-component',
|
selector: 'files-component',
|
||||||
templateUrl: './files.component.html',
|
templateUrl: './files.component.html',
|
||||||
styleUrls: ['./files.component.css'],
|
styleUrls: ['./files.component.css']
|
||||||
directives: [
|
|
||||||
DOCUMENT_LIST_DIRECTIVES,
|
|
||||||
MDL,
|
|
||||||
ALFRESCO_ULPOAD_COMPONENTS,
|
|
||||||
VIEWERCOMPONENT,
|
|
||||||
CONTEXT_MENU_DIRECTIVES,
|
|
||||||
PaginationComponent
|
|
||||||
],
|
|
||||||
providers: [DOCUMENT_LIST_PROVIDERS, FormService]
|
|
||||||
})
|
})
|
||||||
export class FilesComponent implements OnInit {
|
export class FilesComponent implements OnInit {
|
||||||
currentPath: string = '/Sites/swsdp/documentLibrary';
|
currentPath: string = '/Sites/swsdp/documentLibrary';
|
||||||
@@ -68,8 +49,7 @@ export class FilesComponent implements OnInit {
|
|||||||
@ViewChild(DocumentList)
|
@ViewChild(DocumentList)
|
||||||
documentList: DocumentList;
|
documentList: DocumentList;
|
||||||
|
|
||||||
constructor(private contentService: AlfrescoContentService,
|
constructor(private documentActions: DocumentActionsService,
|
||||||
private documentActions: DocumentActionsService,
|
|
||||||
private formService: FormService,
|
private formService: FormService,
|
||||||
private router: Router) {
|
private router: Router) {
|
||||||
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { UploadButtonComponent } from 'ng2-alfresco-upload';
|
|
||||||
export { DataTableDemoComponent } from './datatable/datatable-demo.component';
|
export { DataTableDemoComponent } from './datatable/datatable-demo.component';
|
||||||
export { SearchComponent } from './search/search.component';
|
export { SearchComponent } from './search/search.component';
|
||||||
export { SearchBarComponent } from './search/search-bar.component';
|
export { SearchBarComponent } from './search/search-bar.component';
|
||||||
@@ -26,3 +25,4 @@ export { WebscriptComponent } from './webscript/webscript.component';
|
|||||||
export { TagComponent } from './tag/tag.component';
|
export { TagComponent } from './tag/tag.component';
|
||||||
export { AboutComponent } from './about/about.component';
|
export { AboutComponent } from './about/about.component';
|
||||||
export { FilesComponent } from './files/files.component';
|
export { FilesComponent } from './files/files.component';
|
||||||
|
export { FormNodeViewer } from './activiti/form-node-viewer.component';
|
||||||
|
|||||||
@@ -15,10 +15,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component, ViewChild, OnInit} from '@angular/core';
|
import { Component, ViewChild, OnInit } from '@angular/core';
|
||||||
import {AlfrescoLoginComponent} from 'ng2-alfresco-login';
|
import { Router } from '@angular/router';
|
||||||
import {ROUTER_DIRECTIVES, Router} from '@angular/router';
|
import { Validators } from '@angular/forms';
|
||||||
import {Validators} from '@angular/common';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
|
|
||||||
@@ -26,9 +25,7 @@ declare let __moduleName: string;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'login-demo',
|
selector: 'login-demo',
|
||||||
templateUrl: './login-demo.component.html',
|
templateUrl: './login-demo.component.html',
|
||||||
styleUrls: ['./login-demo.component.css'],
|
styleUrls: ['./login-demo.component.css']
|
||||||
directives: [ROUTER_DIRECTIVES, AlfrescoLoginComponent],
|
|
||||||
pipes: []
|
|
||||||
})
|
})
|
||||||
export class LoginDemoComponent implements OnInit {
|
export class LoginDemoComponent implements OnInit {
|
||||||
|
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @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 { ElementRef, DynamicComponentLoader, Directive, Attribute } from '@angular/core';
|
|
||||||
import { Router, RouterOutlet, ComponentInstruction } from '@angular/router-deprecated';
|
|
||||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
|
||||||
|
|
||||||
@Directive({selector: 'auth-router-outlet'})
|
|
||||||
export class AuthRouterOutlet extends RouterOutlet {
|
|
||||||
|
|
||||||
publicRoutes: Array<string>;
|
|
||||||
private router: Router;
|
|
||||||
|
|
||||||
constructor(_elementRef: ElementRef, _loader: DynamicComponentLoader,
|
|
||||||
_parentRouter: Router, @Attribute('name') nameAttr: string,
|
|
||||||
private authentication: AlfrescoAuthenticationService) {
|
|
||||||
super(_elementRef, _loader, _parentRouter, nameAttr);
|
|
||||||
|
|
||||||
this.router = _parentRouter;
|
|
||||||
this.publicRoutes = [
|
|
||||||
'', 'login', 'signup'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
activate(instruction: ComponentInstruction) {
|
|
||||||
if (this._canActivate(instruction.urlPath)) {
|
|
||||||
return super.activate(instruction);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.router.navigate(['Login']);
|
|
||||||
}
|
|
||||||
|
|
||||||
_canActivate(url) {
|
|
||||||
return this.publicRoutes.indexOf(url) !== -1
|
|
||||||
|| this.authentication.isLoggedIn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@@ -16,8 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Output } from '@angular/core';
|
import { Component, EventEmitter, Output } from '@angular/core';
|
||||||
import { ALFRESCO_SEARCH_DIRECTIVES } from 'ng2-alfresco-search';
|
|
||||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
|
|
||||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -25,8 +23,7 @@ declare let __moduleName: string;
|
|||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'search-bar',
|
selector: 'search-bar',
|
||||||
templateUrl: './search-bar.component.html',
|
templateUrl: './search-bar.component.html'
|
||||||
directives: [ALFRESCO_SEARCH_DIRECTIVES, VIEWERCOMPONENT]
|
|
||||||
})
|
})
|
||||||
export class SearchBarComponent {
|
export class SearchBarComponent {
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
|
||||||
import { ALFRESCO_SEARCH_DIRECTIVES } from 'ng2-alfresco-search';
|
|
||||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
|
|
||||||
@@ -47,17 +44,13 @@ declare let __moduleName: string;
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`],
|
`]
|
||||||
directives: [ ALFRESCO_SEARCH_DIRECTIVES, VIEWERCOMPONENT ]
|
|
||||||
})
|
})
|
||||||
export class SearchComponent {
|
export class SearchComponent {
|
||||||
|
|
||||||
fileShowed: boolean = false;
|
fileShowed: boolean = false;
|
||||||
fileNodeId: string;
|
fileNodeId: string;
|
||||||
|
|
||||||
constructor(public contentService: AlfrescoContentService) {
|
|
||||||
}
|
|
||||||
|
|
||||||
onFileClicked(event) {
|
onFileClicked(event) {
|
||||||
if (event.value.entry.isFile) {
|
if (event.value.entry.isFile) {
|
||||||
this.fileNodeId = event.value.entry.id;
|
this.fileNodeId = event.value.entry.id;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { TAGCOMPONENT, TAGSERVICES } from 'ng2-alfresco-tag';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-tag-demo',
|
selector: 'alfresco-tag-demo',
|
||||||
@@ -31,9 +30,7 @@ import { TAGCOMPONENT, TAGSERVICES } from 'ng2-alfresco-tag';
|
|||||||
<alfresco-tag-node-list [nodeId]="nodeId"></alfresco-tag-node-list>
|
<alfresco-tag-node-list [nodeId]="nodeId"></alfresco-tag-node-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`
|
||||||
directives: [TAGCOMPONENT],
|
|
||||||
providers: [TAGSERVICES]
|
|
||||||
})
|
})
|
||||||
export class TagComponent {
|
export class TagComponent {
|
||||||
|
|
||||||
|
|||||||
@@ -16,11 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
|
||||||
CONTEXT_MENU_DIRECTIVES
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
|
|
||||||
import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-webscript-demo',
|
selector: 'alfresco-webscript-demo',
|
||||||
@@ -37,8 +32,7 @@ import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
|
|||||||
[servicePath]="servicePath"
|
[servicePath]="servicePath"
|
||||||
[contentType]="'HTML'"
|
[contentType]="'HTML'"
|
||||||
(onSuccess)= "logData($event)"></alfresco-webscript-get>
|
(onSuccess)= "logData($event)"></alfresco-webscript-get>
|
||||||
`,
|
`
|
||||||
directives: [WEBSCRIPTCOMPONENT, CONTEXT_MENU_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class WebscriptComponent {
|
export class WebscriptComponent {
|
||||||
|
|
||||||
|
|||||||
@@ -15,22 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { PLATFORM_PIPES } from '@angular/core';
|
import { AppModule } from './app.module';
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
|
||||||
import { ALFRESCO_SEARCH_PROVIDERS } from 'ng2-alfresco-search';
|
|
||||||
import { ALFRESCO_CORE_PROVIDERS, AlfrescoPipeTranslate } from 'ng2-alfresco-core';
|
|
||||||
import { ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
|
|
||||||
import { UploadService } from 'ng2-alfresco-upload';
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
import { appRouterProviders } from './app.routes';
|
|
||||||
|
|
||||||
bootstrap(AppComponent, [
|
const platform = platformBrowserDynamic();
|
||||||
appRouterProviders,
|
platform.bootstrapModule(AppModule);
|
||||||
HTTP_PROVIDERS,
|
|
||||||
ALFRESCO_CORE_PROVIDERS,
|
|
||||||
{ provide: PLATFORM_PIPES, useValue: AlfrescoPipeTranslate, multi: true },
|
|
||||||
ALFRESCO_SEARCH_PROVIDERS,
|
|
||||||
UploadService,
|
|
||||||
ATIVITI_FORM_PROVIDERS
|
|
||||||
]).catch(err => console.error(err));
|
|
||||||
|
|||||||
+17
-17
@@ -51,29 +51,29 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
"alfresco-js-api": "^0.3.0",
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
|
||||||
"zone.js": "0.6.12",
|
|
||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"material-design-icons": "2.2.3",
|
"material-design-icons": "2.2.3",
|
||||||
"material-design-lite": "1.2.1",
|
"material-design-lite": "1.2.1",
|
||||||
"ng2-translate": "2.2.0",
|
"ng2-translate": "2.5.0",
|
||||||
"pdfjs-dist": "1.5.404",
|
"pdfjs-dist": "1.5.404",
|
||||||
"flag-icon-css": "2.3.0",
|
"flag-icon-css": "2.3.0",
|
||||||
"intl": "1.2.4",
|
"intl": "1.2.4",
|
||||||
|
"alfresco-js-api": "^0.3.0",
|
||||||
"ng2-alfresco-core": "0.3.2",
|
"ng2-alfresco-core": "0.3.2",
|
||||||
"ng2-alfresco-datatable": "0.3.2",
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
"ng2-alfresco-documentlist": "0.3.2",
|
"ng2-alfresco-documentlist": "0.3.2",
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
"license-check": "1.1.5",
|
"license-check": "1.1.5",
|
||||||
"mime": "^1.3.4",
|
"mime": "^1.3.4",
|
||||||
"tslint": "3.8.1",
|
"tslint": "3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
"license-check-config": {
|
"license-check-config": {
|
||||||
|
|||||||
@@ -2,82 +2,66 @@
|
|||||||
* System configuration for Angular 2 samples
|
* System configuration for Angular 2 samples
|
||||||
* Adjust as necessary for your application needs.
|
* Adjust as necessary for your application needs.
|
||||||
*/
|
*/
|
||||||
(function(global) {
|
(function (global) {
|
||||||
|
System.config({
|
||||||
|
paths: {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'node_modules/'
|
||||||
|
},
|
||||||
// map tells the System loader where to look for things
|
// map tells the System loader where to look for things
|
||||||
var map = {
|
map: {
|
||||||
'app': 'app', // 'dist',
|
// our app is within the app folder
|
||||||
'@angular': 'node_modules/@angular',
|
app: 'app',
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
// angular bundles
|
||||||
'rxjs': 'node_modules/rxjs',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist',
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable/dist',
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist/dist',
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login/dist',
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search/dist',
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload/dist',
|
// other libraries
|
||||||
'ng2-activiti-form': 'node_modules/ng2-activiti-form/dist',
|
'rxjs': 'npm:rxjs',
|
||||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer/dist',
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
'ng2-alfresco-webscript': 'node_modules/ng2-alfresco-webscript/dist',
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
'ng2-alfresco-tag': 'node_modules/ng2-alfresco-tag/dist',
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
'ng2-activiti-tasklist': 'node_modules/ng2-activiti-tasklist/dist',
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
'alfresco-js-api': 'node_modules/alfresco-js-api/dist',
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist/dist'
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
};
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist'
|
||||||
|
},
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
packages: {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
app: {
|
||||||
'rxjs': { defaultExtension: 'js' },
|
main: './main.js',
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
rxjs: {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
'ng2-translate': { defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
|
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-datatable': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-documentlist': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-login': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-search': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-upload': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-viewer': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-activiti-form': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-activiti-processlist': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-activiti-tasklist': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-webscript': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-tag': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
'alfresco-js-api': { main: 'alfresco-js-api.js', defaultExtension: 'js'}
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}
|
||||||
};
|
|
||||||
var ngPackageNames = [
|
|
||||||
'common',
|
|
||||||
'compiler',
|
|
||||||
'core',
|
|
||||||
'http',
|
|
||||||
'platform-browser',
|
|
||||||
'platform-browser-dynamic',
|
|
||||||
'router',
|
|
||||||
'router-deprecated',
|
|
||||||
'upgrade'
|
|
||||||
];
|
|
||||||
// Individual files (~300 requests):
|
|
||||||
function packIndex(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
}
|
}
|
||||||
// Bundled (~40 requests):
|
});
|
||||||
function packUmd(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
|
|
||||||
}
|
|
||||||
// Most environments should use UMD; some (Karma) need the individual index files
|
|
||||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
|
||||||
|
|
||||||
// Add package entries for angular packages
|
|
||||||
ngPackageNames.forEach(setPackageConfig);
|
|
||||||
|
|
||||||
// No umd for router yet
|
|
||||||
packages['@angular/router'] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
|
|
||||||
var config = {
|
|
||||||
map: map,
|
|
||||||
packages: packages
|
|
||||||
};
|
|
||||||
System.config(config);
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
"class-name": true,
|
"class-name": true,
|
||||||
"comment-format": [
|
"comment-format": [
|
||||||
true,
|
true,
|
||||||
"check-space",
|
"check-space"
|
||||||
"check-lowercase"
|
|
||||||
],
|
],
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eofline": true,
|
"eofline": true,
|
||||||
|
|||||||
@@ -15,9 +15,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
|
import { ActivitiForm } from './src/components/activiti-form.component';
|
||||||
import { FormService } from './src/services/form.service';
|
import { FormService } from './src/services/form.service';
|
||||||
import { EcmModelService } from './src/services/ecm-model.service';
|
import { EcmModelService } from './src/services/ecm-model.service';
|
||||||
import { NodeService } from './src/services/node.service';
|
import { NodeService } from './src/services/node.service';
|
||||||
|
import { WidgetVisibilityService } from './src/services/widget-visibility.service';
|
||||||
|
import { ActivitiAlfrescoContentService } from './src/services/activiti-alfresco.service';
|
||||||
|
|
||||||
|
import { WIDGET_DIRECTIVES } from './src/components/widgets/index';
|
||||||
|
|
||||||
export * from './src/components/activiti-form.component';
|
export * from './src/components/activiti-form.component';
|
||||||
export * from './src/services/form.service';
|
export * from './src/services/form.service';
|
||||||
@@ -25,9 +33,40 @@ export * from './src/components/widgets/index';
|
|||||||
export * from './src/services/ecm-model.service';
|
export * from './src/services/ecm-model.service';
|
||||||
export * from './src/services/node.service';
|
export * from './src/services/node.service';
|
||||||
|
|
||||||
|
export const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
||||||
|
ActivitiForm,
|
||||||
|
...WIDGET_DIRECTIVES
|
||||||
|
];
|
||||||
|
|
||||||
export const ATIVITI_FORM_PROVIDERS: [any] = [
|
export const ACTIVITI_FORM_PROVIDERS: any[] = [
|
||||||
FormService,
|
FormService,
|
||||||
EcmModelService,
|
EcmModelService,
|
||||||
NodeService
|
NodeService,
|
||||||
|
WidgetVisibilityService,
|
||||||
|
ActivitiAlfrescoContentService
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CoreModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...ACTIVITI_FORM_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_FORM_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...ACTIVITI_FORM_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class ActivitiFormModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: ActivitiFormModule,
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_FORM_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,103 +5,122 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
|
|||||||
|
|
||||||
__karma__.loaded = function() {};
|
__karma__.loaded = function() {};
|
||||||
|
|
||||||
|
var builtPath = '/base/dist/';
|
||||||
|
|
||||||
|
function isJsFile(path) {
|
||||||
|
return path.slice(-3) == '.js';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSpecFile(path) {
|
||||||
|
return /\.spec\.(.*\.)?js$/.test(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBuiltFile(path) {
|
||||||
|
return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var allSpecFiles = Object.keys(window.__karma__.files)
|
||||||
|
.filter(isSpecFile)
|
||||||
|
.filter(isBuiltFile);
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'base/node_modules/'
|
||||||
|
};
|
||||||
|
|
||||||
var map = {
|
var map = {
|
||||||
'app': 'base/dist',
|
'app': 'base/dist',
|
||||||
'rxjs': 'base/node_modules/rxjs',
|
// angular bundles
|
||||||
'@angular': 'base/node_modules/@angular',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'ng2-alfresco-core': '/base/node_modules/ng2-alfresco-core/dist',
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-translate' : '/base/node_modules/ng2-translate'
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
// testing
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
|
||||||
};
|
};
|
||||||
|
|
||||||
var packages = {
|
var packages = {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
'rxjs': { defaultExtension: 'js' },
|
'rxjs': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-translate': { defaultExtension: 'js' }
|
|
||||||
};
|
|
||||||
|
|
||||||
var packageNames = [
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||||
'@angular/common',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/compiler',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/core',
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/http',
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser',
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser-dynamic',
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router-deprecated',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/testing',
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/upgrade'
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
];
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
|
||||||
packageNames.forEach(function(pkgName) {
|
|
||||||
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
});
|
|
||||||
|
|
||||||
packages['base/dist'] = {
|
|
||||||
defaultExtension: 'js',
|
|
||||||
format: 'register',
|
|
||||||
map: Object.keys(window.__karma__.files).filter(onlyAppFiles).reduce(createPathRecords, {})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
|
paths: paths,
|
||||||
map: map,
|
map: map,
|
||||||
packages: packages
|
packages: packages
|
||||||
};
|
};
|
||||||
|
|
||||||
System.config(config);
|
System.config(config);
|
||||||
|
|
||||||
System.import('@angular/platform-browser/src/browser/browser_adapter')
|
System.import('@angular/core/testing')
|
||||||
.then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); })
|
.then(initTestBed)
|
||||||
.then(function () {
|
.then(initTesting);
|
||||||
|
|
||||||
|
function initTestBed(){
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
System.import('@angular/core/testing'),
|
System.import('@angular/core/testing'),
|
||||||
System.import('@angular/platform-browser-dynamic/testing')
|
System.import('@angular/platform-browser-dynamic/testing')
|
||||||
])
|
])
|
||||||
})
|
|
||||||
.then(function (providers) {
|
.then(function (providers) {
|
||||||
var testing = providers[0];
|
var coreTesting = providers[0];
|
||||||
var testingBrowser = providers[1];
|
var browserTesting = providers[1];
|
||||||
|
|
||||||
testing.setBaseTestProviders(
|
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
|
||||||
|
|
||||||
|
coreTesting.TestBed.initTestEnvironment(
|
||||||
|
browserTesting.BrowserDynamicTestingModule,
|
||||||
|
browserTesting.platformBrowserDynamicTesting());
|
||||||
})
|
})
|
||||||
.then(function() { return Promise.all(resolveTestFiles()); })
|
|
||||||
.then(
|
|
||||||
function() {
|
|
||||||
__karma__.start();
|
|
||||||
},
|
|
||||||
function(error) {
|
|
||||||
if(typeof __karma__.error == 'function') {
|
|
||||||
__karma__.error(error.stack || error);
|
|
||||||
}else{
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
function createPathRecords(pathsMapping, appPath) {
|
|
||||||
var pathParts = appPath.split('/');
|
|
||||||
var moduleName = './' + pathParts.slice(Math.max(pathParts.length - 2, 1)).join('/');
|
|
||||||
moduleName = moduleName.replace(/\.js$/, '');
|
|
||||||
pathsMapping[moduleName] = appPath + '?' + window.__karma__.files[appPath];
|
|
||||||
return pathsMapping;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onlyAppFiles(filePath) {
|
// Import all spec files and start karma
|
||||||
return /\/base\/dist\/(?!.*\.spec\.js$).*\.js$/.test(filePath);
|
function initTesting () {
|
||||||
}
|
return Promise.all(
|
||||||
|
allSpecFiles.map(function (moduleName) {
|
||||||
function onlySpecFiles(path) {
|
|
||||||
return /\.spec\.js$/.test(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveTestFiles() {
|
|
||||||
return Object.keys(window.__karma__.files) // All files served by Karma.
|
|
||||||
.filter(onlySpecFiles)
|
|
||||||
.map(function(moduleName) {
|
|
||||||
// loads all spec files via their global module names (e.g.
|
|
||||||
// 'base/dist/vg-player/vg-player.spec')
|
|
||||||
return System.import(moduleName);
|
return System.import(moduleName);
|
||||||
});
|
})
|
||||||
|
)
|
||||||
|
.then(__karma__.start, __karma__.error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,25 +7,56 @@ module.exports = function (config) {
|
|||||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
// paths loaded by Karma
|
// System.js for module loading
|
||||||
{pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: true},
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
|
|
||||||
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: true},
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.map', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/@angular/**/*.map', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
|
|
||||||
|
|
||||||
{pattern: 'karma-test-shim.js', included: true, watched: true},
|
// Polyfills
|
||||||
|
'node_modules/core-js/client/shim.js',
|
||||||
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
|
|
||||||
|
// zone.js
|
||||||
|
'node_modules/zone.js/dist/zone.js',
|
||||||
|
'node_modules/zone.js/dist/long-stack-trace-zone.js',
|
||||||
|
'node_modules/zone.js/dist/proxy.js',
|
||||||
|
'node_modules/zone.js/dist/sync-test.js',
|
||||||
|
'node_modules/zone.js/dist/jasmine-patch.js',
|
||||||
|
'node_modules/zone.js/dist/async-test.js',
|
||||||
|
'node_modules/zone.js/dist/fake-async-test.js',
|
||||||
|
|
||||||
|
// RxJs
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
||||||
|
|
||||||
|
// Paths loaded via module imports:
|
||||||
|
// Angular itself
|
||||||
|
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'karma-test-shim.js',
|
||||||
|
|
||||||
// paths loaded via module imports
|
// paths loaded via module imports
|
||||||
{pattern: 'dist/**/*.js', included: false, watched: true},
|
{pattern: 'dist/**/*.js', included: false, watched: true},
|
||||||
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
||||||
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
||||||
|
|
||||||
|
// ng2-components
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
|
||||||
// paths to support debugging with source maps in dev tools
|
// paths to support debugging with source maps in dev tools
|
||||||
{pattern: 'src/**/*.ts', included: false, watched: false},
|
{pattern: 'src/**/*.ts', included: false, watched: false},
|
||||||
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
||||||
@@ -76,7 +107,7 @@ module.exports = function (config) {
|
|||||||
// Source files that you wanna generate coverage for.
|
// Source files that you wanna generate coverage for.
|
||||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'dist/**/!(*spec).js': ['coverage']
|
// 'dist/**/!(*spec).js': ['coverage']
|
||||||
},
|
},
|
||||||
|
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
|
|||||||
@@ -45,23 +45,23 @@
|
|||||||
"activiti"
|
"activiti"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
"alfresco-js-api": "^0.3.0",
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"alfresco-js-api": "^0.3.0",
|
||||||
"zone.js": "0.6.12",
|
"ng2-translate": "2.5.0",
|
||||||
"ng2-translate": "2.2.2",
|
|
||||||
"ng2-alfresco-core": "0.3.2"
|
"ng2-alfresco-core": "0.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"traceur": "0.0.91",
|
"traceur": "0.0.91",
|
||||||
"tslint": "3.8.1",
|
"tslint": "3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
"license-check-config": {
|
"license-check-config": {
|
||||||
|
|||||||
@@ -15,14 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
import { ActivitiForm } from './activiti-form.component';
|
import { ActivitiForm } from './activiti-form.component';
|
||||||
import { FormModel, FormOutcomeModel, FormFieldModel, FormOutcomeEvent } from './widgets/index';
|
import { FormModel, FormOutcomeModel, FormFieldModel, FormOutcomeEvent } from './widgets/index';
|
||||||
import { FormService } from './../services/form.service';
|
import { FormService } from './../services/form.service';
|
||||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||||
// import { ContainerWidget } from './widgets/container/container.widget';
|
|
||||||
|
|
||||||
describe('ActivitiForm', () => {
|
describe('ActivitiForm', () => {
|
||||||
|
|
||||||
|
|||||||
@@ -23,16 +23,11 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
EventEmitter
|
EventEmitter
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { EcmModelService } from './../services/ecm-model.service';
|
import { EcmModelService } from './../services/ecm-model.service';
|
||||||
import { FormService } from './../services/form.service';
|
import { FormService } from './../services/form.service';
|
||||||
import { ActivitiAlfrescoContentService } from './../services/activiti-alfresco.service';
|
|
||||||
import { NodeService } from './../services/node.service';
|
import { NodeService } from './../services/node.service';
|
||||||
import { FormModel, FormOutcomeModel, FormValues, FormFieldModel, FormOutcomeEvent } from './widgets/core/index';
|
import { FormModel, FormOutcomeModel, FormValues, FormFieldModel, FormOutcomeEvent } from './widgets/core/index';
|
||||||
|
|
||||||
import { TabsWidget } from './widgets/tabs/tabs.widget';
|
|
||||||
import { ContainerWidget } from './widgets/container/container.widget';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
declare var componentHandler;
|
declare var componentHandler;
|
||||||
|
|
||||||
@@ -84,9 +79,7 @@ import { WidgetVisibilityService } from './../services/widget-visibility.servic
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'activiti-form',
|
selector: 'activiti-form',
|
||||||
templateUrl: './activiti-form.component.html',
|
templateUrl: './activiti-form.component.html',
|
||||||
styleUrls: ['./activiti-form.component.css'],
|
styleUrls: ['./activiti-form.component.css']
|
||||||
directives: [MATERIAL_DESIGN_DIRECTIVES, ContainerWidget, TabsWidget],
|
|
||||||
providers: [EcmModelService, FormService, ActivitiAlfrescoContentService, WidgetVisibilityService, NodeService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
|
export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
|
||||||
|
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContainerWidget } from './container.widget';
|
import { ContainerWidget } from './container.widget';
|
||||||
import { FormModel } from './../core/form.model';
|
import { FormModel } from './../core/form.model';
|
||||||
import { ContainerModel } from './../core/container.model';
|
import { ContainerModel } from './../core/container.model';
|
||||||
|
|||||||
+2
-10
@@ -16,11 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
|
||||||
import { ContainerModel } from './../core/index';
|
import { ContainerModel, FormFieldModel } from './../core/index';
|
||||||
|
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { PRIMITIVE_WIDGET_DIRECTIVES } from './../index';
|
|
||||||
import { FormFieldModel } from '../core/index';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
declare var componentHandler;
|
declare var componentHandler;
|
||||||
@@ -29,11 +25,7 @@ declare var componentHandler;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'container-widget',
|
selector: 'container-widget',
|
||||||
templateUrl: './container.widget.html',
|
templateUrl: './container.widget.html',
|
||||||
styleUrls: ['./container.widget.css'],
|
styleUrls: ['./container.widget.css']
|
||||||
directives: [
|
|
||||||
MATERIAL_DESIGN_DIRECTIVES,
|
|
||||||
PRIMITIVE_WIDGET_DIRECTIVES
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class ContainerWidget implements AfterViewInit {
|
export class ContainerWidget implements AfterViewInit {
|
||||||
|
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { ContainerColumnModel } from './container-column.model';
|
import { ContainerColumnModel } from './container-column.model';
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormFieldModel } from './form-field.model';
|
import { FormFieldModel } from './form-field.model';
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { ContainerModel } from './container.model';
|
import { ContainerModel } from './container.model';
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormFieldTypes } from './form-field-types';
|
import { FormFieldTypes } from './form-field-types';
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormFieldModel } from './form-field.model';
|
import { FormFieldModel } from './form-field.model';
|
||||||
import { FormFieldOption } from './form-field-option';
|
import { FormFieldOption } from './form-field-option';
|
||||||
|
|||||||
@@ -15,12 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormFieldModel } from './form-field.model';
|
import { FormFieldModel } from './form-field.model';
|
||||||
import { FormFieldTypes } from './form-field-types';
|
import { FormFieldTypes } from './form-field-types';
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
|
|
||||||
|
|
||||||
describe('FormFieldModel', () => {
|
describe('FormFieldModel', () => {
|
||||||
|
|
||||||
it('should store the form reference', () => {
|
it('should store the form reference', () => {
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormOutcomeModel } from './form-outcome.model';
|
import { FormOutcomeModel } from './form-outcome.model';
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormWidgetModel } from './form-widget.model';
|
import { FormWidgetModel } from './form-widget.model';
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { TabModel } from './tab.model';
|
import { TabModel } from './tab.model';
|
||||||
import { ContainerModel } from './container.model';
|
import { ContainerModel } from './container.model';
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { GroupUserModel } from './group-user.model';
|
import { GroupUserModel } from './group-user.model';
|
||||||
|
|
||||||
describe('GroupUserModel', () => {
|
describe('GroupUserModel', () => {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { TabModel } from './tab.model';
|
import { TabModel } from './tab.model';
|
||||||
import { ContainerModel } from './container.model';
|
import { ContainerModel } from './container.model';
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
import { DropdownWidget } from './dropdown.widget';
|
import { DropdownWidget } from './dropdown.widget';
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { FunctionalGroupWidget } from './functional-group.widget';
|
import { FunctionalGroupWidget } from './functional-group.widget';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { HyperlinkWidget } from './hyperlink.widget';
|
import { HyperlinkWidget } from './hyperlink.widget';
|
||||||
import { FormModel } from './../core/form.model';
|
import { FormModel } from './../core/form.model';
|
||||||
import { FormFieldModel } from './../core/form-field.model';
|
import { FormFieldModel } from './../core/form-field.model';
|
||||||
|
|||||||
@@ -57,12 +57,9 @@ export * from './typeahead/typeahead.widget';
|
|||||||
export * from './functional-group/functional-group.widget';
|
export * from './functional-group/functional-group.widget';
|
||||||
export * from './people/people.widget';
|
export * from './people/people.widget';
|
||||||
|
|
||||||
export const CONTAINER_WIDGET_DIRECTIVES: [any] = [
|
export const WIDGET_DIRECTIVES: any[] = [
|
||||||
TabsWidget,
|
TabsWidget,
|
||||||
ContainerWidget
|
ContainerWidget,
|
||||||
];
|
|
||||||
|
|
||||||
export const PRIMITIVE_WIDGET_DIRECTIVES: [any] = [
|
|
||||||
TextWidget,
|
TextWidget,
|
||||||
NumberWidget,
|
NumberWidget,
|
||||||
CheckboxWidget,
|
CheckboxWidget,
|
||||||
@@ -78,5 +75,3 @@ export const PRIMITIVE_WIDGET_DIRECTIVES: [any] = [
|
|||||||
FunctionalGroupWidget,
|
FunctionalGroupWidget,
|
||||||
PeopleWidget
|
PeopleWidget
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { PeopleWidget } from './people.widget';
|
import { PeopleWidget } from './people.widget';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
import { FormModel } from '../core/form.model';
|
import { FormModel } from '../core/form.model';
|
||||||
import { FormFieldModel } from '../core/form-field.model';
|
import { FormFieldModel } from '../core/form-field.model';
|
||||||
// import { GroupModel } from '../core/group.model';
|
|
||||||
import { GroupUserModel } from '../core/group-user.model';
|
import { GroupUserModel } from '../core/group-user.model';
|
||||||
|
|
||||||
describe('PeopleWidget', () => {
|
describe('PeopleWidget', () => {
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
import { RadioButtonsWidget } from './radio-buttons.widget';
|
import { RadioButtonsWidget } from './radio-buttons.widget';
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { TabsWidget } from './tabs.widget';
|
import { TabsWidget } from './tabs.widget';
|
||||||
import { TabModel } from './../core/tab.model';
|
import { TabModel } from './../core/tab.model';
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, AfterViewInit } from '@angular/core';
|
import { Component, Input, AfterViewInit } from '@angular/core';
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { TabModel } from './../core/index';
|
import { TabModel } from './../core/index';
|
||||||
import { ContainerWidget } from './../container/container.widget';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
declare var componentHandler;
|
declare var componentHandler;
|
||||||
@@ -26,8 +24,7 @@ declare var componentHandler;
|
|||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'tabs-widget',
|
selector: 'tabs-widget',
|
||||||
templateUrl: './tabs.widget.html',
|
templateUrl: './tabs.widget.html'
|
||||||
directives: [MATERIAL_DESIGN_DIRECTIVES, ContainerWidget]
|
|
||||||
})
|
})
|
||||||
export class TabsWidget implements AfterViewInit {
|
export class TabsWidget implements AfterViewInit {
|
||||||
|
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { TypeaheadWidget } from './typeahead.widget';
|
import { TypeaheadWidget } from './typeahead.widget';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { WidgetComponent } from './widget.component';
|
import { WidgetComponent } from './widget.component';
|
||||||
import { FormFieldModel } from './core/form-field.model';
|
import { FormFieldModel } from './core/form-field.model';
|
||||||
import { FormModel } from './core/form.model';
|
import { FormModel } from './core/form.model';
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { NodeService } from './node.service';
|
import { NodeService } from './node.service';
|
||||||
@@ -339,3 +340,4 @@ describe('EcmModelService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { HTTP_PROVIDERS, Response, ResponseOptions } from '@angular/http';
|
import { HTTP_PROVIDERS, Response, ResponseOptions } from '@angular/http';
|
||||||
@@ -416,3 +417,4 @@ describe('FormService', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { NodeService } from './node.service';
|
import { NodeService } from './node.service';
|
||||||
@@ -169,3 +170,4 @@ describe('NodeService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||||
import { WidgetVisibilityService } from './widget-visibility.service';
|
import { WidgetVisibilityService } from './widget-visibility.service';
|
||||||
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
@@ -551,3 +552,4 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(fakeFormField.isVisible).toBeFalsy();
|
expect(fakeFormField.isVisible).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class ProcessListDataTableAdapter extends ObjectDataTableAdapter implemen
|
|||||||
let value = row.getValue(col.key);
|
let value = row.getValue(col.key);
|
||||||
|
|
||||||
if (col.type === 'date') {
|
if (col.type === 'date') {
|
||||||
let datePipe = new DatePipe();
|
let datePipe = new DatePipe('en-US');
|
||||||
let format = (<ActivitiDataColumn>(col)).format || this.DEFAULT_DATE_FORMAT;
|
let format = (<ActivitiDataColumn>(col)).format || this.DEFAULT_DATE_FORMAT;
|
||||||
try {
|
try {
|
||||||
return datePipe.transform(value, format);
|
return datePipe.transform(value, format);
|
||||||
|
|||||||
@@ -23,24 +23,29 @@
|
|||||||
"demo"
|
"demo"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"@angular/upgrade": "2.0.0",
|
||||||
"alfresco-js-api": "^0.3.0",
|
"core-js": "^2.4.1",
|
||||||
"systemjs": "0.19.27",
|
|
||||||
"core-js": "^2.4.0",
|
|
||||||
"reflect-metadata": "^0.1.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"zone.js": "^0.6.12",
|
"systemjs": "0.19.27",
|
||||||
|
"zone.js": "^0.6.23",
|
||||||
|
|
||||||
|
"material-design-icons": "2.2.3",
|
||||||
|
"material-design-lite": "1.2.1",
|
||||||
|
|
||||||
|
"alfresco-js-api": "^0.3.0",
|
||||||
|
"ng2-alfresco-core": "0.3.2",
|
||||||
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
"ng2-activiti-processlist": "^0.3.0",
|
"ng2-activiti-processlist": "^0.3.0",
|
||||||
"material-design-icons": "^2.2.3",
|
"ng2-activiti-tasklist": "0.3.3"
|
||||||
"material-design-lite": "^1.1.3"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
@@ -48,10 +53,7 @@
|
|||||||
"concurrently": "^2.2.0",
|
"concurrently": "^2.2.0",
|
||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"tslint": "^3.8.1",
|
"tslint": "^3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"registry": "http://devproducts.alfresco.me:4873/"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,21 +14,18 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { Component, OnInit, Injectable, provide } from '@angular/core';
|
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { NgModule, Component, OnInit } from '@angular/core';
|
||||||
import {
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
ACTIVITI_PROCESSLIST_PROVIDERS,
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
ACTIVITI_PROCESSLIST_DIRECTIVES
|
|
||||||
} from 'ng2-activiti-processlist/dist/ng2-activiti-processlist';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import {
|
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
|
||||||
AlfrescoAuthenticationService,
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
||||||
AlfrescoSettingsService,
|
|
||||||
ALFRESCO_CORE_PROVIDERS
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
template: `<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
||||||
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="bpmHost"><br><br>
|
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="bpmHost"><br><br>
|
||||||
@@ -45,14 +42,12 @@ import {
|
|||||||
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
||||||
<div class="container" *ngIf="authenticated">
|
<div class="container" *ngIf="authenticated">
|
||||||
<activiti-process-instance-list></activiti-process-instance-list>
|
<activiti-process-instance-list></activiti-process-instance-list>
|
||||||
</div>`,
|
</div>`
|
||||||
providers: [ACTIVITI_PROCESSLIST_PROVIDERS],
|
|
||||||
directives: [ACTIVITI_PROCESSLIST_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
class MyDemoApp implements OnInit {
|
class MyDemoApp implements OnInit {
|
||||||
|
|
||||||
authenticated: boolean;
|
authenticated: boolean;
|
||||||
ecmHost: string = 'http://127.0.0.1:9999';
|
bpmHost: string = 'http://127.0.0.1:9999';
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -64,8 +59,8 @@ class MyDemoApp implements OnInit {
|
|||||||
settingsService.setProviders('BPM');
|
settingsService.setProviders('BPM');
|
||||||
settingsService.bpmHost = this.bpmHost;
|
settingsService.bpmHost = this.bpmHost;
|
||||||
|
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicketBpm()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicketBpm();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +73,7 @@ class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.settingsService.ecmHost = this.ecmHost;
|
this.settingsService.bpmHost = this.bpmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +91,15 @@ class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(MyDemoApp, [
|
@NgModule({
|
||||||
ALFRESCO_CORE_PROVIDERS
|
imports: [
|
||||||
]);
|
BrowserModule,
|
||||||
|
CoreModule.forRoot(),
|
||||||
|
ActivitiProcessListModule
|
||||||
|
],
|
||||||
|
declarations: [ MyDemoApp ],
|
||||||
|
bootstrap: [ MyDemoApp ]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
||||||
|
|
||||||
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
|||||||
@@ -1,71 +1,67 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* System configuration for Angular 2 samples
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
* Adjust as necessary for your application needs.
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (global) {
|
(function (global) {
|
||||||
|
System.config({
|
||||||
|
paths: {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'node_modules/'
|
||||||
|
},
|
||||||
// map tells the System loader where to look for things
|
// map tells the System loader where to look for things
|
||||||
var map = {
|
map: {
|
||||||
'app': 'dist',
|
// our app is within the app folder
|
||||||
'@angular': 'node_modules/@angular',
|
app: 'dist',
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
// angular bundles
|
||||||
'rxjs': 'node_modules/rxjs',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist',
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist',
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable/dist'
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
};
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist'
|
||||||
|
},
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
packages: {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
app: {
|
||||||
'rxjs': { defaultExtension: 'js' },
|
main: './main.js',
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
rxjs: {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
'ng2-translate': { defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-activiti-processlist': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-datatable': { main: 'index.js', defaultExtension: 'js' }
|
|
||||||
};
|
|
||||||
|
|
||||||
var ngPackageNames = [
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'common',
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'compiler',
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'core',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'http',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'platform-browser',
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
'platform-browser-dynamic',
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
'router',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'router-deprecated',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'upgrade'
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
];
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
|
||||||
// Individual files (~300 requests):
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
function packIndex(pkgName) {
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}
|
||||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
}
|
}
|
||||||
// Bundled (~40 requests):
|
});
|
||||||
function packUmd(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: '/bundles/'+ pkgName + '.umd.js', defaultExtension: 'js' };
|
|
||||||
}
|
|
||||||
// Most environments should use UMD; some (Karma) need the individual index files
|
|
||||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
|
||||||
// Add package entries for angular packages
|
|
||||||
ngPackageNames.forEach(setPackageConfig);
|
|
||||||
var config = {
|
|
||||||
map: map,
|
|
||||||
packages: packages
|
|
||||||
};
|
|
||||||
System.config(config);
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
|
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
|
||||||
|
|
||||||
import { ActivitiProcessInstanceListComponent } from './src/components/activiti-processlist.component';
|
import { ActivitiProcessInstanceListComponent } from './src/components/activiti-processlist.component';
|
||||||
import { ActivitiProcessFilters } from './src/components/activiti-filters.component';
|
import { ActivitiProcessFilters } from './src/components/activiti-filters.component';
|
||||||
import { ActivitiProcessInstanceHeader } from './src/components/activiti-process-instance-header.component';
|
import { ActivitiProcessInstanceHeader } from './src/components/activiti-process-instance-header.component';
|
||||||
@@ -44,3 +49,30 @@ export const ACTIVITI_PROCESSLIST_DIRECTIVES: [any] = [
|
|||||||
export const ACTIVITI_PROCESSLIST_PROVIDERS: [any] = [
|
export const ACTIVITI_PROCESSLIST_PROVIDERS: [any] = [
|
||||||
ActivitiProcessService
|
ActivitiProcessService
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CoreModule,
|
||||||
|
DataTableModule,
|
||||||
|
ActivitiTaskListModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...ACTIVITI_PROCESSLIST_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_PROCESSLIST_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...ACTIVITI_PROCESSLIST_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class ActivitiProcessListModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: ActivitiProcessListModule,
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_PROCESSLIST_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,104 +5,122 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
|
|||||||
|
|
||||||
__karma__.loaded = function() {};
|
__karma__.loaded = function() {};
|
||||||
|
|
||||||
|
var builtPath = '/base/dist/';
|
||||||
|
|
||||||
|
function isJsFile(path) {
|
||||||
|
return path.slice(-3) == '.js';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSpecFile(path) {
|
||||||
|
return /\.spec\.(.*\.)?js$/.test(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBuiltFile(path) {
|
||||||
|
return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var allSpecFiles = Object.keys(window.__karma__.files)
|
||||||
|
.filter(isSpecFile)
|
||||||
|
.filter(isBuiltFile);
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'base/node_modules/'
|
||||||
|
};
|
||||||
|
|
||||||
var map = {
|
var map = {
|
||||||
'app': 'base/dist',
|
'app': 'base/dist',
|
||||||
'rxjs': 'base/node_modules/rxjs',
|
// angular bundles
|
||||||
'@angular': 'base/node_modules/@angular',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'ng2-alfresco-core': '/base/node_modules/ng2-alfresco-core/dist',
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-alfresco-datatable': '/base/node_modules/ng2-alfresco-datatable/dist',
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
'ng2-translate' : '/base/node_modules/ng2-translate'
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
// testing
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
|
||||||
};
|
};
|
||||||
|
|
||||||
var packages = {
|
var packages = {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
'rxjs': { defaultExtension: 'js' },
|
'rxjs': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-datatable': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-translate': { defaultExtension: 'js' }
|
|
||||||
};
|
|
||||||
|
|
||||||
var packageNames = [
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||||
'@angular/common',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/compiler',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/core',
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/http',
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser',
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser-dynamic',
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router-deprecated',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/testing',
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/upgrade'
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
];
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
|
||||||
packageNames.forEach(function(pkgName) {
|
|
||||||
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
});
|
|
||||||
|
|
||||||
packages['base/dist'] = {
|
|
||||||
defaultExtension: 'js',
|
|
||||||
format: 'register',
|
|
||||||
map: Object.keys(window.__karma__.files).filter(onlyAppFiles).reduce(createPathRecords, {})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
|
paths: paths,
|
||||||
map: map,
|
map: map,
|
||||||
packages: packages
|
packages: packages
|
||||||
};
|
};
|
||||||
|
|
||||||
System.config(config);
|
System.config(config);
|
||||||
|
|
||||||
System.import('@angular/platform-browser/src/browser/browser_adapter')
|
System.import('@angular/core/testing')
|
||||||
.then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); })
|
.then(initTestBed)
|
||||||
.then(function () {
|
.then(initTesting);
|
||||||
|
|
||||||
|
function initTestBed(){
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
System.import('@angular/core/testing'),
|
System.import('@angular/core/testing'),
|
||||||
System.import('@angular/platform-browser-dynamic/testing')
|
System.import('@angular/platform-browser-dynamic/testing')
|
||||||
])
|
])
|
||||||
})
|
|
||||||
.then(function (providers) {
|
.then(function (providers) {
|
||||||
var testing = providers[0];
|
var coreTesting = providers[0];
|
||||||
var testingBrowser = providers[1];
|
var browserTesting = providers[1];
|
||||||
|
|
||||||
testing.setBaseTestProviders(
|
coreTesting.TestBed.initTestEnvironment(
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
browserTesting.BrowserDynamicTestingModule,
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
browserTesting.platformBrowserDynamicTesting());
|
||||||
})
|
})
|
||||||
.then(function() { return Promise.all(resolveTestFiles()); })
|
|
||||||
.then(
|
|
||||||
function() {
|
|
||||||
__karma__.start();
|
|
||||||
},
|
|
||||||
function(error) {
|
|
||||||
if(typeof __karma__.error == 'function') {
|
|
||||||
__karma__.error(error.stack || error);
|
|
||||||
}else{
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
function createPathRecords(pathsMapping, appPath) {
|
|
||||||
var pathParts = appPath.split('/');
|
|
||||||
var moduleName = './' + pathParts.slice(Math.max(pathParts.length - 2, 1)).join('/');
|
|
||||||
moduleName = moduleName.replace(/\.js$/, '');
|
|
||||||
pathsMapping[moduleName] = appPath + '?' + window.__karma__.files[appPath];
|
|
||||||
return pathsMapping;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onlyAppFiles(filePath) {
|
// Import all spec files and start karma
|
||||||
return /\/base\/dist\/(?!.*\.spec\.js$).*\.js$/.test(filePath);
|
function initTesting () {
|
||||||
}
|
return Promise.all(
|
||||||
|
allSpecFiles.map(function (moduleName) {
|
||||||
function onlySpecFiles(path) {
|
|
||||||
return /\.spec\.js$/.test(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveTestFiles() {
|
|
||||||
return Object.keys(window.__karma__.files) // All files served by Karma.
|
|
||||||
.filter(onlySpecFiles)
|
|
||||||
.map(function(moduleName) {
|
|
||||||
// loads all spec files via their global module names (e.g.
|
|
||||||
// 'base/dist/vg-player/vg-player.spec')
|
|
||||||
return System.import(moduleName);
|
return System.import(moduleName);
|
||||||
});
|
})
|
||||||
|
)
|
||||||
|
.then(__karma__.start, __karma__.error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +1,77 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
var configuration = {
|
||||||
|
|
||||||
basePath: '.',
|
basePath: '.',
|
||||||
|
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
// paths loaded by Karma
|
// System.js for module loading
|
||||||
{pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: true},
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
|
|
||||||
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: true},
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.map', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/@angular/**/*.map', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.html', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.css', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.html', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.css', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
|
|
||||||
|
|
||||||
{pattern: 'karma-test-shim.js', included: true, watched: true},
|
// Polyfills
|
||||||
|
'node_modules/core-js/client/shim.js',
|
||||||
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
|
|
||||||
|
// zone.js
|
||||||
|
'node_modules/zone.js/dist/zone.js',
|
||||||
|
'node_modules/zone.js/dist/long-stack-trace-zone.js',
|
||||||
|
'node_modules/zone.js/dist/proxy.js',
|
||||||
|
'node_modules/zone.js/dist/sync-test.js',
|
||||||
|
'node_modules/zone.js/dist/jasmine-patch.js',
|
||||||
|
'node_modules/zone.js/dist/async-test.js',
|
||||||
|
'node_modules/zone.js/dist/fake-async-test.js',
|
||||||
|
|
||||||
|
// RxJs
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
||||||
|
|
||||||
|
// Paths loaded via module imports:
|
||||||
|
// Angular itself
|
||||||
|
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'karma-test-shim.js',
|
||||||
|
|
||||||
// paths loaded via module imports
|
// paths loaded via module imports
|
||||||
{pattern: 'dist/**/*.js', included: false, watched: true},
|
{pattern: 'dist/**/*.js', included: false, watched: true},
|
||||||
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
||||||
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
||||||
|
|
||||||
|
// ng2-components
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
|
||||||
// paths to support debugging with source maps in dev tools
|
// paths to support debugging with source maps in dev tools
|
||||||
{pattern: 'src/**/*.ts', included: false, watched: false},
|
{pattern: 'src/**/*.ts', included: false, watched: false},
|
||||||
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
exclude: [
|
||||||
|
'node_modules/**/*spec.js'
|
||||||
|
],
|
||||||
|
|
||||||
// proxied base paths
|
// proxied base paths
|
||||||
proxies: {
|
proxies: {
|
||||||
// required for component assets fetched by Angular's compiler
|
// required for component assets fetched by Angular's compiler
|
||||||
'/src/': '/base/src/'
|
'/src/': '/base/src/'
|
||||||
},
|
},
|
||||||
|
|
||||||
// list of files to exclude
|
|
||||||
exclude: [
|
|
||||||
'node_modules/**/*spec.js'
|
|
||||||
],
|
|
||||||
|
|
||||||
port: 9876,
|
port: 9876,
|
||||||
|
|
||||||
// level of logging
|
// level of logging
|
||||||
@@ -61,10 +84,18 @@ module.exports = function (config) {
|
|||||||
|
|
||||||
browsers: ['Chrome'],
|
browsers: ['Chrome'],
|
||||||
|
|
||||||
|
customLaunchers: {
|
||||||
|
Chrome_travis_ci: {
|
||||||
|
base: 'Chrome',
|
||||||
|
flags: ['--no-sandbox']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Karma plugins loaded
|
// Karma plugins loaded
|
||||||
plugins: [
|
plugins: [
|
||||||
'karma-jasmine',
|
'karma-jasmine',
|
||||||
'karma-coverage',
|
'karma-coverage',
|
||||||
|
'karma-jasmine-ajax',
|
||||||
'karma-chrome-launcher',
|
'karma-chrome-launcher',
|
||||||
'karma-mocha-reporter',
|
'karma-mocha-reporter',
|
||||||
'karma-jasmine-html-reporter'
|
'karma-jasmine-html-reporter'
|
||||||
@@ -89,5 +120,11 @@ module.exports = function (config) {
|
|||||||
{type: 'lcov'}
|
{type: 'lcov'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
})
|
};
|
||||||
|
|
||||||
|
if (process.env.TRAVIS) {
|
||||||
|
configuration.browsers = ['Chrome_travis_ci'];
|
||||||
|
}
|
||||||
|
|
||||||
|
config.set(configuration)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,22 +44,23 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"@angular/upgrade": "2.0.0",
|
||||||
"alfresco-js-api": "^0.3.0",
|
"core-js": "^2.4.1",
|
||||||
"systemjs": "0.19.27",
|
|
||||||
"core-js": "^2.4.0",
|
|
||||||
"reflect-metadata": "^0.1.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"zone.js": "^0.6.12",
|
"systemjs": "0.19.27",
|
||||||
"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",
|
"ng2-alfresco-core": "0.3.2",
|
||||||
"ng2-alfresco-datatable": "0.3.2",
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
"ng2-activiti-tasklist": "0.3.3"
|
"ng2-activiti-tasklist": "0.3.3"
|
||||||
@@ -83,18 +84,12 @@
|
|||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"traceur": "^0.0.91",
|
"traceur": "^0.0.91",
|
||||||
"tslint": "^3.8.1",
|
"tslint": "^3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
"license-check-config": {
|
"license-check-config": {
|
||||||
"src": [
|
"src": [
|
||||||
"**/*.js",
|
"./dist/**/*.js"
|
||||||
"**/*.ts",
|
|
||||||
"!/**/coverage/**/*",
|
|
||||||
"!/**/demo/**/*",
|
|
||||||
"!/**/node_modules/**/*",
|
|
||||||
"!/**/typings/**/*",
|
|
||||||
"!*.js"
|
|
||||||
],
|
],
|
||||||
"path": "assets/license_header.txt",
|
"path": "assets/license_header.txt",
|
||||||
"blocking": false,
|
"blocking": false,
|
||||||
|
|||||||
+3
-10
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
import { Comment } from '../models/comment.model';
|
import { Comment } from '../models/comment.model';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observer } from 'rxjs/Observer';
|
||||||
@@ -29,8 +29,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-process-instance-comments',
|
selector: 'activiti-process-instance-comments',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-comments.component.html',
|
templateUrl: './activiti-comments.component.html',
|
||||||
styleUrls: ['./activiti-comments.component.css'],
|
styleUrls: ['./activiti-comments.component.css']
|
||||||
providers: [ActivitiProcessService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiComments implements OnInit {
|
export class ActivitiComments implements OnInit {
|
||||||
|
|
||||||
@@ -47,13 +46,7 @@ export class ActivitiComments implements OnInit {
|
|||||||
|
|
||||||
message: string;
|
message: string;
|
||||||
|
|
||||||
/**
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
* Constructor
|
|
||||||
* @param auth
|
|
||||||
* @param translate
|
|
||||||
*/
|
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
|||||||
+5
-14
@@ -16,11 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Output, EventEmitter, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Output, EventEmitter, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
import { FilterRepresentationModel } from '../models/filter.model';
|
import { FilterRepresentationModel } from '../models/filter.model';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observable, Observer } from 'rxjs/Rx';
|
||||||
import { Observable } from 'rxjs/Observable';
|
|
||||||
|
|
||||||
declare let componentHandler: any;
|
declare let componentHandler: any;
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -29,8 +28,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-process-instance-filters',
|
selector: 'activiti-process-instance-filters',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-filters.component.html',
|
templateUrl: './activiti-filters.component.html',
|
||||||
styleUrls: ['activiti-filters.component.css'],
|
styleUrls: ['activiti-filters.component.css']
|
||||||
providers: [ActivitiProcessService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiProcessFilters implements OnInit, OnChanges {
|
export class ActivitiProcessFilters implements OnInit, OnChanges {
|
||||||
|
|
||||||
@@ -56,15 +54,8 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
|
|||||||
|
|
||||||
filters: FilterRepresentationModel [] = [];
|
filters: FilterRepresentationModel [] = [];
|
||||||
|
|
||||||
/**
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
* Constructor
|
private activiti: ActivitiProcessService) {
|
||||||
* @param auth
|
|
||||||
* @param translate
|
|
||||||
* @param activiti
|
|
||||||
*/
|
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
public activiti: ActivitiProcessService) {
|
|
||||||
this.filter$ = new Observable<FilterRepresentationModel>(observer => this.filterObserver = observer).share();
|
this.filter$ = new Observable<FilterRepresentationModel>(observer => this.filterObserver = observer).share();
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
|||||||
+3
-6
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, ViewChild, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, ViewChild, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
import { ActivitiProcessInstanceHeader } from './activiti-process-instance-header.component';
|
import { ActivitiProcessInstanceHeader } from './activiti-process-instance-header.component';
|
||||||
import { ActivitiProcessInstanceTasks } from './activiti-process-instance-tasks.component';
|
import { ActivitiProcessInstanceTasks } from './activiti-process-instance-tasks.component';
|
||||||
@@ -31,9 +31,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-process-instance-details',
|
selector: 'activiti-process-instance-details',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-process-instance-details.component.html',
|
templateUrl: './activiti-process-instance-details.component.html',
|
||||||
styleUrls: ['./activiti-process-instance-details.component.css'],
|
styleUrls: ['./activiti-process-instance-details.component.css']
|
||||||
providers: [ActivitiProcessService],
|
|
||||||
directives: [ActivitiProcessInstanceHeader, ActivitiComments, ActivitiProcessInstanceTasks]
|
|
||||||
})
|
})
|
||||||
export class ActivitiProcessInstanceDetails implements OnInit, OnChanges {
|
export class ActivitiProcessInstanceDetails implements OnInit, OnChanges {
|
||||||
|
|
||||||
@@ -69,8 +67,7 @@ export class ActivitiProcessInstanceDetails implements OnInit, OnChanges {
|
|||||||
* @param translate
|
* @param translate
|
||||||
* @param activitiProcess
|
* @param activitiProcess
|
||||||
*/
|
*/
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
|||||||
+2
-9
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ProcessInstance } from '../models/process-instance';
|
import { ProcessInstance } from '../models/process-instance';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
|
|
||||||
@@ -37,14 +37,7 @@ export class ActivitiProcessInstanceHeader {
|
|||||||
@Output()
|
@Output()
|
||||||
processCancelled = new EventEmitter();
|
processCancelled = new EventEmitter();
|
||||||
|
|
||||||
/**
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
* Constructor
|
|
||||||
* @param auth
|
|
||||||
* @param translate
|
|
||||||
* @param activitiProcess
|
|
||||||
*/
|
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
|||||||
+4
-17
@@ -16,12 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit, ViewChild, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild, Output, EventEmitter } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
|
import { Observable, Observer } from 'rxjs/Rx';
|
||||||
import { Observer } from 'rxjs/Observer';
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
|
||||||
|
|
||||||
declare let componentHandler: any;
|
declare let componentHandler: any;
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -30,9 +28,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-process-instance-tasks',
|
selector: 'activiti-process-instance-tasks',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-process-instance-tasks.component.html',
|
templateUrl: './activiti-process-instance-tasks.component.html',
|
||||||
styleUrls: ['./activiti-process-instance-tasks.component.css'],
|
styleUrls: ['./activiti-process-instance-tasks.component.css']
|
||||||
providers: [ActivitiProcessService],
|
|
||||||
directives: [ ALFRESCO_TASKLIST_DIRECTIVES ]
|
|
||||||
})
|
})
|
||||||
export class ActivitiProcessInstanceTasks implements OnInit {
|
export class ActivitiProcessInstanceTasks implements OnInit {
|
||||||
|
|
||||||
@@ -64,23 +60,14 @@ export class ActivitiProcessInstanceTasks implements OnInit {
|
|||||||
@ViewChild('taskdetails')
|
@ViewChild('taskdetails')
|
||||||
taskdetails: any;
|
taskdetails: any;
|
||||||
|
|
||||||
/**
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
* Constructor
|
|
||||||
* @param auth
|
|
||||||
* @param translate
|
|
||||||
* @param activitiProcess
|
|
||||||
*/
|
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
translate.addTranslationFolder('node_modules/ng2-activiti-processlist/src');
|
translate.addTranslationFolder('node_modules/ng2-activiti-processlist/src');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.task$ = new Observable<TaskDetailsModel>(observer => this.taskObserver = observer).share();
|
this.task$ = new Observable<TaskDetailsModel>(observer => this.taskObserver = observer).share();
|
||||||
this.completedTask$ = new Observable<TaskDetailsModel>(observer => this.completedTaskObserver = observer).share();
|
this.completedTask$ = new Observable<TaskDetailsModel>(observer => this.completedTaskObserver = observer).share();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
+3
-5
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
import {Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, CONTEXT_MENU_DIRECTIVES, CONTEXT_MENU_PROVIDERS } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ALFRESCO_DATATABLE_DIRECTIVES, ObjectDataTableAdapter, DataRowEvent, DataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter, DataRowEvent, DataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||||
import { ActivitiProcessService } from '../services/activiti-process.service';
|
import { ActivitiProcessService } from '../services/activiti-process.service';
|
||||||
import { UserProcessInstanceFilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { UserProcessInstanceFilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
|
|
||||||
@@ -33,9 +33,7 @@ declare let __moduleName: string;
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
],
|
],
|
||||||
templateUrl: './activiti-processlist.component.html',
|
templateUrl: './activiti-processlist.component.html'
|
||||||
directives: [ ALFRESCO_DATATABLE_DIRECTIVES, CONTEXT_MENU_DIRECTIVES ],
|
|
||||||
providers: [ CONTEXT_MENU_PROVIDERS, ActivitiProcessService ]
|
|
||||||
})
|
})
|
||||||
export class ActivitiProcessInstanceListComponent implements OnInit, OnChanges {
|
export class ActivitiProcessInstanceListComponent implements OnInit, OnChanges {
|
||||||
|
|
||||||
|
|||||||
+3
-11
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
|
|
||||||
declare let componentHandler: any;
|
declare let componentHandler: any;
|
||||||
@@ -26,8 +26,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-start-process-instance',
|
selector: 'activiti-start-process-instance',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-start-process.component.html',
|
templateUrl: './activiti-start-process.component.html',
|
||||||
styleUrls: ['./activiti-start-process.component.css'],
|
styleUrls: ['./activiti-start-process.component.css']
|
||||||
providers: [ActivitiProcessService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiStartProcessButton implements OnInit {
|
export class ActivitiStartProcessButton implements OnInit {
|
||||||
|
|
||||||
@@ -42,14 +41,7 @@ export class ActivitiStartProcessButton implements OnInit {
|
|||||||
name: string;
|
name: string;
|
||||||
processDefinition: string;
|
processDefinition: string;
|
||||||
|
|
||||||
/**
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
* Constructor
|
|
||||||
* @param auth
|
|
||||||
* @param translate
|
|
||||||
* @param activitiProcess
|
|
||||||
*/
|
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
|||||||
+5
-15
@@ -15,18 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable, ChangeDetectorRef, Pipe } from '@angular/core';
|
describe('Placeholder', () => {
|
||||||
import { TranslatePipe } from 'ng2-translate/ng2-translate';
|
it('test placeholder', () => {
|
||||||
import { AlfrescoTranslationService } from './AlfrescoTranslation.service';
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
@Injectable()
|
});
|
||||||
@Pipe({
|
|
||||||
name: 'translate',
|
|
||||||
pure: false // required to update the value when the promise is resolved
|
|
||||||
})
|
|
||||||
export class AlfrescoPipeTranslate extends TranslatePipe {
|
|
||||||
|
|
||||||
constructor(translate: AlfrescoTranslationService, _ref: ChangeDetectorRef) {
|
|
||||||
super(translate, _ref);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, describe, expect, beforeEachProviders, beforeEach, inject } from '@angular/core/testing';
|
import { it, describe, expect, beforeEachProviders, beforeEach, inject } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './activiti-process.service';
|
import { ActivitiProcessService } from './activiti-process.service';
|
||||||
@@ -50,3 +51,4 @@ describe('ActivitiProcessService', () => {
|
|||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -16,28 +16,29 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
|
||||||
"zone.js": "0.6.12",
|
|
||||||
"license-check": "1.1.5",
|
|
||||||
"material-design-icons": "2.2.3",
|
"material-design-icons": "2.2.3",
|
||||||
"material-design-lite": "1.1.3",
|
"material-design-lite": "1.2.1",
|
||||||
"ng2-translate": "2.2.2",
|
"ng2-translate": "2.5.0",
|
||||||
|
|
||||||
"alfresco-js-api": "^0.3.0",
|
"alfresco-js-api": "^0.3.0",
|
||||||
"ng2-alfresco-datatable": "^0.3.0",
|
"ng2-alfresco-datatable": "^0.3.0",
|
||||||
"ng2-alfresco-core": "^0.3.0"
|
"ng2-alfresco-core": "^0.3.0",
|
||||||
|
"ng2-activiti-tasklist": "0.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
"concurrently": "^2.2.0",
|
"concurrently": "^2.2.0",
|
||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"tslint": "3.8.1",
|
"tslint": "3.8.1",
|
||||||
|
"license-check": "1.1.5",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.2",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,12 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { NgModule, Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { ALFRESCO_CORE_PROVIDERS, AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
|
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
|
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
|
||||||
|
|
||||||
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'activiti-tasklist-demo',
|
selector: 'activiti-tasklist-demo',
|
||||||
@@ -45,8 +48,7 @@ import { ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
|
|||||||
styles: [
|
styles: [
|
||||||
':host > .container {padding: 10px}',
|
':host > .container {padding: 10px}',
|
||||||
'.p-10 { padding: 10px; }'
|
'.p-10 { padding: 10px; }'
|
||||||
],
|
]
|
||||||
directives: [ALFRESCO_TASKLIST_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
class ActivitiTaskListDemo implements OnInit {
|
class ActivitiTaskListDemo implements OnInit {
|
||||||
|
|
||||||
@@ -105,8 +107,16 @@ class ActivitiTaskListDemo implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(ActivitiTaskListDemo, [
|
@NgModule({
|
||||||
HTTP_PROVIDERS,
|
imports: [
|
||||||
ATIVITI_FORM_PROVIDERS,
|
BrowserModule,
|
||||||
ALFRESCO_CORE_PROVIDERS]
|
CoreModule.forRoot(),
|
||||||
);
|
DataTableModule,
|
||||||
|
ActivitiTaskListModule
|
||||||
|
],
|
||||||
|
declarations: [ ActivitiTaskListDemo ],
|
||||||
|
bootstrap: [ ActivitiTaskListDemo ]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
||||||
|
|
||||||
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
|||||||
@@ -2,58 +2,66 @@
|
|||||||
* System configuration for Angular 2 samples
|
* System configuration for Angular 2 samples
|
||||||
* Adjust as necessary for your application needs.
|
* Adjust as necessary for your application needs.
|
||||||
*/
|
*/
|
||||||
(function(global) {
|
(function (global) {
|
||||||
|
System.config({
|
||||||
|
paths: {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'node_modules/'
|
||||||
|
},
|
||||||
// map tells the System loader where to look for things
|
// map tells the System loader where to look for things
|
||||||
var map = {
|
map: {
|
||||||
'app': 'dist', // 'dist',
|
// our app is within the app folder
|
||||||
'@angular': 'node_modules/@angular',
|
app: 'dist',
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
// angular bundles
|
||||||
'rxjs': 'node_modules/rxjs',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist',
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable/dist',
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
'ng2-activiti-form': 'node_modules/ng2-activiti-form/dist',
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
'ng2-activiti-tasklist': 'node_modules/ng2-activiti-tasklist/dist'
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
};
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist'
|
||||||
|
},
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
packages: {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
app: {
|
||||||
'rxjs': { defaultExtension: 'js' },
|
main: './main.js',
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
rxjs: {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
'ng2-translate': { defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-datatable': { main: 'index.js', defaultExtension: 'js' },
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-activiti-form': { main: 'index.js', defaultExtension: 'js' },
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-activiti-tasklist': { main: 'index.js', defaultExtension: 'js' }
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
};
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
var ngPackageNames = [
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'common',
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
'compiler',
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
'core',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'http',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'platform-browser',
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'platform-browser-dynamic',
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
|
||||||
'router',
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
'router-deprecated',
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}
|
||||||
'upgrade'
|
|
||||||
];
|
|
||||||
// Individual files (~300 requests):
|
|
||||||
function packIndex(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
}
|
}
|
||||||
// Bundled (~40 requests):
|
});
|
||||||
function packUmd(pkgName) {
|
|
||||||
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
|
|
||||||
}
|
|
||||||
// Most environments should use UMD; some (Karma) need the individual index files
|
|
||||||
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
|
|
||||||
// Add package entries for angular packages
|
|
||||||
ngPackageNames.forEach(setPackageConfig);
|
|
||||||
var config = {
|
|
||||||
map: map,
|
|
||||||
packages: packages
|
|
||||||
};
|
|
||||||
System.config(config);
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|||||||
@@ -15,24 +15,70 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ActivitiApps } from './src/components/activiti-apps.component';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
import { ActivitiStartProcessButton } from './src/components/activiti-start-task.component';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskList } from './src/components/activiti-tasklist.component';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
import { ActivitiTaskDetails } from './src/components/activiti-task-details.component';
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
import { ActivitiFilters } from './src/components/activiti-filters.component';
|
|
||||||
import { NoTaskDetailsTemplateComponent } from './src/components/no-task-detail-template.component';
|
|
||||||
|
|
||||||
export * from './src/components/activiti-apps.component';
|
import {
|
||||||
export * from './src/components/activiti-tasklist.component';
|
ActivitiApps,
|
||||||
export * from './src/components/activiti-start-task.component';
|
ActivitiTaskList,
|
||||||
|
ActivitiTaskDetails,
|
||||||
|
ActivitiFilters,
|
||||||
|
NoTaskDetailsTemplateComponent,
|
||||||
|
ActivitiChecklist,
|
||||||
|
ActivitiComments,
|
||||||
|
ActivitiPeople,
|
||||||
|
ActivitiTaskHeader,
|
||||||
|
ActivitiStartProcessButton
|
||||||
|
} from './src/components/index';
|
||||||
|
|
||||||
|
import { ActivitiTaskListService } from './src/services/activiti-tasklist.service';
|
||||||
|
|
||||||
|
export * from './src/components/index';
|
||||||
export * from './src/services/activiti-tasklist.service';
|
export * from './src/services/activiti-tasklist.service';
|
||||||
export * from './src/models/filter.model';
|
export * from './src/models/filter.model';
|
||||||
|
|
||||||
export const ALFRESCO_TASKLIST_DIRECTIVES: [any] = [
|
export const ACTIVITI_TASKLIST_DIRECTIVES: any[] = [
|
||||||
NoTaskDetailsTemplateComponent,
|
NoTaskDetailsTemplateComponent,
|
||||||
ActivitiApps,
|
ActivitiApps,
|
||||||
ActivitiFilters,
|
ActivitiFilters,
|
||||||
ActivitiStartProcessButton,
|
|
||||||
ActivitiTaskList,
|
ActivitiTaskList,
|
||||||
ActivitiTaskDetails
|
ActivitiTaskDetails,
|
||||||
|
ActivitiChecklist,
|
||||||
|
ActivitiComments,
|
||||||
|
ActivitiPeople,
|
||||||
|
ActivitiTaskHeader,
|
||||||
|
ActivitiStartProcessButton
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
||||||
|
ActivitiTaskListService
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CoreModule,
|
||||||
|
DataTableModule,
|
||||||
|
ActivitiFormModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...ACTIVITI_TASKLIST_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_TASKLIST_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...ACTIVITI_TASKLIST_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class ActivitiTaskListModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: ActivitiTaskListModule,
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_TASKLIST_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,105 +5,122 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
|
|||||||
|
|
||||||
__karma__.loaded = function() {};
|
__karma__.loaded = function() {};
|
||||||
|
|
||||||
|
var builtPath = '/base/dist/';
|
||||||
|
|
||||||
|
function isJsFile(path) {
|
||||||
|
return path.slice(-3) == '.js';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSpecFile(path) {
|
||||||
|
return /\.spec\.(.*\.)?js$/.test(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBuiltFile(path) {
|
||||||
|
return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var allSpecFiles = Object.keys(window.__karma__.files)
|
||||||
|
.filter(isSpecFile)
|
||||||
|
.filter(isBuiltFile);
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'base/node_modules/'
|
||||||
|
};
|
||||||
|
|
||||||
var map = {
|
var map = {
|
||||||
'app': 'base/dist',
|
'app': 'base/dist',
|
||||||
'rxjs': 'base/node_modules/rxjs',
|
// angular bundles
|
||||||
'@angular': 'base/node_modules/@angular',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'ng2-translate' : '/base/node_modules/ng2-translate',
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-alfresco-core': '/base/node_modules/ng2-alfresco-core/dist',
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
'ng2-alfresco-datatable': '/base/node_modules/ng2-alfresco-datatable/dist'
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
// testing
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
|
||||||
};
|
};
|
||||||
|
|
||||||
var packages = {
|
var packages = {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
'rxjs': { defaultExtension: 'js' },
|
'rxjs': { defaultExtension: 'js' },
|
||||||
'ng2-translate': { defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-datatable': { main: 'index.js', defaultExtension: 'js' }
|
|
||||||
};
|
|
||||||
|
|
||||||
var packageNames = [
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||||
'@angular/common',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/compiler',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/core',
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/http',
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser',
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser-dynamic',
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router-deprecated',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/testing',
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/upgrade'
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
];
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
|
||||||
packageNames.forEach(function(pkgName) {
|
|
||||||
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
});
|
|
||||||
|
|
||||||
packages['base/dist'] = {
|
|
||||||
defaultExtension: 'js',
|
|
||||||
format: 'register',
|
|
||||||
map: Object.keys(window.__karma__.files).filter(onlyAppFiles).reduce(createPathRecords, {})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
|
paths: paths,
|
||||||
map: map,
|
map: map,
|
||||||
packages: packages
|
packages: packages
|
||||||
};
|
};
|
||||||
|
|
||||||
System.config(config);
|
System.config(config);
|
||||||
|
|
||||||
System.import('@angular/platform-browser/src/browser/browser_adapter')
|
System.import('@angular/core/testing')
|
||||||
.then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); })
|
.then(initTestBed)
|
||||||
.then(function () {
|
.then(initTesting);
|
||||||
|
|
||||||
|
function initTestBed(){
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
System.import('@angular/core/testing'),
|
System.import('@angular/core/testing'),
|
||||||
System.import('@angular/platform-browser-dynamic/testing')
|
System.import('@angular/platform-browser-dynamic/testing')
|
||||||
])
|
])
|
||||||
})
|
|
||||||
.then(function (providers) {
|
.then(function (providers) {
|
||||||
var testing = providers[0];
|
var coreTesting = providers[0];
|
||||||
var testingBrowser = providers[1];
|
var browserTesting = providers[1];
|
||||||
|
|
||||||
testing.setBaseTestProviders(
|
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
|
||||||
|
|
||||||
|
coreTesting.TestBed.initTestEnvironment(
|
||||||
|
browserTesting.BrowserDynamicTestingModule,
|
||||||
|
browserTesting.platformBrowserDynamicTesting());
|
||||||
})
|
})
|
||||||
.then(function() { return Promise.all(resolveTestFiles()); })
|
|
||||||
.then(
|
|
||||||
function() {
|
|
||||||
__karma__.start();
|
|
||||||
},
|
|
||||||
function(error) {
|
|
||||||
if(typeof __karma__.error == 'function') {
|
|
||||||
__karma__.error(error.stack || error);
|
|
||||||
}else{
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
function createPathRecords(pathsMapping, appPath) {
|
|
||||||
var pathParts = appPath.split('/');
|
|
||||||
var moduleName = './' + pathParts.slice(Math.max(pathParts.length - 2, 1)).join('/');
|
|
||||||
moduleName = moduleName.replace(/\.js$/, '');
|
|
||||||
pathsMapping[moduleName] = appPath + '?' + window.__karma__.files[appPath];
|
|
||||||
return pathsMapping;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onlyAppFiles(filePath) {
|
// Import all spec files and start karma
|
||||||
return /\/base\/dist\/(?!.*\.spec\.js$).*\.js$/.test(filePath);
|
function initTesting () {
|
||||||
}
|
return Promise.all(
|
||||||
|
allSpecFiles.map(function (moduleName) {
|
||||||
function onlySpecFiles(path) {
|
|
||||||
return /\.spec\.js$/.test(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveTestFiles() {
|
|
||||||
return Object.keys(window.__karma__.files) // All files served by Karma.
|
|
||||||
.filter(onlySpecFiles)
|
|
||||||
.map(function(moduleName) {
|
|
||||||
// loads all spec files via their global module names (e.g.
|
|
||||||
// 'base/dist/vg-player/vg-player.spec')
|
|
||||||
return System.import(moduleName);
|
return System.import(moduleName);
|
||||||
});
|
})
|
||||||
|
)
|
||||||
|
.then(__karma__.start, __karma__.error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,26 +7,56 @@ module.exports = function (config) {
|
|||||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
// paths loaded by Karma
|
// System.js for module loading
|
||||||
{pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: true},
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
|
|
||||||
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: true},
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.map', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/@angular/**/*.map', included: false, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, served: true, watched: false},
|
|
||||||
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
|
|
||||||
|
|
||||||
{pattern: 'karma-test-shim.js', included: true, watched: true},
|
// Polyfills
|
||||||
|
'node_modules/core-js/client/shim.js',
|
||||||
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
|
|
||||||
|
// zone.js
|
||||||
|
'node_modules/zone.js/dist/zone.js',
|
||||||
|
'node_modules/zone.js/dist/long-stack-trace-zone.js',
|
||||||
|
'node_modules/zone.js/dist/proxy.js',
|
||||||
|
'node_modules/zone.js/dist/sync-test.js',
|
||||||
|
'node_modules/zone.js/dist/jasmine-patch.js',
|
||||||
|
'node_modules/zone.js/dist/async-test.js',
|
||||||
|
'node_modules/zone.js/dist/fake-async-test.js',
|
||||||
|
|
||||||
|
// RxJs
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
||||||
|
|
||||||
|
// Paths loaded via module imports:
|
||||||
|
// Angular itself
|
||||||
|
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'karma-test-shim.js',
|
||||||
|
|
||||||
// paths loaded via module imports
|
// paths loaded via module imports
|
||||||
{pattern: 'dist/**/*.js', included: false, watched: true},
|
{pattern: 'dist/**/*.js', included: false, watched: true},
|
||||||
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
||||||
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
||||||
|
|
||||||
|
// ng2-components
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
|
||||||
// paths to support debugging with source maps in dev tools
|
// paths to support debugging with source maps in dev tools
|
||||||
{pattern: 'src/**/*.ts', included: false, watched: false},
|
{pattern: 'src/**/*.ts', included: false, watched: false},
|
||||||
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
||||||
@@ -77,7 +107,7 @@ module.exports = function (config) {
|
|||||||
// Source files that you wanna generate coverage for.
|
// Source files that you wanna generate coverage for.
|
||||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'dist/**/!(*spec).js': ['coverage']
|
// 'dist/**/!(*spec).js': ['coverage']
|
||||||
},
|
},
|
||||||
|
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
|
|||||||
@@ -48,22 +48,22 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"ng2-translate": "2.5.0",
|
||||||
"zone.js": "0.6.12",
|
|
||||||
"ng2-translate": "2.2.2",
|
|
||||||
"ng2-alfresco-core": "0.3.2",
|
"ng2-alfresco-core": "0.3.2",
|
||||||
"ng2-alfresco-datatable": "0.3.2",
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
"ng2-activiti-form": "0.3.3",
|
"ng2-activiti-form": "0.3.3",
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
"remap-istanbul": "0.6.3",
|
"remap-istanbul": "0.6.3",
|
||||||
"traceur": "0.0.91",
|
"traceur": "0.0.91",
|
||||||
"tslint": "3.8.1",
|
"tslint": "3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
"license-check-config": {
|
"license-check-config": {
|
||||||
|
|||||||
@@ -15,12 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
import { ActivitiFilters } from './activiti-filters.component';
|
import { ActivitiFilters } from './activiti-filters.component';
|
||||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||||
|
|||||||
+1
-2
@@ -27,8 +27,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-start-task',
|
selector: 'activiti-start-task',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-start-task.component.html',
|
templateUrl: './activiti-start-task.component.html',
|
||||||
styleUrls: ['./activiti-start-task.component.css'],
|
styleUrls: ['./activiti-start-task.component.css']
|
||||||
providers: [ActivitiTaskListService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiStartProcessButton implements OnInit {
|
export class ActivitiStartProcessButton implements OnInit {
|
||||||
|
|
||||||
|
|||||||
+2
-8
@@ -18,13 +18,9 @@
|
|||||||
import { Component, Input, OnInit, ViewChild, Output, EventEmitter, TemplateRef, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild, Output, EventEmitter, TemplateRef, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { ActivitiTaskHeader } from './activiti-task-header.component';
|
|
||||||
import { ActivitiComments } from './activiti-comments.component';
|
|
||||||
import { ActivitiChecklist } from './activiti-checklist.component';
|
|
||||||
import { ActivitiPeople } from './activiti-people.component';
|
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { User } from '../models/user.model';
|
import { User } from '../models/user.model';
|
||||||
import { ActivitiForm, FormModel, FormService } from 'ng2-activiti-form';
|
import { FormModel, FormService } from 'ng2-activiti-form';
|
||||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
|
|
||||||
|
|
||||||
@@ -35,9 +31,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-task-details',
|
selector: 'activiti-task-details',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-task-details.component.html',
|
templateUrl: './activiti-task-details.component.html',
|
||||||
styleUrls: ['./activiti-task-details.component.css'],
|
styleUrls: ['./activiti-task-details.component.css']
|
||||||
providers: [ActivitiTaskListService, FormService],
|
|
||||||
directives: [ActivitiTaskHeader, ActivitiPeople, ActivitiComments, ActivitiChecklist, ActivitiForm]
|
|
||||||
})
|
})
|
||||||
export class ActivitiTaskDetails implements OnInit, OnChanges {
|
export class ActivitiTaskDetails implements OnInit, OnChanges {
|
||||||
|
|
||||||
|
|||||||
+1
-7
@@ -15,12 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
import { ActivitiTaskList } from './activiti-tasklist.component';
|
import { ActivitiTaskList } from './activiti-tasklist.component';
|
||||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||||
@@ -74,7 +68,7 @@ describe('ActivitiTaskList', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
let activitiSerevice = new ActivitiTaskListService(null);
|
let activitiSerevice = new ActivitiTaskListService(null);
|
||||||
taskList = new ActivitiTaskList(null, null, activitiSerevice);
|
taskList = new ActivitiTaskList(null, activitiSerevice);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use the default schemaColumn as default', () => {
|
it('should use the default schemaColumn as default', () => {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ALFRESCO_DATATABLE_DIRECTIVES, ObjectDataTableAdapter, DataTableAdapter, DataRowEvent, ObjectDataRow } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter, DataTableAdapter, DataRowEvent, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { UserTaskFilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { UserTaskFilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
|
|
||||||
@@ -28,9 +28,7 @@ declare let __moduleName: string;
|
|||||||
selector: 'activiti-tasklist',
|
selector: 'activiti-tasklist',
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
templateUrl: './activiti-tasklist.component.html',
|
templateUrl: './activiti-tasklist.component.html',
|
||||||
styleUrls: ['./activiti-tasklist.component.css'],
|
styleUrls: ['./activiti-tasklist.component.css']
|
||||||
directives: [ALFRESCO_DATATABLE_DIRECTIVES],
|
|
||||||
providers: [ActivitiTaskListService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiTaskList implements OnInit, OnChanges {
|
export class ActivitiTaskList implements OnInit, OnChanges {
|
||||||
|
|
||||||
@@ -58,16 +56,8 @@ export class ActivitiTaskList implements OnInit, OnChanges {
|
|||||||
{type: 'text', key: 'created', title: 'Created', sortable: true}
|
{type: 'text', key: 'created', title: 'Created', sortable: true}
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
* Constructor
|
|
||||||
* @param auth
|
|
||||||
* @param translate
|
|
||||||
* @param translate
|
|
||||||
*/
|
|
||||||
constructor(private auth: AlfrescoAuthenticationService,
|
|
||||||
private translate: AlfrescoTranslationService,
|
|
||||||
public activiti: ActivitiTaskListService) {
|
public activiti: ActivitiTaskListService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
translate.addTranslationFolder('node_modules/ng2-activiti-tasklist/src');
|
translate.addTranslationFolder('node_modules/ng2-activiti-tasklist/src');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from './activiti-apps.component';
|
||||||
|
export * from './activiti-tasklist.component';
|
||||||
|
export * from './activiti-checklist.component';
|
||||||
|
export * from './activiti-comments.component';
|
||||||
|
export * from './activiti-people.component';
|
||||||
|
export * from './activiti-task-header.component';
|
||||||
|
export * from './no-task-detail-template.component';
|
||||||
|
export * from './activiti-filters.component';
|
||||||
|
export * from './activiti-task-details.component';
|
||||||
|
export * from './activiti-start-task.component';
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||||
import { ActivitiTaskListService } from './activiti-tasklist.service';
|
import { ActivitiTaskListService } from './activiti-tasklist.service';
|
||||||
import { AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
@@ -511,4 +512,4 @@ describe('ActivitiTaskListService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { HttpModule, Http } from '@angular/http';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
@@ -24,19 +30,59 @@ import {
|
|||||||
AlfrescoContentService
|
AlfrescoContentService
|
||||||
} from './src/services/index';
|
} from './src/services/index';
|
||||||
|
|
||||||
import { ContextMenuService } from './src/components/context-menu/context-menu.service';
|
import { MATERIAL_DESIGN_DIRECTIVES } from './src/components/material/index';
|
||||||
|
import { CONTEXT_MENU_PROVIDERS, CONTEXT_MENU_DIRECTIVES } from './src/components/context-menu/index';
|
||||||
|
|
||||||
export * from './src/services/index';
|
export * from './src/services/index';
|
||||||
export * from './src/components/index';
|
export * from './src/components/index';
|
||||||
export * from './src/utils/index';
|
export * from './src/utils/index';
|
||||||
|
|
||||||
export const ALFRESCO_CORE_PROVIDERS: [any] = [
|
export const ALFRESCO_CORE_PROVIDERS: any[] = [
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoTranslationLoader,
|
AlfrescoTranslationLoader,
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
ContextMenuService
|
...CONTEXT_MENU_PROVIDERS
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
HttpModule,
|
||||||
|
TranslateModule.forRoot({
|
||||||
|
provide: TranslateLoader,
|
||||||
|
useFactory: (http) => new AlfrescoTranslationLoader(http),
|
||||||
|
deps: [Http]
|
||||||
|
})
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...MATERIAL_DESIGN_DIRECTIVES,
|
||||||
|
...CONTEXT_MENU_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...ALFRESCO_CORE_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
HttpModule,
|
||||||
|
TranslateModule,
|
||||||
|
...MATERIAL_DESIGN_DIRECTIVES,
|
||||||
|
...CONTEXT_MENU_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class CoreModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: CoreModule,
|
||||||
|
providers: [
|
||||||
|
...ALFRESCO_CORE_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,102 +5,122 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
|
|||||||
|
|
||||||
__karma__.loaded = function() {};
|
__karma__.loaded = function() {};
|
||||||
|
|
||||||
|
var builtPath = '/base/dist/';
|
||||||
|
|
||||||
|
function isJsFile(path) {
|
||||||
|
return path.slice(-3) == '.js';
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSpecFile(path) {
|
||||||
|
return /\.spec\.(.*\.)?js$/.test(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBuiltFile(path) {
|
||||||
|
return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var allSpecFiles = Object.keys(window.__karma__.files)
|
||||||
|
.filter(isSpecFile)
|
||||||
|
.filter(isBuiltFile);
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
// paths serve as alias
|
||||||
|
'npm:': 'base/node_modules/'
|
||||||
|
};
|
||||||
|
|
||||||
var map = {
|
var map = {
|
||||||
'app': 'base/dist',
|
'app': 'base/dist',
|
||||||
'rxjs': 'base/node_modules/rxjs',
|
// angular bundles
|
||||||
'@angular': 'base/node_modules/@angular',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
'ng2-translate' : '/base/node_modules/ng2-translate'
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||||
|
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||||
|
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||||
|
// testing
|
||||||
|
'@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js',
|
||||||
|
'@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js',
|
||||||
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
|
|
||||||
|
// other libraries
|
||||||
|
'rxjs': 'npm:rxjs',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
|
||||||
};
|
};
|
||||||
|
|
||||||
var packages = {
|
var packages = {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||||
'rxjs': { defaultExtension: 'js' },
|
'rxjs': { defaultExtension: 'js' },
|
||||||
'alfresco-js-api' : { main: 'alfresco-js-api.js', defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-translate': { defaultExtension: 'js' }
|
|
||||||
};
|
|
||||||
|
|
||||||
var packageNames = [
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||||
'@angular/common',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/compiler',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/core',
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/http',
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser',
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/platform-browser-dynamic',
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/router-deprecated',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/testing',
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular/upgrade'
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
];
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
|
||||||
packageNames.forEach(function(pkgName) {
|
|
||||||
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
|
|
||||||
});
|
|
||||||
|
|
||||||
packages['base/dist'] = {
|
|
||||||
defaultExtension: 'js',
|
|
||||||
format: 'register',
|
|
||||||
map: Object.keys(window.__karma__.files).filter(onlyAppFiles).reduce(createPathRecords, {})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
|
paths: paths,
|
||||||
map: map,
|
map: map,
|
||||||
packages: packages
|
packages: packages
|
||||||
};
|
};
|
||||||
|
|
||||||
System.config(config);
|
System.config(config);
|
||||||
|
|
||||||
System.import('@angular/platform-browser/src/browser/browser_adapter')
|
System.import('@angular/core/testing')
|
||||||
.then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); })
|
.then(initTestBed)
|
||||||
.then(function () {
|
.then(initTesting);
|
||||||
|
|
||||||
|
function initTestBed(){
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
System.import('@angular/core/testing'),
|
System.import('@angular/core/testing'),
|
||||||
System.import('@angular/platform-browser-dynamic/testing')
|
System.import('@angular/platform-browser-dynamic/testing')
|
||||||
])
|
])
|
||||||
})
|
|
||||||
.then(function (providers) {
|
.then(function (providers) {
|
||||||
var testing = providers[0];
|
var coreTesting = providers[0];
|
||||||
var testingBrowser = providers[1];
|
var browserTesting = providers[1];
|
||||||
|
|
||||||
testing.setBaseTestProviders(
|
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
|
||||||
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
|
||||||
|
|
||||||
|
coreTesting.TestBed.initTestEnvironment(
|
||||||
|
browserTesting.BrowserDynamicTestingModule,
|
||||||
|
browserTesting.platformBrowserDynamicTesting());
|
||||||
})
|
})
|
||||||
.then(function() { return Promise.all(resolveTestFiles()); })
|
|
||||||
.then(
|
|
||||||
function() {
|
|
||||||
__karma__.start();
|
|
||||||
},
|
|
||||||
function(error) {
|
|
||||||
if(typeof __karma__.error == 'function') {
|
|
||||||
__karma__.error(error.stack || error);
|
|
||||||
}else{
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
function createPathRecords(pathsMapping, appPath) {
|
|
||||||
var pathParts = appPath.split('/');
|
|
||||||
var moduleName = './' + pathParts.slice(Math.max(pathParts.length - 2, 1)).join('/');
|
|
||||||
moduleName = moduleName.replace(/\.js$/, '');
|
|
||||||
pathsMapping[moduleName] = appPath + '?' + window.__karma__.files[appPath];
|
|
||||||
return pathsMapping;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onlyAppFiles(filePath) {
|
// Import all spec files and start karma
|
||||||
return /\/base\/dist\/(?!.*\.spec\.js$).*\.js$/.test(filePath);
|
function initTesting () {
|
||||||
}
|
return Promise.all(
|
||||||
|
allSpecFiles.map(function (moduleName) {
|
||||||
function onlySpecFiles(path) {
|
|
||||||
return /\.spec\.js$/.test(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveTestFiles() {
|
|
||||||
return Object.keys(window.__karma__.files) // All files served by Karma.
|
|
||||||
.filter(onlySpecFiles)
|
|
||||||
.map(function(moduleName) {
|
|
||||||
// loads all spec files via their global module names (e.g.
|
|
||||||
// 'base/dist/vg-player/vg-player.spec')
|
|
||||||
return System.import(moduleName);
|
return System.import(moduleName);
|
||||||
});
|
})
|
||||||
|
)
|
||||||
|
.then(__karma__.start, __karma__.error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,25 +7,56 @@ module.exports = function (config) {
|
|||||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
// paths loaded by Karma
|
// System.js for module loading
|
||||||
{pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: true},
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
|
|
||||||
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: true},
|
|
||||||
{pattern: 'node_modules/zone.js/dist/async-test.js', included: true, watched: true},
|
|
||||||
|
|
||||||
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
|
// Polyfills
|
||||||
{pattern: 'node_modules/rxjs/**/*.map', included: false, watched: false},
|
'node_modules/core-js/client/shim.js',
|
||||||
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
|
|
||||||
|
// zone.js
|
||||||
|
'node_modules/zone.js/dist/zone.js',
|
||||||
|
'node_modules/zone.js/dist/long-stack-trace-zone.js',
|
||||||
|
'node_modules/zone.js/dist/proxy.js',
|
||||||
|
'node_modules/zone.js/dist/sync-test.js',
|
||||||
|
'node_modules/zone.js/dist/jasmine-patch.js',
|
||||||
|
'node_modules/zone.js/dist/async-test.js',
|
||||||
|
'node_modules/zone.js/dist/fake-async-test.js',
|
||||||
|
|
||||||
|
// RxJs
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
|
||||||
|
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
|
||||||
|
|
||||||
|
// Paths loaded via module imports:
|
||||||
|
// Angular itself
|
||||||
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
|
||||||
{pattern: 'node_modules/@angular/**/*.map', included: false, watched: false},
|
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false},
|
||||||
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
|
|
||||||
|
|
||||||
{pattern: 'karma-test-shim.js', included: true, watched: true},
|
'node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||||
|
{pattern: 'node_modules/ng2-translate/**/*.js.map', included: false, watched: false},
|
||||||
|
|
||||||
|
'karma-test-shim.js',
|
||||||
|
|
||||||
// paths loaded via module imports
|
// paths loaded via module imports
|
||||||
{pattern: 'dist/**/*.js', included: false, watched: true},
|
{pattern: 'dist/**/*.js', included: false, watched: true},
|
||||||
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.html', included: true, served: true, watched: true},
|
||||||
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
|
||||||
|
|
||||||
|
// ng2-components
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
|
||||||
|
|
||||||
// paths to support debugging with source maps in dev tools
|
// paths to support debugging with source maps in dev tools
|
||||||
{pattern: 'src/**/*.ts', included: false, watched: false},
|
{pattern: 'src/**/*.ts', included: false, watched: false},
|
||||||
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
{pattern: 'dist/**/*.js.map', included: false, watched: false}
|
||||||
@@ -76,7 +107,7 @@ module.exports = function (config) {
|
|||||||
// Source files that you wanna generate coverage for.
|
// Source files that you wanna generate coverage for.
|
||||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
'dist/**/!(*spec).js': ['coverage']
|
//'dist/**/!(*spec).js': ['coverage']
|
||||||
},
|
},
|
||||||
|
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
|
|||||||
@@ -53,23 +53,23 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alfresco-js-api": "^0.3.0",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"core-js": "^2.4.1",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"alfresco-js-api": "^0.3.0",
|
||||||
"zone.js": "0.6.12",
|
"ng2-translate": "2.5.0"
|
||||||
"ng2-translate": "2.2.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"traceur": "0.0.91",
|
"traceur": "0.0.91",
|
||||||
"tslint": "3.8.1",
|
"tslint": "3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
"license-check-config": {
|
"license-check-config": {
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContextMenuService } from './context-menu.service';
|
import { ContextMenuService } from './context-menu.service';
|
||||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||||
|
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContextMenuDirective } from './context-menu.directive';
|
import { ContextMenuDirective } from './context-menu.directive';
|
||||||
import { ContextMenuService } from './context-menu.service';
|
import { ContextMenuService } from './context-menu.service';
|
||||||
|
|
||||||
|
|||||||
-1
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContextMenuService } from './context-menu.service';
|
import { ContextMenuService } from './context-menu.service';
|
||||||
|
|
||||||
describe('ContextMenuService', () => {
|
describe('ContextMenuService', () => {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, beforeEach, afterEach } from '@angular/core/testing';
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||||
import { AlfrescoAuthenticationService } from './AlfrescoAuthentication.service';
|
import { AlfrescoAuthenticationService } from './AlfrescoAuthentication.service';
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, it, beforeEach} from '@angular/core/testing';
|
|
||||||
import {ReflectiveInjector} from '@angular/core';
|
import {ReflectiveInjector} from '@angular/core';
|
||||||
import {AlfrescoSettingsService} from './AlfrescoSettings.service';
|
import {AlfrescoSettingsService} from './AlfrescoSettings.service';
|
||||||
import {AlfrescoAuthenticationService} from './AlfrescoAuthentication.service';
|
import {AlfrescoAuthenticationService} from './AlfrescoAuthentication.service';
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||||
|
|
||||||
describe('AlfrescoSettingsService', () => {
|
describe('AlfrescoSettingsService', () => {
|
||||||
|
|||||||
@@ -15,26 +15,35 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable, Optional } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MissingTranslationHandler, TranslateService } from 'ng2-translate/ng2-translate';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
import { TranslateService } from 'ng2-translate/ng2-translate';
|
||||||
import { AlfrescoTranslationLoader } from './AlfrescoTranslationLoader.service';
|
import { AlfrescoTranslationLoader } from './AlfrescoTranslationLoader.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AlfrescoTranslationService extends TranslateService {
|
export class AlfrescoTranslationService {
|
||||||
userLang: string = 'en' ;
|
userLang: string = 'en' ;
|
||||||
|
|
||||||
constructor(public currentLoader: AlfrescoTranslationLoader, @Optional() missingTranslationHandler: MissingTranslationHandler) {
|
constructor(private translate: TranslateService) {
|
||||||
super(currentLoader, missingTranslationHandler);
|
|
||||||
this.userLang = navigator.language.split('-')[0]; // use navigator lang if available
|
this.userLang = navigator.language.split('-')[0]; // use navigator lang if available
|
||||||
this.userLang = /(fr|en)/gi.test(this.userLang) ? this.userLang : 'en';
|
this.userLang = /(fr|en)/gi.test(this.userLang) ? this.userLang : 'en';
|
||||||
this.setDefaultLang(this.userLang);
|
translate.setDefaultLang(this.userLang);
|
||||||
}
|
}
|
||||||
|
|
||||||
addTranslationFolder(name: string = '') {
|
addTranslationFolder(name: string = '') {
|
||||||
if (!this.currentLoader.existComponent(name)) {
|
let loader = <AlfrescoTranslationLoader> this.translate.currentLoader;
|
||||||
this.currentLoader.addComponentList(name);
|
if (!loader.existComponent(name)) {
|
||||||
this.getTranslation(this.userLang);
|
loader.addComponentList(name);
|
||||||
|
this.translate.getTranslation(this.userLang);
|
||||||
}
|
}
|
||||||
this.use(this.userLang);
|
this.translate.use(this.userLang);
|
||||||
|
}
|
||||||
|
|
||||||
|
use(lang: string): Observable<any> {
|
||||||
|
return this.translate.use(lang);
|
||||||
|
}
|
||||||
|
|
||||||
|
get(key: string|Array<string>, interpolateParams?: Object): Observable<string|any> {
|
||||||
|
return this.translate.get(key, interpolateParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export * from './AlfrescoApi.service';
|
|||||||
export * from './AlfrescoSettings.service';
|
export * from './AlfrescoSettings.service';
|
||||||
export * from './AlfrescoTranslationLoader.service';
|
export * from './AlfrescoTranslationLoader.service';
|
||||||
export * from './AlfrescoTranslation.service';
|
export * from './AlfrescoTranslation.service';
|
||||||
export * from './AlfrescoPipeTranslate.service';
|
|
||||||
export * from './AlfrescoAuthentication.service';
|
export * from './AlfrescoAuthentication.service';
|
||||||
export * from './AlfrescoContent.service';
|
export * from './AlfrescoContent.service';
|
||||||
export * from './renditions.service';
|
export * from './renditions.service';
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
/*
|
||||||
|
import { inject, TestBed } from '@angular/core/testing';
|
||||||
import { RenditionsService } from './renditions.service';
|
import { RenditionsService } from './renditions.service';
|
||||||
import { AlfrescoApiService } from './AlfrescoApi.service';
|
import { AlfrescoApiService } from './AlfrescoApi.service';
|
||||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||||
@@ -84,20 +85,23 @@ describe('RenditionsService', () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEachProviders(() => {
|
beforeEach(() => {
|
||||||
return [
|
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
providers: [
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
RenditionsService
|
RenditionsService
|
||||||
];
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(inject([RenditionsService, AlfrescoApiService], (renditionsService: RenditionsService, apiService: AlfrescoApiService) => {
|
inject([RenditionsService, AlfrescoApiService], (renditionsService: RenditionsService, apiService: AlfrescoApiService) => {
|
||||||
jasmine.Ajax.install();
|
jasmine.Ajax.install();
|
||||||
service = renditionsService;
|
service = renditionsService;
|
||||||
apiService.setInstance(new AlfrescoApi({}));
|
apiService.setInstance(new AlfrescoApi({}));
|
||||||
}));
|
});
|
||||||
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jasmine.Ajax.uninstall();
|
jasmine.Ajax.uninstall();
|
||||||
@@ -172,3 +176,4 @@ describe('RenditionsService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|||||||
@@ -15,11 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
import { ObjectUtils } from './object-utils';
|
import { ObjectUtils } from './object-utils';
|
||||||
|
|
||||||
describe('ObjectUtils', () => {
|
describe('ObjectUtils', () => {
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
],
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf dist node_modules typings",
|
"clean": "rimraf dist node_modules",
|
||||||
"postinstall": "npm run typings && npm run build",
|
"postinstall": "npm run build",
|
||||||
"typings": "typings install",
|
|
||||||
"build": "npm run tslint && rimraf dist && npm run tsc",
|
"build": "npm run tslint && rimraf dist && npm run tsc",
|
||||||
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ",
|
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ",
|
||||||
"server": "wsrv -o -l -s",
|
"server": "wsrv -o -l -s",
|
||||||
@@ -23,25 +22,29 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
|
||||||
"zone.js": "0.6.12",
|
|
||||||
"license-check": "1.1.5",
|
"license-check": "1.1.5",
|
||||||
|
|
||||||
|
"ng2-translate": "2.5.0",
|
||||||
|
"ng2-alfresco-core": "0.3.2",
|
||||||
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
|
|
||||||
"material-design-icons": "2.2.3",
|
"material-design-icons": "2.2.3",
|
||||||
"material-design-lite": "1.1.3"
|
"material-design-lite": "1.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
@@ -49,7 +52,7 @@
|
|||||||
"concurrently": "^2.2.0",
|
"concurrently": "^2.2.0",
|
||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"tslint": "3.8.1",
|
"tslint": "3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user