Giter Site home page Giter Site logo

jm-david / emoji-mart-vue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from missive/emoji-mart

602.0 12.0 82.0 52.19 MB

One component to pick them all 👊🏼

Home Page: https://jm-david.github.io/emoji-mart-vue

License: BSD 3-Clause "New" or "Revised" License

CSS 5.92% JavaScript 66.90% Vue 27.18%
emoji-picker emoji vue vuejs

emoji-mart-vue's Introduction

This project has been forked from emoji-mart which was written for React


Emoji Mart (Vue) is a Slack-like customizable
emoji picker component for VueJS
DemoChangelog

Installation

npm install --save emoji-mart-vue

Components

Picker

import { Picker } from 'emoji-mart-vue'
<picker set="emojione" />
<picker @select="addEmoji" />
<picker title="Pick your emoji…" emoji="point_up" />
<picker :style="{ position: 'absolute', bottom: '20px', right: '20px' }" />
<picker :i18n="{ search: 'Recherche', categories: { search: 'Résultats de recherche', recent: 'Récents' } }" />
Prop Required Default Description
autoFocus false Auto focus the search input when mounted
color #ae65c5 The top bar anchors select and hover color
emoji department_store The emoji shown when no emojis are hovered, set to an empty string to show nothing
include [] Only load included categories. Accepts I18n categories keys. Order will be respected, except for the recent category which will always be the first.
exclude [] Don't load excluded categories. Accepts I18n categories keys.
custom [] Custom emojis
recent Pass your own frequently used emojis as array of string IDs
emojiSize 24 The emoji width and height
perLine 9 Number of emojis per line. While there’s no minimum or maximum, this will affect the picker’s width. This will set Frequently Used length as well (perLine * 4)
i18n {…} An object containing localized strings
native false Renders the native unicode emoji
set apple The emoji set: 'apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook'
sheetSize 64 The emoji sheet size: 16, 20, 32, 64
backgroundImageFn ((set, sheetSize) => …) A Fn that returns that image sheet to use for emojis. Useful for avoiding a request if you have the sheet locally.
emojisToShowFilter ((emoji) => true) A Fn to choose whether an emoji should be displayed or not
showPreview true Display preview section
showSearch true Display search section
showCategories true Display categories
showSkinTones true Display skin tones picker
emojiTooltip false Show emojis short name when hovering (title)
skin Forces skin color: 1, 2, 3, 4, 5, 6
defaultSkin 1 Default skin color: 1, 2, 3, 4, 5, 6
pickerStyles Inline styles applied to the root element. Useful for positioning
title Emoji Mart™ The title shown when no emojis are hovered
infiniteScroll true Scroll continuously through the categories
Event Description
select Params: (emoji) => {}
skin-change Params: (skin) => {}

I18n

search: 'Search',
notfound: 'No Emoji Found',
categories: {
  search: 'Search Results',
  recent: 'Frequently Used',
  people: 'Smileys & People',
  nature: 'Animals & Nature',
  foods: 'Food & Drink',
  activity: 'Activity',
  places: 'Travel & Places',
  objects: 'Objects',
  symbols: 'Symbols',
  flags: 'Flags',
  custom: 'Custom',
}

Sheet sizes

Sheets are served from unpkg, a global CDN that serves files published to npm.

Set Size (sheetSize: 16) Size (sheetSize: 20) Size (sheetSize: 32) Size (sheetSize: 64)
apple 334 KB 459 KB 1.08 MB 2.94 MB
emojione 315 KB 435 KB 1020 KB 2.33 MB
facebook 322 KB 439 KB 1020 KB 2.50 MB
google 301 KB 409 KB 907 KB 2.17 MB
messenger 325 KB 449 MB 1.05 MB 2.69 MB
twitter 288 KB 389 KB 839 KB 1.82 MB

Datasets

While all sets are available by default, you may want to include only a single set data to reduce the size of your bundle.

Set Size (on disk)
all 570 KB
apple 484 KB
emojione 485 KB
facebook 421 KB
google 483 KB
messenger 197 KB
twitter 484 KB

To use these data files (or any other custom data), use the NimblePicker component:

