@widergy/energy-ui 1.136.0 → 1.136.2

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.
Files changed (256) hide show
  1. package/dist/components/EnergyThemeProvider/index.js +13 -36
  2. package/dist/components/Loading/constants.js +1 -2
  3. package/dist/components/Loading/index.js +13 -12
  4. package/dist/components/Loading/theme.js +9 -11
  5. package/dist/components/UTAlert/AlertHandler.js +75 -101
  6. package/dist/components/UTAlert/index.js +65 -87
  7. package/dist/components/UTAlert/theme.js +29 -31
  8. package/dist/components/UTAttachment/components/Preview/index.js +8 -9
  9. package/dist/components/UTAttachment/constants.js +7 -13
  10. package/dist/components/UTAttachment/index.js +153 -232
  11. package/dist/components/UTAttachment/layout.js +25 -26
  12. package/dist/components/UTAttachment/theme.js +12 -14
  13. package/dist/components/UTAttachment/utils.js +34 -117
  14. package/dist/components/UTAutocomplete/components/ListBox/index.js +13 -21
  15. package/dist/components/UTAutocomplete/components/ListBox/utils.js +9 -11
  16. package/dist/components/UTAutocomplete/constants.js +12 -23
  17. package/dist/components/UTAutocomplete/index.js +45 -66
  18. package/dist/components/UTAutocomplete/theme.js +3 -3
  19. package/dist/components/UTAvatar/constants.js +2 -3
  20. package/dist/components/UTAvatar/index.js +15 -12
  21. package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +22 -22
  22. package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -1
  23. package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +21 -22
  24. package/dist/components/UTBarChart/components/Bars/constants.js +3 -6
  25. package/dist/components/UTBarChart/components/Bars/index.js +70 -80
  26. package/dist/components/UTBarChart/components/Legend/constants.js +12 -18
  27. package/dist/components/UTBarChart/components/Legend/index.js +73 -91
  28. package/dist/components/UTBarChart/components/Legend/utils.js +1 -5
  29. package/dist/components/UTBarChart/components/Levels/index.js +16 -14
  30. package/dist/components/UTBarChart/components/Levels/utils.js +25 -27
  31. package/dist/components/UTBarChart/components/LinearPlot/constants.js +3 -5
  32. package/dist/components/UTBarChart/components/LinearPlot/index.js +25 -20
  33. package/dist/components/UTBarChart/components/LinearPlot/utils.js +37 -39
  34. package/dist/components/UTBarChart/components/Pagination/constants.js +1 -2
  35. package/dist/components/UTBarChart/components/Pagination/index.js +20 -24
  36. package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +21 -32
  37. package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -4
  38. package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +20 -19
  39. package/dist/components/UTBarChart/components/XAxis/constants.js +1 -2
  40. package/dist/components/UTBarChart/components/XAxis/index.js +54 -65
  41. package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +12 -11
  42. package/dist/components/UTBarChart/components/YAxis/constants.js +1 -2
  43. package/dist/components/UTBarChart/components/YAxis/index.js +24 -31
  44. package/dist/components/UTBarChart/components/YAxis/utils.js +4 -6
  45. package/dist/components/UTBarChart/constants.js +4 -8
  46. package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +23 -40
  47. package/dist/components/UTBarChart/index.js +148 -162
  48. package/dist/components/UTBarChart/theme.js +102 -104
  49. package/dist/components/UTBarChart/types.js +9 -17
  50. package/dist/components/UTBarChart/utils.js +107 -111
  51. package/dist/components/UTBreadcrumbs/constants.js +3 -6
  52. package/dist/components/UTBreadcrumbs/index.js +79 -106
  53. package/dist/components/UTBreadcrumbs/theme.js +21 -23
  54. package/dist/components/UTButton/index.js +48 -71
  55. package/dist/components/UTButton/theme.js +172 -174
  56. package/dist/components/UTCBUInput/index.js +36 -40
  57. package/dist/components/UTCBUInput/theme.js +5 -7
  58. package/dist/components/UTCaptcha/index.js +19 -45
  59. package/dist/components/UTCard/components/UTCardFooter/index.js +16 -17
  60. package/dist/components/UTCard/index.js +87 -122
  61. package/dist/components/UTCard/theme.js +8 -11
  62. package/dist/components/UTCard/types.js +2 -3
  63. package/dist/components/UTCarousel/components/Button/index.js +13 -13
  64. package/dist/components/UTCarousel/components/Legend/index.js +14 -16
  65. package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
  66. package/dist/components/UTCarousel/components/Slider/constants.js +5 -10
  67. package/dist/components/UTCarousel/components/Slider/index.js +181 -252
  68. package/dist/components/UTCarousel/components/Slider/layout.js +66 -93
  69. package/dist/components/UTCarousel/index.js +14 -15
  70. package/dist/components/UTCarousel/theme.js +35 -37
  71. package/dist/components/UTCheckList/constants.js +1 -2
  72. package/dist/components/UTCheckList/index.js +72 -91
  73. package/dist/components/UTCheckList/theme.js +66 -70
  74. package/dist/components/UTCheckbox/constants.js +3 -6
  75. package/dist/components/UTCheckbox/index.js +31 -42
  76. package/dist/components/UTCheckbox/theme.js +49 -53
  77. package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
  78. package/dist/components/UTConsumptionBar/constants.js +3 -6
  79. package/dist/components/UTConsumptionBar/index.js +49 -74
  80. package/dist/components/UTCuit/index.js +109 -133
  81. package/dist/components/UTCuit/theme.js +47 -49
  82. package/dist/components/UTDatePicker/components/Day/constants.js +1 -2
  83. package/dist/components/UTDatePicker/components/Day/index.js +12 -12
  84. package/dist/components/UTDatePicker/constants.js +20 -31
  85. package/dist/components/UTDatePicker/index.js +59 -101
  86. package/dist/components/UTDatePicker/theme.js +173 -177
  87. package/dist/components/UTDatePicker/types.js +2 -3
  88. package/dist/components/UTDatePicker/utils.js +2 -6
  89. package/dist/components/UTDialog/components/ActionButton/index.js +10 -9
  90. package/dist/components/UTDialog/constants.js +2 -4
  91. package/dist/components/UTDialog/index.js +39 -38
  92. package/dist/components/UTDialog/theme.js +93 -95
  93. package/dist/components/UTDialog/types.js +2 -3
  94. package/dist/components/UTDotMenu/index.js +33 -57
  95. package/dist/components/UTEmojiPicker/constants.js +6 -11
  96. package/dist/components/UTEmojiPicker/index.js +45 -65
  97. package/dist/components/UTEmojiPicker/theme.js +1 -1
  98. package/dist/components/UTEmojiPicker/utils.js +21 -51
  99. package/dist/components/UTExternalLink/index.js +17 -14
  100. package/dist/components/UTFileInput/constants.js +2 -4
  101. package/dist/components/UTFileInput/index.js +7 -31
  102. package/dist/components/UTFileInput/layout.js +67 -96
  103. package/dist/components/UTIconButton/index.js +49 -72
  104. package/dist/components/UTIconButton/theme.js +53 -55
  105. package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +53 -58
  106. package/dist/components/UTImageRadio/constants.js +3 -6
  107. package/dist/components/UTImageRadio/index.js +39 -47
  108. package/dist/components/UTImageRadio/theme.js +8 -11
  109. package/dist/components/UTImageRadio/types.js +2 -3
  110. package/dist/components/UTImageRadio/utils.js +2 -6
  111. package/dist/components/UTLabel/index.js +69 -90
  112. package/dist/components/UTLabel/theme.js +84 -86
  113. package/dist/components/UTList/index.js +15 -18
  114. package/dist/components/UTLoading/index.js +15 -15
  115. package/dist/components/UTMap/components/GoogleMaps/constants.js +8 -11
  116. package/dist/components/UTMap/components/GoogleMaps/index.js +63 -91
  117. package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -3
  118. package/dist/components/UTMap/constants.js +6 -12
  119. package/dist/components/UTMap/index.js +163 -198
  120. package/dist/components/UTMap/types.js +4 -6
  121. package/dist/components/UTMap/utils.js +29 -46
  122. package/dist/components/UTMap/withGoogleMapScript.js +12 -17
  123. package/dist/components/UTMenu/index.js +52 -69
  124. package/dist/components/UTMenu/theme.js +2 -2
  125. package/dist/components/UTMenu/utils.js +5 -11
  126. package/dist/components/UTPagination/theme.js +4 -2
  127. package/dist/components/UTPanel/index.js +38 -44
  128. package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +14 -11
  129. package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +24 -21
  130. package/dist/components/UTPasswordField/components/PasswordValidations/index.js +63 -50
  131. package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -27
  132. package/dist/components/UTPasswordField/index.js +26 -23
  133. package/dist/components/UTPasswordField/theme.js +37 -39
  134. package/dist/components/UTPhoneInput/constants.js +3 -6
  135. package/dist/components/UTPhoneInput/index.js +180 -205
  136. package/dist/components/UTPhoneInput/theme.js +109 -113
  137. package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -8
  138. package/dist/components/UTPieChart/components/ArrowLabel/index.js +24 -23
  139. package/dist/components/UTPieChart/components/Legend/contants.js +3 -6
  140. package/dist/components/UTPieChart/components/Legend/index.js +27 -24
  141. package/dist/components/UTPieChart/constants.js +13 -26
  142. package/dist/components/UTPieChart/hooks/use-animated-value/index.js +15 -33
  143. package/dist/components/UTPieChart/index.js +73 -76
  144. package/dist/components/UTPieChart/theme.js +23 -25
  145. package/dist/components/UTPieChart/utils.js +4 -2
  146. package/dist/components/UTProgressBar/constants.js +2 -4
  147. package/dist/components/UTProgressBar/index.js +12 -11
  148. package/dist/components/UTProgressBar/theme.js +25 -27
  149. package/dist/components/UTProgressBar/types.js +2 -3
  150. package/dist/components/UTRadioGroup/index.js +45 -71
  151. package/dist/components/UTRadioGroup/theme.js +82 -86
  152. package/dist/components/UTRating/components/Circle/index.js +41 -56
  153. package/dist/components/UTRating/components/Faces/constants.js +2 -4
  154. package/dist/components/UTRating/components/Faces/index.js +34 -36
  155. package/dist/components/UTRating/components/Star/index.js +36 -40
  156. package/dist/components/UTRating/constants.js +4 -8
  157. package/dist/components/UTRating/index.js +31 -46
  158. package/dist/components/UTRating/theme.js +77 -79
  159. package/dist/components/UTRipple/Ripple.js +22 -39
  160. package/dist/components/UTRipple/index.js +18 -37
  161. package/dist/components/UTSelect/components/Option/index.js +13 -13
  162. package/dist/components/UTSelect/constants.js +4 -8
  163. package/dist/components/UTSelect/index.js +61 -81
  164. package/dist/components/UTSelect/stylesJS.js +2 -3
  165. package/dist/components/UTSelect/theme.js +43 -45
  166. package/dist/components/UTSelect/utils.js +3 -13
  167. package/dist/components/UTSidebar/components/ListOption/index.js +32 -47
  168. package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +8 -8
  169. package/dist/components/UTSidebar/components/LogosContainer/index.js +14 -14
  170. package/dist/components/UTSidebar/components/Option/constants.js +2 -3
  171. package/dist/components/UTSidebar/components/Option/index.js +28 -32
  172. package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
  173. package/dist/components/UTSidebar/index.js +42 -53
  174. package/dist/components/UTSidebar/theme.js +1 -1
  175. package/dist/components/UTSidebar/types.js +5 -10
  176. package/dist/components/UTSkeleton/index.js +10 -36
  177. package/dist/components/UTSwitch/constants.js +3 -6
  178. package/dist/components/UTSwitch/index.js +42 -57
  179. package/dist/components/UTSwitch/theme.js +115 -117
  180. package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
  181. package/dist/components/UTTable/components/ActionIcons/index.js +44 -81
  182. package/dist/components/UTTable/components/Cell/index.js +18 -23
  183. package/dist/components/UTTable/components/HeaderCell/constants.js +2 -3
  184. package/dist/components/UTTable/components/HeaderCell/index.js +23 -30
  185. package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
  186. package/dist/components/UTTable/components/PrimaryAction/index.js +12 -11
  187. package/dist/components/UTTable/components/ResponsiveCell/index.js +19 -20
  188. package/dist/components/UTTable/components/Status/index.js +18 -19
  189. package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +10 -9
  190. package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +7 -13
  191. package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
  192. package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +21 -32
  193. package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +8 -14
  194. package/dist/components/UTTable/components/TableFooter/constants.js +1 -2
  195. package/dist/components/UTTable/components/TableFooter/index.js +15 -15
  196. package/dist/components/UTTable/components/TableHeader/index.js +11 -11
  197. package/dist/components/UTTable/components/TableRow/constants.js +3 -6
  198. package/dist/components/UTTable/components/TableRow/index.js +79 -94
  199. package/dist/components/UTTable/constants.js +26 -43
  200. package/dist/components/UTTable/hook.js +11 -26
  201. package/dist/components/UTTable/index.js +125 -213
  202. package/dist/components/UTTable/theme.js +13 -16
  203. package/dist/components/UTTable/types.js +4 -8
  204. package/dist/components/UTTable/utils.js +70 -74
  205. package/dist/components/UTTabs/components/TooltipTab/index.js +20 -30
  206. package/dist/components/UTTabs/constants.js +4 -8
  207. package/dist/components/UTTabs/index.js +55 -84
  208. package/dist/components/UTTabs/theme.js +112 -114
  209. package/dist/components/UTTabs/utils.js +1 -1
  210. package/dist/components/UTTextArea/constants.js +4 -6
  211. package/dist/components/UTTextArea/index.js +40 -24
  212. package/dist/components/UTTextArea/styles.module.scss +20 -1
  213. package/dist/components/UTTextArea/theme.js +1 -1
  214. package/dist/components/UTTextInput/constants.js +2 -3
  215. package/dist/components/UTTextInput/index.js +116 -146
  216. package/dist/components/UTTextInput/theme.js +28 -30
  217. package/dist/components/UTThirdPartyCookieChecker/index.js +17 -21
  218. package/dist/components/UTToggle/components/ToggleOption/index.js +16 -17
  219. package/dist/components/UTToggle/index.js +25 -26
  220. package/dist/components/UTToggle/theme.js +47 -49
  221. package/dist/components/UTTooltip/index.js +23 -30
  222. package/dist/components/UTTooltip/theme.js +1 -1
  223. package/dist/components/UTTopbar/theme.js +4 -2
  224. package/dist/components/UTTouchableWithoutFeedback/index.js +14 -27
  225. package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -4
  226. package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +34 -31
  227. package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
  228. package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -12
  229. package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +8 -18
  230. package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +23 -47
  231. package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +31 -34
  232. package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +81 -93
  233. package/dist/components/UTVirtualizedList/constants.js +4 -8
  234. package/dist/components/UTVirtualizedList/index.js +26 -38
  235. package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +11 -11
  236. package/dist/components/UTWorkflowContainer/constants.js +5 -9
  237. package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
  238. package/dist/components/UTWorkflowContainer/index.js +31 -50
  239. package/dist/components/UTWorkflowContainer/theme.js +70 -64
  240. package/dist/components/UTWorkflowContainer/types.js +2 -3
  241. package/dist/components/WithLoading/index.js +10 -15
  242. package/dist/components/WithTheme/index.js +10 -17
  243. package/dist/components/WithTheme/layout.js +18 -41
  244. package/dist/components/WithTouch/index.js +12 -19
  245. package/dist/index.js +54 -54
  246. package/dist/scss/variables/colors.module.scss +1 -0
  247. package/dist/theme.js +5 -3
  248. package/dist/types/commonTypes.js +3 -5
  249. package/dist/types/consumptionTypes.js +3 -5
  250. package/dist/types/formTypes.js +4 -7
  251. package/dist/types/tableTypes.js +2 -3
  252. package/dist/utils/classesUtils.js +4 -10
  253. package/dist/utils/componentUtils.js +10 -13
  254. package/dist/utils/helperFunctions.js +4 -4
  255. package/dist/utils/useScreenSize.js +2 -3
  256. package/package.json +1 -1
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.classesPropTypes = void 0;
7
7
  var _propTypes = require("prop-types");
