@itilite/iui-user-management 0.4.10 → 0.4.11

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/index.css CHANGED
@@ -979,6 +979,117 @@
979
979
  width: 100%;
980
980
  font-size: initial;
981
981
  }
982
+ ._2A4_u.MuiButton-contained {
983
+ border-radius: 6px;
984
+ background-color: #EC5D25;
985
+ color: #ffffff;
986
+ }
987
+ ._2A4_u.MuiButton-contained:hover {
988
+ background-color: #EC5D25;
989
+ }
990
+ ._2A4_u.MuiButton-contained.Mui-disabled {
991
+ background-color: #EC5D25;
992
+ color: #ffffff;
993
+ opacity: 0.7;
994
+ }
995
+ ._2A4_u ._QGIKG {
996
+ border-radius: 6px;
997
+ background-color: #ffe7de;
998
+ margin-left: 12px;
999
+ padding: 4px;
1000
+ display: flex;
1001
+ align-items: center;
1002
+ justify-content: center;
1003
+ color: #EC5D25;
1004
+ font-family: "Inter", sans-serif;
1005
+ font-style: normal;
1006
+ font-weight: 500;
1007
+ font-size: 0.875rem;
1008
+ line-height: 17px;
1009
+ }
1010
+
1011
+ ._3iFbO.MuiButton-root {
1012
+ display: flex;
1013
+ flex-direction: row;
1014
+ justify-content: center;
1015
+ align-items: center;
1016
+ font-weight: 500 !important;
1017
+ font-style: normal !important;
1018
+ font-size: 0.875rem !important;
1019
+ font-family: "Inter", sans-serif !important;
1020
+ line-height: 20px;
1021
+ text-transform: none;
1022
+ min-width: auto;
1023
+ box-shadow: none !important;
1024
+ border: none;
1025
+ padding: 4px 8px;
1026
+ white-space: nowrap !important;
1027
+ border-radius: 50%;
1028
+ }
1029
+ ._3iFbO.MuiButton-root:hover {
1030
+ background-color: transparent;
1031
+ }
1032
+
1033
+ ._3lQYD.MuiButton-outlined {
1034
+ box-shadow: 0px 1px 0px rgba(17, 24, 39, 0.1) !important;
1035
+ border-radius: 6px;
1036
+ color: #374151;
1037
+ border: 1px solid #D1D5DB;
1038
+ border-width: 1px !important;
1039
+ height: 40px;
1040
+ padding: 8px 18px;
1041
+ }
1042
+ ._3lQYD.MuiButton-outlined:hover {
1043
+ background-color: #ffffff;
1044
+ }
1045
+
1046
+ ._1C8bJ {
1047
+ display: flex;
1048
+ flex-direction: column;
1049
+ align-items: flex-start;
1050
+ padding: 4px !important;
1051
+ background: #ffffff;
1052
+ box-sizing: border-box;
1053
+ min-width: 200px;
1054
+ border-radius: 8px;
1055
+ box-shadow: 0px 4px 8px rgba(17, 24, 39, 0.15), 0px 1px 2px rgba(17, 24, 39, 0.1);
1056
+ }
1057
+
1058
+ ._1C8bJ._3lQYD {
1059
+ border: 1px solid #D1D5DB;
1060
+ box-shadow: none;
1061
+ }
1062
+
1063
+ ._1N83W {
1064
+ margin-top: 8px;
1065
+ }
1066
+ ._1N83W ._3VtcE.MuiListItem-button:hover {
1067
+ background-color: transparent;
1068
+ text-decoration: none;
1069
+ }
1070
+ ._1N83W ._3VtcE.MuiMenuItem-root {
1071
+ width: 100%;
1072
+ display: flex;
1073
+ flex-direction: column;
1074
+ align-items: flex-start;
1075
+ line-height: 0;
1076
+ }
1077
+ ._1N83W ._3VtcE ._2xqnU.MuiTypography-root {
1078
+ font-family: "Inter", sans-serif;
1079
+ font-style: normal;
1080
+ font-weight: 400;
1081
+ font-size: 0.875rem;
1082
+ line-height: 20px;
1083
+ color: #374151;
1084
+ flex: none;
1085
+ order: 0;
1086
+ flex-grow: 0;
1087
+ width: 100%;
1088
+ }
1089
+ ._1N83W ._3VtcE ._2xqnU._3CVzX {
1090
+ font-size: 0.75rem;
1091
+ line-height: 1;
1092
+ }
982
1093
  ._1EFxC {
983
1094
  flex: 0.17;
984
1095
  max-width: 218px;
package/dist/index.js CHANGED
@@ -17,6 +17,8 @@ var styles$8 = require('@material-ui/core/styles');
17
17
  var Tooltip = _interopDefault(require('@material-ui/core/Tooltip'));
18
18
  var Switch = _interopDefault(require('@material-ui/core/Switch'));
19
19
  var MoreHorizIcon = _interopDefault(require('@material-ui/icons/MoreHoriz'));
20
+ var Button = _interopDefault(require('@material-ui/core/Button'));
21
+ var core = require('@material-ui/core');
20
22
  var InfoIcon = _interopDefault(require('@material-ui/icons/Info'));
21
23
 
22
24
  function _extends() {
@@ -1684,7 +1686,6 @@ var fetchRenderFileds = function fetchRenderFileds() {
1684
1686
  var _res$data;
1685
1687
  IUIToastMessageService.warningNotify((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.message) || 'Opps, Something went wrong.');
1686
1688
  dispatch(stopLoader());
1687
- reject();
1688
1689
  }
1689
1690
  })["catch"](function (err) {
1690
1691
  reject(err);
@@ -1827,11 +1828,9 @@ var createUser = function createUser(payload) {
1827
1828
  } else {
1828
1829
  if (res.data.errors && typeof res.data.errors === 'object') {
1829
1830
  reject(res.data.errors);
1830
- return;
1831
1831
  } else if (!Object.keys(res.data.errors).length) {
1832
1832
  IUIToastMessageService.warningNotify(res.data.message);
1833
1833
  }
1834
- reject();
1835
1834
  }
1836
1835
  })["catch"](function (err) {
1837
1836
  var _err$response5;
@@ -7441,6 +7440,121 @@ var BulkDownloadIcon = function BulkDownloadIcon(props) {
7441
7440
  }));
