@widergy/energy-ui 2.12.2 → 2.12.3
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/dist/components/EnergyThemeProvider/index.js +13 -36
- package/dist/components/Loading/constants.js +1 -2
- package/dist/components/Loading/index.js +13 -12
- package/dist/components/Loading/theme.js +4 -2
- package/dist/components/UTAlert/AlertHandler.js +75 -101
- package/dist/components/UTAlert/index.js +65 -87
- package/dist/components/UTAlert/theme.js +32 -32
- package/dist/components/UTAttachment/components/Preview/index.js +8 -9
- package/dist/components/UTAttachment/constants.js +7 -13
- package/dist/components/UTAttachment/index.js +159 -250
- package/dist/components/UTAttachment/layout.js +26 -27
- package/dist/components/UTAttachment/theme.js +4 -2
- package/dist/components/UTAttachment/utils.js +34 -117
- package/dist/components/UTAutocomplete/components/ListBox/index.js +13 -21
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +9 -11
- package/dist/components/UTAutocomplete/constants.js +12 -23
- package/dist/components/UTAutocomplete/index.js +54 -94
- package/dist/components/UTAutocomplete/theme.js +6 -4
- package/dist/components/UTAvatar/constants.js +2 -3
- package/dist/components/UTAvatar/index.js +18 -17
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +22 -22
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +21 -22
- package/dist/components/UTBarChart/components/Bars/constants.js +3 -6
- package/dist/components/UTBarChart/components/Bars/index.js +70 -80
- package/dist/components/UTBarChart/components/Legend/constants.js +12 -18
- package/dist/components/UTBarChart/components/Legend/index.js +75 -93
- package/dist/components/UTBarChart/components/Legend/utils.js +1 -5
- package/dist/components/UTBarChart/components/Levels/index.js +16 -14
- package/dist/components/UTBarChart/components/Levels/utils.js +25 -27
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +3 -5
- package/dist/components/UTBarChart/components/LinearPlot/index.js +25 -20
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +37 -39
- package/dist/components/UTBarChart/components/Pagination/constants.js +1 -2
- package/dist/components/UTBarChart/components/Pagination/index.js +20 -24
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +21 -32
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -4
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +20 -19
- package/dist/components/UTBarChart/components/XAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/index.js +54 -65
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +12 -11
- package/dist/components/UTBarChart/components/YAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/index.js +30 -37
- package/dist/components/UTBarChart/components/YAxis/utils.js +4 -6
- package/dist/components/UTBarChart/constants.js +4 -8
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +23 -40
- package/dist/components/UTBarChart/index.js +152 -166
- package/dist/components/UTBarChart/theme.js +4 -2
- package/dist/components/UTBarChart/types.js +10 -19
- package/dist/components/UTBarChart/utils.js +107 -111
- package/dist/components/UTBreadcrumbs/constants.js +23 -31
- package/dist/components/UTBreadcrumbs/index.js +76 -101
- package/dist/components/UTBreadcrumbs/theme.js +4 -2
- package/dist/components/UTButton/constants.js +11 -17
- package/dist/components/UTButton/index.js +28 -31
- package/dist/components/UTButton/theme.js +23 -23
- package/dist/components/UTCBUInput/index.js +36 -40
- package/dist/components/UTCBUInput/theme.js +4 -2
- package/dist/components/UTCaptcha/index.js +19 -45
- package/dist/components/UTCard/components/UTCardFooter/index.js +15 -16
- package/dist/components/UTCard/index.js +85 -120
- package/dist/components/UTCard/theme.js +11 -12
- package/dist/components/UTCard/types.js +2 -3
- package/dist/components/UTCarousel/components/Button/index.js +13 -13
- package/dist/components/UTCarousel/components/Legend/index.js +13 -15
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
- package/dist/components/UTCarousel/components/Slider/constants.js +5 -10
- package/dist/components/UTCarousel/components/Slider/index.js +204 -273
- package/dist/components/UTCarousel/components/Slider/layout.js +67 -94
- package/dist/components/UTCarousel/index.js +14 -15
- package/dist/components/UTCarousel/theme.js +4 -2
- package/dist/components/UTCheckList/constants.js +1 -2
- package/dist/components/UTCheckList/index.js +72 -93
- package/dist/components/UTCheckList/theme.js +31 -31
- package/dist/components/UTCheckbox/constants.js +3 -6
- package/dist/components/UTCheckbox/index.js +32 -44
- package/dist/components/UTCheckbox/theme.js +35 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +3 -6
- package/dist/components/UTConsumptionBar/index.js +53 -80
- package/dist/components/UTCuit/index.js +109 -133
- package/dist/components/UTCuit/theme.js +51 -53
- package/dist/components/UTDatePicker/components/Day/constants.js +1 -2
- package/dist/components/UTDatePicker/components/Day/index.js +12 -12
- package/dist/components/UTDatePicker/constants.js +20 -31
- package/dist/components/UTDatePicker/index.js +60 -102
- package/dist/components/UTDatePicker/theme.js +5 -3
- package/dist/components/UTDatePicker/types.js +2 -3
- package/dist/components/UTDatePicker/utils.js +2 -6
- package/dist/components/UTDialog/constants.js +2 -4
- package/dist/components/UTDialog/index.js +38 -37
- package/dist/components/UTDialog/theme.js +4 -2
- package/dist/components/UTDialog/types.js +2 -3
- package/dist/components/UTDotMenu/index.js +39 -61
- package/dist/components/UTEmojiPicker/constants.js +6 -11
- package/dist/components/UTEmojiPicker/index.js +45 -65
- package/dist/components/UTEmojiPicker/theme.js +4 -2
- package/dist/components/UTEmojiPicker/utils.js +21 -51
- package/dist/components/UTExternalLink/constants.js +3 -5
- package/dist/components/UTExternalLink/index.js +18 -15
- package/dist/components/UTExternalLink/theme.js +8 -6
- package/dist/components/UTFileInput/constants.js +2 -4
- package/dist/components/UTFileInput/index.js +7 -31
- package/dist/components/UTFileInput/layout.js +68 -97
- package/dist/components/UTIconButton/index.js +49 -72
- package/dist/components/UTIconButton/theme.js +4 -2
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +53 -58
- package/dist/components/UTImageRadio/constants.js +3 -6
- package/dist/components/UTImageRadio/index.js +39 -47
- package/dist/components/UTImageRadio/theme.js +11 -12
- package/dist/components/UTImageRadio/types.js +2 -3
- package/dist/components/UTImageRadio/utils.js +2 -6
- package/dist/components/UTLabel/constants.js +14 -20
- package/dist/components/UTLabel/index.js +18 -20
- package/dist/components/UTLabel/theme.js +15 -15
- package/dist/components/UTList/index.js +15 -18
- package/dist/components/UTLoading/index.js +15 -15
- package/dist/components/UTMap/components/GoogleMaps/constants.js +8 -11
- package/dist/components/UTMap/components/GoogleMaps/index.js +63 -91
- package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -3
- package/dist/components/UTMap/constants.js +6 -12
- package/dist/components/UTMap/index.js +163 -198
- package/dist/components/UTMap/types.js +4 -6
- package/dist/components/UTMap/utils.js +29 -46
- package/dist/components/UTMap/withGoogleMapScript.js +18 -22
- package/dist/components/UTMenu/index.js +52 -69
- package/dist/components/UTMenu/theme.js +5 -3
- package/dist/components/UTMenu/utils.js +5 -11
- package/dist/components/UTModal/constants.js +9 -13
- package/dist/components/UTModal/index.js +26 -30
- package/dist/components/UTModal/theme.js +4 -2
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +11 -10
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +7 -13
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTPagination/components/Pagination/index.js +28 -39
- package/dist/components/UTPagination/components/Pagination/utils.js +8 -14
- package/dist/components/UTPagination/constants.js +3 -6
- package/dist/components/UTPagination/index.js +16 -17
- package/dist/components/UTPagination/theme.js +4 -2
- package/dist/components/UTPanel/index.js +38 -44
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +13 -10
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +22 -19
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +63 -50
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +25 -26
- package/dist/components/UTPasswordField/index.js +26 -23
- package/dist/components/UTPasswordField/theme.js +4 -2
- package/dist/components/UTPhoneInput/constants.js +3 -6
- package/dist/components/UTPhoneInput/index.js +180 -205
- package/dist/components/UTPhoneInput/theme.js +77 -77
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -8
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +24 -23
- package/dist/components/UTPieChart/components/Legend/contants.js +3 -6
- package/dist/components/UTPieChart/components/Legend/index.js +27 -24
- package/dist/components/UTPieChart/constants.js +13 -26
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +15 -33
- package/dist/components/UTPieChart/index.js +73 -76
- package/dist/components/UTPieChart/theme.js +4 -2
- package/dist/components/UTPieChart/utils.js +4 -2
- package/dist/components/UTProgressBar/constants.js +2 -4
- package/dist/components/UTProgressBar/index.js +15 -17
- package/dist/components/UTProgressBar/theme.js +4 -2
- package/dist/components/UTProgressBar/types.js +2 -3
- package/dist/components/UTRadioGroup/index.js +56 -83
- package/dist/components/UTRadioGroup/theme.js +52 -52
- package/dist/components/UTRating/components/Circle/index.js +41 -56
- package/dist/components/UTRating/components/Faces/constants.js +2 -4
- package/dist/components/UTRating/components/Faces/index.js +34 -36
- package/dist/components/UTRating/components/Star/index.js +36 -40
- package/dist/components/UTRating/constants.js +4 -8
- package/dist/components/UTRating/index.js +31 -46
- package/dist/components/UTRating/theme.js +4 -2
- package/dist/components/UTRipple/Ripple.js +22 -39
- package/dist/components/UTRipple/index.js +18 -37
- package/dist/components/UTSelect/components/Option/index.js +13 -13
- package/dist/components/UTSelect/constants.js +4 -8
- package/dist/components/UTSelect/index.js +63 -85
- package/dist/components/UTSelect/stylesJS.js +2 -3
- package/dist/components/UTSelect/theme.js +6 -4
- package/dist/components/UTSelect/utils.js +3 -13
- package/dist/components/UTSidebar/components/ListOption/index.js +34 -49
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +8 -8
- package/dist/components/UTSidebar/components/LogosContainer/index.js +14 -14
- package/dist/components/UTSidebar/components/Option/constants.js +2 -3
- package/dist/components/UTSidebar/components/Option/index.js +28 -32
- package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
- package/dist/components/UTSidebar/index.js +42 -53
- package/dist/components/UTSidebar/theme.js +4 -2
- package/dist/components/UTSidebar/types.js +5 -10
- package/dist/components/UTSkeleton/index.js +10 -36
- package/dist/components/UTStatus/constants.js +5 -9
- package/dist/components/UTStatus/index.js +16 -15
- package/dist/components/UTStatus/theme.js +66 -49
- package/dist/components/UTSwitch/constants.js +3 -6
- package/dist/components/UTSwitch/index.js +42 -57
- package/dist/components/UTSwitch/theme.js +4 -2
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +47 -85
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +10 -12
- package/dist/components/UTTable/components/Cell/index.js +18 -23
- package/dist/components/UTTable/components/HeaderCell/constants.js +2 -3
- package/dist/components/UTTable/components/HeaderCell/index.js +23 -30
- package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +12 -11
- package/dist/components/UTTable/components/ResponsiveCell/index.js +19 -20
- package/dist/components/UTTable/components/Status/index.js +18 -19
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +10 -9
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +7 -13
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +21 -32
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +8 -14
- package/dist/components/UTTable/components/TableFooter/constants.js +1 -2
- package/dist/components/UTTable/components/TableFooter/index.js +15 -15
- package/dist/components/UTTable/components/TableHeader/index.js +11 -11
- package/dist/components/UTTable/components/TableRow/constants.js +3 -6
- package/dist/components/UTTable/components/TableRow/index.js +82 -95
- package/dist/components/UTTable/components/TableRow/styles.module.scss +8 -1
- package/dist/components/UTTable/components/TableRow/utils.js +15 -0
- package/dist/components/UTTable/constants.js +26 -43
- package/dist/components/UTTable/hook.js +11 -26
- package/dist/components/UTTable/index.js +129 -220
- package/dist/components/UTTable/theme.js +17 -17
- package/dist/components/UTTable/types.js +4 -8
- package/dist/components/UTTable/utils.js +70 -74
- package/dist/components/UTTabs/components/TooltipTab/index.js +20 -30
- package/dist/components/UTTabs/constants.js +4 -8
- package/dist/components/UTTabs/index.js +57 -86
- package/dist/components/UTTabs/theme.js +4 -2
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +3 -6
- package/dist/components/UTTextArea/index.js +23 -23
- package/dist/components/UTTextArea/theme.js +4 -2
- package/dist/components/UTTextInput/constants.js +2 -3
- package/dist/components/UTTextInput/index.js +137 -165
- package/dist/components/UTTextInput/theme.js +6 -4
- package/dist/components/UTThirdPartyCookieChecker/index.js +17 -21
- package/dist/components/UTToggle/components/ToggleOption/index.js +16 -17
- package/dist/components/UTToggle/index.js +25 -26
- package/dist/components/UTToggle/theme.js +4 -2
- package/dist/components/UTTooltip/index.js +23 -30
- package/dist/components/UTTooltip/theme.js +4 -2
- package/dist/components/UTTopbar/components/Notifications/index.js +11 -14
- package/dist/components/UTTopbar/components/UserMenu/index.js +15 -15
- package/dist/components/UTTopbar/index.js +28 -31
- package/dist/components/UTTopbar/theme.js +4 -2
- package/dist/components/UTTopbar/types.js +5 -9
- package/dist/components/UTTouchableWithoutFeedback/index.js +14 -27
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +34 -31
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -12
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +8 -18
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +23 -47
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +31 -34
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +81 -93
- package/dist/components/UTVirtualizedList/constants.js +4 -8
- package/dist/components/UTVirtualizedList/index.js +26 -38
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +17 -21
- package/dist/components/UTWorkflowContainer/constants.js +3 -6
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +32 -51
- package/dist/components/UTWorkflowContainer/theme.js +60 -53
- package/dist/components/UTWorkflowContainer/types.js +2 -3
- package/dist/components/WithLoading/index.js +10 -15
- package/dist/components/WithTheme/index.js +10 -17
- package/dist/components/WithTheme/layout.js +22 -28
- package/dist/components/WithTouch/index.js +12 -19
- package/dist/constants/UTTable.js +2 -3
- package/dist/index.js +58 -58
- package/dist/theme.js +6 -5
- package/dist/types/commonTypes.js +3 -5
- package/dist/types/consumptionTypes.js +3 -5
- package/dist/types/formTypes.js +4 -7
- package/dist/types/tableTypes.js +2 -3
- package/dist/utils/classesUtils.js +5 -13
- package/dist/utils/componentUtils.js +10 -13
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/shadowUtils.js +13 -11
- package/dist/utils/useScreenSize.js +2 -3
- package/package.json +1 -1
|
@@ -22,31 +22,12 @@ var _types = require("./types");
|
|
|
22
22
|
var _constants = require("./constants");
|
|
23
23
|
var _utils = require("./utils");
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
function _getRequireWildcardCache(
|
|
26
|
-
function _interopRequireWildcard(
|
|
27
|
-
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); }
|
|
25
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
27
|
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); }
|
|
29
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
32
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
34
|
-
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; }
|
|
35
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
36
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
-
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); } }
|
|
38
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
39
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
40
|
-
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); }
|
|
41
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
42
|
-
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); }; }
|
|
43
|
-
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); }
|
|
44
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
45
|
-
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; } }
|
|
46
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
28
|
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; }
|
|
48
|
-
function _toPropertyKey(
|
|
49
|
-
function _toPrimitive(
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
30
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
50
31
|
var CalendarIcon = function CalendarIcon(props) {
|
|
51
32
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("path", {
|
|
52
33
|
d: "M8 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 0c.55 0 1 .45 1 1s-.45 1-1 1h-4c-.55 0-1-.45-1-1s.45-1 1-1zm2 5H6c-.551 0-1-.449-1-1v-6h14v6c0 .551-.449 1-1 1M6 6h1v1c0 .55.45 1 1 1s1-.45 1-1V6h6v1c0 .55.45 1 1 1s1-.45 1-1V6h1c.551 0 1 .449 1 1v4H5V7c0-.551.449-1 1-1m12-2h-1V3c0-.55-.45-1-1-1s-1 .45-1 1v1H9V3c0-.55-.45-1-1-1s-1 .45-1 1v1H6C4.346 4 3 5.346 3 7v12c0 1.654 1.346 3 3 3h12c1.654 0 3-1.346 3-3V7c0-1.654-1.346-3-3-3",
|
|
@@ -66,86 +47,60 @@ CalendarIcon.defaultProps = {
|
|
|
66
47
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
67
48
|
};
|
|
68
49
|
_dayjs2.default.extend(_customParseFormat.default);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var _this;
|
|
74
|
-
_classCallCheck(this, CustomUtils);
|
|
75
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
76
|
-
args[_key] = arguments[_key];
|
|
77
|
-
}
|
|
78
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
79
|
-
_defineProperty(_assertThisInitialized(_this), "getCalendarHeaderText", function (date) {
|
|
80
|
-
return date.format('MMMM');
|
|
81
|
-
});
|
|
82
|
-
return _this;
|
|
50
|
+
class CustomUtils extends _dayjs.default {
|
|
51
|
+
constructor() {
|
|
52
|
+
super(...arguments);
|
|
53
|
+
_defineProperty(this, "getCalendarHeaderText", date => date.format('MMMM'));
|
|
83
54
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var UTDatePicker = function UTDatePicker(_ref) {
|
|
55
|
+
}
|
|
56
|
+
const UTDatePicker = _ref => {
|
|
87
57
|
var _field$configuration;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
disableToolbar =
|
|
94
|
-
disabled
|
|
95
|
-
field
|
|
96
|
-
iconAnchor
|
|
97
|
-
input
|
|
98
|
-
inputProps
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
var _useState = (0, _react.useState)(null),
|
|
116
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
117
|
-
pickedDate = _useState2[0],
|
|
118
|
-
setPickedDate = _useState2[1];
|
|
119
|
-
var _useState3 = (0, _react.useState)(null),
|
|
120
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
121
|
-
internalError = _useState4[0],
|
|
122
|
-
setInternalError = _useState4[1];
|
|
123
|
-
var handleChange = function handleChange(date) {
|
|
58
|
+
let {
|
|
59
|
+
classes: themeClasses,
|
|
60
|
+
classNames,
|
|
61
|
+
CustomIcon,
|
|
62
|
+
dayFormat,
|
|
63
|
+
disableToolbar = true,
|
|
64
|
+
disabled,
|
|
65
|
+
field,
|
|
66
|
+
iconAnchor,
|
|
67
|
+
input,
|
|
68
|
+
inputProps,
|
|
69
|
+
inputVariant = _constants.INPUT_VARIANT,
|
|
70
|
+
invalidDateMessage,
|
|
71
|
+
maxDateMessage,
|
|
72
|
+
minDateMessage,
|
|
73
|
+
meta = {},
|
|
74
|
+
pickerProps,
|
|
75
|
+
placeholder,
|
|
76
|
+
popoverProps,
|
|
77
|
+
variant,
|
|
78
|
+
withUpperTitle
|
|
79
|
+
} = _ref;
|
|
80
|
+
const classes = (0, _react.useMemo)(() => (0, _classesUtils.mergeClasses)(themeClasses, classNames), [classNames]);
|
|
81
|
+
const configMask = (field === null || field === void 0 || (_field$configuration = field.configuration) === null || _field$configuration === void 0 ? void 0 : _field$configuration.date_mask) || _constants.OUTPUT_LABEL_MASK;
|
|
82
|
+
const [pickedDate, setPickedDate] = (0, _react.useState)(null);
|
|
83
|
+
const [internalError, setInternalError] = (0, _react.useState)(null);
|
|
84
|
+
const handleChange = date => {
|
|
124
85
|
setPickedDate(date);
|
|
125
|
-
|
|
86
|
+
const newValue = (0, _dayjs2.default)(date, _constants.OUTPUT_LABEL_MASK, true);
|
|
126
87
|
if (newValue.isValid()) input.onChange(newValue.format(configMask));else input.onChange('');
|
|
127
88
|
};
|
|
128
|
-
(0, _react.useEffect)(
|
|
89
|
+
(0, _react.useEffect)(() => {
|
|
129
90
|
if (!input.value && pickedDate !== null && pickedDate !== void 0 && pickedDate.isValid()) setPickedDate(null);else if ((0, _utils.dateMatchesFormat)(input.value, configMask)) setPickedDate((0, _dayjs2.default)(input.value, configMask));
|
|
130
91
|
}, [input.value]);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var handleRemoveError = function handleRemoveError() {
|
|
144
|
-
return setInternalError(null);
|
|
145
|
-
};
|
|
146
|
-
var OpenerIcon = CustomIcon || CalendarIcon;
|
|
147
|
-
var operenerIconReference = (0, _react.useRef)();
|
|
148
|
-
var errorMessage = (0, _form.shouldShowErrors)(meta) && (internalError || meta.error) || '';
|
|
92
|
+
const renderDay = (date, _, dayInCurrentMonth) => /*#__PURE__*/_react.default.createElement(_Day.default, {
|
|
93
|
+
classes: classes,
|
|
94
|
+
dayFormat: dayFormat,
|
|
95
|
+
date: date,
|
|
96
|
+
pickedDate: pickedDate,
|
|
97
|
+
dayInCurrentMonth: dayInCurrentMonth
|
|
98
|
+
});
|
|
99
|
+
const handleError = error => setInternalError(error);
|
|
100
|
+
const handleRemoveError = () => setInternalError(null);
|
|
101
|
+
const OpenerIcon = CustomIcon || CalendarIcon;
|
|
102
|
+
const operenerIconReference = (0, _react.useRef)();
|
|
103
|
+
const errorMessage = (0, _form.shouldShowErrors)(meta) && (internalError || meta.error) || '';
|
|
149
104
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, withUpperTitle && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
150
105
|
className: classes.upperTitle,
|
|
151
106
|
withMarkdown: true
|
|
@@ -171,13 +126,14 @@ var UTDatePicker = function UTDatePicker(_ref) {
|
|
|
171
126
|
className: disabled ? classes.disabledOpenerIcon : classes.openerIcon
|
|
172
127
|
})),
|
|
173
128
|
variant: variant || _constants.VARIANT,
|
|
174
|
-
InputProps:
|
|
129
|
+
InputProps: {
|
|
175
130
|
classes: {
|
|
176
131
|
root: classes.input,
|
|
177
132
|
notchedOutline: classes.notchedOutline
|
|
178
133
|
},
|
|
179
|
-
placeholder: inputVariant === 'outlined' && (placeholder || (field === null || field === void 0 ? void 0 : field.placeholder)) || undefined
|
|
180
|
-
|
|
134
|
+
placeholder: inputVariant === 'outlined' && (placeholder || (field === null || field === void 0 ? void 0 : field.placeholder)) || undefined,
|
|
135
|
+
...inputProps
|
|
136
|
+
},
|
|
181
137
|
invalidDateMessage: invalidDateMessage || _constants.WRONG_DATE_FORMAT,
|
|
182
138
|
inputVariant: inputVariant,
|
|
183
139
|
format: _constants.OUTPUT_LABEL_MASK,
|
|
@@ -188,7 +144,10 @@ var UTDatePicker = function UTDatePicker(_ref) {
|
|
|
188
144
|
},
|
|
189
145
|
onChange: handleChange,
|
|
190
146
|
renderDay: renderDay,
|
|
191
|
-
PopoverProps:
|
|
147
|
+
PopoverProps: {
|
|
148
|
+
...(iconAnchor ? (0, _constants.iconAnchorProps)(operenerIconReference) : {}),
|
|
149
|
+
...popoverProps
|
|
150
|
+
}
|
|
192
151
|
}, pickerProps))));
|
|
193
152
|
};
|
|
194
153
|
UTDatePicker.propTypes = {
|
|
@@ -214,5 +173,4 @@ UTDatePicker.propTypes = {
|
|
|
214
173
|
variant: _propTypes.string,
|
|
215
174
|
withUpperTitle: _propTypes.bool
|
|
216
175
|
};
|
|
217
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.materialTheme)(UTDatePicker);
|
|
218
|
-
exports.default = _default;
|
|
176
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.materialTheme)(UTDatePicker);
|
|
@@ -9,8 +9,10 @@ var _styles = require("@material-ui/core/styles");
|
|
|
9
9
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
10
10
|
var _classesUtils = require("../../utils/classesUtils");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const retrieveStyle = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
theme
|
|
15
|
+
} = _ref;
|
|
14
16
|
return {
|
|
15
17
|
openerIcon: {
|
|
16
18
|
fill: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'openerIcon', 'fill'], _colorsModule.default.orangeIcon)
|
|
@@ -51,7 +53,7 @@ var retrieveStyle = function retrieveStyle(_ref) {
|
|
|
51
53
|
};
|
|
52
54
|
};
|
|
53
55
|
exports.retrieveStyle = retrieveStyle;
|
|
54
|
-
|
|
56
|
+
const materialTheme = theme => {
|
|
55
57
|
var _theme$UTDatePicker, _theme$UTDatePicker2, _theme$UTDatePicker3, _theme$UTDatePicker4;
|
|
56
58
|
return (0, _styles.createTheme)({
|
|
57
59
|
typography: {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.classesPropTypes = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
|
-
|
|
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
|
-
|
|
10
|
-
return selectedDate && date.isSame(selectedDate, 'day');
|
|
11
|
-
};
|
|
9
|
+
const isSelected = (date, selectedDate) => selectedDate && date.isSame(selectedDate, 'day');
|
|
12
10
|
exports.isSelected = isSelected;
|
|
13
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
8
|
-
exports.
|
|
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';
|
|
@@ -20,40 +20,42 @@ var _theme = require("./theme");
|
|
|
20
20
|
var _constants = require("./constants");
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
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); }
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
isOpen =
|
|
39
|
-
onRequestClose
|
|
40
|
-
roundedCloseButton
|
|
41
|
-
title
|
|
42
|
-
TransitionProps
|
|
43
|
-
warningAlert
|
|
44
|
-
whiteTitle
|
|
45
|
-
withClickAway
|
|
46
|
-
withCloseButton
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
23
|
+
const UTDialog = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
acceptButton,
|
|
26
|
+
alertConfig,
|
|
27
|
+
cancelButton,
|
|
28
|
+
children,
|
|
29
|
+
classes,
|
|
30
|
+
classNames,
|
|
31
|
+
contentName,
|
|
32
|
+
dialogProps,
|
|
33
|
+
disableEnforceFocus,
|
|
34
|
+
disableScrollLock,
|
|
35
|
+
disableTypography,
|
|
36
|
+
elevation,
|
|
37
|
+
FooterComponents,
|
|
38
|
+
isOpen = false,
|
|
39
|
+
onRequestClose,
|
|
40
|
+
roundedCloseButton,
|
|
41
|
+
title,
|
|
42
|
+
TransitionProps,
|
|
43
|
+
warningAlert,
|
|
44
|
+
whiteTitle,
|
|
45
|
+
withClickAway,
|
|
46
|
+
withCloseButton
|
|
47
|
+
} = _ref;
|
|
48
|
+
const CloseIcon = roundedCloseButton ? _CloseRounded.default : _Close.default;
|
|
49
|
+
const {
|
|
50
|
+
content,
|
|
51
|
+
container,
|
|
52
|
+
root,
|
|
53
|
+
closeButton,
|
|
54
|
+
mainTitle,
|
|
55
|
+
closeIcon,
|
|
56
|
+
warning,
|
|
57
|
+
dialogActions
|
|
58
|
+
} = classNames || {};
|
|
57
59
|
return /*#__PURE__*/_react.default.createElement(_Dialog.default, _extends({
|
|
58
60
|
open: isOpen,
|
|
59
61
|
onClose: withClickAway ? onRequestClose : undefined,
|
|
@@ -64,7 +66,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
64
66
|
root: "".concat(classes.root, " ").concat(root)
|
|
65
67
|
},
|
|
66
68
|
PaperProps: {
|
|
67
|
-
elevation
|
|
69
|
+
elevation
|
|
68
70
|
},
|
|
69
71
|
disableEnforceFocus: disableEnforceFocus,
|
|
70
72
|
disableScrollLock: disableScrollLock,
|
|
@@ -127,5 +129,4 @@ UTDialog.propTypes = {
|
|
|
127
129
|
withClickAway: _propTypes.bool,
|
|
128
130
|
withCloseButton: _propTypes.bool
|
|
129
131
|
};
|
|
130
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTDialog);
|
|
131
|
-
exports.default = _default;
|
|
132
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTDialog);
|
|
@@ -8,9 +8,11 @@ var _seamlessImmutable = require("seamless-immutable");
|
|
|
8
8
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
9
9
|
var _classesUtils = require("../../utils/classesUtils");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
11
|
+
const retrieveStyle = _ref => {
|
|
12
12
|
var _theme$UTDialog;
|
|
13
|
-
|
|
13
|
+
let {
|
|
14
|
+
theme
|
|
15
|
+
} = _ref;
|
|
14
16
|
return {
|
|
15
17
|
container: {
|
|
16
18
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'margin'], 0),
|
|
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dialogButtonPropTypes = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
|
-
|
|
8
|
+
const dialogButtonPropTypes = exports.dialogButtonPropTypes = (0, _propTypes.shape)({
|
|
9
9
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
10
10
|
disabled: _propTypes.bool,
|
|
11
11
|
text: _propTypes.string,
|
|
12
12
|
onClick: _propTypes.func
|
|
13
|
-
});
|
|
14
|
-
exports.dialogButtonPropTypes = dialogButtonPropTypes;
|
|
13
|
+
});
|
|
@@ -11,75 +11,54 @@ var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
|
|
|
11
11
|
var _propTypes = require("prop-types");
|
|
12
12
|
var _UTButton = _interopRequireDefault(require("../UTButton"));
|
|
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(
|
|
27
|
-
function _toPrimitive(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
class UTDotMenu extends _react.default.Component {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
_defineProperty(this, "state", {
|
|
39
21
|
anchorEl: null
|
|
40
22
|
});
|
|
41
|
-
_defineProperty(
|
|
42
|
-
|
|
23
|
+
_defineProperty(this, "handleClick", event => {
|
|
24
|
+
this.setState({
|
|
43
25
|
anchorEl: event.currentTarget
|
|
44
26
|
});
|
|
45
27
|
});
|
|
46
|
-
_defineProperty(
|
|
47
|
-
|
|
28
|
+
_defineProperty(this, "handleClose", () => {
|
|
29
|
+
this.setState({
|
|
48
30
|
anchorEl: null
|
|
49
31
|
});
|
|
50
32
|
});
|
|
51
|
-
return _this;
|
|
52
33
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return UTDotMenu;
|
|
82
|
-
}(_react.default.Component);
|
|
34
|
+
render() {
|
|
35
|
+
const {
|
|
36
|
+
anchorEl
|
|
37
|
+
} = this.state;
|
|
38
|
+
const {
|
|
39
|
+
classNames
|
|
40
|
+
} = this.props;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: this.props.className
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
44
|
+
classNames: {
|
|
45
|
+
icon: classNames.icon,
|
|
46
|
+
root: classNames.button
|
|
47
|
+
},
|
|
48
|
+
Icon: _MoreVert.default,
|
|
49
|
+
onClick: this.handleClick,
|
|
50
|
+
variant: "text"
|
|
51
|
+
}), /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
52
|
+
id: "long-menu",
|
|
53
|
+
anchorEl: anchorEl,
|
|
54
|
+
open: Boolean(anchorEl),
|
|
55
|
+
onClose: this.handleClose
|
|
56
|
+
}, this.props.options.map(option => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
57
|
+
key: option.name,
|
|
58
|
+
onClick: option.onPress
|
|
59
|
+
}, option.name))));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
83
62
|
UTDotMenu.propTypes = {
|
|
84
63
|
options: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
85
64
|
name: _propTypes.string,
|
|
@@ -91,5 +70,4 @@ UTDotMenu.propTypes = {
|
|
|
91
70
|
button: _propTypes.string
|
|
92
71
|
})
|
|
93
72
|
};
|
|
94
|
-
var _default = UTDotMenu;
|
|
95
|
-
exports.default = _default;
|
|
73
|
+
var _default = exports.default = UTDotMenu;
|
|
@@ -150,24 +150,20 @@ Flags.defaultProps = {
|
|
|
150
150
|
strokeLinecap: "round",
|
|
151
151
|
strokeLinejoin: "round"
|
|
152
152
|
};
|
|
153
|
-
|
|
154
|
-
exports.
|
|
155
|
-
var DEFAULT_VIRTUALIZED_LIST_CONFIG = {
|
|
153
|
+
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'];
|
|
154
|
+
const DEFAULT_VIRTUALIZED_LIST_CONFIG = exports.DEFAULT_VIRTUALIZED_LIST_CONFIG = {
|
|
156
155
|
overscan: 10,
|
|
157
156
|
elementsPerRow: 8,
|
|
158
157
|
itemPadding: 0
|
|
159
158
|
};
|
|
160
|
-
exports.
|
|
161
|
-
|
|
162
|
-
exports.DEFAULT_BUTTON_EMOJI_INDEX = DEFAULT_BUTTON_EMOJI_INDEX;
|
|
163
|
-
var DEFAULT_POSITIONS = {
|
|
159
|
+
const DEFAULT_BUTTON_EMOJI_INDEX = exports.DEFAULT_BUTTON_EMOJI_INDEX = 0;
|
|
160
|
+
const DEFAULT_POSITIONS = exports.DEFAULT_POSITIONS = {
|
|
164
161
|
BOTTOM_LEFT: 'bottomLeft',
|
|
165
162
|
BOTTOM_RIGHT: 'bottomRight',
|
|
166
163
|
TOP_LEFT: 'topLeft',
|
|
167
164
|
TOP_RIGHT: 'topRight'
|
|
168
165
|
};
|
|
169
|
-
exports.
|
|
170
|
-
var GROUPS = [{
|
|
166
|
+
const GROUPS = exports.GROUPS = [{
|
|
171
167
|
key: 'faces',
|
|
172
168
|
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']],
|
|
173
169
|
Icon: Faces
|
|
@@ -199,5 +195,4 @@ var GROUPS = [{
|
|
|
199
195
|
key: 'flags',
|
|
200
196
|
ranges: [['chequered_flag', 'pirate_flag'], ['transgender flag']],
|
|
201
197
|
Icon: Flags
|
|
202
|
-
}];
|
|
203
|
-
exports.GROUPS = GROUPS;
|
|
198
|
+
}];
|