mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1968] [IE11] The login page is not loading and import fix (#2679)
* fix viewer script export insights and diagram remove requires svg fix new data adapter path dist working with diagrams commented out change use of minimatch fix unused import remove unused component fix test new import moment es6 and throw rxjs fix import analytics test fix imports rxjs new pacakging * fix after rebase * fix test upload services * exclude temporarily button event test * restore commented demo shell files * fix process spy
This commit is contained in:
@@ -16,5 +16,3 @@
|
||||
*/
|
||||
|
||||
export * from './app-config.service';
|
||||
|
||||
export * from './app-config.module';
|
||||
|
@@ -20,7 +20,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatDatepickerModule, MatInputModule, MatNativeDateModule } from '@angular/material';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { AppConfigService } from '../index';
|
||||
import { CardViewDateItemModel } from '../models/card-view-dateitem.model';
|
||||
import { CardViewUpdateService } from '../services/card-view-update.service';
|
||||
|
@@ -18,17 +18,18 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatDatepicker } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { CardViewDateItemModel } from '../models/card-view-dateitem.model';
|
||||
import { CardViewUpdateService } from '../services/card-view-update.service';
|
||||
import { UserPreferencesService } from '../services/user-preferences.service';
|
||||
import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '../utils/momentDateAdapter';
|
||||
import { MomentDateAdapter } from '../utils/momentDateAdapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../utils/moment-date-formats.model';
|
||||
|
||||
@Component({
|
||||
providers: [
|
||||
{provide: DateAdapter, useClass: MomentDateAdapter},
|
||||
{provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS}],
|
||||
{ provide: DateAdapter, useClass: MomentDateAdapter },
|
||||
{ provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS }],
|
||||
selector: 'adf-card-view-dateitem',
|
||||
templateUrl: './card-view-dateitem.component.html',
|
||||
styleUrls: ['./card-view-dateitem.component.scss']
|
||||
@@ -48,14 +49,13 @@ export class CardViewDateItemComponent implements OnInit {
|
||||
|
||||
valueDate: Moment;
|
||||
|
||||
constructor(
|
||||
private cardViewUpdateService: CardViewUpdateService,
|
||||
private dateAdapter: DateAdapter<Moment>,
|
||||
private preferences: UserPreferencesService) {
|
||||
constructor(private cardViewUpdateService: CardViewUpdateService,
|
||||
private dateAdapter: DateAdapter<Moment>,
|
||||
private preferences: UserPreferencesService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.preferences.locale$.subscribe( (locale) => {
|
||||
this.preferences.locale$.subscribe((locale) => {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
|
@@ -21,5 +21,3 @@ export * from './card-view-item-dispatcher.component';
|
||||
export * from './card-view-mapitem.component';
|
||||
export * from './card-view-textitem.component';
|
||||
export * from './card-view.component';
|
||||
|
||||
export * from './card-view.module';
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './accordion-group.component';
|
||||
export * from './accordion.component';
|
||||
|
||||
export * from './collapsable.module';
|
||||
|
@@ -19,7 +19,7 @@ import { OverlayContainer } from '@angular/cdk/overlay';
|
||||
import { ViewportRuler } from '@angular/cdk/scrolling';
|
||||
import { Component, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { Subscription } from 'rxjs/Rx';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
@Component({
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Subject } from 'rxjs/Rx';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
|
||||
@Injectable()
|
||||
export class ContextMenuService {
|
||||
|
@@ -26,25 +26,27 @@ import { TRANSLATION_PROVIDER, TranslationService } from './services/translation
|
||||
|
||||
import { MaterialModule } from './material.module';
|
||||
|
||||
import { AppConfigModule } from './app-config';
|
||||
import { CardViewModule } from './card-view';
|
||||
import { CollapsableModule } from './collapsable';
|
||||
import { ContextMenuModule } from './context-menu';
|
||||
import { DataColumnModule } from './data-column';
|
||||
import { DataTableModule } from './datatable';
|
||||
import { InfoDrawerModule } from './info-drawer';
|
||||
import { LanguageMenuModule } from './language-menu';
|
||||
import { LoginModule } from './login';
|
||||
import { PaginationModule } from './pagination';
|
||||
import { HostSettingsModule } from './settings';
|
||||
import { ToolbarModule } from './toolbar';
|
||||
import { UserInfoModule } from './userinfo';
|
||||
import { ViewerModule } from './viewer';
|
||||
import { FormModule } from './form';
|
||||
import { AppConfigModule } from './app-config/app-config.module';
|
||||
import { CardViewModule } from './card-view/card-view.module';
|
||||
import { CollapsableModule } from './collapsable/collapsable.module';
|
||||
import { ContextMenuModule } from './context-menu/context-menu.module';
|
||||
import { DataColumnModule } from './data-column/data-column.module';
|
||||
import { DataTableModule } from './datatable/datatable.module';
|
||||
import { InfoDrawerModule } from './info-drawer/info-drawer.module';
|
||||
import { LanguageMenuModule } from './language-menu/language-menu.module';
|
||||
import { LoginModule } from './login/login.module';
|
||||
import { PaginationModule } from './pagination/pagination.module';
|
||||
import { HostSettingsModule } from './settings/host-settings.module';
|
||||
import { ToolbarModule } from './toolbar/toolbar.module';
|
||||
import { UserInfoModule } from './userinfo/userinfo.module';
|
||||
import { ViewerModule } from './viewer/viewer.module';
|
||||
import { FormModule } from './form/form.module';
|
||||
|
||||
import { DirectiveModule } from './directives';
|
||||
import { PipeModule } from './pipes';
|
||||
import { LogService , ServiceModule, TranslateLoaderService } from './services';
|
||||
import { DirectiveModule } from './directives/directive.module';
|
||||
import { PipeModule } from './pipes/pipe.module';
|
||||
import { ServiceModule } from './services/service.module';
|
||||
import { LogService } from './services/log.service';
|
||||
import { TranslateLoaderService } from './services/translate-loader.service';
|
||||
|
||||
export function createTranslateLoader(http: HttpClient, logService: LogService) {
|
||||
return new TranslateLoaderService(http, logService);
|
||||
@@ -80,7 +82,6 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
})
|
||||
],
|
||||
providers: [
|
||||
TranslationService,
|
||||
{
|
||||
provide: TRANSLATION_PROVIDER,
|
||||
multi: true,
|
||||
@@ -88,7 +89,8 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
name: 'adf-core',
|
||||
source: 'assets/adf-core'
|
||||
}
|
||||
}
|
||||
},
|
||||
TranslationService
|
||||
],
|
||||
exports: [
|
||||
AppConfigModule,
|
||||
@@ -96,7 +98,6 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpClientModule,
|
||||
TranslateModule,
|
||||
ContextMenuModule,
|
||||
CardViewModule,
|
||||
@@ -114,7 +115,8 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
ViewerModule,
|
||||
PipeModule,
|
||||
DirectiveModule,
|
||||
FormModule
|
||||
FormModule,
|
||||
MaterialModule
|
||||
]
|
||||
})
|
||||
export class CoreModule {
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './data-column-list.component';
|
||||
export * from './data-column.component';
|
||||
|
||||
export * from './data-column.module';
|
||||
|
@@ -21,13 +21,12 @@ import { MatCheckboxChange } from '@angular/material';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { DataTableModule } from '../../datatable.module';
|
||||
import { MaterialModule } from '../../../material.module';
|
||||
import {
|
||||
DataColumn,
|
||||
DataRow,
|
||||
DataSorting,
|
||||
ObjectDataColumn,
|
||||
ObjectDataTableAdapter
|
||||
} from './../../data/index';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
import { DataSorting } from '../../data/data-sorting.model';
|
||||
import { ObjectDataColumn } from '../../data/object-datacolumn.model';
|
||||
import { ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
|
||||
import { DataTableComponent } from './datatable.component';
|
||||
|
||||
describe('DataTable', () => {
|
||||
@@ -35,7 +34,6 @@ describe('DataTable', () => {
|
||||
let fixture: ComponentFixture<DataTableComponent>;
|
||||
let dataTable: DataTableComponent;
|
||||
let element: any;
|
||||
let eventMock: any;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -53,13 +51,6 @@ describe('DataTable', () => {
|
||||
element = fixture.debugElement.nativeElement;
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
eventMock = {
|
||||
preventDefault: function () {
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
it('should change the rows on changing of the data', () => {
|
||||
let newData = new ObjectDataTableAdapter(
|
||||
[
|
||||
|
@@ -20,17 +20,23 @@ import {
|
||||
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef, ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import { MatCheckboxChange } from '@angular/material';
|
||||
import { Observable, Observer, Subscription } from 'rxjs/Rx';
|
||||
import { DataColumnListComponent } from '../../../data-column';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
import { DataColumnListComponent } from '../../../data-column/data-column-list.component';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
import { DataRowEvent } from '../../data/data-row-event.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
import { DataSorting } from '../../data/data-sorting.model';
|
||||
import { DataTableAdapter } from '../../data/datatable-adapter';
|
||||
|
||||
import { ObjectDataRow, ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
import { ObjectDataRow } from '../../data/object-datarow.model';
|
||||
import { ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
import { DataCellEvent } from './data-cell.event';
|
||||
import { DataRowActionEvent } from './data-row-action.event';
|
||||
import 'rxjs/add/operator/debounceTime';
|
||||
import 'rxjs/add/operator/buffer';
|
||||
import 'rxjs/add/operator/filter';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable',
|
||||
@@ -40,7 +46,8 @@ import { DataRowActionEvent } from './data-row-action.event';
|
||||
})
|
||||
export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck {
|
||||
|
||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||
@ContentChild(DataColumnListComponent)
|
||||
columnList: DataColumnListComponent;
|
||||
|
||||
@Input()
|
||||
data: DataTableAdapter;
|
||||
|
@@ -17,10 +17,9 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import {
|
||||
ObjectDataColumn,
|
||||
ObjectDataTableAdapter
|
||||
} from './../../data/index';
|
||||
import { ObjectDataTableAdapter } from './../../data/object-datatable-adapter';
|
||||
import { ObjectDataColumn } from './../../data/object-datacolumn.model';
|
||||
|
||||
import { LocationCellComponent } from './location-cell.component';
|
||||
|
||||
describe('LocationCellComponent', () => {
|
||||
|
43
lib/core/datatable/data/object-datacolumn.model.ts
Normal file
43
lib/core/datatable/data/object-datacolumn.model.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* @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 { TemplateRef } from '@angular/core';
|
||||
import { DataColumn } from './data-column.model';
|
||||
|
||||
// Simple implementation of the DataColumn interface.
|
||||
export class ObjectDataColumn implements DataColumn {
|
||||
|
||||
key: string;
|
||||
type: string; // text|image
|
||||
format: string;
|
||||
sortable: boolean;
|
||||
title: string;
|
||||
srTitle: string;
|
||||
cssClass: string;
|
||||
template?: TemplateRef<any>;
|
||||
|
||||
constructor(obj: any) {
|
||||
this.key = obj.key;
|
||||
this.type = obj.type || 'text';
|
||||
this.format = obj.format;
|
||||
this.sortable = obj.sortable;
|
||||
this.title = obj.title;
|
||||
this.srTitle = obj.srTitle;
|
||||
this.cssClass = obj.cssClass;
|
||||
this.template = obj.template;
|
||||
}
|
||||
}
|
38
lib/core/datatable/data/object-datarow.model.ts
Normal file
38
lib/core/datatable/data/object-datarow.model.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @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 { ObjectUtils } from '../../utils';
|
||||
import { DataRow } from './data-row.model';
|
||||
|
||||
// Simple implementation of the DataRow interface.
|
||||
export class ObjectDataRow implements DataRow {
|
||||
|
||||
constructor(private obj: any, public isSelected: boolean = false) {
|
||||
if (!obj) {
|
||||
throw new Error('Object source not found');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getValue(key: string): any {
|
||||
return ObjectUtils.getValue(this.obj, key);
|
||||
}
|
||||
|
||||
hasValue(key: string): boolean {
|
||||
return this.getValue(key) !== undefined;
|
||||
}
|
||||
}
|
@@ -18,7 +18,9 @@
|
||||
import { DataColumn } from './data-column.model';
|
||||
import { DataRow } from './data-row.model';
|
||||
import { DataSorting } from './data-sorting.model';
|
||||
import { ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from './object-datatable-adapter';
|
||||
import { ObjectDataTableAdapter } from './object-datatable-adapter';
|
||||
import { ObjectDataRow } from './object-datarow.model';
|
||||
import { ObjectDataColumn } from './object-datacolumn.model';
|
||||
|
||||
describe('ObjectDataTableAdapter', () => {
|
||||
|
||||
|
@@ -16,34 +16,15 @@
|
||||
*/
|
||||
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { TemplateRef } from '@angular/core';
|
||||
|
||||
import { TimeAgoPipe } from '../../pipes';
|
||||
import { ObjectUtils } from '../../utils';
|
||||
import { DataColumn } from './data-column.model';
|
||||
import { DataRow } from './data-row.model';
|
||||
import { ObjectDataRow } from './object-datarow.model';
|
||||
import { ObjectDataColumn } from './object-datacolumn.model';
|
||||
import { DataSorting } from './data-sorting.model';
|
||||
import { DataTableAdapter } from './datatable-adapter';
|
||||
|
||||
// Simple implementation of the DataRow interface.
|
||||
export class ObjectDataRow implements DataRow {
|
||||
|
||||
constructor(private obj: any, public isSelected: boolean = false) {
|
||||
if (!obj) {
|
||||
throw new Error('Object source not found');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getValue(key: string): any {
|
||||
return ObjectUtils.getValue(this.obj, key);
|
||||
}
|
||||
|
||||
hasValue(key: string): boolean {
|
||||
return this.getValue(key) !== undefined;
|
||||
}
|
||||
}
|
||||
|
||||
// Simple implementation of the DataTableAdapter interface.
|
||||
export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
|
||||
@@ -196,27 +177,3 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
this.setSorting(sorting);
|
||||
}
|
||||
}
|
||||
|
||||
// Simple implementation of the DataColumn interface.
|
||||
export class ObjectDataColumn implements DataColumn {
|
||||
|
||||
key: string;
|
||||
type: string; // text|image
|
||||
format: string;
|
||||
sortable: boolean;
|
||||
title: string;
|
||||
srTitle: string;
|
||||
cssClass: string;
|
||||
template?: TemplateRef<any>;
|
||||
|
||||
constructor(obj: any) {
|
||||
this.key = obj.key;
|
||||
this.type = obj.type || 'text';
|
||||
this.format = obj.format;
|
||||
this.sortable = obj.sortable;
|
||||
this.title = obj.title;
|
||||
this.srTitle = obj.srTitle;
|
||||
this.cssClass = obj.cssClass;
|
||||
this.template = obj.template;
|
||||
}
|
||||
}
|
||||
|
@@ -21,10 +21,10 @@ import { RouterModule } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { ContextMenuModule } from '../context-menu';
|
||||
import { PipeModule } from '../pipes';
|
||||
import { ContextMenuModule } from '../context-menu/context-menu.module';
|
||||
import { PipeModule } from '../pipes/pipe.module';
|
||||
|
||||
import { DirectiveModule } from '../directives';
|
||||
import { DirectiveModule } from '../directives/directive.module';
|
||||
import { DataTableCellComponent } from './components/datatable/datatable-cell.component';
|
||||
import { DataTableComponent } from './components/datatable/datatable.component';
|
||||
import { DateCellComponent } from './components/datatable/date-cell.component';
|
||||
|
@@ -15,7 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './data/index';
|
||||
export * from './data/datatable-adapter';
|
||||
|
||||
export * from './data/data-row.model';
|
||||
export * from './data/data-row-event.model';
|
||||
export * from './data/data-column.model';
|
||||
export * from './data/data-sorting.model';
|
||||
|
||||
export * from './data/object-datarow.model';
|
||||
export * from './data/object-datatable-adapter';
|
||||
export * from './data/object-datacolumn.model';
|
||||
|
||||
export * from './components/datatable/data-cell.event';
|
||||
export * from './components/datatable/data-row-action.event';
|
||||
@@ -30,5 +39,3 @@ export * from './components/datatable/location-cell.component';
|
||||
export * from './directives/loading-template.directive';
|
||||
export * from './directives/no-content-template.directive';
|
||||
export * from './directives/no-permission-template.directive';
|
||||
|
||||
export * from './datatable.module';
|
||||
|
@@ -19,7 +19,7 @@ import { Component } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { AuthenticationService } from '../services';
|
||||
|
||||
|
@@ -17,10 +17,13 @@
|
||||
|
||||
import { Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output } from '@angular/core';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { TranslationService } from '../services/translation.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/observable/forkJoin';
|
||||
import 'rxjs/add/operator/catch';
|
||||
|
||||
interface ProcessedNodeData {
|
||||
entry: MinimalNodeEntryEntity;
|
||||
@@ -108,7 +111,7 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
private deleteNode(node: MinimalNodeEntity): Observable<ProcessedNodeData> {
|
||||
const id = (<any> node.entry).nodeId || node.entry.id;
|
||||
|
||||
const promise = this.alfrescoApiService.getInstance().nodes.deleteNode(id, {permanent: this.permanent});
|
||||
const promise = this.alfrescoApiService.getInstance().nodes.deleteNode(id, { permanent: this.permanent });
|
||||
|
||||
return Observable.fromPromise(promise)
|
||||
.map(() => ({
|
||||
@@ -169,14 +172,14 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
if (status.allFailed && !status.oneFailed) {
|
||||
return this.translation.get(
|
||||
'CORE.DELETE_NODE.ERROR_PLURAL',
|
||||
{number: status.failed.length}
|
||||
{ number: status.failed.length }
|
||||
);
|
||||
}
|
||||
|
||||
if (status.allSucceeded && !status.oneSucceeded) {
|
||||
return this.translation.get(
|
||||
'CORE.DELETE_NODE.PLURAL',
|
||||
{number: status.success.length}
|
||||
{ number: status.success.length }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -203,14 +206,14 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
if (status.oneFailed && !status.someSucceeded) {
|
||||
return this.translation.get(
|
||||
'CORE.DELETE_NODE.ERROR_SINGULAR',
|
||||
{name: status.failed[0].entry.name}
|
||||
{ name: status.failed[0].entry.name }
|
||||
);
|
||||
}
|
||||
|
||||
if (status.oneSucceeded && !status.someFailed) {
|
||||
return this.translation.get(
|
||||
'CORE.DELETE_NODE.SINGULAR',
|
||||
{name: status.success[0].entry.name}
|
||||
{ name: status.success[0].entry.name }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -17,8 +17,10 @@
|
||||
|
||||
import { Directive, EventEmitter, HostListener, Input, OnChanges, Output } from '@angular/core';
|
||||
import { FavoriteBody, MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/observable/forkJoin';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-node-favorite]',
|
||||
@@ -37,7 +39,8 @@ export class NodeFavoriteDirective implements OnChanges {
|
||||
this.toggleFavorite();
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {}
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
}
|
||||
|
||||
ngOnChanges(changes) {
|
||||
if (!changes.selection.currentValue.length) {
|
||||
@@ -111,7 +114,7 @@ export class NodeFavoriteDirective implements OnChanges {
|
||||
// shared files have nodeId
|
||||
const id = (<any> selected).entry.nodeId || selected.entry.id;
|
||||
|
||||
const promise = this.alfrescoApiService.getInstance()
|
||||
const promise = this.alfrescoApiService.getInstance()
|
||||
.core.favoritesApi.getFavorite('-me-', id);
|
||||
|
||||
return Observable.from(promise)
|
||||
|
@@ -20,7 +20,7 @@ import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { TranslationService } from '../services';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
|
@@ -18,10 +18,13 @@
|
||||
import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { DeletedNodeEntry, DeletedNodesPaging, PathInfoEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { TranslationService } from '../services/translation.service';
|
||||
import 'rxjs/add/observable/from';
|
||||
import 'rxjs/add/observable/zip';
|
||||
import 'rxjs/add/operator/mergeMap';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-restore]'
|
||||
@@ -73,7 +76,7 @@ export class NodeRestoreDirective {
|
||||
this.restoreProcessStatus.fail.push(...status.fail);
|
||||
this.restoreProcessStatus.success.push(...status.success);
|
||||
})
|
||||
.flatMap(() => this.getDeletedNodes())
|
||||
.mergeMap(() => this.getDeletedNodes())
|
||||
.subscribe(
|
||||
(deletedNodesList: any) => {
|
||||
const { entries: nodelist } = deletedNodesList.list;
|
||||
|
@@ -22,5 +22,3 @@ export * from './node-favorite.directive';
|
||||
export * from './node-permission.directive';
|
||||
export * from './node-restore.directive';
|
||||
export * from './upload.directive';
|
||||
|
||||
export * from './directive.module';
|
||||
|
@@ -18,15 +18,8 @@
|
||||
/** Base cancellable event implementation */
|
||||
export class BaseEvent<T> {
|
||||
|
||||
private isDefaultPrevented: boolean = false;
|
||||
defaultPrevented: boolean = false;
|
||||
|
||||
value: T;
|
||||
|
||||
get defaultPrevented() {
|
||||
return this.isDefaultPrevented;
|
||||
}
|
||||
|
||||
preventDefault() {
|
||||
this.isDefaultPrevented = true;
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ import {
|
||||
|
||||
import { FormRenderingService } from './../../services/form-rendering.service';
|
||||
import { WidgetVisibilityService } from './../../services/widget-visibility.service';
|
||||
import { FormFieldModel } from './../widgets/core/index';
|
||||
import { FormFieldModel } from './../widgets/core/form-field.model';
|
||||
import { WidgetComponent } from './../widgets/widget.component';
|
||||
|
||||
declare var adf: any;
|
||||
|
@@ -18,9 +18,9 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslationService } from '../../index';
|
||||
import { DataTableModule } from '../../datatable';
|
||||
import { DataColumnModule } from '../../data-column';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { DataTableModule } from '../../datatable/datatable.module';
|
||||
import { DataColumnModule } from '../../data-column/data-column.module';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { EcmModelService } from '../services/ecm-model.service';
|
||||
import { FormService } from '../services/form.service';
|
||||
import { FormListComponent } from './form-list.component';
|
||||
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { LogService } from '../../services';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { fakeForm } from '../../mock';
|
||||
import { FormService } from './../services/form.service';
|
||||
import { NodeService } from './../services/node.service';
|
||||
|
@@ -23,7 +23,7 @@ import { FormService } from './../services/form.service';
|
||||
import { NodeService } from './../services/node.service';
|
||||
import { ContentLinkModel } from './widgets/core/content-link.model';
|
||||
import { FormFieldModel, FormModel, FormOutcomeEvent, FormOutcomeModel, FormValues, FormFieldValidator } from './widgets/core/index';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||
|
||||
@Component({
|
||||
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { DebugElement, SimpleChange } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
@@ -36,13 +36,9 @@ const SELECT_OPEN_ANIMATION = 200;
|
||||
const SELECT_CLOSE_ANIMATION = 500;
|
||||
|
||||
describe('FormComponent UI and visibiltiy', () => {
|
||||
let debugElement: DebugElement;
|
||||
let element: HTMLElement;
|
||||
let component: FormComponent;
|
||||
let service: FormService;
|
||||
let fixture: ComponentFixture<FormComponent>;
|
||||
let formDefinitionSpy: jasmine.Spy;
|
||||
let taskSpy: jasmine.Spy;
|
||||
|
||||
function openSelect() {
|
||||
let trigger: HTMLElement;
|
||||
@@ -63,8 +59,6 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FormComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
debugElement = fixture.debugElement;
|
||||
service = fixture.debugElement.injector.get(FormService);
|
||||
});
|
||||
|
||||
@@ -75,8 +69,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
describe('form definition', () => {
|
||||
|
||||
it('should display two text fields form definition', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionTwoTextFields));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionTwoTextFields));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@@ -92,8 +86,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
});
|
||||
|
||||
it('should display dropdown field', fakeAsync(() => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionDropdownField));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionDropdownField));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@@ -123,8 +117,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
describe('Visibility conditions', () => {
|
||||
|
||||
it('should hide the field based on the next one', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@@ -139,8 +133,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
});
|
||||
|
||||
it('should hide the field based on the previous one', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnPreviousOne));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnPreviousOne));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@@ -155,8 +149,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
});
|
||||
|
||||
it('should show the hidden field when the visibility condition change to true', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@@ -181,8 +175,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
|
||||
describe('Readonly Form', () => {
|
||||
it('should display two text fields readonly', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formReadonlyTwoTextFields));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formReadonlyTwoTextFields));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { EntryComponentMockModule } from '../../mock/form/entry-module.mock';
|
||||
import { startFormDateWidgetMock, startFormDropdownDefinitionMock, startFormTextDefinitionMock, startMockForm, startMockFormWithTab } from '../../mock';
|
||||
import { startFormAmountWidgetMock, startFormNumberWidgetMock, startFormRadioButtonWidgetMock } from '../../mock';
|
||||
@@ -37,7 +37,6 @@ describe('ActivitiStartForm', () => {
|
||||
|
||||
let formService: FormService;
|
||||
let component: StartFormComponent;
|
||||
let element: HTMLElement;
|
||||
let fixture: ComponentFixture<StartFormComponent>;
|
||||
let getStartFormSpy: jasmine.Spy;
|
||||
|
||||
@@ -72,7 +71,6 @@ describe('ActivitiStartForm', () => {
|
||||
fixture = TestBed.createComponent(StartFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
formService = fixture.debugElement.injector.get(FormService);
|
||||
element = fixture.nativeElement;
|
||||
|
||||
getStartFormSpy = spyOn(formService, 'getStartFormDefinition').and.returnValue(Observable.of({
|
||||
processDefinitionName: 'my:process'
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LogService } from '../../services';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../services/form.service';
|
||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ActivitiContentService } from '../../../services/activiti-alfresco.service';
|
||||
import { MaterialModule } from '../../../../material.module';
|
||||
import { ExternalContent } from '../core/external-content';
|
||||
@@ -33,7 +33,6 @@ describe('AttachWidgetComponent', () => {
|
||||
|
||||
let widget: AttachWidgetComponent;
|
||||
let fixture: ComponentFixture<AttachWidgetComponent>;
|
||||
let element: HTMLElement;
|
||||
let contentService: ActivitiContentService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -57,7 +56,6 @@ describe('AttachWidgetComponent', () => {
|
||||
fixture = TestBed.createComponent(AttachWidgetComponent);
|
||||
contentService = TestBed.get(ActivitiContentService);
|
||||
|
||||
element = fixture.nativeElement;
|
||||
widget = fixture.componentInstance;
|
||||
});
|
||||
|
||||
|
@@ -37,7 +37,6 @@ describe('ContainerWidgetComponent', () => {
|
||||
let widget: ContainerWidgetComponent;
|
||||
let fixture: ComponentFixture<ContainerWidgetComponent>;
|
||||
let element: HTMLElement;
|
||||
let contentService: ActivitiContentService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -55,7 +54,6 @@ describe('ContainerWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContainerWidgetComponent);
|
||||
contentService = TestBed.get(ActivitiContentService);
|
||||
|
||||
element = fixture.nativeElement;
|
||||
widget = fixture.componentInstance;
|
||||
|
@@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement, SimpleChange } from '@angular/core';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MaterialModule } from '../../../../material.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslationService, ContentService } from '../../../../services';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { EcmModelService } from '../../../services/ecm-model.service';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
@@ -34,10 +34,8 @@ describe('ContentWidgetComponent', () => {
|
||||
|
||||
let component: ContentWidgetComponent;
|
||||
let fixture: ComponentFixture<ContentWidgetComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
let serviceForm: FormService;
|
||||
let processContentService: ProcessContentService;
|
||||
let serviceContent: ContentService;
|
||||
|
||||
@@ -80,7 +78,6 @@ describe('ContentWidgetComponent', () => {
|
||||
]
|
||||
}).compileComponents();
|
||||
|
||||
serviceForm = TestBed.get(FormService);
|
||||
serviceContent = TestBed.get(ContentService);
|
||||
processContentService = TestBed.get(ProcessContentService);
|
||||
|
||||
@@ -94,7 +91,6 @@ describe('ContentWidgetComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContentWidgetComponent);
|
||||
component = fixture.componentInstance;
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
@@ -15,9 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentService, LogService } from '../../../../services';
|
||||
import { ContentService } from '../../../../services/content.service';
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ProcessContentService } from '../../../services/process-content.service';
|
||||
import { ContentLinkModel } from '../core/content-link.model';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { FormFieldTypes } from './form-field-types';
|
||||
import { FormFieldModel } from './form-field.model';
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { WidgetVisibilityModel } from '../../../models/widget-visibility.model';
|
||||
import { ContainerColumnModel } from './container-column.model';
|
||||
import { ErrorMessageModel } from './error-message.model';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { ActivitiContentService } from '../../../services/activiti-alfresco.service';
|
||||
import { MaterialModule } from '../../../../material.module';
|
||||
import { ErrorWidgetComponent } from '../error/error.component';
|
||||
@@ -30,7 +30,6 @@ describe('DateWidgetComponent', () => {
|
||||
|
||||
let widget: DateWidgetComponent;
|
||||
let fixture: ComponentFixture<DateWidgetComponent>;
|
||||
let nativeElement: any;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -51,12 +50,6 @@ describe('DateWidgetComponent', () => {
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
nativeElement = {
|
||||
querySelector: function () {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
fixture = TestBed.createComponent(DateWidgetComponent);
|
||||
|
||||
element = fixture.nativeElement;
|
||||
|
@@ -17,11 +17,12 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { UserPreferencesService } from '../../../../services';
|
||||
import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '../../../../utils';
|
||||
import { UserPreferencesService } from '../../../../services/user-preferences.service';
|
||||
import { MomentDateAdapter } from '../../../../utils/momentDateAdapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../../../../utils/moment-date-formats.model';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
import { baseHost, WidgetComponent } from './../widget.component';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { EcmModelService } from '../../../services/ecm-model.service';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { LogService } from '../../../../services';
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { CellValidator } from './cell-validator.model';
|
||||
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
|
||||
import { DynamicTableColumn } from './dynamic-table-column.model';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { ValidateDynamicTableRowEvent } from '../../../events/validate-dynamic-table-row.event';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
import { FormFieldModel } from './../core/form-field.model';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { LogService } from '../../../../services';
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ChangeDetectorRef, Component, ElementRef, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,9 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { MaterialModule } from '../../../../../../material.module';
|
||||
import { FormFieldModel, FormModel } from '../../../index';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
@@ -27,8 +26,6 @@ import { DynamicTableModel } from './../../dynamic-table.widget.model';
|
||||
import { DateEditorComponent } from './date.editor';
|
||||
|
||||
describe('DateEditorComponent', () => {
|
||||
let debugElement: DebugElement;
|
||||
let element: HTMLElement;
|
||||
let component: DateEditorComponent;
|
||||
let fixture: ComponentFixture<DateEditorComponent>;
|
||||
let row: DynamicTableRow;
|
||||
@@ -49,8 +46,6 @@ describe('DateEditorComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DateEditorComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
debugElement = fixture.debugElement;
|
||||
|
||||
row = <DynamicTableRow> { value: { date: '1879-03-14T00:00:00.000Z' } };
|
||||
column = <DynamicTableColumn> { id: 'date', type: 'Date' };
|
||||
|
@@ -17,11 +17,12 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { UserPreferencesService } from '../../../../../../services';
|
||||
import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '../../../../../../utils';
|
||||
import { UserPreferencesService } from '../../../../../../services/user-preferences.service';
|
||||
import { MomentDateAdapter } from '../../../../../../utils/momentDateAdapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../../../../../../utils/moment-date-formats.model';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
import { DynamicTableRow } from './../../dynamic-table-row.model';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { EcmModelService } from '../../../../../services/ecm-model.service';
|
||||
import { MaterialModule } from '../../../../../../material.module';
|
||||
import { FormService } from './../../../../../services/form.service';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { LogService } from '../../../../../../services';
|
||||
import { LogService } from '../../../../../../services/log.service';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormService } from './../../../../../services/form.service';
|
||||
import { DynamicTableColumnOption } from './../../dynamic-table-column-option.model';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ElementRef } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { FormFieldModel } from '../core/form-field.model';
|
||||
import { FormModel } from '../core/form.model';
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { UserProcessModel } from '../../../../models';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ActivitiContentService } from '../../../services/activiti-alfresco.service';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { MaterialModule } from '../../../../material.module';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { PeopleProcessService } from '../../../../services';
|
||||
import { PeopleProcessService } from '../../../../services/people-process.service';
|
||||
import { UserProcessModel } from '../../../../models';
|
||||
import { ENTER, ESCAPE } from '@angular/cdk/keycodes';
|
||||
import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { EcmModelService } from '../../../services/ecm-model.service';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { LogService } from '../../../../services';
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { EcmModelService } from '../../../services/ecm-model.service';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { LogService } from '../../../../services';
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ENTER, ESCAPE } from '@angular/cdk/keycodes';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { EcmModelService } from '../../../services/ecm-model.service';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
|
@@ -17,13 +17,15 @@
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { LogService, ThumbnailService } from '../../../../services';
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ThumbnailService } from '../../../../services/thumbnail.service';
|
||||
import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { ProcessContentService } from '../../../services/process-content.service';
|
||||
import { ContentLinkModel } from '../core/content-link.model';
|
||||
import { baseHost, WidgetComponent } from './../widget.component';
|
||||
import 'rxjs/add/operator/mergeMap';
|
||||
|
||||
@Component({
|
||||
selector: 'upload-widget',
|
||||
@@ -73,7 +75,7 @@ export class UploadWidgetComponent extends WidgetComponent implements OnInit {
|
||||
}
|
||||
|
||||
if (files && files.length > 0) {
|
||||
Observable.from(files).flatMap(file => this.uploadRawContent(file)).subscribe((res) => {
|
||||
Observable.from(files).mergeMap(file => this.uploadRawContent(file)).subscribe((res) => {
|
||||
filesSaved.push(res);
|
||||
},
|
||||
(error) => {
|
||||
|
@@ -28,7 +28,6 @@ describe('WidgetComponent', () => {
|
||||
let widget: WidgetComponent;
|
||||
let fixture: ComponentFixture<WidgetComponent>;
|
||||
let element: HTMLElement;
|
||||
let formService: FormService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -44,7 +43,6 @@ describe('WidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WidgetComponent);
|
||||
formService = TestBed.get(FormService);
|
||||
|
||||
element = fixture.nativeElement;
|
||||
widget = fixture.componentInstance;
|
||||
|
@@ -20,9 +20,9 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { DataTableModule } from '../datatable';
|
||||
import { DataColumnModule } from '../data-column';
|
||||
import { PipeModule } from '../pipes';
|
||||
import { DataTableModule } from '../datatable/datatable.module';
|
||||
import { DataColumnModule } from '../data-column/data-column.module';
|
||||
import { PipeModule } from '../pipes/pipe.module';
|
||||
|
||||
import { MaterialModule } from '../material.module';
|
||||
|
||||
|
@@ -21,7 +21,6 @@ export * from './components/widgets/content/content.widget';
|
||||
export * from './components/start-form.component';
|
||||
export * from './components/widgets/index';
|
||||
export * from './components/widgets/dynamic-table/dynamic-table-row.model';
|
||||
export { FORM_FIELD_VALIDATORS } from './components/widgets/core/form-field-validator';
|
||||
|
||||
export * from './services/form.service';
|
||||
export * from './services/ecm-model.service';
|
||||
@@ -30,5 +29,3 @@ export * from './services/form-rendering.service';
|
||||
export * from './services/process-content.service';
|
||||
|
||||
export * from './events/index';
|
||||
|
||||
export * from './form.module';
|
||||
|
@@ -15,12 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService, LogService } from '../../services';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlfrescoApi } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ExternalContent } from '../components/widgets/core/external-content';
|
||||
import { ExternalContentLink } from '../components/widgets/core/external-content-link';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class ActivitiContentService {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FormModel } from './../components/widgets/core/form.model';
|
||||
import { EcmModelService } from './ecm-model.service';
|
||||
|
||||
|
@@ -15,10 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService, LogService } from '../../services';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FormModel } from '../components/widgets/core/form.model';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
|
||||
@Injectable()
|
||||
export class EcmModelService {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DynamicComponentMapper, DynamicComponentResolveFunction, DynamicComponentResolver } from '../../services';
|
||||
import { DynamicComponentMapper, DynamicComponentResolveFunction, DynamicComponentResolver } from '../../services/dynamic-component-mapper.service';
|
||||
import { Injectable, Type } from '@angular/core';
|
||||
|
||||
import {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { Response, ResponseOptions } from '@angular/http';
|
||||
import { AlfrescoApiService, LogService } from '../../index';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { FormDefinitionModel } from '../models/form-definition.model';
|
||||
import { formModelTabs } from '../../mock';
|
||||
import { EcmModelService } from './ecm-model.service';
|
||||
@@ -54,7 +54,6 @@ describe('Form service', () => {
|
||||
|
||||
let service: FormService;
|
||||
let apiService: AlfrescoApiService;
|
||||
let logService: LogService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -69,7 +68,6 @@ describe('Form service', () => {
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(FormService);
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
logService = TestBed.get(LogService);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -15,10 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService, LogService } from '../../services';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { UserProcessModel } from '../../models';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { FormDefinitionModel } from '../models/form-definition.model';
|
||||
import { ContentLinkModel } from './../components/widgets/core/content-link.model';
|
||||
import { GroupModel } from './../components/widgets/core/group.model';
|
||||
@@ -28,6 +30,10 @@ import {
|
||||
ValidateDynamicTableRowEvent, ValidateFormEvent, ValidateFormFieldEvent
|
||||
} from './../events/index';
|
||||
import { EcmModelService } from './ecm-model.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/defaultIfEmpty';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class FormService {
|
||||
|
@@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService } from '../../services';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { NodeMetadata } from '../models/node-metadata.model';
|
||||
|
||||
@Injectable()
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ProcessContentService } from './process-content.service';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
@@ -15,10 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService, LogService } from '../../services';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { RelatedContentRepresentation } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class ProcessContentService {
|
||||
|
@@ -15,13 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService, LogService } from '../../services';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import * as moment from 'moment';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import moment from 'moment-es6';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FormFieldModel, FormModel, TabModel } from '../components/widgets/core/index';
|
||||
import { TaskProcessVariableModel } from '../models/task-process-variable.model';
|
||||
import { WidgetVisibilityModel } from '../models/widget-visibility.model';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class WidgetVisibilityService {
|
||||
|
@@ -15,6 +15,28 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './core.module';
|
||||
|
||||
export * from './viewer/viewer.module';
|
||||
export * from './userinfo/userinfo.module';
|
||||
export * from './toolbar/toolbar.module';
|
||||
export * from './settings/host-settings.module';
|
||||
export * from './pagination/pagination.module';
|
||||
export * from './login/login.module';
|
||||
export * from './language-menu/language-menu.module';
|
||||
export * from './info-drawer/info-drawer.module';
|
||||
export * from './data-column/data-column.module';
|
||||
export * from './datatable/datatable.module';
|
||||
export * from './context-menu/context-menu.module';
|
||||
export * from './collapsable/collapsable.module';
|
||||
export * from './card-view/card-view.module';
|
||||
export * from './app-config/app-config.module';
|
||||
export * from './form/form.module';
|
||||
|
||||
export * from './pipes/pipe.module';
|
||||
export * from './services/service.module';
|
||||
export * from './directives/directive.module';
|
||||
|
||||
export * from './viewer';
|
||||
export * from './userinfo';
|
||||
export * from './toolbar';
|
||||
@@ -34,10 +56,9 @@ export * from './form';
|
||||
export * from './pipes';
|
||||
export * from './services';
|
||||
export * from './directives';
|
||||
|
||||
export * from './utils';
|
||||
export * from './interface';
|
||||
export * from './models';
|
||||
export * from './events';
|
||||
export * from './mock';
|
||||
|
||||
export * from './core.module';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, DebugElement } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MaterialModule } from '../material.module';
|
||||
@@ -23,7 +23,6 @@ import { InfoDrawerLayoutComponent } from './info-drawer-layout.component';
|
||||
import { InfoDrawerComponent } from './info-drawer.component';
|
||||
|
||||
describe('InfoDrawerComponent', () => {
|
||||
let debugElement: DebugElement;
|
||||
let element: HTMLElement;
|
||||
let component: InfoDrawerComponent;
|
||||
let fixture: ComponentFixture<InfoDrawerComponent>;
|
||||
@@ -42,9 +41,8 @@ describe('InfoDrawerComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(InfoDrawerComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
debugElement = fixture.debugElement;
|
||||
component = fixture.componentInstance;
|
||||
});
|
||||
|
||||
it('should create instance of InfoDrawerComponent', () => {
|
||||
@@ -85,7 +83,6 @@ class CustomInfoDrawerComponent {
|
||||
|
||||
describe('Custom InfoDrawer', () => {
|
||||
let fixture: ComponentFixture<CustomInfoDrawerComponent>;
|
||||
let component: CustomInfoDrawerComponent;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -102,7 +99,6 @@ describe('Custom InfoDrawer', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CustomInfoDrawerComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './info-drawer-layout.component';
|
||||
export * from './info-drawer.component';
|
||||
|
||||
export * from './info-drawer.module';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface AbstractAuthentication {
|
||||
TYPE: string;
|
||||
|
@@ -17,8 +17,8 @@
|
||||
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||
import { DirectiveModule } from '../directives';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { DirectiveModule } from '../directives/directive.module';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { AppConfigService } from '../app-config/app-config.service';
|
||||
import { TranslateLoaderService } from '../services/translate-loader.service';
|
||||
@@ -31,7 +31,6 @@ describe('LanguageMenuComponent', () => {
|
||||
let fixture: ComponentFixture<LanguageMenuComponent>;
|
||||
let component: LanguageMenuComponent;
|
||||
let appConfig: AppConfigService;
|
||||
let translate: TranslateService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -60,7 +59,6 @@ describe('LanguageMenuComponent', () => {
|
||||
fixture = TestBed.createComponent(LanguageMenuComponent);
|
||||
component = fixture.componentInstance;
|
||||
appConfig = TestBed.get(AppConfigService);
|
||||
translate = TestBed.get(TranslateService);
|
||||
});
|
||||
|
||||
it('should have the default language', () => {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AppConfigService } from '../app-config';
|
||||
import { AppConfigService } from '../app-config/app-config.service';
|
||||
import { UserPreferencesService } from '../services/user-preferences.service';
|
||||
|
||||
@Component({
|
||||
|
@@ -16,5 +16,3 @@
|
||||
*/
|
||||
|
||||
export * from './language-menu.component';
|
||||
|
||||
export * from './language-menu.module';
|
||||
|
@@ -15,13 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Validators } from '@angular/forms';
|
||||
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { UserPreferencesService, AuthenticationService } from '../../services';
|
||||
import { UserPreferencesService } from '../../services/user-preferences.service';
|
||||
import { AuthenticationService } from '../../services/authentication.service';
|
||||
|
||||
import { MaterialModule } from '../../material.module';
|
||||
import { LoginErrorEvent } from '../models/login-error.event';
|
||||
@@ -32,7 +32,6 @@ import { LoginComponent } from './login.component';
|
||||
describe('LoginComponent', () => {
|
||||
let component: LoginComponent;
|
||||
let fixture: ComponentFixture<LoginComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: any;
|
||||
let authService: AuthenticationService;
|
||||
let router: Router;
|
||||
@@ -73,7 +72,6 @@ describe('LoginComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoginComponent);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
component.showRememberMe = true;
|
||||
|
@@ -18,15 +18,17 @@
|
||||
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, TemplateRef, ViewEncapsulation } from '@angular/core';
|
||||
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthenticationService, LogService,
|
||||
SettingsService, TranslationService, UserPreferencesService } from '../../services';
|
||||
|
||||
import { AuthenticationService } from '../../services/authentication.service';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { SettingsService } from '../../services/settings.service';
|
||||
import { TranslationService } from '../../services/translation.service';
|
||||
import { UserPreferencesService } from '../../services/user-preferences.service';
|
||||
|
||||
import { LoginErrorEvent } from '../models/login-error.event';
|
||||
import { LoginSubmitEvent } from '../models/login-submit.event';
|
||||
import { LoginSuccessEvent } from '../models/login-success.event';
|
||||
|
||||
declare var require: any;
|
||||
|
||||
enum LoginSteps {
|
||||
Landing = 0,
|
||||
Checking = 1,
|
||||
@@ -57,10 +59,10 @@ export class LoginComponent implements OnInit {
|
||||
registerLink: string = '';
|
||||
|
||||
@Input()
|
||||
logoImageUrl: string = require('../../assets/images/alfresco-logo.svg');
|
||||
logoImageUrl: string = './assets/images/alfresco-logo.svg';
|
||||
|
||||
@Input()
|
||||
backgroundImageUrl: string = require('../../assets/images/background.svg');
|
||||
backgroundImageUrl: string = './assets/images/background.svg';
|
||||
|
||||
@Input()
|
||||
copyrightText: string = '\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppConfigService } from '../app-config';
|
||||
import { AppConfigService } from '../app-config/app-config.service';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
@Injectable()
|
||||
|
@@ -15,7 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
// TODO: should be extending AuthenticationService
|
||||
export class AuthenticationMock /*extends AuthenticationService*/ {
|
||||
|
@@ -44,7 +44,7 @@ export let fakeSearch = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeError = {
|
||||
export let mockError = {
|
||||
error: {
|
||||
errorKey: 'Search failed',
|
||||
statusCode: 400,
|
||||
@@ -54,7 +54,7 @@ export let fakeError = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeApi = {
|
||||
export let searchMockApi = {
|
||||
core: {
|
||||
queriesApi: {
|
||||
findNodes: (term, opts) => Promise.resolve(fakeSearch)
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface LangChangeEvent {
|
||||
lang: string;
|
||||
|
@@ -23,7 +23,7 @@
|
||||
* @returns {CardViewDateItemModel} .
|
||||
*/
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { CardViewItem } from '../interface/card-view-item.interface';
|
||||
import { DynamicComponentModel } from '../services/dynamic-component-mapper.service';
|
||||
import { CardViewBaseItemModel, CardViewItemProperties } from './card-view-baseitem.model';
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './pagination.component';
|
||||
export * from './infinite-pagination.component';
|
||||
|
||||
export * from './pagination.module';
|
||||
|
@@ -21,5 +21,3 @@ export * from './node-name-tooltip.pipe';
|
||||
export * from './text-highlight.pipe';
|
||||
export * from './time-ago.pipe';
|
||||
export * from './user-initial.pipe';
|
||||
|
||||
export * from './pipe.module';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
|
@@ -15,9 +15,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { DataTableAdapter } from './datatable-adapter';
|
||||
export { ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from './object-datatable-adapter';
|
||||
export { DataRow } from './data-row.model';
|
||||
export { DataRowEvent } from './data-row-event.model';
|
||||
export { DataColumn } from './data-column.model';
|
||||
export { DataSorting } from './data-sorting.model';
|
||||
export * from './index';
|
@@ -17,9 +17,11 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppDefinitionRepresentation } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { LogService } from './log.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class AppsProcessService {
|
||||
|
@@ -22,7 +22,7 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { CookieServiceMock } from './../mock/cookie.service.mock';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { AppConfigModule } from '../app-config';
|
||||
import { AppConfigModule } from '../app-config/app-config.module';
|
||||
import { AuthGuardBpm } from './auth-guard-bpm.service';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
import { CookieService } from './cookie.service';
|
||||
|
@@ -23,7 +23,7 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { CookieServiceMock } from './../mock/cookie.service.mock';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { AppConfigModule } from '../app-config';
|
||||
import { AppConfigModule } from '../app-config/app-config.module';
|
||||
import { AuthGuard } from './auth-guard.service';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
import { CookieService } from './cookie.service';
|
||||
|
@@ -20,7 +20,7 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { CookieServiceMock } from './../mock/cookie.service.mock';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { AppConfigModule } from '../app-config';
|
||||
import { AppConfigModule } from '../app-config/app-config.module';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
import { CookieService } from './cookie.service';
|
||||
import { LogService } from './log.service';
|
||||
@@ -33,7 +33,6 @@ declare let jasmine: any;
|
||||
describe('AuthenticationService', () => {
|
||||
let apiService: AlfrescoApiService;
|
||||
let authService: AuthenticationService;
|
||||
let settingsService: SettingsService;
|
||||
let preferences: UserPreferencesService;
|
||||
let storage: StorageService;
|
||||
let cookie: CookieService;
|
||||
@@ -64,7 +63,6 @@ describe('AuthenticationService', () => {
|
||||
beforeEach(() => {
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
settingsService = TestBed.get(SettingsService);
|
||||
preferences = TestBed.get(UserPreferencesService);
|
||||
cookie = TestBed.get(CookieService);
|
||||
storage = TestBed.get(StorageService);
|
||||
|
@@ -16,12 +16,16 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { CookieService } from './cookie.service';
|
||||
import { LogService } from './log.service';
|
||||
import { StorageService } from './storage.service';
|
||||
import { UserPreferencesService } from './user-preferences.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
const REMEMBER_ME_COOKIE_KEY = 'ALFRESCO_REMEMBER_ME';
|
||||
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30 ;
|
||||
|
@@ -16,7 +16,8 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { CardViewBaseItemModel } from '../models/card-view-baseitem.model';
|
||||
|
||||
export interface UpdateNotification {
|
||||
|
@@ -16,11 +16,14 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { CommentProcessModel } from '../models/comment-process.model';
|
||||
import { UserProcessModel } from '../models/user-process.model';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { LogService } from './log.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class CommentProcessService {
|
||||
|
@@ -18,12 +18,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ContentApi, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { FolderCreatedEvent } from '../events/folder-created.event';
|
||||
import { PermissionsEnum } from '../models/permissions.enum';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
import { LogService } from './log.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class ContentService {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { NodePaging } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
|
@@ -16,9 +16,12 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { BpmProductVersionModel, EcmProductVersionModel } from '../models/product-version.model';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class DiscoveryApiService {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NodePaging } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { UserPreferencesService } from './user-preferences.service';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user