@widergy/energy-ui 2.10.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/components/EnergyThemeProvider/index.js +12 -34
- package/dist/components/Loading/constants.js +1 -1
- package/dist/components/Loading/index.js +12 -10
- package/dist/components/Loading/theme.js +6 -3
- package/dist/components/UTAlert/AlertHandler.js +74 -99
- package/dist/components/UTAlert/index.js +64 -85
- package/dist/components/UTAlert/theme.js +34 -32
- package/dist/components/UTAttachment/components/Preview/index.js +7 -7
- package/dist/components/UTAttachment/constants.js +6 -6
- package/dist/components/UTAttachment/index.js +167 -257
- package/dist/components/UTAttachment/layout.js +25 -25
- package/dist/components/UTAttachment/theme.js +6 -3
- package/dist/components/UTAttachment/utils.js +44 -117
- package/dist/components/UTAutocomplete/components/ListBox/index.js +12 -19
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +11 -12
- package/dist/components/UTAutocomplete/constants.js +11 -11
- package/dist/components/UTAutocomplete/index.js +53 -92
- package/dist/components/UTAutocomplete/theme.js +9 -5
- package/dist/components/UTAvatar/constants.js +1 -1
- package/dist/components/UTAvatar/index.js +17 -15
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +21 -20
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +2 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +20 -20
- package/dist/components/UTBarChart/components/Bars/constants.js +3 -3
- package/dist/components/UTBarChart/components/Bars/index.js +69 -78
- package/dist/components/UTBarChart/components/Legend/constants.js +14 -17
- package/dist/components/UTBarChart/components/Legend/index.js +74 -91
- package/dist/components/UTBarChart/components/Legend/utils.js +2 -5
- package/dist/components/UTBarChart/components/Levels/index.js +15 -12
- package/dist/components/UTBarChart/components/Levels/utils.js +26 -27
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +2 -2
- package/dist/components/UTBarChart/components/LinearPlot/index.js +24 -18
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +39 -39
- package/dist/components/UTBarChart/components/Pagination/constants.js +1 -1
- package/dist/components/UTBarChart/components/Pagination/index.js +19 -22
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +20 -30
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -2
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +19 -17
- package/dist/components/UTBarChart/components/XAxis/constants.js +1 -1
- package/dist/components/UTBarChart/components/XAxis/index.js +53 -63
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +11 -9
- package/dist/components/UTBarChart/components/YAxis/constants.js +1 -1
- package/dist/components/UTBarChart/components/YAxis/index.js +29 -35
- package/dist/components/UTBarChart/components/YAxis/utils.js +6 -6
- package/dist/components/UTBarChart/constants.js +4 -4
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +22 -38
- package/dist/components/UTBarChart/index.js +151 -164
- package/dist/components/UTBarChart/theme.js +6 -3
- package/dist/components/UTBarChart/types.js +9 -9
- package/dist/components/UTBarChart/utils.js +118 -111
- package/dist/components/UTBreadcrumbs/constants.js +22 -24
- package/dist/components/UTBreadcrumbs/index.js +75 -99
- package/dist/components/UTBreadcrumbs/styles.module.scss +1 -0
- package/dist/components/UTBreadcrumbs/theme.js +6 -3
- package/dist/components/UTButton/constants.js +11 -11
- package/dist/components/UTButton/index.js +27 -29
- package/dist/components/UTButton/theme.js +26 -24
- package/dist/components/UTCBUInput/index.js +35 -38
- package/dist/components/UTCBUInput/theme.js +6 -3
- package/dist/components/UTCaptcha/index.js +18 -43
- package/dist/components/UTCard/components/UTCardFooter/index.js +14 -14
- package/dist/components/UTCard/index.js +89 -123
- package/dist/components/UTCard/theme.js +13 -13
- package/dist/components/UTCard/types.js +1 -1
- package/dist/components/UTCarousel/components/Button/index.js +12 -11
- package/dist/components/UTCarousel/components/Legend/index.js +12 -13
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +15 -14
- package/dist/components/UTCarousel/components/Slider/constants.js +5 -5
- package/dist/components/UTCarousel/components/Slider/index.js +213 -281
- package/dist/components/UTCarousel/components/Slider/layout.js +66 -92
- package/dist/components/UTCarousel/index.js +13 -13
- package/dist/components/UTCarousel/theme.js +6 -3
- package/dist/components/UTCheckList/constants.js +1 -1
- package/dist/components/UTCheckList/index.js +71 -91
- package/dist/components/UTCheckList/theme.js +34 -32
- package/dist/components/UTCheckbox/constants.js +2 -4
- package/dist/components/UTCheckbox/index.js +32 -43
- package/dist/components/UTCheckbox/theme.js +37 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +8 -7
- package/dist/components/UTConsumptionBar/constants.js +3 -3
- package/dist/components/UTConsumptionBar/index.js +52 -78
- package/dist/components/UTCuit/index.js +114 -137
- package/dist/components/UTCuit/theme.js +52 -53
- package/dist/components/UTDatePicker/components/Day/constants.js +1 -1
- package/dist/components/UTDatePicker/components/Day/index.js +11 -10
- package/dist/components/UTDatePicker/constants.js +21 -22
- package/dist/components/UTDatePicker/index.js +60 -102
- package/dist/components/UTDatePicker/theme.js +8 -4
- package/dist/components/UTDatePicker/types.js +1 -1
- package/dist/components/UTDatePicker/utils.js +4 -6
- package/dist/components/UTDialog/constants.js +2 -2
- package/dist/components/UTDialog/index.js +37 -35
- package/dist/components/UTDialog/theme.js +6 -3
- package/dist/components/UTDialog/types.js +1 -1
- package/dist/components/UTDotMenu/index.js +40 -61
- package/dist/components/UTEmojiPicker/constants.js +14 -18
- package/dist/components/UTEmojiPicker/index.js +46 -64
- package/dist/components/UTEmojiPicker/styles.module.scss +1 -1
- package/dist/components/UTEmojiPicker/theme.js +6 -3
- package/dist/components/UTEmojiPicker/utils.js +24 -52
- package/dist/components/UTExternalLink/constants.js +2 -2
- package/dist/components/UTExternalLink/index.js +17 -13
- package/dist/components/UTExternalLink/theme.js +11 -7
- package/dist/components/UTFileInput/constants.js +2 -2
- package/dist/components/UTFileInput/index.js +6 -29
- package/dist/components/UTFileInput/layout.js +72 -96
- package/dist/components/UTIconButton/index.js +48 -70
- package/dist/components/UTIconButton/theme.js +6 -3
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +52 -56
- package/dist/components/UTImageRadio/constants.js +3 -3
- package/dist/components/UTImageRadio/index.js +38 -45
- package/dist/components/UTImageRadio/theme.js +13 -13
- package/dist/components/UTImageRadio/types.js +1 -1
- package/dist/components/UTImageRadio/utils.js +4 -6
- package/dist/components/UTLabel/constants.js +13 -11
- package/dist/components/UTLabel/index.js +17 -18
- package/dist/components/UTLabel/theme.js +19 -16
- package/dist/components/UTList/index.js +14 -16
- package/dist/components/UTLoading/index.js +14 -13
- package/dist/components/UTMap/components/GoogleMaps/constants.js +9 -10
- package/dist/components/UTMap/components/GoogleMaps/index.js +62 -89
- package/dist/components/UTMap/constants.js +6 -6
- package/dist/components/UTMap/index.js +162 -196
- package/dist/components/UTMap/types.js +3 -3
- package/dist/components/UTMap/utils.js +35 -46
- package/dist/components/UTMap/withGoogleMapScript.js +11 -15
- package/dist/components/UTMenu/index.js +51 -67
- package/dist/components/UTMenu/styles.module.scss +5 -5
- package/dist/components/UTMenu/theme.js +8 -4
- package/dist/components/UTMenu/utils.js +10 -12
- package/dist/components/UTModal/constants.js +13 -17
- package/dist/components/UTModal/index.js +25 -28
- package/dist/components/UTModal/styles.module.scss +1 -1
- package/dist/components/UTModal/theme.js +6 -3
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +10 -8
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +9 -14
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +11 -10
- package/dist/components/UTPagination/components/Pagination/index.js +31 -45
- package/dist/components/UTPagination/components/Pagination/utils.js +10 -15
- package/dist/components/UTPagination/constants.js +3 -3
- package/dist/components/UTPagination/index.js +15 -15
- package/dist/components/UTPagination/theme.js +6 -3
- package/dist/components/UTPanel/index.js +37 -42
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +12 -8
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +21 -17
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +62 -48
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +24 -24
- package/dist/components/UTPasswordField/index.js +25 -21
- package/dist/components/UTPasswordField/theme.js +6 -3
- package/dist/components/UTPhoneInput/constants.js +3 -3
- package/dist/components/UTPhoneInput/index.js +185 -209
- package/dist/components/UTPhoneInput/theme.js +79 -77
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -4
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +23 -21
- package/dist/components/UTPieChart/components/Legend/contants.js +3 -3
- package/dist/components/UTPieChart/components/Legend/index.js +26 -22
- package/dist/components/UTPieChart/constants.js +13 -13
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +14 -31
- package/dist/components/UTPieChart/index.js +72 -74
- package/dist/components/UTPieChart/theme.js +6 -3
- package/dist/components/UTPieChart/utils.js +6 -3
- package/dist/components/UTProgressBar/constants.js +2 -2
- package/dist/components/UTProgressBar/index.js +14 -15
- package/dist/components/UTProgressBar/theme.js +6 -3
- package/dist/components/UTProgressBar/types.js +1 -1
- package/dist/components/UTRadioGroup/index.js +55 -81
- package/dist/components/UTRadioGroup/theme.js +54 -52
- package/dist/components/UTRating/components/Circle/index.js +40 -54
- package/dist/components/UTRating/components/Faces/assets/mood-confuzed.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-empty.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-happy.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-sad.svg +3 -0
- package/dist/components/UTRating/components/Faces/assets/mood-smile.svg +3 -0
- package/dist/components/UTRating/components/Faces/constants.js +80 -0
- package/dist/components/UTRating/components/Faces/index.js +76 -0
- package/dist/components/UTRating/components/Faces/styles.module.scss +78 -0
- package/dist/components/UTRating/components/Star/index.js +35 -38
- package/dist/components/UTRating/constants.js +5 -4
- package/dist/components/UTRating/index.js +35 -46
- package/dist/components/UTRating/styles.module.scss +1 -0
- package/dist/components/UTRating/theme.js +52 -3
- package/dist/components/UTRipple/Ripple.js +21 -37
- package/dist/components/UTRipple/index.js +17 -35
- package/dist/components/UTSelect/components/Option/index.js +12 -11
- package/dist/components/UTSelect/constants.js +4 -4
- package/dist/components/UTSelect/index.js +62 -83
- package/dist/components/UTSelect/theme.js +9 -5
- package/dist/components/UTSelect/utils.js +5 -14
- package/dist/components/UTSidebar/components/ListOption/index.js +33 -47
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +7 -6
- package/dist/components/UTSidebar/components/LogosContainer/index.js +13 -12
- package/dist/components/UTSidebar/components/Option/constants.js +1 -1
- package/dist/components/UTSidebar/components/Option/index.js +27 -30
- package/dist/components/UTSidebar/components/Toggler/index.js +10 -9
- package/dist/components/UTSidebar/index.js +41 -51
- package/dist/components/UTSidebar/theme.js +6 -3
- package/dist/components/UTSidebar/types.js +5 -5
- package/dist/components/UTSkeleton/index.js +9 -34
- package/dist/components/UTStatus/constants.js +4 -4
- package/dist/components/UTStatus/index.js +15 -13
- package/dist/components/UTStatus/theme.js +75 -59
- package/dist/components/UTSwitch/constants.js +3 -3
- package/dist/components/UTSwitch/index.js +41 -55
- package/dist/components/UTSwitch/theme.js +6 -3
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -1
- package/dist/components/UTTable/components/ActionIcons/index.js +46 -83
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +9 -10
- package/dist/components/UTTable/components/Cell/index.js +17 -21
- package/dist/components/UTTable/components/HeaderCell/constants.js +1 -1
- package/dist/components/UTTable/components/HeaderCell/index.js +22 -28
- package/dist/components/UTTable/components/HeaderCell/utils.js +5 -4
- package/dist/components/UTTable/components/PrimaryAction/index.js +11 -9
- package/dist/components/UTTable/components/ResponsiveCell/index.js +18 -18
- package/dist/components/UTTable/components/Status/index.js +17 -17
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +9 -7
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +9 -14
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +11 -10
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +22 -36
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +10 -15
- package/dist/components/UTTable/components/TableFooter/constants.js +1 -1
- package/dist/components/UTTable/components/TableFooter/index.js +14 -13
- package/dist/components/UTTable/components/TableHeader/index.js +10 -10
- package/dist/components/UTTable/components/TableRow/constants.js +2 -4
- package/dist/components/UTTable/components/TableRow/index.js +79 -93
- package/dist/components/UTTable/constants.js +26 -24
- package/dist/components/UTTable/hook.js +13 -27
- package/dist/components/UTTable/index.js +125 -213
- package/dist/components/UTTable/theme.js +19 -18
- package/dist/components/UTTable/types.js +4 -4
- package/dist/components/UTTable/utils.js +80 -75
- package/dist/components/UTTabs/components/TooltipTab/index.js +19 -28
- package/dist/components/UTTabs/constants.js +4 -4
- package/dist/components/UTTabs/index.js +56 -84
- package/dist/components/UTTabs/theme.js +6 -3
- package/dist/components/UTTabs/utils.js +3 -2
- package/dist/components/UTTextArea/constants.js +2 -4
- package/dist/components/UTTextArea/index.js +22 -21
- package/dist/components/UTTextArea/theme.js +6 -3
- package/dist/components/UTTextInput/constants.js +1 -1
- package/dist/components/UTTextInput/index.js +138 -165
- package/dist/components/UTTextInput/theme.js +9 -5
- package/dist/components/UTThirdPartyCookieChecker/index.js +16 -19
- package/dist/components/UTToggle/components/ToggleOption/index.js +15 -15
- package/dist/components/UTToggle/index.js +24 -24
- package/dist/components/UTToggle/theme.js +6 -3
- package/dist/components/UTTooltip/index.js +22 -28
- package/dist/components/UTTooltip/theme.js +6 -3
- package/dist/components/UTTopbar/components/Notifications/index.js +10 -12
- package/dist/components/UTTopbar/components/UserMenu/index.js +18 -17
- package/dist/components/UTTopbar/components/UserMenu/styles.module.scss +1 -1
- package/dist/components/UTTopbar/index.js +27 -29
- package/dist/components/UTTopbar/theme.js +6 -3
- package/dist/components/UTTopbar/types.js +4 -4
- package/dist/components/UTTouchableWithoutFeedback/index.js +15 -27
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -2
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +33 -29
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +6 -5
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -6
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +7 -16
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +22 -45
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +30 -32
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +89 -94
- package/dist/components/UTVirtualizedList/constants.js +4 -4
- package/dist/components/UTVirtualizedList/index.js +25 -36
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +14 -17
- package/dist/components/UTWorkflowContainer/constants.js +3 -3
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +5 -4
- package/dist/components/UTWorkflowContainer/index.js +31 -49
- package/dist/components/UTWorkflowContainer/theme.js +62 -54
- package/dist/components/UTWorkflowContainer/types.js +1 -1
- package/dist/components/WithLoading/index.js +9 -13
- package/dist/components/WithTheme/index.js +9 -15
- package/dist/components/WithTheme/layout.js +21 -26
- package/dist/components/WithTouch/index.js +11 -17
- package/dist/constants/UTTable.js +1 -1
- package/dist/index.js +58 -58
- package/dist/theme.js +8 -4
- package/dist/types/commonTypes.js +2 -2
- package/dist/types/consumptionTypes.js +2 -2
- package/dist/types/formTypes.js +3 -3
- package/dist/types/tableTypes.js +1 -1
- package/dist/utils/classesUtils.js +7 -13
- package/dist/utils/componentUtils.js +8 -10
- package/dist/utils/helperFunctions.js +6 -5
- package/dist/utils/shadowUtils.js +15 -12
- package/dist/utils/useScreenSize.js +1 -1
- package/package.json +29 -70
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -9,16 +8,18 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
9
|
var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox"));
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
const Option = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
classes,
|
|
16
|
+
isMultiple,
|
|
17
|
+
labelKey,
|
|
18
|
+
optionProps,
|
|
19
|
+
value,
|
|
20
|
+
valueKey
|
|
21
|
+
} = _ref;
|
|
22
|
+
const OptionIcon = optionProps.icon;
|
|
22
23
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, isMultiple && /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
|
|
23
24
|
color: "primary",
|
|
24
25
|
checked: value.indexOf(optionProps[valueKey]) > -1
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VALUE_KEY = exports.MENU_TITLE_MULTIPLE = exports.MENU_TITLE = exports.LABEL_KEY = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const VALUE_KEY = exports.VALUE_KEY = 'value';
|
|
8
|
+
const LABEL_KEY = exports.LABEL_KEY = 'name';
|
|
9
|
+
const MENU_TITLE = exports.MENU_TITLE = 'Seleccione una opción';
|
|
10
|
+
const MENU_TITLE_MULTIPLE = exports.MENU_TITLE_MULTIPLE = 'Seleccione una o más opciones';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -30,74 +29,56 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
30
29
|
var _constants = require("./constants");
|
|
31
30
|
var _utils = require("./utils");
|
|
32
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
34
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
35
|
-
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; }
|
|
36
|
-
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; }
|
|
37
|
-
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; }
|
|
38
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
39
|
-
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); }
|
|
32
|
+
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); }
|
|
33
|
+
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; }
|
|
40
34
|
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); }
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
upperTitle = _ref2.upperTitle;
|
|
72
|
-
var classes = (0, _react.useMemo)(function () {
|
|
73
|
-
return (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
74
|
-
}, [classNames]);
|
|
75
|
-
(0, _react.useEffect)(function () {
|
|
35
|
+
const UTSelect = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
captionLabel,
|
|
38
|
+
classNames,
|
|
39
|
+
classes: themeClasses,
|
|
40
|
+
disabled,
|
|
41
|
+
disableFirstOption,
|
|
42
|
+
field,
|
|
43
|
+
iconPlaceholder: IconPlaceholder,
|
|
44
|
+
input,
|
|
45
|
+
labelKey,
|
|
46
|
+
labelProps,
|
|
47
|
+
menuPlaceholder,
|
|
48
|
+
meta,
|
|
49
|
+
options,
|
|
50
|
+
placeholder,
|
|
51
|
+
selectProps,
|
|
52
|
+
tooltip,
|
|
53
|
+
valueKey,
|
|
54
|
+
variant,
|
|
55
|
+
withAutoReset,
|
|
56
|
+
withOrder,
|
|
57
|
+
withoutFirstOption
|
|
58
|
+
} = _ref;
|
|
59
|
+
const {
|
|
60
|
+
multiple: isMultiple,
|
|
61
|
+
upperTitle
|
|
62
|
+
} = (field === null || field === void 0 ? void 0 : field.configuration) || {};
|
|
63
|
+
const classes = (0, _react.useMemo)(() => (0, _classesUtils.mergeClasses)(themeClasses, classNames), [classNames]);
|
|
64
|
+
(0, _react.useEffect)(() => {
|
|
76
65
|
if (withAutoReset && (0, _utils.shouldReset)(input.value, options, valueKey, isMultiple)) input.onChange(null);
|
|
77
66
|
}, [options]);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var selectedOptions = options.filter(function (option) {
|
|
83
|
-
return selected.includes(option[valueKey]);
|
|
84
|
-
});
|
|
85
|
-
return selectedOptions.map(function (selection) {
|
|
86
|
-
return selection[labelKey];
|
|
87
|
-
}).join(', ');
|
|
67
|
+
const handleChange = event => input.onChange(event.target.value);
|
|
68
|
+
const handleRenderValue = selected => {
|
|
69
|
+
const selectedOptions = options.filter(option => selected.includes(option[valueKey]));
|
|
70
|
+
return selectedOptions.map(selection => selection[labelKey]).join(', ');
|
|
88
71
|
};
|
|
89
|
-
|
|
90
|
-
sortedOptions = withOrder ? sortedOptions.sort(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
isMultiple: isMultiple,
|
|
96
|
-
labelKey: labelKey,
|
|
72
|
+
let sortedOptions = [...options];
|
|
73
|
+
sortedOptions = withOrder ? sortedOptions.sort((a, b) => a.order < b.order ? -1 : 1) : sortedOptions;
|
|
74
|
+
const optionCommonProps = {
|
|
75
|
+
classes,
|
|
76
|
+
isMultiple,
|
|
77
|
+
labelKey,
|
|
97
78
|
value: input.value,
|
|
98
|
-
valueKey
|
|
79
|
+
valueKey
|
|
99
80
|
};
|
|
100
|
-
|
|
81
|
+
const SelectInput = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, upperTitle && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
101
82
|
className: classes.upperTitle
|
|
102
83
|
}, upperTitle), /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
103
84
|
className: classes.formControl,
|
|
@@ -124,26 +105,24 @@ var UTSelect = function UTSelect(_ref) {
|
|
|
124
105
|
} : {}, selectProps), !withoutFirstOption && /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
125
106
|
value: "",
|
|
126
107
|
disabled: isMultiple || disableFirstOption
|
|
127
|
-
}, menuPlaceholder || (isMultiple ? _constants.MENU_TITLE_MULTIPLE : _constants.MENU_TITLE)), sortedOptions.map(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
})), captionLabel && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
146
|
-
classes: _objectSpread({}, classes.formHelperText)
|
|
108
|
+
}, menuPlaceholder || (isMultiple ? _constants.MENU_TITLE_MULTIPLE : _constants.MENU_TITLE)), sortedOptions.map(option => (0, _array.isEmpty)(option.subOptions) ? /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
109
|
+
key: option[valueKey],
|
|
110
|
+
value: option[valueKey]
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement(_Option.default, _extends({
|
|
112
|
+
optionProps: option
|
|
113
|
+
}, optionCommonProps))) : [/*#__PURE__*/_react.default.createElement(_ListSubheader.default, {
|
|
114
|
+
className: _stylesModule.default.subHeader
|
|
115
|
+
}, option[labelKey]), option.subOptions.map(subOption => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
116
|
+
className: classes.subOption,
|
|
117
|
+
key: subOption[valueKey],
|
|
118
|
+
value: subOption[valueKey]
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement(_Option.default, _extends({
|
|
120
|
+
isSuboption: true,
|
|
121
|
+
optionProps: subOption
|
|
122
|
+
}, optionCommonProps))))])), captionLabel && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
123
|
+
classes: {
|
|
124
|
+
...classes.formHelperText
|
|
125
|
+
}
|
|
147
126
|
}, captionLabel), (0, _form.shouldShowErrors)(meta) && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
148
127
|
className: _stylesModule.default.errorLabel,
|
|
149
128
|
colorTheme: "error",
|
|
@@ -9,8 +9,10 @@ var _styles = require("@material-ui/core/styles");
|
|
|
9
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
10
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
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
|
container: {
|
|
16
18
|
display: (0, _seamlessImmutable.getIn)(theme, ['UTSelect', 'container', 'display'], 'flex'),
|
|
@@ -54,8 +56,9 @@ var retrieveStyle = exports.retrieveStyle = function retrieveStyle(_ref) {
|
|
|
54
56
|
}
|
|
55
57
|
};
|
|
56
58
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
exports.retrieveStyle = retrieveStyle;
|
|
60
|
+
const retrieveMuiTheme = (theme, muiTheme) => {
|
|
61
|
+
const mui = {
|
|
59
62
|
typography: {
|
|
60
63
|
fontFamily: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'fontFamily'])
|
|
61
64
|
},
|
|
@@ -200,4 +203,5 @@ var retrieveMuiTheme = exports.retrieveMuiTheme = function retrieveMuiTheme(them
|
|
|
200
203
|
}
|
|
201
204
|
};
|
|
202
205
|
return (0, _styles.createTheme)(_lodash.default.merge(muiTheme, mui));
|
|
203
|
-
};
|
|
206
|
+
};
|
|
207
|
+
exports.retrieveMuiTheme = retrieveMuiTheme;
|
|
@@ -5,19 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.shouldReset = void 0;
|
|
7
7
|
var _array = require("@widergy/web-utils/lib/array");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return opt[valueKey] === el;
|
|
12
|
-
});
|
|
13
|
-
}));
|
|
14
|
-
};
|
|
15
|
-
var shouldResetSimpleSelect = function shouldResetSimpleSelect(value, options, valueKey) {
|
|
16
|
-
return value && ((0, _array.isEmpty)(options) || !options.some(function (el) {
|
|
17
|
-
return el[valueKey] === value;
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
20
|
-
var shouldReset = exports.shouldReset = function shouldReset(value, options, valueKey, isMultiple) {
|
|
8
|
+
const shouldResetMultipleSelect = (value, options, valueKey) => !(0, _array.isEmpty)(value) && ((0, _array.isEmpty)(options) || value.some(el => !options.some(opt => opt[valueKey] === el)));
|
|
9
|
+
const shouldResetSimpleSelect = (value, options, valueKey) => value && ((0, _array.isEmpty)(options) || !options.some(el => el[valueKey] === value));
|
|
10
|
+
const shouldReset = (value, options, valueKey, isMultiple) => {
|
|
21
11
|
if (isMultiple) return shouldResetMultipleSelect(value, options, valueKey);
|
|
22
12
|
return shouldResetSimpleSelect(value, options, valueKey);
|
|
23
|
-
};
|
|
13
|
+
};
|
|
14
|
+
exports.shouldReset = shouldReset;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,49 +10,38 @@ var _types = require("../../types");
|
|
|
11
10
|
var _Option = _interopRequireDefault(require("../Option"));
|
|
12
11
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
13
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
options = _ref.options;
|
|
34
|
-
var _useState = (0, _react.useState)(false),
|
|
35
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
-
openMenu = _useState2[0],
|
|
37
|
-
setOpenMenu = _useState2[1];
|
|
38
|
-
var optionRef = (0, _react.useRef)();
|
|
39
|
-
(0, _react.useEffect)(function () {
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
const ListOption = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
classes,
|
|
18
|
+
handleClose,
|
|
19
|
+
handleRedirect,
|
|
20
|
+
IconActive,
|
|
21
|
+
IconInactive,
|
|
22
|
+
label,
|
|
23
|
+
labelAlwaysVisible,
|
|
24
|
+
location,
|
|
25
|
+
open,
|
|
26
|
+
openDrawer,
|
|
27
|
+
options
|
|
28
|
+
} = _ref;
|
|
29
|
+
const [openMenu, setOpenMenu] = (0, _react.useState)(false);
|
|
30
|
+
const optionRef = (0, _react.useRef)();
|
|
31
|
+
(0, _react.useEffect)(() => {
|
|
40
32
|
if (!open) setOpenMenu(false);
|
|
41
33
|
}, [open]);
|
|
42
|
-
|
|
34
|
+
const toogleMenu = () => {
|
|
43
35
|
if (!open) {
|
|
44
36
|
openDrawer();
|
|
45
37
|
setOpenMenu(true);
|
|
46
38
|
} else setOpenMenu(!openMenu);
|
|
47
39
|
};
|
|
48
|
-
|
|
40
|
+
const optionHeight = (0, _react.useMemo)(() => {
|
|
49
41
|
var _optionRef$current;
|
|
50
42
|
return openMenu && open ? options.length * (optionRef === null || optionRef === void 0 || (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.clientHeight) : 0;
|
|
51
43
|
}, [openMenu, open]);
|
|
52
|
-
|
|
53
|
-
return options.some(function (opt) {
|
|
54
|
-
return opt.link === location;
|
|
55
|
-
});
|
|
56
|
-
}, [location, options]);
|
|
44
|
+
const hasSelectedItem = (0, _react.useMemo)(() => options.some(opt => opt.link === location), [location, options]);
|
|
57
45
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Option.default, {
|
|
58
46
|
classes: classes,
|
|
59
47
|
IconActive: IconActive,
|
|
@@ -72,19 +60,17 @@ var ListOption = function ListOption(_ref) {
|
|
|
72
60
|
style: {
|
|
73
61
|
height: optionHeight
|
|
74
62
|
}
|
|
75
|
-
}, options.map(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
87
|
-
})));
|
|
63
|
+
}, options.map(op => /*#__PURE__*/_react.default.createElement(_Option.default, {
|
|
64
|
+
classes: classes,
|
|
65
|
+
handleClose: handleClose,
|
|
66
|
+
handleRedirect: handleRedirect,
|
|
67
|
+
key: op.key,
|
|
68
|
+
label: op.label,
|
|
69
|
+
labelAlwaysVisible: labelAlwaysVisible,
|
|
70
|
+
link: op.link,
|
|
71
|
+
location: location,
|
|
72
|
+
open: open
|
|
73
|
+
}))));
|
|
88
74
|
};
|
|
89
75
|
ListOption.propTypes = {
|
|
90
76
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
const DynamicIcon = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
className,
|
|
14
|
+
Icon
|
|
15
|
+
} = _ref;
|
|
15
16
|
return typeof Icon === 'string' ? /*#__PURE__*/_react.default.createElement("img", {
|
|
16
17
|
src: Icon,
|
|
17
18
|
alt: "",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,17 +10,19 @@ var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
|
11
10
|
var _DynamicIcon = _interopRequireDefault(require("./components/DynamicIcon"));
|
|
12
11
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
13
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
const LogosContainer = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
badgeClassName,
|
|
18
|
+
badgeContent,
|
|
19
|
+
BigLogo,
|
|
20
|
+
bigLogoClassName,
|
|
21
|
+
containerClassName,
|
|
22
|
+
SmallLogo,
|
|
23
|
+
smallLogoClassName,
|
|
24
|
+
showBigLogo
|
|
25
|
+
} = _ref;
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
27
|
className: "".concat(containerClassName, " ").concat(_stylesModule.default.logoContainer)
|
|
27
28
|
}, BigLogo && /*#__PURE__*/_react.default.createElement(_DynamicIcon.default, {
|
|
@@ -16,43 +16,40 @@ var _types = require("../../types");
|
|
|
16
16
|
var _constants = require("./constants");
|
|
17
17
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
withToggleArrow = _ref.withToggleArrow,
|
|
43
|
-
withTooltip = _ref.withTooltip;
|
|
44
|
-
var isSelected = isSelectedGroup || link === location;
|
|
45
|
-
var handleRedirection = function handleRedirection() {
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
const Option = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
classes,
|
|
24
|
+
handleClose,
|
|
25
|
+
handleRedirect,
|
|
26
|
+
IconActive,
|
|
27
|
+
IconInactive,
|
|
28
|
+
isSelectedGroup,
|
|
29
|
+
label,
|
|
30
|
+
labelAlwaysVisible,
|
|
31
|
+
link,
|
|
32
|
+
location,
|
|
33
|
+
onClick,
|
|
34
|
+
open,
|
|
35
|
+
optionRef,
|
|
36
|
+
toggleArrowActive,
|
|
37
|
+
withToggleArrow,
|
|
38
|
+
withTooltip
|
|
39
|
+
} = _ref;
|
|
40
|
+
const isSelected = isSelectedGroup || link === location;
|
|
41
|
+
const handleRedirection = () => {
|
|
46
42
|
handleRedirect(link);
|
|
47
43
|
if (handleClose) handleClose();
|
|
48
44
|
};
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
const Container = withTooltip ? _UTTooltip.default : _react.Fragment;
|
|
46
|
+
const containerProps = withTooltip && {
|
|
47
|
+
..._constants.TOOLTIP_CONFIG,
|
|
51
48
|
content: /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
52
49
|
className: classes.tooltipLabel
|
|
53
50
|
}, label),
|
|
54
51
|
className: classes.tooltip
|
|
55
|
-
}
|
|
52
|
+
};
|
|
56
53
|
return /*#__PURE__*/_react.default.createElement(Container, containerProps, /*#__PURE__*/_react.default.createElement(_ListItem.default, {
|
|
57
54
|
className: "\n ".concat(_stylesModule.default.option, "\n ").concat(classes.option, "\n ").concat(isSelected && "".concat(_stylesModule.default.optionSelected, " ").concat(classes.optionSelected), "\n ").concat(isSelected && open && classes.optionSelectedOpened, "\n ").concat(isSelected && !isSelectedGroup && !withTooltip && _stylesModule.default.removeEvents, "\n "),
|
|
58
55
|
onClick: onClick || handleRedirection,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -14,14 +13,16 @@ var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
|
14
13
|
var _types = require("../../types");
|
|
15
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" !=
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
const Toggler = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
classes,
|
|
21
|
+
open,
|
|
22
|
+
toggleDrawer,
|
|
23
|
+
title,
|
|
24
|
+
subtitle
|
|
25
|
+
} = _ref;
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
27
|
className: "".concat(classes.togglerContainer, " ").concat(_stylesModule.default.togglerContainer)
|
|
27
28
|
}, open ? /*#__PURE__*/_react.default.createElement("div", {
|