@ctrl/ngx-emoji-mart 8.2.0 → 9.0.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 +39 -14
- package/anchors.component.d.ts +1 -1
- package/category.component.d.ts +1 -1
- package/esm2022/anchors.component.mjs +100 -0
- package/esm2022/category.component.mjs +409 -0
- package/esm2022/emoji-frequently.service.mjs +90 -0
- package/esm2022/emoji-search.service.mjs +178 -0
- package/esm2022/ngx-emoji/emoji.component.mjs +299 -0
- package/esm2022/ngx-emoji/emoji.module.mjs +17 -0
- package/esm2022/ngx-emoji/emoji.service.mjs +145 -0
- package/esm2022/picker.component.mjs +522 -0
- package/esm2022/picker.module.mjs +40 -0
- package/esm2022/preview.component.mjs +206 -0
- package/esm2022/search.component.mjs +175 -0
- package/esm2022/skins.component.mjs +107 -0
- package/{fesm2020 → fesm2022}/ctrl-ngx-emoji-mart-ngx-emoji.mjs +62 -54
- package/{fesm2015 → fesm2022}/ctrl-ngx-emoji-mart-ngx-emoji.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ctrl-ngx-emoji-mart.mjs +320 -254
- package/fesm2022/ctrl-ngx-emoji-mart.mjs.map +1 -0
- package/ngx-emoji/emoji.component.d.ts +1 -1
- package/ngx-emoji/emoji.module.d.ts +1 -2
- package/package.json +8 -16
- package/picker.component.d.ts +2 -2
- package/picker.module.d.ts +1 -4
- package/preview.component.d.ts +2 -2
- package/search.component.d.ts +1 -1
- package/skins.component.d.ts +2 -2
- package/esm2020/anchors.component.mjs +0 -83
- package/esm2020/category.component.mjs +0 -386
- package/esm2020/emoji-frequently.service.mjs +0 -88
- package/esm2020/emoji-search.service.mjs +0 -177
- package/esm2020/ngx-emoji/emoji.component.mjs +0 -288
- package/esm2020/ngx-emoji/emoji.module.mjs +0 -18
- package/esm2020/ngx-emoji/emoji.service.mjs +0 -144
- package/esm2020/picker.component.mjs +0 -508
- package/esm2020/picker.module.mjs +0 -49
- package/esm2020/preview.component.mjs +0 -187
- package/esm2020/search.component.mjs +0 -165
- package/esm2020/skins.component.mjs +0 -108
- package/fesm2015/ctrl-ngx-emoji-mart-ngx-emoji.mjs +0 -34330
- package/fesm2015/ctrl-ngx-emoji-mart.mjs +0 -1763
- package/fesm2015/ctrl-ngx-emoji-mart.mjs.map +0 -1
- package/fesm2020/ctrl-ngx-emoji-mart-ngx-emoji.mjs.map +0 -1
- package/fesm2020/ctrl-ngx-emoji-mart.mjs.map +0 -1
- /package/{esm2020 → esm2022}/ctrl-ngx-emoji-mart.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-emoji/ctrl-ngx-emoji-mart-ngx-emoji.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-emoji/data/categories.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-emoji/data/data.interfaces.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-emoji/data/emojis.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-emoji/data/skins.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-emoji/index.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/svgs/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/index.mjs +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { Injectable, EventEmitter, inject, NgZone, Component, ChangeDetectionStrategy, Input, Output, ViewChild, NgModule } from '@angular/core';
|
3
|
-
import { Subject, switchMap, fromEvent, EMPTY, takeUntil } from 'rxjs';
|
4
3
|
import * as i1 from '@angular/common';
|
5
4
|
import { CommonModule } from '@angular/common';
|
5
|
+
import { Subject, switchMap, fromEvent, EMPTY, takeUntil } from 'rxjs';
|
6
6
|
|
7
7
|
const categories = [
|
8
8
|
{
|
@@ -33896,10 +33896,10 @@ const COLONS_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;
|
|
33896
33896
|
const SKINS = ['1F3FA', '1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF'];
|
33897
33897
|
const DEFAULT_BACKGROUNDFN = (set, sheetSize) => `https://unpkg.com/emoji-datasource-${set}@6.0.1/img/${set}/sheets-256/${sheetSize}.png`;
|
33898
33898
|
class EmojiService {
|
33899
|
+
uncompressed = false;
|
33900
|
+
names = {};
|
33901
|
+
emojis = [];
|
33899
33902
|
constructor() {
|
33900
|
-
this.uncompressed = false;
|
33901
|
-
this.names = {};
|
33902
|
-
this.emojis = [];
|
33903
33903
|
if (!this.uncompressed) {
|
33904
33904
|
this.uncompress(emojis);
|
33905
33905
|
this.uncompressed = true;
|
@@ -34025,58 +34025,65 @@ class EmojiService {
|
|
34025
34025
|
getSanitizedData(emoji, skin, set) {
|
34026
34026
|
return this.sanitize(this.getData(emoji, skin, set));
|
34027
34027
|
}
|
34028
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
34029
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiService, providedIn: 'root' });
|
34028
34030
|
}
|
34029
|
-
|
34030
|
-
EmojiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmojiService, providedIn: 'root' });
|
34031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmojiService, decorators: [{
|
34031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiService, decorators: [{
|
34032
34032
|
type: Injectable,
|
34033
34033
|
args: [{ providedIn: 'root' }]
|
34034
34034
|
}], ctorParameters: function () { return []; } });
|
34035
34035
|
|
34036
34036
|
class EmojiComponent {
|
34037
|
+
skin = 1;
|
34038
|
+
set = 'apple';
|
34039
|
+
sheetSize = 64;
|
34040
|
+
/** Renders the native unicode emoji */
|
34041
|
+
isNative = false;
|
34042
|
+
forceSize = false;
|
34043
|
+
tooltip = false;
|
34044
|
+
size = 24;
|
34045
|
+
emoji = '';
|
34046
|
+
fallback;
|
34047
|
+
hideObsolete = false;
|
34048
|
+
sheetRows;
|
34049
|
+
sheetColumns;
|
34050
|
+
useButton;
|
34051
|
+
emojiClick = new EventEmitter();
|
34052
|
+
/**
|
34053
|
+
* Note: `emojiOver` and `emojiOverOutsideAngular` are dispatched on the same event (`mouseenter`), but
|
34054
|
+
* for different purposes. The `emojiOverOutsideAngular` event is listened only in `emoji-category`
|
34055
|
+
* component and the category component doesn't care about zone context the callback is being called in.
|
34056
|
+
* The `emojiOver` is for backwards compatibility if anyone is listening to this event explicitly in their code.
|
34057
|
+
*/
|
34058
|
+
emojiOver = new EventEmitter();
|
34059
|
+
emojiOverOutsideAngular = new EventEmitter();
|
34060
|
+
/** See comments above, this serves the same purpose. */
|
34061
|
+
emojiLeave = new EventEmitter();
|
34062
|
+
emojiLeaveOutsideAngular = new EventEmitter();
|
34063
|
+
style;
|
34064
|
+
title = undefined;
|
34065
|
+
label = '';
|
34066
|
+
unified;
|
34067
|
+
custom = false;
|
34068
|
+
isVisible = true;
|
34069
|
+
// TODO: replace 4.0.3 w/ dynamic get verison from emoji-datasource in package.json
|
34070
|
+
backgroundImageFn = DEFAULT_BACKGROUNDFN;
|
34071
|
+
imageUrlFn;
|
34037
34072
|
set button(button) {
|
34038
34073
|
// Note: `runOutsideAngular` is used to trigger `addEventListener` outside of the Angular zone
|
34039
34074
|
// too. See `setupMouseEnterListener`. The `switchMap` will subscribe to `fromEvent` considering
|
34040
34075
|
// the context where the factory is called in.
|
34041
34076
|
this.ngZone.runOutsideAngular(() => this.button$.next(button?.nativeElement));
|
34042
34077
|
}
|
34078
|
+
/**
|
34079
|
+
* The subject used to emit whenever view queries are run and `button` or `span` is set/removed.
|
34080
|
+
* We use subject to keep the reactive behavior so we don't have to add and remove event listeners manually.
|
34081
|
+
*/
|
34082
|
+
button$ = new Subject();
|
34083
|
+
destroy$ = new Subject();
|
34084
|
+
ngZone = inject(NgZone);
|
34085
|
+
emojiService = inject(EmojiService);
|
34043
34086
|
constructor() {
|
34044
|
-
this.skin = 1;
|
34045
|
-
this.set = 'apple';
|
34046
|
-
this.sheetSize = 64;
|
34047
|
-
/** Renders the native unicode emoji */
|
34048
|
-
this.isNative = false;
|
34049
|
-
this.forceSize = false;
|
34050
|
-
this.tooltip = false;
|
34051
|
-
this.size = 24;
|
34052
|
-
this.emoji = '';
|
34053
|
-
this.hideObsolete = false;
|
34054
|
-
this.emojiClick = new EventEmitter();
|
34055
|
-
/**
|
34056
|
-
* Note: `emojiOver` and `emojiOverOutsideAngular` are dispatched on the same event (`mouseenter`), but
|
34057
|
-
* for different purposes. The `emojiOverOutsideAngular` event is listened only in `emoji-category`
|
34058
|
-
* component and the category component doesn't care about zone context the callback is being called in.
|
34059
|
-
* The `emojiOver` is for backwards compatibility if anyone is listening to this event explicitly in their code.
|
34060
|
-
*/
|
34061
|
-
this.emojiOver = new EventEmitter();
|
34062
|
-
this.emojiOverOutsideAngular = new EventEmitter();
|
34063
|
-
/** See comments above, this serves the same purpose. */
|
34064
|
-
this.emojiLeave = new EventEmitter();
|
34065
|
-
this.emojiLeaveOutsideAngular = new EventEmitter();
|
34066
|
-
this.title = undefined;
|
34067
|
-
this.label = '';
|
34068
|
-
this.custom = false;
|
34069
|
-
this.isVisible = true;
|
34070
|
-
// TODO: replace 4.0.3 w/ dynamic get verison from emoji-datasource in package.json
|
34071
|
-
this.backgroundImageFn = DEFAULT_BACKGROUNDFN;
|
34072
|
-
/**
|
34073
|
-
* The subject used to emit whenever view queries are run and `button` or `span` is set/removed.
|
34074
|
-
* We use subject to keep the reactive behavior so we don't have to add and remove event listeners manually.
|
34075
|
-
*/
|
34076
|
-
this.button$ = new Subject();
|
34077
|
-
this.destroy$ = new Subject();
|
34078
|
-
this.ngZone = inject(NgZone);
|
34079
|
-
this.emojiService = inject(EmojiService);
|
34080
34087
|
this.setupMouseListeners();
|
34081
34088
|
}
|
34082
34089
|
ngOnChanges() {
|
@@ -34188,9 +34195,8 @@ class EmojiComponent {
|
|
34188
34195
|
}
|
34189
34196
|
});
|
34190
34197
|
}
|
34191
|
-
}
|
34192
|
-
|
34193
|
-
EmojiComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: EmojiComponent, selector: "ngx-emoji", inputs: { skin: "skin", set: "set", sheetSize: "sheetSize", isNative: "isNative", forceSize: "forceSize", tooltip: "tooltip", size: "size", emoji: "emoji", fallback: "fallback", hideObsolete: "hideObsolete", sheetRows: "sheetRows", sheetColumns: "sheetColumns", useButton: "useButton", backgroundImageFn: "backgroundImageFn", imageUrlFn: "imageUrlFn" }, outputs: { emojiClick: "emojiClick", emojiOver: "emojiOver", emojiOverOutsideAngular: "emojiOverOutsideAngular", emojiLeave: "emojiLeave", emojiLeaveOutsideAngular: "emojiLeaveOutsideAngular" }, viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
34198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
34199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: EmojiComponent, isStandalone: true, selector: "ngx-emoji", inputs: { skin: "skin", set: "set", sheetSize: "sheetSize", isNative: "isNative", forceSize: "forceSize", tooltip: "tooltip", size: "size", emoji: "emoji", fallback: "fallback", hideObsolete: "hideObsolete", sheetRows: "sheetRows", sheetColumns: "sheetColumns", useButton: "useButton", backgroundImageFn: "backgroundImageFn", imageUrlFn: "imageUrlFn" }, outputs: { emojiClick: "emojiClick", emojiOver: "emojiOver", emojiOverOutsideAngular: "emojiOverOutsideAngular", emojiLeave: "emojiLeave", emojiLeaveOutsideAngular: "emojiLeaveOutsideAngular" }, viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
34194
34200
|
<ng-template [ngIf]="isVisible">
|
34195
34201
|
<button
|
34196
34202
|
*ngIf="useButton; else spanTpl"
|
@@ -34226,8 +34232,9 @@ EmojiComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
34226
34232
|
</span>
|
34227
34233
|
</span>
|
34228
34234
|
</ng-template>
|
34229
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
34230
|
-
|
34235
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
34236
|
+
}
|
34237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiComponent, decorators: [{
|
34231
34238
|
type: Component,
|
34232
34239
|
args: [{
|
34233
34240
|
selector: 'ngx-emoji',
|
@@ -34270,6 +34277,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
34270
34277
|
`,
|
34271
34278
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
34272
34279
|
preserveWhitespaces: false,
|
34280
|
+
standalone: true,
|
34281
|
+
imports: [CommonModule],
|
34273
34282
|
}]
|
34274
34283
|
}], ctorParameters: function () { return []; }, propDecorators: { skin: [{
|
34275
34284
|
type: Input
|
@@ -34317,16 +34326,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
34317
34326
|
}] } });
|
34318
34327
|
|
34319
34328
|
class EmojiModule {
|
34329
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
34330
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: EmojiModule, imports: [EmojiComponent], exports: [EmojiComponent] });
|
34331
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiModule, imports: [EmojiComponent] });
|
34320
34332
|
}
|
34321
|
-
|
34322
|
-
EmojiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: EmojiModule, declarations: [EmojiComponent], imports: [CommonModule], exports: [EmojiComponent] });
|
34323
|
-
EmojiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmojiModule, imports: [CommonModule] });
|
34324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EmojiModule, decorators: [{
|
34333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: EmojiModule, decorators: [{
|
34325
34334
|
type: NgModule,
|
34326
34335
|
args: [{
|
34327
|
-
imports: [
|
34336
|
+
imports: [EmojiComponent],
|
34328
34337
|
exports: [EmojiComponent],
|
34329
|
-
declarations: [EmojiComponent],
|
34330
34338
|
}]
|
34331
34339
|
}] });
|
34332
34340
|
|