[ADF-3591] spellcheck support for code (#3827)

* setup spellcheck
This commit is contained in:
Denys Vuika
2018-10-23 15:05:38 +01:00
committed by Eugenio Romano
parent 53d96679ea
commit e39a2b149b
262 changed files with 1561 additions and 1005 deletions

View File

@@ -30,11 +30,11 @@ import { AnalyticsReportListComponent } from './components/analytics-report-list
import { AnalyticsReportParametersComponent } from './components/analytics-report-parameters.component';
import { AnalyticsComponent } from './components/analytics.component';
import { CheckboxWidgetAanalyticsComponent } from './components/widgets/checkbox/checkbox.widget';
import { CheckboxWidgetAnalyticsComponent } from './components/widgets/checkbox/checkbox.widget';
import { DateRangeWidgetComponent } from './components/widgets/date-range/date-range.widget';
import { DropdownWidgetAanalyticsComponent } from './components/widgets/dropdown/dropdown.widget';
import { DropdownWidgetAnalyticsComponent } from './components/widgets/dropdown/dropdown.widget';
import { DurationWidgetComponent } from './components/widgets/duration/duration.widget';
import { NumberWidgetAanlyticsComponent } from './components/widgets/number/number.widget';
import { NumberWidgetAnalyticsComponent } from './components/widgets/number/number.widget';
import { FlexLayoutModule } from '@angular/flex-layout';
@@ -55,10 +55,10 @@ import { FlexLayoutModule } from '@angular/flex-layout';
AnalyticsReportParametersComponent,
AnalyticsGeneratorComponent,
AnalyticsReportHeatMapComponent,
DropdownWidgetAanalyticsComponent,
NumberWidgetAanlyticsComponent,
DropdownWidgetAnalyticsComponent,
NumberWidgetAnalyticsComponent,
DurationWidgetComponent,
CheckboxWidgetAanalyticsComponent,
CheckboxWidgetAnalyticsComponent,
DateRangeWidgetComponent
],
exports: [
@@ -67,10 +67,10 @@ import { FlexLayoutModule } from '@angular/flex-layout';
AnalyticsReportParametersComponent,
AnalyticsGeneratorComponent,
AnalyticsReportHeatMapComponent,
DropdownWidgetAanalyticsComponent,
NumberWidgetAanlyticsComponent,
DropdownWidgetAnalyticsComponent,
NumberWidgetAnalyticsComponent,
DurationWidgetComponent,
CheckboxWidgetAanalyticsComponent,
CheckboxWidgetAnalyticsComponent,
DateRangeWidgetComponent
]
})

View File