8
- var classesPropTypes = (0, _propTypes.shape)({
8
+ const classesPropTypes = exports.classesPropTypes = (0, _propTypes.shape)({
9
9
  content: _propTypes.string,
10
10
  container: _propTypes.string,
11
11
  root: _propTypes.string,
@@ -14,5 +14,4 @@ var classesPropTypes = (0, _propTypes.shape)({
14
14
  closeIcon: _propTypes.string,
15
15
  warning: _propTypes.string,
16
16
  dialogActions: _propTypes.string
17
- });
18
- exports.classesPropTypes = classesPropTypes;
17
+ });
@@ -6,11 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.isSelected = exports.dateMatchesFormat = void 0;
7
7
  var _dayjs = _interopRequireDefault(require("dayjs"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var isSelected = function isSelected(date, selectedDate) {
10
- return selectedDate && date.isSame(selectedDate, 'day');
11
- };
9
+ const isSelected = (date, selectedDate) => selectedDate && date.isSame(selectedDate, 'day');
12
10
  exports.isSelected = isSelected;
13
- var dateMatchesFormat = function dateMatchesFormat(date, targetFormat) {
14
- return (0, _dayjs.default)(date, targetFormat).format(targetFormat) === date;
15
- };
11
+ const dateMatchesFormat = (date, targetFormat) => (0, _dayjs.default)(date, targetFormat).format(targetFormat) === date;
16
12
  exports.dateMatchesFormat = dateMatchesFormat;
@@ -10,14 +10,16 @@ var _UTButton = _interopRequireDefault(require("../../../UTButton"));
10
10
  var _types = require("../../types");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
13
- var ActionButton = function ActionButton(_ref) {
14
- var button = _ref.button,
15
- className = _ref.className,
16
- defaultText = _ref.defaultText,
17
- ButtonComponent = _ref.ButtonComponent;
18
- var Component = ButtonComponent || _UTButton.default;
13
+ const ActionButton = _ref => {
14
+ let {
15
+ button,
16
+ className,
17
+ defaultText,
18
+ ButtonComponent
19
+ } = _ref;
20
+ const Component = ButtonComponent || _UTButton.default;
19
21
  return /*#__PURE__*/_react.default.isValidElement(button) ? /*#__PURE__*/_react.default.cloneElement(button, {
20
- className: className
22
+ className
21
23
  }) : /*#__PURE__*/_react.default.createElement(Component, _extends({
22
24
  loading: button.loading,
23
25
  onPress: button.onPress,
@@ -31,5 +33,4 @@ ActionButton.propTypes = {
31
33
  defaultText: _propTypes.string,
32
34
  ButtonComponent: (0, _propTypes.oneOfType)([_propTypes.element, _propTypes.elementType, _propTypes.node, _propTypes.func])
33
35
  };
34
- var _default = ActionButton;
35
- exports.default = _default;
36
+ var _default = exports.default = ActionButton;
@@ -4,7 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CANCEL_BUTTON_TEXT = exports.ACCEPT_BUTTON_TEXT = void 0;
7
- var CANCEL_BUTTON_TEXT = 'Cancelar';
8
- exports.CANCEL_BUTTON_TEXT = CANCEL_BUTTON_TEXT;
9
- var ACCEPT_BUTTON_TEXT = 'Aceptar';
10
- exports.ACCEPT_BUTTON_TEXT = ACCEPT_BUTTON_TEXT;
7
+ const CANCEL_BUTTON_TEXT = exports.CANCEL_BUTTON_TEXT = 'Cancelar';
8
+ const ACCEPT_BUTTON_TEXT = exports.ACCEPT_BUTTON_TEXT = 'Aceptar';
@@ -21,41 +21,43 @@ var _theme = require("./theme");
21
21
  var _constants = require("./constants");
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
24
- var UTDialog = function UTDialog(_ref) {
25
- var acceptButton = _ref.acceptButton,
26
- alertConfig = _ref.alertConfig,
27
- ButtonComponent = _ref.ButtonComponent,
28
- cancelButton = _ref.cancelButton,
29
- children = _ref.children,
30
- classes = _ref.classes,
31
- classNames = _ref.classNames,
32
- contentName = _ref.contentName,
33
- dialogProps = _ref.dialogProps,
34
- disableEnforceFocus = _ref.disableEnforceFocus,
35
- disableScrollLock = _ref.disableScrollLock,
36
- disableTypography = _ref.disableTypography,
37
- elevation = _ref.elevation,
38
- FooterComponents = _ref.FooterComponents,
39
- _ref$isOpen = _ref.isOpen,
40
- isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
41
- onRequestClose = _ref.onRequestClose,
42
- roundedCloseButton = _ref.roundedCloseButton,
43
- title = _ref.title,
44
- TransitionProps = _ref.TransitionProps,
45
- warningAlert = _ref.warningAlert,
46
- whiteTitle = _ref.whiteTitle,
47
- withClickAway = _ref.withClickAway,
48
- withCloseButton = _ref.withCloseButton;
49
- var CloseIcon = roundedCloseButton ? _CloseRounded.default : _Close.default;
50
- var _ref2 = classNames || {},
51
- content = _ref2.content,
52
- container = _ref2.container,
53
- root = _ref2.root,
54
- closeButton = _ref2.closeButton,
55
- mainTitle = _ref2.mainTitle,
56
- closeIcon = _ref2.closeIcon,
57
- warning = _ref2.warning,
58
- dialogActions = _ref2.dialogActions;
24
+ const UTDialog = _ref => {
25
+ let {
26
+ acceptButton,
27
+ alertConfig,
28
+ ButtonComponent,
29
+ cancelButton,
30
+ children,
31
+ classes,
32
+ classNames,
33
+ contentName,
34
+ dialogProps,
35
+ disableEnforceFocus,
36
+ disableScrollLock,
37
+ disableTypography,
38
+ elevation,
39
+ FooterComponents,
40
+ isOpen = false,
41
+ onRequestClose,
42
+ roundedCloseButton,
43
+ title,
44
+ TransitionProps,
45
+ warningAlert,
46
+ whiteTitle,
47
+ withClickAway,
48
+ withCloseButton
49
+ } = _ref;
50
+ const CloseIcon = roundedCloseButton ? _CloseRounded.default : _Close.default;
51
+ const {
52
+ content,
53
+ container,
54
+ root,
55
+ closeButton,
56
+ mainTitle,
57
+ closeIcon,
58
+ warning,
59
+ dialogActions
60
+ } = classNames || {};
59
61
  return /*#__PURE__*/_react.default.createElement(_Dialog.default, _extends({
60
62
  open: isOpen,
61
63
  onClose: withClickAway && onRequestClose,
@@ -66,7 +68,7 @@ var UTDialog = function UTDialog(_ref) {
66
68
  root: "".concat(classes.root, " ").concat(root)
67
69
  },
68
70
  PaperProps: {
69
- elevation: elevation
71
+ elevation
70
72
  },
71
73
  disableEnforceFocus: disableEnforceFocus,
72
74
  disableScrollLock: disableScrollLock,
@@ -131,5 +133,4 @@ UTDialog.propTypes = {
131
133
  withClickAway: _propTypes.bool,
132
134
  withCloseButton: _propTypes.bool
133
135
  };
134
- var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTDialog);
135
- exports.default = _default;
136
+ var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTDialog);
@@ -7,99 +7,97 @@ exports.retrieveStyle = void 0;
7
7
  var _seamlessImmutable = require("seamless-immutable");
8
8
  var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- var retrieveStyle = function retrieveStyle(theme) {
11
- return {
12
- container: {
13
- margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'margin'], 0),
14
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'padding']),
15
- maxWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'maxWidth']),
16
- minHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'minHeight']),
17
- maxHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'maxHeight']),
18
- minWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'minWidth']),
19
- borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'borderRadius']),
20
- boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'boxSizing']),
21
- overflow: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'overflow']),
22
- overflowY: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'overflowY'])
23
- },
24
- root: {
25
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'root', 'padding'])
26
- },
27
- mainTitle: {
28
- display: 'flex',
29
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'padding']),
30
- alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'alignItems']),
31
- backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'backgroundColor']),
32
- color: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'color']),
33
- justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'justifyContent']),
34
- marginRight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'marginRight']),
35
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'fontSize']),
36
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'fontWeight']),
37
- margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'margin']),
38
- flex: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'flex']),
39
- lineHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'lineHeight']),
40
- textAlign: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'textAlign']),
41
- borderBottom: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'borderBottom'], 'none')
42
- },
43
- whiteTitle: {
44
- color: _colorsModule.default.white
45
- },
46
- content: {
47
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'padding']),
48
- minHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'minHeight']),
49
- maxWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'maxWidth']),
50
- width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'width'])
51
- },
52
- dialogActions: {
53
- margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'margin']),
54
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'padding']),
55
- alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'alignItems']),
56
- boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'boxSizing']),
57
- display: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'display']),
58
- justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'justifyContent']),
59
- borderTop: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'borderTop']),
60
- width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'width'])
61
- },
62
- closeButton: {
63
- position: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'position'], 'absolute !important'),
64
- right: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'right'], '5px'),
65
- top: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'top'], '5px'),
66
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'padding'])
67
- },
68
- whiteCloseButton: {
69
- color: _colorsModule.default.white
70
- },
71
- acceptButton: {
72
- margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'margin']),
73
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'padding']),
74
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'fontSize']),
75
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'fontWeight']),
76
- width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'width']),
77
- backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'backgroundColor']),
78
- textTransform: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'textTransform'])
79
- },
80
- cancelButton: {
81
- color: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'color']),
82
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'padding']),
83
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'fontSize']),
84
- fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'fontWeight']),
85
- transition: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'transition']),
86
- textTransform: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'textTransform']),
87
- width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'width'])
88
- },
89
- hidden: {
90
- display: 'none'
91
- },
92
- warning: {
93
- maxWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'warning', 'maxWidth']),
94
- padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'warning', 'padding']),
95
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'warning', 'fontSize'])
96
- },
97
- closeIcon: {
98
- fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'fontSize']),
99
- width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'width']),
100
- height: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'height']),
101
- fill: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'fill'])
102
- }
103
- };
104
- };
10
+ const retrieveStyle = theme => ({
11
+ container: {
12
+ margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'margin'], 0),
13
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'padding']),
14
+ maxWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'maxWidth']),
15
+ minHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'minHeight']),
16
+ maxHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'maxHeight']),
17
+ minWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'minWidth']),
18
+ borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'borderRadius']),
19
+ boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'boxSizing']),
20
+ overflow: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'overflow']),
21
+ overflowY: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'overflowY'])
22
+ },
23
+ root: {
24
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'root', 'padding'])
25
+ },
26
+ mainTitle: {
27
+ display: 'flex',
28
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'padding']),
29
+ alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'alignItems']),
30
+ backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'backgroundColor']),
31
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'color']),
32
+ justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'justifyContent']),
33
+ marginRight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'marginRight']),
34
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'fontSize']),
35
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'fontWeight']),
36
+ margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'margin']),
37
+ flex: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'flex']),
38
+ lineHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'lineHeight']),
39
+ textAlign: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'textAlign']),
40
+ borderBottom: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'mainTitle', 'borderBottom'], 'none')
41
+ },
42
+ whiteTitle: {
43
+ color: _colorsModule.default.white
44
+ },
45
+ content: {
46
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'padding']),
47
+ minHeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'minHeight']),
48
+ maxWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'maxWidth']),
49
+ width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'content', 'width'])
50
+ },
51
+ dialogActions: {
52
+ margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'margin']),
53
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'padding']),
54
+ alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'alignItems']),
55
+ boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'boxSizing']),
56
+ display: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'display']),
57
+ justifyContent: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'justifyContent']),
58
+ borderTop: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'borderTop']),
59
+ width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'width'])
60
+ },
61
+ closeButton: {
62
+ position: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'position'], 'absolute !important'),
63
+ right: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'right'], '5px'),
64
+ top: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'top'], '5px'),
65
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'padding'])
66
+ },
67
+ whiteCloseButton: {
68
+ color: _colorsModule.default.white
69
+ },
70
+ acceptButton: {
71
+ margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'margin']),
72
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'padding']),
73
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'fontSize']),
74
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'fontWeight']),
75
+ width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'width']),
76
+ backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'backgroundColor']),
77
+ textTransform: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'textTransform'])
78
+ },
79
+ cancelButton: {
80
+ color: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'color']),
81
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'padding']),
82
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'fontSize']),
83
+ fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'fontWeight']),
84
+ transition: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'transition']),
85
+ textTransform: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'textTransform']),
86
+ width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'width'])
87
+ },
88
+ hidden: {
89
+ display: 'none'
90
+ },
91
+ warning: {
92
+ maxWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'warning', 'maxWidth']),
93
+ padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'warning', 'padding']),
94
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'warning', 'fontSize'])
95
+ },
96
+ closeIcon: {
97
+ fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'fontSize']),
98
+ width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'width']),
99
+ height: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'height']),
100
+ fill: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeIcon', 'fill'])
101
+ }
102
+ });
105
103
  exports.retrieveStyle = retrieveStyle;
