Skip to content

Commit

Permalink
(feature) add cspell config;
Browse files Browse the repository at this point in the history
(fix) whole project by cspell extension;
  • Loading branch information
dreyliky committed Nov 15, 2021
1 parent 6ba32f4 commit 2c968a7
Show file tree
Hide file tree
Showing 19 changed files with 70 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"[markdown]": {
"editor.wordWrap": "off"
},
"editor.guides.bracketPairs": true
"editor.guides.bracketPairs": true,
"cSpell.enabled": true
}
39 changes: 39 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "0.2",
"ignorePaths": [
"**/*.scss"
],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"autofocused",
"cacheable",
"customization",
"Сustomization",
"resizer",
"resizers",
"Typealias",
"typealiases",
"injectables",
"determinator"
],
"ignoreWords": [
"compodoc",
"prismjs",
"poemist",
"jasminewd",
"codegen",
"stylelist",
"tabindex",
"tablist",
"emsp",
// List of compodoc meanings:
"childs",
"ctype",
"rawdescription",
"rawtype",
"jsdoctag",
"jsdoctags"
],
"import": []
}
1 change: 0 additions & 1 deletion e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { isObjectsWithSameData } from '../helpers';
* Returns a new instance of the object only when DATA inside new instance
* is different than DATA in instance returned previous time.
**/
export function CachableReturnInstance<T>(
export function CacheableReturnInstance<T>(
baseView: OsBaseViewComponent,
methodName: string,
{ get, enumerable, value }: TypedPropertyDescriptor<T>
Expand All @@ -16,7 +16,7 @@ export function CachableReturnInstance<T>(
}

if (typeof(value) !== 'function') {
throw new Error('CachableReturnInstance can only be used with functions or getters');
throw new Error('CacheableReturnInstance can only be used with functions or getters');
}

return patchMethod(enumerable, methodName, value);
Expand Down
2 changes: 1 addition & 1 deletion src/app/library/core/decorators/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './cachable-return-instance.decorator';
export * from './cacheable-return-instance.decorator';
export * from './when-view-init.decorator';

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<input
#emailbox
#emailBox
[attr.id]="id"
[attr.name]="name"
[attr.size]="size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class EmailBoxComponent
@Output()
public osChange: EventEmitter<EmailBoxChangeEvent> = new EventEmitter();

@ViewChild('emailbox')
@ViewChild('emailBox')
private readonly inputElementRef: ElementRef<HTMLInputElement>;

/** @internal */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<input
#numberbox
#numberBox
[attr.id]="id"
[attr.name]="name"
[attr.size]="size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class NumberBoxComponent
@Output()
public osChange: EventEmitter<NumberBoxChangeEvent> = new EventEmitter();

@ViewChild('numberbox')
@ViewChild('numberBox')
private readonly inputRef: ElementRef<HTMLInputElement>;

/** @internal */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<input
#textbox
#textBox
[attr.id]="id"
[attr.name]="name"
[attr.size]="size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class TextBoxComponent extends OsBaseFieldComponent implements AfterViewI
@Output()
public osChange: EventEmitter<TextBoxChangeEvent> = new EventEmitter();

@ViewChild('textbox')
@ViewChild('textBox')
private readonly inputElementRef: ElementRef<HTMLInputElement>;

/** @internal */
Expand Down Expand Up @@ -64,10 +64,10 @@ export class TextBoxComponent extends OsBaseFieldComponent implements AfterViewI

protected onFieldValueChange(originalEvent: Event): void {
const targetElement = originalEvent.target as HTMLInputElement;
const textboxValue: string = targetElement.value;
const value: string = targetElement.value;

this.onChange?.(textboxValue);
this.osChange.emit({ originalEvent, value: textboxValue });
this.onChange?.(value);
this.osChange.emit({ originalEvent, value });
this.changeDetector.markForCheck();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, ComponentRef, Input, OnDestroy, Type } from '@angular/core';
import {
CachableReturnInstance,
CacheableReturnInstance,
CssClasslistToObjectHelper,
OsBaseViewComponent,
WhenViewInit
Expand Down Expand Up @@ -65,7 +65,7 @@ export abstract class BaseDynamicWindowComponent extends OsBaseViewComponent imp
return (this.config.isTitleBarVisible) ? '' : 'none';
}

@CachableReturnInstance
@CacheableReturnInstance
public get windowStyle(): object {
return {
[CssVariable.Left]: `${this.config.positionX}px`,
Expand All @@ -83,7 +83,7 @@ export abstract class BaseDynamicWindowComponent extends OsBaseViewComponent imp
};
}

@CachableReturnInstance
@CacheableReturnInstance
public get windowStyleClass(): object {
return {
...CssClasslistToObjectHelper.transform(this.config.styleClass),
Expand All @@ -100,7 +100,7 @@ export abstract class BaseDynamicWindowComponent extends OsBaseViewComponent imp
}

@WhenViewInit()
@CachableReturnInstance
@CacheableReturnInstance
public get draggerConfig(): object {
return {
draggableElement: this.titleBarElement,
Expand All @@ -112,7 +112,7 @@ export abstract class BaseDynamicWindowComponent extends OsBaseViewComponent imp
}

@WhenViewInit()
@CachableReturnInstance
@CacheableReturnInstance
public get resizerConfig(): object {
return {
targetElement: this.windowElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ export class DynamicWindowsCoordinatesService {
private readonly base = 96;
private readonly multiplier = 32;
private readonly maxAmountOfWindows = 8;
private currentAmoutOfWindows = 0;
private currentAmountOfWindows = 0;

public applyDefault(windowRef: DynamicWindowRefModel): void {
if (
typeof(windowRef.config.positionX) !== 'number' &&
typeof(windowRef.config.positionY) !== 'number'
) {
if (this.currentAmoutOfWindows >= this.maxAmountOfWindows) {
this.currentAmoutOfWindows = 0;
if (this.currentAmountOfWindows >= this.maxAmountOfWindows) {
this.currentAmountOfWindows = 0;
}

const targetPosition = (this.base + (this.multiplier * this.currentAmoutOfWindows));
this.currentAmoutOfWindows++;
const targetPosition = (this.base + (this.multiplier * this.currentAmountOfWindows));
this.currentAmountOfWindows++;

windowRef.updateConfig({
positionX: targetPosition,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form [formGroup]="formGroup">
<os-text-box
[placeholder]="'Enter your name'"
[formControl]="textboxControl">
[formControl]="textBoxControl">
</os-text-box>
</form>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { FormControl, FormGroup } from '@angular/forms';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class TextBoxAsFormControlComponent {
public readonly textboxControl = new FormControl('Hi there!');
public readonly textBoxControl = new FormControl('Hi there!');

public readonly formGroup = new FormGroup({
textboxValue: this.textboxControl
textBoxValue: this.textBoxControl
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
[isReadonly]="true"
[ngModel]="name"
[size]="name.length"
(osClick)="onSelectorTextboxClick($event)">
(osClick)="onSelectorTextBoxClick($event)">
</os-text-box>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class SelectorComponent {
@Input()
public name: string;

public onSelectorTextboxClick(event: MouseEvent): void {
public onSelectorTextBoxClick(event: MouseEvent): void {
const inputElement = event.target as HTMLInputElement;

inputElement.select();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<div class="buttons-wrapper">
<os-button
*ngFor="let amountOfWindows of windowAmoutsToSpawn"
*ngFor="let amountOfWindows of windowAmountToSpawnArray"
(osClick)="spawnWindows(amountOfWindows)">
{{ amountOfWindows }}
</os-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { WindowsPositionShuffleService } from './services';
export class ExperimentsAppComponent implements OnInit {
public totalWindowsAlive$: Observable<number>;

public readonly windowAmoutsToSpawn: number[] = [
public readonly windowAmountToSpawnArray: number[] = [
5, 10, 25, 50, 100, 200, 400
];

Expand Down

0 comments on commit 2c968a7

Please sign in to comment.