@widergy/energy-ui 2.12.1 → 2.12.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.
- package/dist/components/EnergyThemeProvider/index.js +36 -13
- package/dist/components/Loading/constants.js +2 -1
- package/dist/components/Loading/index.js +12 -13
- package/dist/components/Loading/theme.js +2 -4
- package/dist/components/UTAlert/AlertHandler.js +101 -75
- package/dist/components/UTAlert/index.js +87 -65
- package/dist/components/UTAlert/theme.js +32 -32
- package/dist/components/UTAttachment/components/Preview/index.js +9 -8
- package/dist/components/UTAttachment/constants.js +13 -7
- package/dist/components/UTAttachment/index.js +250 -159
- package/dist/components/UTAttachment/layout.js +27 -26
- package/dist/components/UTAttachment/theme.js +2 -4
- package/dist/components/UTAttachment/utils.js +117 -34
- package/dist/components/UTAutocomplete/components/ListBox/index.js +21 -13
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +11 -9
- package/dist/components/UTAutocomplete/constants.js +23 -12
- package/dist/components/UTAutocomplete/index.js +94 -54
- package/dist/components/UTAutocomplete/theme.js +4 -6
- package/dist/components/UTAvatar/constants.js +3 -2
- package/dist/components/UTAvatar/index.js +17 -18
- 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 +22 -21
- package/dist/components/UTBarChart/components/Bars/constants.js +6 -3
- package/dist/components/UTBarChart/components/Bars/index.js +80 -70
- package/dist/components/UTBarChart/components/Legend/constants.js +18 -12
- package/dist/components/UTBarChart/components/Legend/index.js +93 -75
- package/dist/components/UTBarChart/components/Legend/utils.js +5 -1
- package/dist/components/UTBarChart/components/Levels/index.js +14 -16
- package/dist/components/UTBarChart/components/Levels/utils.js +27 -25
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +5 -3
- package/dist/components/UTBarChart/components/LinearPlot/index.js +20 -25
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +39 -37
- package/dist/components/UTBarChart/components/Pagination/constants.js +2 -1
- package/dist/components/UTBarChart/components/Pagination/index.js +24 -20
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +32 -21
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +4 -2
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +19 -20
- package/dist/components/UTBarChart/components/XAxis/constants.js +2 -1
- package/dist/components/UTBarChart/components/XAxis/index.js +65 -54
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +11 -12
- package/dist/components/UTBarChart/components/YAxis/constants.js +2 -1
- package/dist/components/UTBarChart/components/YAxis/index.js +37 -30
- package/dist/components/UTBarChart/components/YAxis/utils.js +6 -4
- package/dist/components/UTBarChart/constants.js +8 -4
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +40 -23
- package/dist/components/UTBarChart/index.js +166 -152
- package/dist/components/UTBarChart/theme.js +2 -4
- package/dist/components/UTBarChart/types.js +19 -10
- package/dist/components/UTBarChart/utils.js +111 -107
- package/dist/components/UTBreadcrumbs/constants.js +31 -23
- package/dist/components/UTBreadcrumbs/index.js +101 -76
- package/dist/components/UTBreadcrumbs/theme.js +2 -4
- package/dist/components/UTButton/constants.js +17 -11
- package/dist/components/UTButton/index.js +31 -28
- package/dist/components/UTButton/theme.js +23 -23
- package/dist/components/UTCBUInput/index.js +40 -36
- package/dist/components/UTCBUInput/theme.js +2 -4
- package/dist/components/UTCaptcha/index.js +45 -19
- package/dist/components/UTCard/components/UTCardFooter/index.js +16 -15
- package/dist/components/UTCard/index.js +120 -85
- package/dist/components/UTCard/theme.js +12 -11
- package/dist/components/UTCard/types.js +3 -2
- package/dist/components/UTCarousel/components/Button/index.js +13 -13
- package/dist/components/UTCarousel/components/Legend/index.js +15 -13
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
- package/dist/components/UTCarousel/components/Slider/constants.js +10 -5
- package/dist/components/UTCarousel/components/Slider/index.js +273 -204
- package/dist/components/UTCarousel/components/Slider/layout.js +94 -67
- package/dist/components/UTCarousel/index.js +15 -14
- package/dist/components/UTCarousel/theme.js +2 -4
- package/dist/components/UTCheckList/constants.js +2 -1
- package/dist/components/UTCheckList/index.js +93 -72
- package/dist/components/UTCheckList/theme.js +31 -31
- package/dist/components/UTCheckbox/constants.js +6 -3
- package/dist/components/UTCheckbox/index.js +44 -32
- package/dist/components/UTCheckbox/theme.js +35 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +6 -3
- package/dist/components/UTConsumptionBar/index.js +80 -53
- package/dist/components/UTCuit/index.js +133 -109
- package/dist/components/UTCuit/theme.js +53 -51
- package/dist/components/UTDatePicker/components/Day/constants.js +2 -1
- package/dist/components/UTDatePicker/components/Day/index.js +12 -12
- package/dist/components/UTDatePicker/constants.js +31 -20
- package/dist/components/UTDatePicker/index.js +102 -60
- package/dist/components/UTDatePicker/theme.js +3 -5
- package/dist/components/UTDatePicker/types.js +3 -2
- package/dist/components/UTDatePicker/utils.js +6 -2
- package/dist/components/UTDialog/constants.js +4 -2
- package/dist/components/UTDialog/index.js +37 -38
- package/dist/components/UTDialog/theme.js +2 -4
- package/dist/components/UTDialog/types.js +3 -2
- package/dist/components/UTDotMenu/index.js +61 -39
- package/dist/components/UTEmojiPicker/constants.js +11 -6
- package/dist/components/UTEmojiPicker/index.js +65 -45
- package/dist/components/UTEmojiPicker/theme.js +2 -4
- package/dist/components/UTEmojiPicker/utils.js +51 -21
- package/dist/components/UTExternalLink/constants.js +5 -3
- package/dist/components/UTExternalLink/index.js +15 -18
- package/dist/components/UTExternalLink/theme.js +6 -8
- package/dist/components/UTFileInput/constants.js +4 -2
- package/dist/components/UTFileInput/index.js +31 -7
- package/dist/components/UTFileInput/layout.js +97 -68
- package/dist/components/UTIconButton/index.js +72 -49
- package/dist/components/UTIconButton/theme.js +2 -4
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +58 -53
- package/dist/components/UTImageRadio/constants.js +6 -3
- package/dist/components/UTImageRadio/index.js +47 -39
- package/dist/components/UTImageRadio/theme.js +12 -11
- package/dist/components/UTImageRadio/types.js +3 -2
- package/dist/components/UTImageRadio/utils.js +6 -2
- package/dist/components/UTLabel/constants.js +20 -14
- package/dist/components/UTLabel/index.js +20 -18
- package/dist/components/UTLabel/theme.js +15 -15
- package/dist/components/UTList/index.js +18 -15
- package/dist/components/UTLoading/index.js +15 -15
- package/dist/components/UTMap/components/GoogleMaps/constants.js +11 -8
- package/dist/components/UTMap/components/GoogleMaps/index.js +91 -63
- package/dist/components/UTMap/components/GoogleMaps/styles.js +3 -2
- package/dist/components/UTMap/constants.js +12 -6
- package/dist/components/UTMap/index.js +198 -163
- package/dist/components/UTMap/types.js +6 -4
- package/dist/components/UTMap/utils.js +46 -29
- package/dist/components/UTMap/withGoogleMapScript.js +22 -18
- package/dist/components/UTMenu/index.js +69 -52
- package/dist/components/UTMenu/theme.js +3 -5
- package/dist/components/UTMenu/utils.js +11 -5
- package/dist/components/UTModal/constants.js +13 -9
- package/dist/components/UTModal/index.js +30 -26
- package/dist/components/UTModal/theme.js +2 -4
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +10 -11
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +13 -7
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTPagination/components/Pagination/index.js +39 -28
- package/dist/components/UTPagination/components/Pagination/utils.js +14 -8
- package/dist/components/UTPagination/constants.js +6 -3
- package/dist/components/UTPagination/index.js +17 -16
- package/dist/components/UTPagination/theme.js +2 -4
- package/dist/components/UTPanel/index.js +44 -38
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +10 -13
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +19 -22
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +50 -63
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -25
- package/dist/components/UTPasswordField/index.js +23 -26
- package/dist/components/UTPasswordField/theme.js +2 -4
- package/dist/components/UTPhoneInput/constants.js +6 -3
- package/dist/components/UTPhoneInput/index.js +205 -180
- package/dist/components/UTPhoneInput/theme.js +77 -77
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +8 -4
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +23 -24
- package/dist/components/UTPieChart/components/Legend/contants.js +6 -3
- package/dist/components/UTPieChart/components/Legend/index.js +24 -27
- package/dist/components/UTPieChart/constants.js +26 -13
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +33 -15
- package/dist/components/UTPieChart/index.js +76 -73
- package/dist/components/UTPieChart/theme.js +2 -4
- package/dist/components/UTPieChart/utils.js +2 -4
- package/dist/components/UTProgressBar/constants.js +4 -2
- package/dist/components/UTProgressBar/index.js +17 -15
- package/dist/components/UTProgressBar/theme.js +2 -4
- package/dist/components/UTProgressBar/types.js +3 -2
- package/dist/components/UTRadioGroup/index.js +83 -56
- package/dist/components/UTRadioGroup/theme.js +52 -52
- package/dist/components/UTRating/components/Circle/index.js +56 -41
- package/dist/components/UTRating/components/Faces/constants.js +4 -2
- package/dist/components/UTRating/components/Faces/index.js +36 -34
- package/dist/components/UTRating/components/Star/index.js +40 -36
- package/dist/components/UTRating/constants.js +8 -4
- package/dist/components/UTRating/index.js +46 -31
- package/dist/components/UTRating/theme.js +2 -4
- package/dist/components/UTRipple/Ripple.js +39 -22
- package/dist/components/UTRipple/index.js +37 -18
- package/dist/components/UTSelect/components/Option/index.js +13 -13
- package/dist/components/UTSelect/constants.js +8 -4
- package/dist/components/UTSelect/index.js +85 -63
- package/dist/components/UTSelect/stylesJS.js +3 -2
- package/dist/components/UTSelect/theme.js +4 -6
- package/dist/components/UTSelect/utils.js +13 -3
- package/dist/components/UTSidebar/components/ListOption/index.js +49 -34
- 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 +3 -2
- package/dist/components/UTSidebar/components/Option/index.js +32 -28
- package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
- package/dist/components/UTSidebar/index.js +53 -42
- package/dist/components/UTSidebar/theme.js +2 -4
- package/dist/components/UTSidebar/types.js +10 -5
- package/dist/components/UTSkeleton/index.js +36 -10
- package/dist/components/UTStatus/constants.js +9 -5
- package/dist/components/UTStatus/index.js +15 -16
- package/dist/components/UTStatus/theme.js +49 -66
- package/dist/components/UTSwitch/constants.js +6 -3
- package/dist/components/UTSwitch/index.js +57 -42
- package/dist/components/UTSwitch/theme.js +2 -4
- package/dist/components/UTTable/components/ActionIcons/constants.js +2 -1
- package/dist/components/UTTable/components/ActionIcons/index.js +85 -47
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +12 -10
- package/dist/components/UTTable/components/Cell/index.js +23 -18
- package/dist/components/UTTable/components/HeaderCell/constants.js +3 -2
- package/dist/components/UTTable/components/HeaderCell/index.js +30 -23
- package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +11 -12
- package/dist/components/UTTable/components/ResponsiveCell/index.js +20 -19
- package/dist/components/UTTable/components/Status/index.js +19 -18
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +9 -10
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +13 -7
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +32 -21
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +14 -8
- package/dist/components/UTTable/components/TableFooter/constants.js +2 -1
- 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 +6 -3
- package/dist/components/UTTable/components/TableRow/index.js +94 -79
- package/dist/components/UTTable/constants.js +43 -26
- package/dist/components/UTTable/hook.js +26 -11
- package/dist/components/UTTable/index.js +223 -132
- package/dist/components/UTTable/theme.js +17 -17
- package/dist/components/UTTable/types.js +8 -4
- package/dist/components/UTTable/utils.js +74 -70
- package/dist/components/UTTabs/components/TooltipTab/index.js +30 -20
- package/dist/components/UTTabs/constants.js +8 -4
- package/dist/components/UTTabs/index.js +86 -57
- package/dist/components/UTTabs/theme.js +2 -4
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +6 -3
- package/dist/components/UTTextArea/index.js +23 -23
- package/dist/components/UTTextArea/theme.js +2 -4
- package/dist/components/UTTextInput/constants.js +3 -2
- package/dist/components/UTTextInput/index.js +165 -137
- package/dist/components/UTTextInput/theme.js +4 -6
- package/dist/components/UTThirdPartyCookieChecker/index.js +21 -17
- package/dist/components/UTToggle/components/ToggleOption/index.js +17 -16
- package/dist/components/UTToggle/index.js +26 -25
- package/dist/components/UTToggle/theme.js +2 -4
- package/dist/components/UTTooltip/index.js +30 -23
- package/dist/components/UTTooltip/theme.js +2 -4
- package/dist/components/UTTopbar/components/Notifications/index.js +14 -11
- package/dist/components/UTTopbar/components/UserMenu/index.js +15 -15
- package/dist/components/UTTopbar/index.js +31 -28
- package/dist/components/UTTopbar/theme.js +2 -4
- package/dist/components/UTTopbar/types.js +9 -5
- package/dist/components/UTTouchableWithoutFeedback/index.js +27 -14
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +4 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +31 -34
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +12 -6
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +18 -8
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +47 -23
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +34 -31
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +93 -81
- package/dist/components/UTVirtualizedList/constants.js +8 -4
- package/dist/components/UTVirtualizedList/index.js +38 -26
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +21 -17
- package/dist/components/UTWorkflowContainer/constants.js +6 -3
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +51 -32
- package/dist/components/UTWorkflowContainer/theme.js +53 -60
- package/dist/components/UTWorkflowContainer/types.js +3 -2
- package/dist/components/WithLoading/index.js +15 -10
- package/dist/components/WithTheme/index.js +17 -10
- package/dist/components/WithTheme/layout.js +28 -22
- package/dist/components/WithTouch/index.js +19 -12
- package/dist/constants/UTTable.js +3 -2
- package/dist/index.js +58 -58
- package/dist/theme.js +5 -6
- package/dist/types/commonTypes.js +5 -3
- package/dist/types/consumptionTypes.js +5 -3
- package/dist/types/formTypes.js +7 -4
- package/dist/types/tableTypes.js +3 -2
- package/dist/utils/classesUtils.js +13 -5
- package/dist/utils/componentUtils.js +13 -10
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/shadowUtils.js +11 -13
- package/dist/utils/useScreenSize.js +3 -2
- package/package.json +1 -1
|
@@ -22,12 +22,31 @@ 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(
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
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); }
|
|
27
28
|
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); }
|
|
28
47
|
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; }
|
|
29
|
-
function _toPropertyKey(
|
|
30
|
-
function _toPrimitive(
|
|
48
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
49
|
+
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); }
|
|
31
50
|
var CalendarIcon = function CalendarIcon(props) {
|
|
32
51
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("path", {
|
|
33
52
|
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",
|
|
@@ -47,60 +66,86 @@ CalendarIcon.defaultProps = {
|
|
|
47
66
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
48
67
|
};
|
|
49
68
|
_dayjs2.default.extend(_customParseFormat.default);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
var CustomUtils = /*#__PURE__*/function (_DayjsUtils) {
|
|
70
|
+
_inherits(CustomUtils, _DayjsUtils);
|
|
71
|
+
var _super = _createSuper(CustomUtils);
|
|
72
|
+
function CustomUtils() {
|
|
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;
|
|
54
83
|
}
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
return _createClass(CustomUtils);
|
|
85
|
+
}(_dayjs.default);
|
|
86
|
+
var UTDatePicker = function UTDatePicker(_ref) {
|
|
57
87
|
var _field$configuration;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
disableToolbar = true,
|
|
64
|
-
disabled,
|
|
65
|
-
field,
|
|
66
|
-
iconAnchor,
|
|
67
|
-
input,
|
|
68
|
-
inputProps,
|
|
69
|
-
inputVariant =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
var themeClasses = _ref.classes,
|
|
89
|
+
classNames = _ref.classNames,
|
|
90
|
+
CustomIcon = _ref.CustomIcon,
|
|
91
|
+
dayFormat = _ref.dayFormat,
|
|
92
|
+
_ref$disableToolbar = _ref.disableToolbar,
|
|
93
|
+
disableToolbar = _ref$disableToolbar === void 0 ? true : _ref$disableToolbar,
|
|
94
|
+
disabled = _ref.disabled,
|
|
95
|
+
field = _ref.field,
|
|
96
|
+
iconAnchor = _ref.iconAnchor,
|
|
97
|
+
input = _ref.input,
|
|
98
|
+
inputProps = _ref.inputProps,
|
|
99
|
+
_ref$inputVariant = _ref.inputVariant,
|
|
100
|
+
inputVariant = _ref$inputVariant === void 0 ? _constants.INPUT_VARIANT : _ref$inputVariant,
|
|
101
|
+
invalidDateMessage = _ref.invalidDateMessage,
|
|
102
|
+
maxDateMessage = _ref.maxDateMessage,
|
|
103
|
+
minDateMessage = _ref.minDateMessage,
|
|
104
|
+
_ref$meta = _ref.meta,
|
|
105
|
+
meta = _ref$meta === void 0 ? {} : _ref$meta,
|
|
106
|
+
pickerProps = _ref.pickerProps,
|
|
107
|
+
placeholder = _ref.placeholder,
|
|
108
|
+
popoverProps = _ref.popoverProps,
|
|
109
|
+
variant = _ref.variant,
|
|
110
|
+
withUpperTitle = _ref.withUpperTitle;
|
|
111
|
+
var classes = (0, _react.useMemo)(function () {
|
|
112
|
+
return (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
113
|
+
}, [classNames]);
|
|
114
|
+
var 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;
|
|
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) {
|
|
85
124
|
setPickedDate(date);
|
|
86
|
-
|
|
125
|
+
var newValue = (0, _dayjs2.default)(date, _constants.OUTPUT_LABEL_MASK, true);
|
|
87
126
|
if (newValue.isValid()) input.onChange(newValue.format(configMask));else input.onChange('');
|
|
88
127
|
};
|
|
89
|
-
(0, _react.useEffect)(()
|
|
128
|
+
(0, _react.useEffect)(function () {
|
|
90
129
|
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));
|
|
91
130
|
}, [input.value]);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
131
|
+
var renderDay = function renderDay(date, _, dayInCurrentMonth) {
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement(_Day.default, {
|
|
133
|
+
classes: classes,
|
|
134
|
+
dayFormat: dayFormat,
|
|
135
|
+
date: date,
|
|
136
|
+
pickedDate: pickedDate,
|
|
137
|
+
dayInCurrentMonth: dayInCurrentMonth
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
var handleError = function handleError(error) {
|
|
141
|
+
return setInternalError(error);
|
|
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) || '';
|
|
104
149
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, withUpperTitle && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
105
150
|
className: classes.upperTitle,
|
|
106
151
|
withMarkdown: true
|
|
@@ -126,14 +171,13 @@ const UTDatePicker = _ref => {
|
|
|
126
171
|
className: disabled ? classes.disabledOpenerIcon : classes.openerIcon
|
|
127
172
|
})),
|
|
128
173
|
variant: variant || _constants.VARIANT,
|
|
129
|
-
InputProps: {
|
|
174
|
+
InputProps: _objectSpread({
|
|
130
175
|
classes: {
|
|
131
176
|
root: classes.input,
|
|
132
177
|
notchedOutline: classes.notchedOutline
|
|
133
178
|
},
|
|
134
|
-
placeholder: inputVariant === 'outlined' && (placeholder || (field === null || field === void 0 ? void 0 : field.placeholder)) || undefined
|
|
135
|
-
|
|
136
|
-
},
|
|
179
|
+
placeholder: inputVariant === 'outlined' && (placeholder || (field === null || field === void 0 ? void 0 : field.placeholder)) || undefined
|
|
180
|
+
}, inputProps),
|
|
137
181
|
invalidDateMessage: invalidDateMessage || _constants.WRONG_DATE_FORMAT,
|
|
138
182
|
inputVariant: inputVariant,
|
|
139
183
|
format: _constants.OUTPUT_LABEL_MASK,
|
|
@@ -144,10 +188,7 @@ const UTDatePicker = _ref => {
|
|
|
144
188
|
},
|
|
145
189
|
onChange: handleChange,
|
|
146
190
|
renderDay: renderDay,
|
|
147
|
-
PopoverProps: {
|
|
148
|
-
...(iconAnchor ? (0, _constants.iconAnchorProps)(operenerIconReference) : {}),
|
|
149
|
-
...popoverProps
|
|
150
|
-
}
|
|
191
|
+
PopoverProps: _objectSpread(_objectSpread({}, iconAnchor ? (0, _constants.iconAnchorProps)(operenerIconReference) : {}), popoverProps)
|
|
151
192
|
}, pickerProps))));
|
|
152
193
|
};
|
|
153
194
|
UTDatePicker.propTypes = {
|
|
@@ -173,4 +214,5 @@ UTDatePicker.propTypes = {
|
|
|
173
214
|
variant: _propTypes.string,
|
|
174
215
|
withUpperTitle: _propTypes.bool
|
|
175
216
|
};
|
|
176
|
-
var _default =
|
|
217
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.materialTheme)(UTDatePicker);
|
|
218
|
+
exports.default = _default;
|
|
@@ -9,10 +9,8 @@ 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
|
-
|
|
14
|
-
theme
|
|
15
|
-
} = _ref;
|
|
12
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
13
|
+
var theme = _ref.theme;
|
|
16
14
|
return {
|
|
17
15
|
openerIcon: {
|
|
18
16
|
fill: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'openerIcon', 'fill'], _colorsModule.default.orangeIcon)
|
|
@@ -53,7 +51,7 @@ const retrieveStyle = _ref => {
|
|
|
53
51
|
};
|
|
54
52
|
};
|
|
55
53
|
exports.retrieveStyle = retrieveStyle;
|
|
56
|
-
|
|
54
|
+
var materialTheme = function materialTheme(theme) {
|
|
57
55
|
var _theme$UTDatePicker, _theme$UTDatePicker2, _theme$UTDatePicker3, _theme$UTDatePicker4;
|
|
58
56
|
return (0, _styles.createTheme)({
|
|
59
57
|
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
|
+
var classesPropTypes = (0, _propTypes.shape)({
|
|
9
9
|
content: _propTypes.string,
|
|
10
10
|
container: _propTypes.string,
|
|
11
11
|
root: _propTypes.string,
|
|
@@ -14,4 +14,5 @@ const classesPropTypes = exports.classesPropTypes = (0, _propTypes.shape)({
|
|
|
14
14
|
closeIcon: _propTypes.string,
|
|
15
15
|
warning: _propTypes.string,
|
|
16
16
|
dialogActions: _propTypes.string
|
|
17
|
-
});
|
|
17
|
+
});
|
|
18
|
+
exports.classesPropTypes = classesPropTypes;
|
|
@@ -6,7 +6,11 @@ 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
|
-
|
|
9
|
+
var isSelected = function isSelected(date, selectedDate) {
|
|
10
|
+
return selectedDate && date.isSame(selectedDate, 'day');
|
|
11
|
+
};
|
|
10
12
|
exports.isSelected = isSelected;
|
|
11
|
-
|
|
13
|
+
var dateMatchesFormat = function dateMatchesFormat(date, targetFormat) {
|
|
14
|
+
return (0, _dayjs.default)(date, targetFormat).format(targetFormat) === date;
|
|
15
|
+
};
|
|
12
16
|
exports.dateMatchesFormat = dateMatchesFormat;
|
|
@@ -4,5 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CANCEL_BUTTON_TEXT = exports.ACCEPT_BUTTON_TEXT = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
@@ -20,42 +20,40 @@ 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 = false,
|
|
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
|
-
|
|
57
|
-
dialogActions
|
|
58
|
-
} = classNames || {};
|
|
23
|
+
var UTDialog = function UTDialog(_ref) {
|
|
24
|
+
var acceptButton = _ref.acceptButton,
|
|
25
|
+
alertConfig = _ref.alertConfig,
|
|
26
|
+
cancelButton = _ref.cancelButton,
|
|
27
|
+
children = _ref.children,
|
|
28
|
+
classes = _ref.classes,
|
|
29
|
+
classNames = _ref.classNames,
|
|
30
|
+
contentName = _ref.contentName,
|
|
31
|
+
dialogProps = _ref.dialogProps,
|
|
32
|
+
disableEnforceFocus = _ref.disableEnforceFocus,
|
|
33
|
+
disableScrollLock = _ref.disableScrollLock,
|
|
34
|
+
disableTypography = _ref.disableTypography,
|
|
35
|
+
elevation = _ref.elevation,
|
|
36
|
+
FooterComponents = _ref.FooterComponents,
|
|
37
|
+
_ref$isOpen = _ref.isOpen,
|
|
38
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
39
|
+
onRequestClose = _ref.onRequestClose,
|
|
40
|
+
roundedCloseButton = _ref.roundedCloseButton,
|
|
41
|
+
title = _ref.title,
|
|
42
|
+
TransitionProps = _ref.TransitionProps,
|
|
43
|
+
warningAlert = _ref.warningAlert,
|
|
44
|
+
whiteTitle = _ref.whiteTitle,
|
|
45
|
+
withClickAway = _ref.withClickAway,
|
|
46
|
+
withCloseButton = _ref.withCloseButton;
|
|
47
|
+
var CloseIcon = roundedCloseButton ? _CloseRounded.default : _Close.default;
|
|
48
|
+
var _ref2 = classNames || {},
|
|
49
|
+
content = _ref2.content,
|
|
50
|
+
container = _ref2.container,
|
|
51
|
+
root = _ref2.root,
|
|
52
|
+
closeButton = _ref2.closeButton,
|
|
53
|
+
mainTitle = _ref2.mainTitle,
|
|
54
|
+
closeIcon = _ref2.closeIcon,
|
|
55
|
+
warning = _ref2.warning,
|
|
56
|
+
dialogActions = _ref2.dialogActions;
|
|
59
57
|
return /*#__PURE__*/_react.default.createElement(_Dialog.default, _extends({
|
|
60
58
|
open: isOpen,
|
|
61
59
|
onClose: withClickAway ? onRequestClose : undefined,
|
|
@@ -66,7 +64,7 @@ const UTDialog = _ref => {
|
|
|
66
64
|
root: "".concat(classes.root, " ").concat(root)
|
|
67
65
|
},
|
|
68
66
|
PaperProps: {
|
|
69
|
-
elevation
|
|
67
|
+
elevation: elevation
|
|
70
68
|
},
|
|
71
69
|
disableEnforceFocus: disableEnforceFocus,
|
|
72
70
|
disableScrollLock: disableScrollLock,
|
|
@@ -129,4 +127,5 @@ UTDialog.propTypes = {
|
|
|
129
127
|
withClickAway: _propTypes.bool,
|
|
130
128
|
withCloseButton: _propTypes.bool
|
|
131
129
|
};
|
|
132
|
-
var _default =
|
|
130
|
+
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTDialog);
|
|
131
|
+
exports.default = _default;
|
|
@@ -8,11 +8,9 @@ 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
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
12
12
|
var _theme$UTDialog;
|
|
13
|
-
|
|
14
|
-
theme
|
|
15
|
-
} = _ref;
|
|
13
|
+
var theme = _ref.theme;
|
|
16
14
|
return {
|
|
17
15
|
container: {
|
|
18
16
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'margin'], 0),
|
|
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dialogButtonPropTypes = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
|
-
|
|
8
|
+
var 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
|
-
});
|
|
13
|
+
});
|
|
14
|
+
exports.dialogButtonPropTypes = dialogButtonPropTypes;
|
|
@@ -11,54 +11,75 @@ 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); }
|
|
14
25
|
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; }
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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", {
|
|
21
39
|
anchorEl: null
|
|
22
40
|
});
|
|
23
|
-
_defineProperty(
|
|
24
|
-
|
|
41
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
|
|
42
|
+
_this.setState({
|
|
25
43
|
anchorEl: event.currentTarget
|
|
26
44
|
});
|
|
27
45
|
});
|
|
28
|
-
_defineProperty(
|
|
29
|
-
|
|
46
|
+
_defineProperty(_assertThisInitialized(_this), "handleClose", function () {
|
|
47
|
+
_this.setState({
|
|
30
48
|
anchorEl: null
|
|
31
49
|
});
|
|
32
50
|
});
|
|
51
|
+
return _this;
|
|
33
52
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
53
|
+
_createClass(UTDotMenu, [{
|
|
54
|
+
key: "render",
|
|
55
|
+
value: function render() {
|
|
56
|
+
var anchorEl = this.state.anchorEl;
|
|
57
|
+
var classNames = this.props.classNames;
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
className: this.props.className
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
61
|
+
classNames: {
|
|
62
|
+
icon: classNames.icon,
|
|
63
|
+
root: classNames.button
|
|
64
|
+
},
|
|
65
|
+
Icon: _MoreVert.default,
|
|
66
|
+
onClick: this.handleClick,
|
|
67
|
+
variant: "text"
|
|
68
|
+
}), /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
69
|
+
id: "long-menu",
|
|
70
|
+
anchorEl: anchorEl,
|
|
71
|
+
open: Boolean(anchorEl),
|
|
72
|
+
onClose: this.handleClose
|
|
73
|
+
}, this.props.options.map(function (option) {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
75
|
+
key: option.name,
|
|
76
|
+
onClick: option.onPress
|
|
77
|
+
}, option.name);
|
|
78
|
+
})));
|
|
79
|
+
}
|
|
80
|
+
}]);
|
|
81
|
+
return UTDotMenu;
|
|
82
|
+
}(_react.default.Component);
|
|
62
83
|
UTDotMenu.propTypes = {
|
|
63
84
|
options: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
64
85
|
name: _propTypes.string,
|
|
@@ -70,4 +91,5 @@ UTDotMenu.propTypes = {
|
|
|
70
91
|
button: _propTypes.string
|
|
71
92
|
})
|
|
72
93
|
};
|
|
73
|
-
var _default =
|
|
94
|
+
var _default = UTDotMenu;
|
|
95
|
+
exports.default = _default;
|
|
@@ -150,20 +150,24 @@ Flags.defaultProps = {
|
|
|
150
150
|
strokeLinecap: "round",
|
|
151
151
|
strokeLinejoin: "round"
|
|
152
152
|
};
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
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'];
|
|
154
|
+
exports.DEFAULT_EXCLUDED_EMOJIS = DEFAULT_EXCLUDED_EMOJIS;
|
|
155
|
+
var DEFAULT_VIRTUALIZED_LIST_CONFIG = {
|
|
155
156
|
overscan: 10,
|
|
156
157
|
elementsPerRow: 8,
|
|
157
158
|
itemPadding: 0
|
|
158
159
|
};
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
exports.DEFAULT_VIRTUALIZED_LIST_CONFIG = DEFAULT_VIRTUALIZED_LIST_CONFIG;
|
|
161
|
+
var DEFAULT_BUTTON_EMOJI_INDEX = 0;
|
|
162
|
+
exports.DEFAULT_BUTTON_EMOJI_INDEX = DEFAULT_BUTTON_EMOJI_INDEX;
|
|
163
|
+
var DEFAULT_POSITIONS = {
|
|
161
164
|
BOTTOM_LEFT: 'bottomLeft',
|
|
162
165
|
BOTTOM_RIGHT: 'bottomRight',
|
|
163
166
|
TOP_LEFT: 'topLeft',
|
|
164
167
|
TOP_RIGHT: 'topRight'
|
|
165
168
|
};
|
|
166
|
-
|
|
169
|
+
exports.DEFAULT_POSITIONS = DEFAULT_POSITIONS;
|
|
170
|
+
var GROUPS = [{
|
|
167
171
|
key: 'faces',
|
|
168
172
|
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
173
|
Icon: Faces
|
|
@@ -195,4 +199,5 @@ const GROUPS = exports.GROUPS = [{
|
|
|
195
199
|
key: 'flags',
|
|
196
200
|
ranges: [['chequered_flag', 'pirate_flag'], ['transgender flag']],
|
|
197
201
|
Icon: Flags
|
|
198
|
-
}];
|
|
202
|
+
}];
|
|
203
|
+
exports.GROUPS = GROUPS;
|