react-input-emoji 5.6.7 → 5.6.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +36 -53
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +36 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -3618,10 +3618,27 @@ function EmojiPicker(props) {
|
|
3618
3618
|
i18n = _useState2[0],
|
3619
3619
|
setI18n = _useState2[1];
|
3620
3620
|
useEffect(function () {
|
3621
|
+
var _ref2;
|
3621
3622
|
if (!language) {
|
3623
|
+
var _ref;
|
3622
3624
|
// @ts-ignore
|
3623
|
-
|
3624
|
-
|
3625
|
+
fetch("https://cdn.jsdelivr.net/npm/@emoji-mart/data/i18n/en.json").then(function (_x) {
|
3626
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
3627
|
+
var translations;
|
3628
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3629
|
+
while (1) switch (_context.prev = _context.next) {
|
3630
|
+
case 0:
|
3631
|
+
_context.next = 2;
|
3632
|
+
return data.json();
|
3633
|
+
case 2:
|
3634
|
+
translations = _context.sent;
|
3635
|
+
setI18n(translations);
|
3636
|
+
case 4:
|
3637
|
+
case "end":
|
3638
|
+
return _context.stop();
|
3639
|
+
}
|
3640
|
+
}, _callee);
|
3641
|
+
}))).apply(this, arguments);
|
3625
3642
|
})["catch"](function (error) {
|
3626
3643
|
console.error("Failed to load translations:", error);
|
3627
3644
|
});
|
@@ -3629,8 +3646,23 @@ function EmojiPicker(props) {
|
|
3629
3646
|
}
|
3630
3647
|
|
3631
3648
|
// @ts-ignore
|
3632
|
-
|
3633
|
-
|
3649
|
+
fetch("https://cdn.jsdelivr.net/npm/@emoji-mart/data/i18n/".concat(language, ".json")).then(function (_x2) {
|
3650
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {
|
3651
|
+
var translations;
|
3652
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
3653
|
+
while (1) switch (_context2.prev = _context2.next) {
|
3654
|
+
case 0:
|
3655
|
+
_context2.next = 2;
|
3656
|
+
return data.json();
|
3657
|
+
case 2:
|
3658
|
+
translations = _context2.sent;
|
3659
|
+
setI18n(translations);
|
3660
|
+
case 4:
|
3661
|
+
case "end":
|
3662
|
+
return _context2.stop();
|
3663
|
+
}
|
3664
|
+
}, _callee2);
|
3665
|
+
}))).apply(this, arguments);
|
3634
3666
|
})["catch"](function (error) {
|
3635
3667
|
console.error("Failed to load translations:", error);
|
3636
3668
|
});
|
@@ -4699,54 +4731,5 @@ InputEmojiWithRef.defaultProps = {
|
|
4699
4731
|
language: undefined
|
4700
4732
|
};
|
4701
4733
|
|
4702
|
-
var search = "Search";
|
4703
|
-
var search_no_results_1 = "Oh no!";
|
4704
|
-
var search_no_results_2 = "That emoji couldn’t be found";
|
4705
|
-
var pick = "Pick an emoji…";
|
4706
|
-
var add_custom = "Add custom emoji";
|
4707
|
-
var categories = {
|
4708
|
-
activity: "Activity",
|
4709
|
-
custom: "Custom",
|
4710
|
-
flags: "Flags",
|
4711
|
-
foods: "Food & Drink",
|
4712
|
-
frequent: "Frequently used",
|
4713
|
-
nature: "Animals & Nature",
|
4714
|
-
objects: "Objects",
|
4715
|
-
people: "Smileys & People",
|
4716
|
-
places: "Travel & Places",
|
4717
|
-
search: "Search Results",
|
4718
|
-
symbols: "Symbols"
|
4719
|
-
};
|
4720
|
-
var skins = {
|
4721
|
-
"1": "Default",
|
4722
|
-
"2": "Light",
|
4723
|
-
"3": "Medium-Light",
|
4724
|
-
"4": "Medium",
|
4725
|
-
"5": "Medium-Dark",
|
4726
|
-
"6": "Dark",
|
4727
|
-
choose: "Choose default skin tone"
|
4728
|
-
};
|
4729
|
-
var en = {
|
4730
|
-
search: search,
|
4731
|
-
search_no_results_1: search_no_results_1,
|
4732
|
-
search_no_results_2: search_no_results_2,
|
4733
|
-
pick: pick,
|
4734
|
-
add_custom: add_custom,
|
4735
|
-
categories: categories,
|
4736
|
-
skins: skins
|
4737
|
-
};
|
4738
|
-
|
4739
|
-
var en$1 = /*#__PURE__*/Object.freeze({
|
4740
|
-
__proto__: null,
|
4741
|
-
search: search,
|
4742
|
-
search_no_results_1: search_no_results_1,
|
4743
|
-
search_no_results_2: search_no_results_2,
|
4744
|
-
pick: pick,
|
4745
|
-
add_custom: add_custom,
|
4746
|
-
categories: categories,
|
4747
|
-
skins: skins,
|
4748
|
-
'default': en
|
4749
|
-
});
|
4750
|
-
|
4751
4734
|
export { InputEmojiWithRef as default };
|
4752
4735
|
//# sourceMappingURL=index.es.js.map
|