@ctrl/ngx-emoji-mart 6.0.1 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/anchors.component.d.ts +3 -0
  2. package/category.component.d.ts +3 -0
  3. package/ctrl-ngx-emoji-mart.d.ts +1 -0
  4. package/emoji-frequently.service.d.ts +3 -0
  5. package/emoji-search.service.d.ts +3 -0
  6. package/esm2020/anchors.component.mjs +83 -0
  7. package/esm2020/category.component.mjs +386 -0
  8. package/{esm2015/ctrl-ngx-emoji-mart.js → esm2020/ctrl-ngx-emoji-mart.mjs} +0 -0
  9. package/{esm2015/emoji-frequently.service.js → esm2020/emoji-frequently.service.mjs} +10 -8
  10. package/esm2020/emoji-search.service.mjs +177 -0
  11. package/{esm2015/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.js → esm2020/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.mjs} +0 -0
  12. package/{esm2015/ngx-emoji/data/categories.js → esm2020/ngx-emoji/data/categories.mjs} +0 -0
  13. package/{esm2015/ngx-emoji/data/data.interfaces.js → esm2020/ngx-emoji/data/data.interfaces.mjs} +0 -0
  14. package/{esm2015/ngx-emoji/data/emojis.js → esm2020/ngx-emoji/data/emojis.mjs} +0 -0
  15. package/{esm2015/ngx-emoji/data/skins.js → esm2020/ngx-emoji/data/skins.mjs} +0 -0
  16. package/esm2020/ngx-emoji/emoji.component.mjs +236 -0
  17. package/esm2020/ngx-emoji/emoji.module.mjs +18 -0
  18. package/esm2020/ngx-emoji/emoji.service.mjs +144 -0
  19. package/{esm2015/ngx-emoji/index.js → esm2020/ngx-emoji/index.mjs} +0 -0
  20. package/esm2020/picker.component.mjs +505 -0
  21. package/esm2020/picker.module.mjs +49 -0
  22. package/esm2020/preview.component.mjs +181 -0
  23. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  24. package/esm2020/search.component.mjs +165 -0
  25. package/esm2020/skins.component.mjs +108 -0
  26. package/{esm2015/svgs/index.js → esm2020/svgs/index.mjs} +0 -0
  27. package/{esm2015/utils/index.js → esm2020/utils/index.mjs} +0 -0
  28. package/fesm2015/{ctrl-ngx-emoji-mart-ngx-emoji.js → ctrl-ngx-emoji-mart-ngx-emoji.mjs} +101 -44
  29. package/fesm2015/ctrl-ngx-emoji-mart-ngx-emoji.mjs.map +1 -0
  30. package/fesm2015/{ctrl-ngx-emoji-mart.js → ctrl-ngx-emoji-mart.mjs} +623 -284
  31. package/fesm2015/ctrl-ngx-emoji-mart.mjs.map +1 -0
  32. package/fesm2020/ctrl-ngx-emoji-mart-ngx-emoji.mjs +31829 -0
  33. package/fesm2020/ctrl-ngx-emoji-mart-ngx-emoji.mjs.map +1 -0
  34. package/fesm2020/ctrl-ngx-emoji-mart.mjs +1751 -0
  35. package/fesm2020/ctrl-ngx-emoji-mart.mjs.map +1 -0
  36. package/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.d.ts +1 -0
  37. package/ngx-emoji/emoji.component.d.ts +3 -0
  38. package/ngx-emoji/emoji.module.d.ts +6 -0
  39. package/ngx-emoji/emoji.service.d.ts +3 -0
  40. package/ngx-emoji/package.json +6 -7
  41. package/package.json +29 -10
  42. package/picker.component.d.ts +3 -0
  43. package/picker.module.d.ts +13 -0
  44. package/preview.component.d.ts +4 -1
  45. package/search.component.d.ts +3 -0
  46. package/skins.component.d.ts +6 -3
  47. package/bundles/ctrl-ngx-emoji-mart-ngx-emoji.umd.js +0 -32104
  48. package/bundles/ctrl-ngx-emoji-mart-ngx-emoji.umd.js.map +0 -1
  49. package/bundles/ctrl-ngx-emoji-mart.umd.js +0 -1729
  50. package/bundles/ctrl-ngx-emoji-mart.umd.js.map +0 -1
  51. package/ctrl-ngx-emoji-mart.metadata.json +0 -1
  52. package/esm2015/anchors.component.js +0 -54
  53. package/esm2015/category.component.js +0 -275
  54. package/esm2015/emoji-search.service.js +0 -179
  55. package/esm2015/ngx-emoji/emoji.component.js +0 -174
  56. package/esm2015/ngx-emoji/emoji.module.js +0 -13
  57. package/esm2015/ngx-emoji/emoji.service.js +0 -143
  58. package/esm2015/picker.component.js +0 -459
  59. package/esm2015/picker.module.js +0 -34
  60. package/esm2015/preview.component.js +0 -113
  61. package/esm2015/search.component.js +0 -115
  62. package/esm2015/skins.component.js +0 -76
  63. package/fesm2015/ctrl-ngx-emoji-mart-ngx-emoji.js.map +0 -1
  64. package/fesm2015/ctrl-ngx-emoji-mart.js.map +0 -1
  65. package/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.metadata.json +0 -1
@@ -1,9 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, Injectable, Inject, PLATFORM_ID, ChangeDetectorRef, ViewChild, NgZone, Renderer2, ViewChildren, NgModule } from '@angular/core';
3
- import * as i1 from '@ctrl/ngx-emoji-mart/ngx-emoji';
4
- import { EmojiService, categories as categories$1, EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';
5
- import { Subject } from 'rxjs';
2
+ import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, PLATFORM_ID, Injectable, Inject, ViewChild, ViewChildren, NgModule } from '@angular/core';
3
+ import * as i3 from '@angular/common';
6
4
  import { isPlatformBrowser, CommonModule } from '@angular/common';
5
+ import { Subject } from 'rxjs';
6
+ import * as i1 from '@ctrl/ngx-emoji-mart/ngx-emoji';
7
+ import { categories as categories$1, EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji';
8
+ import * as i2 from '@angular/forms';
7
9
  import { FormsModule } from '@angular/forms';
8
10
 
9
11
  class AnchorsComponent {
@@ -22,10 +24,33 @@ class AnchorsComponent {
22
24
  });
23
25
  }
24
26
  }
