@itilite/iui-user-management 1.4.962 → 1.4.963-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,7 +184,17 @@ function _finallyRethrows(body, finalizer) {
184
184
 
185
185
  var styles = {"UUIUserManagementAddEdit":"_3n-WG","pageHeader":"_3qWcA","buttonWrapper":"_1IP9P","scrolled":"_m8f96","headingButtonWrapper":"_w9z7b","headingButtonWrapperProfile":"_12Wd9","hintText":"_ySdbZ","heading":"_2Y1Aw","headingLarge":"_2K1NF","headingMedium":"_RUuAz","headingSmall":"_23Dye","additionalInfoContainer":"_1Suhw","additionalInfoTitle":"_56iJF","titleContainer":"_H5nfl","expandIconAlign":"_3F4i0","detailsContainer":"_2G0LW","formWrapper":"_2fPRc","sectionWrapper":"_37Gqp","margin":"_2Sdl7","minGridWidth":"_2D7iu","firstRowMargin":"_1BozG","firstChildMargin":"_2C3Mb","paddingTop":"_DBPjV","backGrdColorOnHover":"_5oE6H","fieldMargin":"_RCWjq","productContainerGap":"_tuCbi","containerWidth":"_1oWos","productItemBroder":"_T0Hcd","headingPadding":"_2MFfQ","emptyFieldContainer":"_3VWtw","emptyFieldDescription":"_2jC5u","rowGap":"_1NJFY","formTitle":"_GAKk2","formDescription":"_3TZ6Z","themeLink":"_eJ_1B","dashedLine":"_3ZOs1","dividerColor":"_2pxEJ","errorTextCls":"_27eth","backdrop":"_Pm0Au","inputWidth":"_ajB82","buttonRight":"_1lEyQ","containedDropdownBtn":"_3ymE1"};
186
186
 
187
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
187
+ function r(e) {
188
+ var t,
189
+ f,
190
+ n = "";
191
+ if ("string" == typeof e || "number" == typeof e) n += e;else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);else for (t in e) e[t] && (n && (n += " "), n += t);
192
+ return n;
193
+ }
194
+ function clsx() {
195
+ for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
196
+ return n;
197
+ }
188
198
 
