react-input-emoji 5.6.6 → 5.6.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +71 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +89 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -5,6 +5,24 @@ var ReactDOM = require('react-dom');
|
|
5
5
|
|
6
6
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
7
7
|
|
8
|
+
function _interopNamespace(e) {
|
9
|
+
if (e && e.__esModule) return e;
|
10
|
+
var n = Object.create(null);
|
11
|
+
if (e) {
|
12
|
+
Object.keys(e).forEach(function (k) {
|
13
|
+
if (k !== 'default') {
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
16
|
+
enumerable: true,
|
17
|
+
get: function () { return e[k]; }
|
18
|
+
});
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
n["default"] = e;
|
23
|
+
return Object.freeze(n);
|
24
|
+
}
|
25
|
+
|
8
26
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
9
27
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
10
28
|
|
@@ -3620,12 +3638,31 @@ function EmojiPicker(props) {
|
|
3620
3638
|
categoryies = [].concat(_toConsumableArray(categoryies), ["people", "nature", "foods", "activity", "places", "objects", "symbols", "flags"]);
|
3621
3639
|
return categoryies;
|
3622
3640
|
}, [disableRecent]);
|
3623
|
-
var
|
3641
|
+
var _useState = React.useState(undefined),
|
3642
|
+
_useState2 = _slicedToArray(_useState, 2),
|
3643
|
+
i18n = _useState2[0],
|
3644
|
+
setI18n = _useState2[1];
|
3645
|
+
React.useEffect(function () {
|
3624
3646
|
if (!language) {
|
3625
|
-
|
3647
|
+
// @ts-ignore
|
3648
|
+
Promise.resolve().then(function () { return en$1; }).then(function (translations) {
|
3649
|
+
setI18n(translations);
|
3650
|
+
})["catch"](function (error) {
|
3651
|
+
console.error("Failed to load translations:", error);
|
3652
|
+
});
|
3653
|
+
return;
|
3626
3654
|
}
|
3627
|
-
|
3655
|
+
|
3656
|
+
// @ts-ignore
|
3657
|
+
(function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })("@emoji-mart/data/i18n/".concat(language, ".json")).then(function (translations) {
|
3658
|
+
setI18n(translations);
|
3659
|
+
})["catch"](function (error) {
|
3660
|
+
console.error("Failed to load translations:", error);
|
3661
|
+
});
|
3628
3662
|
}, [language]);
|
3663
|
+
if (!i18n) {
|
3664
|
+
return null;
|
3665
|
+
}
|
3629
3666
|
return /*#__PURE__*/React__default["default"].createElement($e5534fc185f7111e$export$2e2bcd8739ae039, {
|
3630
3667
|
data: undefined,
|
3631
3668
|
theme: theme,
|
@@ -4687,5 +4724,54 @@ InputEmojiWithRef.defaultProps = {
|
|
4687
4724
|
language: undefined
|
4688
4725
|
};
|
4689
4726
|
|
4727
|
+
var search = "Search";
|
4728
|
+
var search_no_results_1 = "Oh no!";
|
4729
|
+
var search_no_results_2 = "That emoji couldn’t be found";
|
4730
|
+
var pick = "Pick an emoji…";
|
4731
|
+
var add_custom = "Add custom emoji";
|
4732
|
+
var categories = {
|
4733
|
+
activity: "Activity",
|
4734
|
+
custom: "Custom",
|
4735
|
+
flags: "Flags",
|
4736
|
+
foods: "Food & Drink",
|
4737
|
+
frequent: "Frequently used",
|
4738
|
+
nature: "Animals & Nature",
|
4739
|
+
objects: "Objects",
|
4740
|
+
people: "Smileys & People",
|
4741
|
+
places: "Travel & Places",
|
4742
|
+
search: "Search Results",
|
4743
|
+
symbols: "Symbols"
|
4744
|
+
};
|
4745
|
+
var skins = {
|
4746
|
+
"1": "Default",
|
4747
|
+
"2": "Light",
|
4748
|
+
"3": "Medium-Light",
|
4749
|
+
"4": "Medium",
|
4750
|
+
"5": "Medium-Dark",
|
4751
|
+
"6": "Dark",
|
4752
|
+
choose: "Choose default skin tone"
|
4753
|
+
};
|
4754
|
+
var en = {
|
4755
|
+
search: search,
|
4756
|
+
search_no_results_1: search_no_results_1,
|
4757
|
+
search_no_results_2: search_no_results_2,
|
4758
|
+
pick: pick,
|
4759
|
+
add_custom: add_custom,
|
4760
|
+
categories: categories,
|
4761
|
+
skins: skins
|
4762
|
+
};
|
4763
|
+
|
4764
|
+
var en$1 = /*#__PURE__*/Object.freeze({
|
4765
|
+
__proto__: null,
|
4766
|
+
search: search,
|
4767
|
+
search_no_results_1: search_no_results_1,
|
4768
|
+
search_no_results_2: search_no_results_2,
|
4769
|
+
pick: pick,
|
4770
|
+
add_custom: add_custom,
|
4771
|
+
categories: categories,
|
4772
|
+
skins: skins,
|
4773
|
+
'default': en
|
4774
|
+
});
|
4775
|
+
|
4690
4776
|
module.exports = InputEmojiWithRef;
|
4691
4777
|
//# sourceMappingURL=index.js.map
|