25
- AnchorsComponent.decorators = [
26
- { type: Component, args: [{
27
- selector: 'emoji-mart-anchors',
28
- template: `
27
+ AnchorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AnchorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
+ AnchorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: AnchorsComponent, selector: "emoji-mart-anchors", inputs: { categories: "categories", color: "color", selected: "selected", i18n: "i18n", icons: "icons" }, outputs: { anchorClick: "anchorClick" }, ngImport: i0, template: `
29
+ <div class="emoji-mart-anchors">
30
+ <ng-template ngFor let-category [ngForOf]="categories" let-idx="index" [ngForTrackBy]="trackByFn">
31
+ <span
32
+ *ngIf="category.anchor !== false"
33
+ [attr.title]="i18n.categories[category.id]"
34
+ (click)="this.handleClick($event, idx)"
35
+ class="emoji-mart-anchor"
36
+ [class.emoji-mart-anchor-selected]="category.name === selected"
37
+ [style.color]="category.name === selected ? color : null"
38
+ >
39
+ <div>
40
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
41
+ <path [attr.d]="icons[category.id]" />
42
+ </svg>
43
+ </div>
44
+ <span class="emoji-mart-anchor-bar" [style.background-color]="color"></span>
45
+ </span>
46
+ </ng-template>
47
+ </div>
48
+ `, isInline: true, directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AnchorsComponent, decorators: [{
50
+ type: Component,
51
+ args: [{
52
+ selector: 'emoji-mart-anchors',
53
+ template: `
29
54
  <div class="emoji-mart-anchors">
30
55
  <ng-template ngFor let-category [ngForOf]="categories" let-idx="index" [ngForTrackBy]="trackByFn">
31
56
  <span
@@ -46,18 +71,22 @@ AnchorsComponent.decorators = [
46
71
  </ng-template>
47
72
  </div>
48
73
  `,
49
- changeDetection: ChangeDetectionStrategy.OnPush,
50
- preserveWhitespaces: false
51
- },] }
52
- ];
53
- AnchorsComponent.propDecorators = {
54
- categories: [{ type: Input }],
55
- color: [{ type: Input }],
56
- selected: [{ type: Input }],
57
- i18n: [{ type: Input }],
58
- icons: [{ type: Input }],
59
- anchorClick: [{ type: Output }]
60
- };
74
+ changeDetection: ChangeDetectionStrategy.OnPush,
75
+ preserveWhitespaces: false,
76
+ }]
77
+ }], propDecorators: { categories: [{
78
+ type: Input
79
+ }], color: [{
80
+ type: Input
81
+ }], selected: [{
82
+ type: Input
83
+ }], i18n: [{
84
+ type: Input
85
+ }], icons: [{
86
+ type: Input
87
+ }], anchorClick: [{
88
+ type: Output
89
+ }] } });
61
90
 
62
91
  class EmojiFrequentlyService {
63
92
  constructor(platformId) {
@@ -134,13 +163,17 @@ class EmojiFrequentlyService {
134
163
  return sliced;
135
164
  }
136
165
  }
137
- EmojiFrequentlyService.ɵprov = i0.ɵɵdefineInjectable({ factory: function EmojiFrequentlyService_Factory() { return new EmojiFrequentlyService(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: EmojiFrequentlyService, providedIn: "root" });
138
- EmojiFrequentlyService.decorators = [
139
- { type: Injectable, args: [{ providedIn: 'root' },] }
140
- ];
141
- EmojiFrequentlyService.ctorParameters = () => [
142
- { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
143
- ];
166
+ EmojiFrequentlyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EmojiFrequentlyService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
167
+ EmojiFrequentlyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EmojiFrequentlyService, providedIn: 'root' });
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EmojiFrequentlyService, decorators: [{
169
+ type: Injectable,
170
+ args: [{ providedIn: 'root' }]
171
+ }], ctorParameters: function () {
172
+ return [{ type: undefined, decorators: [{
173
+ type: Inject,
174
+ args: [PLATFORM_ID]
175
+ }] }];
176
+ } });
144
177
 
145
178
  class CategoryComponent {
146
179
  constructor(ref, emojiService, frequently) {
@@ -287,10 +320,95 @@ class CategoryComponent {
287
320
  return newEmojis;
288
321
  }
289
322
  }
290
- CategoryComponent.decorators = [
291
- { type: Component, args: [{
292
- selector: 'emoji-category',
293
- template: `
323
+ CategoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: CategoryComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.EmojiService }, { token: EmojiFrequentlyService }], target: i0.ɵɵFactoryTarget.Component });
324
+ CategoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: CategoryComponent, selector: "emoji-category", inputs: { emojis: "emojis", hasStickyPosition: "hasStickyPosition", name: "name", perLine: "perLine", totalFrequentLines: "totalFrequentLines", recent: "recent", custom: "custom", i18n: "i18n", id: "id", hideObsolete: "hideObsolete", notFoundEmoji: "notFoundEmoji", virtualize: "virtualize", virtualizeOffset: "virtualizeOffset", emojiIsNative: "emojiIsNative", emojiSkin: "emojiSkin", emojiSize: "emojiSize", emojiSet: "emojiSet", emojiSheetSize: "emojiSheetSize", emojiForceSize: "emojiForceSize", emojiTooltip: "emojiTooltip", emojiBackgroundImageFn: "emojiBackgroundImageFn", emojiImageUrlFn: "emojiImageUrlFn", emojiUseButton: "emojiUseButton" }, outputs: { emojiOver: "emojiOver", emojiLeave: "emojiLeave", emojiClick: "emojiClick" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }, { propertyName: "label", first: true, predicate: ["label"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
325
+ <section
326
+ #container
327
+ class="emoji-mart-category"
328
+ [attr.aria-label]="i18n.categories[id]"
329
+ [class.emoji-mart-no-results]="noEmojiToDisplay"
330
+ [ngStyle]="containerStyles"
331
+ >
332
+ <div class="emoji-mart-category-label" [ngStyle]="labelStyles" [attr.data-name]="name">
333
+ <!-- already labeled by the section aria-label -->
334
+ <span #label [ngStyle]="labelSpanStyles" aria-hidden="true">
335
+ {{ i18n.categories[id] }}
336
+ </span>
337
+ </div>
338
+
339
+ <div
340
+ *ngIf="virtualize; else normalRenderTemplate"
341
+ >
342
+ <div *ngIf="filteredEmojis$ | async as filteredEmojis">
343
+ <ngx-emoji
344
+ *ngFor="let emoji of filteredEmojis; trackBy: trackById"
345
+ [emoji]="emoji"
346
+ [size]="emojiSize"
347
+ [skin]="emojiSkin"
348
+ [isNative]="emojiIsNative"
349
+ [set]="emojiSet"
350
+ [sheetSize]="emojiSheetSize"
351
+ [forceSize]="emojiForceSize"
352
+ [tooltip]="emojiTooltip"
353
+ [backgroundImageFn]="emojiBackgroundImageFn"
354
+ [imageUrlFn]="emojiImageUrlFn"
355
+ [hideObsolete]="hideObsolete"
356
+ [useButton]="emojiUseButton"
357
+ (emojiOver)="emojiOver.emit($event)"
358
+ (emojiLeave)="emojiLeave.emit($event)"
359
+ (emojiClick)="emojiClick.emit($event)"
360
+ ></ngx-emoji>
361
+ </div>
362
+ </div>
363
+
364
+ <div *ngIf="noEmojiToDisplay">
365
+ <div>
366
+ <ngx-emoji
367
+ [emoji]="notFoundEmoji"
368
+ [size]="38"
369
+ [skin]="emojiSkin"
370
+ [isNative]="emojiIsNative"
371
+ [set]="emojiSet"
372
+ [sheetSize]="emojiSheetSize"
373
+ [forceSize]="emojiForceSize"
374
+ [tooltip]="emojiTooltip"
375
+ [backgroundImageFn]="emojiBackgroundImageFn"
376
+ [useButton]="emojiUseButton"
377
+ ></ngx-emoji>
378
+ </div>
379
+
380
+ <div class="emoji-mart-no-results-label">
381
+ {{ i18n.notfound }}
382
+ </div>
383
+ </div>
384
+ </section>
385
+
386
+ <ng-template #normalRenderTemplate>
387
+ <ngx-emoji
388
+ *ngFor="let emoji of emojisToDisplay; trackBy: trackById"
389
+ [emoji]="emoji"
390
+ [size]="emojiSize"
391
+ [skin]="emojiSkin"
392
+ [isNative]="emojiIsNative"
393
+ [set]="emojiSet"
394
+ [sheetSize]="emojiSheetSize"
395
+ [forceSize]="emojiForceSize"
396
+ [tooltip]="emojiTooltip"
397
+ [backgroundImageFn]="emojiBackgroundImageFn"
398
+ [imageUrlFn]="emojiImageUrlFn"
399
+ [hideObsolete]="hideObsolete"
400
+ [useButton]="emojiUseButton"
401
+ (emojiOver)="emojiOver.emit($event)"
402
+ (emojiLeave)="emojiLeave.emit($event)"
403
+ (emojiClick)="emojiClick.emit($event)"
404
+ ></ngx-emoji>
405
+ </ng-template>
406
+ `, isInline: true, components: [{ type: i1.EmojiComponent, selector: "ngx-emoji", inputs: ["skin", "set", "sheetSize", "isNative", "forceSize", "tooltip", "size", "emoji", "fallback", "hideObsolete", "sheetRows", "sheetColumns", "useButton", "backgroundImageFn", "imageUrlFn"], outputs: ["emojiOver", "emojiLeave", "emojiClick"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: CategoryComponent, decorators: [{
408
+ type: Component,
409
+ args: [{
410
+ selector: 'emoji-category',
411
+ template: `
294
412
  <section
295
413
  #container
296
414
  class="emoji-mart-category"
@@ -334,7 +452,7 @@ CategoryComponent.decorators = [
334
452
  <div>
335
453
  <ngx-emoji
336
454
  [emoji]="notFoundEmoji"
337
- size="38"
455
+ [size]="38"
338
456
  [skin]="emojiSkin"
339
457
  [isNative]="emojiIsNative"
340
458
  [set]="emojiSet"
@@ -373,45 +491,68 @@ CategoryComponent.decorators = [
373
491
  ></ngx-emoji>
374
492
  </ng-template>
375
493
  `,
376
- changeDetection: ChangeDetectionStrategy.OnPush,
377
- preserveWhitespaces: false
378
- },] }
379
- ];
380
- CategoryComponent.ctorParameters = () => [
381
- { type: ChangeDetectorRef },
382
- { type: EmojiService },
383
- { type: EmojiFrequentlyService }
384
- ];
385
- CategoryComponent.propDecorators = {
386
- emojis: [{ type: Input }],
387
- hasStickyPosition: [{ type: Input }],
388
- name: [{ type: Input }],
389
- perLine: [{ type: Input }],
390
- totalFrequentLines: [{ type: Input }],
391
- recent: [{ type: Input }],
392
- custom: [{ type: Input }],
393
- i18n: [{ type: Input }],
394
- id: [{ type: Input }],
395
- hideObsolete: [{ type: Input }],
396
- notFoundEmoji: [{ type: Input }],
397
- virtualize: [{ type: Input }],
398
- virtualizeOffset: [{ type: Input }],
399
- emojiIsNative: [{ type: Input }],
400
- emojiSkin: [{ type: Input }],
401
- emojiSize: [{ type: Input }],
402
- emojiSet: [{ type: Input }],
403
- emojiSheetSize: [{ type: Input }],
404
- emojiForceSize: [{ type: Input }],
405
- emojiTooltip: [{ type: Input }],
406
- emojiBackgroundImageFn: [{ type: Input }],
407
- emojiImageUrlFn: [{ type: Input }],
408
- emojiUseButton: [{ type: Input }],
409
- emojiOver: [{ type: Output }],
410
- emojiLeave: [{ type: Output }],
411
- emojiClick: [{ type: Output }],
412
- container: [{ type: ViewChild, args: ['container', { static: true },] }],
413
- label: [{ type: ViewChild, args: ['label', { static: true },] }]
414
- };
494
+ changeDetection: ChangeDetectionStrategy.OnPush,
495
+ preserveWhitespaces: false,
496
+ }]
497
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.EmojiService }, { type: EmojiFrequentlyService }]; }, propDecorators: { emojis: [{
498
+ type: Input
499
+ }], hasStickyPosition: [{
500
+ type: Input
501
+ }], name: [{
502
+ type: Input
503
+ }], perLine: [{
504
+ type: Input
505
+ }], totalFrequentLines: [{
506
+ type: Input
507
+ }], recent: [{
508
+ type: Input
509
+ }], custom: [{
510
+ type: Input
511
+ }], i18n: [{
512
+ type: Input
513
+ }], id: [{
514
+ type: Input
515
+ }], hideObsolete: [{
516
+ type: Input
517
+ }], notFoundEmoji: [{
518
+ type: Input
519
+ }], virtualize: [{
520
+ type: Input
521
+ }], virtualizeOffset: [{
522
+ type: Input
523
+ }], emojiIsNative: [{
524
+ type: Input
525
+ }], emojiSkin: [{
526
+ type: Input
527
+ }], emojiSize: [{
528
+ type: Input
529
+ }], emojiSet: [{
530
+ type: Input
531
+ }], emojiSheetSize: [{
532
+ type: Input
533
+ }], emojiForceSize: [{
534
+ type: Input
535
+ }], emojiTooltip: [{
536
+ type: Input
537
+ }], emojiBackgroundImageFn: [{
538
+ type: Input
539
+ }], emojiImageUrlFn: [{
540
+ type: Input
541
+ }], emojiUseButton: [{
542
+ type: Input
543
+ }], emojiOver: [{
544
+ type: Output
545
+ }], emojiLeave: [{
546
+ type: Output
547
+ }], emojiClick: [{
548
+ type: Output
549
+ }], container: [{
550
+ type: ViewChild,
551
+ args: ['container', { static: true }]
552
+ }], label: [{
553
+ type: ViewChild,
554
+ args: ['label', { static: true }]
555
+ }] } });
415
556
 
416
557
  function uniq(arr) {
417
558
  return arr.reduce((acc, item) => {
@@ -609,13 +750,117 @@ class EmojiSearch {
609
750
  return search.join(',');
610
751
  }
611
752
  }
612
- EmojiSearch.ɵprov = i0.ɵɵdefineInjectable({ factory: function EmojiSearch_Factory() { return new EmojiSearch(i0.ɵɵinject(i1.EmojiService)); }, token: EmojiSearch, providedIn: "root" });
613
- EmojiSearch.decorators = [
614
- { type: Injectable, args: [{ providedIn: 'root' },] }
615
- ];
616
- EmojiSearch.ctorParameters = () => [
617
- { type: EmojiService }
618
- ];
753
+ EmojiSearch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EmojiSearch, deps: [{ token: i1.EmojiService }], target: i0.ɵɵFactoryTarget.Injectable });
754
+ EmojiSearch.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EmojiSearch, providedIn: 'root' });
755
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EmojiSearch, decorators: [{
756
+ type: Injectable,
757
+ args: [{ providedIn: 'root' }]
758
+ }], ctorParameters: function () { return [{ type: i1.EmojiService }]; } });
759
+
760
+ class SkinComponent {
761
+ constructor() {
762
+ this.changeSkin = new EventEmitter();
763
+ this.opened = false;
764
+ this.skinTones = [1, 2, 3, 4, 5, 6];
765
+ }
766
+ toggleOpen() {
767
+ this.opened = !this.opened;
768
+ }
769
+ isSelected(skinTone) {
770
+ return skinTone === this.skin;
771
+ }
772
+ isVisible(skinTone) {
773
+ return this.opened || this.isSelected(skinTone);
774
+ }
775
+ pressed(skinTone) {
776
+ return this.opened ? !!this.isSelected(skinTone) : '';
777
+ }
778
+ tabIndex(skinTone) {
779
+ return this.isVisible(skinTone) ? '0' : '';
780
+ }
781
+ expanded(skinTone) {
782
+ return this.isSelected(skinTone) ? this.opened : '';
783
+ }
784
+ handleClick(skin) {
785
+ if (!this.opened) {
786
+ this.opened = true;
787
+ return;
788
+ }
789
+ this.opened = false;
790
+ if (skin !== this.skin) {
791
+ this.changeSkin.emit(skin);
792
+ }
793
+ }
794
+ }
795
+ SkinComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SkinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
796
+ SkinComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: SkinComponent, selector: "emoji-skins", inputs: { skin: "skin", i18n: "i18n" }, outputs: { changeSkin: "changeSkin" }, ngImport: i0, template: `
797
+ <section
798
+ class="emoji-mart-skin-swatches"
799
+ [class.opened]="opened"
800
+ >
801
+ <span
802
+ *ngFor="let skinTone of skinTones"
803
+ class="emoji-mart-skin-swatch"
804
+ [class.selected]="skinTone === skin"
805
+ >
806
+ <span
807
+ (click)="handleClick(skinTone)"
808
+ (keyup.enter)="handleClick(skinTone)"
809
+ (keyup.space)="handleClick(skinTone)"
810
+ class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
811
+ role="button"
812
+ [tabIndex]="tabIndex(skinTone)"
813
+ [attr.aria-hidden]="!isVisible(skinTone)"
814
+ [attr.aria-pressed]="pressed(skinTone)"
815
+ [attr.aria-haspopup]="!!isSelected(skinTone)"
816
+ [attr.aria-expanded]="expanded(skinTone)"
817
+ [attr.aria-label]="i18n.skintones[skinTone]"
818
+ [title]="i18n.skintones[skinTone]"
819
+ ></span>
820
+ </span>
821
+ </section>
822
+ `, isInline: true, directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SkinComponent, decorators: [{
824
+ type: Component,
825
+ args: [{
826
+ selector: 'emoji-skins',
827
+ template: `
828
+ <section
829
+ class="emoji-mart-skin-swatches"
830
+ [class.opened]="opened"
831
+ >
832
+ <span
833
+ *ngFor="let skinTone of skinTones"
834
+ class="emoji-mart-skin-swatch"
835
+ [class.selected]="skinTone === skin"
836
+ >
837
+ <span
838
+ (click)="handleClick(skinTone)"
839
+ (keyup.enter)="handleClick(skinTone)"
840
+ (keyup.space)="handleClick(skinTone)"
841
+ class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
842
+ role="button"
843
+ [tabIndex]="tabIndex(skinTone)"
844
+ [attr.aria-hidden]="!isVisible(skinTone)"
845
+ [attr.aria-pressed]="pressed(skinTone)"
846
+ [attr.aria-haspopup]="!!isSelected(skinTone)"
847
+ [attr.aria-expanded]="expanded(skinTone)"
848
+ [attr.aria-label]="i18n.skintones[skinTone]"
849
+ [title]="i18n.skintones[skinTone]"
850
+ ></span>
851
+ </span>
852
+ </section>
853
+ `,
854
+ changeDetection: ChangeDetectionStrategy.OnPush,
855
+ preserveWhitespaces: false,
856
+ }]
857
+ }], propDecorators: { skin: [{
858
+ type: Input
859
+ }], i18n: [{
860
+ type: Input
861
+ }], changeSkin: [{
862
+ type: Output
863
+ }] } });
619
864
 
620
865
  class PreviewComponent {
621
866
  constructor(ref, emojiService) {
@@ -644,10 +889,70 @@ class PreviewComponent {
644
889
  (_a = this.ref) === null || _a === void 0 ? void 0 : _a.detectChanges();
645
890
  }
646
891
  }
647
- PreviewComponent.decorators = [
648
- { type: Component, args: [{
649
- selector: 'emoji-preview',
650
- template: `
892
+ PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PreviewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.EmojiService }], target: i0.ɵɵFactoryTarget.Component });
893
+ PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: PreviewComponent, selector: "emoji-preview", inputs: { title: "title", emoji: "emoji", idleEmoji: "idleEmoji", i18n: "i18n", emojiIsNative: "emojiIsNative", emojiSkin: "emojiSkin", emojiSize: "emojiSize", emojiSet: "emojiSet", emojiSheetSize: "emojiSheetSize", emojiBackgroundImageFn: "emojiBackgroundImageFn", emojiImageUrlFn: "emojiImageUrlFn" }, outputs: { skinChange: "skinChange" }, usesOnChanges: true, ngImport: i0, template: `
894
+ <div class="emoji-mart-preview" *ngIf="emoji && emojiData">
895
+ <div class="emoji-mart-preview-emoji">
896
+ <ngx-emoji
897
+ [emoji]="emoji"
898
+ [size]="38"
899
+ [isNative]="emojiIsNative"
900
+ [skin]="emojiSkin"
901
+ [size]="emojiSize"
902
+ [set]="emojiSet"
903
+ [sheetSize]="emojiSheetSize"
904
+ [backgroundImageFn]="emojiBackgroundImageFn"
905
+ [imageUrlFn]="emojiImageUrlFn"
906
+ ></ngx-emoji>
907
+ </div>
908
+
909
+ <div class="emoji-mart-preview-data">
910
+ <div class="emoji-mart-preview-name">{{ emojiData.name }}</div>
911
+ <div class="emoji-mart-preview-shortname">
912
+ <span
913
+ class="emoji-mart-preview-shortname"
914
+ *ngFor="let short_name of emojiData.shortNames"
915
+ >
916
+ :{{ short_name }}:
917
+ </span>
918
+ </div>
919
+ <div class="emoji-mart-preview-emoticons">
920
+ <span class="emoji-mart-preview-emoticon" *ngFor="let emoticon of listedEmoticons">
921
+ {{ emoticon }}
922
+ </span>
923
+ </div>
924
+ </div>
925
+ </div>
926
+
927
+ <div class="emoji-mart-preview" *ngIf="!emoji">
928
+ <div class="emoji-mart-preview-emoji">
929
+ <ngx-emoji
930
+ *ngIf="idleEmoji && idleEmoji.length"
931
+ [isNative]="emojiIsNative"
932
+ [skin]="emojiSkin"
933
+ [set]="emojiSet"
934
+ [emoji]="idleEmoji"
935
+ [backgroundImageFn]="emojiBackgroundImageFn"
936
+ [size]="38"
937
+ [imageUrlFn]="emojiImageUrlFn"
938
+ ></ngx-emoji>
939
+ </div>
940
+
941
+ <div class="emoji-mart-preview-data">
942
+ <span class="emoji-mart-title-label">{{ title }}</span>
943
+ </div>
944
+
945
+ <div class="emoji-mart-preview-skins">
946
+ <emoji-skins [skin]="emojiSkin" (changeSkin)="skinChange.emit($event)" [i18n]="i18n">
947
+ </emoji-skins>
948
+ </div>
949
+ </div>
950
+ `, isInline: true, components: [{ type: i1.EmojiComponent, selector: "ngx-emoji", inputs: ["skin", "set", "sheetSize", "isNative", "forceSize", "tooltip", "size", "emoji", "fallback", "hideObsolete", "sheetRows", "sheetColumns", "useButton", "backgroundImageFn", "imageUrlFn"], outputs: ["emojiOver", "emojiLeave", "emojiClick"] }, { type: SkinComponent, selector: "emoji-skins", inputs: ["skin", "i18n"], outputs: ["changeSkin"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PreviewComponent, decorators: [{
952
+ type: Component,
953
+ args: [{
954
+ selector: 'emoji-preview',
955
+ template: `
651
956
  <div class="emoji-mart-preview" *ngIf="emoji && emojiData">
652
957
  <div class="emoji-mart-preview-emoji">
653
958
  <ngx-emoji
@@ -705,28 +1010,34 @@ PreviewComponent.decorators = [
705
1010
  </div>
706
1011
  </div>
707
1012
  `,
708
- changeDetection: ChangeDetectionStrategy.OnPush,
709
- preserveWhitespaces: false
710
- },] }
711
- ];
712
- PreviewComponent.ctorParameters = () => [
713
- { type: ChangeDetectorRef },
714
- { type: EmojiService }
715
- ];
716
- PreviewComponent.propDecorators = {
717
- title: [{ type: Input }],
718
- emoji: [{ type: Input }],
719
- idleEmoji: [{ type: Input }],
720
- i18n: [{ type: Input }],
721
- emojiIsNative: [{ type: Input }],
722
- emojiSkin: [{ type: Input }],
723
- emojiSize: [{ type: Input }],
724
- emojiSet: [{ type: Input }],
725
- emojiSheetSize: [{ type: Input }],
726
- emojiBackgroundImageFn: [{ type: Input }],
727
- emojiImageUrlFn: [{ type: Input }],
728
- skinChange: [{ type: Output }]
729
- };
1013
+ changeDetection: ChangeDetectionStrategy.OnPush,
1014
+ preserveWhitespaces: false,
1015
+ }]
1016
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.EmojiService }]; }, propDecorators: { title: [{
1017
+ type: Input
1018
+ }], emoji: [{
1019
+ type: Input
1020
+ }], idleEmoji: [{
1021
+ type: Input
1022
+ }], i18n: [{
1023
+ type: Input
1024
+ }], emojiIsNative: [{
1025
+ type: Input
1026
+ }], emojiSkin: [{
1027
+ type: Input
1028
+ }], emojiSize: [{
1029
+ type: Input
1030
+ }], emojiSet: [{
1031
+ type: Input
1032
+ }], emojiSheetSize: [{
1033
+ type: Input
1034
+ }], emojiBackgroundImageFn: [{
1035
+ type: Input
1036
+ }], emojiImageUrlFn: [{
1037
+ type: Input
1038
+ }], skinChange: [{
1039
+ type: Output
1040
+ }] } });
730
1041
 