@@ -90,7 +90,7 @@ describe('AnalyticsGeneratorComponent', () => {
});
});
it('Should render the Process definition overview report when onchanges is called ', (done) => {
it('Should render the Process definition overview report when [onChanges] is called ', (done) => {
component.success.subscribe((res) => {
expect(res).toBeDefined();
expect(res.length).toEqual(3);

View File

@@ -28,8 +28,8 @@ describe('AnalyticsReportHeatMapComponent', () => {
let fixture: ComponentFixture<AnalyticsReportHeatMapComponent>;
let element: HTMLElement;
let totalCountPerc: any = { 'sid-fake-id': 0, 'fake-start-event': 100 };
let totalTimePerc: any = { 'sid-fake-id': 10, 'fake-start-event': 30 };
let totalCountPercent: any = { 'sid-fake-id': 0, 'fake-start-event': 100 };
let totalTimePercent: any = { 'sid-fake-id': 10, 'fake-start-event': 30 };
let avgTimePercentages: any = { 'sid-fake-id': 5, 'fake-start-event': 50 };
let totalCountValues: any = { 'sid-fake-id': 2, 'fake-start-event': 3 };
@@ -46,9 +46,9 @@ describe('AnalyticsReportHeatMapComponent', () => {
element = fixture.nativeElement;
component.report = {
totalCountsPercentages: totalCountPerc,
totalCountsPercentages: totalCountPercent,
totalCountValues: totalCountValues,
totalTimePercentages: totalTimePerc,
totalTimePercentages: totalTimePercent,
totalTimeValues: totalTimeValues,
avgTimeValues: avgTimeValues,
avgTimePercentages: avgTimePercentages
@@ -90,21 +90,21 @@ describe('AnalyticsReportHeatMapComponent', () => {
expect(component.hasMetric()).toBeTruthy();
}));
it('should change the currentmetric width totalCount', async(() => {
it('should change the currentMetric width totalCount', async(() => {
let field = { value: 'totalCount' };
component.onMetricChanges(field);
expect(component.currentMetric).toEqual(totalCountValues);
expect(component.currentMetricColors).toEqual(totalCountPerc);
expect(component.currentMetricColors).toEqual(totalCountPercent);
}));
it('should change the currentmetric width totalTime', async(() => {
it('should change the currentMetric width totalTime', async(() => {
let field = { value: 'totalTime' };
component.onMetricChanges(field);
expect(component.currentMetric).toEqual(totalTimeValues);
expect(component.currentMetricColors).toEqual(totalTimePerc);
expect(component.currentMetricColors).toEqual(totalTimePercent);
}));
it('should change the currentmetric width avgTime', async(() => {
it('should change the currentMetric width avgTime', async(() => {
let field = { value: 'avgTime' };
component.onMetricChanges(field);
expect(component.currentMetric).toEqual(avgTimeValues);

View File

@@ -10,6 +10,6 @@
<adf-analytics-generator [reportId]="reportId"
[reportParamQuery]="reportParamQuery"
#analyticsgenerator>
#analyticsGenerator>
</adf-analytics-generator>
</div>

View File

@@ -45,21 +45,21 @@ export class AnalyticsComponent implements OnChanges {
@Output()
reportDeleted = new EventEmitter();
@ViewChild('analyticsgenerator')
analyticsgenerator: AnalyticsGeneratorComponent;
@ViewChild('analyticsGenerator')
analyticsGenerator: AnalyticsGeneratorComponent;
reportParamQuery: ReportQuery;
ngOnChanges(changes: SimpleChanges) {
this.analyticsgenerator.reset();
this.analyticsGenerator.reset();
}
public showReport($event) {
this.analyticsgenerator.generateReport(this.reportId, $event);
this.analyticsGenerator.generateReport(this.reportId, $event);
}
public reset() {
this.analyticsgenerator.reset();
this.analyticsGenerator.reset();
}
public onEditReport(name: string) {

View File

@@ -26,7 +26,7 @@
templateUrl: './checkbox.widget.html',
encapsulation: ViewEncapsulation.None
})
export class CheckboxWidgetAanalyticsComponent extends WidgetComponent {
export class CheckboxWidgetAnalyticsComponent extends WidgetComponent {
@Input()
field: any;

View File

@@ -62,7 +62,7 @@ export class DateRangeWidgetComponent implements OnInit {
this.dateAdapter.setLocale(locale);
});
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
momentDateAdapter.overrideDisplyaFormat = this.SHOW_FORMAT;
momentDateAdapter.overrideDisplayFormat = this.SHOW_FORMAT;
if (this.field) {
if (this.field.value && this.field.value.startDate) {

View File

@@ -27,7 +27,7 @@ import { WidgetComponent } from './../widget.component';
styleUrls: ['./dropdown.widget.scss'],
encapsulation: ViewEncapsulation.None
})
export class DropdownWidgetAanalyticsComponent extends WidgetComponent implements OnInit {
export class DropdownWidgetAnalyticsComponent extends WidgetComponent implements OnInit {
@Input()
field: any;

View File

@@ -21,7 +21,7 @@ import { Component, ElementRef, Input, OnInit, ViewEncapsulation } from '@angula
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ParameterValueModel } from '../../../../diagram/models/report/parameterValue.model';
import { ReportParameterDetailsModel } from '../../../../diagram/models/report/reportParameterDetails.model';
import { NumberWidgetAanlyticsComponent } from './../number/number.widget';
import { NumberWidgetAnalyticsComponent } from './../number/number.widget';
@Component({
selector: 'duration-widget',
@@ -29,7 +29,7 @@ import { NumberWidgetAanlyticsComponent } from './../number/number.widget';
styleUrls: ['./duration.widget.scss'],
encapsulation: ViewEncapsulation.None
})
export class DurationWidgetComponent extends NumberWidgetAanlyticsComponent implements OnInit {
export class DurationWidgetComponent extends NumberWidgetAnalyticsComponent implements OnInit {
@Input()
field: any;

View File

@@ -27,7 +27,7 @@ import { WidgetComponent } from './../widget.component';
styleUrls: ['./number.widget.scss'],
encapsulation: ViewEncapsulation.None
})
export class NumberWidgetAanlyticsComponent extends WidgetComponent implements OnInit {
export class NumberWidgetAnalyticsComponent extends WidgetComponent implements OnInit {
@Input()
field: any;

View File

@@ -44,6 +44,7 @@ describe('Diagrams activities', () => {
beforeEach(() => {
jasmine.Ajax.install();
component.processInstanceId = '38399';
// cspell: disable-next
component.processDefinitionId = 'fakeprocess:24:38399';
component.metricPercentages = { startEvent: 0 };
});

View File

@@ -81,7 +81,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.exclusiveGatway] };
let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
ajaxReply(resp);
}));
@@ -102,7 +102,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.inclusiveGatway] };
let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
ajaxReply(resp);
}));
@@ -123,7 +123,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.parallelGatway] };
let resp = { elements: [diagramsGatewaysMock.parallelGateway] };
ajaxReply(resp);
}));
@@ -154,7 +154,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.eventGatway] };
let resp = { elements: [diagramsGatewaysMock.eventGateway] };
ajaxReply(resp);
}));
});
@@ -178,7 +178,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.exclusiveGatway] };
let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
ajaxReply(resp);
}));
@@ -199,7 +199,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.exclusiveGatwayActive] };
let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayActive] };
ajaxReply(resp);
}));
@@ -220,7 +220,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.exclusiveGatwayCompleted] };
let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayCompleted] };
ajaxReply(resp);
}));
@@ -241,7 +241,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.inclusiveGatway] };
let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
ajaxReply(resp);
}));
@@ -262,7 +262,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.inclusiveGatwayActive] };
let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayActive] };
ajaxReply(resp);
}));
@@ -283,7 +283,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.inclusiveGatwayCompleted] };
let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayCompleted] };
ajaxReply(resp);
}));
@@ -304,7 +304,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.parallelGatway] };
let resp = { elements: [diagramsGatewaysMock.parallelGateway] };
ajaxReply(resp);
}));
@@ -325,7 +325,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.parallelGatwayActive] };
let resp = { elements: [diagramsGatewaysMock.parallelGatewayActive] };
ajaxReply(resp);
}));
@@ -346,7 +346,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.parallelGatwayCompleted] };
let resp = { elements: [diagramsGatewaysMock.parallelGatewayCompleted] };
ajaxReply(resp);
}));
@@ -377,7 +377,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.eventGatway] };
let resp = { elements: [diagramsGatewaysMock.eventGateway] };
ajaxReply(resp);
}));
@@ -408,7 +408,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.eventGatwayActive] };
let resp = { elements: [diagramsGatewaysMock.eventGatewayActive] };
ajaxReply(resp);
}));
@@ -439,7 +439,7 @@ describe('Diagrams gateways', () => {
});
});
component.ngOnChanges();
let resp = { elements: [diagramsGatewaysMock.eventGatwayCompleted] };
let resp = { elements: [diagramsGatewaysMock.eventGatewayCompleted] };
ajaxReply(resp);
}));
});