import data from 'emoji-mart-vue/data/messenger.json'
import { NimblePicker } from 'emoji-mart-vue'
<nimble-picker set="messenger" :data="data" />

Examples of emoji object:

{
  id: 'smiley',
  name: 'Smiling Face with Open Mouth',
  colons: ':smiley:',
  text: ':)',
  emoticons: [
    '=)',
    '=-)'
  ],
  skin: null,
  native: '😃'
}

{
  id: 'santa',
  name: 'Father Christmas',
  colons: ':santa::skin-tone-3:',
  text: '',
  emoticons: [],
  skin: 3,
  native: '🎅🏼'
}

{
  id: 'octocat',
  name: 'Octocat',
  colons: ':octocat',
  text: '',
  emoticons: [],
  custom: true,
  imageUrl: 'https://assets-cdn.github.com/images/icons/emoji/octocat.png?v7'
}

Emoji

import { Emoji } from 'emoji-mart-vue'
<emoji :emoji="{ id: 'santa', skin: 3 }" :size="16" />
<emoji emoji=":santa::skin-tone-3:" :size="16" />
<emoji emoji="santa" set="emojione" :size="16" />
Prop Required Default Description
emoji Either a string or an emoji object
size The emoji width and height.
native false Renders the native unicode emoji
fallback Params: (emoji) => {}
set apple The emoji set: 'apple', 'google', 'twitter', 'emojione'
sheetSize 64 The emoji sheet size: 16, 20, 32, 64
backgroundImageFn ((set, sheetSize) => `https://unpkg.com/[email protected]/sheet_${set}_${sheetSize}.png`) A Fn that returns that image sheet to use for emojis. Useful for avoiding a request if you have the sheet locally.
skin 1 Skin color: 1, 2, 3, 4, 5, 6
tooltip false Show emoji short name when hovering (title)
Event Description
select Params: (emoji) => {}
mouseenter Params: (emoji) => {}
mouseleave Params: (emoji) => {}

Unsupported emojis fallback

Certain sets don’t support all emojis (i.e. Messenger & Facebook don’t support :shrug:). By default the Emoji component will not render anything so that the emojis’ don’t take space in the picker when not available. When using the standalone Emoji component, you can however render anything you want by providing the fallback props.

To have the component render :shrug: you would need to:

function emojiFallback(emoji) {
  return `:${emoji.short_names[0]}:`
}
<emoji
  set="messenger"
  emoji="shrug"
  :size="24"
  :fallback="emojiFallback"
/>

Custom emojis

You can provide custom emojis which will show up in their own category.

import { Picker } from 'emoji-mart-vue'

const customEmojis = [
  {
    name: 'Octocat',
    short_names: ['octocat'],
    text: '',
    emoticons: [],
    keywords: ['github'],
    imageUrl: 'https://assets-cdn.github.com/images/icons/emoji/octocat.png?v7'
  }
]
<picker :custom="customEmojis" />

Headless search

The Picker doesn’t have to be mounted for you to take advantage of the advanced search results.

import { emojiIndex } from 'emoji-mart-vue'

emojiIndex.search('christmas').map((o) => o.native)
// => [🎄, 🎅🏼, 🔔, 🎁, ⛄️, ❄️]

With custom data

import data from 'emoji-mart-vue/data/messenger'
import { NimbleEmojiIndex } from 'emoji-mart-vue'

let emojiIndex = new NimbleEmojiIndex(data)
emojiIndex.search('christmas')

Storage

By default EmojiMart will store user chosen skin and frequently used emojis in localStorage. That can however be overwritten should you want to store these in your own storage.

import { store } from 'emoji-mart-vue'

store.setHandlers({
  getter: (key) => {
    // Get from your own storage (sync)
  },

  setter: (key, value) => {
    // Persist in your own storage (can be async)
  }
})

Possible keys are:

Key Value Description
skin 1, 2, 3, 4, 5, 6
frequently { 'astonished': 11, '+1': 22 } An object where the key is the emoji name and the value is the usage count
last 'astonished' (Optional) Used by frequently to be sure the latest clicked emoji will always appear in the “Recent” category

