@ctrl/ngx-emoji-mart 6.0.0 → 6.2.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.
- package/README.md +3 -3
- package/anchors.component.d.ts +3 -0
- package/category.component.d.ts +7 -2
- package/ctrl-ngx-emoji-mart.d.ts +1 -0
- package/emoji-frequently.service.d.ts +3 -0
- package/emoji-search.service.d.ts +3 -0
- package/esm2020/anchors.component.mjs +83 -0
- package/esm2020/category.component.mjs +386 -0
- package/{esm2015/ctrl-ngx-emoji-mart.js → esm2020/ctrl-ngx-emoji-mart.mjs} +0 -0
- package/{esm2015/emoji-frequently.service.js → esm2020/emoji-frequently.service.mjs} +10 -8
- package/esm2020/emoji-search.service.mjs +177 -0
- package/{esm2015/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.js → esm2020/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.mjs} +0 -0
- package/{esm2015/ngx-emoji/data/categories.js → esm2020/ngx-emoji/data/categories.mjs} +0 -0
- package/{esm2015/ngx-emoji/data/data.interfaces.js → esm2020/ngx-emoji/data/data.interfaces.mjs} +0 -0
- package/{esm2015/ngx-emoji/data/emojis.js → esm2020/ngx-emoji/data/emojis.mjs} +11 -6
- package/{esm2015/ngx-emoji/data/skins.js → esm2020/ngx-emoji/data/skins.mjs} +0 -0
- package/esm2020/ngx-emoji/emoji.component.mjs +236 -0
- package/esm2020/ngx-emoji/emoji.module.mjs +18 -0
- package/esm2020/ngx-emoji/emoji.service.mjs +144 -0
- package/{esm2015/ngx-emoji/index.js → esm2020/ngx-emoji/index.mjs} +0 -0
- package/esm2020/picker.component.mjs +505 -0
- package/esm2020/picker.module.mjs +49 -0
- package/esm2020/preview.component.mjs +187 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/search.component.mjs +165 -0
- package/esm2020/skins.component.mjs +108 -0
- package/{esm2015/svgs/index.js → esm2020/svgs/index.mjs} +0 -0
- package/{esm2015/utils/index.js → esm2020/utils/index.mjs} +0 -0
- package/fesm2015/{ctrl-ngx-emoji-mart-ngx-emoji.js → ctrl-ngx-emoji-mart-ngx-emoji.mjs} +111 -49
- package/fesm2015/ctrl-ngx-emoji-mart-ngx-emoji.mjs.map +1 -0
- package/fesm2015/{ctrl-ngx-emoji-mart.js → ctrl-ngx-emoji-mart.mjs} +670 -325
- package/fesm2015/ctrl-ngx-emoji-mart.mjs.map +1 -0
- package/fesm2020/ctrl-ngx-emoji-mart-ngx-emoji.mjs +31829 -0
- package/fesm2020/ctrl-ngx-emoji-mart-ngx-emoji.mjs.map +1 -0
- package/fesm2020/ctrl-ngx-emoji-mart.mjs +1757 -0
- package/fesm2020/ctrl-ngx-emoji-mart.mjs.map +1 -0
- package/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.d.ts +1 -0
- package/ngx-emoji/emoji.component.d.ts +3 -0
- package/ngx-emoji/emoji.module.d.ts +6 -0
- package/ngx-emoji/emoji.service.d.ts +3 -0
- package/ngx-emoji/package.json +6 -7
- package/package.json +35 -13
- package/picker.component.d.ts +3 -0
- package/picker.css +0 -1
- package/picker.module.d.ts +13 -0
- package/preview.component.d.ts +4 -1
- package/search.component.d.ts +3 -0
- package/skins.component.d.ts +6 -3
- package/bundles/ctrl-ngx-emoji-mart-ngx-emoji.umd.js +0 -32093
- package/bundles/ctrl-ngx-emoji-mart-ngx-emoji.umd.js.map +0 -1
- package/bundles/ctrl-ngx-emoji-mart.umd.js +0 -1718
- package/bundles/ctrl-ngx-emoji-mart.umd.js.map +0 -1
- package/ctrl-ngx-emoji-mart.metadata.json +0 -1
- package/esm2015/anchors.component.js +0 -54
- package/esm2015/category.component.js +0 -276
- package/esm2015/emoji-search.service.js +0 -179
- package/esm2015/ngx-emoji/emoji.component.js +0 -174
- package/esm2015/ngx-emoji/emoji.module.js +0 -13
- package/esm2015/ngx-emoji/emoji.service.js +0 -143
- package/esm2015/picker.component.js +0 -459
- package/esm2015/picker.module.js +0 -34
- package/esm2015/preview.component.js +0 -113
- package/esm2015/search.component.js +0 -115
- package/esm2015/skins.component.js +0 -76
- package/fesm2015/ctrl-ngx-emoji-mart-ngx-emoji.js.map +0 -1
- package/fesm2015/ctrl-ngx-emoji-mart.js.map +0 -1
- package/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.metadata.json +0 -1
@@ -0,0 +1,1757 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, PLATFORM_ID, Injectable, Inject, ViewChild, ViewChildren, NgModule } from '@angular/core';
|
3
|
+
import * as i3 from '@angular/common';
|
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';
|
9
|
+
import { FormsModule } from '@angular/forms';
|
10
|
+
|
11
|
+
class AnchorsComponent {
|
12
|
+
constructor() {
|
13
|
+
this.categories = [];
|
14
|
+
this.icons = {};
|
15
|
+
this.anchorClick = new EventEmitter();
|
16
|
+
}
|
17
|
+
trackByFn(idx, cat) {
|
18
|
+
return cat.id;
|
19
|
+
}
|
20
|
+
handleClick($event, index) {
|
21
|
+
this.anchorClick.emit({
|
22
|
+
category: this.categories[index],
|
23
|
+
index,
|
24
|
+
});
|
25
|
+
}
|
26
|
+
}
|
27
|
+
AnchorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AnchorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
28
|
+
AnchorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", 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.1.2", ngImport: i0, type: AnchorsComponent, decorators: [{
|
50
|
+
type: Component,
|
51
|
+
args: [{
|
52
|
+
selector: 'emoji-mart-anchors',
|
53
|
+
template: `
|
54
|
+
<div class="emoji-mart-anchors">
|
55
|
+
<ng-template ngFor let-category [ngForOf]="categories" let-idx="index" [ngForTrackBy]="trackByFn">
|
56
|
+
<span
|
57
|
+
*ngIf="category.anchor !== false"
|
58
|
+
[attr.title]="i18n.categories[category.id]"
|
59
|
+
(click)="this.handleClick($event, idx)"
|
60
|
+
class="emoji-mart-anchor"
|
61
|
+
[class.emoji-mart-anchor-selected]="category.name === selected"
|
62
|
+
[style.color]="category.name === selected ? color : null"
|
63
|
+
>
|
64
|
+
<div>
|
65
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
66
|
+
<path [attr.d]="icons[category.id]" />
|
67
|
+
</svg>
|
68
|
+
</div>
|
69
|
+
<span class="emoji-mart-anchor-bar" [style.background-color]="color"></span>
|
70
|
+
</span>
|
71
|
+
</ng-template>
|
72
|
+
</div>
|
73
|
+
`,
|
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
|
+
}] } });
|
90
|
+
|
91
|
+
class EmojiFrequentlyService {
|
92
|
+
constructor(platformId) {
|
93
|
+
this.platformId = platformId;
|
94
|
+
this.NAMESPACE = 'emoji-mart';
|
95
|
+
this.frequently = null;
|
96
|
+
this.defaults = {};
|
97
|
+
this.initialized = false;
|
98
|
+
this.DEFAULTS = [
|
99
|
+
'+1',
|
100
|
+
'grinning',
|
101
|
+
'kissing_heart',
|
102
|
+
'heart_eyes',
|
103
|
+
'laughing',
|
104
|
+
'stuck_out_tongue_winking_eye',
|
105
|
+
'sweat_smile',
|
106
|
+
'joy',
|
107
|
+
'scream',
|
108
|
+
'disappointed',
|
109
|
+
'unamused',
|
110
|
+
'weary',
|
111
|
+
'sob',
|
112
|
+
'sunglasses',
|
113
|
+
'heart',
|
114
|
+
'poop',
|
115
|
+
];
|
116
|
+
}
|
117
|
+
init() {
|
118
|
+
this.frequently = JSON.parse((isPlatformBrowser(this.platformId) &&
|
119
|
+
localStorage.getItem(`${this.NAMESPACE}.frequently`)) ||
|
120
|
+
'null');
|
121
|
+
this.initialized = true;
|
122
|
+
}
|
123
|
+
add(emoji) {
|
124
|
+
if (!this.initialized) {
|
125
|
+
this.init();
|
126
|
+
}
|
127
|
+
if (!this.frequently) {
|
128
|
+
this.frequently = this.defaults;
|
129
|
+
}
|
130
|
+
if (!this.frequently[emoji.id]) {
|
131
|
+
this.frequently[emoji.id] = 0;
|
132
|
+
}
|
133
|
+
this.frequently[emoji.id] += 1;
|
134
|
+
if (isPlatformBrowser(this.platformId)) {
|
135
|
+
localStorage.setItem(`${this.NAMESPACE}.last`, emoji.id);
|
136
|
+
localStorage.setItem(`${this.NAMESPACE}.frequently`, JSON.stringify(this.frequently));
|
137
|
+
}
|
138
|
+
}
|
139
|
+
get(perLine, totalLines) {
|
140
|
+
if (!this.initialized) {
|
141
|
+
this.init();
|
142
|
+
}
|
143
|
+
if (this.frequently === null) {
|
144
|
+
this.defaults = {};
|
145
|
+
const result = [];
|
146
|
+
for (let i = 0; i < perLine; i++) {
|
147
|
+
this.defaults[this.DEFAULTS[i]] = perLine - i;
|
148
|
+
result.push(this.DEFAULTS[i]);
|
149
|
+
}
|
150
|
+
return result;
|
151
|
+
}
|
152
|
+
const quantity = perLine * totalLines;
|
153
|
+
const frequentlyKeys = Object.keys(this.frequently);
|
154
|
+
const sorted = frequentlyKeys
|
155
|
+
.sort((a, b) => this.frequently[a] - this.frequently[b])
|
156
|
+
.reverse();
|
157
|
+
const sliced = sorted.slice(0, quantity);
|
158
|
+
const last = isPlatformBrowser(this.platformId) && localStorage.getItem(`${this.NAMESPACE}.last`);
|
159
|
+
if (last && !sliced.includes(last)) {
|
160
|
+
sliced.pop();
|
161
|
+
sliced.push(last);
|
162
|
+
}
|
163
|
+
return sliced;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
EmojiFrequentlyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: EmojiFrequentlyService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
167
|
+
EmojiFrequentlyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: EmojiFrequentlyService, providedIn: 'root' });
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: EmojiFrequentlyService, decorators: [{
|
169
|
+
type: Injectable,
|
170
|
+
args: [{ providedIn: 'root' }]
|
171
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
172
|
+
type: Inject,
|
173
|
+
args: [PLATFORM_ID]
|
174
|
+
}] }]; } });
|
175
|
+
|
176
|
+
class CategoryComponent {
|
177
|
+
constructor(ref, emojiService, frequently) {
|
178
|
+
this.ref = ref;
|
179
|
+
this.emojiService = emojiService;
|
180
|
+
this.frequently = frequently;
|
181
|
+
this.emojis = null;
|
182
|
+
this.hasStickyPosition = true;
|
183
|
+
this.name = '';
|
184
|
+
this.perLine = 9;
|
185
|
+
this.totalFrequentLines = 4;
|
186
|
+
this.recent = [];
|
187
|
+
this.custom = [];
|
188
|
+
this.hideObsolete = true;
|
189
|
+
this.virtualize = false;
|
190
|
+
this.virtualizeOffset = 0;
|
191
|
+
this.emojiOver = new EventEmitter();
|
192
|
+
this.emojiLeave = new EventEmitter();
|
193
|
+
this.emojiClick = new EventEmitter();
|
194
|
+
this.containerStyles = {};
|
195
|
+
this.emojisToDisplay = [];
|
196
|
+
this.filteredEmojisSubject = new Subject();
|
197
|
+
this.filteredEmojis$ = this.filteredEmojisSubject.asObservable();
|
198
|
+
this.labelStyles = {};
|
199
|
+
this.labelSpanStyles = {};
|
200
|
+
this.margin = 0;
|
201
|
+
this.minMargin = 0;
|
202
|
+
this.maxMargin = 0;
|
203
|
+
this.top = 0;
|
204
|
+
this.rows = 0;
|
205
|
+
}
|
206
|
+
ngOnInit() {
|
207
|
+
this.updateRecentEmojis();
|
208
|
+
this.emojisToDisplay = this.filterEmojis();
|
209
|
+
if (this.noEmojiToDisplay) {
|
210
|
+
this.containerStyles = { display: 'none' };
|
211
|
+
}
|
212
|
+
if (!this.hasStickyPosition) {
|
213
|
+
this.labelStyles = { height: 28 };
|
214
|
+
// this.labelSpanStyles = { position: 'absolute' };
|
215
|
+
}
|
216
|
+
}
|
217
|
+
ngOnChanges(changes) {
|
218
|
+
if (changes.emojis?.currentValue?.length !== changes.emojis?.previousValue?.length) {
|
219
|
+
this.emojisToDisplay = this.filterEmojis();
|
220
|
+
this.ngAfterViewInit();
|
221
|
+
}
|
222
|
+
}
|
223
|
+
ngAfterViewInit() {
|
224
|
+
if (!this.virtualize) {
|
225
|
+
return;
|
226
|
+
}
|
227
|
+
const { width } = this.container.nativeElement.getBoundingClientRect();
|
228
|
+
const perRow = Math.floor(width / (this.emojiSize + 12));
|
229
|
+
this.rows = Math.ceil(this.emojisToDisplay.length / perRow);
|
230
|
+
this.containerStyles = {
|
231
|
+
...this.containerStyles,
|
232
|
+
minHeight: `${this.rows * (this.emojiSize + 12) + 28}px`,
|
233
|
+
};
|
234
|
+
this.ref?.detectChanges();
|
235
|
+
this.handleScroll(this.container.nativeElement.parentNode.parentNode.scrollTop);
|
236
|
+
}
|
237
|
+
get noEmojiToDisplay() {
|
238
|
+
return this.emojisToDisplay.length === 0;
|
239
|
+
}
|
240
|
+
memoizeSize() {
|
241
|
+
const parent = this.container.nativeElement.parentNode.parentNode;
|
242
|
+
const { top, height } = this.container.nativeElement.getBoundingClientRect();
|
243
|
+
const parentTop = parent.getBoundingClientRect().top;
|
244
|
+
const labelHeight = this.label.nativeElement.getBoundingClientRect().height;
|
245
|
+
this.top = top - parentTop + parent.scrollTop;
|
246
|
+
if (height === 0) {
|
247
|
+
this.maxMargin = 0;
|
248
|
+
}
|
249
|
+
else {
|
250
|
+
this.maxMargin = height - labelHeight;
|
251
|
+
}
|
252
|
+
}
|
253
|
+
handleScroll(scrollTop) {
|
254
|
+
let margin = scrollTop - this.top;
|
255
|
+
margin = margin < this.minMargin ? this.minMargin : margin;
|
256
|
+
margin = margin > this.maxMargin ? this.maxMargin : margin;
|
257
|
+
if (this.virtualize) {
|
258
|
+
const { top, height } = this.container.nativeElement.getBoundingClientRect();
|
259
|
+
const parentHeight = this.container.nativeElement.parentNode.parentNode.clientHeight;
|
260
|
+
if (parentHeight + (parentHeight + this.virtualizeOffset) >= top && -height - (parentHeight + this.virtualizeOffset) <= top) {
|
261
|
+
this.filteredEmojisSubject.next(this.emojisToDisplay);
|
262
|
+
}
|
263
|
+
else {
|
264
|
+
this.filteredEmojisSubject.next([]);
|
265
|
+
}
|
266
|
+
}
|
267
|
+
if (margin === this.margin) {
|
268
|
+
this.ref.detectChanges();
|
269
|
+
return false;
|
270
|
+
}
|
271
|
+
if (!this.hasStickyPosition) {
|
272
|
+
this.label.nativeElement.style.top = `${margin}px`;
|
273
|
+
}
|
274
|
+
this.margin = margin;
|
275
|
+
this.ref.detectChanges();
|
276
|
+
return true;
|
277
|
+
}
|
278
|
+
updateRecentEmojis() {
|
279
|
+
if (this.name !== 'Recent') {
|
280
|
+
return;
|
281
|
+
}
|
282
|
+
let frequentlyUsed = this.recent || this.frequently.get(this.perLine, this.totalFrequentLines);
|
283
|
+
if (!frequentlyUsed || !frequentlyUsed.length) {
|
284
|
+
frequentlyUsed = this.frequently.get(this.perLine, this.totalFrequentLines);
|
285
|
+
}
|
286
|
+
if (!frequentlyUsed.length) {
|
287
|
+
return;
|
288
|
+
}
|
289
|
+
this.emojis = frequentlyUsed
|
290
|
+
.map(id => {
|
291
|
+
const emoji = this.custom.filter((e) => e.id === id)[0];
|
292
|
+
if (emoji) {
|
293
|
+
return emoji;
|
294
|
+
}
|
295
|
+
return id;
|
296
|
+
})
|
297
|
+
.filter(id => !!this.emojiService.getData(id));
|
298
|
+
}
|
299
|
+
updateDisplay(display) {
|
300
|
+
this.containerStyles.display = display;
|
301
|
+
this.updateRecentEmojis();
|
302
|
+
this.ref.detectChanges();
|
303
|
+
}
|
304
|
+
trackById(index, item) {
|
305
|
+
return item;
|
306
|
+
}
|
307
|
+
filterEmojis() {
|
308
|
+
const newEmojis = [];
|
309
|
+
for (const emoji of this.emojis || []) {
|
310
|
+
if (!emoji) {
|
311
|
+
continue;
|
312
|
+
}
|
313
|
+
const data = this.emojiService.getData(emoji);
|
314
|
+
if (!data || (data.obsoletedBy && this.hideObsolete) || (!data.unified && !data.custom)) {
|
315
|
+
continue;
|
316
|
+
}
|
317
|
+
newEmojis.push(emoji);
|
318
|
+
}
|
319
|
+
return newEmojis;
|
320
|
+
}
|
321
|
+
}
|
322
|
+
CategoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: CategoryComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.EmojiService }, { token: EmojiFrequentlyService }], target: i0.ɵɵFactoryTarget.Component });
|
323
|
+
CategoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", 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: `
|
324
|
+
<section
|
325
|
+
#container
|
326
|
+
class="emoji-mart-category"
|
327
|
+
[attr.aria-label]="i18n.categories[id]"
|
328
|
+
[class.emoji-mart-no-results]="noEmojiToDisplay"
|
329
|
+
[ngStyle]="containerStyles"
|
330
|
+
>
|
331
|
+
<div class="emoji-mart-category-label" [ngStyle]="labelStyles" [attr.data-name]="name">
|
332
|
+
<!-- already labeled by the section aria-label -->
|
333
|
+
<span #label [ngStyle]="labelSpanStyles" aria-hidden="true">
|
334
|
+
{{ i18n.categories[id] }}
|
335
|
+
</span>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
<div
|
339
|
+
*ngIf="virtualize; else normalRenderTemplate"
|
340
|
+
>
|
341
|
+
<div *ngIf="filteredEmojis$ | async as filteredEmojis">
|
342
|
+
<ngx-emoji
|
343
|
+
*ngFor="let emoji of filteredEmojis; trackBy: trackById"
|
344
|
+
[emoji]="emoji"
|
345
|
+
[size]="emojiSize"
|
346
|
+
[skin]="emojiSkin"
|
347
|
+
[isNative]="emojiIsNative"
|
348
|
+
[set]="emojiSet"
|
349
|
+
[sheetSize]="emojiSheetSize"
|
350
|
+
[forceSize]="emojiForceSize"
|
351
|
+
[tooltip]="emojiTooltip"
|
352
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
353
|
+
[imageUrlFn]="emojiImageUrlFn"
|
354
|
+
[hideObsolete]="hideObsolete"
|
355
|
+
[useButton]="emojiUseButton"
|
356
|
+
(emojiOver)="emojiOver.emit($event)"
|
357
|
+
(emojiLeave)="emojiLeave.emit($event)"
|
358
|
+
(emojiClick)="emojiClick.emit($event)"
|
359
|
+
></ngx-emoji>
|
360
|
+
</div>
|
361
|
+
</div>
|
362
|
+
|
363
|
+
<div *ngIf="noEmojiToDisplay">
|
364
|
+
<div>
|
365
|
+
<ngx-emoji
|
366
|
+
[emoji]="notFoundEmoji"
|
367
|
+
[size]="38"
|
368
|
+
[skin]="emojiSkin"
|
369
|
+
[isNative]="emojiIsNative"
|
370
|
+
[set]="emojiSet"
|
371
|
+
[sheetSize]="emojiSheetSize"
|
372
|
+
[forceSize]="emojiForceSize"
|
373
|
+
[tooltip]="emojiTooltip"
|
374
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
375
|
+
[useButton]="emojiUseButton"
|
376
|
+
></ngx-emoji>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div class="emoji-mart-no-results-label">
|
380
|
+
{{ i18n.notfound }}
|
381
|
+
</div>
|
382
|
+
</div>
|
383
|
+
</section>
|
384
|
+
|
385
|
+
<ng-template #normalRenderTemplate>
|
386
|
+
<ngx-emoji
|
387
|
+
*ngFor="let emoji of emojisToDisplay; trackBy: trackById"
|
388
|
+
[emoji]="emoji"
|
389
|
+
[size]="emojiSize"
|
390
|
+
[skin]="emojiSkin"
|
391
|
+
[isNative]="emojiIsNative"
|
392
|
+
[set]="emojiSet"
|
393
|
+
[sheetSize]="emojiSheetSize"
|
394
|
+
[forceSize]="emojiForceSize"
|
395
|
+
[tooltip]="emojiTooltip"
|
396
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
397
|
+
[imageUrlFn]="emojiImageUrlFn"
|
398
|
+
[hideObsolete]="hideObsolete"
|
399
|
+
[useButton]="emojiUseButton"
|
400
|
+
(emojiOver)="emojiOver.emit($event)"
|
401
|
+
(emojiLeave)="emojiLeave.emit($event)"
|
402
|
+
(emojiClick)="emojiClick.emit($event)"
|
403
|
+
></ngx-emoji>
|
404
|
+
</ng-template>
|
405
|
+
`, 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 });
|
406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: CategoryComponent, decorators: [{
|
407
|
+
type: Component,
|
408
|
+
args: [{
|
409
|
+
selector: 'emoji-category',
|
410
|
+
template: `
|
411
|
+
<section
|
412
|
+
#container
|
413
|
+
class="emoji-mart-category"
|
414
|
+
[attr.aria-label]="i18n.categories[id]"
|
415
|
+
[class.emoji-mart-no-results]="noEmojiToDisplay"
|
416
|
+
[ngStyle]="containerStyles"
|
417
|
+
>
|
418
|
+
<div class="emoji-mart-category-label" [ngStyle]="labelStyles" [attr.data-name]="name">
|
419
|
+
<!-- already labeled by the section aria-label -->
|
420
|
+
<span #label [ngStyle]="labelSpanStyles" aria-hidden="true">
|
421
|
+
{{ i18n.categories[id] }}
|
422
|
+
</span>
|
423
|
+
</div>
|
424
|
+
|
425
|
+
<div
|
426
|
+
*ngIf="virtualize; else normalRenderTemplate"
|
427
|
+
>
|
428
|
+
<div *ngIf="filteredEmojis$ | async as filteredEmojis">
|
429
|
+
<ngx-emoji
|
430
|
+
*ngFor="let emoji of filteredEmojis; trackBy: trackById"
|
431
|
+
[emoji]="emoji"
|
432
|
+
[size]="emojiSize"
|
433
|
+
[skin]="emojiSkin"
|
434
|
+
[isNative]="emojiIsNative"
|
435
|
+
[set]="emojiSet"
|
436
|
+
[sheetSize]="emojiSheetSize"
|
437
|
+
[forceSize]="emojiForceSize"
|
438
|
+
[tooltip]="emojiTooltip"
|
439
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
440
|
+
[imageUrlFn]="emojiImageUrlFn"
|
441
|
+
[hideObsolete]="hideObsolete"
|
442
|
+
[useButton]="emojiUseButton"
|
443
|
+
(emojiOver)="emojiOver.emit($event)"
|
444
|
+
(emojiLeave)="emojiLeave.emit($event)"
|
445
|
+
(emojiClick)="emojiClick.emit($event)"
|
446
|
+
></ngx-emoji>
|
447
|
+
</div>
|
448
|
+
</div>
|
449
|
+
|
450
|
+
<div *ngIf="noEmojiToDisplay">
|
451
|
+
<div>
|
452
|
+
<ngx-emoji
|
453
|
+
[emoji]="notFoundEmoji"
|
454
|
+
[size]="38"
|
455
|
+
[skin]="emojiSkin"
|
456
|
+
[isNative]="emojiIsNative"
|
457
|
+
[set]="emojiSet"
|
458
|
+
[sheetSize]="emojiSheetSize"
|
459
|
+
[forceSize]="emojiForceSize"
|
460
|
+
[tooltip]="emojiTooltip"
|
461
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
462
|
+
[useButton]="emojiUseButton"
|
463
|
+
></ngx-emoji>
|
464
|
+
</div>
|
465
|
+
|
466
|
+
<div class="emoji-mart-no-results-label">
|
467
|
+
{{ i18n.notfound }}
|
468
|
+
</div>
|
469
|
+
</div>
|
470
|
+
</section>
|
471
|
+
|
472
|
+
<ng-template #normalRenderTemplate>
|
473
|
+
<ngx-emoji
|
474
|
+
*ngFor="let emoji of emojisToDisplay; trackBy: trackById"
|
475
|
+
[emoji]="emoji"
|
476
|
+
[size]="emojiSize"
|
477
|
+
[skin]="emojiSkin"
|
478
|
+
[isNative]="emojiIsNative"
|
479
|
+
[set]="emojiSet"
|
480
|
+
[sheetSize]="emojiSheetSize"
|
481
|
+
[forceSize]="emojiForceSize"
|
482
|
+
[tooltip]="emojiTooltip"
|
483
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
484
|
+
[imageUrlFn]="emojiImageUrlFn"
|
485
|
+
[hideObsolete]="hideObsolete"
|
486
|
+
[useButton]="emojiUseButton"
|
487
|
+
(emojiOver)="emojiOver.emit($event)"
|
488
|
+
(emojiLeave)="emojiLeave.emit($event)"
|
489
|
+
(emojiClick)="emojiClick.emit($event)"
|
490
|
+
></ngx-emoji>
|
491
|
+
</ng-template>
|
492
|
+
`,
|
493
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
494
|
+
preserveWhitespaces: false,
|
495
|
+
}]
|
496
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.EmojiService }, { type: EmojiFrequentlyService }]; }, propDecorators: { emojis: [{
|
497
|
+
type: Input
|
498
|
+
}], hasStickyPosition: [{
|
499
|
+
type: Input
|
500
|
+
}], name: [{
|
501
|
+
type: Input
|
502
|
+
}], perLine: [{
|
503
|
+
type: Input
|
504
|
+
}], totalFrequentLines: [{
|
505
|
+
type: Input
|
506
|
+
}], recent: [{
|
507
|
+
type: Input
|
508
|
+
}], custom: [{
|
509
|
+
type: Input
|
510
|
+
}], i18n: [{
|
511
|
+
type: Input
|
512
|
+
}], id: [{
|
513
|
+
type: Input
|
514
|
+
}], hideObsolete: [{
|
515
|
+
type: Input
|
516
|
+
}], notFoundEmoji: [{
|
517
|
+
type: Input
|
518
|
+
}], virtualize: [{
|
519
|
+
type: Input
|
520
|
+
}], virtualizeOffset: [{
|
521
|
+
type: Input
|
522
|
+
}], emojiIsNative: [{
|
523
|
+
type: Input
|
524
|
+
}], emojiSkin: [{
|
525
|
+
type: Input
|
526
|
+
}], emojiSize: [{
|
527
|
+
type: Input
|
528
|
+
}], emojiSet: [{
|
529
|
+
type: Input
|
530
|
+
}], emojiSheetSize: [{
|
531
|
+
type: Input
|
532
|
+
}], emojiForceSize: [{
|
533
|
+
type: Input
|
534
|
+
}], emojiTooltip: [{
|
535
|
+
type: Input
|
536
|
+
}], emojiBackgroundImageFn: [{
|
537
|
+
type: Input
|
538
|
+
}], emojiImageUrlFn: [{
|
539
|
+
type: Input
|
540
|
+
}], emojiUseButton: [{
|
541
|
+
type: Input
|
542
|
+
}], emojiOver: [{
|
543
|
+
type: Output
|
544
|
+
}], emojiLeave: [{
|
545
|
+
type: Output
|
546
|
+
}], emojiClick: [{
|
547
|
+
type: Output
|
548
|
+
}], container: [{
|
549
|
+
type: ViewChild,
|
550
|
+
args: ['container', { static: true }]
|
551
|
+
}], label: [{
|
552
|
+
type: ViewChild,
|
553
|
+
args: ['label', { static: true }]
|
554
|
+
}] } });
|
555
|
+
|
556
|
+
function uniq(arr) {
|
557
|
+
return arr.reduce((acc, item) => {
|
558
|
+
if (!acc.includes(item)) {
|
559
|
+
acc.push(item);
|
560
|
+
}
|
561
|
+
return acc;
|
562
|
+
}, []);
|
563
|
+
}
|
564
|
+
function intersect(a, b) {
|
565
|
+
const uniqA = uniq(a);
|
566
|
+
const uniqB = uniq(b);
|
567
|
+
return uniqA.filter((item) => uniqB.indexOf(item) >= 0);
|
568
|
+
}
|
569
|
+
// https://github.com/sonicdoe/measure-scrollbar
|
570
|
+
function measureScrollbar() {
|
571
|
+
if (typeof document === 'undefined') {
|
572
|
+
return 0;
|
573
|
+
}
|
574
|
+
const div = document.createElement('div');
|
575
|
+
div.style.width = '100px';
|
576
|
+
div.style.height = '100px';
|
577
|
+
div.style.overflow = 'scroll';
|
578
|
+
div.style.position = 'absolute';
|
579
|
+
div.style.top = '-9999px';
|
580
|
+
document.body.appendChild(div);
|
581
|
+
const scrollbarWidth = div.offsetWidth - div.clientWidth;
|
582
|
+
document.body.removeChild(div);
|
583
|
+
return scrollbarWidth;
|
584
|
+
}
|
585
|
+
|
586
|
+
class EmojiSearch {
|
587
|
+
constructor(emojiService) {
|
588
|
+
this.emojiService = emojiService;
|
589
|
+
this.originalPool = {};
|
590
|
+
this.index = {};
|
591
|
+
this.emojisList = {};
|
592
|
+
this.emoticonsList = {};
|
593
|
+
this.emojiSearch = {};
|
594
|
+
for (const emojiData of this.emojiService.emojis) {
|
595
|
+
const { shortNames, emoticons } = emojiData;
|
596
|
+
const id = shortNames[0];
|
597
|
+
for (const emoticon of emoticons) {
|
598
|
+
if (this.emoticonsList[emoticon]) {
|
599
|
+
continue;
|
600
|
+
}
|
601
|
+
this.emoticonsList[emoticon] = id;
|
602
|
+
}
|
603
|
+
this.emojisList[id] = this.emojiService.getSanitizedData(id);
|
604
|
+
this.originalPool[id] = emojiData;
|
605
|
+
}
|
606
|
+
}
|
607
|
+
addCustomToPool(custom, pool) {
|
608
|
+
for (const emoji of custom) {
|
609
|
+
const emojiId = emoji.id || emoji.shortNames[0];
|
610
|
+
if (emojiId && !pool[emojiId]) {
|
611
|
+
pool[emojiId] = this.emojiService.getData(emoji);
|
612
|
+
this.emojisList[emojiId] = this.emojiService.getSanitizedData(emoji);
|
613
|
+
}
|
614
|
+
}
|
615
|
+
}
|
616
|
+
search(value, emojisToShowFilter, maxResults = 75, include = [], exclude = [], custom = []) {
|
617
|
+
this.addCustomToPool(custom, this.originalPool);
|
618
|
+
let results;
|
619
|
+
let pool = this.originalPool;
|
620
|
+
if (value.length) {
|
621
|
+
if (value === '-' || value === '-1') {
|
622
|
+
return [this.emojisList['-1']];
|
623
|
+
}
|
624
|
+
if (value === '+' || value === '+1') {
|
625
|
+
return [this.emojisList['+1']];
|
626
|
+
}
|
627
|
+
let values = value.toLowerCase().split(/[\s|,|\-|_]+/);
|
628
|
+
let allResults = [];
|
629
|
+
if (values.length > 2) {
|
630
|
+
values = [values[0], values[1]];
|
631
|
+
}
|
632
|
+
if (include.length || exclude.length) {
|
633
|
+
pool = {};
|
634
|
+
for (const category of categories$1 || []) {
|
635
|
+
const isIncluded = include && include.length ? include.indexOf(category.id) > -1 : true;
|
636
|
+
const isExcluded = exclude && exclude.length ? exclude.indexOf(category.id) > -1 : false;
|
637
|
+
if (!isIncluded || isExcluded) {
|
638
|
+
continue;
|
639
|
+
}
|
640
|
+
for (const emojiId of category.emojis || []) {
|
641
|
+
// Need to make sure that pool gets keyed
|
642
|
+
// with the correct id, which is why we call emojiService.getData below
|
643
|
+
const emoji = this.emojiService.getData(emojiId);
|
644
|
+
pool[emoji?.id ?? ''] = emoji;
|
645
|
+
}
|
646
|
+
}
|
647
|
+
if (custom.length) {
|
648
|
+
const customIsIncluded = include && include.length ? include.indexOf('custom') > -1 : true;
|
649
|
+
const customIsExcluded = exclude && exclude.length ? exclude.indexOf('custom') > -1 : false;
|
650
|
+
if (customIsIncluded && !customIsExcluded) {
|
651
|
+
this.addCustomToPool(custom, pool);
|
652
|
+
}
|
653
|
+
}
|
654
|
+
}
|
655
|
+
allResults = values
|
656
|
+
.map(v => {
|
657
|
+
let aPool = pool;
|
658
|
+
let aIndex = this.index;
|
659
|
+
let length = 0;
|
660
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
661
|
+
for (let charIndex = 0; charIndex < v.length; charIndex++) {
|
662
|
+
const char = v[charIndex];
|
663
|
+
length++;
|
664
|
+
if (!aIndex[char]) {
|
665
|
+
aIndex[char] = {};
|
666
|
+
}
|
667
|
+
aIndex = aIndex[char];
|
668
|
+
if (!aIndex.results) {
|
669
|
+
const scores = {};
|
670
|
+
aIndex.results = [];
|
671
|
+
aIndex.pool = {};
|
672
|
+
for (const id of Object.keys(aPool)) {
|
673
|
+
const emoji = aPool[id];
|
674
|
+
if (!this.emojiSearch[id]) {
|
675
|
+
this.emojiSearch[id] = this.buildSearch(emoji.short_names, emoji.name, emoji.id, emoji.keywords, emoji.emoticons);
|
676
|
+
}
|
677
|
+
const query = this.emojiSearch[id];
|
678
|
+
const sub = v.substr(0, length);
|
679
|
+
const subIndex = query.indexOf(sub);
|
680
|
+
if (subIndex !== -1) {
|
681
|
+
let score = subIndex + 1;
|
682
|
+
if (sub === id) {
|
683
|
+
score = 0;
|
684
|
+
}
|
685
|
+
aIndex.results.push(this.emojisList[id]);
|
686
|
+
aIndex.pool[id] = emoji;
|
687
|
+
scores[id] = score;
|
688
|
+
}
|
689
|
+
}
|
690
|
+
aIndex.results.sort((a, b) => {
|
691
|
+
const aScore = scores[a.id];
|
692
|
+
const bScore = scores[b.id];
|
693
|
+
return aScore - bScore;
|
694
|
+
});
|
695
|
+
}
|
696
|
+
aPool = aIndex.pool;
|
697
|
+
}
|
698
|
+
return aIndex.results;
|
699
|
+
})
|
700
|
+
.filter(a => a);
|
701
|
+
if (allResults.length > 1) {
|
702
|
+
results = intersect.apply(null, allResults);
|
703
|
+
}
|
704
|
+
else if (allResults.length) {
|
705
|
+
results = allResults[0];
|
706
|
+
}
|
707
|
+
else {
|
708
|
+
results = [];
|
709
|
+
}
|
710
|
+
}
|
711
|
+
if (results) {
|
712
|
+
if (emojisToShowFilter) {
|
713
|
+
results = results.filter((result) => {
|
714
|
+
if (result && result.id) {
|
715
|
+
return emojisToShowFilter(this.emojiService.names[result.id]);
|
716
|
+
}
|
717
|
+
return false;
|
718
|
+
});
|
719
|
+
}
|
720
|
+
if (results && results.length > maxResults) {
|
721
|
+
results = results.slice(0, maxResults);
|
722
|
+
}
|
723
|
+
}
|
724
|
+
return results || null;
|
725
|
+
}
|
726
|
+
buildSearch(shortNames, name, id, keywords, emoticons) {
|
727
|
+
const search = [];
|
728
|
+
const addToSearch = (strings, split) => {
|
729
|
+
if (!strings) {
|
730
|
+
return;
|
731
|
+
}
|
732
|
+
const arr = Array.isArray(strings) ? strings : [strings];
|
733
|
+
for (const str of arr) {
|
734
|
+
const substrings = split ? str.split(/[-|_|\s]+/) : [str];
|
735
|
+
for (let s of substrings) {
|
736
|
+
s = s.toLowerCase();
|
737
|
+
if (!search.includes(s)) {
|
738
|
+
search.push(s);
|
739
|
+
}
|
740
|
+
}
|
741
|
+
}
|
742
|
+
};
|
743
|
+
addToSearch(shortNames, true);
|
744
|
+
addToSearch(name, true);
|
745
|
+
addToSearch(id, true);
|
746
|
+
addToSearch(keywords, true);
|
747
|
+
addToSearch(emoticons, false);
|
748
|
+
return search.join(',');
|
749
|
+
}
|
750
|
+
}
|
751
|
+
EmojiSearch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: EmojiSearch, deps: [{ token: i1.EmojiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
752
|
+
EmojiSearch.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: EmojiSearch, providedIn: 'root' });
|
753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: EmojiSearch, decorators: [{
|
754
|
+
type: Injectable,
|
755
|
+
args: [{ providedIn: 'root' }]
|
756
|
+
}], ctorParameters: function () { return [{ type: i1.EmojiService }]; } });
|
757
|
+
|
758
|
+
class SkinComponent {
|
759
|
+
constructor() {
|
760
|
+
this.changeSkin = new EventEmitter();
|
761
|
+
this.opened = false;
|
762
|
+
this.skinTones = [1, 2, 3, 4, 5, 6];
|
763
|
+
}
|
764
|
+
toggleOpen() {
|
765
|
+
this.opened = !this.opened;
|
766
|
+
}
|
767
|
+
isSelected(skinTone) {
|
768
|
+
return skinTone === this.skin;
|
769
|
+
}
|
770
|
+
isVisible(skinTone) {
|
771
|
+
return this.opened || this.isSelected(skinTone);
|
772
|
+
}
|
773
|
+
pressed(skinTone) {
|
774
|
+
return this.opened ? !!this.isSelected(skinTone) : '';
|
775
|
+
}
|
776
|
+
tabIndex(skinTone) {
|
777
|
+
return this.isVisible(skinTone) ? '0' : '';
|
778
|
+
}
|
779
|
+
expanded(skinTone) {
|
780
|
+
return this.isSelected(skinTone) ? this.opened : '';
|
781
|
+
}
|
782
|
+
handleClick(skin) {
|
783
|
+
if (!this.opened) {
|
784
|
+
this.opened = true;
|
785
|
+
return;
|
786
|
+
}
|
787
|
+
this.opened = false;
|
788
|
+
if (skin !== this.skin) {
|
789
|
+
this.changeSkin.emit(skin);
|
790
|
+
}
|
791
|
+
}
|
792
|
+
}
|
793
|
+
SkinComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SkinComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
794
|
+
SkinComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: SkinComponent, selector: "emoji-skins", inputs: { skin: "skin", i18n: "i18n" }, outputs: { changeSkin: "changeSkin" }, ngImport: i0, template: `
|
795
|
+
<section
|
796
|
+
class="emoji-mart-skin-swatches"
|
797
|
+
[class.opened]="opened"
|
798
|
+
>
|
799
|
+
<span
|
800
|
+
*ngFor="let skinTone of skinTones"
|
801
|
+
class="emoji-mart-skin-swatch"
|
802
|
+
[class.selected]="skinTone === skin"
|
803
|
+
>
|
804
|
+
<span
|
805
|
+
(click)="handleClick(skinTone)"
|
806
|
+
(keyup.enter)="handleClick(skinTone)"
|
807
|
+
(keyup.space)="handleClick(skinTone)"
|
808
|
+
class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
|
809
|
+
role="button"
|
810
|
+
[tabIndex]="tabIndex(skinTone)"
|
811
|
+
[attr.aria-hidden]="!isVisible(skinTone)"
|
812
|
+
[attr.aria-pressed]="pressed(skinTone)"
|
813
|
+
[attr.aria-haspopup]="!!isSelected(skinTone)"
|
814
|
+
[attr.aria-expanded]="expanded(skinTone)"
|
815
|
+
[attr.aria-label]="i18n.skintones[skinTone]"
|
816
|
+
[title]="i18n.skintones[skinTone]"
|
817
|
+
></span>
|
818
|
+
</span>
|
819
|
+
</section>
|
820
|
+
`, isInline: true, directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SkinComponent, decorators: [{
|
822
|
+
type: Component,
|
823
|
+
args: [{
|
824
|
+
selector: 'emoji-skins',
|
825
|
+
template: `
|
826
|
+
<section
|
827
|
+
class="emoji-mart-skin-swatches"
|
828
|
+
[class.opened]="opened"
|
829
|
+
>
|
830
|
+
<span
|
831
|
+
*ngFor="let skinTone of skinTones"
|
832
|
+
class="emoji-mart-skin-swatch"
|
833
|
+
[class.selected]="skinTone === skin"
|
834
|
+
>
|
835
|
+
<span
|
836
|
+
(click)="handleClick(skinTone)"
|
837
|
+
(keyup.enter)="handleClick(skinTone)"
|
838
|
+
(keyup.space)="handleClick(skinTone)"
|
839
|
+
class="emoji-mart-skin emoji-mart-skin-tone-{{ skinTone }}"
|
840
|
+
role="button"
|
841
|
+
[tabIndex]="tabIndex(skinTone)"
|
842
|
+
[attr.aria-hidden]="!isVisible(skinTone)"
|
843
|
+
[attr.aria-pressed]="pressed(skinTone)"
|
844
|
+
[attr.aria-haspopup]="!!isSelected(skinTone)"
|
845
|
+
[attr.aria-expanded]="expanded(skinTone)"
|
846
|
+
[attr.aria-label]="i18n.skintones[skinTone]"
|
847
|
+
[title]="i18n.skintones[skinTone]"
|
848
|
+
></span>
|
849
|
+
</span>
|
850
|
+
</section>
|
851
|
+
`,
|
852
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
853
|
+
preserveWhitespaces: false,
|
854
|
+
}]
|
855
|
+
}], propDecorators: { skin: [{
|
856
|
+
type: Input
|
857
|
+
}], i18n: [{
|
858
|
+
type: Input
|
859
|
+
}], changeSkin: [{
|
860
|
+
type: Output
|
861
|
+
}] } });
|
862
|
+
|
863
|
+
class PreviewComponent {
|
864
|
+
constructor(ref, emojiService) {
|
865
|
+
this.ref = ref;
|
866
|
+
this.emojiService = emojiService;
|
867
|
+
this.skinChange = new EventEmitter();
|
868
|
+
this.emojiData = {};
|
869
|
+
}
|
870
|
+
ngOnChanges() {
|
871
|
+
if (!this.emoji) {
|
872
|
+
return;
|
873
|
+
}
|
874
|
+
this.emojiData = this.emojiService.getData(this.emoji, this.emojiSkin, this.emojiSet);
|
875
|
+
const knownEmoticons = [];
|
876
|
+
const listedEmoticons = [];
|
877
|
+
const emoitcons = this.emojiData.emoticons || [];
|
878
|
+
emoitcons.forEach((emoticon) => {
|
879
|
+
if (knownEmoticons.indexOf(emoticon.toLowerCase()) >= 0) {
|
880
|
+
return;
|
881
|
+
}
|
882
|
+
knownEmoticons.push(emoticon.toLowerCase());
|
883
|
+
listedEmoticons.push(emoticon);
|
884
|
+
});
|
885
|
+
this.listedEmoticons = listedEmoticons;
|
886
|
+
this.ref?.detectChanges();
|
887
|
+
}
|
888
|
+
}
|
889
|
+
PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PreviewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.EmojiService }], target: i0.ɵɵFactoryTarget.Component });
|
890
|
+
PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", 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: `
|
891
|
+
<div class="emoji-mart-preview" *ngIf="emoji && emojiData">
|
892
|
+
<div class="emoji-mart-preview-emoji">
|
893
|
+
<ngx-emoji
|
894
|
+
[emoji]="emoji"
|
895
|
+
[size]="38"
|
896
|
+
[isNative]="emojiIsNative"
|
897
|
+
[skin]="emojiSkin"
|
898
|
+
[size]="emojiSize"
|
899
|
+
[set]="emojiSet"
|
900
|
+
[sheetSize]="emojiSheetSize"
|
901
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
902
|
+
[imageUrlFn]="emojiImageUrlFn"
|
903
|
+
></ngx-emoji>
|
904
|
+
</div>
|
905
|
+
|
906
|
+
<div class="emoji-mart-preview-data">
|
907
|
+
<div class="emoji-mart-preview-name">{{ emojiData.name }}</div>
|
908
|
+
<div class="emoji-mart-preview-shortname">
|
909
|
+
<span
|
910
|
+
class="emoji-mart-preview-shortname"
|
911
|
+
*ngFor="let short_name of emojiData.shortNames"
|
912
|
+
>
|
913
|
+
:{{ short_name }}:
|
914
|
+
</span>
|
915
|
+
</div>
|
916
|
+
<div class="emoji-mart-preview-emoticons">
|
917
|
+
<span class="emoji-mart-preview-emoticon" *ngFor="let emoticon of listedEmoticons">
|
918
|
+
{{ emoticon }}
|
919
|
+
</span>
|
920
|
+
</div>
|
921
|
+
</div>
|
922
|
+
</div>
|
923
|
+
|
924
|
+
<div class="emoji-mart-preview" [hidden]="emoji">
|
925
|
+
<div class="emoji-mart-preview-emoji">
|
926
|
+
<ngx-emoji
|
927
|
+
*ngIf="idleEmoji && idleEmoji.length"
|
928
|
+
[isNative]="emojiIsNative"
|
929
|
+
[skin]="emojiSkin"
|
930
|
+
[set]="emojiSet"
|
931
|
+
[emoji]="idleEmoji"
|
932
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
933
|
+
[size]="38"
|
934
|
+
[imageUrlFn]="emojiImageUrlFn"
|
935
|
+
></ngx-emoji>
|
936
|
+
</div>
|
937
|
+
|
938
|
+
<div class="emoji-mart-preview-data">
|
939
|
+
<span class="emoji-mart-title-label">{{ title }}</span>
|
940
|
+
</div>
|
941
|
+
|
942
|
+
<div class="emoji-mart-preview-skins">
|
943
|
+
<emoji-skins
|
944
|
+
[skin]="emojiSkin"
|
945
|
+
(changeSkin)="skinChange.emit($event)"
|
946
|
+
[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.1.2", ngImport: i0, type: PreviewComponent, decorators: [{
|
952
|
+
type: Component,
|
953
|
+
args: [{
|
954
|
+
selector: 'emoji-preview',
|
955
|
+
template: `
|
956
|
+
<div class="emoji-mart-preview" *ngIf="emoji && emojiData">
|
957
|
+
<div class="emoji-mart-preview-emoji">
|
958
|
+
<ngx-emoji
|
959
|
+
[emoji]="emoji"
|
960
|
+
[size]="38"
|
961
|
+
[isNative]="emojiIsNative"
|
962
|
+
[skin]="emojiSkin"
|
963
|
+
[size]="emojiSize"
|
964
|
+
[set]="emojiSet"
|
965
|
+
[sheetSize]="emojiSheetSize"
|
966
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
967
|
+
[imageUrlFn]="emojiImageUrlFn"
|
968
|
+
></ngx-emoji>
|
969
|
+
</div>
|
970
|
+
|
971
|
+
<div class="emoji-mart-preview-data">
|
972
|
+
<div class="emoji-mart-preview-name">{{ emojiData.name }}</div>
|
973
|
+
<div class="emoji-mart-preview-shortname">
|
974
|
+
<span
|
975
|
+
class="emoji-mart-preview-shortname"
|
976
|
+
*ngFor="let short_name of emojiData.shortNames"
|
977
|
+
>
|
978
|
+
:{{ short_name }}:
|
979
|
+
</span>
|
980
|
+
</div>
|
981
|
+
<div class="emoji-mart-preview-emoticons">
|
982
|
+
<span class="emoji-mart-preview-emoticon" *ngFor="let emoticon of listedEmoticons">
|
983
|
+
{{ emoticon }}
|
984
|
+
</span>
|
985
|
+
</div>
|
986
|
+
</div>
|
987
|
+
</div>
|
988
|
+
|
989
|
+
<div class="emoji-mart-preview" [hidden]="emoji">
|
990
|
+
<div class="emoji-mart-preview-emoji">
|
991
|
+
<ngx-emoji
|
992
|
+
*ngIf="idleEmoji && idleEmoji.length"
|
993
|
+
[isNative]="emojiIsNative"
|
994
|
+
[skin]="emojiSkin"
|
995
|
+
[set]="emojiSet"
|
996
|
+
[emoji]="idleEmoji"
|
997
|
+
[backgroundImageFn]="emojiBackgroundImageFn"
|
998
|
+
[size]="38"
|
999
|
+
[imageUrlFn]="emojiImageUrlFn"
|
1000
|
+
></ngx-emoji>
|
1001
|
+
</div>
|
1002
|
+
|
1003
|
+
<div class="emoji-mart-preview-data">
|
1004
|
+
<span class="emoji-mart-title-label">{{ title }}</span>
|
1005
|
+
</div>
|
1006
|
+
|
1007
|
+
<div class="emoji-mart-preview-skins">
|
1008
|
+
<emoji-skins
|
1009
|
+
[skin]="emojiSkin"
|
1010
|
+
(changeSkin)="skinChange.emit($event)"
|
1011
|
+
[i18n]="i18n"
|
1012
|
+
></emoji-skins>
|
1013
|
+
</div>
|
1014
|
+
</div>
|
1015
|
+
`,
|
1016
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
1017
|
+
preserveWhitespaces: false,
|
1018
|
+
}]
|
1019
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.EmojiService }]; }, propDecorators: { title: [{
|
1020
|
+
type: Input
|
1021
|
+
}], emoji: [{
|
1022
|
+
type: Input
|
1023
|
+
}], idleEmoji: [{
|
1024
|
+
type: Input
|
1025
|
+
}], i18n: [{
|
1026
|
+
type: Input
|
1027
|
+
}], emojiIsNative: [{
|
1028
|
+
type: Input
|
1029
|
+
}], emojiSkin: [{
|
1030
|
+
type: Input
|
1031
|
+
}], emojiSize: [{
|
1032
|
+
type: Input
|
1033
|
+
}], emojiSet: [{
|
1034
|
+
type: Input
|
1035
|
+
}], emojiSheetSize: [{
|
1036
|
+
type: Input
|
1037
|
+
}], emojiBackgroundImageFn: [{
|
1038
|
+
type: Input
|
1039
|
+
}], emojiImageUrlFn: [{
|
1040
|
+
type: Input
|
1041
|
+
}], skinChange: [{
|
1042
|
+
type: Output
|
1043
|
+
}] } });
|
1044
|
+
|
1045
|
+
let id = 0;
|
1046
|
+
class SearchComponent {
|
1047
|
+
constructor(emojiSearch) {
|
1048
|
+
this.emojiSearch = emojiSearch;
|
1049
|
+
this.maxResults = 75;
|
1050
|
+
this.autoFocus = false;
|
1051
|
+
this.include = [];
|
1052
|
+
this.exclude = [];
|
1053
|
+
this.custom = [];
|
1054
|
+
this.searchResults = new EventEmitter();
|
1055
|
+
this.enterKey = new EventEmitter();
|
1056
|
+
this.isSearching = false;
|
1057
|
+
this.query = '';
|
1058
|
+
this.inputId = `emoji-mart-search-${++id}`;
|
1059
|
+
}
|
1060
|
+
ngOnInit() {
|
1061
|
+
this.icon = this.icons.search;
|
1062
|
+
}
|
1063
|
+
ngAfterViewInit() {
|
1064
|
+
if (this.autoFocus) {
|
1065
|
+
this.inputRef.nativeElement.focus();
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
clear() {
|
1069
|
+
this.query = '';
|
1070
|
+
this.handleSearch('');
|
1071
|
+
this.inputRef.nativeElement.focus();
|
1072
|
+
}
|
1073
|
+
handleEnterKey($event) {
|
1074
|
+
if (!this.query) {
|
1075
|
+
return;
|
1076
|
+
}
|
1077
|
+
this.enterKey.emit($event);
|
1078
|
+
$event.preventDefault();
|
1079
|
+
}
|
1080
|
+
handleSearch(value) {
|
1081
|
+
if (value === '') {
|
1082
|
+
this.icon = this.icons.search;
|
1083
|
+
this.isSearching = false;
|
1084
|
+
}
|
1085
|
+
else {
|
1086
|
+
this.icon = this.icons.delete;
|
1087
|
+
this.isSearching = true;
|
1088
|
+
}
|
1089
|
+
const emojis = this.emojiSearch.search(this.query, this.emojisToShowFilter, this.maxResults, this.include, this.exclude, this.custom);
|
1090
|
+
this.searchResults.emit(emojis);
|
1091
|
+
}
|
1092
|
+
handleChange() {
|
1093
|
+
this.handleSearch(this.query);
|
1094
|
+
}
|
1095
|
+
}
|
1096
|
+
SearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SearchComponent, deps: [{ token: EmojiSearch }], target: i0.ɵɵFactoryTarget.Component });
|
1097
|
+
SearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", 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: `
|
1098
|
+
<div class="emoji-mart-search">
|
1099
|
+
<input
|
1100
|
+
[id]="inputId"
|
1101
|
+
#inputRef
|
1102
|
+
type="search"
|
1103
|
+
(keyup.enter)="handleEnterKey($event)"
|
1104
|
+
[placeholder]="i18n.search"
|
1105
|
+
[autofocus]="autoFocus"
|
1106
|
+
[(ngModel)]="query"
|
1107
|
+
(ngModelChange)="handleChange()"
|
1108
|
+
/>
|
1109
|
+
<!--
|
1110
|
+
Use a <label> in addition to the placeholder for accessibility, but place it off-screen
|
1111
|
+
http://www.maxability.co.in/2016/01/placeholder-attribute-and-why-it-is-not-accessible/
|
1112
|
+
-->
|
1113
|
+
<label class="emoji-mart-sr-only" [htmlFor]="inputId">
|
1114
|
+
{{ i18n.search }}
|
1115
|
+
</label>
|
1116
|
+
<button
|
1117
|
+
type="button"
|
1118
|
+
class="emoji-mart-search-icon"
|
1119
|
+
(click)="clear()"
|
1120
|
+
(keyup.enter)="clear()"
|
1121
|
+
[disabled]="!isSearching"
|
1122
|
+
[attr.aria-label]="i18n.clear"
|
1123
|
+
>
|
1124
|
+
<svg
|
1125
|
+
xmlns="http://www.w3.org/2000/svg"
|
1126
|
+
viewBox="0 0 20 20"
|
1127
|
+
width="13"
|
1128
|
+
height="13"
|
1129
|
+
opacity="0.5"
|
1130
|
+
>
|
1131
|
+
<path [attr.d]="icon" />
|
1132
|
+
</svg>
|
1133
|
+
</button>
|
1134
|
+
</div>
|
1135
|
+
`, 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"] }] });
|
1136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SearchComponent, decorators: [{
|
1137
|
+
type: Component,
|
1138
|
+
args: [{
|
1139
|
+
selector: 'emoji-search',
|
1140
|
+
template: `
|
1141
|
+
<div class="emoji-mart-search">
|
1142
|
+
<input
|
1143
|
+
[id]="inputId"
|
1144
|
+
#inputRef
|
1145
|
+
type="search"
|
1146
|
+
(keyup.enter)="handleEnterKey($event)"
|
1147
|
+
[placeholder]="i18n.search"
|
1148
|
+
[autofocus]="autoFocus"
|
1149
|
+
[(ngModel)]="query"
|
1150
|
+
(ngModelChange)="handleChange()"
|
1151
|
+
/>
|
1152
|
+
<!--
|
1153
|
+
Use a <label> in addition to the placeholder for accessibility, but place it off-screen
|
1154
|
+
http://www.maxability.co.in/2016/01/placeholder-attribute-and-why-it-is-not-accessible/
|
1155
|
+
-->
|
1156
|
+
<label class="emoji-mart-sr-only" [htmlFor]="inputId">
|
1157
|
+
{{ i18n.search }}
|
1158
|
+
</label>
|
1159
|
+
<button
|
1160
|
+
type="button"
|
1161
|
+
class="emoji-mart-search-icon"
|
1162
|
+
(click)="clear()"
|
1163
|
+
(keyup.enter)="clear()"
|
1164
|
+
[disabled]="!isSearching"
|
1165
|
+
[attr.aria-label]="i18n.clear"
|
1166
|
+
>
|
1167
|
+
<svg
|
1168
|
+
xmlns="http://www.w3.org/2000/svg"
|
1169
|
+
viewBox="0 0 20 20"
|
1170
|
+
width="13"
|
1171
|
+
height="13"
|
1172
|
+
opacity="0.5"
|
1173
|
+
>
|
1174
|
+
<path [attr.d]="icon" />
|
1175
|
+
</svg>
|
1176
|
+
</button>
|
1177
|
+
</div>
|
1178
|
+
`,
|
1179
|
+
preserveWhitespaces: false,
|
1180
|
+
}]
|
1181
|
+
}], ctorParameters: function () { return [{ type: EmojiSearch }]; }, propDecorators: { maxResults: [{
|
1182
|
+
type: Input
|
1183
|
+
}], autoFocus: [{
|
1184
|
+
type: Input
|
1185
|
+
}], i18n: [{
|
1186
|
+
type: Input
|
1187
|
+
}], include: [{
|
1188
|
+
type: Input
|
1189
|
+
}], exclude: [{
|
1190
|
+
type: Input
|
1191
|
+
}], custom: [{
|
1192
|
+
type: Input
|
1193
|
+
}], icons: [{
|
1194
|
+
type: Input
|
1195
|
+
}], emojisToShowFilter: [{
|
1196
|
+
type: Input
|
1197
|
+
}], searchResults: [{
|
1198
|
+
type: Output
|
1199
|
+
}], enterKey: [{
|
1200
|
+
type: Output
|
1201
|
+
}], inputRef: [{
|
1202
|
+
type: ViewChild,
|
1203
|
+
args: ['inputRef', { static: true }]
|
1204
|
+
}] } });
|
1205
|
+
|
1206
|
+
/* eslint-disable max-len */
|
1207
|
+
const categories = {
|
1208
|
+
activity: `M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24m10 11h-5c.3-2.5 1.3-4.8 2-6.1a10 10 0 0 1 3 6.1m-9 0V2a10 10 0 0 1 4.4 1.6A18 18 0 0 0 15 11h-2zm-2 0H9a18 18 0 0 0-2.4-7.4A10 10 0 0 1 11 2.1V11zm0 2v9a10 10 0 0 1-4.4-1.6A18 18 0 0 0 9 13h2zm4 0a18 18 0 0 0 2.4 7.4 10 10 0 0 1-4.4 1.5V13h2zM5 4.9c.7 1.3 1.7 3.6 2 6.1H2a10 10 0 0 1 3-6.1M2 13h5c-.3 2.5-1.3 4.8-2 6.1A10 10 0 0 1 2 13m17 6.1c-.7-1.3-1.7-3.6-2-6.1h5a10 10 0 0 1-3 6.1`,
|
1209
|
+
custom: `M10 1h3v21h-3zm10.186 4l1.5 2.598L3.5 18.098 2 15.5zM2 7.598L3.5 5l18.186 10.5-1.5 2.598z`,
|
1210
|
+
flags: `M0 0l6 24h2L2 0zm21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.6 3h7.8l2 8H8.6l-2-8zm8.8 10l-2.9 1.9-.4-1.9h3.3zm3.6 0l-1.5-6h2l2 8H16l3-2z`,
|
1211
|
+
foods: `M17 5c-1.8 0-2.9.4-3.7 1 .5-1.3 1.8-3 4.7-3a1 1 0 0 0 0-2c-3 0-4.6 1.3-5.5 2.5l-.2.2c-.6-1.9-1.5-3.7-3-3.7C8.5 0 7.7.3 7 1c-2 1.5-1.7 2.9-.5 4C3.6 5.2 0 7.4 0 13c0 4.6 5 11 9 11 2 0 2.4-.5 3-1 .6.5 1 1 3 1 4 0 9-6.4 9-11 0-6-4-8-7-8M8.2 2.5c.7-.5 1-.5 1-.5.4.2 1 1.4 1.4 3-1.6-.6-2.8-1.3-3-1.8l.6-.7M15 22c-1 0-1.2-.1-1.6-.4l-.1-.2a2 2 0 0 0-2.6 0l-.1.2c-.4.3-.5.4-1.6.4-2.8 0-7-5.4-7-9 0-6 4.5-6 5-6 2 0 2.5.4 3.4 1.2l.3.3a2 2 0 0 0 2.6 0l.3-.3c1-.8 1.5-1.2 3.4-1.2.5 0 5 .1 5 6 0 3.6-4.2 9-7 9`,
|
1212
|
+
nature: `M15.5 8a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m-7 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m10.43-8h-.02c-.97 0-2.14.79-3.02 1.5A13.88 13.88 0 0 0 12 .99c-1.28 0-2.62.13-3.87.51C7.24.8 6.07 0 5.09 0h-.02C3.35 0 .07 2.67 0 7.03c-.04 2.47.28 4.23 1.04 5 .26.27.88.69 1.3.9.19 3.17.92 5.23 2.53 6.37.9.64 2.19.95 3.2 1.1-.03.2-.07.4-.07.6 0 1.77 2.35 3 4 3s4-1.23 4-3c0-.2-.04-.4-.07-.59 2.57-.38 5.43-1.87 5.92-7.58.4-.22.89-.57 1.1-.8.77-.76 1.09-2.52 1.05-5C23.93 2.67 20.65 0 18.93 0M3.23 9.13c-.24.29-.84 1.16-.9 1.24A9.67 9.67 0 0 1 2 7.08c.05-3.28 2.48-4.97 3.1-5.03.25.02.72.27 1.26.65A7.95 7.95 0 0 0 4 7.82c-.14.55-.4.86-.79 1.31M12 22c-.9 0-1.95-.7-2-1 0-.65.47-1.24 1-1.6v.6a1 1 0 1 0 2 0v-.6c.52.36 1 .95 1 1.6-.05.3-1.1 1-2 1m3-3.48v.02a4.75 4.75 0 0 0-1.26-1.02c1.09-.52 2.24-1.33 2.24-2.22 0-1.84-1.78-2.2-3.98-2.2s-3.98.36-3.98 2.2c0 .89 1.15 1.7 2.24 2.22A4.8 4.8 0 0 0 9 18.54v-.03a6.1 6.1 0 0 1-2.97-.84c-1.3-.92-1.84-3.04-1.86-6.48l.03-.04c.5-.82 1.49-1.45 1.8-3.1C6 6 7.36 4.42 8.36 3.53c1.01-.35 2.2-.53 3.59-.53 1.45 0 2.68.2 3.73.57 1 .9 2.32 2.46 2.32 4.48.31 1.65 1.3 2.27 1.8 3.1l.1.18c-.06 5.97-1.95 7.01-4.9 7.19m6.63-8.2l-.11-.2a7.59 7.59 0 0 0-.74-.98 3.02 3.02 0 0 1-.79-1.32 7.93 7.93 0 0 0-2.35-5.12c.53-.38 1-.63 1.26-.65.64.07 3.05 1.77 3.1 5.03.02 1.81-.35 3.22-.37 3.24`,
|
1213
|
+
objects: `M12 0a9 9 0 0 0-5 16.5V21s2 3 5 3 5-3 5-3v-4.5A9 9 0 0 0 12 0zm0 2a7 7 0 1 1 0 14 7 7 0 0 1 0-14zM9 17.5a9 9 0 0 0 6 0v.8a7 7 0 0 1-3 .7 7 7 0 0 1-3-.7v-.8zm.2 3a8.9 8.9 0 0 0 2.8.5c1 0 1.9-.2 2.8-.5-.6.7-1.6 1.5-2.8 1.5-1.1 0-2.1-.8-2.8-1.5zm5.5-8.1c-.8 0-1.1-.8-1.5-1.8-.5-1-.7-1.5-1.2-1.5s-.8.5-1.3 1.5c-.4 1-.8 1.8-1.6 1.8h-.3c-.5-.2-.8-.7-1.3-1.8l-.2-1A3 3 0 0 0 7 9a1 1 0 0 1 0-2c1.7 0 2 1.4 2.2 2.1.5-1 1.3-2 2.8-2 1.5 0 2.3 1.1 2.7 2.1.2-.8.6-2.2 2.3-2.2a1 1 0 1 1 0 2c-.2 0-.3.5-.3.7a6.5 6.5 0 0 1-.3 1c-.5 1-.8 1.7-1.7 1.7`,
|
1214
|
+
people: `M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24m0 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20M8 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4m8 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-.8 8c-.7 1.2-1.8 2-3.3 2-1.5 0-2.7-.8-3.4-2H15m3-2H6a6 6 0 1 0 12 0`,
|
1215
|
+
places: `M6.5 12a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5m11-3a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5m5-5.5l-1-.4-.1-.1h.6c.6 0 1-.4 1-1 0-1-.9-2-2-2h-.6l-.8-1.7A3 3 0 0 0 16.8 2H7.2a3 3 0 0 0-2.8 2.3L3.6 6H3a2 2 0 0 0-2 2c0 .6.4 1 1 1h.6v.1l-1 .4a2 2 0 0 0-1.4 2l.7 7.6a1 1 0 0 0 1 .9H3v1c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2v-1h6v1c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2v-1h1.1a1 1 0 0 0 1-.9l.7-7.5a2 2 0 0 0-1.3-2.1M6.3 4.9c.1-.5.5-.9 1-.9h9.5c.4 0 .8.4 1 .9L19.2 9H4.7l1.6-4.1zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.2-3H2.8l-.7-6.6.9-.4h18l.9.4-.7 6.6z`,
|
1216
|
+
recent: `M13 4h-2v7H9v2h2v2h2v-2h4v-2h-4zm-1-4a12 12 0 1 0 0 24 12 12 0 0 0 0-24m0 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20`,
|
1217
|
+
symbols: `M0 0h11v2H0zm4 11h3V6h4V4H0v2h4zm11.5 6a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5m0-2.99a.5.5 0 0 1 0 .99c-.28 0-.5-.22-.5-.5s.22-.49.5-.49m6 5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 2.99a.5.5 0 0 1-.5-.5.5.5 0 0 1 1 .01.5.5 0 0 1-.5.49m.5-9l-9 9 1.51 1.5 9-9zm-5-2c2.2 0 4-1.12 4-2.5V2s.98-.16 1.5.95C23 4.05 23 6 23 6s1-1.12 1-3.13C24-.02 21 0 21 0h-2v6.35A5.85 5.85 0 0 0 17 6c-2.2 0-4 1.12-4 2.5s1.8 2.5 4 2.5m-6.7 9.48L8.82 18.9a47.54 47.54 0 0 1-1.44 1.13c-.3-.3-.99-1.02-2.04-2.19.9-.83 1.47-1.46 1.72-1.89s.38-.87.38-1.33c0-.6-.27-1.18-.82-1.76-.54-.58-1.33-.87-2.35-.87-1 0-1.79.29-2.34.87-.56.6-.83 1.18-.83 1.79 0 .81.42 1.75 1.25 2.8a6.57 6.57 0 0 0-1.8 1.79 3.46 3.46 0 0 0-.51 1.83c0 .86.3 1.56.92 2.1a3.5 3.5 0 0 0 2.42.83c1.17 0 2.44-.38 3.81-1.14L8.23 24h2.82l-2.09-2.38 1.34-1.14zM3.56 14.1a1.02 1.02 0 0 1 .73-.28c.31 0 .56.08.75.25a.85.85 0 0 1 .28.66c0 .52-.42 1.11-1.26 1.78-.53-.65-.8-1.23-.8-1.74a.9.9 0 0 1 .3-.67m.18 7.9c-.43 0-.78-.12-1.06-.35-.28-.23-.41-.49-.41-.76 0-.6.5-1.3 1.52-2.09a31.23 31.23 0 0 0 2.25 2.44c-.92.5-1.69.76-2.3.76`,
|
1218
|
+
};
|
1219
|
+
const search = {
|
1220
|
+
search: `M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z`,
|
1221
|
+
delete: `M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z`,
|
1222
|
+
};
|
1223
|
+
|
1224
|
+
const I18N = {
|
1225
|
+
search: 'Search',
|
1226
|
+
emojilist: 'List of emoji',
|
1227
|
+
notfound: 'No Emoji Found',
|
1228
|
+
clear: 'Clear',
|
1229
|
+
categories: {
|
1230
|
+
search: 'Search Results',
|
1231
|
+
recent: 'Frequently Used',
|
1232
|
+
people: 'Smileys & People',
|
1233
|
+
nature: 'Animals & Nature',
|
1234
|
+
foods: 'Food & Drink',
|
1235
|
+
activity: 'Activity',
|
1236
|
+
places: 'Travel & Places',
|
1237
|
+
objects: 'Objects',
|
1238
|
+
symbols: 'Symbols',
|
1239
|
+
flags: 'Flags',
|
1240
|
+
custom: 'Custom',
|
1241
|
+
},
|
1242
|
+
skintones: {
|
1243
|
+
1: 'Default Skin Tone',
|
1244
|
+
2: 'Light Skin Tone',
|
1245
|
+
3: 'Medium-Light Skin Tone',
|
1246
|
+
4: 'Medium Skin Tone',
|
1247
|
+
5: 'Medium-Dark Skin Tone',
|
1248
|
+
6: 'Dark Skin Tone',
|
1249
|
+
},
|
1250
|
+
};
|
1251
|
+
class PickerComponent {
|
1252
|
+
constructor(ngZone, renderer, ref, frequently, platformId) {
|
1253
|
+
this.ngZone = ngZone;
|
1254
|
+
this.renderer = renderer;
|
1255
|
+
this.ref = ref;
|
1256
|
+
this.frequently = frequently;
|
1257
|
+
this.platformId = platformId;
|
1258
|
+
this.perLine = 9;
|
1259
|
+
this.totalFrequentLines = 4;
|
1260
|
+
this.i18n = {};
|
1261
|
+
this.style = {};
|
1262
|
+
this.title = 'Emoji Mart™';
|
1263
|
+
this.emoji = 'department_store';
|
1264
|
+
this.darkMode = !!(typeof matchMedia === 'function' && matchMedia('(prefers-color-scheme: dark)').matches);
|
1265
|
+
this.color = '#ae65c5';
|
1266
|
+
this.hideObsolete = true;
|
1267
|
+
/** all categories shown */
|
1268
|
+
this.categories = [];
|
1269
|
+
/** used to temporarily draw categories */
|
1270
|
+
this.activeCategories = [];
|
1271
|
+
this.set = 'apple';
|
1272
|
+
this.skin = 1;
|
1273
|
+
/** Renders the native unicode emoji */
|
1274
|
+
this.isNative = false;
|
1275
|
+
this.emojiSize = 24;
|
1276
|
+
this.sheetSize = 64;
|
1277
|
+
this.showPreview = true;
|
1278
|
+
this.emojiTooltip = false;
|
1279
|
+
this.autoFocus = false;
|
1280
|
+
this.custom = [];
|
1281
|
+
this.hideRecent = true;
|
1282
|
+
this.notFoundEmoji = 'sleuth_or_spy';
|
1283
|
+
this.categoriesIcons = categories;
|
1284
|
+
this.searchIcons = search;
|
1285
|
+
this.useButton = false;
|
1286
|
+
this.enableFrequentEmojiSort = false;
|
1287
|
+
this.enableSearch = true;
|
1288
|
+
this.showSingleCategory = false;
|
1289
|
+
this.virtualize = false;
|
1290
|
+
this.virtualizeOffset = 0;
|
1291
|
+
this.emojiClick = new EventEmitter();
|
1292
|
+
this.emojiSelect = new EventEmitter();
|
1293
|
+
this.skinChange = new EventEmitter();
|
1294
|
+
this.scrollHeight = 0;
|
1295
|
+
this.clientHeight = 0;
|
1296
|
+
this.clientWidth = 0;
|
1297
|
+
this.firstRender = true;
|
1298
|
+
this.animationFrameRequestId = null;
|
1299
|
+
this.NAMESPACE = 'emoji-mart';
|
1300
|
+
this.measureScrollbar = 0;
|
1301
|
+
this.RECENT_CATEGORY = {
|
1302
|
+
id: 'recent',
|
1303
|
+
name: 'Recent',
|
1304
|
+
emojis: null,
|
1305
|
+
};
|
1306
|
+
this.SEARCH_CATEGORY = {
|
1307
|
+
id: 'search',
|
1308
|
+
name: 'Search',
|
1309
|
+
emojis: null,
|
1310
|
+
anchor: false,
|
1311
|
+
};
|
1312
|
+
this.CUSTOM_CATEGORY = {
|
1313
|
+
id: 'custom',
|
1314
|
+
name: 'Custom',
|
1315
|
+
emojis: [],
|
1316
|
+
};
|
1317
|
+
this.backgroundImageFn = (set, sheetSize) => `https://unpkg.com/emoji-datasource-${this.set}@6.0.1/img/${this.set}/sheets-256/${this.sheetSize}.png`;
|
1318
|
+
}
|
1319
|
+
ngOnInit() {
|
1320
|
+
// measure scroll
|
1321
|
+
this.measureScrollbar = measureScrollbar();
|
1322
|
+
this.i18n = { ...I18N, ...this.i18n };
|
1323
|
+
this.i18n.categories = { ...I18N.categories, ...this.i18n.categories };
|
1324
|
+
this.skin =
|
1325
|
+
JSON.parse((isPlatformBrowser(this.platformId) && localStorage.getItem(`${this.NAMESPACE}.skin`)) ||
|
1326
|
+
'null') || this.skin;
|
1327
|
+
const allCategories = [...categories$1];
|
1328
|
+
if (this.custom.length > 0) {
|
1329
|
+
this.CUSTOM_CATEGORY.emojis = this.custom.map(emoji => {
|
1330
|
+
return {
|
1331
|
+
...emoji,
|
1332
|
+
// `<Category />` expects emoji to have an `id`.
|
1333
|
+
id: emoji.shortNames[0],
|
1334
|
+
custom: true,
|
1335
|
+
};
|
1336
|
+
});
|
1337
|
+
allCategories.push(this.CUSTOM_CATEGORY);
|
1338
|
+
}
|
1339
|
+
if (this.include !== undefined) {
|
1340
|
+
allCategories.sort((a, b) => {
|
1341
|
+
if (this.include.indexOf(a.id) > this.include.indexOf(b.id)) {
|
1342
|
+
return 1;
|
1343
|
+
}
|
1344
|
+
return -1;
|
1345
|
+
});
|
1346
|
+
}
|
1347
|
+
for (const category of allCategories) {
|
1348
|
+
const isIncluded = this.include && this.include.length ? this.include.indexOf(category.id) > -1 : true;
|
1349
|
+
const isExcluded = this.exclude && this.exclude.length ? this.exclude.indexOf(category.id) > -1 : false;
|
1350
|
+
if (!isIncluded || isExcluded) {
|
1351
|
+
continue;
|
1352
|
+
}
|
1353
|
+
if (this.emojisToShowFilter) {
|
1354
|
+
const newEmojis = [];
|
1355
|
+
const { emojis } = category;
|
1356
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
1357
|
+
for (let emojiIndex = 0; emojiIndex < emojis.length; emojiIndex++) {
|
1358
|
+
const emoji = emojis[emojiIndex];
|
1359
|
+
if (this.emojisToShowFilter(emoji)) {
|
1360
|
+
newEmojis.push(emoji);
|
1361
|
+
}
|
1362
|
+
}
|
1363
|
+
if (newEmojis.length) {
|
1364
|
+
const newCategory = {
|
1365
|
+
emojis: newEmojis,
|
1366
|
+
name: category.name,
|
1367
|
+
id: category.id,
|
1368
|
+
};
|
1369
|
+
this.categories.push(newCategory);
|
1370
|
+
}
|
1371
|
+
}
|
1372
|
+
else {
|
1373
|
+
this.categories.push(category);
|
1374
|
+
}
|
1375
|
+
this.categoriesIcons = { ...categories, ...this.categoriesIcons };
|
1376
|
+
this.searchIcons = { ...search, ...this.searchIcons };
|
1377
|
+
}
|
1378
|
+
const includeRecent = this.include && this.include.length
|
1379
|
+
? this.include.indexOf(this.RECENT_CATEGORY.id) > -1
|
1380
|
+
: true;
|
1381
|
+
const excludeRecent = this.exclude && this.exclude.length
|
1382
|
+
? this.exclude.indexOf(this.RECENT_CATEGORY.id) > -1
|
1383
|
+
: false;
|
1384
|
+
if (includeRecent && !excludeRecent) {
|
1385
|
+
this.hideRecent = false;
|
1386
|
+
this.categories.unshift(this.RECENT_CATEGORY);
|
1387
|
+
}
|
1388
|
+
if (this.categories[0]) {
|
1389
|
+
this.categories[0].first = true;
|
1390
|
+
}
|
1391
|
+
this.categories.unshift(this.SEARCH_CATEGORY);
|
1392
|
+
this.selected = this.categories.filter(category => category.first)[0].name;
|
1393
|
+
// Need to be careful if small number of categories
|
1394
|
+
const categoriesToLoadFirst = Math.min(this.categories.length, 3);
|
1395
|
+
this.setActiveCategories((this.activeCategories = this.categories.slice(0, categoriesToLoadFirst)));
|
1396
|
+
// Trim last active category
|
1397
|
+
const lastActiveCategoryEmojis = this.categories[categoriesToLoadFirst - 1].emojis.slice();
|
1398
|
+
this.categories[categoriesToLoadFirst - 1].emojis = lastActiveCategoryEmojis.slice(0, 60);
|
1399
|
+
setTimeout(() => {
|
1400
|
+
// Restore last category
|
1401
|
+
this.categories[categoriesToLoadFirst - 1].emojis = lastActiveCategoryEmojis;
|
1402
|
+
this.setActiveCategories(this.categories);
|
1403
|
+
// The `setTimeout` will trigger the change detection, but since we're inside
|
1404
|
+
// the OnPush component we can run change detection locally starting from this
|
1405
|
+
// component and going down to the children.
|
1406
|
+
this.ref.detectChanges();
|
1407
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
1408
|
+
isPlatformBrowser(this.platformId) &&
|
1409
|
+
this.ngZone.runOutsideAngular(() => {
|
1410
|
+
// The `updateCategoriesSize` doesn't change properties that are used
|
1411
|
+
// in templates, thus this is run in the context of the root zone to avoid
|
1412
|
+
// running change detection.
|
1413
|
+
requestAnimationFrame(() => {
|
1414
|
+
this.updateCategoriesSize();
|
1415
|
+
});
|
1416
|
+
});
|
1417
|
+
});
|
1418
|
+
this.ngZone.runOutsideAngular(() => {
|
1419
|
+
// DOM events that are listened by Angular inside the template trigger change detection
|
1420
|
+
// and also wrapped into additional functions that call `markForCheck()`. We listen `scroll`
|
1421
|
+
// in the context of the root zone since it will not trigger change detection each time
|
1422
|
+
// the `scroll` event is dispatched.
|
1423
|
+
this.scrollListener = this.renderer.listen(this.scrollRef.nativeElement, 'scroll', () => {
|
1424
|
+
this.handleScroll();
|
1425
|
+
});
|
1426
|
+
});
|
1427
|
+
}
|
1428
|
+
ngOnDestroy() {
|
1429
|
+
this.scrollListener?.();
|
1430
|
+
// This is called here because the component might be destroyed
|
1431
|
+
// but there will still be a `requestAnimationFrame` callback in the queue
|
1432
|
+
// that calls `detectChanges()` on the `ViewRef`. This will lead to a runtime
|
1433
|
+
// exception if the `detectChanges()` is called after the `ViewRef` is destroyed.
|
1434
|
+
this.cancelAnimationFrame();
|
1435
|
+
}
|
1436
|
+
setActiveCategories(categoriesToMakeActive) {
|
1437
|
+
if (this.showSingleCategory) {
|
1438
|
+
this.activeCategories = categoriesToMakeActive.filter(x => x.name === this.selected || x === this.SEARCH_CATEGORY);
|
1439
|
+
}
|
1440
|
+
else {
|
1441
|
+
this.activeCategories = categoriesToMakeActive;
|
1442
|
+
}
|
1443
|
+
}
|
1444
|
+
updateCategoriesSize() {
|
1445
|
+
this.categoryRefs.forEach(component => component.memoizeSize());
|
1446
|
+
if (this.scrollRef) {
|
1447
|
+
const target = this.scrollRef.nativeElement;
|
1448
|
+
this.scrollHeight = target.scrollHeight;
|
1449
|
+
this.clientHeight = target.clientHeight;
|
1450
|
+
this.clientWidth = target.clientWidth;
|
1451
|
+
}
|
1452
|
+
}
|
1453
|
+
handleAnchorClick($event) {
|
1454
|
+
this.updateCategoriesSize();
|
1455
|
+
this.selected = $event.category.name;
|
1456
|
+
this.setActiveCategories(this.categories);
|
1457
|
+
if (this.SEARCH_CATEGORY.emojis) {
|
1458
|
+
this.handleSearch(null);
|
1459
|
+
this.searchRef?.clear();
|
1460
|
+
this.handleAnchorClick($event);
|
1461
|
+
return;
|
1462
|
+
}
|
1463
|
+
const component = this.categoryRefs.find(n => n.id === $event.category.id);
|
1464
|
+
if (component) {
|
1465
|
+
let { top } = component;
|
1466
|
+
if ($event.category.first) {
|
1467
|
+
top = 0;
|
1468
|
+
}
|
1469
|
+
else {
|
1470
|
+
top += 1;
|
1471
|
+
}
|
1472
|
+
this.scrollRef.nativeElement.scrollTop = top;
|
1473
|
+
}
|
1474
|
+
this.nextScroll = $event.category.name;
|
1475
|
+
// handle component scrolling to load emojis
|
1476
|
+
for (const category of this.categories) {
|
1477
|
+
const componentToScroll = this.categoryRefs.find(({ id }) => id === category.id);
|
1478
|
+
componentToScroll?.handleScroll(this.scrollRef.nativeElement.scrollTop);
|
1479
|
+
}
|
1480
|
+
}
|
1481
|
+
categoryTrack(index, item) {
|
1482
|
+
return item.id;
|
1483
|
+
}
|
1484
|
+
handleScroll(noSelectionChange = false) {
|
1485
|
+
if (this.nextScroll) {
|
1486
|
+
this.selected = this.nextScroll;
|
1487
|
+
this.nextScroll = undefined;
|
1488
|
+
this.ref.detectChanges();
|
1489
|
+
return;
|
1490
|
+
}
|
1491
|
+
if (!this.scrollRef) {
|
1492
|
+
return;
|
1493
|
+
}
|
1494
|
+
if (this.showSingleCategory) {
|
1495
|
+
return;
|
1496
|
+
}
|
1497
|
+
let activeCategory;
|
1498
|
+
if (this.SEARCH_CATEGORY.emojis) {
|
1499
|
+
activeCategory = this.SEARCH_CATEGORY;
|
1500
|
+
}
|
1501
|
+
else {
|
1502
|
+
const target = this.scrollRef.nativeElement;
|
1503
|
+
// check scroll is not at bottom
|
1504
|
+
if (target.scrollTop === 0) {
|
1505
|
+
// hit the TOP
|
1506
|
+
activeCategory = this.categories.find(n => n.first === true);
|
1507
|
+
}
|
1508
|
+
else if (target.scrollHeight - target.scrollTop === this.clientHeight) {
|
1509
|
+
// scrolled to bottom activate last category
|
1510
|
+
activeCategory = this.categories[this.categories.length - 1];
|
1511
|
+
}
|
1512
|
+
else {
|
1513
|
+
// scrolling
|
1514
|
+
for (const category of this.categories) {
|
1515
|
+
const component = this.categoryRefs.find(({ id }) => id === category.id);
|
1516
|
+
const active = component?.handleScroll(target.scrollTop);
|
1517
|
+
if (active) {
|
1518
|
+
activeCategory = category;
|
1519
|
+
}
|
1520
|
+
}
|
1521
|
+
}
|
1522
|
+
this.scrollTop = target.scrollTop;
|
1523
|
+
}
|
1524
|
+
// This will allow us to run the change detection only when the category changes.
|
1525
|
+
if (!noSelectionChange && activeCategory && activeCategory.name !== this.selected) {
|
1526
|
+
this.selected = activeCategory.name;
|
1527
|
+
this.ref.detectChanges();
|
1528
|
+
}
|
1529
|
+
else if (noSelectionChange) {
|
1530
|
+
this.ref.detectChanges();
|
1531
|
+
}
|
1532
|
+
}
|
1533
|
+
handleSearch($emojis) {
|
1534
|
+
this.SEARCH_CATEGORY.emojis = $emojis;
|
1535
|
+
for (const component of this.categoryRefs.toArray()) {
|
1536
|
+
if (component.name === 'Search') {
|
1537
|
+
component.emojis = $emojis;
|
1538
|
+
component.updateDisplay($emojis ? 'block' : 'none');
|
1539
|
+
}
|
1540
|
+
else {
|
1541
|
+
component.updateDisplay($emojis ? 'none' : 'block');
|
1542
|
+
}
|
1543
|
+
}
|
1544
|
+
this.scrollRef.nativeElement.scrollTop = 0;
|
1545
|
+
this.handleScroll();
|
1546
|
+
}
|
1547
|
+
handleEnterKey($event, emoji) {
|
1548
|
+
if (!emoji) {
|
1549
|
+
if (this.SEARCH_CATEGORY.emojis !== null && this.SEARCH_CATEGORY.emojis.length) {
|
1550
|
+
emoji = this.SEARCH_CATEGORY.emojis[0];
|
1551
|
+
if (emoji) {
|
1552
|
+
this.emojiSelect.emit({ $event, emoji });
|
1553
|
+
}
|
1554
|
+
else {
|
1555
|
+
return;
|
1556
|
+
}
|
1557
|
+
}
|
1558
|
+
}
|
1559
|
+
if (!this.hideRecent && !this.recent && emoji) {
|
1560
|
+
this.frequently.add(emoji);
|
1561
|
+
}
|
1562
|
+
const component = this.categoryRefs.toArray()[1];
|
1563
|
+
if (component && this.enableFrequentEmojiSort) {
|
1564
|
+
component.updateRecentEmojis();
|
1565
|
+
component.ref.markForCheck();
|
1566
|
+
}
|
1567
|
+
}
|
1568
|
+
handleEmojiOver($event) {
|
1569
|
+
if (!this.showPreview || !this.previewRef) {
|
1570
|
+
return;
|
1571
|
+
}
|
1572
|
+
const emojiData = this.CUSTOM_CATEGORY.emojis.find((customEmoji) => customEmoji.id === $event.emoji.id);
|
1573
|
+
if (emojiData) {
|
1574
|
+
$event.emoji = { ...emojiData };
|
1575
|
+
}
|
1576
|
+
this.previewEmoji = $event.emoji;
|
1577
|
+
this.cancelAnimationFrame();
|
1578
|
+
this.ref?.detectChanges();
|
1579
|
+
}
|
1580
|
+
handleEmojiLeave() {
|
1581
|
+
if (!this.showPreview || !this.previewRef) {
|
1582
|
+
return;
|
1583
|
+
}
|
1584
|
+
this.ngZone.runOutsideAngular(() => {
|
1585
|
+
this.animationFrameRequestId = requestAnimationFrame(() => {
|
1586
|
+
this.previewEmoji = null;
|
1587
|
+
this.ref.detectChanges();
|
1588
|
+
});
|
1589
|
+
});
|
1590
|
+
}
|
1591
|
+
handleEmojiClick($event) {
|
1592
|
+
this.emojiClick.emit($event);
|
1593
|
+
this.emojiSelect.emit($event);
|
1594
|
+
this.handleEnterKey($event.$event, $event.emoji);
|
1595
|
+
}
|
1596
|
+
handleSkinChange(skin) {
|
1597
|
+
this.skin = skin;
|
1598
|
+
localStorage.setItem(`${this.NAMESPACE}.skin`, String(skin));
|
1599
|
+
this.skinChange.emit(skin);
|
1600
|
+
}
|
1601
|
+
getWidth() {
|
1602
|
+
if (this.style && this.style.width) {
|
1603
|
+
return this.style.width;
|
1604
|
+
}
|
1605
|
+
return this.perLine * (this.emojiSize + 12) + 12 + 2 + this.measureScrollbar + 'px';
|
1606
|
+
}
|
1607
|
+
cancelAnimationFrame() {
|
1608
|
+
if (this.animationFrameRequestId !== null) {
|
1609
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
1610
|
+
this.animationFrameRequestId = null;
|
1611
|
+
}
|
1612
|
+
}
|
1613
|
+
}
|
1614
|
+
PickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PickerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: EmojiFrequentlyService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
1615
|
+
PickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", 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 });
|
1616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PickerComponent, decorators: [{
|
1617
|
+
type: Component,
|
1618
|
+
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" }]
|
1619
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: EmojiFrequentlyService }, { type: undefined, decorators: [{
|
1620
|
+
type: Inject,
|
1621
|
+
args: [PLATFORM_ID]
|
1622
|
+
}] }]; }, propDecorators: { perLine: [{
|
1623
|
+
type: Input
|
1624
|
+
}], totalFrequentLines: [{
|
1625
|
+
type: Input
|
1626
|
+
}], i18n: [{
|
1627
|
+
type: Input
|
1628
|
+
}], style: [{
|
1629
|
+
type: Input
|
1630
|
+
}], title: [{
|
1631
|
+
type: Input
|
1632
|
+
}], emoji: [{
|
1633
|
+
type: Input
|
1634
|
+
}], darkMode: [{
|
1635
|
+
type: Input
|
1636
|
+
}], color: [{
|
1637
|
+
type: Input
|
1638
|
+
}], hideObsolete: [{
|
1639
|
+
type: Input
|
1640
|
+
}], categories: [{
|
1641
|
+
type: Input
|
1642
|
+
}], activeCategories: [{
|
1643
|
+
type: Input
|
1644
|
+
}], set: [{
|
1645
|
+
type: Input
|
1646
|
+
}], skin: [{
|
1647
|
+
type: Input
|
1648
|
+
}], isNative: [{
|
1649
|
+
type: Input
|
1650
|
+
}], emojiSize: [{
|
1651
|
+
type: Input
|
1652
|
+
}], sheetSize: [{
|
1653
|
+
type: Input
|
1654
|
+
}], emojisToShowFilter: [{
|
1655
|
+
type: Input
|
1656
|
+
}], showPreview: [{
|
1657
|
+
type: Input
|
1658
|
+
}], emojiTooltip: [{
|
1659
|
+
type: Input
|
1660
|
+
}], autoFocus: [{
|
1661
|
+
type: Input
|
1662
|
+
}], custom: [{
|
1663
|
+
type: Input
|
1664
|
+
}], hideRecent: [{
|
1665
|
+
type: Input
|
1666
|
+
}], imageUrlFn: [{
|
1667
|
+
type: Input
|
1668
|
+
}], include: [{
|
1669
|
+
type: Input
|
1670
|
+
}], exclude: [{
|
1671
|
+
type: Input
|
1672
|
+
}], notFoundEmoji: [{
|
1673
|
+
type: Input
|
1674
|
+
}], categoriesIcons: [{
|
1675
|
+
type: Input
|
1676
|
+
}], searchIcons: [{
|
1677
|
+
type: Input
|
1678
|
+
}], useButton: [{
|
1679
|
+
type: Input
|
1680
|
+
}], enableFrequentEmojiSort: [{
|
1681
|
+
type: Input
|
1682
|
+
}], enableSearch: [{
|
1683
|
+
type: Input
|
1684
|
+
}], showSingleCategory: [{
|
1685
|
+
type: Input
|
1686
|
+
}], virtualize: [{
|
1687
|
+
type: Input
|
1688
|
+
}], virtualizeOffset: [{
|
1689
|
+
type: Input
|
1690
|
+
}], recent: [{
|
1691
|
+
type: Input
|
1692
|
+
}], emojiClick: [{
|
1693
|
+
type: Output
|
1694
|
+
}], emojiSelect: [{
|
1695
|
+
type: Output
|
1696
|
+
}], skinChange: [{
|
1697
|
+
type: Output
|
1698
|
+
}], scrollRef: [{
|
1699
|
+
type: ViewChild,
|
1700
|
+
args: ['scrollRef', { static: true }]
|
1701
|
+
}], previewRef: [{
|
1702
|
+
type: ViewChild,
|
1703
|
+
args: [PreviewComponent, { static: false }]
|
1704
|
+
}], searchRef: [{
|
1705
|
+
type: ViewChild,
|
1706
|
+
args: [SearchComponent, { static: false }]
|
1707
|
+
}], categoryRefs: [{
|
1708
|
+
type: ViewChildren,
|
1709
|
+
args: [CategoryComponent]
|
1710
|
+
}], backgroundImageFn: [{
|
1711
|
+
type: Input
|
1712
|
+
}] } });
|
1713
|
+
|
1714
|
+
class PickerModule {
|
1715
|
+
}
|
1716
|
+
PickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1717
|
+
PickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PickerModule, declarations: [PickerComponent,
|
1718
|
+
AnchorsComponent,
|
1719
|
+
CategoryComponent,
|
1720
|
+
SearchComponent,
|
1721
|
+
PreviewComponent,
|
1722
|
+
SkinComponent], imports: [CommonModule, FormsModule, EmojiModule], exports: [PickerComponent,
|
1723
|
+
AnchorsComponent,
|
1724
|
+
CategoryComponent,
|
1725
|
+
SearchComponent,
|
1726
|
+
PreviewComponent,
|
1727
|
+
SkinComponent] });
|
1728
|
+
PickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PickerModule, imports: [[CommonModule, FormsModule, EmojiModule]] });
|
1729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: PickerModule, decorators: [{
|
1730
|
+
type: NgModule,
|
1731
|
+
args: [{
|
1732
|
+
imports: [CommonModule, FormsModule, EmojiModule],
|
1733
|
+
exports: [
|
1734
|
+
PickerComponent,
|
1735
|
+
AnchorsComponent,
|
1736
|
+
CategoryComponent,
|
1737
|
+
SearchComponent,
|
1738
|
+
PreviewComponent,
|
1739
|
+
SkinComponent,
|
1740
|
+
],
|
1741
|
+
declarations: [
|
1742
|
+
PickerComponent,
|
1743
|
+
AnchorsComponent,
|
1744
|
+
CategoryComponent,
|
1745
|
+
SearchComponent,
|
1746
|
+
PreviewComponent,
|
1747
|
+
SkinComponent,
|
1748
|
+
],
|
1749
|
+
}]
|
1750
|
+
}] });
|
1751
|
+
|
1752
|
+
/**
|
1753
|
+
* Generated bundle index. Do not edit.
|
1754
|
+
*/
|
1755
|
+
|
1756
|
+
export { AnchorsComponent, CategoryComponent, EmojiFrequentlyService, EmojiSearch, PickerComponent, PickerModule, PreviewComponent, SearchComponent, SkinComponent };
|
1757
|
+
//# sourceMappingURL=ctrl-ngx-emoji-mart.mjs.map
|