@itilite/iui-user-management 0.0.8 → 0.0.10
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 +5 -1
- package/dist/index.js +94 -67
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +94 -67
- package/dist/index.modern.js.map +1 -1
- package/package.json +5 -22
package/dist/index.css
CHANGED
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
._2Iuy1 {
|
|
366
|
-
|
|
366
|
+
padding-left: 10px;
|
|
367
367
|
}
|
|
368
368
|
._2Iuy1:hover {
|
|
369
369
|
background-color: rgba(229, 228, 228, 0.231372549) !important;
|
|
@@ -374,6 +374,10 @@
|
|
|
374
374
|
border-radius: 20px;
|
|
375
375
|
color: white;
|
|
376
376
|
}
|
|
377
|
+
|
|
378
|
+
._3Kbfm {
|
|
379
|
+
padding: 0px;
|
|
380
|
+
}
|
|
377
381
|
._2LqsB {
|
|
378
382
|
background-color: #ffffff;
|
|
379
383
|
}
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,6 @@ var reduxDevtoolsExtension = require('redux-devtools-extension');
|
|
|
15
15
|
var reactRouterDom = require('react-router-dom');
|
|
16
16
|
var styles$8 = require('@material-ui/core/styles');
|
|
17
17
|
var Switch = _interopDefault(require('@material-ui/core/Switch'));
|
|
18
|
-
var core = require('@material-ui/core');
|
|
19
18
|
|
|
20
19
|
function _extends() {
|
|
21
20
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -4428,7 +4427,7 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
4428
4427
|
}))))));
|
|
4429
4428
|
};
|
|
4430
4429
|
|
|
4431
|
-
var styles$3 = {"root":"_b_muK","minWidth":"_3OQXs","bullet":"_1Q5vL","pos":"_6wGWA","cardHeader":"_SWCfJ","pageHeader":"_2ZeWp","buttonHover":"_2Iuy1","cardHeaderBackground":"_3NJWF"};
|
|
4430
|
+
var styles$3 = {"root":"_b_muK","minWidth":"_3OQXs","bullet":"_1Q5vL","pos":"_6wGWA","cardHeader":"_SWCfJ","pageHeader":"_2ZeWp","buttonHover":"_2Iuy1","cardHeaderBackground":"_3NJWF","actionCustom":"_3Kbfm"};
|
|
4432
4431
|
|
|
4433
4432
|
var VerificationError = function VerificationError(_ref) {
|
|
4434
4433
|
var config = _ref.config,
|
|
@@ -4451,8 +4450,8 @@ var VerificationError = function VerificationError(_ref) {
|
|
|
4451
4450
|
description: errMsg,
|
|
4452
4451
|
actionComponent: /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
4453
4452
|
className: styles$3.buttonHover,
|
|
4454
|
-
buttonText: "
|
|
4455
|
-
|
|
4453
|
+
buttonText: "BACK TO HOMEPAGE",
|
|
4454
|
+
type: "outlined",
|
|
4456
4455
|
onClick: function onClick() {
|
|
4457
4456
|
return history.push(config.routes.fallbackUrl);
|
|
4458
4457
|
}
|
|
@@ -7479,31 +7478,35 @@ var BulkActionHistoryTable = function BulkActionHistoryTable(props) {
|
|
|
7479
7478
|
|
|
7480
7479
|
var styles$6 = {"UUICustomFields":"_tdVCY","pageHeader":"_8iQvL","buttonWrapper":"_2k_GJ","headingWrapper":"_1rYVz","heading":"_2nxXO","headingLarge":"_2auvl","headingMedium":"_Wjaw1","headingSmall":"_1UmTe","description":"_2BS2i","headerText":"_3SZ_X","letterImage":"_2AwAF","tablewrapper":"_3qSxj","rowText":"_2ZSw6","textTransform":"_1F6ss","lightColor":"_2Wjom","importModalBodyContainer":"_2JCWP","dividerColor":"_3EsJG","downloadTemplateContainer":"_2uRic","downloadTemplateDescContainer":"_55kg5","labelContainer":"_78mCn","downlTempHeader":"_lqUA2","downlTempDescription":"_1vT5l","colGap":"_1x_9W","tableHead":"_5SygC","actionButtons":"_3PeqN","emptyData":"_1bHs-"};
|
|
7481
7480
|
|
|
7482
|
-
function SkeletonLoader() {
|
|
7483
|
-
|
|
7484
|
-
|
|
7481
|
+
function SkeletonLoader(_ref) {
|
|
7482
|
+
var _ref$data = _ref.data,
|
|
7483
|
+
data = _ref$data === void 0 ? [{
|
|
7484
|
+
variant: 'rect',
|
|
7485
|
+
height: 100,
|
|
7485
7486
|
style: {
|
|
7486
|
-
|
|
7487
|
+
top: 20,
|
|
7488
|
+
bottom: 20
|
|
7487
7489
|
}
|
|
7488
|
-
},
|
|
7489
|
-
variant:
|
|
7490
|
-
height: 120,
|
|
7491
|
-
style: {
|
|
7492
|
-
marginTop: 40,
|
|
7493
|
-
marginBottom: 20
|
|
7494
|
-
}
|
|
7495
|
-
}), /*#__PURE__*/React__default.createElement(iuistyles.IUISkeleton, {
|
|
7496
|
-
variant: "rect",
|
|
7490
|
+
}, {
|
|
7491
|
+
variant: 'rect',
|
|
7497
7492
|
height: 50,
|
|
7498
7493
|
style: {
|
|
7499
|
-
|
|
7494
|
+
bottom: 20
|
|
7500
7495
|
}
|
|
7501
|
-
}
|
|
7502
|
-
variant:
|
|
7496
|
+
}, {
|
|
7497
|
+
variant: 'rect',
|
|
7503
7498
|
height: 500,
|
|
7504
7499
|
style: {
|
|
7505
|
-
|
|
7500
|
+
bottom: 20
|
|
7506
7501
|
}
|
|
7502
|
+
}] : _ref$data;
|
|
7503
|
+
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
7504
|
+
className: styles$6.tablewrapper,
|
|
7505
|
+
style: {
|
|
7506
|
+
margin: 20
|
|
7507
|
+
}
|
|
7508
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUISkeleton, {
|
|
7509
|
+
data: data
|
|
7507
7510
|
}));
|
|
7508
7511
|
}
|
|
7509
7512
|
|
|
@@ -7813,7 +7816,8 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
7813
7816
|
_props$isDataFetching = props.isDataFetching,
|
|
7814
7817
|
isDataFetching = _props$isDataFetching === void 0 ? false : _props$isDataFetching,
|
|
7815
7818
|
_props$disableRowChec = props.disableRowCheckbox,
|
|
7816
|
-
disableRowCheckbox = _props$disableRowChec === void 0 ? false : _props$disableRowChec
|
|
7819
|
+
disableRowCheckbox = _props$disableRowChec === void 0 ? false : _props$disableRowChec,
|
|
7820
|
+
searchValue = props.searchValue;
|
|
7817
7821
|
|
|
7818
7822
|
var getFirstLetterofName = function getFirstLetterofName(firstName, lastName) {
|
|
7819
7823
|
return firstName.charAt(0).toUpperCase() + lastName.charAt(0).toUpperCase();
|
|
@@ -7959,7 +7963,8 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
7959
7963
|
onSearchHandler: onSearchHandler,
|
|
7960
7964
|
isDataFetching: isDataFetching,
|
|
7961
7965
|
disableRowCheckbox: disableRowCheckbox,
|
|
7962
|
-
searchBoxWidth: "400px"
|
|
7966
|
+
searchBoxWidth: "400px",
|
|
7967
|
+
searchValue: searchValue
|
|
7963
7968
|
});
|
|
7964
7969
|
};
|
|
7965
7970
|
|
|
@@ -8117,8 +8122,6 @@ var UserList = function UserList(_ref) {
|
|
|
8117
8122
|
var handleSingleCheckBoxClick = function handleSingleCheckBoxClick(event, id, page) {
|
|
8118
8123
|
var _extends4;
|
|
8119
8124
|
|
|
8120
|
-
console.log('test');
|
|
8121
|
-
|
|
8122
8125
|
var selectedTemp = _extends({}, selected);
|
|
8123
8126
|
|
|
8124
8127
|
if (!(page in selectedTemp)) {
|
|
@@ -8367,7 +8370,8 @@ var UserList = function UserList(_ref) {
|
|
|
8367
8370
|
onRequestSort: onRequestSort,
|
|
8368
8371
|
onSearchHandler: onSearchHandler,
|
|
8369
8372
|
onEditHandler: handleEditUserClick,
|
|
8370
|
-
disableRowCheckbox: deactivatedUsers
|
|
8373
|
+
disableRowCheckbox: deactivatedUsers,
|
|
8374
|
+
searchValue: searchValue
|
|
8371
8375
|
}))), /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
8372
8376
|
isOpen: Object.values(selected).flat().length > 0 && isOpenDeActivateModal,
|
|
8373
8377
|
closeHandler: closeDeActivateModal,
|
|
@@ -9277,7 +9281,7 @@ var PageHeader = function PageHeader() {
|
|
|
9277
9281
|
}));
|
|
9278
9282
|
};
|
|
9279
9283
|
|
|
9280
|
-
function
|
|
9284
|
+
function Table() {
|
|
9281
9285
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
9282
9286
|
return state.customFields;
|
|
9283
9287
|
}),
|
|
@@ -9290,41 +9294,51 @@ function CustomFieldsTable() {
|
|
|
9290
9294
|
dispatch(toggleModal(true));
|
|
9291
9295
|
};
|
|
9292
9296
|
|
|
9297
|
+
var columns = [{
|
|
9298
|
+
id: 'sno',
|
|
9299
|
+
label: '#',
|
|
9300
|
+
sortable: false,
|
|
9301
|
+
cell: function cell(row, i) {
|
|
9302
|
+
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9303
|
+
component: "div"
|
|
9304
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, null, i + 1));
|
|
9305
|
+
}
|
|
9306
|
+
}, {
|
|
9307
|
+
id: 'name',
|
|
9308
|
+
label: 'Name',
|
|
9309
|
+
sortable: false,
|
|
9310
|
+
cell: function cell(row) {
|
|
9311
|
+
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9312
|
+
component: "div"
|
|
9313
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, null, row.field_name));
|
|
9314
|
+
}
|
|
9315
|
+
}, {
|
|
9316
|
+
id: 'actions',
|
|
9317
|
+
label: 'Actions',
|
|
9318
|
+
align: 'left',
|
|
9319
|
+
cell: function cell(row) {
|
|
9320
|
+
return /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9321
|
+
buttonText: "Edit",
|
|
9322
|
+
onClick: function onClick() {
|
|
9323
|
+
return handleEdit(row);
|
|
9324
|
+
}
|
|
9325
|
+
});
|
|
9326
|
+
},
|
|
9327
|
+
style: {
|
|
9328
|
+
paddingLeft: '40px'
|
|
9329
|
+
}
|
|
9330
|
+
}];
|
|
9293
9331
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9294
9332
|
className: styles$6.tablewrapper
|
|
9295
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
width: "40%"
|
|
9305
|
-
}, "#"), /*#__PURE__*/React__default.createElement(core.TableCell, {
|
|
9306
|
-
width: "40%"
|
|
9307
|
-
}, "Name"), /*#__PURE__*/React__default.createElement(core.TableCell, {
|
|
9308
|
-
width: "20%",
|
|
9309
|
-
style: {
|
|
9310
|
-
paddingLeft: '3%'
|
|
9311
|
-
}
|
|
9312
|
-
}, "Action"))), /*#__PURE__*/React__default.createElement(core.TableBody, null, data.length === 0 ? /*#__PURE__*/React__default.createElement(core.TableRow, null, /*#__PURE__*/React__default.createElement(core.TableCell, null), /*#__PURE__*/React__default.createElement(core.TableCell, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9313
|
-
className: styles$6.emptyData
|
|
9314
|
-
}, "No data available")), /*#__PURE__*/React__default.createElement(core.TableCell, null)) : data.map(function (row, i) {
|
|
9315
|
-
return /*#__PURE__*/React__default.createElement(core.TableRow, {
|
|
9316
|
-
key: row.id.toString()
|
|
9317
|
-
}, /*#__PURE__*/React__default.createElement(core.TableCell, {
|
|
9318
|
-
align: "left"
|
|
9319
|
-
}, i + 1), /*#__PURE__*/React__default.createElement(core.TableCell, null, row.field_name), /*#__PURE__*/React__default.createElement(core.TableCell, {
|
|
9320
|
-
className: styles$6.actionButtons
|
|
9321
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9322
|
-
buttonText: "Edit",
|
|
9323
|
-
onClick: function onClick() {
|
|
9324
|
-
return handleEdit(row);
|
|
9325
|
-
}
|
|
9326
|
-
})));
|
|
9327
|
-
})))));
|
|
9333
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITable, {
|
|
9334
|
+
hasFilter: false,
|
|
9335
|
+
isCheckboxTable: false,
|
|
9336
|
+
columns: columns,
|
|
9337
|
+
rows: data,
|
|
9338
|
+
count: data.length,
|
|
9339
|
+
searchHide: true,
|
|
9340
|
+
hidePagination: true
|
|
9341
|
+
}));
|
|
9328
9342
|
}
|
|
9329
9343
|
|
|
9330
9344
|
var env$9 = utils.configs.env;
|
|
@@ -9340,27 +9354,40 @@ var CustomFields$1 = function CustomFields(_ref) {
|
|
|
9340
9354
|
}),
|
|
9341
9355
|
isTokenVerified = _useSelector.isTokenVerified;
|
|
9342
9356
|
|
|
9343
|
-
var
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
loading = _useSelector2.loading;
|
|
9357
|
+
var _useState = React.useState(true),
|
|
9358
|
+
loading = _useState[0],
|
|
9359
|
+
setLoading = _useState[1];
|
|
9347
9360
|
|
|
9348
9361
|
React.useEffect(function () {
|
|
9349
|
-
|
|
9362
|
+
setLoading(true);
|
|
9350
9363
|
var roleCanAccess = ['travel_itilite_admin', 'travel_admin', 'expense_itilite_admin', 'expense_admin'];
|
|
9351
9364
|
dispatch(verifyAccessToken(roleCanAccess));
|
|
9352
9365
|
}, []);
|
|
9353
9366
|
React.useEffect(function () {
|
|
9354
9367
|
if (isTokenVerified) {
|
|
9355
9368
|
dispatch(fetchCustomFields())["finally"](function () {
|
|
9356
|
-
|
|
9369
|
+
setLoading(false);
|
|
9357
9370
|
});
|
|
9358
9371
|
}
|
|
9359
9372
|
}, [isTokenVerified]);
|
|
9360
9373
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9361
9374
|
component: "div",
|
|
9362
9375
|
className: styles$6.UUICustomFields
|
|
9363
|
-
}, /*#__PURE__*/React__default.createElement(PageHeader, null), loading ? /*#__PURE__*/React__default.createElement(SkeletonLoader,
|
|
9376
|
+
}, /*#__PURE__*/React__default.createElement(PageHeader, null), loading ? /*#__PURE__*/React__default.createElement(SkeletonLoader, {
|
|
9377
|
+
data: [{
|
|
9378
|
+
variant: 'rect',
|
|
9379
|
+
height: 50,
|
|
9380
|
+
style: {
|
|
9381
|
+
bottom: 20
|
|
9382
|
+
}
|
|
9383
|
+
}, {
|
|
9384
|
+
variant: 'rect',
|
|
9385
|
+
height: 500,
|
|
9386
|
+
style: {
|
|
9387
|
+
bottom: 20
|
|
9388
|
+
}
|
|
9389
|
+
}]
|
|
9390
|
+
}) : /*#__PURE__*/React__default.createElement(Table, null));
|
|
9364
9391
|
};
|
|
9365
9392
|
|
|
9366
9393
|
var index$4 = withStore(CustomFields$1);
|