Features

Powerful search

Short name, name and keywords

Not only does Emoji Mart return more results than most emoji picker, they’re more accurate and sorted by relevance.

summer

Emoticons

The only emoji picker that returns emojis when searching for emoticons.

emoticons

Results intersection

For better results, Emoji Mart split search into words and only returns results matching both terms.

high-five

Fully customizable

Anchors color, title and default emoji

customizable-color
pick-your-emoji

Emojis sizes and length

size-and-length

Default skin color

As the developer, you have control over which skin color is used by default.

skins

It can however be overwritten as per user preference.

customizable-skin

Multiple sets supported

Apple / Google / Twitter / EmojiOne / Messenger / Facebook

sets

Not opinionated

Emoji Mart doesn’t automatically insert anything into a text input, nor does it show or hide itself. It simply returns an emoji object. It’s up to the developer to mount/unmount (it’s fast!) and position the picker. You can use the returned object as props for the EmojiMart.Emoji component. You could also use emoji.colons to insert text into a textarea or emoji.native to use the emoji.

Development

$ yarn build
$ yarn start
$ yarn storybook

🎩 Hat tips!

Powered by iamcal/emoji-data and inspired by iamcal/js-emoji.
🙌🏼  Cal Henderson.

emoji-mart-vue's People

Contributors

ai avatar ajbeaven avatar apotheosis91 avatar bniwredyc avatar chadoh avatar etiennelem avatar gargron avatar iamsaksham avatar jm-david avatar justindrake avatar madshargreave avatar marcopolo avatar n-filatov avatar nicksarafa avatar nolanlawson avatar npmcdn-to-unpkg-bot avatar oleg-codaio avatar samkelleher avatar savardc avatar scotato avatar scttcper avatar shoken0x avatar snowyu avatar sonicdoe avatar trun avatar vcervellera-turbulent avatar veob avatar vierkantor avatar vinnymac avatar vrizo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emoji-mart-vue's Issues

onClick not working

Hi!

I realize this is a rather basic question, so I apologize, but this doesn't seem to work:

<picker v-show="showEmojis" set="emojione" :style="{ position: 'absolute', bottom: '120px', right: '80px' }" title="" onClick="nsertEmoji" />

It renders great and hides/shows fine, but the onclick won't fire for the life of me, can you show a full example of how to properly define and call the methods? Thanks!

Using emojisToShowFilter seems to crash the picker

      <picker :emojis-to-show-filter="emojisToShowFilter"/>
methods: {
    emojisToShowFilter (emoji) {
      console.log(emoji.short_names[0])
      return true
    }
}

Creates the following error
TypeError: Cannot read property 'push' of undefined at VueComponent.created (emoji-mart.js?28c6:3422)

It seems that in emoji-mart.js, the this.categories is undefined when I use emojisToShowFilter()
it happens in the created function.

    RECENT_CATEGORY.emojis = this.recentEmojis;
    CUSTOM_CATEGORY.emojis = this.customEmojis;

    this.categories.push(RECENT_CATEGORY);
    (_categories = this.categories).push.apply(_categories, (0, _toConsumableArray3.default)(categories));
    this.categories.push(CUSTOM_CATEGORY);

If I remove :emojis-to-show-filter from the template the this.categories exists as an empty array.

I debugged and iterated inside the var categories = this.parsedData.categories.map(function (c) {})
Inside this map function everything works as intended, it's calling my function, my function returns true, the emojis var gets populated properly. Category by category.

I'm not sure what's going on.

2.6.1 is not available on npm 🤕

Can't seem to be able to update to 2.6.1

npm error:

npm ERR! No compatible version found: emoji-mart-vue@^2.6.1
npm ERR! Valid install targets:
npm ERR! 2.5.3, 2.5.2, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.5.0, 0.4.7, 0.4.6, 0.4.5, 0.4.4

Listing all available versions on npm prints this:

npm view emoji-mart-vue versions