@@ -5,11 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.dialogButtonPropTypes = void 0;
7
7
  var _propTypes = require("prop-types");
8
- var dialogButtonPropTypes = (0, _propTypes.oneOfType)([_propTypes.element, (0, _propTypes.shape)({
8
+ const dialogButtonPropTypes = exports.dialogButtonPropTypes = (0, _propTypes.oneOfType)([_propTypes.element, (0, _propTypes.shape)({
9
9
  onPress: _propTypes.func,
10
10
  text: _propTypes.string,
11
11
  disabled: _propTypes.bool,
12
12
  className: _propTypes.string,
13
13
  config: _propTypes.object
14
- })]);
15
- exports.dialogButtonPropTypes = dialogButtonPropTypes;
14
+ })]);
@@ -11,71 +11,48 @@ var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
11
11
  var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
12
12
  var _propTypes = require("prop-types");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
15
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
17
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
22
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
14
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
- var UTDotMenu = /*#__PURE__*/function (_React$Component) {
29
- _inherits(UTDotMenu, _React$Component);
30
- var _super = _createSuper(UTDotMenu);
31
- function UTDotMenu() {
32
- var _this;
33
- _classCallCheck(this, UTDotMenu);
34
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
- args[_key] = arguments[_key];
36
- }
37
- _this = _super.call.apply(_super, [this].concat(args));
38
- _defineProperty(_assertThisInitialized(_this), "state", {
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
+ class UTDotMenu extends _react.default.Component {
18
+ constructor() {
19
+ super(...arguments);
20
+ _defineProperty(this, "state", {
39
21
  anchorEl: null
40
22
  });
41
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
42
- _this.setState({
23
+ _defineProperty(this, "handleClick", event => {
24
+ this.setState({
43
25
  anchorEl: event.currentTarget
44
26
  });
45
27
  });
46
- _defineProperty(_assertThisInitialized(_this), "handleClose", function () {
47
- _this.setState({
28
+ _defineProperty(this, "handleClose", () => {
29
+ this.setState({
48
30
  anchorEl: null
49
31
  });
50
32
  });
51
- return _this;
52
33
  }
53
- _createClass(UTDotMenu, [{
54
- key: "render",
55
- value: function render() {
56
- var anchorEl = this.state.anchorEl;
57
- return /*#__PURE__*/_react.default.createElement("div", {
58
- className: this.props.className
59
- }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
60
- "aria-label": "More",
61
- "aria-owns": anchorEl ? 'long-menu' : null,
62
- "aria-haspopup": "true",
63
- onClick: this.handleClick
64
- }, /*#__PURE__*/_react.default.createElement(_MoreVert.default, null)), /*#__PURE__*/_react.default.createElement(_Menu.default, {
65
- id: "long-menu",
66
- anchorEl: anchorEl,
67
- open: Boolean(anchorEl),
68
- onClose: this.handleClose
69
- }, this.props.options.map(function (option) {
70
- return /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
71
- key: option.name,
72
- onClick: option.onPress
73
- }, option.name);
74
- })));
75
- }
76
- }]);
77
- return UTDotMenu;
78
- }(_react.default.Component);
34
+ render() {
35
+ const {
36
+ anchorEl
37
+ } = this.state;
38
+ return /*#__PURE__*/_react.default.createElement("div", {
39
+ className: this.props.className
40
+ }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
41
+ "aria-label": "More",
42
+ "aria-owns": anchorEl ? 'long-menu' : null,
43
+ "aria-haspopup": "true",
44
+ onClick: this.handleClick
45
+ }, /*#__PURE__*/_react.default.createElement(_MoreVert.default, null)), /*#__PURE__*/_react.default.createElement(_Menu.default, {
46
+ id: "long-menu",
47
+ anchorEl: anchorEl,
48
+ open: Boolean(anchorEl),
49
+ onClose: this.handleClose
50
+ }, this.props.options.map(option => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
51
+ key: option.name,
52
+ onClick: option.onPress
53
+ }, option.name))));
54
+ }
55
+ }
79
56
  UTDotMenu.propTypes = {
80
57
  options: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
81
58
  name: _propTypes.string,
@@ -83,5 +60,4 @@ UTDotMenu.propTypes = {
83
60
  })),
