Skip to content
Snippets Groups Projects
emojiPicker.js 22.8 KiB
Newer Older
/* globals emojisByCategory:true, emojiCategories:true, toneList:true */
/*
 * Mapping category hashes into human readable and translated names
 */
Martin Schoeler's avatar
Martin Schoeler committed
	people: TAPi18n.__('Smileys_and_People'),
	nature: TAPi18n.__('Animals_and_Nature'),
	food: TAPi18n.__('Food_and_Drink'),
	activity: TAPi18n.__('Activity'),
	travel: TAPi18n.__('Travel_and_Places'),
	objects: TAPi18n.__('Objects'),
	symbols: TAPi18n.__('Symbols'),
	flags: TAPi18n.__('Flags')
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
toneList = {
Diego Sampaio's avatar
Diego Sampaio committed
	'raised_hands': 1,
	'clap': 1,
	'wave': 1,
	'thumbsup': 1,
	'thumbsdown': 1,
	'punch': 1,
	'fist': 1,
	'v': 1,
	'ok_hand': 1,
	'raised_hand': 1,
	'open_hands': 1,
	'muscle': 1,
	'pray': 1,
	'point_up': 1,
	'point_up_2': 1,
	'point_down': 1,
	'point_left': 1,
	'point_right': 1,
	'middle_finger': 1,
	'hand_splayed': 1,
	'metal': 1,
	'vulcan': 1,
	'writing_hand': 1,
	'nail_care': 1,
	'ear': 1,
	'nose': 1,
	'baby': 1,
	'boy': 1,
	'girl': 1,
	'man': 1,
	'woman': 1,
	'person_with_blond_hair': 1,
	'older_man': 1,
	'older_woman': 1,
	'man_with_gua_pi_mao': 1,
	'man_with_turban': 1,
	'cop': 1,
	'construction_worker': 1,
	'guardsman': 1,
	'santa': 1,
	'angel': 1,
	'princess': 1,
	'bride_with_veil': 1,
	'walking': 1,
	'runner': 1,
	'dancer': 1,
	'bow': 1,
	'information_desk_person': 1,
	'no_good': 1,
	'ok_woman': 1,
	'raising_hand': 1,
	'person_with_pouting_face': 1,
	'person_frowning': 1,
	'haircut': 1,
	'massage': 1,
	'rowboat': 1,
	'swimmer': 1,
	'surfer': 1,
	'bath': 1,
	'basketball_player': 1,
	'lifter': 1,
	'bicyclist': 1,
	'mountain_bicyclist': 1,
	'horse_racing': 1,
	'spy': 1,
	'prince': 1,
	'mrs_claus': 1,
	'man_in_tuxedo': 1,
	'shrug': 1,
	'face_palm': 1,
	'pregnant_woman': 1,
	'man_dancing': 1,
	'selfie': 1,
	'fingers_crossed': 1,
	'call_me': 1,
	'left_facing_fist': 1,
	'right_facing_fist': 1,
	'raised_back_of_hand': 1,
	'handshake': 1,
	'cartwheel': 1,
	'wrestlers': 1,
	'water_polo': 1,
	'handball': 1,
	'juggling': 1
Diego Sampaio's avatar
Diego Sampaio committed
};
Diego Sampaio's avatar
Diego Sampaio committed

Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
emojisByCategory = {
Diego Sampaio's avatar
Diego Sampaio committed
	'people': [
		'grinning',
		'grimacing',
		'grin',
		'joy',
		'smiley',
		'smile',
		'sweat_smile',
		'laughing',
		'innocent',
		'wink',
		'blush',
		'slight_smile',
		'upside_down',
		'relaxed',
		'yum',
		'relieved',
		'heart_eyes',
		'kissing_heart',
		'kissing',
		'kissing_smiling_eyes',
		'kissing_closed_eyes',
		'stuck_out_tongue_winking_eye',
		'stuck_out_tongue_closed_eyes',
		'stuck_out_tongue',
		'money_mouth',
		'nerd',
		'sunglasses',
		'hugging',
		'smirk',
		'no_mouth',
		'neutral_face',
		'expressionless',
		'unamused',
		'rolling_eyes',
		'thinking',
		'flushed',
		'disappointed',
		'worried',
		'angry',
		'rage',
		'pensive',
		'confused',
		'slight_frown',
		'frowning2',
		'persevere',
		'confounded',
		'tired_face',
		'weary',
		'triumph',
		'open_mouth',
		'scream',
		'fearful',
		'cold_sweat',
		'hushed',
		'frowning',
		'anguished',
		'cry',
		'disappointed_relieved',
		'sleepy',
		'sweat',
		'sob',
		'dizzy_face',
		'astonished',
		'zipper_mouth',
		'mask',
		'thermometer_face',
		'head_bandage',
		'sleeping',
		'zzz',
		'poop',
		'smiling_imp',
		'imp',
		'japanese_ogre',
		'japanese_goblin',
		'skull',
		'ghost',
		'alien',
		'robot',
		'smiley_cat',
		'smile_cat',
		'joy_cat',
		'heart_eyes_cat',
		'smirk_cat',
		'kissing_cat',
		'scream_cat',
		'crying_cat_face',
		'pouting_cat',
		'raised_hands',
		'clap',
		'wave',
		'thumbsup',
		'thumbsdown',
		'punch',
		'fist',
		'v',
		'ok_hand',
		'raised_hand',
		'open_hands',
		'muscle',
		'pray',
		'point_up',
		'point_up_2',
		'point_down',
		'point_left',
		'point_right',
		'middle_finger',
		'hand_splayed',
		'metal',
		'vulcan',
		'writing_hand',
		'nail_care',
		'lips',
		'tongue',
		'ear',
		'nose',
		'eye',
		'eyes',
		'bust_in_silhouette',
		'busts_in_silhouette',
		'speaking_head',
		'baby',
		'boy',
		'girl',
		'man',
		'woman',
		'person_with_blond_hair',
		'older_man',
		'older_woman',
		'man_with_gua_pi_mao',
		'man_with_turban',
		'cop',
		'construction_worker',
		'guardsman',
		'spy',
		'santa',
		'angel',
		'princess',
		'bride_with_veil',
		'walking',
		'runner',
		'dancer',
		'dancers',
		'couple',
		'two_men_holding_hands',
		'two_women_holding_hands',
		'bow',
		'information_desk_person',
		'no_good',
		'ok_woman',
		'raising_hand',
		'person_with_pouting_face',
		'person_frowning',
		'haircut',
		'massage',
		'couple_with_heart',
		'couple_ww',
		'couple_mm',
		'couplekiss',
		'kiss_ww',
		'kiss_mm',
		'family',
		'family_mwg',
		'family_mwgb',
		'family_mwbb',
		'family_mwgg',
		'family_wwb',
		'family_wwg',
		'family_wwgb',
		'family_wwbb',
		'family_wwgg',
		'family_mmb',
		'family_mmg',
		'family_mmgb',
		'family_mmbb',
		'family_mmgg',
		'womans_clothes',
		'shirt',
		'jeans',
		'necktie',
		'dress',
		'bikini',
		'kimono',
		'lipstick',
		'kiss',
		'footprints',
		'high_heel',
		'sandal',
		'boot',
		'mans_shoe',
		'athletic_shoe',
		'womans_hat',
		'tophat',
		'helmet_with_cross',
		'mortar_board',
		'crown',
		'school_satchel',
		'pouch',
		'purse',
		'handbag',
		'briefcase',
		'eyeglasses',
		'dark_sunglasses',
		'ring',
		'closed_umbrella',
		'cowboy',
		'clown',
		'nauseated_face',
		'rofl',
		'drooling_face',
		'lying_face',
		'sneezing_face',
		'prince',
		'man_in_tuxedo',
		'mrs_claus',
		'face_palm',
		'shrug',
		'selfie',
		'man_dancing',
		'call_me',
		'raised_back_of_hand',
		'left_facing_fist',
		'right_facing_fist',
		'handshake',
		'fingers_crossed',
		'pregnant_woman'
Diego Sampaio's avatar
Diego Sampaio committed
	],
	'nature': [
		'dog',
		'cat',
		'mouse',
		'hamster',
		'rabbit',
		'bear',
		'panda_face',
		'koala',
		'tiger',
		'lion_face',
		'cow',
		'pig',
		'pig_nose',
		'frog',
		'octopus',
		'monkey_face',
		'see_no_evil',
		'hear_no_evil',
		'speak_no_evil',
		'monkey',
		'chicken',
		'penguin',
		'bird',
		'baby_chick',
		'hatching_chick',
		'hatched_chick',
		'wolf',
		'boar',
		'horse',
		'unicorn',
		'bee',
		'bug',
		'snail',
		'beetle',
		'ant',
		'spider',
		'scorpion',
		'crab',
		'snake',
		'turtle',
		'tropical_fish',
		'fish',
		'blowfish',
		'dolphin',
		'whale',
		'whale2',
		'crocodile',
		'leopard',
		'tiger2',
		'water_buffalo',
		'ox',
		'cow2',
		'dromedary_camel',
		'camel',
		'elephant',
		'goat',
		'ram',
		'sheep',
		'racehorse',
		'pig2',
		'rat',
		'mouse2',
		'rooster',
		'turkey',
		'dove',
		'dog2',
		'poodle',
		'cat2',
		'rabbit2',
		'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',
		'ear_of_rice',
		'hibiscus',
		'sunflower',
		'rose',
		'tulip',
		'blossom',
		'cherry_blossom',
		'bouquet',
		'mushroom',
		'chestnut',
		'jack_o_lantern',
		'shell',
		'spider_web',
		'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',
		'waxing_gibbous_moon',
		'new_moon_with_face',
		'full_moon_with_face',
		'first_quarter_moon_with_face',
		'last_quarter_moon_with_face',
		'sun_with_face',
		'crescent_moon',
		'star',
		'star2',
		'dizzy',
		'sparkles',
		'comet',
		'sunny',
		'white_sun_small_cloud',
		'partly_sunny',
		'white_sun_cloud',
		'white_sun_rain_cloud',
		'cloud',
		'cloud_rain',
		'thunder_cloud_rain',
		'cloud_lightning',
		'zap',
		'fire',
		'boom',
		'snowflake',
		'cloud_snow',
		'snowman2',
		'snowman',
		'wind_blowing_face',
		'dash',
		'cloud_tornado',
		'fog',
		'umbrella2',
		'umbrella',
		'droplet',
		'sweat_drops',
		'ocean',
		'eagle',
		'duck',
		'bat',
		'shark',
		'owl',
		'fox',
		'butterfly',
		'deer',
		'gorilla',
		'lizard',
		'rhino',
		'wilted_rose',
		'shrimp',
		'squid'
Diego Sampaio's avatar
Diego Sampaio committed
	],
	'food': [
		'green_apple',
		'apple',
		'pear',
		'tangerine',
		'lemon',
		'banana',
		'watermelon',
		'grapes',
		'strawberry',
		'melon',
		'cherries',
		'peach',
		'pineapple',
		'tomato',
		'eggplant',
		'hot_pepper',
		'corn',
		'sweet_potato',
		'honey_pot',
		'bread',
		'cheese',
		'poultry_leg',
		'meat_on_bone',
		'fried_shrimp',
Diego Sampaio's avatar
Diego Sampaio committed
		'hamburger',
		'fries',
		'hotdog',
		'pizza',
		'spaghetti',
		'taco',
		'burrito',
		'ramen',
		'stew',
		'fish_cake',
		'sushi',
		'bento',
		'curry',
		'rice_ball',
		'rice',
		'rice_cracker',
		'oden',
		'dango',
		'shaved_ice',
		'ice_cream',
		'icecream',
		'cake',
		'birthday',
		'custard',
		'candy',
		'lollipop',
		'chocolate_bar',
		'popcorn',
		'doughnut',
		'cookie',
		'beer',
		'beers',
		'wine_glass',
		'cocktail',
		'tropical_drink',
		'champagne',
		'sake',
		'tea',
		'coffee',
		'baby_bottle',
		'fork_and_knife',
		'fork_knife_plate',
		'croissant',
		'avocado',
		'cucumber',
		'bacon',
		'potato',
		'carrot',
		'french_bread',
		'salad',
		'shallow_pan_of_food',
		'stuffed_flatbread',
		'champagne_glass',
		'tumbler_glass',
		'spoon',
		'egg',
		'milk',
		'peanuts',
		'kiwi',
		'pancakes'
Diego Sampaio's avatar
Diego Sampaio committed
	],
	'activity': [
		'soccer',
		'basketball',
		'football',
		'baseball',
		'tennis',
		'volleyball',
		'rugby_football',
		'8ball',
		'golf',
		'golfer',
		'ping_pong',
		'badminton',
		'hockey',
		'field_hockey',
		'cricket',
		'ski',
		'skier',
		'snowboarder',
		'ice_skate',
		'bow_and_arrow',
		'fishing_pole_and_fish',
		'rowboat',
		'swimmer',
		'surfer',
		'bath',
		'basketball_player',
		'lifter',
		'bicyclist',
		'mountain_bicyclist',
		'horse_racing',
		'levitate',
		'trophy',
		'running_shirt_with_sash',
		'medal',
		'military_medal',
		'reminder_ribbon',
		'rosette',
		'ticket',
		'tickets',
		'performing_arts',
		'art',
		'circus_tent',
		'microphone',
		'headphones',
		'musical_score',
		'musical_keyboard',
		'saxophone',
		'trumpet',
		'guitar',
		'violin',
		'clapper',
		'video_game',
		'space_invader',
		'dart',
		'game_die',
		'slot_machine',
		'bowling',
		'cartwheel',
		'juggling',
		'wrestlers',
		'boxing_glove',
		'martial_arts_uniform',
		'water_polo',
		'handball',
		'goal',
		'fencer',
		'first_place',
		'second_place',
		'third_place',
		'drum'
Diego Sampaio's avatar
Diego Sampaio committed
	],
	'travel': [
		'red_car',
		'taxi',
		'blue_car',
		'bus',
		'trolleybus',
		'race_car',
		'police_car',
		'ambulance',
		'fire_engine',
		'minibus',
		'truck',
		'articulated_lorry',
		'tractor',
		'motorcycle',
		'bike',
		'rotating_light',
		'oncoming_police_car',
		'oncoming_bus',
		'oncoming_automobile',
		'oncoming_taxi',
		'aerial_tramway',
		'mountain_cableway',
		'suspension_railway',
		'railway_car',
		'train',
		'monorail',
		'bullettrain_side',
		'bullettrain_front',
		'light_rail',
		'mountain_railway',
		'steam_locomotive',
		'train2',
		'metro',
		'tram',
		'station',
		'helicopter',
		'airplane_small',
		'airplane',
		'airplane_departure',
		'airplane_arriving',
		'sailboat',
		'motorboat',
		'speedboat',
		'ferry',
		'cruise_ship',
		'rocket',
		'satellite_orbital',
		'seat',
		'anchor',
		'construction',
		'fuelpump',
		'busstop',
		'vertical_traffic_light',
		'traffic_light',
		'checkered_flag',
		'ship',
		'ferris_wheel',
		'roller_coaster',
		'carousel_horse',
		'construction_site',
		'foggy',
		'tokyo_tower',
		'factory',
		'fountain',
		'rice_scene',
		'mountain',
		'mountain_snow',
		'mount_fuji',
		'volcano',
		'japan',
		'camping',
		'tent',
		'park',
		'motorway',
		'railway_track',
		'sunrise',
		'sunrise_over_mountains',
		'desert',
		'beach',
		'island',
		'city_sunset',
		'city_dusk',
		'cityscape',
		'night_with_stars',
		'bridge_at_night',
		'milky_way',
		'stars',
		'sparkler',
		'fireworks',
		'rainbow',
		'homes',
		'european_castle',
		'japanese_castle',
		'stadium',
		'statue_of_liberty',
		'house',
		'house_with_garden',
		'house_abandoned',
		'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',
		'shopping_cart',
		'scooter',
		'motor_scooter',
		'canoe'
Diego Sampaio's avatar
Diego Sampaio committed
	],
	'objects': [
		'watch',
		'iphone',
		'calling',
		'computer',
		'keyboard',
		'desktop',
		'printer',
		'mouse_three_button',
		'trackball',
		'joystick',
		'compression',
		'minidisc',
		'floppy_disk',
		'cd',
		'dvd',
		'vhs',
		'camera',
		'camera_with_flash',
		'video_camera',
		'movie_camera',
		'projector',
		'film_frames',
		'telephone_receiver',
		'telephone',
		'pager',
		'fax',
		'tv',
		'radio',
		'microphone2',
		'level_slider',
		'control_knobs',
		'stopwatch',
		'timer',
		'alarm_clock',
		'clock',
		'hourglass_flowing_sand',
		'hourglass',
		'satellite',
		'battery',
		'electric_plug',
		'bulb',
		'flashlight',
		'candle',
		'wastebasket',
		'oil',
		'money_with_wings',
		'dollar',
		'yen',
		'euro',
		'pound',
		'moneybag',
		'credit_card',
		'gem',
		'scales',
		'wrench',
		'hammer',
		'hammer_pick',
		'tools',
		'pick',
		'nut_and_bolt',
		'gear',
		'chains',
		'gun',
		'bomb',
		'knife',
		'dagger',
		'crossed_swords',
		'shield',
		'smoking',
		'skull_crossbones',
		'coffin',
		'urn',
		'amphora',
		'crystal_ball',
		'prayer_beads',
		'barber',
		'alembic',
		'telescope',
		'microscope',
		'hole',
		'pill',
		'syringe',
		'thermometer',
		'label',
		'bookmark',
		'toilet',
		'shower',
		'bathtub',
		'key',
		'key2',
		'couch',
		'sleeping_accommodation',
		'bed',
		'door',
		'bellhop',
		'frame_photo',
		'map',
		'beach_umbrella',
		'moyai',
		'shopping_bags',
		'balloon',
		'flags',
		'ribbon',
		'gift',
		'confetti_ball',
		'tada',
		'dolls',
		'wind_chime',
		'crossed_flags',
		'izakaya_lantern',
		'envelope',
		'envelope_with_arrow',
		'incoming_envelope',
		'e-mail',
		'love_letter',
		'postbox',
		'mailbox_closed',
		'mailbox',
		'mailbox_with_mail',
		'mailbox_with_no_mail',
		'package',
		'postal_horn',
		'inbox_tray',
		'outbox_tray',
		'scroll',
		'page_with_curl',
		'bookmark_tabs',
		'bar_chart',
		'chart_with_upwards_trend',
		'chart_with_downwards_trend',
		'page_facing_up',
		'date',
		'calendar',
		'calendar_spiral',
		'card_index',
		'card_box',
		'ballot_box',
		'file_cabinet',
		'clipboard',
		'notepad_spiral',
		'file_folder',
		'open_file_folder',
		'dividers',
		'newspaper2',
		'newspaper',
		'notebook',
		'closed_book',
		'green_book',
		'blue_book',
		'orange_book',
		'notebook_with_decorative_cover',
		'ledger',
		'books',
		'book',
		'link',
		'paperclip',
		'paperclips',
		'scissors',
		'triangular_ruler',
		'straight_ruler',
		'pushpin',
		'round_pushpin',
		'triangular_flag_on_post',
		'flag_white',
		'flag_black',
		'closed_lock_with_key',
		'lock',
		'unlock',
		'lock_with_ink_pen',
		'pen_ballpoint',
		'pen_fountain',
		'black_nib',
		'pencil',
		'pencil2',
		'crayon',
		'paintbrush',
		'mag',
		'mag_right'
	],
	'symbols': [
		'100',
		'1234',
		'heart',
		'yellow_heart',
		'green_heart',
		'blue_heart',
		'purple_heart',
		'broken_heart',
		'heart_exclamation',
		'two_hearts',
		'revolving_hearts',
		'heartbeat',
		'heartpulse',
		'sparkling_heart',
		'cupid',
		'gift_heart',
		'heart_decoration',
		'peace',
		'cross',
		'star_and_crescent',
		'om_symbol',
		'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',
		'u7a7a',
		'u5272',