@itilite/iui-user-management 0.0.8 → 0.0.9
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 +88 -62
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +88 -62
- package/dist/index.modern.js.map +1 -1
- package/package.json +5 -22
package/dist/index.modern.js
CHANGED
|
@@ -12,7 +12,6 @@ import { composeWithDevTools } from 'redux-devtools-extension';
|
|
|
12
12
|
import { useHistory } from 'react-router-dom';
|
|
13
13
|
import { withStyles } from '@material-ui/core/styles';
|
|
14
14
|
import Switch from '@material-ui/core/Switch';
|
|
15
|
-
import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core';
|
|
16
15
|
|
|
17
16
|
function _extends() {
|
|
18
17
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -4425,7 +4424,7 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
4425
4424
|
}))))));
|
|
4426
4425
|
};
|
|
4427
4426
|
|
|
4428
|
-
var styles$3 = {"root":"_b_muK","minWidth":"_3OQXs","bullet":"_1Q5vL","pos":"_6wGWA","cardHeader":"_SWCfJ","pageHeader":"_2ZeWp","buttonHover":"_2Iuy1","cardHeaderBackground":"_3NJWF"};
|
|
4427
|
+
var styles$3 = {"root":"_b_muK","minWidth":"_3OQXs","bullet":"_1Q5vL","pos":"_6wGWA","cardHeader":"_SWCfJ","pageHeader":"_2ZeWp","buttonHover":"_2Iuy1","cardHeaderBackground":"_3NJWF","actionCustom":"_3Kbfm"};
|
|
4429
4428
|
|
|
4430
4429
|
var VerificationError = function VerificationError(_ref) {
|
|
4431
4430
|
var config = _ref.config,
|
|
@@ -4448,8 +4447,8 @@ var VerificationError = function VerificationError(_ref) {
|
|
|
4448
4447
|
description: errMsg,
|
|
4449
4448
|
actionComponent: /*#__PURE__*/React.createElement(IUIButton, {
|
|
4450
4449
|
className: styles$3.buttonHover,
|
|
4451
|
-
buttonText: "
|
|
4452
|
-
|
|
4450
|
+
buttonText: "BACK TO HOMEPAGE",
|
|
4451
|
+
type: "outlined",
|
|
4453
4452
|
onClick: function onClick() {
|
|
4454
4453
|
return history.push(config.routes.fallbackUrl);
|
|
4455
4454
|
}
|
|
@@ -7476,31 +7475,35 @@ var BulkActionHistoryTable = function BulkActionHistoryTable(props) {
|
|
|
7476
7475
|
|
|
7477
7476
|
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-"};
|
|
7478
7477
|
|
|
7479
|
-
function SkeletonLoader() {
|
|
7480
|
-
|
|
7481
|
-
|
|
7478
|
+
function SkeletonLoader(_ref) {
|
|
7479
|
+
var _ref$data = _ref.data,
|
|
7480
|
+
data = _ref$data === void 0 ? [{
|
|
7481
|
+
variant: 'rect',
|
|
7482
|
+
height: 100,
|
|
7482
7483
|
style: {
|
|
7483
|
-
|
|
7484
|
+
top: 20,
|
|
7485
|
+
bottom: 20
|
|
7484
7486
|
}
|
|
7485
|
-
},
|
|
7486
|
-
variant:
|
|
7487
|
-
height: 120,
|
|
7488
|
-
style: {
|
|
7489
|
-
marginTop: 40,
|
|
7490
|
-
marginBottom: 20
|
|
7491
|
-
}
|
|
7492
|
-
}), /*#__PURE__*/React.createElement(IUISkeleton, {
|
|
7493
|
-
variant: "rect",
|
|
7487
|
+
}, {
|
|
7488
|
+
variant: 'rect',
|
|
7494
7489
|
height: 50,
|
|
7495
7490
|
style: {
|
|
7496
|
-
|
|
7491
|
+
bottom: 20
|
|
7497
7492
|
}
|
|
7498
|
-
}
|
|
7499
|
-
variant:
|
|
7493
|
+
}, {
|
|
7494
|
+
variant: 'rect',
|
|
7500
7495
|
height: 500,
|
|
7501
7496
|
style: {
|
|
7502
|
-
|
|
7497
|
+
bottom: 20
|
|
7503
7498
|
}
|
|
7499
|
+
}] : _ref$data;
|
|
7500
|
+
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
7501
|
+
className: styles$6.tablewrapper,
|
|
7502
|
+
style: {
|
|
7503
|
+
margin: 20
|
|
7504
|
+
}
|
|
7505
|
+
}, /*#__PURE__*/React.createElement(IUISkeleton, {
|
|
7506
|
+
data: data
|
|
7504
7507
|
}));
|
|
7505
7508
|
}
|
|
7506
7509
|
|
|
@@ -9274,7 +9277,7 @@ var PageHeader = function PageHeader() {
|
|
|
9274
9277
|
}));
|
|
9275
9278
|
};
|
|
9276
9279
|
|
|
9277
|
-
function
|
|
9280
|
+
function Table() {
|
|
9278
9281
|
var _useSelector = useSelector(function (state) {
|
|
9279
9282
|
return state.customFields;
|
|
9280
9283
|
}),
|
|
@@ -9287,41 +9290,51 @@ function CustomFieldsTable() {
|
|
|
9287
9290
|
dispatch(toggleModal(true));
|
|
9288
9291
|
};
|
|
9289
9292
|
|
|
9293
|
+
var columns = [{
|
|
9294
|
+
id: 'sno',
|
|
9295
|
+
label: '#',
|
|
9296
|
+
sortable: false,
|
|
9297
|
+
cell: function cell(row, i) {
|
|
9298
|
+
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
9299
|
+
component: "div"
|
|
9300
|
+
}, /*#__PURE__*/React.createElement(IUITypography, null, i + 1));
|
|
9301
|
+
}
|
|
9302
|
+
}, {
|
|
9303
|
+
id: 'name',
|
|
9304
|
+
label: 'Name',
|
|
9305
|
+
sortable: false,
|
|
9306
|
+
cell: function cell(row) {
|
|
9307
|
+
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
9308
|
+
component: "div"
|
|
9309
|
+
}, /*#__PURE__*/React.createElement(IUITypography, null, row.field_name));
|
|
9310
|
+
}
|
|
9311
|
+
}, {
|
|
9312
|
+
id: 'actions',
|
|
9313
|
+
label: 'Actions',
|
|
9314
|
+
align: 'left',
|
|
9315
|
+
cell: function cell(row) {
|
|
9316
|
+
return /*#__PURE__*/React.createElement(IUIButton, {
|
|
9317
|
+
buttonText: "Edit",
|
|
9318
|
+
onClick: function onClick() {
|
|
9319
|
+
return handleEdit(row);
|
|
9320
|
+
}
|
|
9321
|
+
});
|
|
9322
|
+
},
|
|
9323
|
+
style: {
|
|
9324
|
+
paddingLeft: '40px'
|
|
9325
|
+
}
|
|
9326
|
+
}];
|
|
9290
9327
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
9291
9328
|
className: styles$6.tablewrapper
|
|
9292
|
-
}, /*#__PURE__*/React.createElement(
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
width: "40%"
|
|
9302
|
-
}, "#"), /*#__PURE__*/React.createElement(TableCell, {
|
|
9303
|
-
width: "40%"
|
|
9304
|
-
}, "Name"), /*#__PURE__*/React.createElement(TableCell, {
|
|
9305
|
-
width: "20%",
|
|
9306
|
-
style: {
|
|
9307
|
-
paddingLeft: '3%'
|
|
9308
|
-
}
|
|
9309
|
-
}, "Action"))), /*#__PURE__*/React.createElement(TableBody, null, data.length === 0 ? /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableCell, null), /*#__PURE__*/React.createElement(TableCell, null, /*#__PURE__*/React.createElement(IUIBox, {
|
|
9310
|
-
className: styles$6.emptyData
|
|
9311
|
-
}, "No data available")), /*#__PURE__*/React.createElement(TableCell, null)) : data.map(function (row, i) {
|
|
9312
|
-
return /*#__PURE__*/React.createElement(TableRow, {
|
|
9313
|
-
key: row.id.toString()
|
|
9314
|
-
}, /*#__PURE__*/React.createElement(TableCell, {
|
|
9315
|
-
align: "left"
|
|
9316
|
-
}, i + 1), /*#__PURE__*/React.createElement(TableCell, null, row.field_name), /*#__PURE__*/React.createElement(TableCell, {
|
|
9317
|
-
className: styles$6.actionButtons
|
|
9318
|
-
}, /*#__PURE__*/React.createElement(IUIButton, {
|
|
9319
|
-
buttonText: "Edit",
|
|
9320
|
-
onClick: function onClick() {
|
|
9321
|
-
return handleEdit(row);
|
|
9322
|
-
}
|
|
9323
|
-
})));
|
|
9324
|
-
})))));
|
|
9329
|
+
}, /*#__PURE__*/React.createElement(IUITable, {
|
|
9330
|
+
hasFilter: false,
|
|
9331
|
+
isCheckboxTable: false,
|
|
9332
|
+
columns: columns,
|
|
9333
|
+
rows: data,
|
|
9334
|
+
count: data.length,
|
|
9335
|
+
searchHide: true,
|
|
9336
|
+
hidePagination: true
|
|
9337
|
+
}));
|
|
9325
9338
|
}
|
|
9326
9339
|
|
|
9327
9340
|
var env$9 = configs.env;
|
|
@@ -9337,27 +9350,40 @@ var CustomFields$1 = function CustomFields(_ref) {
|
|
|
9337
9350
|
}),
|
|
9338
9351
|
isTokenVerified = _useSelector.isTokenVerified;
|
|
9339
9352
|
|
|
9340
|
-
var
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
loading = _useSelector2.loading;
|
|
9353
|
+
var _useState = useState(true),
|
|
9354
|
+
loading = _useState[0],
|
|
9355
|
+
setLoading = _useState[1];
|
|
9344
9356
|
|
|
9345
9357
|
useEffect(function () {
|
|
9346
|
-
|
|
9358
|
+
setLoading(true);
|
|
9347
9359
|
var roleCanAccess = ['travel_itilite_admin', 'travel_admin', 'expense_itilite_admin', 'expense_admin'];
|
|
9348
9360
|
dispatch(verifyAccessToken(roleCanAccess));
|
|
9349
9361
|
}, []);
|
|
9350
9362
|
useEffect(function () {
|
|
9351
9363
|
if (isTokenVerified) {
|
|
9352
9364
|
dispatch(fetchCustomFields())["finally"](function () {
|
|
9353
|
-
|
|
9365
|
+
setLoading(false);
|
|
9354
9366
|
});
|
|
9355
9367
|
}
|
|
9356
9368
|
}, [isTokenVerified]);
|
|
9357
9369
|
return /*#__PURE__*/React.createElement(IUIBox, {
|
|
9358
9370
|
component: "div",
|
|
9359
9371
|
className: styles$6.UUICustomFields
|
|
9360
|
-
}, /*#__PURE__*/React.createElement(PageHeader, null), loading ? /*#__PURE__*/React.createElement(SkeletonLoader,
|
|
9372
|
+
}, /*#__PURE__*/React.createElement(PageHeader, null), loading ? /*#__PURE__*/React.createElement(SkeletonLoader, {
|
|
9373
|
+
data: [{
|
|
9374
|
+
variant: 'rect',
|
|
9375
|
+
height: 50,
|
|
9376
|
+
style: {
|
|
9377
|
+
bottom: 20
|
|
9378
|
+
}
|
|
9379
|
+
}, {
|
|
9380
|
+
variant: 'rect',
|
|
9381
|
+
height: 500,
|
|
9382
|
+
style: {
|
|
9383
|
+
bottom: 20
|
|
9384
|
+
}
|
|
9385
|
+
}]
|
|
9386
|
+
}) : /*#__PURE__*/React.createElement(Table, null));
|
|
9361
9387
|
};
|
|
9362
9388
|
|
|
9363
9389
|
var index$4 = withStore(CustomFields$1);
|