[ '0.4.4',
  '0.4.5',
  '0.4.6',
  '0.4.7',
  '0.5.0',
  '1.0.0',
  '1.0.1',
  '1.0.2',
  '1.0.3',
  '1.0.4',
  '2.4.2',
  '2.4.3',
  '2.4.4',
  '2.4.5',
  '2.5.2',
  '2.5.3' ]

Strange, because on npm website it says that the latest version is 2.6.1

screen shot 2018-05-22 at 13 28 35

Any ideas?

Can emoji inherit parent font size?

Would it be possible to allow the inline to inherit the parent text font size?

Ex. Right now these emoji's are the same size. Removing :size defaults them to 24. Having to set the size manually every time is a pain. Would be great to put inherit or 0 in the size as an alternative.

<h1><emoji emoji=":moneybag:" :size="20" :native="true" /> Test</h1>
<p><emoji emoji=":moneybag:" :size="20" :native="true" /> Test</p>

Display selected category

When click to category icon, it is showing incorrect. Even on demo page. The icon of previous category is shown as selected.

Custom data in picker not reactive?

<picker :custom="$custom_emojis.getEmojis()" title="Pick your emoji…" emoji="point_up" @select="addEmoji" :emojiTooltip="true" :emojiSize="24" />

so I used the picker component and added a global variable custom initiated as empty array and then pulled the custom emojis.

screen shot 2018-09-14 at 7 41 47 pm

you'll see that the props custom has data. is there something I'm missing?

fallbackEmojiStyles

Hi, I would like to know if there is any way that I could pull this object when clicking on an emoji in the picker? or how can I add it in the Emoji Object obtained.

screen shot 2018-07-19 at 2 24 11 pm

Multi language support

Thank you so much for this all in one module. I would like to use this in a product which supports English and German. Is it possible to pass message ids and its translations in i18n object ?

emojiIndex not working

Is anyone else able to pull results using something like the following?

import { emojiIndex } from 'emoji-mart-vue'

emojiIndex.search('christmas')

I don't get any errors but it returns an empty array. I've also tried the custom data method using:

import data from 'emoji-mart-vue/data/messenger'
import { NimbleEmojiIndex } from 'emoji-mart-vue'

let emojiIndex = new NimbleEmojiIndex(data)
emojiIndex.search('christmas')

...but same issue.

'this.emojiData is null' when setting Picker[emoji='']

From the docs:

emoji   department_store The emoji shown when no emojis are hovered, set to an empty string to show nothing

Given:

<picker emoji='' set='emojione' title=''></picker>

Then:

[Vue warn]: Error in render: "TypeError: this.emojiData is null"

found in

---> <NimbleEmoji> at src/components/emoji/nimbleEmoji.vue
       <Preview> at src/components/preview.vue
         <NimblePicker> at src/components/picker/nimblePicker.vue
           <Root> vue.js:634:17

+ No emoji preview is shown at all

Other point: No usage instructions for the browser. I've been tiptoeing around for 30 minutes.

Now I'm trying to remove advertisements which is the default from this plugin. I would suggest removing advertisements as the default.

Functional components does not seem to work

Hello,

I am trying to use the Emoji object in order to get some html from an Emoji object.

I am doing
import { Emoji } from 'emoji-mart-vue'
and then in a method I am trying to use the Emoji function
const x = Emoji()

This crashes with

Uncaught TypeError: Object(...) is not a function

If I am trying to import everything
import Emoji from 'emoji-mart-vue'
Then I have

Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_5_emoji_mart_vue___default(...) is not a function

It doesn't matter if I give parameters to const x = Emoji(()
It looks like the import itself crashes.

Is it me or is there an issue with emoji-mart?

Custom emojis that have non square size

Here is the issue: http://prntscr.com/jnlsip

Custom emoji:

[
{"name":"thumbsupparrot","short_names":["thumbsupparrot"],"text":"","emoticons":[],"keywords":["thumbsupparrot"],"imageUrl":"http://cultofthepartyparrot.com/parrots/thumbsupparrot.gif"}
]

Which renders this CSS:

element.style {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url(http://cultofthepartyparrot.com/parrots/thumbsupparrot.gif);
    background-size: 100%;
}

I'm fixing this using this local stylus in my component which holds the picker

    :global(.emoji-mart-emoji)
      span
        background-position center
        background-repeat no-repeat

Lightest possible setup

Hi,

I'm wondering what's the lightest possible setup (ie to display only native emojis) and to minimize the
initial load time after component has mounted. I know this is somewhat related to #9, but I was wondering why I'm seeing a long loading time even though I'm not providing any set for the component and setting :native="true" for the picker?

My setup currently:

<picker
      v-if="showPicker"
      v-click-outside="closePicker"
      :native="true"
      color="#475DE5"
      :showSkinTones="false"
      :showPreview="false"
      :sheetSize="16"
      @select="addEmoji"
      @keyup.esc.native="closePicker"
      :pickerStyles="pickerStyles"/>

I also tried the "visually hidden mount" hack but that's not really a favourable work-around 😞

how to change emoji picker theme?

hi, thanks for this great component!
how to chane the theme of the picker?
in the origin emoji-mart the is proprtey

theme |   | light | The picker theme: 'auto', 'light', 'dark'

but this vue component not support it, is a way to change the thenm
thanks!

Sheet files are too big

Hello,
Thank you for making this awesome Fork!

Sheet files loaded with Emoji Mart Vue by default has very big size, for example 7.5MB for 64x64 twemoji and 13.3MB for apple (but readme.md says: 1.82MB and 2.94MB respectively).

1

I think this is because they are taken from the wrong directory on unpkg. I found this line:
https://unpkg.com/emoji-datasource-${set}@${EMOJI_DATASOURCE_VERSION}/img/${set}/sheets/${sheetSize}.png

But in the React's Emoji Mart, sheets are taken from (note sheets-256):
https://unpkg.com/emoji-datasource-${set}@${EMOJI_DATASOURCE_VERSION}/img/${set}/sheets-256/${sheetSize}.png

So, when I change sheets to sheets-256 it seems the files back to normal size as documented.

copyright

I want to use this library in a company project. Is there any copyright issue?

Emoji Mart take long time to load inside other component

Hello , I load Emoji Mart in my VUE root , it loads very fast .
BUT if I put Emoji Mart inside A COMPONENT AND this comenent is loaded after the data is loaded . it will not work property , it will take long time to LOAD and will give some bugs .

I will display the code above , it will be easy to understand-

THIS WILL WORK PROPERLY

<my component ></my component>

BUT THIS WILL NOT WORK

<my component v-if="data" ></my component>

Inside my component

 <Picker   emoji="point_up"
                  :sheetSize="32"
                  title="Selecione Emojis"  />

removing nativ emojis

Hi ,
Thanks for this wonderful plug-in.
I am facing issue for rendering emojis in browsers. I want to hide all those emojis which renders natively in browsers. Like some of the smilies rendered in black color. How to hide those from user selection.

Thanks,
Manish.

Webpack SSR Support

Hey,

First of all, Nice work with the Fork! Thanks for making it.

Can you please add support for webpack SSR? I'm using Vuetify-SSR (material design for Vue) and would love to use this too!

Currently, I'm getting "document" not defined error while hard reloading the page. (Works fine with hot reloading since document is already mounted)

Let me know what do you think.

Thanks!

Picker has incorrect styling in IE11 / Edge

When the picker is opened in IE11/Edge the styling is incorrect. This problem only occurs for emoji-mart-vue, not for emoji-mart.

The following problems are found:

  1. The searchbar has a height of 0px and is therefore overlapped by the emoji-list.
  2. The categories have a height of 0px and are therefore overlapped by the searchbar & emoji-list.
  3. The categories are missing the images. As you can see in the screenshot the SVG's for the categories are missing their elements.

Would be awesome if it could be fixed anytime soon. Thanks in advance! :)

screen shot 2018-06-05 at 14 37 33

Unable to close the emoji picker after clicking outside it

I have tried using custom vue directives to close the modal upon clicking outside it but does not work as the event is triggered prematurely irrespective of the root element it is placed. Is there any inbuilt custom event for this? Or anyway around it?

Element mounting for contentEditable

Since for my use I have to use contendEditable div instead of input, I thought of using method like this, to push emojis into the div:

var ComponentClass = Vue.extend(Emoji)

var instance = new ComponentClass({
propsData: {emoji: 'santa'}
})

instance.$mount() 

And after it gets mounted, i just get the $el and append to my div.

However on version 2.6.6 I get error like this:

TypeError: Cannot read property 'data' of undefined
    at Proxy.render (emoji-mart.js:3001)
    at VueComponent.Vue._render (vue.common.dev.js:3516)
    at VueComponent.updateComponent (vue.common.dev.js:4016)
    at Watcher.get (vue.common.dev.js:4414)
    at new Watcher (vue.common.dev.js:4403)
    at mountComponent (vue.common.dev.js:4023)

On version 2.4.4 this method works without any errors.

Is there an better alternative for inserting emoji-mart-vue emojis via methods into divs or fix for my method with version newer than 2.4.4?

Can't compile scripts in production with webpack

Thanks for the package, it's awesome!
But, whenever I try to compile my scripts using Laravel Mix (Webpack) in production environment, I run out of memory:

<--- Last few GCs --->

[5232:000001D7A8C2B980]   512215 ms: Mark-sweep 1322.7 (1474.3) -> 1322.6 (1475.3) MB, 1064.4 / 0.0 ms  allocation failure GC in old space requested
[5232:000001D7A8C2B980]   513219 ms: Mark-sweep 1322.6 (1475.3) -> 1322.6 (1433.8) MB, 1003.3 / 0.0 ms  last resort GC in old space requested
[5232:000001D7A8C2B980]   514344 ms: Mark-sweep 1322.6 (1433.8) -> 1322.6 (1429.3) MB, 1124.8 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0000031A710A57C1 <JSObject>
    1: def_variable [000000B4F1B022D1 <undefined>:~5188] [pc=00000252B8505851](this=0000011D227B1DC9 <AST_Function map = 00000393AB303331>,symbol=0000011D227B2631 <AST_SymbolFunarg map = 000003289A5C9FD9>,init=000000B4F1B022D1 <undefined>)
    2: visit [000000B4F1B022D1 <undefined>:~4887] [pc=00000252B8BC76F4](this=00000174D3A7F9C9 <TreeWalker map = 000000E8947D8839>,node=0000011D227B2631 <AST...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node_module_register
 2: v8::internal::FatalProcessOutOfMemory
 3: v8::internal::FatalProcessOutOfMemory
 4: v8::internal::Factory::NewFixedArray
 5: v8::internal::HashTable<v8::internal::SeededNumberDictionary,v8::internal::SeededNumberDictionaryShape>::IsKey
 6: v8::internal::HashTable<v8::internal::SeededNumberDictionary,v8::internal::SeededNumberDictionaryShape>::IsKey
 7: v8::internal::StringTable::LookupString
 8: v8::internal::StringTable::LookupString
 9: v8::internal::SourcePositionTableIterator::Advance
10: v8::internal::SourcePositionTableIterator::Advance
11: 00000252B72043C1
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the @ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

However, on normal development environment everything works fine. As soon, as I completely remove the code where I use the package everything works fine, too.
Anyone knows the problem?

My production npm script is the following:

cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

Issue with NimblePicker example

I tried to use NimblePicker component and have following error:

[Vue warn]: Error in created hook: "TypeError: this.mutableData is undefined"
found in
---> at src/components/picker/nimblePicker.vue

Here is parts of my code:

<template>
  <div>
    <nimble-picker v-show="pickerOpened" :data="data" title="Pick your emoji..." emoji="point_up" set="messenger" @select="addEmoji" />
    ...
  </div>
</template>

import data from 'emoji-mart-vue/data/messenger.json'
import {NimblePicker} from 'emoji-mart-vue'

...
  data () {
    return {
      data: data,
      text: '',
      pickerOpened: false,
    }
  },
...

With vue devtools I can see that data is passed to NimblePicker correctly, but mutableData is undefined for some reason: https://screencast.com/t/eeODT2ktb3O https://screencast.com/t/ZfkU6kH9w

how do i get the emoji image?

For now, what i can get from picker component whenever i click on an emoji are:

{
colons: ":poultry_leg:"
emoticons: Array(0)
id: "poultry_leg"
name: "Poultry Leg"
native: "🍗"
skin: null
unified: "1f357"
}

i dont see a way where i can retrieve the exact same emoji that i click in the object data returned.

Slow release of resources

The page routing is slowly.Most of time the page no response in chrome explore.If no use Picker everything is OK. Have some function to recycle the Picker component?

Docs: using with contenteditable

I can't figure out the example of using <emoji> component inside contenteditable. It seems that the example has been taken from original React lib and is a React example.

Is it possible to achieve similar in Vue?

Search in another language

Hello! I'm loving the plugin, it's really easy to use and implement in production. It's really awesome.
I have a single problem that is the searching.. is there any way to change the language of the search?
I'm from Brazil and I'd like to use my mother language to search instead of English.
Huge thanks!

Nimble Picker emojis are not displayed

Hi, I've just started using emoji-mart-vue 2.6.5 and vue 2.5.17 with chromium 70

The picker component with messenger set works, but the nimble picker doesn't show any emoji images, am I doing something wrong?

Nimble Picker
<nimble-picker
  :data="data"
  set="messenger"
/>

Picker
<picker
  set="messenger"
/>

`
import data from 'emoji-mart-vue/data/messenger.json'
import { Picker, NimblePicker } from 'emoji-mart-vue'

export default {
components: {
Picker,
NimblePicker,
},
data() {
return {
data: data
}
}
}
`

images_missing_screenshot

I can't see any sign of errors in the devtools console

Update lib

Can you please update your library? #45 is not merged yet, despite the fact it's critical bug

Bundle size (Minified + Gzipped 92.7 KB )

Thanks for this emjoi mart :) Could you please provide some instructions to use it from CDN ? Please see the stats below and 92.7B for minimized and Gzipped putting too much weight on my bundle . Thanks for your help .