View File

@@ -95,7 +95,7 @@ describe('Diagrams swim', () => {
let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
expect(shapeText).not.toBeNull();
expect(shapeText.attributes[2].value).toEqual('Beckend');
expect(shapeText.attributes[2].value).toEqual('Backend');
});
});
component.ngOnChanges();
@@ -137,7 +137,7 @@ describe('Diagrams swim', () => {
let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
expect(shapeText).not.toBeNull();
expect(shapeText.attributes[2].value).toEqual('Beckend');
expect(shapeText.attributes[2].value).toEqual('Backend');
});
});
component.ngOnChanges();

View File

@@ -34,7 +34,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
error = new EventEmitter();
ARROW_WIDTH = 4;
SEQUENCEFLOW_STROKE = 1.5;
SEQUENCE_FLOW_STROKE = 1.5;
constructor(public elementRef: ElementRef,
raphaelService: RaphaelService) {
@@ -52,9 +52,9 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
}
public drawLine(flow: any) {
let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCEFLOW_STROKE, this.paper);
let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCE_FLOW_STROKE, this.paper);
polyline.element = this.paper.path(polyline.path);
polyline.element.attr({'stroke-width': this.SEQUENCEFLOW_STROKE});
polyline.element.attr({'stroke-width': this.SEQUENCE_FLOW_STROKE});
polyline.element.attr({'stroke': '#585858'});
polyline.element.node.id = this.flow.id;
@@ -75,7 +75,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
arrowHead.attr('fill', '#585858');
arrowHead.attr('stroke-width', this.SEQUENCEFLOW_STROKE);
arrowHead.attr('stroke-width', this.SEQUENCE_FLOW_STROKE);
arrowHead.attr('stroke', '#585858');
}

View File