84
61
  className: _propTypes.string
85
62
  };
86
- var _default = UTDotMenu;
87
- exports.default = _default;
63
+ var _default = exports.default = UTDotMenu;
@@ -146,24 +146,20 @@ Flags.defaultProps = {
146
146
  strokeLinecap: "round",
147
147
  strokeLinejoin: "round"
148
148
  };
149
- 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'];
150
- exports.DEFAULT_EXCLUDED_EMOJIS = DEFAULT_EXCLUDED_EMOJIS;
151
- var DEFAULT_VIRTUALIZED_LIST_CONFIG = {
149
+ const DEFAULT_EXCLUDED_EMOJIS = exports.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'];
150
+ const DEFAULT_VIRTUALIZED_LIST_CONFIG = exports.DEFAULT_VIRTUALIZED_LIST_CONFIG = {
152
151
  overscan: 10,
153
152
  elementsPerRow: 8,
154
153
  itemPadding: 0
155
154
  };
156
- exports.DEFAULT_VIRTUALIZED_LIST_CONFIG = DEFAULT_VIRTUALIZED_LIST_CONFIG;
157
- var DEFAULT_BUTTON_EMOJI_INDEX = 0;
158
- exports.DEFAULT_BUTTON_EMOJI_INDEX = DEFAULT_BUTTON_EMOJI_INDEX;
159
- var DEFAULT_POSITIONS = {
155
+ const DEFAULT_BUTTON_EMOJI_INDEX = exports.DEFAULT_BUTTON_EMOJI_INDEX = 0;
156
+ const DEFAULT_POSITIONS = exports.DEFAULT_POSITIONS = {
160
157
  BOTTOM_LEFT: 'bottomLeft',
161
158
  BOTTOM_RIGHT: 'bottomRight',
162
159
  TOP_LEFT: 'topLeft',
163
160
  TOP_RIGHT: 'topRight'
164
161
  };
165
- exports.DEFAULT_POSITIONS = DEFAULT_POSITIONS;
166
- var GROUPS = [{
162
+ const GROUPS = exports.GROUPS = [{
167
163
  key: 'faces',
168
164
  ranges: [['grinning_face', 'hear_no_evil_monkey'], ['face exhaling'], ['face in clouds', 'face with spiral eyes'], ['man beard', 'woman beard'], ['baby', 'woman_getting_haircut'], ['smiling face with tear', 'disguised face'], ['ninja', 'mx claus']],
169
165
  Icon: Faces
@@ -195,5 +191,4 @@ var GROUPS = [{
195
191
  key: 'flags',
196
192
  ranges: [['chequered_flag', 'pirate_flag'], ['transgender flag']],
197
193
  Icon: Flags
198
- }];
199
- exports.GROUPS = GROUPS;
194
+ }];