ngx-emoji-picker
Version:
A simple emoji picker for Angular 2+ / Ionic 3 with AOT build support
2,209 lines โข 98.1 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('twemoji'), require('@angular/platform-browser')) :
typeof define === 'function' && define.amd ? define('ngx-emoji-picker', ['exports', '@angular/core', '@angular/common', 'rxjs', 'rxjs/operators', 'twemoji', '@angular/platform-browser'], factory) :
(global = global || self, factory(global['ngx-emoji-picker'] = {}, global.ng.core, global.ng.common, global.rxjs, global.rxjs.operators, global.twemoji, global.ng.platformBrowser));
}(this, (function (exports, core, common, rxjs, operators, twemoji, platformBrowser) { 'use strict';
twemoji = twemoji && Object.prototype.hasOwnProperty.call(twemoji, 'default') ? twemoji['default'] : twemoji;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __createBinding(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}
function __exportStar(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}
var EmojiButtonComponent = /** @class */ (function () {
function EmojiButtonComponent() {
this.selectionEmitter = new core.EventEmitter();
}
EmojiButtonComponent.prototype.ngOnChanges = function () { };
__decorate([
core.Input('emoji'),
__metadata("design:type", Object)
], EmojiButtonComponent.prototype, "emoji", void 0);
__decorate([
core.Input('dataToEmit'),
__metadata("design:type", Object)
], EmojiButtonComponent.prototype, "dataToEmit", void 0);
__decorate([
core.Input('options'),
__metadata("design:type", Object)
], EmojiButtonComponent.prototype, "options", void 0);
__decorate([
core.Input('fitzpatrick'),
__metadata("design:type", Object)
], EmojiButtonComponent.prototype, "fitzpatrick", void 0);
__decorate([
core.Output('selection'),
__metadata("design:type", core.EventEmitter)
], EmojiButtonComponent.prototype, "selectionEmitter", void 0);
EmojiButtonComponent = __decorate([
core.Component({
selector: 'emoji-button',
template: "\n <button\n class=\"emoji-button\" \n (click)=\"selectionEmitter.emit(dataToEmit || emoji)\" [innerHTML]=\"emoji[0] | emojiFallback\">\n </button>\n ",
styles: [":host{display:inline-block}.emoji-button{padding:0;border:none;outline:0;background:0 0;width:34px;height:34px;border-radius:3px;font-size:24px;line-height:1.1;cursor:pointer;transition:.2s}.emoji-button:focus,.emoji-button:hover{background:#f1f1f1;border-color:#f1f1f1}.emoji-button ::ng-deep img{width:20px}"]
}),
__metadata("design:paramtypes", [])
], EmojiButtonComponent);
return EmojiButtonComponent;
}());
var EmojiCategoriesComponent = /** @class */ (function () {
function EmojiCategoriesComponent() {
this.categorySelection = new core.EventEmitter();
}
EmojiCategoriesComponent.prototype.handleCategorySelection = function (event) {
this.categorySelection.emit(event);
};
__decorate([
core.Input('emojisCategories'),
__metadata("design:type", Object)
], EmojiCategoriesComponent.prototype, "emojisCategories", void 0);
__decorate([
core.Output('categorySelection'),
__metadata("design:type", Object)
], EmojiCategoriesComponent.prototype, "categorySelection", void 0);
EmojiCategoriesComponent = __decorate([
core.Component({
selector: 'emoji-categories',
template: "\n <ng-container *ngFor=\"let category of emojisCategories\">\n <emoji-button \n (selection)=\"handleCategorySelection($event)\"\n [dataToEmit]=\"category\"\n [emoji]=\"category.icon\"></emoji-button>\n </ng-container>\n ",
styles: [":host{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 0 10px}"]
}),
__metadata("design:paramtypes", [])
], EmojiCategoriesComponent);
return EmojiCategoriesComponent;
}());
var EmojiCategoryComponent = /** @class */ (function () {
function EmojiCategoryComponent(_element) {
this._element = _element;
}
EmojiCategoryComponent.prototype.scrollIntoView = function () {
this._element.nativeElement.scrollIntoView();
};
EmojiCategoryComponent.ctorParameters = function () { return [
{ type: core.ElementRef }
]; };
__decorate([
core.Input('category'),
__metadata("design:type", Object)
], EmojiCategoryComponent.prototype, "category", void 0);
EmojiCategoryComponent = __decorate([
core.Component({
selector: 'emoji-category',
template: "\n <p class=\"emoji-category\">{{category.name}}</p>\n ",
styles: [".emoji-category{margin:0;font-size:16px;padding:5px 0 5px 5px;border-bottom:1px solid #f0f0f0;color:#777;font-family:Arial,\"Arial Black\",Tahoma,\"Trebuchet MS\",Verdana}"]
}),
__metadata("design:paramtypes", [core.ElementRef])
], EmojiCategoryComponent);
return EmojiCategoryComponent;
}());
var EMOJIS = [
{
emojis: [
['๐', 'grinning'],
['๐', 'smiley'],
['๐', 'smile'],
['๐', 'grin'],
['๐', 'laughing'],
['๐
', 'sweat_smile'],
['๐', 'joy'],
['๐คฃ', 'rofl'],
['๐', 'blush'],
['๐', 'innocent'],
['๐', 'slightly_smiling_face'],
['๐', 'upside_down_face'],
['๐', 'wink'],
['๐', 'relieved'],
['๐', 'heart_eyes'],
['๐', 'kissing_heart'],
['๐', 'kissing'],
['๐', 'kissing_smiling_eyes'],
['๐', 'kissing_closed_eyes'],
['๐', 'yum'],
['๐', 'stuck_out_tongue_winking_eye'],
['๐', 'stuck_out_tongue_closed_eyes'],
['๐', 'stuck_out_tongue'],
['๐ค', 'money_mouth_face'],
['๐ค', 'hugs'],
['๐ค', 'nerd_face'],
['๐', 'sunglasses'],
['๐คก', 'clown_face'],
['๐ค ', 'cowboy_hat_face'],
['๐', 'smirk'],
['๐', 'unamused'],
['๐', 'disappointed'],
['๐', 'pensive'],
['๐', 'worried'],
['๐', 'confused'],
['๐', 'slightly_frowning_face'],
['โน๏ธ', 'frowning_face'],
['๐ฃ', 'persevere'],
['๐', 'confounded'],
['๐ซ', 'tired_face'],
['๐ฉ', 'weary'],
['๐ค', 'triumph'],
['๐ ', 'angry'],
['๐ก', 'rage'],
['๐ถ', 'no_mouth'],
['๐', 'neutral_face'],
['๐', 'expressionless'],
['๐ฏ', 'hushed'],
['๐ฆ', 'frowning'],
['๐ง', 'anguished'],
['๐ฎ', 'open_mouth'],
['๐ฒ', 'astonished'],
['๐ต', 'dizzy_face'],
['๐ณ', 'flushed'],
['๐ฑ', 'scream'],
['๐จ', 'fearful'],
['๐ฐ', 'cold_sweat'],
['๐ข', 'cry'],
['๐ฅ', 'disappointed_relieved'],
['๐คค', 'drooling_face'],
['๐ญ', 'sob'],
['๐', 'sweat'],
['๐ช', 'sleepy'],
['๐ด', 'sleeping'],
['๐', 'roll_eyes'],
['๐ค', 'thinking'],
['๐คฅ', 'lying_face'],
['๐ฌ', 'grimacing'],
['๐ค', 'zipper_mouth_face'],
['๐คข', 'nauseated_face'],
['๐คง', 'sneezing_face'],
['๐ท', 'mask'],
['๐ค', 'face_with_thermometer'],
['๐ค', 'face_with_head_bandage'],
['๐', 'smiling_imp'],
['๐ฟ', 'imp'],
['๐น', 'japanese_ogre'],
['๐บ', 'japanese_goblin'],
['๐ฉ', 'hankey'],
['๐ป', 'ghost'],
['๐', 'skull'],
['โ ๏ธ', 'skull_and_crossbones'],
['๐ฝ', 'alien'],
['๐พ', 'space_invader'],
['๐ค', 'robot'],
['๐', 'jack_o_lantern'],
['๐บ', 'smiley_cat'],
['๐ธ', 'smile_cat'],
['๐น', 'joy_cat'],
['๐ป', 'heart_eyes_cat'],
['๐ผ', 'smirk_cat'],
['๐ฝ', 'kissing_cat'],
['๐', 'scream_cat'],
['๐ฟ', 'crying_cat_face'],
['๐พ', 'pouting_cat'],
['๐', 'open_hands'],
['๐', 'raised_hands'],
['๐', 'clap'],
['๐', 'pray'],
['๐ค', 'handshake'],
['๐', '+1'],
['๐', '-1'],
['๐', 'fist_oncoming'],
['โ', 'fist_raised'],
['๐ค', 'fist_left'],
['๐ค', 'fist_right'],
['๐ค', 'crossed_fingers'],
['โ๏ธ', 'v'],
['๐ค', 'metal'],
['๐', 'ok_hand'],
['๐', 'point_left'],
['๐', 'point_right'],
['๐', 'point_up_2'],
['๐', 'point_down'],
['โ๏ธ', 'point_up'],
['โ', 'hand'],
['๐ค', 'raised_back_of_hand'],
['๐', 'raised_hand_with_fingers_splayed'],
['๐', 'vulcan_salute'],
['๐', 'wave'],
['๐ค', 'call_me_hand'],
['๐ช', 'muscle'],
['๐', 'middle_finger'],
['โ๏ธ', 'writing_hand'],
['๐คณ', 'selfie'],
['๐
', 'nail_care'],
['๐', 'ring'],
['๐', 'lipstick'],
['๐', 'kiss'],
['๐', 'lips'],
['๐
', 'tongue'],
['๐', 'ear'],
['๐', 'nose'],
['๐ฃ', 'footprints'],
['๐', 'eye'],
['๐', 'eyes'],
['๐ฃ', 'speaking_head'],
['๐ค', 'bust_in_silhouette'],
['๐ฅ', 'busts_in_silhouette'],
['๐ถ', 'baby'],
['๐ฆ', 'boy'],
['๐ง', 'girl'],
['๐จ', 'man'],
['๐ฉ', 'woman'],
['๐ฑโโ', 'blonde_woman'],
['๐ฑ', 'blonde_man'],
['๐ด', 'older_man'],
['๐ต', 'older_woman'],
['๐ฒ', 'man_with_gua_pi_mao'],
['๐ณโโ', 'woman_with_turban'],
['๐ณ', 'man_with_turban'],
['๐ฎโโ', 'policewoman'],
['๐ฎ', 'policeman'],
['๐ทโโ', 'construction_worker_woman'],
['๐ท', 'construction_worker_man'],
['๐โโ', 'guardswoman'],
['๐', 'guardsman'],
['๐ต๏ธโโ๏ธ', 'female_detective'],
['๐ต', 'male_detective'],
['๐ฉโโ', 'woman_health_worker'],
['๐จโโ', 'man_health_worker'],
['๐ฉโ๐พ', 'woman_farmer'],
['๐จโ๐พ', 'man_farmer'],
['๐ฉโ๐ณ', 'woman_cook'],
['๐จโ๐ณ', 'man_cook'],
['๐ฉโ๐', 'woman_student'],
['๐จโ๐', 'man_student'],
['๐ฉโ๐ค', 'woman_singer'],
['๐จโ๐ค', 'man_singer'],
['๐ฉโ๐ซ', 'woman_teacher'],
['๐จโ๐ซ', 'man_teacher'],
['๐ฉโ๐ญ', 'woman_factory_worker'],
['๐จโ๐ญ', 'man_factory_worker'],
['๐ฉโ๐ป', 'woman_technologist'],
['๐จโ๐ป', 'man_technologist'],
['๐ฉโ๐ผ', 'woman_office_worker'],
['๐จโ๐ผ', 'man_office_worker'],
['๐ฉโ๐ง', 'woman_mechanic'],
['๐จโ๐ง', 'man_mechanic'],
['๐ฉโ๐ฌ', 'woman_scientist'],
['๐จโ๐ฌ', 'man_scientist'],
['๐ฉโ๐จ', 'woman_artist'],
['๐จโ๐จ', 'man_artist'],
['๐ฉโ๐', 'woman_firefighter'],
['๐จโ๐', 'man_firefighter'],
['๐ฉโโ', 'woman_pilot'],
['๐จโโ', 'man_pilot'],
['๐ฉโ๐', 'woman_astronaut'],
['๐จโ๐', 'man_astronaut'],
['๐ฉโโ', 'woman_judge'],
['๐จโโ', 'man_judge'],
['๐คถ', 'mrs_claus'],
['๐
', 'santa'],
['๐ธ', 'princess'],
['๐คด', 'prince'],
['๐ฐ', 'bride_with_veil'],
['๐คต', 'man_in_tuxedo'],
['๐ผ', 'angel'],
['๐คฐ', 'pregnant_woman'],
['๐โโ', 'bowing_woman'],
['๐', 'bowing_man'],
['๐', 'tipping_hand_woman'],
['๐โโ', 'tipping_hand_man'],
['๐
', 'no_good_woman'],
['๐
โโ', 'no_good_man'],
['๐', 'ok_woman'],
['๐โโ', 'ok_man'],
['๐', 'raising_hand_woman'],
['๐โโ', 'raising_hand_man'],
['๐คฆโโ', 'woman_facepalming'],
['๐คฆโโ', 'man_facepalming'],
['๐คทโโ', 'woman_shrugging'],
['๐คทโโ', 'man_shrugging'],
['๐', 'pouting_woman'],
['๐โโ', 'pouting_man'],
['๐', 'frowning_woman'],
['๐โโ', 'frowning_man'],
['๐', 'haircut_woman'],
['๐โโ', 'haircut_man'],
['๐', 'massage_woman'],
['๐โโ', 'massage_man'],
['๐ด', 'business_suit_levitating'],
['๐', 'dancer'],
['๐บ', 'man_dancing'],
['๐ฏ', 'dancing_women'],
['๐ฏโโ', 'dancing_men'],
['๐ถโโ', 'walking_woman'],
['๐ถ', 'walking_man'],
['๐โโ', 'running_woman'],
['๐', 'running_man'],
['๐ซ', 'couple'],
['๐ญ', 'two_women_holding_hands'],
['๐ฌ', 'two_men_holding_hands'],
['๐', 'couple_with_heart_woman_man'],
['๐ฉโโค๏ธโ๐ฉ', 'couple_with_heart_woman_woman'],
['๐จโโค๏ธโ๐จ', 'couple_with_heart_man_man'],
['๐', 'couplekiss_man_woman'],
['๐ฉโโค๏ธโ๐โ๐ฉ', 'couplekiss_woman_woman'],
['๐จโโค๏ธโ๐โ๐จ', 'couplekiss_man_man'],
['๐ช', 'family_man_woman_boy'],
['๐จโ๐ฉโ๐ง', 'family_man_woman_girl'],
['๐จโ๐ฉโ๐งโ๐ฆ', 'family_man_woman_girl_boy'],
['๐จโ๐ฉโ๐ฆโ๐ฆ', 'family_man_woman_boy_boy'],
['๐จโ๐ฉโ๐งโ๐ง', 'family_man_woman_girl_girl'],
['๐ฉโ๐ฉโ๐ฆ', 'family_woman_woman_boy'],
['๐ฉโ๐ฉโ๐ง', 'family_woman_woman_girl'],
['๐ฉโ๐ฉโ๐งโ๐ฆ', 'family_woman_woman_girl_boy'],
['๐ฉโ๐ฉโ๐ฆโ๐ฆ', 'family_woman_woman_boy_boy'],
['๐ฉโ๐ฉโ๐งโ๐ง', 'family_woman_woman_girl_girl'],
['๐จโ๐จโ๐ฆ', 'family_man_man_boy'],
['๐จโ๐จโ๐ง', 'family_man_man_girl'],
['๐จโ๐จโ๐งโ๐ฆ', 'family_man_man_girl_boy'],
['๐จโ๐จโ๐ฆโ๐ฆ', 'family_man_man_boy_boy'],
['๐จโ๐จโ๐งโ๐ง', 'family_man_man_girl_girl'],
['๐ฉโ๐ฆ', 'family_woman_boy'],
['๐ฉโ๐ง', 'family_woman_girl'],
['๐ฉโ๐งโ๐ฆ', 'family_woman_girl_boy'],
['๐ฉโ๐ฆโ๐ฆ', 'family_woman_boy_boy'],
['๐ฉโ๐งโ๐ง', 'family_woman_girl_girl'],
['๐จโ๐ฆ', 'family_man_boy'],
['๐จโ๐ง', 'family_man_girl'],
['๐จโ๐งโ๐ฆ', 'family_man_girl_boy'],
['๐จโ๐ฆโ๐ฆ', 'family_man_boy_boy'],
['๐จโ๐งโ๐ง', 'family_man_girl_girl'],
['๐', 'womans_clothes'],
['๐', 'shirt'],
['๐', 'jeans'],
['๐', 'necktie'],
['๐', 'dress'],
['๐', 'bikini'],
['๐', 'kimono'],
['๐ ', 'high_heel'],
['๐ก', 'sandal'],
['๐ข', 'boot'],
['๐', 'mans_shoe'],
['๐', 'athletic_shoe'],
['๐', 'womans_hat'],
['๐ฉ', 'tophat'],
['๐', 'mortar_board'],
['๐', 'crown'],
['โ', 'rescue_worker_helmet'],
['๐', 'school_satchel'],
['๐', 'pouch'],
['๐', 'purse'],
['๐', 'handbag'],
['๐ผ', 'briefcase'],
['๐', 'eyeglasses'],
['๐ถ', 'dark_sunglasses'],
['๐', 'closed_umbrella'],
['โ๏ธ', 'open_umbrella']
],
name: 'People',
icon: ['๐', 'smile']
},
{
emojis: [
['๐ถ', 'dog'],
['๐ฑ', 'cat'],
['๐ญ', 'mouse'],
['๐น', 'hamster'],
['๐ฐ', 'rabbit'],
['๐ฆ', 'fox_face'],
['๐ป', 'bear'],
['๐ผ', 'panda_face'],
['๐จ', 'koala'],
['๐ฏ', 'tiger'],
['๐ฆ', 'lion'],
['๐ฎ', 'cow'],
['๐ท', 'pig'],
['๐ฝ', 'pig_nose'],
['๐ธ', 'frog'],
['๐ต', 'monkey_face'],
['๐', 'see_no_evil'],
['๐', 'hear_no_evil'],
['๐', 'speak_no_evil'],
['๐', 'monkey'],
['๐', 'chicken'],
['๐ง', 'penguin'],
['๐ฆ', 'bird'],
['๐ค', 'baby_chick'],
['๐ฃ', 'hatching_chick'],
['๐ฅ', 'hatched_chick'],
['๐ฆ', 'duck'],
['๐ฆ
', 'eagle'],
['๐ฆ', 'owl'],
['๐ฆ', 'bat'],
['๐บ', 'wolf'],
['๐', 'boar'],
['๐ด', 'horse'],
['๐ฆ', 'unicorn'],
['๐', 'bee'],
['๐', 'bug'],
['๐ฆ', 'butterfly'],
['๐', 'snail'],
['๐', 'shell'],
['๐', 'beetle'],
['๐', 'ant'],
['๐ท', 'spider'],
['๐ธ', 'spider_web'],
['๐ข', 'turtle'],
['๐', 'snake'],
['๐ฆ', 'lizard'],
['๐ฆ', 'scorpion'],
['๐ฆ', 'crab'],
['๐ฆ', 'squid'],
['๐', 'octopus'],
['๐ฆ', 'shrimp'],
['๐ ', 'tropical_fish'],
['๐', 'fish'],
['๐ก', 'blowfish'],
['๐ฌ', 'dolphin'],
['๐ฆ', 'shark'],
['๐ณ', 'whale'],
['๐', 'whale2'],
['๐', 'crocodile'],
['๐', 'leopard'],
['๐
', 'tiger2'],
['๐', 'water_buffalo'],
['๐', 'ox'],
['๐', 'cow2'],
['๐ฆ', 'deer'],
['๐ช', 'dromedary_camel'],
['๐ซ', 'camel'],
['๐', 'elephant'],
['๐ฆ', 'rhinoceros'],
['๐ฆ', 'gorilla'],
['๐', 'racehorse'],
['๐', 'pig2'],
['๐', 'goat'],
['๐', 'ram'],
['๐', 'sheep'],
['๐', 'dog2'],
['๐ฉ', 'poodle'],
['๐', 'cat2'],
['๐', 'rooster'],
['๐ฆ', 'turkey'],
['๐', 'dove'],
['๐', 'rabbit2'],
['๐', 'mouse2'],
['๐', 'rat'],
['๐ฟ', 'chipmunk'],
['๐พ', 'feet'],
['๐', 'dragon'],
['๐ฒ', 'dragon_face'],
['๐ต', 'cactus'],
['๐', 'christmas_tree'],
['๐ฒ', 'evergreen_tree'],
['๐ณ', 'deciduous_tree'],
['๐ด', 'palm_tree'],
['๐ฑ', 'seedling'],
['๐ฟ', 'herb'],
['โ๏ธ', 'shamrock'],
['๐', 'four_leaf_clover'],
['๐', 'bamboo'],
['๐', 'tanabata_tree'],
['๐', 'leaves'],
['๐', 'fallen_leaf'],
['๐', 'maple_leaf'],
['๐', 'mushroom'],
['๐พ', 'ear_of_rice'],
['๐', 'bouquet'],
['๐ท', 'tulip'],
['๐น', 'rose'],
['๐ฅ', 'wilted_flower'],
['๐ป', 'sunflower'],
['๐ผ', 'blossom'],
['๐ธ', 'cherry_blossom'],
['๐บ', 'hibiscus'],
['๐', 'earth_americas'],
['๐', 'earth_africa'],
['๐', 'earth_asia'],
['๐', 'full_moon'],
['๐', 'waning_gibbous_moon'],
['๐', 'last_quarter_moon'],
['๐', 'waning_crescent_moon'],
['๐', 'new_moon'],
['๐', 'waxing_crescent_moon'],
['๐', 'first_quarter_moon'],
['๐', 'moon'],
['๐', 'new_moon_with_face'],
['๐', 'full_moon_with_face'],
['๐', 'sun_with_face'],
['๐', 'first_quarter_moon_with_face'],
['๐', 'last_quarter_moon_with_face'],
['๐', 'crescent_moon'],
['๐ซ', 'dizzy'],
['โญ๏ธ', 'star'],
['๐', 'star2'],
['โจ', 'sparkles'],
['โก๏ธ', 'zap'],
['๐ฅ', 'fire'],
['๐ฅ', 'boom'],
['โ', 'comet'],
['โ๏ธ', 'sunny'],
['๐ค', 'sun_behind_small_cloud'],
['โ
๏ธ', 'partly_sunny'],
['๐ฅ', 'sun_behind_large_cloud'],
['๐ฆ', 'sun_behind_rain_cloud'],
['๐', 'rainbow'],
['โ๏ธ', 'cloud'],
['๐ง', 'cloud_with_rain'],
['โ', 'cloud_with_lightning_and_rain'],
['๐ฉ', 'cloud_with_lightning'],
['๐จ', 'cloud_with_snow'],
['โ๏ธ', 'snowman_with_snow'],
['โ๏ธ', 'snowman'],
['โ๏ธ', 'snowflake'],
['๐ฌ', 'wind_face'],
['๐จ', 'dash'],
['๐ช', 'tornado'],
['๐ซ', 'fog'],
['๐', 'ocean'],
['๐ง', 'droplet'],
['๐ฆ', 'sweat_drops'],
['โ๏ธ', 'umbrella']
],
name: 'Nature',
icon: ['๐ธ', 'cherry_blossom']
},
{
emojis: [
['๐', 'green_apple'],
['๐', 'apple'],
['๐', 'pear'],
['๐', 'tangerine'],
['๐', 'lemon'],
['๐', 'banana'],
['๐', 'watermelon'],
['๐', 'grapes'],
['๐', 'strawberry'],
['๐', 'melon'],
['๐', 'cherries'],
['๐', 'peach'],
['๐', 'pineapple'],
['๐ฅ', 'kiwi_fruit'],
['๐ฅ', 'avocado'],
['๐
', 'tomato'],
['๐', 'eggplant'],
['๐ฅ', 'cucumber'],
['๐ฅ', 'carrot'],
['๐ฝ', 'corn'],
['๐ถ', 'hot_pepper'],
['๐ฅ', 'potato'],
['๐ ', 'sweet_potato'],
['๐ฐ', 'chestnut'],
['๐ฅ', 'peanuts'],
['๐ฏ', 'honey_pot'],
['๐ฅ', 'croissant'],
['๐', 'bread'],
['๐ฅ', 'baguette_bread'],
['๐ง', 'cheese'],
['๐ฅ', 'egg'],
['๐ณ', 'fried_egg'],
['๐ฅ', 'bacon'],
['๐ฅ', 'pancakes'],
['๐ค', 'fried_shrimp'],
['๐', 'poultry_leg'],
['๐', 'meat_on_bone'],
['๐', 'pizza'],
['๐ญ', 'hotdog'],
['๐', 'hamburger'],
['๐', 'fries'],
['๐ฅ', 'stuffed_flatbread'],
['๐ฎ', 'taco'],
['๐ฏ', 'burrito'],
['๐ฅ', 'green_salad'],
['๐ฅ', 'shallow_pan_of_food'],
['๐', 'spaghetti'],
['๐', 'ramen'],
['๐ฒ', 'stew'],
['๐ฅ', 'fish_cake'],
['๐ฃ', 'sushi'],
['๐ฑ', 'bento'],
['๐', 'curry'],
['๐', 'rice'],
['๐', 'rice_ball'],
['๐', 'rice_cracker'],
['๐ข', 'oden'],
['๐ก', 'dango'],
['๐ง', 'shaved_ice'],
['๐จ', 'ice_cream'],
['๐ฆ', 'icecream'],
['๐ฐ', 'cake'],
['๐', 'birthday'],
['๐ฎ', 'custard'],
['๐ญ', 'lollipop'],
['๐ฌ', 'candy'],
['๐ซ', 'chocolate_bar'],
['๐ฟ', 'popcorn'],
['๐ฉ', 'doughnut'],
['๐ช', 'cookie'],
['๐ฅ', 'milk_glass'],
['๐ผ', 'baby_bottle'],
['โ๏ธ', 'coffee'],
['๐ต', 'tea'],
['๐ถ', 'sake'],
['๐บ', 'beer'],
['๐ป', 'beers'],
['๐ฅ', 'clinking_glasses'],
['๐ท', 'wine_glass'],
['๐ฅ', 'tumbler_glass'],
['๐ธ', 'cocktail'],
['๐น', 'tropical_drink'],
['๐พ', 'champagne'],
['๐ฅ', 'spoon'],
['๐ด', 'fork_and_knife'],
['๐ฝ', 'plate_with_cutlery']
],
name: 'Foods',
icon: ['๐', 'hamburger']
},
{
emojis: [
['โฝ๏ธ', 'soccer'],
['๐', 'basketball'],
['๐', 'football'],
['โพ๏ธ', 'baseball'],
['๐พ', 'tennis'],
['๐', 'volleyball'],
['๐', 'rugby_football'],
['๐ฑ', '8ball'],
['๐', 'ping_pong'],
['๐ธ', 'badminton'],
['๐ฅ
', 'goal_net'],
['๐', 'ice_hockey'],
['๐', 'field_hockey'],
['๐', 'cricket'],
['โณ๏ธ', 'golf'],
['๐น', 'bow_and_arrow'],
['๐ฃ', 'fishing_pole_and_fish'],
['๐ฅ', 'boxing_glove'],
['๐ฅ', 'martial_arts_uniform'],
['โธ', 'ice_skate'],
['๐ฟ', 'ski'],
['โท', 'skier'],
['๐', 'snowboarder'],
['๐๏ธโโ๏ธ', 'weight_lifting_woman'],
['๐', 'weight_lifting_man'],
['๐คบ', 'person_fencing'],
['๐คผโโ', 'women_wrestling'],
['๐คผโโ', 'men_wrestling'],
['๐คธโโ', 'woman_cartwheeling'],
['๐คธโโ', 'man_cartwheeling'],
['โน๏ธโโ๏ธ', 'basketball_woman'],
['โน', 'basketball_man'],
['๐คพโโ', 'woman_playing_handball'],
['๐คพโโ', 'man_playing_handball'],
['๐๏ธโโ๏ธ', 'golfing_woman'],
['๐', 'golfing_man'],
['๐โโ', 'surfing_woman'],
['๐', 'surfing_man'],
['๐โโ', 'swimming_woman'],
['๐', 'swimming_man'],
['๐คฝโโ', 'woman_playing_water_polo'],
['๐คฝโโ', 'man_playing_water_polo'],
['๐ฃโโ', 'rowing_woman'],
['๐ฃ', 'rowing_man'],
['๐', 'horse_racing'],
['๐ดโโ', 'biking_woman'],
['๐ด', 'biking_man'],
['๐ตโโ', 'mountain_biking_woman'],
['๐ต', 'mountain_biking_man'],
['๐ฝ', 'running_shirt_with_sash'],
['๐
', 'medal_sports'],
['๐', 'medal_military'],
['๐ฅ', '1st_place_medal'],
['๐ฅ', '2nd_place_medal'],
['๐ฅ', '3rd_place_medal'],
['๐', 'trophy'],
['๐ต', 'rosette'],
['๐', 'reminder_ribbon'],
['๐ซ', 'ticket'],
['๐', 'tickets'],
['๐ช', 'circus_tent'],
['๐คนโโ', 'woman_juggling'],
['๐คนโโ', 'man_juggling'],
['๐ญ', 'performing_arts'],
['๐จ', 'art'],
['๐ฌ', 'clapper'],
['๐ค', 'microphone'],
['๐ง', 'headphones'],
['๐ผ', 'musical_score'],
['๐น', 'musical_keyboard'],
['๐ฅ', 'drum'],
['๐ท', 'saxophone'],
['๐บ', 'trumpet'],
['๐ธ', 'guitar'],
['๐ป', 'violin'],
['๐ฒ', 'game_die'],
['๐ฏ', 'dart'],
['๐ณ', 'bowling'],
['๐ฎ', 'video_game'],
['๐ฐ', 'slot_machine']
],
name: 'Activity',
icon: ['โฝ๏ธ', 'soccer']
},
{
emojis: [
['๐', 'car'],
['๐', 'taxi'],
['๐', 'blue_car'],
['๐', 'bus'],
['๐', 'trolleybus'],
['๐', 'racing_car'],
['๐', 'police_car'],
['๐', 'ambulance'],
['๐', 'fire_engine'],
['๐', 'minibus'],
['๐', 'truck'],
['๐', 'articulated_lorry'],
['๐', 'tractor'],
['๐ด', 'kick_scooter'],
['๐ฒ', 'bike'],
['๐ต', 'motor_scooter'],
['๐', 'motorcycle'],
['๐จ', 'rotating_light'],
['๐', 'oncoming_police_car'],
['๐', 'oncoming_bus'],
['๐', 'oncoming_automobile'],
['๐', 'oncoming_taxi'],
['๐ก', 'aerial_tramway'],
['๐ ', 'mountain_cableway'],
['๐', 'suspension_railway'],
['๐', 'railway_car'],
['๐', 'train'],
['๐', 'mountain_railway'],
['๐', 'monorail'],
['๐', 'bullettrain_side'],
['๐
', 'bullettrain_front'],
['๐', 'light_rail'],
['๐', 'steam_locomotive'],
['๐', 'train2'],
['๐', 'metro'],
['๐', 'tram'],
['๐', 'station'],
['๐', 'helicopter'],
['๐ฉ', 'small_airplane'],
['โ๏ธ', 'airplane'],
['๐ซ', 'flight_departure'],
['๐ฌ', 'flight_arrival'],
['๐', 'rocket'],
['๐ฐ', 'artificial_satellite'],
['๐บ', 'seat'],
['๐ถ', 'canoe'],
['โต๏ธ', 'boat'],
['๐ฅ', 'motor_boat'],
['๐ค', 'speedboat'],
['๐ณ', 'passenger_ship'],
['โด', 'ferry'],
['๐ข', 'ship'],
['โ๏ธ', 'anchor'],
['๐ง', 'construction'],
['โฝ๏ธ', 'fuelpump'],
['๐', 'busstop'],
['๐ฆ', 'vertical_traffic_light'],
['๐ฅ', 'traffic_light'],
['๐บ', 'world_map'],
['๐ฟ', 'moyai'],
['๐ฝ', 'statue_of_liberty'],
['โฒ๏ธ', 'fountain'],
['๐ผ', 'tokyo_tower'],
['๐ฐ', 'european_castle'],
['๐ฏ', 'japanese_castle'],
['๐', 'stadium'],
['๐ก', 'ferris_wheel'],
['๐ข', 'roller_coaster'],
['๐ ', 'carousel_horse'],
['โฑ', 'parasol_on_ground'],
['๐', 'beach_umbrella'],
['๐', 'desert_island'],
['โฐ', 'mountain'],
['๐', 'mountain_snow'],
['๐ป', 'mount_fuji'],
['๐', 'volcano'],
['๐', 'desert'],
['๐', 'camping'],
['โบ๏ธ', 'tent'],
['๐ค', 'railway_track'],
['๐ฃ', 'motorway'],
['๐', 'building_construction'],
['๐ญ', 'factory'],
['๐ ', 'house'],
['๐ก', 'house_with_garden'],
['๐', 'houses'],
['๐', 'derelict_house'],
['๐ข', 'office'],
['๐ฌ', 'department_store'],
['๐ฃ', 'post_office'],
['๐ค', 'european_post_office'],
['๐ฅ', 'hospital'],
['๐ฆ', 'bank'],
['๐จ', 'hotel'],
['๐ช', 'convenience_store'],
['๐ซ', 'school'],
['๐ฉ', 'love_hotel'],
['๐', 'wedding'],
['๐', 'classical_building'],
['โช๏ธ', 'church'],
['๐', 'mosque'],
['๐', 'synagogue'],
['๐', 'kaaba'],
['โฉ', 'shinto_shrine'],
['๐พ', 'japan'],
['๐', 'rice_scene'],
['๐', 'national_park'],
['๐
', 'sunrise'],
['๐', 'sunrise_over_mountains'],
['๐ ', 'stars'],
['๐', 'sparkler'],
['๐', 'fireworks'],
['๐', 'city_sunrise'],
['๐', 'city_sunset'],
['๐', 'cityscape'],
['๐', 'night_with_stars'],
['๐', 'milky_way'],
['๐', 'bridge_at_night'],
['๐', 'foggy']
],
name: 'Places',
icon: ['๐', 'car']
},
{
emojis: [
['โ๏ธ', 'watch'],
['๐ฑ', 'iphone'],
['๐ฒ', 'calling'],
['๐ป', 'computer'],
['โจ๏ธ', 'keyboard'],
['๐ฅ', 'desktop_computer'],
['๐จ', 'printer'],
['๐ฑ', 'computer_mouse'],
['๐ฒ', 'trackball'],
['๐น', 'joystick'],
['๐', 'clamp'],
['๐ฝ', 'minidisc'],
['๐พ', 'floppy_disk'],
['๐ฟ', 'cd'],
['๐', 'dvd'],
['๐ผ', 'vhs'],
['๐ท', 'camera'],
['๐ธ', 'camera_flash'],
['๐น', 'video_camera'],
['๐ฅ', 'movie_camera'],
['๐ฝ', 'film_projector'],
['๐', 'film_strip'],
['๐', 'telephone_receiver'],
['โ๏ธ', 'phone'],
['๐', 'pager'],
['๐ ', 'fax'],
['๐บ', 'tv'],
['๐ป', 'radio'],
['๐', 'studio_microphone'],
['๐', 'level_slider'],
['๐', 'control_knobs'],
['โฑ', 'stopwatch'],
['โฒ', 'timer_clock'],
['โฐ', 'alarm_clock'],
['๐ฐ', 'mantelpiece_clock'],
['โ๏ธ', 'hourglass'],
['โณ', 'hourglass_flowing_sand'],
['๐ก', 'satellite'],
['๐', 'battery'],
['๐', 'electric_plug'],
['๐ก', 'bulb'],
['๐ฆ', 'flashlight'],
['๐ฏ', 'candle'],
['๐', 'wastebasket'],
['๐ข', 'oil_drum'],
['๐ธ', 'money_with_wings'],
['๐ต', 'dollar'],
['๐ด', 'yen'],
['๐ถ', 'euro'],
['๐ท', 'pound'],
['๐ฐ', 'moneybag'],
['๐ณ', 'credit_card'],
['๐', 'gem'],
['โ๏ธ', 'balance_scale'],
['๐ง', 'wrench'],
['๐จ', 'hammer'],
['โ', 'hammer_and_pick'],
['๐ ', 'hammer_and_wrench'],
['โ', 'pick'],
['๐ฉ', 'nut_and_bolt'],
['โ๏ธ', 'gear'],
['โ', 'chains'],
['๐ซ', 'gun'],
['๐ฃ', 'bomb'],
['๐ช', 'hocho'],
['๐ก', 'dagger'],
['โ๏ธ', 'crossed_swords'],
['๐ก', 'shield'],
['๐ฌ', 'smoking'],
['โฐ๏ธ', 'coffin'],
['โฑ๏ธ', 'funeral_urn'],
['๐บ', 'amphora'],
['๐ฎ', 'crystal_ball'],
['๐ฟ', 'prayer_beads'],
['๐', 'barber'],
['โ๏ธ', 'alembic'],
['๐ญ', 'telescope'],
['๐ฌ', 'microscope'],
['๐ณ', 'hole'],
['๐', 'pill'],
['๐', 'syringe'],
['๐ก', 'thermometer'],
['๐ฝ', 'toilet'],
['๐ฐ', 'potable_water'],
['๐ฟ', 'shower'],
['๐', 'bathtub'],
['๐', 'bath'],
['๐', 'bellhop_bell'],
['๐', 'key'],
['๐', 'old_key'],
['๐ช', 'door'],
['๐', 'couch_and_lamp'],
['๐', 'bed'],
['๐', 'sleeping_bed'],
['๐ผ', 'framed_picture'],
['๐', 'shopping'],
['๐', 'shopping_cart'],
['๐', 'gift'],
['๐', 'balloon'],
['๐', 'flags'],
['๐', 'ribbon'],
['๐', 'confetti_ball'],
['๐', 'tada'],
['๐', 'dolls'],
['๐ฎ', 'izakaya_lantern'],
['๐', 'wind_chime'],
['โ๏ธ', 'email'],
['๐ฉ', 'envelope_with_arrow'],
['๐จ', 'incoming_envelope'],
['๐ง', 'e-mail'],
['๐', 'love_letter'],
['๐ฅ', 'inbox_tray'],
['๐ค', 'outbox_tray'],
['๐ฆ', 'package'],
['๐ท', 'label'],
['๐ช', 'mailbox_closed'],
['๐ซ', 'mailbox'],
['๐ฌ', 'mailbox_with_mail'],
['๐ญ', 'mailbox_with_no_mail'],
['๐ฎ', 'postbox'],
['๐ฏ', 'postal_horn'],
['๐', 'scroll'],
['๐', 'page_with_curl'],
['๐', 'page_facing_up'],
['๐', 'bookmark_tabs'],
['๐', 'bar_chart'],
['๐', 'chart_with_upwards_trend'],
['๐', 'chart_with_downwards_trend'],
['๐', 'spiral_notepad'],
['๐', 'spiral_calendar'],
['๐', 'calendar'],
['๐
', 'date'],
['๐', 'card_index'],
['๐', 'card_file_box'],
['๐ณ', 'ballot_box'],
['๐', 'file_cabinet'],
['๐', 'clipboard'],
['๐', 'file_folder'],
['๐', 'open_file_folder'],
['๐', 'card_index_dividers'],
['๐', 'newspaper_roll'],
['๐ฐ', 'newspaper'],
['๐', 'notebook'],
['๐', 'notebook_with_decorative_cover'],
['๐', 'ledger'],
['๐', 'closed_book'],
['๐', 'green_book'],
['๐', 'blue_book'],
['๐', 'orange_book'],
['๐', 'books'],
['๐', 'book'],
['๐', 'bookmark'],
['๐', 'link'],
['๐', 'paperclip'],
['๐', 'paperclips'],
['๐', 'triangular_ruler'],
['๐', 'straight_ruler'],
['๐', 'pushpin'],
['๐', 'round_pushpin'],
['โ๏ธ', 'scissors'],
['๐', 'pen'],
['๐', 'fountain_pen'],
['โ๏ธ', 'black_nib'],
['๐', 'paintbrush'],
['๐', 'crayon'],
['๐', 'memo'],
['โ๏ธ', 'pencil2'],
['๐', 'mag'],
['๐', 'mag_right'],
['๐', 'lock_with_ink_pen'],
['๐', 'closed_lock_with_key'],
['๐', 'lock'],
['๐', 'unlock']
],
name: 'Objects',
icon: ['๐', 'bell']
},
{
emojis: [
['โค๏ธ', 'heart'],
['๐', 'yellow_heart'],
['๐', 'green_heart'],
['๐', 'blue_heart'],
['๐', 'purple_heart'],
['๐ค', 'black_heart'],
['๐', 'broken_heart'],
['โฃ๏ธ', 'heavy_heart_exclamation'],
['๐', 'two_hearts'],
['๐', 'revolving_hearts'],
['๐', 'heartbeat'],
['๐', 'heartpulse'],
['๐', 'sparkling_heart'],
['๐', 'cupid'],
['๐', 'gift_heart'],
['๐', 'heart_decoration'],
['โฎ๏ธ', 'peace_symbol'],
['โ๏ธ', 'latin_cross'],
['โช๏ธ', 'star_and_crescent'],
['๐', 'om'],
['โธ๏ธ', 'wheel_of_dharma'],
['โก๏ธ', 'star_of_david'],
['๐ฏ', 'six_pointed_star'],
['๐', 'menorah'],
['โฏ๏ธ', 'yin_yang'],
['โฆ๏ธ', 'orthodox_cross'],
['๐', 'place_of_worship'],
['โ', 'ophiuchus'],
['โ๏ธ', 'aries'],
['โ๏ธ', 'taurus'],
['โ๏ธ', 'gemini'],
['โ๏ธ', 'cancer'],
['โ๏ธ', 'leo'],
['โ๏ธ', 'virgo'],
['โ๏ธ', 'libra'],
['โ๏ธ', 'scorpius'],
['โ๏ธ', 'sagittarius'],
['โ๏ธ', 'capricorn'],
['โ๏ธ', 'aquarius'],
['โ๏ธ', 'pisces'],
['๐', 'id'],
['โ๏ธ', 'atom_symbol'],
['๐', 'accept'],
['โข๏ธ', 'radioactive'],
['โฃ๏ธ', 'biohazard'],
['๐ด', 'mobile_phone_off'],
['๐ณ', 'vibration_mode'],
['๐ถ', 'u6709'],
['๐๏ธ', 'u7121'],
['๐ธ', 'u7533'],
['๐บ', 'u55b6'],
['๐ท๏ธ', 'u6708'],
['โด๏ธ', 'eight_pointed_black_star'],
['๐', 'vs'],
['๐ฎ', 'white_flower'],
['๐', 'ideograph_advantage'],
['ใ๏ธ', 'secret'],
['ใ๏ธ', 'congratulations'],
['๐ด', 'u5408'],
['๐ต', 'u6e80'],
['๐น', 'u5272'],
['๐ฒ', 'u7981'],
['๐
ฐ๏ธ', 'a'],
['๐
ฑ๏ธ', 'b'],
['๐', 'ab'],
['๐', 'cl'],
['๐
พ๏ธ', 'o2'],
['๐', 'sos'],
['โ', 'x'],
['โญ๏ธ', 'o'],
['๐', 'stop_sign'],
['โ๏ธ', 'no_entry'],
['๐', 'name_badge'],
['๐ซ', 'no_entry_sign'],
['๐ฏ', '100'],
['๐ข', 'anger'],
['โจ๏ธ', 'hotsprings'],
['๐ท', 'no_pedestrians'],
['๐ฏ', 'do_not_litter'],
['๐ณ', 'no_bicycles'],
['๐ฑ', 'non-potable_water'],
['๐', 'underage'],
['๐ต', 'no_mobile_phones'],
['๐ญ', 'no_smoking'],
['โ๏ธ', 'exclamation'],
['โ', 'grey_exclamation'],
['โ', 'question'],
['โ', 'grey_question'],
['โผ๏ธ', 'bangbang'],
['โ๏ธ', 'interrobang'],
['๐
', 'low_brightness'],
['๐', 'high_brightness'],
['ใฝ๏ธ', 'part_alternation_mark'],
['โ ๏ธ', 'warning'],
['๐ธ', 'children_crossing'],
['๐ฑ', 'trident'],
['โ๏ธ', 'fleur_de_lis'],
['๐ฐ', 'beginner'],
['โป๏ธ', 'recycle'],
['โ
', 'white_check_mark'],
['๐ฏ๏ธ', 'u6307'],
['๐น', 'chart'],
['โ๏ธ', 'sparkle'],
['โณ๏ธ', 'eight_spoked_asterisk'],
['โ', 'negative_squared_cross_mark'],
['๐', 'globe_with_meridians'],
['๐ ', 'diamond_shape_with_a_dot_inside'],
['โ๏ธ', 'm'],
['๐', 'cyclone'],
['๐ค', 'zzz'],
['๐ง', 'atm'],
['๐พ', 'wc'],
['โฟ๏ธ', 'wheelchair'],
['๐
ฟ๏ธ', 'parking'],
['๐ณ', 'u7a7a'],
['๐๏ธ', 'sa'],
['๐', 'passport_control'],
['๐', 'customs'],
['๐', 'baggage_claim'],
['๐
', 'left_luggage'],
['๐น', 'mens'],
['๐บ', 'womens'],
['๐ผ', 'baby_symbol'],
['๐ป', 'restroom'],
['๐ฎ', 'put_litter_in_its_place'],
['๐ฆ', 'cinema'],
['๐ถ', 'signal_strength'],
['๐', 'koko'],
['๐ฃ', 'symbols'],
['โน๏ธ', 'information_source'],
['๐ค', 'abc'],
['๐ก', 'abcd'],
['๐ ', 'capital_abcd'],
['๐', 'ng'],
['๐', 'ok'],
['๐', 'up'],
['๐', 'cool'],
['๐', 'new'],
['๐', 'free'],
['0๏ธโฃ', 'zero'],
['1๏ธโฃ', 'one'],
['2๏ธโฃ', 'two'],
['3๏ธโฃ', 'three'],
['4๏ธโฃ', 'four'],
['5๏ธโฃ', 'five'],
['6๏ธโฃ', 'six'],
['7๏ธโฃ', 'seven'],
['8๏ธโฃ', 'eight'],
['9๏ธโฃ', 'nine'],
['๐', 'keycap_ten'],
['๐ข', '1234'],
['#๏ธโฃ', 'hash'],
['*๏ธโฃ', 'asterisk'],
['โถ๏ธ', 'arrow_forward'],
['โธ', 'pause_button'],
['โฏ', 'play_or_pause_button'],
['โน', 'stop_button'],
['โบ', 'record_button'],
['โญ', 'next_track_button'],
['โฎ', 'previous_track_button'],
['โฉ', 'fast_forward'],
['โช', 'rewind'],
['โซ', 'arrow_double_up'],
['โฌ', 'arrow_double_down'],
['โ๏ธ', 'arrow_backward'],
['๐ผ', 'arrow_up_small'],
['๐ฝ', 'arrow_down_small'],
['โก๏ธ', 'arrow_right'],
['โฌ
๏ธ', 'arrow_left'],
['โฌ๏ธ', 'arrow_up'],
['โฌ๏ธ', 'arrow_down'],
['โ๏ธ', 'arrow_upper_right'],
['โ๏ธ', 'arrow_lower_right'],
['โ๏ธ', 'arrow_lower_left'],
['โ๏ธ', 'arrow_upper_left'],
['โ๏ธ', 'arrow_up_down'],
['โ๏ธ', 'left_right_arrow'],
['โช๏ธ', 'arrow_right_hook'],
['โฉ๏ธ', 'leftwards_arrow_with_hook'],
['โคด๏ธ', 'arrow_heading_up'],
['โคต๏ธ', 'arrow_heading_down'],
['๐', 'twisted_rightwards_arrows'],
['๐', 'repeat'],
['๐', 'repeat_one'],
['๐', 'arrows_counterclockwise'],
['๐', 'arrows_clockwise'],
['๐ต', 'musical_note'],
['๐ถ', 'notes'],
['โ', 'heavy_plus_sign'],
['โ', 'heavy_minus_sign'],
['โ', 'heavy_division_sign'],
['โ๏ธ', 'heavy_multiplication_x'],
['๐ฒ', 'heavy_dollar_sign'],
['๐ฑ', 'currency_exchange'],
['โข๏ธ', 'tm'],
['ยฉ๏ธ', 'copyright'],
['ยฎ๏ธ', 'registered'],
['ใฐ๏ธ', 'wavy_dash'],
['โฐ', 'curly_loop'],
['โฟ', 'loop'],
['๐', 'end'],
['๐', 'back'],
['๐', 'on'],
['๐', 'top'],
['๐', 'soon'],
['โ๏ธ', 'heavy_check_mark'],
['โ๏ธ', 'ballot_box_with_check'],
['๐', 'radio_button'],
['โช๏ธ', 'white_circle'],
['โซ๏ธ', 'black_circle'],
['๐ด', 'red_circle'],
['๐ต', 'large_blue_circle'],
['๐บ', 'small_red_triangle'],
['๐ป', 'small_red_triangle_down'],
['๐ธ', 'small_orange_diamond'],
['๐น', 'small_blue_diamond'],
['๐ถ', 'large_orange_diamond'],
['๐ท', 'large_blue_diamond'],
['๐ณ', 'white_square_button'],
['๐ฒ', 'black_square_button'],
['โช๏ธ', 'black_small_square'],
['โซ๏ธ', 'white_small_square'],
['โพ๏ธ', 'black_medium_small_square'],
['โฝ๏ธ', 'white_medium_small_square'],
['โผ๏ธ', 'black_medium_square'],
['โป๏ธ', 'white_medium_square'],
['โฌ๏ธ', 'black_large_square'],
['โฌ๏ธ', 'white_large_square'],
['๐', 'speaker'],
['๐', 'mute'],
['๐', 'sound'],
['๐', 'loud_sound'],
['๐', 'bell'],
['๐', 'no_bell'],
['๐ฃ', 'mega'],
['๐ข', 'loudspeaker'],
['๐โ๐จ', 'eye_speech_bubble'],
['๐ฌ', 'speech_balloon'],
['๐ญ', 'thought_balloon'],
['๐ฏ', 'right_anger_bubble'],
['โ ๏ธ', 'spades'],
['โฃ๏ธ', 'clubs'],
['โฅ๏ธ', 'hearts'],
['โฆ๏ธ', 'diamonds'],
['๐', 'black_joker'],
['๐ด', 'flower_playing_cards'],
['๐๏ธ', 'mahjong'],
['๐', 'clock1'],
['๐', 'clock2'],
['๐', 'clock3'],
['๐', 'clock4'],
['๐', 'clock5'],
['๐', 'clock6'],
['๐', 'clock7'],
['๐', 'clock8'],
['๐', 'clock9'],
['๐', 'clock10'],
['๐', 'clock11'],
['๐', 'clock12'],
['๐', 'clock130'],
['๐', 'clock230'],
['๐', 'clock330'],
['๐', 'clock430'],
['๐ ', 'clock530'],
['๐ก', 'clock630'],
['๐ข', 'clock730'],
['๐ฃ', 'clock830'],
['๐ค', 'clock930'],
['๐ฅ', 'clock1030'],
['๐ฆ', 'clock1130'],
['๐ง', 'clock1230']
],
name: 'Symbols',
icon: ['๐ ', 'capital_abcd']
}
];
var EmojiListComponent = /** @class */ (function () {
function EmojiListComponent() {
this.emojiSelectionEmitter = new core.EventEmitter();
}
EmojiListComponent.prototype.selectCategory = function (event) {
this.emojiCategoryComponents.forEach(function (categoryCmp) {
if (categoryCmp['category'].name === event.name) {
categoryCmp.scrollIntoView();
}
});
};
__decorate([
core.ViewChildren(core.forwardRef(function () { return EmojiCategoryComponent; })),
__metadata("design:type", core.QueryList)
], EmojiListComponent.prototype, "emojiCategoryComponents", void 0);
__decorate([
core.Input('emojis'),
__metadata("design:type", Object)
], EmojiListComponent.prototype, "emojis", void 0);
__decorate([
core.Output('emoji-selection'),
__metadata("design:type", Object)
], EmojiListComponent.prototype, "emojiSelectionEmitter", void 0);
EmojiListComponent = __decorate([
core.Component({
selector: 'emoji-list',
template: "\n <div class=\"emoji-list\">\n <ng-container *ngFor=\"let emojiCategory of emojis | notEmptyEmojiCategory\">\n <emoji-category [category]=\"emojiCategory\"></emoji-category>\n <div class=\"emoji-buttons\">\n <emoji-button \n *ngFor=\"let emoji of emojiCategory.emojis\"\n (selection)=\"emojiSelectionEmitter.emit($event)\"\n [emoji]=\"emoji\"></emoji-button>\n </div>\n </ng-container>\n </div>\n ",
styles: [":host{overflow-y:auto}.emoji-list{padding:0 10px 10px}.emoji-buttons{display:flex;justify-content:center;flex-wrap:wrap;margin:5px 0}"]
}),
__metadata("design:paramtypes", [])
], EmojiListComponent);
return EmojiListComponent;
}());
var EmojiContentComponent = /** @class */ (function () {
function EmojiContentComponent() {
this.emojiSelectionEmitter = new core.EventEmitter();
this._emojis = EMOJIS;
this.emojis = this._emojis.slice();
this.emojisCategories = this._emojis.map(function (category) { return Object.assign({}, category, { emojis: [] }); });
}
EmojiContentComponent.prototype.searchHandler = function (value) {
var _this = this;
var filteredEmojis = this.emojisCategories.map(function (category) { return Object.assign({}, category, { emojis: [] }); });
value = value.replace(/-/g, '').toLowerCase();
Object.keys(this._emojis).forEach(function (i) {
var category = _this._emojis[i];
category.emojis.forEach(function (emoji) {
if (emoji[1].indexOf(value) !== -1) {
filteredEmojis[i].emojis.push(emoji);
}
});
});
this.emojis = filteredEmojis;
};
EmojiContentComponent.prototype.categorySelectionHandler = function (event) {
this.emojiListComponent.selectCategory(event);
};
__decorate([
core.ViewChild(core.forwardRef(function () { return EmojiListComponent; }), { static: true }),
__metadata("design:type", EmojiListComponent)
], EmojiContentComponent.prototype, "emojiListComponent", void 0);
__decorate([
core.Output('emoji-selection'),
__metadata("design:type", Object)
], EmojiContentComponent.prototype, "emojiSelectionEmitter", void 0);
EmojiContentComponent = __decorate([
core.Component({
selector: 'emoji-content',
template: "\n <emoji-header \n [emojisCategories]=\"emojisCategories\"\n (categorySelection)=\"categorySelectionHandler($event)\"\n (search)=\"searchHandler($event)\"></emoji-header>\n <emoji-list [emojis]=\"emojis\" (emoji-selection)=\"emojiSelectionEmitter.emit($event)\"></emoji-list>\n <emoji-footer></emoji-footer>\n ",
styles: [":host{display:flex;flex-direction:column;width:100vw;height:314px;border-radius:3px;background:#fff;text-align:left;box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}@media (min-width:258px){:host{width:258px}}emoji-list{flex-grow:1}"]
}),
__metadata("design:paramtypes", [])
], EmojiContentComponent);
return EmojiContentComponent;
}());
var EmojiFooterComponent = /** @class */ (function () {
function EmojiFooterComponent() {
}
EmojiFooterComponent = __decorate([
core.Component({
selector: 'emoji-footer',
template: "\n <footer class=\"emoji-footer\"></footer>\n ",
styles: [".emoji-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #f9f9f9;border-radius:0 0 3px 3px;padding:10px;background:#fcfcfc}"]
}),
__metadata("design:paramtypes", [])
], EmojiFooterComponent);
return EmojiFooterComponent;
}());
var EmojiHeaderComponent = /** @class */ (function () {
function EmojiHeaderComponent() {
this.categorySelection = new core.EventEmitter();
this.searchEmitter = new core.EventEmitter();
}
__decorate([
core.Input('emojisCategories'),
__metadata("design:type", Object)
], EmojiHeaderComponent.prototype, "emojisCategories", void 0);
__decorate([
core.Output('categorySelection'),
__metadata("design:type", Object)
], EmojiHeaderComponent.prototype, "categorySelection", void 0);
__decorate([
core.Output('search'),
__metadata("design:type", Object)
], EmojiHeaderComponent.prototype, "searchEmitter", void 0);
EmojiHeaderComponent = __decorate([
core.Component({
selector: 'emoji-header',
template: "\n <emoji-categories [emojisCategories]=\"emojisCategories\" (categorySelection)=\"categorySelection.emit($event)\"></emoji-categories>\n <emoji-search (search)=\"searchEmitter.emit($event)\"></emoji-search>\n ",
styles: [":host{display:block;border-bottom:1px solid #f9f9f9;border-radius:3px 3px 0 0;padding:10px;background:#fcfcfc}"]
}),
__metadata("design:paramtypes", [])
], EmojiHeaderComponent);
return EmojiHeaderComponent;
}());
var EmojiSearchComponent = /** @class */ (function () {
function EmojiSearchComponent() {
var _this = this;
this.searchEmitter = new core.EventEmitter();
this._searchValue = new rxjs.Subject();
this._destroyed = new rxjs.Subject();
this._searchValue.pipe(operators.takeUntil(this._destroyed)).subscribe(function (value) {
_this.searchEmitter.emit(value);
});
}
EmojiSearchComponent.prototype.handleInputChange = function (event) {
this._searchValue.next(event);
};
EmojiSearchComponent.prototype.ngOnDestroy = function () {
this._destroyed.next(true);
};
__decorate([
core.Output("search"),
__metadata("design:type", core.EventEmitter)
], EmojiSearchComponent.prototype, "searchEmitter", void 0);
__decorate([
core.ViewChild("input", { static: true }),
__metadata("design:type", core.ElementRef)
], EmojiSearchComponent.prototype, "input", void 0);
EmojiSearchComponent = __decorate([
core.Component({
selector: "emoji-search",
template: "\n <input\n type=\"text\"\n autocomplete=\"off\"\n #input\n (input)=\"handleInputChange($event.target.value)\"\n aria-label=\"Search\"\n placeholder=\"Search\"\n />\n ",
styles: ["input{width:100%;padding:5px 10px;border:1px solid #f0f0f0;outline:0;font-size:14px;font-weight:inherit;box-sizing:border-box}input:focus{border-color:#d7d7d7}"]
}),
__metadata("design:paramtypes", [])
], EmojiSearchComponent);
return EmojiSearchComponent;
}());
var DIRECTIONS;
(function (DIRECTIONS) {
DIRECTIONS[DIRECTIONS["top"] = 0] = "top";
DIRECTIONS[DIRECTIONS["bottom"] = 1] = "bottom";
DIRECTIONS[DIRECTIONS["left"] = 2] = "left";
DIRECTIONS[DIRECTIONS["right"] = 3] = "right";
})(DIRECTIONS || (DIRECTIONS = {}));
var EmojiPickerComponent = /** @class */ (function () {
function EmojiPickerComponent(_renderer, _el) {
var _this = this;
this._renderer = _renderer;
this._el = _el;
this.selectionEmitter = new core.EventEmitter();
this.pickerCloseEmitter = new core.EventEmitter();
this._windowResize = new rxjs.Subject();
this._destroyed = new rxjs.Subject();
this._windowResize
.pipe(operators.takeUntil(this._destroyed), operators.debounceTime(100))
.subscribe(function (event) {
_this.setPosition(_this._currentTarget, _this._currentDirection);
});
}
EmojiPickerComponent.prototype.hide = function () {
this._renderer.setStyle(this._el.nativeElement, "display", "none");
};
EmojiPickerComponent.prototype.show = function () {
this._renderer.setStyle(this._el.nativeElement, "display", "block");
this.setPosition(this._currentTarget, this._currentDirection);
};
EmojiPickerComponent.prototype.setPosition = function (target, directionCode) {
if (directionCode === void 0) { directionCode = DIRECTIONS.bottom; }
if (!target) {
return console.error("Emoji-Picker: positioning failed due to missing target element or direction code");
}
this._renderer.setStyle(this._el.nativeElement, "transform", "");
/** Store anchor and direction */
this._currentTarget = target;
this._currentDirection = directionCode;
var targetBorders = target.nativeElement.getBoundingClientRect(), thisBorders = this._el.nativeElement.getBoundingClientRect();
var heightCorrection = 0, widthCorrection = 0;
/** Setting up centering of picker for all cases */
switch (this._currentDirection) {
case DIRECTIONS.top:
case DIRECTIONS.bottom:
widthCorrection =
targetBorders.left -
thisBorders.left +
(targetBorders.width - thisBorders.width) / 2;
break;
case DIRECTIONS.left:
case DIRECTIONS.right:
heightCorrection =
targetBorders.top -
thisBorders.top +
(targetBorders.height - thisBorders.height) / 2;
break;
}
/** Setting up relative positioning for all cases */
switch (this._currentDirection) {
case DIRECTIONS.top:
heightCorrection = targetBorders.top - thisBorders.bottom;
break;
case DIRECTIONS.left:
widthCorrection = targetBorders.left - thisBorders.right;
break;
case DIRECTIONS.right:
widthCorrection = targetBorders.right - thisBorders.left;
break;
case DIRECTIONS.bottom:
heightCorrection = targetBorders.bottom - thisBorders.top;
break;
}
/** Correcting positioning due to overflow problems */
if (thisBorders.bottom + heightCorrection > window.innerHeight) {
heightCorrection +=
window.innerHeight - (thisBorders.bottom + heightCorrection);
}
if (thisBorders.top + heightCorrection < 0) {
heightCorrection -= thisBorders.top + heightCorrection;
}
if (thisBorders.right + widthCorrection > window.innerWidth) {
widthCorrection +=
window.innerWidth - (thisBorders.right + widthCorrection);
}
if (thisBorders.left + widthCorrection < 0) {
widthCorrection -= thisBorders.left + widthCorrection;
}
/** set the position adjustments to the emoji picker element */
this._renderer.setStyle(this._el.nativeElement, "transform", "translate(" + widthCorrection + "px," + heightCorrection + "px)");
};
EmojiPickerComponent.prototype.onBackground = function (event) {
/** internal mousedowns are ignored */
if (event === this._lastHostMousedownEvent || event.emojiPickerExempt) {
return;
}
this.pickerCloseEmitter.emit(event);
};
EmojiPickerComponent.prototype.ngOnDestroy = function () {
this._destroyed.next(true);
};
EmojiPickerComponent.ctorParameters = function () { return [
{ type: core.Renderer2 },
{ type: core.ElementRef }
]; };
__decorate([
core.Output("emoji-select"),
__metadata("design:type", Object)
], EmojiPickerComponent.prototype, "selectionEmitter", void 0);
__decorate([
core.Output("picker-close"),
__metadata("design:type", Object)
], EmojiPickerComponent.prototype, "pickerCloseEmitter", void 0);
EmojiPickerComponent = __decorate([
core.Component({
selector: "emoji-picker",
template: "\n <emoji-content\n (emoji-selection)=\"selectionEmitter.emit($event)\"\n ></emoji-content>\n ",
host: {
"(document:click)": "onBackground($event)",
"(click)": "_lastHostMousedownEvent = $event",
"(window:resize)": "_windowResize.next($event)",
},
styles: [":host { position: absolute; z-index: 9999; display: none; }"]
}),
__metadata("design:paramtypes", [core.Renderer2, core.ElementRef])
], EmojiPickerComponent);
return EmojiPickerComponent;
}());
var EmojiEvent = /** @class */ (function () {
function EmojiEvent(data) {
Object.assign(this, data);
}
EmojiEvent.fromArray = function (emojiArray) {
return new EmojiEvent({ char: emojiArray[0], label: emojiArray[1] });
};
return EmojiEvent;
}());
var EmojiPickerApiDirective = /** @class */ (function () {
function EmojiPickerApiDirective(_cfr, _vcr, _el) {
var _this = this;
this._cfr = _cfr;
this._vcr = _vcr;
this._el = _el;
this._directionCode = DIRECTIONS.bottom;
this._searchBar = false;
this.emojiPickerIfEmitter = new core.EventEmitter();
this.selectEmitter = new core.EventEmitter();
this._emojiPickerOpenState = new rxjs.Subject();
this._destroyed = new rxjs.Subject();
this._emojiSubs = [];
this.initPicker();
this._emojiPickerOpenState
.pipe(operators.takeUntil(this._destroyed), operators.distinctUntilChanged())
.subscribe(function (value) {
var _a, _b, _c, _d, _e, _f;
if (value) {
(_c = (_b = (_a = _this._emojiPickerRef) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.show) === null || _c === void 0 ? void 0 : _c.call(_b);
}
else {
(_f = (_e = (_d = _this._emojiPickerRef) === null || _d === void 0 ? void 0 : _d.instance) === null || _e === void 0 ? void 0 : _e.hide) === null || _f === void 0 ? void 0 : _f.call(_e);
}
});
}
Object.defineProperty(EmojiPickerApiDirective.prototype, "emojiPickerDirection", {
set: function (direction) {
if (DIRECTIONS[direction] === undefined) {
console.error("Emoji-Picker: direction '" + direction + "' passed as input does not exist in DIRECTIONS table, defaulting to 'bottom'");
this._directionCode = DIRECTIONS.bottom;
}
else {
this._directionCode = DIRECTIONS[direction];
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(EmojiPickerApiDirective.prototype, "emojiPickerIf", {
set: function (condition) {
this._emojiPickerOpenState.next(condition);
},
enumerable: true,
configurable: true
});
EmojiPickerApiDirective.prototype.initPicker = function () {
var _this = this;
this._emojiPickerFactory = this._emojiPickerFactory || this._cfr.resolveComponentFactory(EmojiPickerComponent);
this._emojiPickerRef = this._emojiPickerRef || this._vcr.createComponent(this._emojiPickerFactory);
this._emojiPickerRef.instance.setPosition(this._el, this._directionCode);
this._emojiSubs.push(this._emojiPickerRef.instance.pickerCloseEmitter.subscribe(function (event) { return _this.emojiPickerIfEmitter.emit(false); }), this._emojiPickerRef.instance.selectionEmitter.subscribe(function (event) { return _this.selectEmitter.emit(EmojiEvent.fromArray(event)); }));
};
EmojiPickerApiDirective.prototype.closePicker = function () {
if (!this._emojiPickerRef || !this._emojiPickerRef.destroy) {
return;
}
this._emojiSubs.forEach(function (subscription) { return subscription.unsubscribe(); });
this._emojiPickerRef.destroy();
this._emojiSubs = [];
delete this._emojiPickerRef;
};
EmojiPickerApiDirective.prototype.ngOnDestroy = function () {
this._destroyed.next(true);
};
EmojiPickerApiDirective.ctorParameters = function () { return [
{ type: core.ComponentFactoryResolver },
{ type: core.ViewContainerRef },
{ type: core.ElementRef }
]; };
__decorate([
core.Input('emojiPickerDirection'),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], EmojiPickerApiDirective.prototype, "emojiPickerDirection", null);
__decorate([
core.Input('emojiPickerIf'),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], EmojiPickerApiDirective.prototype, "emojiPickerIf", null);
__decorate([
core.Output('emojiPickerIfChange'),
__metadata("design:type", Object)
], EmojiPickerApiDirective.prototype, "emojiPickerIfEmitter", void 0);
__decorate([
core.Output('emojiPickerSelect'),
__metadata("design:type", Object)
], EmojiPickerApiDirective.prototype, "selectEmitter", void 0);
EmojiPickerApiDirective = __decorate([
core.Directive({
selector: '[emojiPickerIf]',
host: {
'(click)': '$event.emojiPickerExempt = true' // marking off event listening on anchor
}
}),
__metadata("design:paramtypes", [core.ComponentFactoryResolver,
core.ViewContainerRef,
core.ElementRef])
], EmojiPickerApiDirective);
return EmojiPickerApiDirective;
}());
var CaretEvent = /** @class */ (function () {
function CaretEvent(data) {
Object.assign(this, data);
}
CaretEvent.prototype.clone = function () {
return new CaretEvent(Object.assign({}, this, {
caretRange: this.caretRange && this.caretRange.cloneRange ? this.caretRange.cloneRange() : this.caretRange
}));
};
CaretEvent.generateNullEvent = function () {
return new CaretEvent({
caretOffset: 0,
textContent: ''
});
};
CaretEvent.comparePropsOfObject = function (r1, r2) {
for (var k in r1) {
if (r1[k] !== r2[k]) {
return false;
}
}
return true;
};
CaretEvent.compare = function (e1, e2) {
var changed =
/** different when either caretRange is omitted while other exists */
(!e1.caretRange && e2.caretRange) ||
(e1.caretRange && !e2.caretRange) ||
/** different when offset has changed */
(e1.caretOffset !== e2.caretOffset) ||
/** different when textContent has changed */
(e1.textContent !== e2.textContent) ||
/** different when range object properties changed */
!this.comparePropsOfObject(e1.caretRange, e2.caretRange);
return !changed;
};
CaretEvent.generateCaretEvent = function (win, doc, element) {
var caretOffset = 0, sel, caretRange, textContent = element.textContent;
if (element.tagName.toLowerCase() === 'input') {
return new CaretEvent({
caretOffset: element.selectionEnd,
textContent: element.value
});
}
if (typeof win.getSelection != "undefined") {
sel = win.getSelection();
if (sel.rangeCount > 0) {
var range = win.getSelection().getRangeAt(0);
var preCaretRange = range.cloneRange();
preCaretRange.selectNodeContents(element);
preCaretRange.setEnd(range.endContainer, range.endOffset);
caretOffset = preCaretRange.toString().length;
/** Keeping a reference of the range to emit */
caretRange = range.cloneRange();
}
}
else if ((sel = doc.selection) && sel.type != "Control") {
var textRange = sel.createRange();
var preCaretTextRange = doc.body.createTextRange();
preCaretTextRange.moveToElementText(element);
preCaretTextRange.setEndPoint("EndToEnd", textRange);
caretOffset = preCaretTextRange.text.length;
/** Keeping a reference of the range to emit and making it compatible */
caretRange = textRange.duplicate();
caretRange.insertNode = function (e) {
var container = document.createElement("div");
container.appendChild(e);
caretRange.pasteHTML(container.innerHTML);
};
}
return new CaretEvent({
caretOffset: caretOffset,
caretRange: caretRange,
textContent: textContent
});
};
return CaretEvent;
}());
var EmojiPickerCaretDirective = /** @class */ (function () {
function EmojiPickerCaretDirective(_el) {
var _this = this;
this._el = _el;
this.caretEmitter = new core.EventEmitter();
this._caretEvent$ = new rxjs.Subject();
this._destroyed$ = new rxjs.Subject();
this._lastCaretEvent = CaretEvent.generateNullEvent();
this._caretEvent$
.pipe(operators.takeUntil(this._destroyed$), operators.distinctUntilChanged(function (event1, event2) {
return CaretEvent.compare(event1, event2);
}))
.subscribe(function (event) {
_this.caretEmitter.emit(event);
_this._lastCaretEvent = event.clone();
});
}
Object.defineProperty(EmojiPickerCaretDirective.prototype, "doc", {
get: function () {
if (!this._doc) {
this._doc = this._el.nativeElement.ownerDocument || this._el.nativeElement.document || document;
}
return this._doc;
},
enumerable: true,
configurable: true
});
Object.defineProperty(EmojiPickerCaretDirective.prototype, "win", {
get: function () {
if (!this._win) {
this._win = this.doc.defaultView || this.doc.parentWindow || window;
}
return this._win;
},
enumerable: true,
configurable: true
});
EmojiPickerCaretDirective.prototype.ngOnInit = function () {
if (!this._el.nativeElement.getAttribute('contenteditable') && this._el.nativeElement.tagName.toLowerCase() !== 'input') {
throw new Error('(emojiPickerPositionEmitter) should only work on contenteditable enabled or input elements');
}
};
EmojiPickerCaretDirective.prototype.ngOnDestroy = function () {
this._destroyed$.next(true);
};
EmojiPickerCaretDirective.prototype.updateCaretPosition = function () {
var cEvent = CaretEvent.generateCaretEvent(this.win, this.doc, this._el.nativeElement);
this._caretEvent$.next(cEvent);
};
EmojiPickerCaretDirective.prototype.updateCaretDueMutation = function () {
var _this = this;
var cEvent = CaretEvent.generateCaretEvent(this.win, this.doc, this._el.nativeElement);
var textMovement = cEvent.textContent.length - this._lastCaretEvent.textContent.length;
cEvent.caretOffset = this._lastCaretEvent.caretOffset + textMovement;
/** change detection after DOMSubtreeModified event is weird
* ChangeDetectorRef.detectChanges(), ChangeDetectorRef.markForCheck(), ApplicationRef.tick(), NgZone.run()
* all of those methods did not work as expected.
* As a temporary hack I am emitting an event after a short timeout, which is fine due to the _caretEvent$ smart stream
*/
setTimeout(function () {
_this._caretEvent$.next(cEvent);
});
};
EmojiPickerCaretDirective.ctorParameters = function () { return [
{ type: core.ElementRef }
]; };
__decorate([
core.Output('emojiPickerCaretEmitter'),
__metadata("design:type", Object)
], EmojiPickerCaretDirective.prototype, "caretEmitter", void 0);
EmojiPickerCaretDirective = __decorate([
core.Directive({
selector: '[emojiPickerCaretEmitter]',
host: {
'(keyup)': 'updateCaretPosition()',
'(mouseup)': 'updateCaretPosition()',
'(selectstart)': 'updateCaretPosition()',
'(focus)': 'updateCaretPosition()',
'(DOMSubtreeModified)': 'updateCaretDueMutation($event)'
}
}),
__metadata("design:paramtypes", [core.ElementRef])
], EmojiPickerCaretDirective);
return EmojiPickerCaretDirective;
}());
var EmojiEmptyCategoryPipe = /** @class */ (function () {
function EmojiEmptyCategoryPipe() {
}
EmojiEmptyCategoryPipe.prototype.transform = function (categories) {
return categories.filter(function (category) { return category.emojis.length !== 0; });
};
EmojiEmptyCategoryPipe = __decorate([
core.Pipe({
name: 'notEmptyEmojiCategory'
})
], EmojiEmptyCategoryPipe);
return EmojiEmptyCategoryPipe;
}());
var EmojiFallback = /** @class */ (function () {
function EmojiFallback(domSanitizer) {
this.domSanitizer = domSanitizer;
}
EmojiFallback.prototype.transform = function (emoji) {
return !emoji || this.supportsEmoji() ? emoji : this.domSanitizer.bypassSecurityTrustHtml(twemoji.parse(emoji.trim()));
};
// Solution: https://stackoverflow.com/questions/45576748/how-can-i-detect-rendering-support-for-emoji-in-javascript
EmojiFallback.prototype.supportsEmoji = function () {
var ctx = document.createElement("canvas").getContext("2d");
ctx.fillText("๐", -2, 4);
return ctx.getImageData(0, 0, 1, 1).data[3] > 0;
};
EmojiFallback.ctorParameters = function () { return [
{ type: platformBrowser.DomSanitizer }
]; };
EmojiFallback = __decorate([
core.Pipe({
name: 'emojiFallback'
}),
__metadata("design:paramtypes", [platformBrowser.DomSanitizer])
], EmojiFallback);
return EmojiFallback;
}());
var NgxEmojiPickerModule = /** @class */ (function () {
function NgxEmojiPickerModule() {
}
NgxEmojiPickerModule_1 = NgxEmojiPickerModule;
NgxEmojiPickerModule.forRoot = function () {
return {
ngModule: NgxEmojiPickerModule_1,
providers: []
};
};
var NgxEmojiPickerModule_1;
NgxEmojiPickerModule = NgxEmojiPickerModule_1 = __decorate([
core.NgModule({
declarations: [
EmojiPickerApiDirective,
EmojiPickerCaretDirective,
EmojiButtonComponent,
EmojiContentComponent,
EmojiPickerComponent,
EmojiListComponent,
EmojiHeaderComponent,
EmojiSearchComponent,
EmojiCategoriesComponent,
EmojiCategoryComponent,
EmojiFooterComponent,
EmojiEmptyCategoryPipe,
EmojiFallback
],
imports: [
common.CommonModule
],
exports: [
EmojiPickerApiDirective,
EmojiPickerCaretDirective,
EmojiButtonComponent,
EmojiContentComponent,
EmojiPickerComponent,
EmojiListComponent,
EmojiHeaderComponent,
EmojiSearchComponent,
EmojiCategoriesComponent,
EmojiCategoryComponent,
EmojiFooterComponent
],
providers: [],
entryComponents: [EmojiPickerComponent]
})
], NgxEmojiPickerModule);
return NgxEmojiPickerModule;
}());
exports.CaretEvent = CaretEvent;
exports.EmojiButtonComponent = EmojiButtonComponent;
exports.EmojiCategoriesComponent = EmojiCategoriesComponent;
exports.EmojiCategoryComponent = EmojiCategoryComponent;
exports.EmojiContentComponent = EmojiContentComponent;
exports.EmojiEvent = EmojiEvent;
exports.EmojiFooterComponent = EmojiFooterComponent;
exports.EmojiHeaderComponent = EmojiHeaderComponent;
exports.EmojiListComponent = EmojiListComponent;
exports.EmojiPickerApiDirective = EmojiPickerApiDirective;
exports.EmojiPickerCaretDirective = EmojiPickerCaretDirective;
exports.EmojiPickerComponent = EmojiPickerComponent;
exports.EmojiSearchComponent = EmojiSearchComponent;
exports.NgxEmojiPickerModule = NgxEmojiPickerModule;
exports.ษตa = EmojiEmptyCategoryPipe;
exports.ษตb = EmojiFallback;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-emoji-picker.umd.js.map