Services list in readme and in the doc generator (#2091)

* add services list in readme and in the autogenerator

* update tslint 5.5.0
This commit is contained in:
Eugenio Romano
2017-07-17 11:38:10 +01:00
parent b1d2ec9e9e
commit 3a76027fe3
211 changed files with 1413 additions and 9463 deletions

View File

@@ -39,7 +39,7 @@ import { WidgetComponent } from './../widgets/widget.component';
declare var adf: any;
@Component({
selector: 'form-field',
selector: 'adf-form-field, form-field',
template: `
<div [hidden]="!field?.isVisible">
<div #container></div>
@@ -78,7 +78,7 @@ export class FormFieldComponent implements OnInit, OnDestroy {
if (componentType) {
let factory = this.componentFactoryResolver.resolveComponentFactory(componentType);
this.componentRef = this.container.createComponent(factory);
let instance = <WidgetComponent>this.componentRef.instance;
let instance = <WidgetComponent> this.componentRef.instance;
instance.field = this.field;
instance.fieldChanged.subscribe(field => {
if (field && field.form) {

View File

@@ -184,17 +184,17 @@ describe('FormComponent', () => {
});
it('should get process variable if is a process task', () => {
spyOn(formService, 'getTaskForm').and.callFake((taskId) => {
spyOn(formService, 'getTaskForm').and.callFake((currentTaskId) => {
return Observable.create(observer => {
observer.next({ taskId: taskId });
observer.next({ taskId: currentTaskId });
observer.complete();
});
});
spyOn(visibilityService, 'getTaskProcessVariable').and.returnValue(Observable.of({}));
spyOn(formService, 'getTask').and.callFake((taskId) => {
spyOn(formService, 'getTask').and.callFake((currentTaskId) => {
return Observable.create(observer => {
observer.next({ taskId: taskId, processDefinitionId: '10201' });
observer.next({ taskId: currentTaskId, processDefinitionId: '10201' });
observer.complete();
});
});
@@ -207,17 +207,17 @@ describe('FormComponent', () => {
});
it('should not get process variable if is not a process task', () => {
spyOn(formService, 'getTaskForm').and.callFake((taskId) => {
spyOn(formService, 'getTaskForm').and.callFake((currentTaskId) => {
return Observable.create(observer => {
observer.next({ taskId: taskId });
observer.next({ taskId: currentTaskId });
observer.complete();
});
});
spyOn(visibilityService, 'getTaskProcessVariable').and.returnValue(Observable.of({}));
spyOn(formService, 'getTask').and.callFake((taskId) => {
spyOn(formService, 'getTask').and.callFake((currentTaskId) => {
return Observable.create(observer => {
observer.next({ taskId: taskId, processDefinitionId: 'null' });
observer.next({ taskId: currentTaskId, processDefinitionId: 'null' });
observer.complete();
});
});
@@ -422,9 +422,9 @@ describe('FormComponent', () => {
it('should fetch and parse form by task id', (done) => {
spyOn(formService, 'getTask').and.returnValue(Observable.of({}));
spyOn(formService, 'getTaskForm').and.callFake((taskId) => {
spyOn(formService, 'getTaskForm').and.callFake((currentTaskId) => {
return Observable.create(observer => {
observer.next({ taskId: taskId });
observer.next({ taskId: currentTaskId });
observer.complete();
});
});
@@ -474,9 +474,9 @@ describe('FormComponent', () => {
});
it('should fetch and parse form definition by id', () => {
spyOn(formService, 'getFormDefinitionById').and.callFake((formId) => {
spyOn(formService, 'getFormDefinitionById').and.callFake((currentFormId) => {
return Observable.create(observer => {
observer.next({ id: formId });
observer.next({ id: currentFormId });
observer.complete();
});
});
@@ -506,16 +506,16 @@ describe('FormComponent', () => {
});
it('should fetch and parse form definition by form name', () => {
spyOn(formService, 'getFormDefinitionByName').and.callFake((formName) => {
spyOn(formService, 'getFormDefinitionByName').and.callFake((currentFormName) => {
return Observable.create(observer => {
observer.next(formName);
observer.next(currentFormName);
observer.complete();
});
});
spyOn(formService, 'getFormDefinitionById').and.callFake((formName) => {
spyOn(formService, 'getFormDefinitionById').and.callFake((currentFormName) => {
return Observable.create(observer => {
observer.next({ name: formName });
observer.next({ name: currentFormName });
observer.complete();
});
});

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { ActivitiAlfrescoContentService } from '../../../services/activiti-alfresco.service';

View File

@@ -15,10 +15,12 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component } from '@angular/core';
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent} from './../widget.component';
import { baseHost , WidgetComponent } from './../widget.component';
@Component({
selector: 'checkbox-widget',

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { ContainerColumnModel } from './../core/container-column.model';
import { ContainerModel } from './../core/container.model';
import { FormFieldTypes } from './../core/form-field-types';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { FormFieldModel } from './form-field.model';
export class ContainerColumnModel {

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { FormFieldModel } from './form-field.model';
import { FormWidgetModel } from './form-widget.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export class ContentLinkModel {
contentAvailable: boolean;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export interface ExternalContentLink {
contentAvailable: boolean;
created: string;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export interface ExternalContent {
folder: boolean;
id: string;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import {FormFieldSelectedFolder} from './form-field-selected-folder';
export interface FormFieldFileSource {

View File

@@ -15,7 +15,9 @@
* limitations under the License.
*/
import {FormFieldFileSource} from './form-field-file-source';
/* tslint:disable:component-selector */
import { FormFieldFileSource } from './form-field-file-source';
export interface FormFieldMetadata {
[key: string]: any;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export interface FormFieldOption {
id: string;
name: string;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export interface FormFieldSelectedFolder {
accountId: string;
folderTree: [any];

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export interface FormFieldTemplates {
[key: string]: string;
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export class FormFieldTypes {
static CONTAINER: string = 'container';
static GROUP: string = 'group';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import * as moment from 'moment';
import { FormFieldTypes } from './form-field-types';
import { FormFieldModel } from './form-field.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import * as moment from 'moment';
import { WidgetVisibilityModel } from '../../../models/widget-visibility.model';
import { ContainerColumnModel } from './container-column.model';
@@ -163,7 +165,7 @@ export class FormFieldModel extends FormWidgetModel {
this.hyperlinkUrl = json.hyperlinkUrl;
this.displayText = json.displayText;
this.visibilityCondition = <WidgetVisibilityModel> json.visibilityCondition;
this.enableFractions = <boolean>json.enableFractions;
this.enableFractions = <boolean> json.enableFractions;
this.currency = json.currency;
this.dateDisplayFormat = json.dateDisplayFormat || this.defaultDateFormat;
this._value = this.parseValue(json);

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { FormOutcomeModel } from './form-outcome.model';
export class FormOutcomeEvent {

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { FormWidgetModel } from './form-widget.model';
import { FormModel } from './form.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
/* tslint:disable */
import { FormFieldMetadata } from './form-field-metadata';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { FormModel } from './form.model';
export abstract class FormWidgetModel {

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { FormFieldEvent } from './../../../events/index';
import { FormService } from './../../../services/form.service';
import { ContainerModel } from './container.model';
@@ -137,7 +139,7 @@ export class FormModel {
let field = this.fields[i];
if (field instanceof ContainerModel) {
let container = <ContainerModel>field;
let container = <ContainerModel> field;
result.push(container.field);
result.push(...container.field.fields);
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export class GroupUserModel {
company: string;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export class GroupModel {
externalId: string;

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
export * from './form-field-metadata';
export * from './form-values';
export * from './form-field-types';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { WidgetVisibilityModel } from '../../../models/widget-visibility.model';
import { FormWidgetModel } from './form-widget.model';
import { FormModel } from './form.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { AfterViewChecked, Component, ElementRef, OnInit } from '@angular/core';
import * as moment from 'moment';
import { FormService } from './../../../services/form.service';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import * as moment from 'moment';
import { FormService } from '../../../services/form.service';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { FormService } from '../../../services/form.service';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import * as moment from 'moment';
import { FormFieldModel } from './../core/form-field.model';
import { FormWidgetModel } from './../core/form-widget.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { ChangeDetectorRef, Component, ElementRef, Input, OnInit } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';
@@ -64,7 +66,7 @@ export class DynamicTableWidgetComponent extends WidgetComponent implements OnIn
forceFocusOnAddButton() {
if (this.content) {
this.cd.detectChanges();
let buttonAddRow = <HTMLButtonElement>this.elementRef.nativeElement.querySelector('#' + this.content.id + '-add-row');
let buttonAddRow = <HTMLButtonElement> this.elementRef.nativeElement.querySelector('#' + this.content.id + '-add-row');
if (this.isDynamicTableReady(buttonAddRow)) {
buttonAddRow.focus();
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, Input } from '@angular/core';
import { DynamicTableColumn, DynamicTableModel, DynamicTableRow } from './../../dynamic-table.widget.model';
@@ -35,7 +37,7 @@ export class BooleanEditorComponent {
column: DynamicTableColumn;
onValueChanged(row: DynamicTableRow, column: DynamicTableColumn, event: any) {
let value: boolean = (<HTMLInputElement>event.target).checked;
let value: boolean = (<HTMLInputElement> event.target).checked;
row.value[column.id] = value;
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, ElementRef, Input, OnInit } from '@angular/core';
import * as moment from 'moment';
import { DynamicTableColumn, DynamicTableModel, DynamicTableRow } from './../../dynamic-table.widget.model';
@@ -69,7 +71,7 @@ export class DateEditorComponent implements OnInit {
this.datePicker.time = dateValue;
this.row.value[this.column.id] = `${dateValue.format('YYYY-MM-DD')}T00:00:00.000Z`;
this.table.flushValue();
};
}
onDateSelected(event: CustomEvent) {
this.value = this.datePicker.time.format('DD-MM-YYYY');

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, Input, OnInit } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { FormService } from './../../../../../services/form.service';
@@ -94,7 +96,7 @@ export class DropdownEditorComponent implements OnInit {
}
onValueChanged(row: DynamicTableRow, column: DynamicTableColumn, event: any) {
let value: any = (<HTMLInputElement>event.target).value;
let value: any = (<HTMLInputElement> event.target).value;
value = column.options.find(opt => opt.name === value);
row.value[column.id] = value;
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { DynamicRowValidationSummary, DynamicTableColumn, DynamicTableModel, DynamicTableRow } from './../dynamic-table.widget.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, Input, OnInit } from '@angular/core';
import { DynamicTableColumn, DynamicTableModel, DynamicTableRow } from './../../dynamic-table.widget.model';
@@ -41,7 +43,7 @@ export class TextEditorComponent implements OnInit {
}
onValueChanged(row: DynamicTableRow, column: DynamicTableColumn, event: any) {
let value: any = (<HTMLInputElement>event.target).value;
let value: any = (<HTMLInputElement> event.target).value;
row.value[column.id] = value;
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, ElementRef, OnInit } from '@angular/core';
import { FormService } from '../../../services/form.service';
import { GroupModel } from './../core/group.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, ElementRef, OnInit } from '@angular/core';
import { FormService } from '../../../services/form.service';
import { GroupUserModel } from '../core/group-user.model';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { FormService } from '../../../services/form.service';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { AfterContentChecked, AfterViewInit, Component, EventEmitter, Input, Output } from '@angular/core';
import { FormFieldModel, TabModel } from './../core/index';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import {
Directive,
ElementRef,

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { WidgetVisibilityService } from '../../../services/widget-visibility.service';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component } from '@angular/core';
import { FormService } from './../../../services/form.service';
import { baseHost , WidgetComponent } from './../widget.component';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { Component, OnInit } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
import { FormService } from '../../../services/form.service';

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* tslint:disable:component-selector */
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, Output } from '@angular/core';
import { FormService } from './../../services/form.service';
import { FormFieldModel } from './core/index';