7442
7441
  };
7443
7442
 
7443
+ var classes = {"containedBtn":"_2A4_u","customMiniBox":"_QGIKG","muiBtn":"_3iFbO","outlinedBtn":"_3lQYD","menuList":"_1C8bJ","menuListContainer":"_1N83W","menuItemContainer":"_3VtcE","menuItemtext":"_2xqnU","subTxt":"_3CVzX"};
7444
+
7445
+ var DropdownBtn = function DropdownBtn(props) {
7446
+ var _clsx;
7447
+ var _props$buttonText = props.buttonText,
7448
+ buttonText = _props$buttonText === void 0 ? '' : _props$buttonText,
7449
+ _props$disableRipple = props.disableRipple,
7450
+ disableRipple = _props$disableRipple === void 0 ? true : _props$disableRipple,
7451
+ _props$onClickHandler = props.onClickHandler,
7452
+ onClickHandler = _props$onClickHandler === void 0 ? function () {} : _props$onClickHandler,
7453
+ _props$menuListInfo = props.menuListInfo,
7454
+ menuListInfo = _props$menuListInfo === void 0 ? [] : _props$menuListInfo,
7455
+ _props$endIcon = props.endIcon,
7456
+ endIcon = _props$endIcon === void 0 ? /*#__PURE__*/React__default.createElement(ExpandMoreIcon, {
7457
+ width: "10",
7458
+ height: "10"
7459
+ }) : _props$endIcon,
7460
+ _props$outlinedBtn = props.outlinedBtn,
7461
+ outlinedBtn = _props$outlinedBtn === void 0 ? true : _props$outlinedBtn,
7462
+ _props$placement = props.placement,
7463
+ placement = _props$placement === void 0 ? 'auto-center' : _props$placement,
7464
+ className = props.className,
7465
+ menuListClass = props.menuListClass;
7466
+ var _React$useState = React__default.useState(false),
7467
+ open = _React$useState[0],
7468
+ setOpen = _React$useState[1];
7469
+ var anchorRef = React__default.useRef(null);
7470
+ var handleToggle = function handleToggle() {
7471
+ setOpen(function (prevOpen) {
7472
+ return !prevOpen;
7473
+ });
7474
+ };
7475
+ var handleClose = function handleClose(event) {
7476
+ if (anchorRef.current && anchorRef.current.contains(event.target)) {
7477
+ return;
7478
+ }
7479
+ setOpen(false);
7480
+ onClickHandler(event);
7481
+ };
7482
+ var handleListKeyDown = function handleListKeyDown(event) {
7483
+ if (event.key === 'Tab') {
7484
+ event.preventDefault();
7485
+ setOpen(false);
7486
+ }
7487
+ };
7488
+ var handleMenuClick = function handleMenuClick(val) {
7489
+ setOpen(false);
7490
+ if (val.disable) return false;
7491
+ if (val.handler && typeof val.handler === 'function') val.handler();
7492
+ };
7493
+
7494
+ var prevOpen = React__default.useRef(open);
7495
+ React__default.useEffect(function () {
7496
+ if (prevOpen.current === true && open === false) {
7497
+ anchorRef.current.focus();
7498
+ }
7499
+ prevOpen.current = open;
7500
+ }, [open]);
7501
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Button, {
7502
+ endIcon: endIcon,
7503
+ className: clsx(classes.muiBtn, className, (_clsx = {}, _clsx[classes.outlinedBtn] = outlinedBtn, _clsx)),
7504
+ disableRipple: disableRipple,
7505
+ variant: "outlined",
7506
+ ref: anchorRef,
7507
+ "aria-controls": open ? 'menu-list-grow' : undefined,
7508
+ "aria-haspopup": "true",
7509
+ onClick: handleToggle
7510
+ }, buttonText), /*#__PURE__*/React__default.createElement(core.Popper, {
7511
+ open: open,
7512
+ anchorEl: anchorRef.current,
7513
+ role: undefined,
7514
+ transition: true,
7515
+ disablePortal: true,
7516
+ style: {
7517
+ zIndex: '9'
7518
+ },
7519
+ placement: placement
7520
+ }, function (_ref) {
7521
+ var _clsx2;
7522
+ var TransitionProps = _ref.TransitionProps,
7523
+ placement = _ref.placement;
7524
+ return /*#__PURE__*/React__default.createElement(core.Grow, _extends({}, TransitionProps, {
7525
+ style: {
7526
+ transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom'
7527
+ }
7528
+ }), /*#__PURE__*/React__default.createElement(core.Paper, {
7529
+ className: classes.menuListContainer,
7530
+ elevation: 0
7531
+ }, /*#__PURE__*/React__default.createElement(core.ClickAwayListener, {
7532
+ onClickAway: handleClose
7533
+ }, /*#__PURE__*/React__default.createElement(core.MenuList, {
7534
+ autoFocusItem: open,
7535
+ className: clsx(classes.menuList, (_clsx2 = {}, _clsx2[classes.outlinedBtn] = outlinedBtn, _clsx2), menuListClass),
7536
+ id: "menu-list-grow",
7537
+ onKeyDown: function onKeyDown(e) {
7538
+ return handleListKeyDown(e);
7539
+ }
7540
+ }, menuListInfo.map(function (val, _i) {
7541
+ return /*#__PURE__*/React__default.createElement(core.MenuItem, {
7542
+ onClick: function onClick() {
7543
+ return handleMenuClick(val);
7544
+ },
7545
+ key: _i,
7546
+ className: clsx(classes.menuItemContainer, val.disable && 'iui__cursor-not-allowed'),
7547
+ disableRipple: true
7548
+ }, /*#__PURE__*/React__default.createElement(core.Typography, {
7549
+ className: clsx(classes.menuItemtext, val && val.disable && 'iui__opacity--60')
7550
+ }, val.label), val.subText && /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
7551
+ variant: "subtitle2",
7552
+ className: clsx(classes.menuItemtext, classes.subTxt)
7553
+ }, val.subText));
7554
+ })))));
7555
+ }));
7556
+ };
7557
+
7444
7558
  var AntSwitch = styles$8.withStyles(function (theme) {
7445
7559
  return {
7446
7560
  root: {
@@ -7681,7 +7795,7 @@ var StickyHeadTable = function StickyHeadTable(props) {
7681
7795
  style: {
7682
7796
  marginLeft: '50px'
7683
7797
  }
7684
- }, /*#__PURE__*/React__default.createElement(iuistyles.IUIDropdownButton, {
7798
+ }, /*#__PURE__*/React__default.createElement(DropdownBtn, {
7685
7799
  buttonText: /*#__PURE__*/React__default.createElement(MoreHorizIcon, {
7686
7800
  fontSize: "medium",
7687
7801
  color: "#6B7280"