189
199
  var GetInputType = React.forwardRef(function (props, ref) {
190
200
  var _p = props._p,
@@ -2821,7 +2831,6 @@ var CardsManagement = function CardsManagement(_ref) {
2821
2831
  var timeDiff = cardExpDate.getTime() - currentDate.getTime();
2822
2832
  var daysToExpire = Math.ceil(timeDiff / (1000 * 3600 * 24));
2823
2833
  var expiresSoon = daysToExpire <= 30 && !isExpired;
2824
- var showMenuButton = cardsCount === 1 || cardsCount > 1 && !isDefaultCard;
2825
2834
  return /*#__PURE__*/React.createElement("div", {
2826
2835
  key: card.id,
2827
2836
  className: clsx(classes.card, classes[cardClass], (_clsx = {}, _clsx[classes.disabledCard] = isDisabled, _clsx))
@@ -2841,7 +2850,7 @@ var CardsManagement = function CardsManagement(_ref) {
2841
2850
  className: classes.cardType
2842
2851
  }, getCardTypeLabel(card.category), isDefaultCard && /*#__PURE__*/React.createElement("span", null, ' (Default)'))), isCompanyCard ? /*#__PURE__*/React.createElement(LockIcon, {
2843
2852
  className: classes.lockIcon
2844
- }) : showMenuButton ? /*#__PURE__*/React.createElement(IconButton, {
2853
+ }) : /*#__PURE__*/React.createElement(IconButton, {
2845
2854
  size: "small",
2846
2855
  onClick: function onClick(e) {
2847
2856
  return handleMenuClick(e, card);
@@ -2850,7 +2859,7 @@ var CardsManagement = function CardsManagement(_ref) {
2850
2859
  }, /*#__PURE__*/React.createElement(MoreIcon, {
2851
2860
  className: clsx(classes.moreIcon, classes[cardClass]),
2852
2861
  color: isCompanyCard ? '#2EA363' : '#3D89FF'
2853
- })) : null), /*#__PURE__*/React.createElement("div", {
2862
+ })) ), /*#__PURE__*/React.createElement("div", {
2854
2863
  className: classes.cardDetails
2855
2864
  }, /*#__PURE__*/React.createElement("div", {
2856
2865
  className: classes.cardNumber
@@ -10688,9 +10697,11 @@ var UndoButton = function UndoButton(_ref) {
10688
10697
  }, "UNDO"));
10689
10698
  };
10690
10699
  var UserList = function UserList(_ref2) {
10700
+ var _config$features;
10691
10701
  var config = _ref2.config,
10692
10702
  isProfile = _ref2.isProfile;
10693
10703
  env$7.init(config, isProfile);
10704
+ var hideSignupRequestsTab = !!(config !== null && config !== void 0 && (_config$features = config.features) !== null && _config$features !== void 0 && _config$features.hideSignupRequestsTab);
10694
10705
  var history = useHistory();
10695
10706
  var _useSelector = useSelector(function (state) {
10696
10707
  return state.userList;
@@ -11291,6 +11302,10 @@ var UserList = function UserList(_ref2) {
11291
11302
  if (!isSearchingChange && !isSortingChange && !isSignUpSearchingChange && !isSignUpSortingChange) {
11292
11303
  dispatch(showDataFetchingStatus());
11293
11304
  dispatch(fetchUsersList(url)).then(function () {
11305
+ if (hideSignupRequestsTab) {
11306
+ dispatch(stopDataFetchingStatus());
11307
+ return;
11308
+ }
11294
11309
  dispatch(fetchUserSignupRequests({
11295
11310
  ordering: signup_order === 'asc' ? signup_orderBy : "-" + signup_orderBy,
11296
11311
  length: signup_rowsPerPage,
@@ -11344,6 +11359,38 @@ var UserList = function UserList(_ref2) {
11344
11359
  onClick: handleAddPageNavigation
11345
11360
  })));
11346
11361
  };
11362
+ var currentUsersPanel = /*#__PURE__*/React.createElement(IUIBox, {
11363
+ style: {
11364
+ marginLeft: '-17px'
11365
+ }
11366
+ }, /*#__PURE__*/React.createElement(IUIBox, {
11367
+ component: "div",
11368
+ className: styles$6.headingWrapper
11369
+ }, /*#__PURE__*/React.createElement(IUITypography, {
11370
+ variant: "body2",
11371
+ className: clsx(styles$6.description)
11372
+ }, "Create new users, customize user permissions and manage user accounts")), /*#__PURE__*/React.createElement(StickyHeadTable, {
11373
+ data: userListInfo,
11374
+ handleChangeRowsPerPage: handleChangeRowsPerPage,
11375
+ handleChangePage: handleChangePage,
11376
+ page: page,
11377
+ rowsPerPage: rowsPerPage,
11378
+ handleActiveUser: handleActiveUser,
11379
+ handleSelectAllClick: handleSelectAllClick,
11380
+ selected: selected,
11381
+ handleSingleCheckBoxClick: handleSingleCheckBoxClick,
11382
+ orderBy: orderBy,
11383
+ order: order,
11384
+ onRequestSort: onRequestSort,
11385
+ onSearchHandler: onSearchHandler,
11386
+ onEditHandler: handleEditUserClick,
11387
+ disableRowCheckbox: deactivatedUsers,
11388
+ searchValue: searchValue,
11389
+ isILadmin: isILadmin,
11390
+ onPrimaryAdminHandler: onPrimaryAdminHandler,
11391
+ onResetPasswordHandler: onResetPasswordHandler,
11392
+ toggleInviteModal: toggleInviteModal
11393
+ }));
11347
11394
  return /*#__PURE__*/React.createElement(IUIBox, {
11348
11395
  component: "div",
11349
11396
  className: styles$6.UUIUserManagementList
@@ -11418,7 +11465,7 @@ var UserList = function UserList(_ref2) {
11418
11465
  alignItems: "center"
11419
11466
  })), /*#__PURE__*/React.createElement(IUIBox, {
11420
11467
  className: styles$6.tablewrapper
11421
- }, /*#__PURE__*/React.createElement(IUITabs, {
11468
+ }, hideSignupRequestsTab ? currentUsersPanel : /*#__PURE__*/React.createElement(IUITabs, {
11422
11469
  value: tabValue,
11423
11470
  customTabHandler: function customTabHandler(value) {
11424
11471
  return dispatch(updateTabValue(value));
@@ -11428,38 +11475,7 @@ var UserList = function UserList(_ref2) {
11428
11475
  label: /*#__PURE__*/React.createElement(IUIBox, null, "Current users", ' ', /*#__PURE__*/React.createElement(TabLabelCount, {
11429
11476
  count: userListInfo.count
11430
11477
  }), ' '),
11431
- content: /*#__PURE__*/React.createElement(IUIBox, {
11432
- style: {
11433
- marginLeft: '-17px'
11434
- }
11435
- }, /*#__PURE__*/React.createElement(IUIBox, {
11436
- component: "div",
11437
- className: styles$6.headingWrapper
11438
- }, /*#__PURE__*/React.createElement(IUITypography, {
11439
- variant: "body2",
11440
- className: clsx(styles$6.description)
11441
- }, "Create new users, customize user permissions and manage user accounts")), /*#__PURE__*/React.createElement(StickyHeadTable, {
11442
- data: userListInfo,
11443
- handleChangeRowsPerPage: handleChangeRowsPerPage,
11444
- handleChangePage: handleChangePage,
11445
- page: page,
11446
- rowsPerPage: rowsPerPage,
11447
- handleActiveUser: handleActiveUser,
11448
- handleSelectAllClick: handleSelectAllClick,
11449
- selected: selected,
11450
- handleSingleCheckBoxClick: handleSingleCheckBoxClick,
11451
- orderBy: orderBy,
11452
- order: order,
11453
- onRequestSort: onRequestSort,
11454
- onSearchHandler: onSearchHandler,
11455
- onEditHandler: handleEditUserClick,
11456
- disableRowCheckbox: deactivatedUsers,
11457
- searchValue: searchValue,
11458
- isILadmin: isILadmin,
11459
- onPrimaryAdminHandler: onPrimaryAdminHandler,
11460
- onResetPasswordHandler: onResetPasswordHandler,
11461
- toggleInviteModal: toggleInviteModal
11462
- }))
11478
+ content: currentUsersPanel
11463
11479
  }, {
11464
11480
  label: /*#__PURE__*/React.createElement(IUIBox, null, "Sign-up requests", ' ', /*#__PURE__*/React.createElement(TabLabelCount, {
11465
11481
  count: signupRequestListInfo.count