@widergy/energy-ui 1.117.3 → 1.117.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [1.117.6](https://github.com/widergy/energy-ui/compare/v1.117.5...v1.117.6) (2022-04-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* excluded emojis fix ([#282](https://github.com/widergy/energy-ui/issues/282)) ([de2c972](https://github.com/widergy/energy-ui/commit/de2c972adbb7d5cad1f51f5bf1add6b6c5642f34))
|
|
7
|
+
|
|
8
|
+
## [1.117.5](https://github.com/widergy/energy-ui/compare/v1.117.4...v1.117.5) (2022-04-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* picker fixes ([#279](https://github.com/widergy/energy-ui/issues/279)) ([6ee6c2a](https://github.com/widergy/energy-ui/commit/6ee6c2a13eeff8f5a72d955e519613eafaa0e241))
|
|
14
|
+
* picker fixes ([#279](https://github.com/widergy/energy-ui/issues/279)) ([af3e3ed](https://github.com/widergy/energy-ui/commit/af3e3ed4187db3331414811307d6c33b1c9ec716))
|
|
15
|
+
|
|
16
|
+
## [1.117.4](https://github.com/widergy/energy-ui/compare/v1.117.3...v1.117.4) (2022-04-25)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* excluded emojis ([#281](https://github.com/widergy/energy-ui/issues/281)) ([18e3cc4](https://github.com/widergy/energy-ui/commit/18e3cc4d6530ad508db21b64708c267f17031fff))
|
|
22
|
+
|
|
1
23
|
## [1.117.3](https://github.com/widergy/energy-ui/compare/v1.117.2...v1.117.3) (2022-04-25)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -168,7 +168,7 @@ Flags.defaultProps = {
|
|
|
168
168
|
strokeLinecap: "round",
|
|
169
169
|
strokeLinejoin: "round"
|
|
170
170
|
};
|
|
171
|
-
var DEFAULT_EXCLUDED_EMOJIS = ['smiling_face'];
|
|
171
|
+
var DEFAULT_EXCLUDED_EMOJIS = ['black cat', 'smiling_face', 'face exhaling', 'face in clouds', 'face exhaling', 'man beard', 'person_red_hair', 'person_curly_hair', 'person_white_hair', 'person_bald', 'health_worker', 'student', 'teacher', 'judge', 'farmer', 'cook', 'mechanic', 'factory_worker', 'office_worker', 'scientist', 'technologist', 'singer', 'artist', 'pilot', 'astronaut', 'firefighter', 'smiling face with tear', 'ninja', 'man in tuxedo', 'woman in tuxedo', 'man with veil', 'woman with veil', 'woman feeding baby', 'man feeding baby', 'person feeding baby', 'bison', 'mammoth', 'beaver', 'polar bear', 'dodo', 'feather', 'seal', 'beetle', 'cockroach', 'fly', 'worm', 'blueberries', 'olive', 'bell pepper', 'flatbread', 'tamale', 'fondue', 'teapot', 'person_in_manual_wheelchair', 'person_in_motorized_wheelchair', 'person_with_probing_cane', 'rock', 'wood', 'knot', 'sewing needle', 'nesting dolls', 'pinata', 'magic wand', 'roller skate', 'pickup truck', 'hut', 'thong sandal', 'military helmet', 'accordion', 'long drum', 'coin', 'boomerang', 'carpentry saw', 'screwdriver', 'hook', 'ladder', 'elevator', 'mirror', 'window', 'plunger', 'mouse trap', 'bucket', 'toothbrush', 'headstone', 'placard', 'pinched fingers', 'anatomical heart', 'pinched fingers', 'anatomical heart', 'heart on fire', 'mending heart', 'man beard', 'flag_england', 'flag_scotland', 'transgender flag'];
|
|
172
172
|
exports.DEFAULT_EXCLUDED_EMOJIS = DEFAULT_EXCLUDED_EMOJIS;
|
|
173
173
|
var DEFAULT_VIRTUALIZED_LIST_CONFIG = {
|
|
174
174
|
overscan: 10,
|
|
@@ -56,6 +56,8 @@ var UTEmojiPicker = function UTEmojiPicker(_ref) {
|
|
|
56
56
|
ButtonComponent = _ref$ButtonComponent === void 0 ? _UTTouchableWithoutFeedback.default : _ref$ButtonComponent,
|
|
57
57
|
themeClasses = _ref.classes,
|
|
58
58
|
classNames = _ref.classNames,
|
|
59
|
+
_ref$closeOnPick = _ref.closeOnPick,
|
|
60
|
+
closeOnPick = _ref$closeOnPick === void 0 ? true : _ref$closeOnPick,
|
|
59
61
|
excludedEmojis = _ref.excludedEmojis,
|
|
60
62
|
groupsModifier = _ref.groupsModifier,
|
|
61
63
|
handlePick = _ref.handlePick,
|
|
@@ -93,11 +95,12 @@ var UTEmojiPicker = function UTEmojiPicker(_ref) {
|
|
|
93
95
|
role: "button",
|
|
94
96
|
onMouseDown: function onMouseDown(e) {
|
|
95
97
|
e.preventDefault();
|
|
98
|
+
if (closeOnPick) setIsOpen(false);
|
|
96
99
|
handlePick(emojiData);
|
|
97
100
|
},
|
|
98
101
|
className: "".concat(_stylesModule.default.emoji, " ").concat(classes.emoji)
|
|
99
102
|
}, (0, _utils.getEmoji)(emojiData));
|
|
100
|
-
}, []);
|
|
103
|
+
}, [handlePick]);
|
|
101
104
|
var groupEmojiRenderer = (0, _react.useCallback)(function (_ref2) {
|
|
102
105
|
var Icon = _ref2.Icon,
|
|
103
106
|
key = _ref2.key;
|
|
@@ -144,6 +147,7 @@ UTEmojiPicker.propTypes = {
|
|
|
144
147
|
ButtonComponent: _propTypes.element,
|
|
145
148
|
handlePick: _propTypes.func,
|
|
146
149
|
popperPosition: _propTypes.string,
|
|
150
|
+
closeOnPick: _propTypes.bool,
|
|
147
151
|
classNames: _types.classesPropTypes,
|
|
148
152
|
classes: (0, _propTypes.objectOf)(_propTypes.string)
|
|
149
153
|
};
|
|
@@ -61,12 +61,22 @@
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
|
|
65
|
+
@font-face {
|
|
66
|
+
font-family: NotoColorEmojiLimited;
|
|
67
|
+
unicode-range: U+1F1E6-1F1FF;
|
|
68
|
+
src: url(https://raw.githack.com/googlefonts/noto-emoji/main/fonts/NotoColorEmoji.ttf);
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
.emoji {
|
|
65
72
|
align-items: center;
|
|
66
73
|
cursor: pointer;
|
|
67
74
|
display: flex;
|
|
68
75
|
justify-content: center;
|
|
69
76
|
user-select: none;
|
|
77
|
+
font-family: 'NotoColorEmojiLimited', -apple-system, BlinkMacSystemFont,
|
|
78
|
+
'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji',
|
|
79
|
+
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
.activeIcon {
|
|
@@ -23,6 +23,12 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
23
23
|
|
|
24
24
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
25
|
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
|
|
30
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
+
|
|
26
32
|
var getKey = function getKey(emoji) {
|
|
27
33
|
return emoji[1][0];
|
|
28
34
|
};
|
|
@@ -54,11 +60,21 @@ var getGroups = function getGroups(emojis) {
|
|
|
54
60
|
};
|
|
55
61
|
|
|
56
62
|
var getEmojis = function getEmojis(groupsModifier) {
|
|
63
|
+
var _ref;
|
|
64
|
+
|
|
57
65
|
var excludedEmojis = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
58
|
-
var
|
|
59
|
-
return
|
|
66
|
+
var legacyGroups = getGroups(Object.entries(_emojilib.default)).map(function (group) {
|
|
67
|
+
return _objectSpread(_objectSpread({}, group), {}, {
|
|
68
|
+
emojis: group.emojis.filter(function (emoji) {
|
|
69
|
+
return ![].concat(_toConsumableArray(_constants.DEFAULT_EXCLUDED_EMOJIS), _toConsumableArray(excludedEmojis)).includes(getKey(emoji));
|
|
70
|
+
})
|
|
71
|
+
});
|
|
60
72
|
});
|
|
61
|
-
|
|
73
|
+
|
|
74
|
+
var filteredEmojisArray = (_ref = []).concat.apply(_ref, _toConsumableArray(legacyGroups.map(function (group) {
|
|
75
|
+
return group.emojis;
|
|
76
|
+
})));
|
|
77
|
+
|
|
62
78
|
var groups = groupsModifier ? groupsModifier(legacyGroups) : legacyGroups;
|
|
63
79
|
return {
|
|
64
80
|
emojis: filteredEmojisArray,
|