Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed May 6, 2018
1 parent f5c0fd0 commit 77aa1a1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"start": "ng serve",
"build": "ts-node build.ts",
"build-data": "ts-node scripts/build-data.ts",
"test": "ng test --single-run --browsers=ChromeCI",
"test": "ng test ---watch=false --browsers=ChromeCI",
"test:watch": "ng test --browsers=ChromeCI",
"test:ci": "ng test --single-run --code-coverage --no-progress --browsers=ChromeCI",
"test:ci": "ng test --watch=false --code-coverage --no-progress --browsers=ChromeCI",
"lint": "ng lint ngx-emoji-mart --type-check --format stylish",
"lint:fix": "ng lint ngx-emoji-mart --type-check --fix --format stylish",
"ghpages": "ng build --prod --no-progress --baseHref='/ngx-emoji-mart/'",
Expand Down
18 changes: 11 additions & 7 deletions src/lib/picker/emoji-search.service.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { Injectable } from '@angular/core';

import { categories, EmojiData, EmojiService } from '@ctrl/ngx-emoji-mart/ngx-emoji';
import {
categories,
EmojiData,
EmojiService,
} from '@ctrl/ngx-emoji-mart/ngx-emoji';
import { intersect } from './utils';

@Injectable()
export class EmojiSearch {
originalPool: any = {};
index: {
results?: EmojiData[],
pool?: { [key: string]: EmojiData },
[key: string]: any,
results?: EmojiData[];
pool?: { [key: string]: EmojiData };
[key: string]: any;
} = {};
emojisList: any = {};
emoticonsList: { [key: string]: string } = {};
Expand Down Expand Up @@ -83,8 +87,8 @@ export class EmojiSearch {
return;
}

category.emojis!.forEach(emojiId =>
pool[emojiId] = this.emojiService.names[emojiId],
category.emojis!.forEach(
emojiId => (pool[emojiId] = this.emojiService.names[emojiId]),
);
});

Expand Down Expand Up @@ -114,7 +118,7 @@ export class EmojiSearch {
aIndex = aIndex[char];

if (!aIndex.results) {
const scores: {[key: string]: number} = {};
const scores: { [key: string]: number } = {};

aIndex.results = [];
aIndex.pool = {};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/picker/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class PreviewComponent implements OnChanges {
@Input() emojiSheetSize: any;
@Input() emojiBackgroundImageFn: any;
@Output() skinChange = new EventEmitter<number>();
emojiData?: EmojiData;
emojiData: Partial<EmojiData> = {};
listedEmoticons?: string[];

constructor(
Expand Down
18 changes: 7 additions & 11 deletions src/lib/picker/skins.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@ import { Emoji } from '@ctrl/ngx-emoji-mart/ngx-emoji';
@Component({
selector: 'emoji-skins',
template: `
<div>
<div class="emoji-mart-skin-swatches" [class.emoji-mart-skin-swatches-opened]="opened">
<span *ngFor="let skinTone of skinTones"
class="emoji-mart-skin-swatch"
[class.emoji-mart-skin-swatch-selected]="skinTone === skin"
>
<span (click)="this.handleClick(skinTone)"
class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
></span>
</span>
</div>
<div class="emoji-mart-skin-swatches" [class.emoji-mart-skin-swatches-opened]="opened">
<span *ngFor="let skinTone of skinTones" class="emoji-mart-skin-swatch"
[class.emoji-mart-skin-swatch-selected]="skinTone === skin">
<span (click)="this.handleClick(skinTone)"
class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
></span>
</span>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
3 changes: 1 addition & 2 deletions src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"@ctrl/ngx-emoji-mart/ngx-emoji": ["./lib/emoji/public_api"]
}
},
"files": ["test.ts" "polyfills.ts"
,],
"files": ["test.ts", "polyfills.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"],
"angularCompilerOptions": {
"preserveWhitespaces": false,
Expand Down

0 comments on commit 77aa1a1

Please sign in to comment.