731
1042
  let id = 0;
732
1043
  class SearchComponent {
@@ -779,10 +1090,51 @@ class SearchComponent {
779
1090
  this.handleSearch(this.query);
780
1091
  }
781
1092
  }
782
- SearchComponent.decorators = [
783
- { type: Component, args: [{
784
- selector: 'emoji-search',
785
- template: `
1093
+ SearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SearchComponent, deps: [{ token: EmojiSearch }], target: i0.ɵɵFactoryTarget.Component });
1094
+ SearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: SearchComponent, selector: "emoji-search", inputs: { maxResults: "maxResults", autoFocus: "autoFocus", i18n: "i18n", include: "include", exclude: "exclude", custom: "custom", icons: "icons", emojisToShowFilter: "emojisToShowFilter" }, outputs: { searchResults: "searchResults", enterKey: "enterKey" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, static: true }], ngImport: i0, template: `
1095
+ <div class="emoji-mart-search">
1096
+ <input
1097
+ [id]="inputId"
1098
+ #inputRef
1099
+ type="search"
1100
+ (keyup.enter)="handleEnterKey($event)"
1101
+ [placeholder]="i18n.search"
1102
+ [autofocus]="autoFocus"
1103
+ [(ngModel)]="query"
1104
+ (ngModelChange)="handleChange()"
1105
+ />
1106
+ <!--
1107
+ Use a <label> in addition to the placeholder for accessibility, but place it off-screen
1108
+ http://www.maxability.co.in/2016/01/placeholder-attribute-and-why-it-is-not-accessible/
1109
+ -->
1110
+ <label class="emoji-mart-sr-only" [htmlFor]="inputId">
1111
+ {{ i18n.search }}
1112
+ </label>
1113
+ <button
1114
+ type="button"
1115
+ class="emoji-mart-search-icon"
1116
+ (click)="clear()"
1117
+ (keyup.enter)="clear()"
1118
+ [disabled]="!isSearching"
1119
+ [attr.aria-label]="i18n.clear"
1120
+ >
1121
+ <svg
1122
+ xmlns="http://www.w3.org/2000/svg"
1123
+ viewBox="0 0 20 20"
1124
+ width="13"
1125
+ height="13"
1126
+ opacity="0.5"
1127
+ >
1128
+ <path [attr.d]="icon" />
1129
+ </svg>
1130
+ </button>
1131
+ </div>
1132
+ `, isInline: true, directives: [{ type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SearchComponent, decorators: [{
1134
+ type: Component,
1135
+ args: [{
1136
+ selector: 'emoji-search',
1137
+ template: `
786
1138
  <div class="emoji-mart-search">
787
1139
  <input
788
1140
  [id]="inputId"
@@ -821,25 +1173,32 @@ SearchComponent.decorators = [
821
1173
  </button>
822
1174
  </div>
823
1175
  `,
824
- preserveWhitespaces: false
825
- },] }
826
- ];
827
- SearchComponent.ctorParameters = () => [
828
- { type: EmojiSearch }
829
- ];
830
- SearchComponent.propDecorators = {
831
- maxResults: [{ type: Input }],
832
- autoFocus: [{ type: Input }],
833
- i18n: [{ type: Input }],
834
- include: [{ type: Input }],
835
- exclude: [{ type: Input }],
836
- custom: [{ type: Input }],
837
- icons: [{ type: Input }],
838
- emojisToShowFilter: [{ type: Input }],
839
- searchResults: [{ type: Output }],
840
- enterKey: [{ type: Output }],
841
- inputRef: [{ type: ViewChild, args: ['inputRef', { static: true },] }]
842
- };
1176
+ preserveWhitespaces: false,
1177
+ }]
1178
+ }], ctorParameters: function () { return [{ type: EmojiSearch }]; }, propDecorators: { maxResults: [{
1179
+ type: Input
1180
+ }], autoFocus: [{
1181
+ type: Input
1182
+ }], i18n: [{
1183
+ type: Input
1184
+ }], include: [{
1185
+ type: Input
1186
+ }], exclude: [{
1187
+ type: Input
1188
+ }], custom: [{
1189
+ type: Input
1190
+ }], icons: [{
1191
+ type: Input
1192
+ }], emojisToShowFilter: [{
1193
+ type: Input
1194
+ }], searchResults: [{
1195
+ type: Output
1196
+ }], enterKey: [{
1197
+ type: Output
1198
+ }], inputRef: [{
1199
+ type: ViewChild,
1200
+ args: ['inputRef', { static: true }]
1201
+ }] } });
843
1202
 
844
1203
  /* eslint-disable max-len */
845
1204
  const categories = {
@@ -1248,169 +1607,149 @@ class PickerComponent {
1248
1607
  }
1249
1608
  }
1250
1609
  }
1251
- PickerComponent.decorators = [
1252
- { type: Component, args: [{
1253
- selector: 'emoji-mart',
1254
- template: "<section\n class=\"emoji-mart {{ darkMode ? 'emoji-mart-dark' : '' }}\"\n [style.width]=\"getWidth()\"\n [ngStyle]=\"style\"\n>\n <div class=\"emoji-mart-bar\">\n <emoji-mart-anchors\n [categories]=\"categories\"\n (anchorClick)=\"handleAnchorClick($event)\"\n [color]=\"color\"\n [selected]=\"selected\"\n [i18n]=\"i18n\"\n [icons]=\"categoriesIcons\"\n ></emoji-mart-anchors>\n </div>\n <emoji-search\n *ngIf=\"enableSearch\"\n [i18n]=\"i18n\"\n (searchResults)=\"handleSearch($event)\"\n (enterKey)=\"handleEnterKey($event)\"\n [include]=\"include\"\n [exclude]=\"exclude\"\n [custom]=\"custom\"\n [autoFocus]=\"autoFocus\"\n [icons]=\"searchIcons\"\n [emojisToShowFilter]=\"emojisToShowFilter\"\n ></emoji-search>\n <section #scrollRef class=\"emoji-mart-scroll\" [attr.aria-label]=\"i18n.emojilist\">\n <emoji-category\n *ngFor=\"let category of activeCategories; let idx = index; trackBy: categoryTrack\"\n [id]=\"category.id\"\n [name]=\"category.name\"\n [emojis]=\"category.emojis\"\n [perLine]=\"perLine\"\n [totalFrequentLines]=\"totalFrequentLines\"\n [hasStickyPosition]=\"isNative\"\n [i18n]=\"i18n\"\n [hideObsolete]=\"hideObsolete\"\n [notFoundEmoji]=\"notFoundEmoji\"\n [custom]=\"category.id === RECENT_CATEGORY.id ? CUSTOM_CATEGORY.emojis : undefined\"\n [recent]=\"category.id === RECENT_CATEGORY.id ? recent : undefined\"\n [virtualize]=\"virtualize\"\n [virtualizeOffset]=\"virtualizeOffset\"\n [emojiIsNative]=\"isNative\"\n [emojiSkin]=\"skin\"\n [emojiSize]=\"emojiSize\"\n [emojiSet]=\"set\"\n [emojiSheetSize]=\"sheetSize\"\n [emojiForceSize]=\"isNative\"\n [emojiTooltip]=\"emojiTooltip\"\n [emojiBackgroundImageFn]=\"backgroundImageFn\"\n [emojiImageUrlFn]=\"imageUrlFn\"\n [emojiUseButton]=\"useButton\"\n (emojiOver)=\"handleEmojiOver($event)\"\n (emojiLeave)=\"handleEmojiLeave()\"\n (emojiClick)=\"handleEmojiClick($event)\"\n ></emoji-category>\n </section>\n <div class=\"emoji-mart-bar\" *ngIf=\"showPreview\">\n <emoji-preview\n [title]=\"title\"\n [emoji]=\"previewEmoji\"\n [idleEmoji]=\"emoji\"\n [emojiIsNative]=\"isNative\"\n [emojiSize]=\"38\"\n [emojiSkin]=\"skin\"\n [emojiSet]=\"set\"\n [i18n]=\"i18n\"\n [emojiSheetSize]=\"sheetSize\"\n [emojiBackgroundImageFn]=\"backgroundImageFn\"\n [emojiImageUrlFn]=\"imageUrlFn\"\n (skinChange)=\"handleSkinChange($event)\"\n ></emoji-preview>\n </div>\n</section>\n",
1255
- changeDetection: ChangeDetectionStrategy.OnPush,
1256
- preserveWhitespaces: false
1257
- },] }
1258
- ];
1259
- PickerComponent.ctorParameters = () => [
1260
- { type: NgZone },
1261
- { type: Renderer2 },
1262
- { type: ChangeDetectorRef },
1263
- { type: EmojiFrequentlyService },
1264
- { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
1265
- ];
1266
- PickerComponent.propDecorators = {
1267
- perLine: [{ type: Input }],
1268
- totalFrequentLines: [{ type: Input }],
1269
- i18n: [{ type: Input }],
1270
- style: [{ type: Input }],
1271
- title: [{ type: Input }],
1272
- emoji: [{ type: Input }],
1273
- darkMode: [{ type: Input }],
1274
- color: [{ type: Input }],
1275
- hideObsolete: [{ type: Input }],
1276
- categories: [{ type: Input }],
1277
- activeCategories: [{ type: Input }],
1278
- set: [{ type: Input }],
1279
- skin: [{ type: Input }],
1280
- isNative: [{ type: Input }],
1281
- emojiSize: [{ type: Input }],
1282
- sheetSize: [{ type: Input }],
1283
- emojisToShowFilter: [{ type: Input }],
1284
- showPreview: [{ type: Input }],
1285
- emojiTooltip: [{ type: Input }],
1286
- autoFocus: [{ type: Input }],
1287
- custom: [{ type: Input }],
1288
- hideRecent: [{ type: Input }],
1289
- imageUrlFn: [{ type: Input }],
1290
- include: [{ type: Input }],
1291
- exclude: [{ type: Input }],
1292
- notFoundEmoji: [{ type: Input }],
1293
- categoriesIcons: [{ type: Input }],
1294
- searchIcons: [{ type: Input }],
1295
- useButton: [{ type: Input }],
1296
- enableFrequentEmojiSort: [{ type: Input }],
1297
- enableSearch: [{ type: Input }],
1298
- showSingleCategory: [{ type: Input }],
1299
- virtualize: [{ type: Input }],
1300
- virtualizeOffset: [{ type: Input }],
1301
- recent: [{ type: Input }],
1302
- emojiClick: [{ type: Output }],
1303
- emojiSelect: [{ type: Output }],
1304
- skinChange: [{ type: Output }],
1305
- scrollRef: [{ type: ViewChild, args: ['scrollRef', { static: true },] }],
1306
- previewRef: [{ type: ViewChild, args: [PreviewComponent, { static: false },] }],
1307
- searchRef: [{ type: ViewChild, args: [SearchComponent, { static: false },] }],
1308
- categoryRefs: [{ type: ViewChildren, args: [CategoryComponent,] }],
1309
- backgroundImageFn: [{ type: Input }]
1310
- };
1311
-
1312
- class SkinComponent {
1313
- constructor() {
1314
- this.changeSkin = new EventEmitter();
1315
- this.opened = false;
1316
- this.skinTones = [1, 2, 3, 4, 5, 6];
1317
- }
1318
- toggleOpen() {
1319
- this.opened = !this.opened;
1320
- }
1321
- isSelected(skinTone) {
1322
- return skinTone === this.skin;
1323
- }
1324
- isVisible(skinTone) {
1325
- return this.opened || this.isSelected(skinTone);
1326
- }
1327
- pressed(skinTone) {
1328
- return this.opened ? !!this.isSelected(skinTone) : '';
1329
- }
1330
- tabIndex(skinTone) {
1331
- return this.isVisible(skinTone) ? '0' : '';
1332
- }
1333
- expanded(skinTone) {
1334
- return this.isSelected(skinTone) ? this.opened : '';
1335
- }
1336
- handleClick(skin) {
1337
- if (!this.opened) {
1338
- this.opened = true;
1339
- return;
1340
- }
1341
- this.opened = false;
1342
- if (skin !== this.skin) {
1343
- this.changeSkin.emit(skin);
1344
- }
1345
- }
1346
- }
1347
- SkinComponent.decorators = [
1348
- { type: Component, args: [{
1349
- selector: 'emoji-skins',
1350
- template: `
1351
- <section
1352
- class="emoji-mart-skin-swatches"
1353
- [class.opened]="opened"
1354
- >
1355
- <span
1356
- *ngFor="let skinTone of skinTones"
1357
- class="emoji-mart-skin-swatch"
1358
- [class.selected]="skinTone === skin"
1359
- >
1360
- <span
1361
- (click)="this.handleClick(skinTone)"
1362
- (keyup.enter)="handleClick(skinTone)"
1363
- (keyup.space)="handleClick(skinTone)"
1364
- class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
1365
- role="button"
1366
- [tabIndex]="tabIndex(skinTone)"
1367
- [attr.aria-hidden]="!isVisible(skinTone)"
1368
- [attr.aria-pressed]="pressed(skinTone)"
1369
- [attr.aria-haspopup]="!!isSelected(skinTone)"
1370
- [attr.aria-expanded]="expanded(skinTone)"
1371
- [attr.aria-label]="i18n.skintones[skinTone]"
1372
- [title]="i18n.skintones[skinTone]"
1373
- ></span>
1374
- </span>
1375
- </section>
1376
- `,
1377
- changeDetection: ChangeDetectionStrategy.OnPush,
1378
- preserveWhitespaces: false
1379
- },] }
1380
- ];
1381
- SkinComponent.propDecorators = {
1382
- skin: [{ type: Input }],
1383
- i18n: [{ type: Input }],
1384
- changeSkin: [{ type: Output }]
1385
- };
1610
+ PickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PickerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: EmojiFrequentlyService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
1611
+ PickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: PickerComponent, selector: "emoji-mart", inputs: { perLine: "perLine", totalFrequentLines: "totalFrequentLines", i18n: "i18n", style: "style", title: "title", emoji: "emoji", darkMode: "darkMode", color: "color", hideObsolete: "hideObsolete", categories: "categories", activeCategories: "activeCategories", set: "set", skin: "skin", isNative: "isNative", emojiSize: "emojiSize", sheetSize: "sheetSize", emojisToShowFilter: "emojisToShowFilter", showPreview: "showPreview", emojiTooltip: "emojiTooltip", autoFocus: "autoFocus", custom: "custom", hideRecent: "hideRecent", imageUrlFn: "imageUrlFn", include: "include", exclude: "exclude", notFoundEmoji: "notFoundEmoji", categoriesIcons: "categoriesIcons", searchIcons: "searchIcons", useButton: "useButton", enableFrequentEmojiSort: "enableFrequentEmojiSort", enableSearch: "enableSearch", showSingleCategory: "showSingleCategory", virtualize: "virtualize", virtualizeOffset: "virtualizeOffset", recent: "recent", backgroundImageFn: "backgroundImageFn" }, outputs: { emojiClick: "emojiClick", emojiSelect: "emojiSelect", skinChange: "skinChange" }, viewQueries: [{ propertyName: "scrollRef", first: true, predicate: ["scrollRef"], descendants: true, static: true }, { propertyName: "previewRef", first: true, predicate: PreviewComponent, descendants: true }, { propertyName: "searchRef", first: true, predicate: SearchComponent, descendants: true }, { propertyName: "categoryRefs", predicate: CategoryComponent, descendants: true }], ngImport: i0, template: "<section\n class=\"emoji-mart {{ darkMode ? 'emoji-mart-dark' : '' }}\"\n [style.width]=\"getWidth()\"\n [ngStyle]=\"style\"\n>\n <div class=\"emoji-mart-bar\">\n <emoji-mart-anchors\n [categories]=\"categories\"\n (anchorClick)=\"handleAnchorClick($event)\"\n [color]=\"color\"\n [selected]=\"selected\"\n [i18n]=\"i18n\"\n [icons]=\"categoriesIcons\"\n ></emoji-mart-anchors>\n </div>\n <emoji-search\n *ngIf=\"enableSearch\"\n [i18n]=\"i18n\"\n (searchResults)=\"handleSearch($event)\"\n (enterKey)=\"handleEnterKey($event)\"\n [include]=\"include\"\n [exclude]=\"exclude\"\n [custom]=\"custom\"\n [autoFocus]=\"autoFocus\"\n [icons]=\"searchIcons\"\n [emojisToShowFilter]=\"emojisToShowFilter\"\n ></emoji-search>\n <section #scrollRef class=\"emoji-mart-scroll\" [attr.aria-label]=\"i18n.emojilist\">\n <emoji-category\n *ngFor=\"let category of activeCategories; let idx = index; trackBy: categoryTrack\"\n [id]=\"category.id\"\n [name]=\"category.name\"\n [emojis]=\"category.emojis\"\n [perLine]=\"perLine\"\n [totalFrequentLines]=\"totalFrequentLines\"\n [hasStickyPosition]=\"isNative\"\n [i18n]=\"i18n\"\n [hideObsolete]=\"hideObsolete\"\n [notFoundEmoji]=\"notFoundEmoji\"\n [custom]=\"category.id === RECENT_CATEGORY.id ? CUSTOM_CATEGORY.emojis : undefined\"\n [recent]=\"category.id === RECENT_CATEGORY.id ? recent : undefined\"\n [virtualize]=\"virtualize\"\n [virtualizeOffset]=\"virtualizeOffset\"\n [emojiIsNative]=\"isNative\"\n [emojiSkin]=\"skin\"\n [emojiSize]=\"emojiSize\"\n [emojiSet]=\"set\"\n [emojiSheetSize]=\"sheetSize\"\n [emojiForceSize]=\"isNative\"\n [emojiTooltip]=\"emojiTooltip\"\n [emojiBackgroundImageFn]=\"backgroundImageFn\"\n [emojiImageUrlFn]=\"imageUrlFn\"\n [emojiUseButton]=\"useButton\"\n (emojiOver)=\"handleEmojiOver($event)\"\n (emojiLeave)=\"handleEmojiLeave()\"\n (emojiClick)=\"handleEmojiClick($event)\"\n ></emoji-category>\n </section>\n <div class=\"emoji-mart-bar\" *ngIf=\"showPreview\">\n <emoji-preview\n [title]=\"title\"\n [emoji]=\"previewEmoji\"\n [idleEmoji]=\"emoji\"\n [emojiIsNative]=\"isNative\"\n [emojiSize]=\"38\"\n [emojiSkin]=\"skin\"\n [emojiSet]=\"set\"\n [i18n]=\"i18n\"\n [emojiSheetSize]=\"sheetSize\"\n [emojiBackgroundImageFn]=\"backgroundImageFn\"\n [emojiImageUrlFn]=\"imageUrlFn\"\n (skinChange)=\"handleSkinChange($event)\"\n ></emoji-preview>\n </div>\n</section>\n", components: [{ type: AnchorsComponent, selector: "emoji-mart-anchors", inputs: ["categories", "color", "selected", "i18n", "icons"], outputs: ["anchorClick"] }, { type: SearchComponent, selector: "emoji-search", inputs: ["maxResults", "autoFocus", "i18n", "include", "exclude", "custom", "icons", "emojisToShowFilter"], outputs: ["searchResults", "enterKey"] }, { type: CategoryComponent, selector: "emoji-category", inputs: ["emojis", "hasStickyPosition", "name", "perLine", "totalFrequentLines", "recent", "custom", "i18n", "id", "hideObsolete", "notFoundEmoji", "virtualize", "virtualizeOffset", "emojiIsNative", "emojiSkin", "emojiSize", "emojiSet", "emojiSheetSize", "emojiForceSize", "emojiTooltip", "emojiBackgroundImageFn", "emojiImageUrlFn", "emojiUseButton"], outputs: ["emojiOver", "emojiLeave", "emojiClick"] }, { type: PreviewComponent, selector: "emoji-preview", inputs: ["title", "emoji", "idleEmoji", "i18n", "emojiIsNative", "emojiSkin", "emojiSize", "emojiSet", "emojiSheetSize", "emojiBackgroundImageFn", "emojiImageUrlFn"], outputs: ["skinChange"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PickerComponent, decorators: [{
1613
+ type: Component,
1614
+ args: [{ selector: 'emoji-mart', changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "<section\n class=\"emoji-mart {{ darkMode ? 'emoji-mart-dark' : '' }}\"\n [style.width]=\"getWidth()\"\n [ngStyle]=\"style\"\n>\n <div class=\"emoji-mart-bar\">\n <emoji-mart-anchors\n [categories]=\"categories\"\n (anchorClick)=\"handleAnchorClick($event)\"\n [color]=\"color\"\n [selected]=\"selected\"\n [i18n]=\"i18n\"\n [icons]=\"categoriesIcons\"\n ></emoji-mart-anchors>\n </div>\n <emoji-search\n *ngIf=\"enableSearch\"\n [i18n]=\"i18n\"\n (searchResults)=\"handleSearch($event)\"\n (enterKey)=\"handleEnterKey($event)\"\n [include]=\"include\"\n [exclude]=\"exclude\"\n [custom]=\"custom\"\n [autoFocus]=\"autoFocus\"\n [icons]=\"searchIcons\"\n [emojisToShowFilter]=\"emojisToShowFilter\"\n ></emoji-search>\n <section #scrollRef class=\"emoji-mart-scroll\" [attr.aria-label]=\"i18n.emojilist\">\n <emoji-category\n *ngFor=\"let category of activeCategories; let idx = index; trackBy: categoryTrack\"\n [id]=\"category.id\"\n [name]=\"category.name\"\n [emojis]=\"category.emojis\"\n [perLine]=\"perLine\"\n [totalFrequentLines]=\"totalFrequentLines\"\n [hasStickyPosition]=\"isNative\"\n [i18n]=\"i18n\"\n [hideObsolete]=\"hideObsolete\"\n [notFoundEmoji]=\"notFoundEmoji\"\n [custom]=\"category.id === RECENT_CATEGORY.id ? CUSTOM_CATEGORY.emojis : undefined\"\n [recent]=\"category.id === RECENT_CATEGORY.id ? recent : undefined\"\n [virtualize]=\"virtualize\"\n [virtualizeOffset]=\"virtualizeOffset\"\n [emojiIsNative]=\"isNative\"\n [emojiSkin]=\"skin\"\n [emojiSize]=\"emojiSize\"\n [emojiSet]=\"set\"\n [emojiSheetSize]=\"sheetSize\"\n [emojiForceSize]=\"isNative\"\n [emojiTooltip]=\"emojiTooltip\"\n [emojiBackgroundImageFn]=\"backgroundImageFn\"\n [emojiImageUrlFn]=\"imageUrlFn\"\n [emojiUseButton]=\"useButton\"\n (emojiOver)=\"handleEmojiOver($event)\"\n (emojiLeave)=\"handleEmojiLeave()\"\n (emojiClick)=\"handleEmojiClick($event)\"\n ></emoji-category>\n </section>\n <div class=\"emoji-mart-bar\" *ngIf=\"showPreview\">\n <emoji-preview\n [title]=\"title\"\n [emoji]=\"previewEmoji\"\n [idleEmoji]=\"emoji\"\n [emojiIsNative]=\"isNative\"\n [emojiSize]=\"38\"\n [emojiSkin]=\"skin\"\n [emojiSet]=\"set\"\n [i18n]=\"i18n\"\n [emojiSheetSize]=\"sheetSize\"\n [emojiBackgroundImageFn]=\"backgroundImageFn\"\n [emojiImageUrlFn]=\"imageUrlFn\"\n (skinChange)=\"handleSkinChange($event)\"\n ></emoji-preview>\n </div>\n</section>\n" }]
1615
+ }], ctorParameters: function () {
1616
+ return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: EmojiFrequentlyService }, { type: undefined, decorators: [{
1617
+ type: Inject,
1618
+ args: [PLATFORM_ID]
1619
+ }] }];
1620
+ }, propDecorators: { perLine: [{
1621
+ type: Input
1622
+ }], totalFrequentLines: [{
1623
+ type: Input
1624
+ }], i18n: [{
1625
+ type: Input
1626
+ }], style: [{
1627
+ type: Input
1628
+ }], title: [{
1629
+ type: Input
1630
+ }], emoji: [{
1631
+ type: Input
1632
+ }], darkMode: [{
1633
+ type: Input
1634
+ }], color: [{
1635
+ type: Input
1636
+ }], hideObsolete: [{
1637
+ type: Input
1638
+ }], categories: [{
1639
+ type: Input
1640
+ }], activeCategories: [{
1641
+ type: Input
1642
+ }], set: [{
1643
+ type: Input
1644
+ }], skin: [{
1645
+ type: Input
1646
+ }], isNative: [{
1647
+ type: Input
1648
+ }], emojiSize: [{
1649
+ type: Input
1650
+ }], sheetSize: [{
1651
+ type: Input
1652
+ }], emojisToShowFilter: [{
1653
+ type: Input
1654
+ }], showPreview: [{
1655
+ type: Input
1656
+ }], emojiTooltip: [{
1657
+ type: Input
1658
+ }], autoFocus: [{
1659
+ type: Input
1660
+ }], custom: [{
1661
+ type: Input
1662
+ }], hideRecent: [{
1663
+ type: Input
1664
+ }], imageUrlFn: [{
1665
+ type: Input
1666
+ }], include: [{
1667
+ type: Input
1668
+ }], exclude: [{
1669
+ type: Input
1670
+ }], notFoundEmoji: [{
1671
+ type: Input
1672
+ }], categoriesIcons: [{
1673
+ type: Input
1674
+ }], searchIcons: [{
1675
+ type: Input
1676
+ }], useButton: [{
1677
+ type: Input
1678
+ }], enableFrequentEmojiSort: [{
1679
+ type: Input
1680
+ }], enableSearch: [{
1681
+ type: Input
1682
+ }], showSingleCategory: [{
1683
+ type: Input
1684
+ }], virtualize: [{
1685
+ type: Input
1686
+ }], virtualizeOffset: [{
1687
+ type: Input
1688
+ }], recent: [{
1689
+ type: Input
1690
+ }], emojiClick: [{
1691
+ type: Output
1692
+ }], emojiSelect: [{
1693
+ type: Output
1694
+ }], skinChange: [{
1695
+ type: Output
1696
+ }], scrollRef: [{
1697
+ type: ViewChild,
1698
+ args: ['scrollRef', { static: true }]
1699
+ }], previewRef: [{
1700
+ type: ViewChild,
1701
+ args: [PreviewComponent, { static: false }]
1702
+ }], searchRef: [{
1703
+ type: ViewChild,
1704
+ args: [SearchComponent, { static: false }]
1705
+ }], categoryRefs: [{
1706
+ type: ViewChildren,
1707
+ args: [CategoryComponent]
1708
+ }], backgroundImageFn: [{
1709
+ type: Input
1710
+ }] } });
1386
1711
 
1387
1712
  class PickerModule {
1388
1713
  }
1389
- PickerModule.decorators = [
1390
- { type: NgModule, args: [{
1391
- imports: [CommonModule, FormsModule, EmojiModule],
1392
- exports: [
1393
- PickerComponent,
1394
- AnchorsComponent,
1395
- CategoryComponent,
1396
- SearchComponent,
1397
- PreviewComponent,
1398
- SkinComponent,
1399
- ],
1400
- declarations: [
1401
- PickerComponent,
1402
- AnchorsComponent,
1403
- CategoryComponent,
1404
- SearchComponent,
1405
- PreviewComponent,
1406
- SkinComponent,
1407
- ],
1408
- },] }
1409
- ];
1714
+ PickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1715
+ PickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PickerModule, declarations: [PickerComponent,
1716
+ AnchorsComponent,
1717
+ CategoryComponent,
1718
+ SearchComponent,
1719
+ PreviewComponent,
1720
+ SkinComponent], imports: [CommonModule, FormsModule, EmojiModule], exports: [PickerComponent,
1721
+ AnchorsComponent,
1722
+ CategoryComponent,
1723
+ SearchComponent,
1724
+ PreviewComponent,
1725
+ SkinComponent] });
1726
+ PickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PickerModule, imports: [[CommonModule, FormsModule, EmojiModule]] });
1727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PickerModule, decorators: [{
1728
+ type: NgModule,
1729
+ args: [{
1730
+ imports: [CommonModule, FormsModule, EmojiModule],
1731
+ exports: [
1732
+ PickerComponent,
1733
+ AnchorsComponent,
1734
+ CategoryComponent,
1735
+ SearchComponent,
1736
+ PreviewComponent,
1737
+ SkinComponent,
1738
+ ],
1739
+ declarations: [
1740
+ PickerComponent,
1741
+ AnchorsComponent,
1742
+ CategoryComponent,
1743
+ SearchComponent,
1744
+ PreviewComponent,
1745
+ SkinComponent,
1746
+ ],
1747
+ }]
1748
+ }] });
1410
1749
 
1411
1750
  /**
1412
1751
  * Generated bundle index. Do not edit.
1413
1752
  */
1414
1753
 
1415
1754
  export { AnchorsComponent, CategoryComponent, EmojiFrequentlyService, EmojiSearch, PickerComponent, PickerModule, PreviewComponent, SearchComponent, SkinComponent };
1416
- //# sourceMappingURL=ctrl-ngx-emoji-mart.js.map
1755
+ //# sourceMappingURL=ctrl-ngx-emoji-mart.mjs.map