image

Nuxt support

Right now, I'm getting "document" not defined error when adding it as a plugin for server-side rendering.

Can you add nuxt support to this library or a workaround on how to use it for nuxt. That would be awesome.

Related to #21

Thanks!

Unable to change 'not hovered emoji' to custom.

I am using a custom set of emoji's which is working well.

I am trying to set the 'emoji shown when no emojis are hovered' to one of these custom emoji's but it is returning nothing.

My custom set of emjoi's is working fine and is loaded under :custom in the follow sinppet.

<picker v-show="showEmojiPicker" title="Close" emoji="cross-mark" @select="addEmoji" @mousedown.13="getSelectionTest" @click="getSelectionTest" style="user-select:none;" :custom="customEmojis" :include = "includes" />

cross-mark refers to this reference in my data.json which I am trying to load:

{ "id" : "cross-mark", "name": "Cross Mark", "short_names": ["cross_mark"], "text": "", "emoticons": "2764", "keywords": ["cross","mark"], "imageUrl": "https://vapor-xxxxxx.s3.eu-west-2.amazonaws.com/upload/emoji/2764.png", "unified": "1f60d" }

Can you please confirm whether or not this functionality already exists, or if the 'not hovered' icon must refer to a non-custom property?

Picker component slowing down other Vue components

Hello,

First, congratulations for your work, it's really nice !

I'm using your emoji picker in a messaging project, and i'm having really low performances doing some trivial things.

For exemple, I'm using a textarea to type message to send with a v-model inside and i text entry is really slow. Otherwise, i have to click on a buddy to open the conversation i have with him, and in the same way, it takes like 2s to open the conversation, and in the performance monitor, i'm reaching 100% of CPU usage meanwhile. All this lags are happening while picker component is not opened or used. It's available if I click on a specific button but hidden if I don't.

Commenting the picker component solved all of my problems, no more latency or anything else, my textarea is fluid, same as conversations opening. It would be a shame not to use it because I really appreciate how it works. I also find some way to avoid the latency using JQuery rather than vue directives but it's also a shame using JQuery while it's that simple with Vue. Even using an emty picker with no props is causing latency.

So I was wondering if there is not any performance issue in this component.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.