mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
committed by
Denys Vuika
parent
473241f792
commit
9655e51943
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AlfrescoTranslateService, AuthService, SettingsService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare var document: any;
|
declare var document: any;
|
||||||
|
|
||||||
@@ -32,10 +32,10 @@ export class AppComponent {
|
|||||||
ecmHost: string = 'http://' + window.location.hostname + ':8080';
|
ecmHost: string = 'http://' + window.location.hostname + ':8080';
|
||||||
bpmHost: string = 'http://' + window.location.hostname + ':9999';
|
bpmHost: string = 'http://' + window.location.hostname + ':9999';
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
this.setEcmHost();
|
this.setEcmHost();
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
import { AuthService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { DocumentActionsService, DocumentListComponent, ContentActionHandler, DocumentActionModel, FolderActionModel } from 'ng2-alfresco-documentlist';
|
import { DocumentActionsService, DocumentListComponent, ContentActionHandler, DocumentActionModel, FolderActionModel } from 'ng2-alfresco-documentlist';
|
||||||
import { FormService } from 'ng2-activiti-form';
|
import { FormService } from 'ng2-activiti-form';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ export class FilesComponent implements OnInit {
|
|||||||
documentList: DocumentListComponent;
|
documentList: DocumentListComponent;
|
||||||
|
|
||||||
constructor(private documentActions: DocumentActionsService,
|
constructor(private documentActions: DocumentActionsService,
|
||||||
private authService: AuthService,
|
private authService: AlfrescoAuthenticationService,
|
||||||
private formService: FormService,
|
private formService: FormService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, EventEmitter, Output } from '@angular/core';
|
import { Component, EventEmitter, Output } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AuthService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -34,7 +34,7 @@ export class SearchBarComponent {
|
|||||||
expand = new EventEmitter();
|
expand = new EventEmitter();
|
||||||
|
|
||||||
constructor(public router: Router,
|
constructor(public router: Router,
|
||||||
public authService: AuthService) {
|
public authService: AlfrescoAuthenticationService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoggedIn(): boolean {
|
isLoggedIn(): boolean {
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { SettingsService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-setting-demo',
|
selector: 'alfresco-setting-demo',
|
||||||
@@ -28,7 +28,7 @@ export class SettingComponent {
|
|||||||
ecmHost: string;
|
ecmHost: string;
|
||||||
bpmHost: string;
|
bpmHost: string;
|
||||||
|
|
||||||
constructor(private settingsService: SettingsService,
|
constructor(private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
this.ecmHost = this.settingsService.ecmHost;
|
this.ecmHost = this.settingsService.ecmHost;
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { NgModule, Component, OnInit } from '@angular/core';
|
import { NgModule, Component, OnInit } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { CoreModule, SettingsService, AuthService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
import { AnalyticsModule } from 'ng2-activiti-analytics';
|
import { AnalyticsModule } from 'ng2-activiti-analytics';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -57,8 +57,8 @@ export class AnalyticsDemoComponent implements OnInit {
|
|||||||
host: string = 'http://localhost:9999';
|
host: string = 'http://localhost:9999';
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||||
import { AnalyticsReportHeatMapComponent } from '../components/analytics-report-heat-map.component';
|
import { AnalyticsReportHeatMapComponent } from '../components/analytics-report-heat-map.component';
|
||||||
import { WIDGET_DIRECTIVES } from '../components/widgets/index';
|
import { WIDGET_DIRECTIVES } from '../components/widgets/index';
|
||||||
@@ -57,7 +57,7 @@ describe('AnalyticsReportHeatMapComponent', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { AnalyticsService } from '../services/analytics.service';
|
import { AnalyticsService } from '../services/analytics.service';
|
||||||
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
|
|||||||
currentMetricColors: string;
|
currentMetricColors: string;
|
||||||
metricType: string;
|
metricType: string;
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private analyticsService: AnalyticsService,
|
private analyticsService: AnalyticsService,
|
||||||
private formBuilder: FormBuilder) {
|
private formBuilder: FormBuilder) {
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component';
|
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component';
|
||||||
import { AnalyticsService } from '../services/analytics.service';
|
import { AnalyticsService } from '../services/analytics.service';
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ describe('AnalyticsReportListComponent', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { AnalyticsReportParametersComponent } from '../components/analytics-report-parameters.component';
|
import { AnalyticsReportParametersComponent } from '../components/analytics-report-parameters.component';
|
||||||
import { WIDGET_DIRECTIVES } from '../components/widgets/index';
|
import { WIDGET_DIRECTIVES } from '../components/widgets/index';
|
||||||
@@ -53,7 +53,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { Component, EventEmitter, OnInit, OnChanges, Input, Output, SimpleChanges, OnDestroy, AfterViewChecked } from '@angular/core';
|
import { Component, EventEmitter, OnInit, OnChanges, Input, Output, SimpleChanges, OnDestroy, AfterViewChecked } from '@angular/core';
|
||||||
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { AnalyticsService } from '../services/analytics.service';
|
import { AnalyticsService } from '../services/analytics.service';
|
||||||
import { ReportParametersModel, ReportQuery, ParameterValueModel, ReportParameterDetailsModel } from '../models/report.model';
|
import { ReportParametersModel, ReportQuery, ParameterValueModel, ReportParameterDetailsModel } from '../models/report.model';
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
|||||||
private paramOpts;
|
private paramOpts;
|
||||||
private isEditable: boolean = false;
|
private isEditable: boolean = false;
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private analyticsService: AnalyticsService,
|
private analyticsService: AnalyticsService,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CHART_DIRECTIVES } from 'ng2-charts/ng2-charts';
|
import { CHART_DIRECTIVES } from 'ng2-charts/ng2-charts';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||||
|
|
||||||
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component';
|
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component';
|
||||||
@@ -70,7 +70,7 @@ describe('AnalyticsComponent', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, OnChanges, Input, Output, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, OnChanges, Input, Output, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { AnalyticsService } from '../services/analytics.service';
|
import { AnalyticsService } from '../services/analytics.service';
|
||||||
import { ReportQuery } from '../models/report.model';
|
import { ReportQuery } from '../models/report.model';
|
||||||
import { Chart } from '../models/chart.model';
|
import { Chart } from '../models/chart.model';
|
||||||
@@ -70,7 +70,7 @@ export class AnalyticsComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private analyticsService: AnalyticsService,
|
private analyticsService: AnalyticsService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
logService.info('AnalyticsComponent');
|
logService.info('AnalyticsComponent');
|
||||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AuthService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -48,8 +48,8 @@ export class DiagramDemoComponent {
|
|||||||
host: string = 'http://localhost:9999';
|
host: string = 'http://localhost:9999';
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { DIAGRAM_DIRECTIVES, DIAGRAM_PROVIDERS } from './index';
|
import { DIAGRAM_DIRECTIVES, DIAGRAM_PROVIDERS } from './index';
|
||||||
import { RAPHAEL_DIRECTIVES, RAPHAEL_PROVIDERS } from './raphael/index';
|
import { RAPHAEL_DIRECTIVES, RAPHAEL_PROVIDERS } from './raphael/index';
|
||||||
@@ -56,7 +56,7 @@ describe('Test ng2-activiti-diagrams ', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
...DIAGRAM_PROVIDERS,
|
...DIAGRAM_PROVIDERS,
|
||||||
...RAPHAEL_PROVIDERS,
|
...RAPHAEL_PROVIDERS,
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ElementRef, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';
|
import { Component, ElementRef, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { DiagramsService } from '../services/diagrams.service';
|
import { DiagramsService } from '../services/diagrams.service';
|
||||||
import { DiagramColorService } from '../services/diagram-color.service';
|
import { DiagramColorService } from '../services/diagram-color.service';
|
||||||
import { RaphaelService } from './raphael/raphael.service';
|
import { RaphaelService } from './raphael/raphael.service';
|
||||||
@@ -59,7 +59,7 @@ export class DiagramComponent {
|
|||||||
private diagram: DiagramModel;
|
private diagram: DiagramModel;
|
||||||
|
|
||||||
constructor(private elementRef: ElementRef,
|
constructor(private elementRef: ElementRef,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private diagramColorService: DiagramColorService,
|
private diagramColorService: DiagramColorService,
|
||||||
private raphaelService: RaphaelService,
|
private raphaelService: RaphaelService,
|
||||||
private diagramsService: DiagramsService,
|
private diagramsService: DiagramsService,
|
||||||
|
@@ -18,14 +18,14 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { Response, Http, Headers, RequestOptions } from '@angular/http';
|
import { Response, Http, Headers, RequestOptions } from '@angular/http';
|
||||||
import { AuthService, SettingsService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, LogService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DiagramsService {
|
export class DiagramsService {
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private http: Http,
|
private http: Http,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { NgModule, Component, OnInit } from '@angular/core';
|
import { NgModule, Component, OnInit } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { CoreModule, SettingsService, AuthService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -47,8 +47,8 @@ export class FormDemoComponent implements OnInit {
|
|||||||
host: string = 'http://localhost:9999';
|
host: string = 'http://localhost:9999';
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@@ -25,7 +25,7 @@ import { WIDGET_DIRECTIVES } from './widgets/index';
|
|||||||
import { FormService } from './../services/form.service';
|
import { FormService } from './../services/form.service';
|
||||||
import { EcmModelService } from './../services/ecm-model.service';
|
import { EcmModelService } from './../services/ecm-model.service';
|
||||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
|
|
||||||
describe('ActivitiStartForm', () => {
|
describe('ActivitiStartForm', () => {
|
||||||
@@ -48,7 +48,7 @@ describe('ActivitiStartForm', () => {
|
|||||||
...WIDGET_DIRECTIVES
|
...WIDGET_DIRECTIVES
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
EcmModelService,
|
EcmModelService,
|
||||||
FormService,
|
FormService,
|
||||||
WidgetVisibilityService
|
WidgetVisibilityService
|
||||||
|
@@ -26,7 +26,7 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
EventEmitter
|
EventEmitter
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiForm } from './activiti-form.component';
|
import { ActivitiForm } from './activiti-form.component';
|
||||||
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';
|
||||||
@@ -75,7 +75,7 @@ export class ActivitiStartForm extends ActivitiForm implements AfterViewChecked,
|
|||||||
@ViewChild('outcomesContainer', {})
|
@ViewChild('outcomesContainer', {})
|
||||||
outcomesContainer: ElementRef = null;
|
outcomesContainer: ElementRef = null;
|
||||||
|
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
formService: FormService,
|
formService: FormService,
|
||||||
visibilityService: WidgetVisibilityService,
|
visibilityService: WidgetVisibilityService,
|
||||||
logService: LogService) {
|
logService: LogService) {
|
||||||
|
@@ -28,7 +28,7 @@ import {
|
|||||||
ActivitiStartProcessInstance,
|
ActivitiStartProcessInstance,
|
||||||
ProcessInstance
|
ProcessInstance
|
||||||
} from 'ng2-activiti-processlist';
|
} from 'ng2-activiti-processlist';
|
||||||
import { AuthService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
const currentProcessIdNew = '__NEW__';
|
const currentProcessIdNew = '__NEW__';
|
||||||
@@ -160,8 +160,8 @@ class MyDemoApp implements OnInit {
|
|||||||
|
|
||||||
dataProcesses: ObjectDataTableAdapter;
|
dataProcesses: ObjectDataTableAdapter;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, Output, EventEmitter, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Output, EventEmitter, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { Observable, Observer } from 'rxjs/Rx';
|
import { Observable, Observer } from 'rxjs/Rx';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { FilterProcessRepresentationModel } from './../models/filter-process.model';
|
import { FilterProcessRepresentationModel } from './../models/filter-process.model';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
|
|||||||
|
|
||||||
filters: FilterProcessRepresentationModel [] = [];
|
filters: FilterProcessRepresentationModel [] = [];
|
||||||
|
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private activiti: ActivitiProcessService,
|
private activiti: ActivitiProcessService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
this.filter$ = new Observable<FilterProcessRepresentationModel>(observer => this.filterObserver = observer).share();
|
this.filter$ = new Observable<FilterProcessRepresentationModel>(observer => this.filterObserver = observer).share();
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
|
|
||||||
import { ActivitiProcessComments } from './activiti-process-comments.component';
|
import { ActivitiProcessComments } from './activiti-process-comments.component';
|
||||||
@@ -46,7 +46,7 @@ describe('ActivitiProcessInstanceComments', () => {
|
|||||||
ActivitiProcessComments
|
ActivitiProcessComments
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
ActivitiProcessService
|
ActivitiProcessService
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, Output, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } 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 'ng2-activiti-tasklist';
|
import { Comment } from 'ng2-activiti-tasklist';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observer } from 'rxjs/Observer';
|
||||||
@@ -56,7 +56,7 @@ export class ActivitiProcessComments implements OnChanges {
|
|||||||
* @param translate Translation service
|
* @param translate Translation service
|
||||||
* @param activitiProcess Process service
|
* @param activitiProcess Process service
|
||||||
*/
|
*/
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule, FormService } from 'ng2-activiti-form';
|
import { ActivitiFormModule, FormService } from 'ng2-activiti-form';
|
||||||
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
|
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ describe('ActivitiProcessInstanceDetails', () => {
|
|||||||
ActivitiProcessInstanceDetails
|
ActivitiProcessInstanceDetails
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
ActivitiProcessService
|
ActivitiProcessService
|
||||||
],
|
],
|
||||||
schemas: [ NO_ERRORS_SCHEMA ]
|
schemas: [ NO_ERRORS_SCHEMA ]
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, ViewChild, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, ViewChild, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { TaskDetailsEvent } from 'ng2-activiti-tasklist';
|
import { TaskDetailsEvent } from 'ng2-activiti-tasklist';
|
||||||
|
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
@@ -60,7 +60,7 @@ export class ActivitiProcessInstanceDetails implements OnChanges {
|
|||||||
* @param translate Translation service
|
* @param translate Translation service
|
||||||
* @param activitiProcess Process service
|
* @param activitiProcess Process service
|
||||||
*/
|
*/
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private activitiProcess: ActivitiProcessService,
|
private activitiProcess: ActivitiProcessService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessInstanceHeader } from './activiti-process-instance-header.component';
|
import { ActivitiProcessInstanceHeader } from './activiti-process-instance-header.component';
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
import { exampleProcess } from './../assets/activiti-process.model.mock';
|
import { exampleProcess } from './../assets/activiti-process.model.mock';
|
||||||
@@ -42,7 +42,7 @@ describe('ActivitiProcessInstanceHeader', () => {
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
ActivitiProcessService,
|
ActivitiProcessService,
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ProcessInstance } from '../models/process-instance.model';
|
import { ProcessInstance } from '../models/process-instance.model';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ export class ActivitiProcessInstanceHeader {
|
|||||||
@Output()
|
@Output()
|
||||||
onError: EventEmitter<any> = new EventEmitter<any>();
|
onError: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { TaskDetailsModel } from 'ng2-activiti-tasklist';
|
import { TaskDetailsModel } from 'ng2-activiti-tasklist';
|
||||||
|
|
||||||
import { ActivitiProcessInstanceTasks } from './activiti-process-instance-tasks.component';
|
import { ActivitiProcessInstanceTasks } from './activiti-process-instance-tasks.component';
|
||||||
@@ -49,7 +49,7 @@ describe('ActivitiProcessInstanceTasks', () => {
|
|||||||
ActivitiProcessInstanceTasks
|
ActivitiProcessInstanceTasks
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
ActivitiProcessService
|
ActivitiProcessService
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { Component, Input, OnInit, ViewChild, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { Observable, Observer } from 'rxjs/Rx';
|
import { Observable, Observer } from 'rxjs/Rx';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
import { TaskDetailsModel, TaskDetailsEvent } from 'ng2-activiti-tasklist';
|
import { TaskDetailsModel, TaskDetailsEvent } from 'ng2-activiti-tasklist';
|
||||||
import { ProcessInstance } from '../models/process-instance.model';
|
import { ProcessInstance } from '../models/process-instance.model';
|
||||||
@@ -64,7 +64,7 @@ export class ActivitiProcessInstanceTasks implements OnInit, OnChanges {
|
|||||||
@Output()
|
@Output()
|
||||||
taskClick: EventEmitter<TaskDetailsEvent> = new EventEmitter<TaskDetailsEvent>();
|
taskClick: EventEmitter<TaskDetailsEvent> = new EventEmitter<TaskDetailsEvent>();
|
||||||
|
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private activitiProcess: ActivitiProcessService,
|
private activitiProcess: ActivitiProcessService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { DataTableModule, ObjectDataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
import { DataTableModule, ObjectDataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
import { ActivitiProcessInstanceVariables } from './activiti-process-instance-variables.component';
|
import { ActivitiProcessInstanceVariables } from './activiti-process-instance-variables.component';
|
||||||
@@ -47,7 +47,7 @@ describe('ActivitiProcessInstanceVariables', () => {
|
|||||||
ActivitiProcessInstanceVariables
|
ActivitiProcessInstanceVariables
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
ActivitiProcessService
|
ActivitiProcessService
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, DebugElement, EventEmitter, Input, Output, OnInit, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, DebugElement, EventEmitter, Input, Output, OnInit, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
|
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter, DataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter, DataTableAdapter, ObjectDataRow } from 'ng2-alfresco-datatable';
|
||||||
import { ProcessInstanceVariable } from './../models/process-instance-variable.model';
|
import { ProcessInstanceVariable } from './../models/process-instance-variable.model';
|
||||||
import { ActivitiProcessService } from './../services/activiti-process.service';
|
import { ActivitiProcessService } from './../services/activiti-process.service';
|
||||||
@@ -67,7 +67,7 @@ export class ActivitiProcessInstanceVariables implements OnInit, OnChanges {
|
|||||||
* @param translate Translation service
|
* @param translate Translation service
|
||||||
* @param activitiProcess Process service
|
* @param activitiProcess Process service
|
||||||
*/
|
*/
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core
|
|||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { ActivitiProcessInstanceListComponent } from './activiti-processlist.component';
|
import { ActivitiProcessInstanceListComponent } from './activiti-processlist.component';
|
||||||
|
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { DataTableModule, ObjectDataRow, DataRowEvent, ObjectDataTableAdapter, DataSorting } from 'ng2-alfresco-datatable';
|
import { DataTableModule, ObjectDataRow, DataRowEvent, ObjectDataTableAdapter, DataSorting } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
@@ -65,7 +65,7 @@ describe('ActivitiProcessInstanceListComponent', () => {
|
|||||||
declarations: [ ActivitiProcessInstanceListComponent ],
|
declarations: [ ActivitiProcessInstanceListComponent ],
|
||||||
providers: [
|
providers: [
|
||||||
ActivitiProcessService,
|
ActivitiProcessService,
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
fixture = TestBed.createComponent(ActivitiProcessInstanceListComponent);
|
fixture = TestBed.createComponent(ActivitiProcessInstanceListComponent);
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter, DataTableAdapter, DataRowEvent, ObjectDataRow, DataSorting } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter, DataTableAdapter, DataRowEvent, ObjectDataRow, DataSorting } from 'ng2-alfresco-datatable';
|
||||||
import { ProcessFilterRequestRepresentation } from '../models/process-instance-filter.model';
|
import { ProcessFilterRequestRepresentation } from '../models/process-instance-filter.model';
|
||||||
import { ProcessInstance } from '../models/process-instance.model';
|
import { ProcessInstance } from '../models/process-instance.model';
|
||||||
@@ -69,7 +69,7 @@ export class ActivitiProcessInstanceListComponent implements OnInit, OnChanges {
|
|||||||
];
|
];
|
||||||
|
|
||||||
constructor(private processService: ActivitiProcessService,
|
constructor(private processService: ActivitiProcessService,
|
||||||
private translate: AlfrescoTranslateService) {
|
private translate: AlfrescoTranslationService) {
|
||||||
if (translate !== null) {
|
if (translate !== null) {
|
||||||
translate.addTranslationFolder('ng2-activiti-processlist', 'node_modules/ng2-activiti-processlist/src');
|
translate.addTranslationFolder('ng2-activiti-processlist', 'node_modules/ng2-activiti-processlist/src');
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { AlfrescoTranslateService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule, FormService } from 'ng2-activiti-form';
|
import { ActivitiFormModule, FormService } from 'ng2-activiti-form';
|
||||||
|
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
@@ -49,7 +49,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
ActivitiStartProcessInstance
|
ActivitiStartProcessInstance
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslateService, useClass: TranslationMock },
|
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||||
ActivitiProcessService,
|
ActivitiProcessService,
|
||||||
FormService
|
FormService
|
||||||
]
|
]
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, Output, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiStartForm } from 'ng2-activiti-form';
|
import { ActivitiStartForm } from 'ng2-activiti-form';
|
||||||
import { ProcessInstance } from './../models/process-instance.model';
|
import { ProcessInstance } from './../models/process-instance.model';
|
||||||
import { ProcessDefinitionRepresentation } from './../models/process-definition.model';
|
import { ProcessDefinitionRepresentation } from './../models/process-definition.model';
|
||||||
@@ -53,7 +53,7 @@ export class ActivitiStartProcessInstance implements OnChanges {
|
|||||||
|
|
||||||
errorMessageId: string = '';
|
errorMessageId: string = '';
|
||||||
|
|
||||||
constructor(private translate: AlfrescoTranslateService,
|
constructor(private translate: AlfrescoTranslationService,
|
||||||
private activitiProcess: ActivitiProcessService) {
|
private activitiProcess: ActivitiProcessService) {
|
||||||
|
|
||||||
if (translate) {
|
if (translate) {
|
||||||
|
@@ -26,7 +26,7 @@ import {
|
|||||||
ActivitiTaskList
|
ActivitiTaskList
|
||||||
} from 'ng2-activiti-tasklist';
|
} from 'ng2-activiti-tasklist';
|
||||||
import { CoreModule, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, LogService } from 'ng2-alfresco-core';
|
||||||
import { AuthService, SettingsService, StorageService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -144,8 +144,8 @@ class MyDemoApp implements OnInit {
|
|||||||
|
|
||||||
dataTasks: ObjectDataTableAdapter;
|
dataTasks: ObjectDataTableAdapter;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
settingsService.bpmHost = this.host;
|
settingsService.bpmHost = this.host;
|
||||||
|
@@ -19,7 +19,7 @@ import { DebugElement } from '@angular/core';
|
|||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { ActivitiApps } from './activiti-apps.component';
|
import { ActivitiApps } from './activiti-apps.component';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
@@ -47,7 +47,7 @@ describe('ActivitiApps', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { AppDefinitionRepresentationModel } from '../models/filter.model';
|
import { AppDefinitionRepresentationModel } from '../models/filter.model';
|
||||||
import { IconModel } from '../models/icon.model';
|
import { IconModel } from '../models/icon.model';
|
||||||
@@ -65,7 +65,7 @@ export class ActivitiApps implements OnInit {
|
|||||||
* @param translate Translate service
|
* @param translate Translate service
|
||||||
* @param activitiTaskList Task service
|
* @param activitiTaskList Task service
|
||||||
*/
|
*/
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private activitiTaskList: ActivitiTaskListService) {
|
private activitiTaskList: ActivitiTaskListService) {
|
||||||
|
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||||
import { ActivitiChecklist } from './activiti-checklist.component';
|
import { ActivitiChecklist } from './activiti-checklist.component';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
@@ -49,7 +49,7 @@ describe('ActivitiChecklist', () => {
|
|||||||
ActivitiTaskListService
|
ActivitiTaskListService
|
||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => {
|
spyOn(translateService, 'get').and.callFake((key) => {
|
||||||
return Observable.of(key);
|
return Observable.of(key);
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit, ViewChild, OnChanges, SimpleChanges, EventEmitter, Output } from '@angular/core';
|
import { Component, Input, OnInit, ViewChild, OnChanges, SimpleChanges, EventEmitter, Output } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { Observer, Observable } from 'rxjs/Rx';
|
import { Observer, Observable } from 'rxjs/Rx';
|
||||||
@@ -59,7 +59,7 @@ export class ActivitiChecklist implements OnInit, OnChanges {
|
|||||||
* @param auth
|
* @param auth
|
||||||
* @param translate
|
* @param translate
|
||||||
*/
|
*/
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private activitiTaskList: ActivitiTaskListService,
|
private activitiTaskList: ActivitiTaskListService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule } from 'ng2-activiti-form';
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
|
|
||||||
import { ActivitiComments } from './activiti-comments.component';
|
import { ActivitiComments } from './activiti-comments.component';
|
||||||
@@ -49,7 +49,7 @@ describe('ActivitiComments', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, ViewChild, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, ViewChild, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { Comment } from '../models/comment.model';
|
import { Comment } from '../models/comment.model';
|
||||||
import { Observer, Observable } from 'rxjs/Rx';
|
import { Observer, Observable } from 'rxjs/Rx';
|
||||||
@@ -56,7 +56,7 @@ export class ActivitiComments implements OnChanges {
|
|||||||
* @param translate Translation service
|
* @param translate Translation service
|
||||||
* @param activitiTaskList Task service
|
* @param activitiTaskList Task service
|
||||||
*/
|
*/
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private activitiTaskList: ActivitiTaskListService) {
|
private activitiTaskList: ActivitiTaskListService) {
|
||||||
|
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, Output, EventEmitter, OnInit, Input, SimpleChanges, OnChanges } from '@angular/core';
|
import { Component, Output, EventEmitter, OnInit, Input, SimpleChanges, OnChanges } from '@angular/core';
|
||||||
import { Observer, Observable } from 'rxjs/Rx';
|
import { Observer, Observable } from 'rxjs/Rx';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { FilterRepresentationModel } from '../models/filter.model';
|
import { FilterRepresentationModel } from '../models/filter.model';
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ export class ActivitiFilters implements OnInit, OnChanges {
|
|||||||
|
|
||||||
filters: FilterRepresentationModel [] = [];
|
filters: FilterRepresentationModel [] = [];
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private activiti: ActivitiTaskListService,
|
private activiti: ActivitiTaskListService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
this.filter$ = new Observable<FilterRepresentationModel>(observer => this.filterObserver = observer).share();
|
this.filter$ = new Observable<FilterRepresentationModel>(observer => this.filterObserver = observer).share();
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiPeopleSearch } from './activiti-people-search.component';
|
import { ActivitiPeopleSearch } from './activiti-people-search.component';
|
||||||
import { User } from '../models/user.model';
|
import { User } from '../models/user.model';
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ describe('ActivitiPeopleSearch', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ import { Component, Input, Output, EventEmitter, OnInit, AfterViewInit } from '@
|
|||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { User } from '../models/user.model';
|
import { User } from '../models/user.model';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare let componentHandler: any;
|
declare let componentHandler: any;
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ export class ActivitiPeopleSearch implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
userList: User[] = [];
|
userList: User[] = [];
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService) {
|
constructor(private translateService: AlfrescoTranslationService) {
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'node_modules/ng2-activiti-tasklist/src');
|
translateService.addTranslationFolder('ng2-activiti-tasklist', 'node_modules/ng2-activiti-tasklist/src');
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
||||||
import { ActivitiPeople } from './activiti-people.component';
|
import { ActivitiPeople } from './activiti-people.component';
|
||||||
import { ActivitiPeopleSearch } from './activiti-people-search.component';
|
import { ActivitiPeopleSearch } from './activiti-people-search.component';
|
||||||
@@ -62,7 +62,7 @@ describe('ActivitiPeople', () => {
|
|||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
logService = TestBed.get(LogService);
|
logService = TestBed.get(LogService);
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, Input, ViewChild } from '@angular/core';
|
import { Component, Input, ViewChild } from '@angular/core';
|
||||||
import { Observer, Observable } from 'rxjs/Rx';
|
import { Observer, Observable } from 'rxjs/Rx';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { User } from '../models/user.model';
|
import { User } from '../models/user.model';
|
||||||
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
import { ActivitiPeopleService } from '../services/activiti-people.service';
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ export class ActivitiPeople {
|
|||||||
* @param translate
|
* @param translate
|
||||||
* @param people service
|
* @param people service
|
||||||
*/
|
*/
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private peopleService: ActivitiPeopleService,
|
private peopleService: ActivitiPeopleService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from '../services/activiti-tasklist.service';
|
||||||
import { ActivitiStartTaskButton } from './activiti-start-task.component';
|
import { ActivitiStartTaskButton } from './activiti-start-task.component';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ describe('ActivitiStartTaskButton', () => {
|
|||||||
ActivitiTaskListService
|
ActivitiTaskListService
|
||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
import { Form } from '../models/form.model';
|
import { Form } from '../models/form.model';
|
||||||
@@ -54,7 +54,7 @@ export class ActivitiStartTaskButton {
|
|||||||
* @param translate
|
* @param translate
|
||||||
* @param taskService
|
* @param taskService
|
||||||
*/
|
*/
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private taskService: ActivitiTaskListService,
|
private taskService: ActivitiTaskListService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiFormModule, FormModel, FormOutcomeEvent, FormOutcomeModel, FormService } from 'ng2-activiti-form';
|
import { ActivitiFormModule, FormModel, FormOutcomeEvent, FormOutcomeModel, FormService } from 'ng2-activiti-form';
|
||||||
|
|
||||||
import { ActivitiTaskDetails } from './activiti-task-details.component';
|
import { ActivitiTaskDetails } from './activiti-task-details.component';
|
||||||
@@ -57,7 +57,7 @@ describe('ActivitiTaskDetails', () => {
|
|||||||
schemas: [ NO_ERRORS_SCHEMA ]
|
schemas: [ NO_ERRORS_SCHEMA ]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit, ViewChild, Output, EventEmitter, TemplateRef, OnChanges, SimpleChanges, DebugElement} from '@angular/core';
|
import { Component, Input, OnInit, ViewChild, Output, EventEmitter, TemplateRef, OnChanges, SimpleChanges, DebugElement} from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
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';
|
||||||
@@ -93,7 +93,7 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
|||||||
* @param activitiForm Form service
|
* @param activitiForm Form service
|
||||||
* @param activitiTaskList Task service
|
* @param activitiTaskList Task service
|
||||||
*/
|
*/
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private activitiForm: FormService,
|
private activitiForm: FormService,
|
||||||
private activitiTaskList: ActivitiTaskListService,
|
private activitiTaskList: ActivitiTaskListService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
import { ActivitiTaskHeader } from './activiti-task-header.component';
|
import { ActivitiTaskHeader } from './activiti-task-header.component';
|
||||||
import { taskDetailsMock } from './../assets/task-details.mock';
|
import { taskDetailsMock } from './../assets/task-details.mock';
|
||||||
@@ -45,7 +45,7 @@ describe('ActivitiTaskHeader', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ export class ActivitiTaskHeader {
|
|||||||
@Output()
|
@Output()
|
||||||
claim: EventEmitter<any> = new EventEmitter<any>();
|
claim: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private activitiTaskService: ActivitiTaskListService,
|
private activitiTaskService: ActivitiTaskListService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { CoreModule, AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
import { ActivitiTaskList } from './activiti-tasklist.component';
|
import { ActivitiTaskList } from './activiti-tasklist.component';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
@@ -73,7 +73,7 @@ describe('ActivitiTaskList', () => {
|
|||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
let translateService = TestBed.get(AlfrescoTranslateService);
|
let translateService = TestBed.get(AlfrescoTranslationService);
|
||||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||||
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
spyOn(translateService, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||||
}));
|
}));
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { 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 { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
@@ -75,7 +75,7 @@ export class ActivitiTaskList implements OnInit, OnChanges {
|
|||||||
{type: 'text', key: 'created', title: 'Created', sortable: true}
|
{type: 'text', key: 'created', title: 'Created', sortable: true}
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService,
|
constructor(private translateService: AlfrescoTranslationService,
|
||||||
private taskListService: ActivitiTaskListService,
|
private taskListService: ActivitiTaskListService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -22,23 +22,18 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||||||
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
StorageService,
|
StorageService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoTranslateLoader,
|
AlfrescoTranslateLoader,
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
RenditionsService,
|
RenditionsService,
|
||||||
AuthGuard,
|
AuthGuard,
|
||||||
AuthGuardEcm,
|
AuthGuardEcm,
|
||||||
AuthGuardBpm,
|
AuthGuardBpm,
|
||||||
LogService, LogServiceMock,
|
LogService, LogServiceMock
|
||||||
|
|
||||||
/** @deprecated */ AlfrescoSettingsService,
|
|
||||||
/** @deprecated */ AlfrescoTranslationService,
|
|
||||||
/** @deprecated */ AlfrescoAuthenticationService,
|
|
||||||
/** @deprecated */ AlfrescoContentService
|
|
||||||
} from './src/services/index';
|
} from './src/services/index';
|
||||||
|
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from './src/components/material/index';
|
import { MATERIAL_DESIGN_DIRECTIVES } from './src/components/material/index';
|
||||||
@@ -50,23 +45,18 @@ export * from './src/utils/index';
|
|||||||
|
|
||||||
export const ALFRESCO_CORE_PROVIDERS: any[] = [
|
export const ALFRESCO_CORE_PROVIDERS: any[] = [
|
||||||
LogService, LogServiceMock,
|
LogService, LogServiceMock,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
StorageService,
|
StorageService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoTranslateLoader,
|
AlfrescoTranslateLoader,
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
RenditionsService,
|
RenditionsService,
|
||||||
AuthGuard,
|
AuthGuard,
|
||||||
AuthGuardEcm,
|
AuthGuardEcm,
|
||||||
AuthGuardBpm,
|
AuthGuardBpm,
|
||||||
...CONTEXT_MENU_PROVIDERS,
|
...CONTEXT_MENU_PROVIDERS
|
||||||
|
|
||||||
/** @deprecated */ AlfrescoAuthenticationService,
|
|
||||||
/** @deprecated */ AlfrescoContentService,
|
|
||||||
/** @deprecated */ AlfrescoSettingsService,
|
|
||||||
/** @deprecated */ AlfrescoTranslationService
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export function createTranslateLoader(http: Http, logService: LogService) {
|
export function createTranslateLoader(http: Http, logService: LogService) {
|
||||||
|
@@ -1,33 +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 { Injectable } from '@angular/core';
|
|
||||||
import { LogService } from './log.service';
|
|
||||||
import { SettingsService } from './settings.service';
|
|
||||||
import { StorageService } from './storage.service';
|
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
|
||||||
|
|
||||||
/** @deprecated AlfrescoAuthenticationService is deprecated. Use AuthService instead */
|
|
||||||
@Injectable()
|
|
||||||
export class AlfrescoAuthenticationService {
|
|
||||||
constructor(settingsService: SettingsService,
|
|
||||||
apiService: AlfrescoApiService,
|
|
||||||
storage: StorageService,
|
|
||||||
logService: LogService) {
|
|
||||||
logService.error('ERROR: AlfrescoAuthenticationService is deprecated. Use AuthService instead.');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,32 +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 { Injectable } from '@angular/core';
|
|
||||||
import { LogService } from './log.service';
|
|
||||||
import { AuthService } from './auth.service';
|
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
|
||||||
|
|
||||||
/** @deprecated AlfrescoContentService is deprecated. Use ContentService instead */
|
|
||||||
@Injectable()
|
|
||||||
export class AlfrescoContentService {
|
|
||||||
|
|
||||||
constructor(authService: AuthService,
|
|
||||||
apiService: AlfrescoApiService,
|
|
||||||
logService: LogService) {
|
|
||||||
logService.error('ERROR: AlfrescoContentService is deprecated. Use ContentService instead.');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,28 +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 { Injectable } from '@angular/core';
|
|
||||||
import { LogService } from './log.service';
|
|
||||||
|
|
||||||
/** @deprecated AlfrescoSettingsService is deprecated. Use SettingsService instead */
|
|
||||||
@Injectable()
|
|
||||||
export class AlfrescoSettingsService {
|
|
||||||
|
|
||||||
constructor(logService: LogService) {
|
|
||||||
logService.error('ERROR: AlfrescoSettingsService is deprecated. Use SettingsService instead.');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,31 +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 { Injectable } from '@angular/core';
|
|
||||||
import { TranslateService } from 'ng2-translate/ng2-translate';
|
|
||||||
import { LogService } from './log.service';
|
|
||||||
|
|
||||||
/** @deprecated AlfrescoTranslationService is deprecated. Use AlfrescoTranslateService instead */
|
|
||||||
@Injectable()
|
|
||||||
export class AlfrescoTranslationService {
|
|
||||||
|
|
||||||
constructor(translate: TranslateService,
|
|
||||||
logService: LogService) {
|
|
||||||
logService.error('ERROR: AlfrescoTranslationService is deprecated. Use AlfrescoTranslateService instead.');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -18,7 +18,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { AlfrescoApi } from 'alfresco-js-api';
|
import { AlfrescoApi } from 'alfresco-js-api';
|
||||||
import * as alfrescoApi from 'alfresco-js-api';
|
import * as alfrescoApi from 'alfresco-js-api';
|
||||||
import { SettingsService } from './settings.service';
|
import { AlfrescoSettingsService } from './alfresco-settings.service';
|
||||||
import { StorageService } from './storage.service';
|
import { StorageService } from './storage.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -44,7 +44,7 @@ export class AlfrescoApiService {
|
|||||||
return this.alfrescoApi;
|
return this.alfrescoApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private settingsService: SettingsService,
|
constructor(private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService) {
|
private storage: StorageService) {
|
||||||
|
|
||||||
this.provider = this.settingsService.getProviders();
|
this.provider = this.settingsService.getProviders();
|
||||||
|
@@ -16,31 +16,31 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { SettingsService } from './settings.service';
|
import { AlfrescoSettingsService } from './alfresco-settings.service';
|
||||||
import { AuthService } from './auth.service';
|
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
import { StorageService } from './storage.service';
|
import { StorageService } from './storage.service';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
describe('AuthService', () => {
|
describe('AlfrescoAuthenticationService', () => {
|
||||||
let injector;
|
let injector;
|
||||||
let authService: AuthService;
|
let authService: AlfrescoAuthenticationService;
|
||||||
let settingsService: SettingsService;
|
let settingsService: AlfrescoSettingsService;
|
||||||
let storage: StorageService;
|
let storage: StorageService;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
]);
|
]);
|
||||||
|
|
||||||
authService = injector.get(AuthService);
|
authService = injector.get(AlfrescoAuthenticationService);
|
||||||
settingsService = injector.get(SettingsService);
|
settingsService = injector.get(AlfrescoSettingsService);
|
||||||
storage = injector.get(StorageService);
|
storage = injector.get(StorageService);
|
||||||
storage.clear();
|
storage.clear();
|
||||||
|
|
@@ -17,17 +17,17 @@
|
|||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, Subject } from 'rxjs/Rx';
|
import { Observable, Subject } from 'rxjs/Rx';
|
||||||
import { SettingsService } from './settings.service';
|
import { AlfrescoSettingsService } from './alfresco-settings.service';
|
||||||
import { StorageService } from './storage.service';
|
import { StorageService } from './storage.service';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthService {
|
export class AlfrescoAuthenticationService {
|
||||||
loginSubject: Subject<any> = new Subject<any>();
|
loginSubject: Subject<any> = new Subject<any>();
|
||||||
logoutSubject: Subject<any> = new Subject<any>();
|
logoutSubject: Subject<any> = new Subject<any>();
|
||||||
|
|
||||||
constructor(private settingsService: SettingsService,
|
constructor(private settingsService: AlfrescoSettingsService,
|
||||||
public alfrescoApi: AlfrescoApiService,
|
public alfrescoApi: AlfrescoApiService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
@@ -16,20 +16,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { SettingsService } from './settings.service';
|
import { AlfrescoSettingsService } from './alfresco-settings.service';
|
||||||
import { AuthService } from './auth.service';
|
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
|
||||||
import { ContentService } from './content.service';
|
import { AlfrescoContentService } from './alfresco-content.service';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
import { StorageService } from './storage.service';
|
import { StorageService } from './storage.service';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
describe('ContentService', () => {
|
describe('AlfrescoContentService', () => {
|
||||||
|
|
||||||
let injector, contentService: ContentService;
|
let injector, contentService: AlfrescoContentService;
|
||||||
let authService: AuthService;
|
let authService: AlfrescoAuthenticationService;
|
||||||
let settingsService: SettingsService;
|
let settingsService: AlfrescoSettingsService;
|
||||||
let storage: StorageService;
|
let storage: StorageService;
|
||||||
let node: any;
|
let node: any;
|
||||||
|
|
||||||
@@ -38,16 +38,16 @@ describe('ContentService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
]);
|
]);
|
||||||
|
|
||||||
authService = injector.get(AuthService);
|
authService = injector.get(AlfrescoAuthenticationService);
|
||||||
settingsService = injector.get(SettingsService);
|
settingsService = injector.get(AlfrescoSettingsService);
|
||||||
contentService = injector.get(ContentService);
|
contentService = injector.get(AlfrescoContentService);
|
||||||
storage = injector.get(StorageService);
|
storage = injector.get(StorageService);
|
||||||
storage.clear();
|
storage.clear();
|
||||||
|
|
@@ -17,13 +17,13 @@
|
|||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { AuthService } from './auth.service';
|
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ContentService {
|
export class AlfrescoContentService {
|
||||||
|
|
||||||
constructor(public authService: AuthService,
|
constructor(public authService: AlfrescoAuthenticationService,
|
||||||
public apiService: AlfrescoApiService) {
|
public apiService: AlfrescoApiService) {
|
||||||
}
|
}
|
||||||
|
|
@@ -15,18 +15,18 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SettingsService } from './settings.service';
|
import { AlfrescoSettingsService } from './alfresco-settings.service';
|
||||||
|
|
||||||
describe('SettingsService', () => {
|
describe('AlfrescoSettingsService', () => {
|
||||||
|
|
||||||
let service: SettingsService;
|
let service: AlfrescoSettingsService;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
service = new SettingsService();
|
service = new AlfrescoSettingsService();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have default ECM host', () => {
|
it('should have default ECM host', () => {
|
||||||
expect(service.ecmHost).toBe(SettingsService.DEFAULT_ECM_ADDRESS);
|
expect(service.ecmHost).toBe(AlfrescoSettingsService.DEFAULT_ECM_ADDRESS);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change host ECM', () => {
|
it('should change host ECM', () => {
|
||||||
@@ -37,7 +37,7 @@ describe('SettingsService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have default BPM host', () => {
|
it('should have default BPM host', () => {
|
||||||
expect(service.bpmHost).toBe(SettingsService.DEFAULT_BPM_ADDRESS);
|
expect(service.bpmHost).toBe(AlfrescoSettingsService.DEFAULT_BPM_ADDRESS);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change host BPM', () => {
|
it('should change host BPM', () => {
|
@@ -19,7 +19,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs/Subject';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SettingsService {
|
export class AlfrescoSettingsService {
|
||||||
|
|
||||||
static DEFAULT_ECM_ADDRESS: string = 'http://' + window.location.hostname + ':8080';
|
static DEFAULT_ECM_ADDRESS: string = 'http://' + window.location.hostname + ':8080';
|
||||||
static DEFAULT_BPM_ADDRESS: string = 'http://' + window.location.hostname + ':9999';
|
static DEFAULT_BPM_ADDRESS: string = 'http://' + window.location.hostname + ':9999';
|
||||||
@@ -27,11 +27,11 @@ export class SettingsService {
|
|||||||
|
|
||||||
static DEFAULT_BPM_CONTEXT_PATH: string = '/activiti-app';
|
static DEFAULT_BPM_CONTEXT_PATH: string = '/activiti-app';
|
||||||
|
|
||||||
private _ecmHost: string = SettingsService.DEFAULT_ECM_ADDRESS;
|
private _ecmHost: string = AlfrescoSettingsService.DEFAULT_ECM_ADDRESS;
|
||||||
private _bpmHost: string = SettingsService.DEFAULT_BPM_ADDRESS;
|
private _bpmHost: string = AlfrescoSettingsService.DEFAULT_BPM_ADDRESS;
|
||||||
private _csrfDisabled: boolean = SettingsService.DEFAULT_CSRF_CONFIG;
|
private _csrfDisabled: boolean = AlfrescoSettingsService.DEFAULT_CSRF_CONFIG;
|
||||||
|
|
||||||
private _bpmContextPath = SettingsService.DEFAULT_BPM_CONTEXT_PATH;
|
private _bpmContextPath = AlfrescoSettingsService.DEFAULT_BPM_CONTEXT_PATH;
|
||||||
|
|
||||||
private providers: string = 'ALL'; // ECM, BPM , ALL
|
private providers: string = 'ALL'; // ECM, BPM , ALL
|
||||||
|
|
@@ -21,8 +21,8 @@ import { ResponseOptions, Response, XHRBackend, HttpModule } from '@angular/http
|
|||||||
import { MockBackend, MockConnection } from '@angular/http/testing';
|
import { MockBackend, MockConnection } from '@angular/http/testing';
|
||||||
import {getTestBed, TestBed} from '@angular/core/testing';
|
import {getTestBed, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { AlfrescoTranslateLoader } from './translate-loader.service';
|
import { AlfrescoTranslateLoader } from './alfresco-translate-loader.service';
|
||||||
import { AlfrescoTranslateService } from './translate.service';
|
import { AlfrescoTranslationService } from './alfresco-translation.service';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
|
|
||||||
let componentJson1 = ' {"TEST": "This is a test", "TEST2": "This is another test"} ' ;
|
let componentJson1 = ' {"TEST": "This is a test", "TEST2": "This is another test"} ' ;
|
||||||
@@ -34,7 +34,7 @@ const mockBackendResponse = (connection: MockConnection, response: string) => {
|
|||||||
describe('TranslateLoader', () => {
|
describe('TranslateLoader', () => {
|
||||||
let injector: Injector;
|
let injector: Injector;
|
||||||
let backend: MockBackend;
|
let backend: MockBackend;
|
||||||
let alfrescoTranslationService: AlfrescoTranslateService;
|
let alfrescoTranslationService: AlfrescoTranslationService;
|
||||||
let connection: MockConnection; // this will be set when a new connection is emitted from the backend.
|
let connection: MockConnection; // this will be set when a new connection is emitted from the backend.
|
||||||
let customLoader;
|
let customLoader;
|
||||||
|
|
||||||
@@ -48,14 +48,14 @@ describe('TranslateLoader', () => {
|
|||||||
})
|
})
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
LogService,
|
LogService,
|
||||||
{provide: XHRBackend, useClass: MockBackend}
|
{provide: XHRBackend, useClass: MockBackend}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
injector = getTestBed();
|
injector = getTestBed();
|
||||||
backend = injector.get(XHRBackend);
|
backend = injector.get(XHRBackend);
|
||||||
alfrescoTranslationService = injector.get(AlfrescoTranslateService);
|
alfrescoTranslationService = injector.get(AlfrescoTranslationService);
|
||||||
backend.connections.subscribe((c: MockConnection) => connection = c);
|
backend.connections.subscribe((c: MockConnection) => connection = c);
|
||||||
customLoader = alfrescoTranslationService.translate.currentLoader;
|
customLoader = alfrescoTranslationService.translate.currentLoader;
|
||||||
});
|
});
|
@@ -21,18 +21,18 @@ import { ResponseOptions, Response, XHRBackend, HttpModule } from '@angular/http
|
|||||||
import { MockBackend, MockConnection } from '@angular/http/testing';
|
import { MockBackend, MockConnection } from '@angular/http/testing';
|
||||||
import { getTestBed, TestBed } from '@angular/core/testing';
|
import { getTestBed, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { AlfrescoTranslateService } from './translate.service';
|
import { AlfrescoTranslationService } from './alfresco-translation.service';
|
||||||
import { AlfrescoTranslateLoader } from './translate-loader.service';
|
import { AlfrescoTranslateLoader } from './alfresco-translate-loader.service';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
|
|
||||||
const mockBackendResponse = (connection: MockConnection, response: string) => {
|
const mockBackendResponse = (connection: MockConnection, response: string) => {
|
||||||
connection.mockRespond(new Response(new ResponseOptions({body: response})));
|
connection.mockRespond(new Response(new ResponseOptions({body: response})));
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('AlfrescoTranslateService', () => {
|
describe('AlfrescoTranslationService', () => {
|
||||||
let injector: Injector;
|
let injector: Injector;
|
||||||
let backend: MockBackend;
|
let backend: MockBackend;
|
||||||
let alfrescoTranslationService: AlfrescoTranslateService;
|
let alfrescoTranslationService: AlfrescoTranslationService;
|
||||||
let connection: MockConnection; // this will be set when a new connection is emitted from the backend.
|
let connection: MockConnection; // this will be set when a new connection is emitted from the backend.
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -45,21 +45,21 @@ describe('AlfrescoTranslateService', () => {
|
|||||||
})
|
})
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
LogService,
|
LogService,
|
||||||
{provide: XHRBackend, useClass: MockBackend}
|
{provide: XHRBackend, useClass: MockBackend}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
injector = getTestBed();
|
injector = getTestBed();
|
||||||
backend = injector.get(XHRBackend);
|
backend = injector.get(XHRBackend);
|
||||||
alfrescoTranslationService = injector.get(AlfrescoTranslateService);
|
alfrescoTranslationService = injector.get(AlfrescoTranslationService);
|
||||||
backend.connections.subscribe((c: MockConnection) => connection = c);
|
backend.connections.subscribe((c: MockConnection) => connection = c);
|
||||||
alfrescoTranslationService.addTranslationFolder('fake-name', 'fake-path');
|
alfrescoTranslationService.addTranslationFolder('fake-name', 'fake-path');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('is defined', () => {
|
it('is defined', () => {
|
||||||
expect(AlfrescoTranslateService).toBeDefined();
|
expect(AlfrescoTranslationService).toBeDefined();
|
||||||
expect(alfrescoTranslationService instanceof AlfrescoTranslateService).toBeTruthy();
|
expect(alfrescoTranslationService instanceof AlfrescoTranslationService).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to get translations of the KEY: TEST', () => {
|
it('should be able to get translations of the KEY: TEST', () => {
|
@@ -18,10 +18,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { TranslateService } from 'ng2-translate/ng2-translate';
|
import { TranslateService } from 'ng2-translate/ng2-translate';
|
||||||
import { AlfrescoTranslateLoader } from './translate-loader.service';
|
import { AlfrescoTranslateLoader } from './alfresco-translate-loader.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AlfrescoTranslateService {
|
export class AlfrescoTranslationService {
|
||||||
userLang: string = 'en';
|
userLang: string = 'en';
|
||||||
customLoader: AlfrescoTranslateLoader;
|
customLoader: AlfrescoTranslateLoader;
|
||||||
|
|
@@ -22,11 +22,11 @@ import {
|
|||||||
RouterStateSnapshot
|
RouterStateSnapshot
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { AuthService } from './auth.service';
|
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthGuardBpm implements CanActivate, CanActivateChild {
|
export class AuthGuardBpm implements CanActivate, CanActivateChild {
|
||||||
constructor(private authService: AuthService, private router: Router) {}
|
constructor(private authService: AlfrescoAuthenticationService, private router: Router) {}
|
||||||
|
|
||||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||||
let url: string = state.url;
|
let url: string = state.url;
|
||||||
|
@@ -22,11 +22,11 @@ import {
|
|||||||
RouterStateSnapshot
|
RouterStateSnapshot
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { AuthService } from './auth.service';
|
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthGuardEcm implements CanActivate, CanActivateChild {
|
export class AuthGuardEcm implements CanActivate, CanActivateChild {
|
||||||
constructor(private authService: AuthService, private router: Router) {}
|
constructor(private authService: AlfrescoAuthenticationService, private router: Router) {}
|
||||||
|
|
||||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||||
let url: string = state.url;
|
let url: string = state.url;
|
||||||
|
@@ -22,11 +22,11 @@ import {
|
|||||||
RouterStateSnapshot
|
RouterStateSnapshot
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { AuthService } from './auth.service';
|
import { AlfrescoAuthenticationService } from './alfresco-authentication.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthGuard implements CanActivate, CanActivateChild {
|
export class AuthGuard implements CanActivate, CanActivateChild {
|
||||||
constructor(private authService: AuthService, private router: Router) {}
|
constructor(private authService: AlfrescoAuthenticationService, private router: Router) {}
|
||||||
|
|
||||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||||
let url: string = state.url;
|
let url: string = state.url;
|
||||||
|
@@ -17,18 +17,14 @@
|
|||||||
|
|
||||||
export * from './storage.service';
|
export * from './storage.service';
|
||||||
export * from './alfresco-api.service';
|
export * from './alfresco-api.service';
|
||||||
export * from './AlfrescoSettings.service';
|
export * from './alfresco-settings.service';
|
||||||
export * from './AlfrescoTranslation.service';
|
export * from './alfresco-content.service';
|
||||||
export * from './AlfrescoAuthentication.service';
|
|
||||||
export * from './AlfrescoContent.service';
|
|
||||||
export * from './renditions.service';
|
export * from './renditions.service';
|
||||||
export * from './auth-guard.service';
|
export * from './auth-guard.service';
|
||||||
export * from './auth-guard-ecm.service';
|
export * from './auth-guard-ecm.service';
|
||||||
export * from './auth-guard-bpm.service';
|
export * from './auth-guard-bpm.service';
|
||||||
|
|
||||||
export * from './log.service';
|
export * from './log.service';
|
||||||
export * from './auth.service';
|
export * from './alfresco-authentication.service';
|
||||||
export * from './content.service';
|
export * from './alfresco-translation.service';
|
||||||
export * from './settings.service';
|
export * from './alfresco-translate-loader.service';
|
||||||
export * from './translate.service';
|
|
||||||
export * from './translate-loader.service';
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
import { RenditionsService } from './renditions.service';
|
import { RenditionsService } from './renditions.service';
|
||||||
import { SettingsService } from './settings.service';
|
import { AlfrescoSettingsService } from './alfresco-settings.service';
|
||||||
import { StorageService } from './storage.service';
|
import { StorageService } from './storage.service';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
import { fakeRedition, fakeReditionCreated, fakeReditionsList } from '../assets/renditionsService.mock';
|
import { fakeRedition, fakeReditionCreated, fakeReditionsList } from '../assets/renditionsService.mock';
|
||||||
@@ -33,7 +33,7 @@ describe('RenditionsService', () => {
|
|||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
RenditionsService,
|
RenditionsService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
]);
|
]);
|
||||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, OnInit, ViewChild } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { DocumentListModule, DocumentListComponent, DocumentActionsService } from 'ng2-alfresco-documentlist';
|
import { DocumentListModule, DocumentListComponent, DocumentActionsService } from 'ng2-alfresco-documentlist';
|
||||||
import { CoreModule, StorageService, SettingsService, AuthService, AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, StorageService, AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-app-demo',
|
selector: 'alfresco-app-demo',
|
||||||
@@ -127,9 +127,9 @@ class DocumentListDemo implements OnInit {
|
|||||||
@ViewChild(DocumentListComponent)
|
@ViewChild(DocumentListComponent)
|
||||||
documentList: DocumentListComponent;
|
documentList: DocumentListComponent;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private documentActions: DocumentActionsService,
|
private documentActions: DocumentActionsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
@@ -20,9 +20,9 @@ import { NodePaging } from './../models/document-library.model';
|
|||||||
import { PageNode } from './document-library.model.mock';
|
import { PageNode } from './document-library.model.mock';
|
||||||
import { DocumentListService } from './../services/document-list.service';
|
import { DocumentListService } from './../services/document-list.service';
|
||||||
import {
|
import {
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
LogService
|
LogService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
@@ -34,9 +34,9 @@ export class DocumentListServiceMock extends DocumentListService {
|
|||||||
getFolderRejectError: string = 'Error';
|
getFolderRejectError: string = 'Error';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
settings?: SettingsService,
|
settings?: AlfrescoSettingsService,
|
||||||
authService?: AuthService,
|
authService?: AlfrescoAuthenticationService,
|
||||||
contentService?: ContentService,
|
contentService?: AlfrescoContentService,
|
||||||
apiService?: AlfrescoApiService,
|
apiService?: AlfrescoApiService,
|
||||||
logService?: LogService,
|
logService?: LogService,
|
||||||
) {
|
) {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { Component, OnInit, Input, OnChanges, Output, SimpleChanges, EventEmitter, AfterContentInit, TemplateRef, NgZone, ViewChild, HostListener } from '@angular/core';
|
import { Component, OnInit, Input, OnChanges, Output, SimpleChanges, EventEmitter, AfterContentInit, TemplateRef, NgZone, ViewChild, HostListener } from '@angular/core';
|
||||||
import { Subject } from 'rxjs/Rx';
|
import { Subject } from 'rxjs/Rx';
|
||||||
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { DataRowEvent, DataTableComponent, ObjectDataColumn } from 'ng2-alfresco-datatable';
|
import { DataRowEvent, DataTableComponent, ObjectDataColumn } from 'ng2-alfresco-datatable';
|
||||||
import { DocumentListService } from './../services/document-list.service';
|
import { DocumentListService } from './../services/document-list.service';
|
||||||
import { ContentActionModel } from './../models/content-action.model';
|
import { ContentActionModel } from './../models/content-action.model';
|
||||||
@@ -118,7 +118,7 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
|||||||
constructor(
|
constructor(
|
||||||
private documentListService: DocumentListService,
|
private documentListService: DocumentListService,
|
||||||
private ngZone: NgZone,
|
private ngZone: NgZone,
|
||||||
private translateService: AlfrescoTranslateService) {
|
private translateService: AlfrescoTranslationService) {
|
||||||
|
|
||||||
this.data = new ShareDataTableAdapter(this.documentListService, './', []);
|
this.data = new ShareDataTableAdapter(this.documentListService, './', []);
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
|
import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
|
|
||||||
import { DocumentListService } from './../services/document-list.service';
|
import { DocumentListService } from './../services/document-list.service';
|
||||||
@@ -53,7 +53,7 @@ export class DocumentMenuActionComponent {
|
|||||||
folderName: string = '';
|
folderName: string = '';
|
||||||
|
|
||||||
constructor(private documentListService: DocumentListService,
|
constructor(private documentListService: DocumentListService,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ContentService } from 'ng2-alfresco-core';
|
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||||
import { ContentActionHandler } from '../models/content-action.model';
|
import { ContentActionHandler } from '../models/content-action.model';
|
||||||
import { DocumentActionsService } from './document-actions.service';
|
import { DocumentActionsService } from './document-actions.service';
|
||||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
||||||
@@ -26,11 +26,11 @@ describe('DocumentActionsService', () => {
|
|||||||
|
|
||||||
let service: DocumentActionsService;
|
let service: DocumentActionsService;
|
||||||
let documentListService: DocumentListService;
|
let documentListService: DocumentListService;
|
||||||
let contentService: ContentService;
|
let contentService: AlfrescoContentService;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
documentListService = new DocumentListServiceMock();
|
documentListService = new DocumentListServiceMock();
|
||||||
contentService = new ContentService(null, null);
|
contentService = new AlfrescoContentService(null, null);
|
||||||
service = new DocumentActionsService(documentListService, contentService);
|
service = new DocumentActionsService(documentListService, contentService);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -18,14 +18,14 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ContentActionHandler } from '../models/content-action.model';
|
import { ContentActionHandler } from '../models/content-action.model';
|
||||||
import { DocumentListService } from './document-list.service';
|
import { DocumentListService } from './document-list.service';
|
||||||
import { ContentService } from 'ng2-alfresco-core';
|
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DocumentActionsService {
|
export class DocumentActionsService {
|
||||||
private handlers: { [id: string]: ContentActionHandler; } = {};
|
private handlers: { [id: string]: ContentActionHandler; } = {};
|
||||||
|
|
||||||
constructor(private documentListService?: DocumentListService,
|
constructor(private documentListService?: DocumentListService,
|
||||||
private contentService?: ContentService) {
|
private contentService?: AlfrescoContentService) {
|
||||||
this.setupActionHandlers();
|
this.setupActionHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SettingsService, AuthService, AlfrescoApiService, StorageService, ContentService, LogService, LogServiceMock } from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoApiService, StorageService, AlfrescoContentService, LogService, LogServiceMock } from 'ng2-alfresco-core';
|
||||||
import { FileNode } from '../assets/document-library.model.mock';
|
import { FileNode } from '../assets/document-library.model.mock';
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { DocumentListService } from './document-list.service';
|
import { DocumentListService } from './document-list.service';
|
||||||
@@ -26,8 +26,8 @@ describe('DocumentListService', () => {
|
|||||||
|
|
||||||
let injector;
|
let injector;
|
||||||
let service: DocumentListService;
|
let service: DocumentListService;
|
||||||
let settingsService: SettingsService;
|
let settingsService: AlfrescoSettingsService;
|
||||||
let authService: AuthService;
|
let authService: AlfrescoAuthenticationService;
|
||||||
let alfrescoApiService: AlfrescoApiService;
|
let alfrescoApiService: AlfrescoApiService;
|
||||||
|
|
||||||
let fakeEntryNode = {
|
let fakeEntryNode = {
|
||||||
@@ -94,17 +94,17 @@ describe('DocumentListService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
DocumentListService,
|
DocumentListService,
|
||||||
StorageService,
|
StorageService,
|
||||||
{ provide: LogService, useClass: LogServiceMock }
|
{ provide: LogService, useClass: LogServiceMock }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
settingsService = injector.get(SettingsService);
|
settingsService = injector.get(AlfrescoSettingsService);
|
||||||
authService = injector.get(AuthService);
|
authService = injector.get(AlfrescoAuthenticationService);
|
||||||
alfrescoApiService = injector.get(AlfrescoApiService);
|
alfrescoApiService = injector.get(AlfrescoApiService);
|
||||||
service = injector.get(DocumentListService);
|
service = injector.get(DocumentListService);
|
||||||
jasmine.Ajax.install();
|
jasmine.Ajax.install();
|
||||||
|
@@ -19,7 +19,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Response } from '@angular/http';
|
import { Response } from '@angular/http';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { NodePaging, MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
import { NodePaging, MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||||
import { AuthService, ContentService, AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoContentService, AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DocumentListService {
|
export class DocumentListService {
|
||||||
@@ -57,8 +57,8 @@ export class DocumentListService {
|
|||||||
'application/vnd.apple.numbers': 'ft_ic_spreadsheet.svg'
|
'application/vnd.apple.numbers': 'ft_ic_spreadsheet.svg'
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private contentService: ContentService,
|
private contentService: AlfrescoContentService,
|
||||||
private apiService: AlfrescoApiService,
|
private apiService: AlfrescoApiService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, OnInit } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AuthService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
import { LoginModule } from 'ng2-alfresco-login';
|
import { LoginModule } from 'ng2-alfresco-login';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -70,8 +70,8 @@ export class AppComponent implements OnInit {
|
|||||||
isECM: boolean = true;
|
isECM: boolean = true;
|
||||||
isBPM: boolean = false;
|
isBPM: boolean = false;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import { AuthService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoLoginComponent } from './alfresco-login.component';
|
import { AlfrescoLoginComponent } from './alfresco-login.component';
|
||||||
import { AuthenticationMock } from './../assets/authentication.service.mock';
|
import { AuthenticationMock } from './../assets/authentication.service.mock';
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
@@ -38,8 +38,8 @@ describe('AlfrescoLogin', () => {
|
|||||||
],
|
],
|
||||||
declarations: [AlfrescoLoginComponent],
|
declarations: [AlfrescoLoginComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: AuthService, useClass: AuthenticationMock},
|
{provide: AlfrescoAuthenticationService, useClass: AuthenticationMock},
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock}
|
{provide: AlfrescoTranslationService, useClass: TranslationMock}
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
|
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
|
||||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||||
import { AlfrescoTranslateService, AuthService, SettingsService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoAuthenticationService, AlfrescoSettingsService, LogService } from 'ng2-alfresco-core';
|
||||||
import { FormSubmitEvent } from '../models/form-submit-event.model';
|
import { FormSubmitEvent } from '../models/form-submit-event.model';
|
||||||
|
|
||||||
declare let componentHandler: any;
|
declare let componentHandler: any;
|
||||||
@@ -75,9 +75,9 @@ export class AlfrescoLoginComponent implements OnInit {
|
|||||||
* @param translate
|
* @param translate
|
||||||
*/
|
*/
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
private authService: AuthService,
|
private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
if (translateService) {
|
if (translateService) {
|
||||||
|
@@ -23,9 +23,9 @@ import { CoreModule, LogService } from 'ng2-alfresco-core';
|
|||||||
import { SearchModule } from 'ng2-alfresco-search';
|
import { SearchModule } from 'ng2-alfresco-search';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoTranslateService
|
AlfrescoTranslationService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -54,9 +54,9 @@ class SearchDemo implements OnInit {
|
|||||||
ecmHost: string = 'http://localhost:8080';
|
ecmHost: string = 'http://localhost:8080';
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
translation: AlfrescoTranslateService,
|
translation: AlfrescoTranslationService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
settingsService.ecmHost = this.ecmHost;
|
settingsService.ecmHost = this.ecmHost;
|
||||||
|
@@ -23,10 +23,10 @@ import { result, results, folderResult, noResult, errorJson } from './../assets/
|
|||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
import {
|
import {
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
CoreModule
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@@ -48,12 +48,12 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
|||||||
],
|
],
|
||||||
declarations: [ AlfrescoSearchAutocompleteComponent ], // declare the test component
|
declarations: [ AlfrescoSearchAutocompleteComponent ], // declare the test component
|
||||||
providers: [
|
providers: [
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock},
|
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||||
AlfrescoThumbnailService,
|
AlfrescoThumbnailService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoSearchService
|
AlfrescoSearchService
|
||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
@@ -64,7 +64,7 @@ describe('AlfrescoSearchAutocompleteComponent', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should setup i18n folder', () => {
|
it('should setup i18n folder', () => {
|
||||||
let translationService = fixture.debugElement.injector.get(AlfrescoTranslateService);
|
let translationService = fixture.debugElement.injector.get(AlfrescoTranslationService);
|
||||||
spyOn(translationService, 'addTranslationFolder');
|
spyOn(translationService, 'addTranslationFolder');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(translationService.addTranslationFolder).toHaveBeenCalledWith('ng2-alfresco-search', 'node_modules/ng2-alfresco-search/src');
|
expect(translationService.addTranslationFolder).toHaveBeenCalledWith('ng2-alfresco-search', 'node_modules/ng2-alfresco-search/src');
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ElementRef, EventEmitter, Input, OnInit, OnChanges, Output, ViewChild } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, Input, OnInit, OnChanges, Output, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
import { AlfrescoSearchService, SearchOptions } from './../services/alfresco-search.service';
|
import { AlfrescoSearchService, SearchOptions } from './../services/alfresco-search.service';
|
||||||
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
||||||
@@ -71,7 +71,7 @@ export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
|
|||||||
baseComponentPath: string = module.id.replace('/components/alfresco-search.component.js', '');
|
baseComponentPath: string = module.id.replace('/components/alfresco-search.component.js', '');
|
||||||
|
|
||||||
constructor(private searchService: AlfrescoSearchService,
|
constructor(private searchService: AlfrescoSearchService,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private thumbnailService: AlfrescoThumbnailService) {
|
private thumbnailService: AlfrescoThumbnailService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,11 +22,11 @@ import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.servi
|
|||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
import { result } from './../assets/alfresco-search.component.mock';
|
import { result } from './../assets/alfresco-search.component.mock';
|
||||||
import {
|
import {
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
CoreModule
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
@@ -49,12 +49,12 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
AlfrescoSearchAutocompleteComponent
|
AlfrescoSearchAutocompleteComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock},
|
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||||
AlfrescoThumbnailService,
|
AlfrescoThumbnailService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoSearchService
|
AlfrescoSearchService
|
||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
@@ -65,7 +65,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should setup i18n folder', () => {
|
it('should setup i18n folder', () => {
|
||||||
let translationService = fixture.debugElement.injector.get(AlfrescoTranslateService);
|
let translationService = fixture.debugElement.injector.get(AlfrescoTranslationService);
|
||||||
spyOn(translationService, 'addTranslationFolder');
|
spyOn(translationService, 'addTranslationFolder');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(translationService.addTranslationFolder)
|
expect(translationService.addTranslationFolder)
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { FormControl, Validators } from '@angular/forms';
|
import { FormControl, Validators } from '@angular/forms';
|
||||||
import { Component, Input, Output, OnInit, OnDestroy, ElementRef, EventEmitter, ViewChild } from '@angular/core';
|
import { Component, Input, Output, OnInit, OnDestroy, ElementRef, EventEmitter, ViewChild } from '@angular/core';
|
||||||
import { Observable, Subject } from 'rxjs/Rx';
|
import { Observable, Subject } from 'rxjs/Rx';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
||||||
import { SearchTermValidator } from './../forms/search-term-validator';
|
import { SearchTermValidator } from './../forms/search-term-validator';
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
private focusSubject = new Subject<FocusEvent>();
|
private focusSubject = new Subject<FocusEvent>();
|
||||||
|
|
||||||
constructor(private translateService: AlfrescoTranslateService) {
|
constructor(private translateService: AlfrescoTranslationService) {
|
||||||
|
|
||||||
this.searchControl = new FormControl(
|
this.searchControl = new FormControl(
|
||||||
this.searchTerm,
|
this.searchTerm,
|
||||||
|
@@ -25,10 +25,10 @@ import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.servi
|
|||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
import {
|
import {
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoTranslateService,
|
AlfrescoTranslationService,
|
||||||
CoreModule,
|
CoreModule,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
@@ -107,7 +107,7 @@ describe('AlfrescoSearchComponent', () => {
|
|||||||
declarations: [ AlfrescoSearchComponent ], // declare the test component
|
declarations: [ AlfrescoSearchComponent ], // declare the test component
|
||||||
providers: [
|
providers: [
|
||||||
AlfrescoSearchService,
|
AlfrescoSearchService,
|
||||||
{provide: AlfrescoTranslateService, useClass: TranslationMock},
|
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||||
AlfrescoThumbnailService
|
AlfrescoThumbnailService
|
||||||
]
|
]
|
||||||
}).compileComponents().then(() => {
|
}).compileComponents().then(() => {
|
||||||
@@ -133,8 +133,8 @@ describe('AlfrescoSearchComponent', () => {
|
|||||||
it('should have a null search term if no query param provided via RouteParams', () => {
|
it('should have a null search term if no query param provided via RouteParams', () => {
|
||||||
let injector = ReflectiveInjector.resolveAndCreate([
|
let injector = ReflectiveInjector.resolveAndCreate([
|
||||||
AlfrescoSearchService,
|
AlfrescoSearchService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService,
|
LogService,
|
||||||
@@ -146,7 +146,7 @@ describe('AlfrescoSearchComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should setup i18n folder', () => {
|
it('should setup i18n folder', () => {
|
||||||
let translationService = fixture.debugElement.injector.get(AlfrescoTranslateService);
|
let translationService = fixture.debugElement.injector.get(AlfrescoTranslationService);
|
||||||
spyOn(translationService, 'addTranslationFolder');
|
spyOn(translationService, 'addTranslationFolder');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(translationService.addTranslationFolder).toHaveBeenCalledWith('ng2-alfresco-search', 'node_modules/ng2-alfresco-search/src');
|
expect(translationService.addTranslationFolder).toHaveBeenCalledWith('ng2-alfresco-search', 'node_modules/ng2-alfresco-search/src');
|
||||||
|
@@ -19,7 +19,7 @@ import { Component, EventEmitter, Input, Output, Optional, OnChanges, SimpleChan
|
|||||||
import { ActivatedRoute, Params } from '@angular/router';
|
import { ActivatedRoute, Params } from '@angular/router';
|
||||||
import { AlfrescoSearchService, SearchOptions } from './../services/alfresco-search.service';
|
import { AlfrescoSearchService, SearchOptions } from './../services/alfresco-search.service';
|
||||||
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
|
||||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -66,7 +66,7 @@ export class AlfrescoSearchComponent implements OnChanges, OnInit {
|
|||||||
baseComponentPath: string = module.id.replace('/components/alfresco-search.component.js', '');
|
baseComponentPath: string = module.id.replace('/components/alfresco-search.component.js', '');
|
||||||
|
|
||||||
constructor(private searchService: AlfrescoSearchService,
|
constructor(private searchService: AlfrescoSearchService,
|
||||||
private translateService: AlfrescoTranslateService,
|
private translateService: AlfrescoTranslationService,
|
||||||
private thumbnailService: AlfrescoThumbnailService,
|
private thumbnailService: AlfrescoThumbnailService,
|
||||||
@Optional() private route: ActivatedRoute) {
|
@Optional() private route: ActivatedRoute) {
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { AlfrescoSearchService } from './alfresco-search.service';
|
import { AlfrescoSearchService } from './alfresco-search.service';
|
||||||
import { AuthService, SettingsService, AlfrescoApiService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
import { fakeApi, fakeSearch, fakeError } from '../assets/alfresco-search.service.mock';
|
import { fakeApi, fakeSearch, fakeError } from '../assets/alfresco-search.service.mock';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
@@ -31,9 +31,9 @@ describe('AlfrescoSearchService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
AlfrescoSearchService,
|
AlfrescoSearchService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
]);
|
]);
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { AuthService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal service used by Document List component.
|
* Internal service used by Document List component.
|
||||||
@@ -25,7 +25,7 @@ import { AuthService, AlfrescoApiService } from 'ng2-alfresco-core';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class AlfrescoSearchService {
|
export class AlfrescoSearchService {
|
||||||
|
|
||||||
constructor(public authService: AuthService,
|
constructor(public authService: AlfrescoAuthenticationService,
|
||||||
private apiService: AlfrescoApiService) {
|
private apiService: AlfrescoApiService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { AlfrescoThumbnailService } from './alfresco-thumbnail.service';
|
import { AlfrescoThumbnailService } from './alfresco-thumbnail.service';
|
||||||
import { AlfrescoApiService, AuthService, ContentService, SettingsService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoApiService, AlfrescoAuthenticationService, AlfrescoContentService, AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
describe('AlfrescoThumbnailService', () => {
|
describe('AlfrescoThumbnailService', () => {
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ describe('AlfrescoThumbnailService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
ContentService,
|
AlfrescoContentService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoThumbnailService,
|
AlfrescoThumbnailService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ContentService } from 'ng2-alfresco-core';
|
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AlfrescoThumbnailService {
|
export class AlfrescoThumbnailService {
|
||||||
@@ -50,7 +50,7 @@ export class AlfrescoThumbnailService {
|
|||||||
'application/vnd.apple.numbers': 'ft_ic_spreadsheet'
|
'application/vnd.apple.numbers': 'ft_ic_spreadsheet'
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(public contentService: ContentService) {
|
constructor(public contentService: AlfrescoContentService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -19,7 +19,7 @@ import { NgModule, Component, Input, OnInit } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { CoreModule, SettingsService, AuthService, StorageService, LogService } from 'ng2-alfresco-core';
|
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService, LogService } from 'ng2-alfresco-core';
|
||||||
import { TagModule } from 'ng2-alfresco-tag';
|
import { TagModule } from 'ng2-alfresco-tag';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -57,8 +57,8 @@ class TagDemo implements OnInit {
|
|||||||
ecmHost: string = 'http://127.0.0.1:8080';
|
ecmHost: string = 'http://127.0.0.1:8080';
|
||||||
ticket: string;
|
ticket: string;
|
||||||
|
|
||||||
constructor(private authService: AuthService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: AlfrescoSettingsService,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
private logService: LogService) {
|
private logService: LogService) {
|
||||||
|
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
@@ -33,9 +33,9 @@ describe('Tag service', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
injector = ReflectiveInjector.resolveAndCreate([
|
injector = ReflectiveInjector.resolveAndCreate([
|
||||||
SettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AuthService,
|
AlfrescoAuthenticationService,
|
||||||
TagService,
|
TagService,
|
||||||
StorageService,
|
StorageService,
|
||||||
LogService
|
LogService
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user