@@ -78,8 +78,8 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
let letterWidth = textPaper.getBBox().width / text.length;
let removedLineBreaks = text.split('\n');
let actualRowLength = 0, formattedText = [];
removedLineBreaks.forEach(senteces => {
let words = senteces.split(' ');
removedLineBreaks.forEach(sentence => {
let words = sentence.split(' ');
words.forEach(word => {
let length = word.length;
if (actualRowLength + (length * letterWidth) > elementWidth) {

View File

@@ -61,8 +61,8 @@ export class RaphaelPentagonDirective extends RaphaelBase implements OnInit {
}
public draw(center: Point, opts?: any) {
let penta = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' +
const shape = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' +
' L 15.794545,8.389969 L 23.130481,13.720774 L 20.327514,22.344972 z').attr(opts);
penta.transform('T' + (center.x + 4) + ',' + (center.y + 4));
shape.transform('T' + (center.x + 4) + ',' + (center.y + 4));
}
}

View File

@@ -48,8 +48,6 @@ export class RaphaelService implements OnDestroy {
throw new Error('insights configuration issue: Embedding Chart.js lib is mandatory');
}
let paper = new Raphael(ctx, this.width, this.height);
// paper.setViewBox(0, 0, 583, 344.08374193550003, false);
// paper.renderfix();
return paper;
}

View File

@@ -72,7 +72,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
}
/**
* Clear all bound eventlisteners
* Clear all bound event listeners
*/
ngOnDestroy() {
window.removeEventListener('scroll', this.boundMouseLeaveAndScrollHandler, true);
@@ -94,7 +94,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
}
/**
* Calculates the tooltip's position and displays it
* Calculates the tooltip position and displays it
*
* @param event mouseenter/touchend event
*/

View File

@@ -79,6 +79,7 @@ export let chartTaskOverview = {
'type': 'masterDetailTable',
'title': 'Detailed task statistics',
'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TITLE',
/* cspell:disable-next-line */
'columnNames': ['Task', 'Count', 'Sum', 'Min duration', 'Max duration', 'Average duration', 'Stddev duration'],
'columnNameKeys': [
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TASK',
@@ -87,6 +88,7 @@ export let chartTaskOverview = {
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.MIN-DURATION',
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.MAX-DURATION',
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.AVERAGE',
/* cspell:disable-next-line */
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.STDDE'],
'columnsCentered': [false, false, false, false],
'rows': [

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
export let exclusiveGatway = {
export let exclusiveGateway = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'ExclusiveGateway',
width: 40,
@@ -25,7 +25,7 @@ export let exclusiveGatway = {
properties: [{}]
};
export let exclusiveGatwayActive = {
export let exclusiveGatewayActive = {
completed: false,
current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -37,7 +37,7 @@ export let exclusiveGatwayActive = {
properties: [{}]
};
export let exclusiveGatwayCompleted = {
export let exclusiveGatewayCompleted = {
completed: true,
current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -49,7 +49,7 @@ export let exclusiveGatwayCompleted = {
properties: [{}]
};
export let inclusiveGatway = {
export let inclusiveGateway = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'InclusiveGateway',
width: 40,
@@ -59,7 +59,7 @@ export let inclusiveGatway = {
properties: [{}]
};
export let inclusiveGatwayActive = {
export let inclusiveGatewayActive = {
completed: false,
current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -71,7 +71,7 @@ export let inclusiveGatwayActive = {
properties: [{}]
};
export let inclusiveGatwayCompleted = {
export let inclusiveGatewayCompleted = {
completed: true,
current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -83,7 +83,7 @@ export let inclusiveGatwayCompleted = {
properties: [{}]
};
export let parallelGatway = {
export let parallelGateway = {
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
type: 'ParallelGateway',
width: 40,
@@ -93,7 +93,7 @@ export let parallelGatway = {
properties: [{}]
};
export let parallelGatwayActive = {
export let parallelGatewayActive = {
completed: false,
current: true,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
@@ -105,7 +105,7 @@ export let parallelGatwayActive = {
properties: [{}]
};
export let parallelGatwayCompleted = {
export let parallelGatewayCompleted = {
completed: true,
current: false,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
@@ -117,7 +117,7 @@ export let parallelGatwayCompleted = {
properties: [{}]
};
export let eventGatway = {
export let eventGateway = {
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
type: 'EventGateway',
width: 40,
@@ -127,7 +127,7 @@ export let eventGatway = {
properties: [{}]
};
export let eventGatwayActive = {
export let eventGatewayActive = {
completed: false,
current: true,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
@@ -139,7 +139,7 @@ export let eventGatwayActive = {
properties: [{}]
};
export let eventGatwayCompleted = {
export let eventGatewayCompleted = {
completed: true,
current: false,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',

View File

@@ -34,7 +34,7 @@ export let poolLanes = {
y: 45,
lanes: [{
id: 'sid-332204AB-D0F8-44CD-87B3-BF9DF59FF8AB',
name: 'Beckend',
name: 'Backend',
width: 570,
height: 250,
x: 90,