From 446fdf9544d380360695ab083a16cfdfd8e6e5bc Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Thu, 26 Apr 2018 12:10:57 -0400 Subject: [PATCH] Export NimbleEmojiIndex --- src/components/search/nimble-search.js | 2 +- src/index.js | 3 ++- .../{parent-emoji-index.js => emoji-index/emoji-index.js} | 7 +++---- .../{emoji-index.js => emoji-index/nimble-emoji-index.js} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/utils/{parent-emoji-index.js => emoji-index/emoji-index.js} (52%) rename src/utils/{emoji-index.js => emoji-index/nimble-emoji-index.js} (98%) diff --git a/src/components/search/nimble-search.js b/src/components/search/nimble-search.js index ff63023..34e5dd4 100644 --- a/src/components/search/nimble-search.js +++ b/src/components/search/nimble-search.js @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' -import NimbleEmojiIndex from '../../utils/emoji-index' +import NimbleEmojiIndex from '../../utils/emoji-index/nimble-emoji-index' import { SearchPropTypes, SearchDefaultProps } from '../../utils/shared-props' export default class NimbleSearch extends React.PureComponent { diff --git a/src/index.js b/src/index.js index eeed8b4..cf1322e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ -import emojiIndex from './utils/parent-emoji-index' +import emojiIndex from './utils/emoji-index/emoji-index' import store from './utils/store' import frequently from './utils/frequently' export { Picker, Emoji, Category } from './components' +export { NimbleEmojiIndex } from './utils/emoji-index/nimble-emoji-index' export { emojiIndex, store, frequently } diff --git a/src/utils/parent-emoji-index.js b/src/utils/emoji-index/emoji-index.js similarity index 52% rename from src/utils/parent-emoji-index.js rename to src/utils/emoji-index/emoji-index.js index 5a13836..01b06a7 100644 --- a/src/utils/parent-emoji-index.js +++ b/src/utils/emoji-index/emoji-index.js @@ -1,9 +1,8 @@ -import data from '../data' -import NimbleEmojiIndex from './emoji-index' +import data from '../../data' +import NimbleEmojiIndex from './nimble-emoji-index' const emojiIndex = new NimbleEmojiIndex(data) -const emojis = emojiIndex.emojis -const emoticons = emojiIndex.emoticons +const { emojis, emoticons } = emojiIndex function search() { return emojiIndex.search(...arguments) diff --git a/src/utils/emoji-index.js b/src/utils/emoji-index/nimble-emoji-index.js similarity index 98% rename from src/utils/emoji-index.js rename to src/utils/emoji-index/nimble-emoji-index.js index 544486a..85c9309 100644 --- a/src/utils/emoji-index.js +++ b/src/utils/emoji-index/nimble-emoji-index.js @@ -1,4 +1,4 @@ -import { getData, getSanitizedData, intersect } from '.' +import { getData, getSanitizedData, intersect } from '..' export default class NimbleEmojiIndex { constructor(data) {