@widergy/energy-ui 1.117.5 → 1.119.0
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 +28 -0
- package/dist/components/UTEmojiPicker/constants.js +1 -1
- package/dist/components/UTEmojiPicker/styles.module.scss +10 -0
- package/dist/components/UTEmojiPicker/theme.js +19 -18
- package/dist/components/UTEmojiPicker/utils.js +19 -3
- package/dist/components/UTSelect/index.js +45 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# [1.119.0](https://github.com/widergy/energy-ui/compare/v1.118.0...v1.119.0) (2022-05-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix pr ([1d3b109](https://github.com/widergy/energy-ui/commit/1d3b10982df6a2b6c9298575cae11757a17e82a1))
|
|
7
|
+
* fixed propTypes ([fab740e](https://github.com/widergy/energy-ui/commit/fab740e35c1cea905108256cc87a4467f4ab1c32))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* added formHelperText to UTSelect ([6bf67b7](https://github.com/widergy/energy-ui/commit/6bf67b780b585ebdd42ccfb35d6dedacf12f6061))
|
|
13
|
+
* added formHelperText to UTSelect ([ee6b5f1](https://github.com/widergy/energy-ui/commit/ee6b5f195fd803c064230c4e2a1bbf99119404f4))
|
|
14
|
+
|
|
15
|
+
# [1.118.0](https://github.com/widergy/energy-ui/compare/v1.117.6...v1.118.0) (2022-05-09)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* emoji picker theme update ([#285](https://github.com/widergy/energy-ui/issues/285)) ([c80c198](https://github.com/widergy/energy-ui/commit/c80c1988a3e5f015954a945b9442779236bbffe4))
|
|
21
|
+
|
|
22
|
+
## [1.117.6](https://github.com/widergy/energy-ui/compare/v1.117.5...v1.117.6) (2022-04-28)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* excluded emojis fix ([#282](https://github.com/widergy/energy-ui/issues/282)) ([de2c972](https://github.com/widergy/energy-ui/commit/de2c972adbb7d5cad1f51f5bf1add6b6c5642f34))
|
|
28
|
+
|
|
1
29
|
## [1.117.5](https://github.com/widergy/energy-ui/compare/v1.117.4...v1.117.5) (2022-04-25)
|
|
2
30
|
|
|
3
31
|
|
|
@@ -168,7 +168,7 @@ Flags.defaultProps = {
|
|
|
168
168
|
strokeLinecap: "round",
|
|
169
169
|
strokeLinejoin: "round"
|
|
170
170
|
};
|
|
171
|
-
var DEFAULT_EXCLUDED_EMOJIS = ['
|
|
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,
|
|
@@ -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 {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
|
|
8
8
|
var retrieveStyle = function retrieveStyle(theme) {
|
|
9
|
-
var _theme$UTEmojiPicker, _theme$UTEmojiPicker$, _theme$UTEmojiPicker2, _theme$UTEmojiPicker3, _theme$UTEmojiPicker4, _theme$UTEmojiPicker5, _theme$UTEmojiPicker6, _theme$UTEmojiPicker7, _theme$UTEmojiPicker8, _theme$UTEmojiPicker9, _theme$UTEmojiPicker10, _theme$UTEmojiPicker11, _theme$UTEmojiPicker12, _theme$UTEmojiPicker13, _theme$UTEmojiPicker14, _theme$UTEmojiPicker15, _theme$UTEmojiPicker16, _theme$UTEmojiPicker17, _theme$UTEmojiPicker18, _theme$UTEmojiPicker19, _theme$UTEmojiPicker20, _theme$UTEmojiPicker21, _theme$UTEmojiPicker22, _theme$UTEmojiPicker23, _theme$UTEmojiPicker24, _theme$UTEmojiPicker25, _theme$UTEmojiPicker26, _theme$UTEmojiPicker27, _theme$UTEmojiPicker28, _theme$UTEmojiPicker29, _theme$UTEmojiPicker30, _theme$UTEmojiPicker31, _theme$UTEmojiPicker32, _theme$UTEmojiPicker33, _theme$UTEmojiPicker34, _theme$UTEmojiPicker35, _theme$UTEmojiPicker36, _theme$UTEmojiPicker37, _theme$UTEmojiPicker38, _theme$UTEmojiPicker39, _theme$UTEmojiPicker40, _theme$UTEmojiPicker41, _theme$UTEmojiPicker42, _theme$UTEmojiPicker43, _theme$UTEmojiPicker44, _theme$UTEmojiPicker45, _theme$UTEmojiPicker46, _theme$UTEmojiPicker47;
|
|
9
|
+
var _theme$UTEmojiPicker, _theme$UTEmojiPicker$, _theme$UTEmojiPicker2, _theme$UTEmojiPicker3, _theme$UTEmojiPicker4, _theme$UTEmojiPicker5, _theme$UTEmojiPicker6, _theme$UTEmojiPicker7, _theme$UTEmojiPicker8, _theme$UTEmojiPicker9, _theme$UTEmojiPicker10, _theme$UTEmojiPicker11, _theme$UTEmojiPicker12, _theme$UTEmojiPicker13, _theme$UTEmojiPicker14, _theme$UTEmojiPicker15, _theme$UTEmojiPicker16, _theme$UTEmojiPicker17, _theme$UTEmojiPicker18, _theme$UTEmojiPicker19, _theme$UTEmojiPicker20, _theme$UTEmojiPicker21, _theme$UTEmojiPicker22, _theme$UTEmojiPicker23, _theme$UTEmojiPicker24, _theme$UTEmojiPicker25, _theme$UTEmojiPicker26, _theme$UTEmojiPicker27, _theme$UTEmojiPicker28, _theme$UTEmojiPicker29, _theme$UTEmojiPicker30, _theme$UTEmojiPicker31, _theme$UTEmojiPicker32, _theme$UTEmojiPicker33, _theme$UTEmojiPicker34, _theme$UTEmojiPicker35, _theme$UTEmojiPicker36, _theme$UTEmojiPicker37, _theme$UTEmojiPicker38, _theme$UTEmojiPicker39, _theme$UTEmojiPicker40, _theme$UTEmojiPicker41, _theme$UTEmojiPicker42, _theme$UTEmojiPicker43, _theme$UTEmojiPicker44, _theme$UTEmojiPicker45, _theme$UTEmojiPicker46, _theme$UTEmojiPicker47, _theme$UTEmojiPicker48, _theme$UTEmojiPicker49;
|
|
10
10
|
|
|
11
11
|
return {
|
|
12
12
|
container: {
|
|
@@ -15,35 +15,36 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
15
15
|
left: theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker4 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker4 === void 0 ? void 0 : (_theme$UTEmojiPicker5 = _theme$UTEmojiPicker4.container) === null || _theme$UTEmojiPicker5 === void 0 ? void 0 : _theme$UTEmojiPicker5.left,
|
|
16
16
|
right: theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker6 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker6 === void 0 ? void 0 : (_theme$UTEmojiPicker7 = _theme$UTEmojiPicker6.container) === null || _theme$UTEmojiPicker7 === void 0 ? void 0 : _theme$UTEmojiPicker7.right,
|
|
17
17
|
top: theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker8 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker8 === void 0 ? void 0 : (_theme$UTEmojiPicker9 = _theme$UTEmojiPicker8.container) === null || _theme$UTEmojiPicker9 === void 0 ? void 0 : _theme$UTEmojiPicker9.top,
|
|
18
|
-
bottom: theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker10 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker10 === void 0 ? void 0 : (_theme$UTEmojiPicker11 = _theme$UTEmojiPicker10.container) === null || _theme$UTEmojiPicker11 === void 0 ? void 0 : _theme$UTEmojiPicker11.bottom
|
|
18
|
+
bottom: theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker10 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker10 === void 0 ? void 0 : (_theme$UTEmojiPicker11 = _theme$UTEmojiPicker10.container) === null || _theme$UTEmojiPicker11 === void 0 ? void 0 : _theme$UTEmojiPicker11.bottom,
|
|
19
|
+
borderRadius: theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker12 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker12 === void 0 ? void 0 : (_theme$UTEmojiPicker13 = _theme$UTEmojiPicker12.container) === null || _theme$UTEmojiPicker13 === void 0 ? void 0 : _theme$UTEmojiPicker13.borderRadius
|
|
19
20
|
},
|
|
20
21
|
listContainer: {
|
|
21
|
-
height: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
22
|
-
width: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
22
|
+
height: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker14 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker14 === void 0 ? void 0 : (_theme$UTEmojiPicker15 = _theme$UTEmojiPicker14.listContainer) === null || _theme$UTEmojiPicker15 === void 0 ? void 0 : _theme$UTEmojiPicker15.height) || '216px',
|
|
23
|
+
width: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker16 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker16 === void 0 ? void 0 : (_theme$UTEmojiPicker17 = _theme$UTEmojiPicker16.listContainer) === null || _theme$UTEmojiPicker17 === void 0 ? void 0 : _theme$UTEmojiPicker17.width) || '336px'
|
|
23
24
|
},
|
|
24
25
|
emoji: {
|
|
25
|
-
borderRadius: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
26
|
-
fontSize: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
27
|
-
height: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
28
|
-
width: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
29
|
-
margin: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
26
|
+
borderRadius: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker18 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker18 === void 0 ? void 0 : (_theme$UTEmojiPicker19 = _theme$UTEmojiPicker18.emoji) === null || _theme$UTEmojiPicker19 === void 0 ? void 0 : _theme$UTEmojiPicker19.borderRadius) || '4px',
|
|
27
|
+
fontSize: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker20 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker20 === void 0 ? void 0 : (_theme$UTEmojiPicker21 = _theme$UTEmojiPicker20.emoji) === null || _theme$UTEmojiPicker21 === void 0 ? void 0 : _theme$UTEmojiPicker21.fontSize) || '20px',
|
|
28
|
+
height: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker22 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker22 === void 0 ? void 0 : (_theme$UTEmojiPicker23 = _theme$UTEmojiPicker22.emoji) === null || _theme$UTEmojiPicker23 === void 0 ? void 0 : _theme$UTEmojiPicker23.height) || '32px',
|
|
29
|
+
width: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker24 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker24 === void 0 ? void 0 : (_theme$UTEmojiPicker25 = _theme$UTEmojiPicker24.emoji) === null || _theme$UTEmojiPicker25 === void 0 ? void 0 : _theme$UTEmojiPicker25.width) || '32px',
|
|
30
|
+
margin: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker26 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker26 === void 0 ? void 0 : (_theme$UTEmojiPicker27 = _theme$UTEmojiPicker26.emoji) === null || _theme$UTEmojiPicker27 === void 0 ? void 0 : _theme$UTEmojiPicker27.margin) || '4px',
|
|
30
31
|
'&:hover': {
|
|
31
|
-
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
32
|
+
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker28 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker28 === void 0 ? void 0 : (_theme$UTEmojiPicker29 = _theme$UTEmojiPicker28.emoji) === null || _theme$UTEmojiPicker29 === void 0 ? void 0 : (_theme$UTEmojiPicker30 = _theme$UTEmojiPicker29.hover) === null || _theme$UTEmojiPicker30 === void 0 ? void 0 : _theme$UTEmojiPicker30.backgroundColor) || '#E9F0FD'
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
groupItem: {
|
|
35
|
-
height: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
36
|
-
stroke: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
37
|
-
fill: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
36
|
+
height: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker31 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker31 === void 0 ? void 0 : (_theme$UTEmojiPicker32 = _theme$UTEmojiPicker31.groupItem) === null || _theme$UTEmojiPicker32 === void 0 ? void 0 : _theme$UTEmojiPicker32.height) || '40px',
|
|
37
|
+
stroke: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker33 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker33 === void 0 ? void 0 : (_theme$UTEmojiPicker34 = _theme$UTEmojiPicker33.groupItem) === null || _theme$UTEmojiPicker34 === void 0 ? void 0 : _theme$UTEmojiPicker34.color) || '#677489',
|
|
38
|
+
fill: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker35 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker35 === void 0 ? void 0 : (_theme$UTEmojiPicker36 = _theme$UTEmojiPicker35.groupItem) === null || _theme$UTEmojiPicker36 === void 0 ? void 0 : _theme$UTEmojiPicker36.color) || '#677489'
|
|
38
39
|
},
|
|
39
40
|
activeIcon: {
|
|
40
|
-
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
41
|
-
borderRadius: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
42
|
-
stroke: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
41
|
+
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker37 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker37 === void 0 ? void 0 : (_theme$UTEmojiPicker38 = _theme$UTEmojiPicker37.groupItem) === null || _theme$UTEmojiPicker38 === void 0 ? void 0 : (_theme$UTEmojiPicker39 = _theme$UTEmojiPicker38.active) === null || _theme$UTEmojiPicker39 === void 0 ? void 0 : _theme$UTEmojiPicker39.backgroundColor) || '#E9F0FD',
|
|
42
|
+
borderRadius: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker40 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker40 === void 0 ? void 0 : (_theme$UTEmojiPicker41 = _theme$UTEmojiPicker40.groupItem) === null || _theme$UTEmojiPicker41 === void 0 ? void 0 : (_theme$UTEmojiPicker42 = _theme$UTEmojiPicker41.active) === null || _theme$UTEmojiPicker42 === void 0 ? void 0 : _theme$UTEmojiPicker42.borderRadius) || '5px',
|
|
43
|
+
stroke: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker43 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker43 === void 0 ? void 0 : (_theme$UTEmojiPicker44 = _theme$UTEmojiPicker43.groupItem) === null || _theme$UTEmojiPicker44 === void 0 ? void 0 : (_theme$UTEmojiPicker45 = _theme$UTEmojiPicker44.active) === null || _theme$UTEmojiPicker45 === void 0 ? void 0 : _theme$UTEmojiPicker45.color) || '#2b70fb'
|
|
43
44
|
},
|
|
44
45
|
groups: {
|
|
45
|
-
borderBottom: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
46
|
-
padding: (theme === null || theme === void 0 ? void 0 : (_theme$
|
|
46
|
+
borderBottom: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker46 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker46 === void 0 ? void 0 : (_theme$UTEmojiPicker47 = _theme$UTEmojiPicker46.groups) === null || _theme$UTEmojiPicker47 === void 0 ? void 0 : _theme$UTEmojiPicker47.borderBottom) || '1px solid #E4E6EA',
|
|
47
|
+
padding: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker48 = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker48 === void 0 ? void 0 : (_theme$UTEmojiPicker49 = _theme$UTEmojiPicker48.groups) === null || _theme$UTEmojiPicker49 === void 0 ? void 0 : _theme$UTEmojiPicker49.padding) || '8px'
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
};
|
|
@@ -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,
|
|
@@ -59,6 +59,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
59
59
|
|
|
60
60
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
61
61
|
|
|
62
|
+
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; }
|
|
63
|
+
|
|
64
|
+
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; }
|
|
65
|
+
|
|
66
|
+
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; }
|
|
67
|
+
|
|
62
68
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
63
69
|
|
|
64
70
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -74,25 +80,26 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
74
80
|
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; }
|
|
75
81
|
|
|
76
82
|
var UTSelect = function UTSelect(_ref) {
|
|
77
|
-
var
|
|
78
|
-
|
|
83
|
+
var captionLabel = _ref.captionLabel,
|
|
84
|
+
classes = _ref.classes,
|
|
85
|
+
disabled = _ref.disabled,
|
|
86
|
+
disableFirstOption = _ref.disableFirstOption,
|
|
87
|
+
field = _ref.field,
|
|
88
|
+
IconPlaceholder = _ref.iconPlaceholder,
|
|
89
|
+
input = _ref.input,
|
|
79
90
|
labelKey = _ref.labelKey,
|
|
80
|
-
|
|
91
|
+
labelProps = _ref.labelProps,
|
|
81
92
|
menuPlaceholder = _ref.menuPlaceholder,
|
|
82
93
|
meta = _ref.meta,
|
|
83
|
-
|
|
94
|
+
options = _ref.options,
|
|
84
95
|
placeholder = _ref.placeholder,
|
|
85
|
-
|
|
96
|
+
selectProps = _ref.selectProps,
|
|
86
97
|
tooltip = _ref.tooltip,
|
|
87
|
-
|
|
88
|
-
IconPlaceholder = _ref.iconPlaceholder,
|
|
89
|
-
field = _ref.field,
|
|
98
|
+
valueKey = _ref.valueKey,
|
|
90
99
|
variant = _ref.variant,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
withoutFirstOption = _ref.withoutFirstOption,
|
|
95
|
-
withAutoReset = _ref.withAutoReset;
|
|
100
|
+
withAutoReset = _ref.withAutoReset,
|
|
101
|
+
withOrder = _ref.withOrder,
|
|
102
|
+
withoutFirstOption = _ref.withoutFirstOption;
|
|
96
103
|
|
|
97
104
|
var _ref2 = (field === null || field === void 0 ? void 0 : field.configuration) || {},
|
|
98
105
|
isMultiple = _ref2.multiple,
|
|
@@ -174,7 +181,9 @@ var UTSelect = function UTSelect(_ref) {
|
|
|
174
181
|
optionProps: subOption
|
|
175
182
|
}, optionCommonProps)));
|
|
176
183
|
})];
|
|
177
|
-
})),
|
|
184
|
+
})), captionLabel && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
185
|
+
classes: _objectSpread({}, classes.formHelperText)
|
|
186
|
+
}, captionLabel), (0, _form.shouldShowErrors)(meta) && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, null, meta.error)));
|
|
178
187
|
|
|
179
188
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
180
189
|
className: classes.container
|
|
@@ -197,49 +206,51 @@ var UTSelect = function UTSelect(_ref) {
|
|
|
197
206
|
};
|
|
198
207
|
|
|
199
208
|
UTSelect.defaultProps = {
|
|
200
|
-
withoutFirstOption: false,
|
|
201
|
-
options: [],
|
|
202
209
|
classes: {},
|
|
203
210
|
field: {
|
|
204
211
|
configuration: {
|
|
205
212
|
multiple: false
|
|
206
213
|
}
|
|
207
214
|
},
|
|
208
|
-
|
|
215
|
+
labelKey: _constants.LABEL_KEY,
|
|
209
216
|
labelProps: {},
|
|
210
217
|
meta: {},
|
|
218
|
+
options: [],
|
|
219
|
+
selectProps: {},
|
|
211
220
|
valueKey: _constants.VALUE_KEY,
|
|
212
|
-
|
|
213
|
-
|
|
221
|
+
withAutoReset: true,
|
|
222
|
+
withoutFirstOption: false
|
|
214
223
|
};
|
|
215
224
|
UTSelect.propTypes = {
|
|
216
|
-
|
|
217
|
-
input: _formTypes.inputPropTypes.isRequired,
|
|
218
|
-
iconPlaceholder: _propTypes.node,
|
|
219
|
-
meta: _formTypes.metaPropTypes,
|
|
220
|
-
disabled: _propTypes.bool,
|
|
221
|
-
valueKey: _propTypes.string,
|
|
222
|
-
labelKey: _propTypes.string,
|
|
223
|
-
placeholder: _propTypes.string,
|
|
224
|
-
withOrder: _propTypes.bool,
|
|
225
|
-
options: (0, _propTypes.arrayOf)(_propTypes.object),
|
|
226
|
-
tooltip: _propTypes.string,
|
|
227
|
-
menuPlaceholder: _propTypes.string,
|
|
225
|
+
captionLabel: _propTypes.string,
|
|
228
226
|
classes: (0, _propTypes.shape)({
|
|
229
227
|
container: _propTypes.string,
|
|
230
228
|
labelContainer: _propTypes.string,
|
|
231
229
|
formControl: _propTypes.string,
|
|
230
|
+
formHelperText: (0, _propTypes.objectOf)(_propTypes.string),
|
|
232
231
|
labelIcon: _propTypes.string,
|
|
233
232
|
optionIcon: _propTypes.string,
|
|
234
233
|
tooltipIcon: _propTypes.string,
|
|
235
234
|
upperTitle: _propTypes.string
|
|
236
235
|
}),
|
|
236
|
+
disabled: _propTypes.bool,
|
|
237
|
+
disableFirstOption: _propTypes.bool,
|
|
237
238
|
field: _formTypes.fieldType,
|
|
239
|
+
iconPlaceholder: _propTypes.node,
|
|
240
|
+
input: _formTypes.inputPropTypes.isRequired,
|
|
241
|
+
labelKey: _propTypes.string,
|
|
242
|
+
labelProps: _propTypes.object,
|
|
243
|
+
menuPlaceholder: _propTypes.string,
|
|
244
|
+
meta: _formTypes.metaPropTypes,
|
|
245
|
+
options: (0, _propTypes.arrayOf)(_propTypes.object),
|
|
246
|
+
placeholder: _propTypes.string,
|
|
247
|
+
selectProps: _propTypes.object,
|
|
248
|
+
tooltip: _propTypes.string,
|
|
249
|
+
valueKey: _propTypes.string,
|
|
238
250
|
variant: _propTypes.string,
|
|
239
|
-
disableFirstOption: _propTypes.bool,
|
|
240
251
|
withAutoReset: _propTypes.bool,
|
|
241
|
-
|
|
242
|
-
|
|
252
|
+
withOrder: _propTypes.bool,
|
|
253
|
+
withoutFirstOption: _propTypes.bool
|
|
243
254
|
};
|
|
244
255
|
|
|
245
256
|
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTSelect);
|