tenjin-ui-kit 0.3.72-dev → 0.3.72-dev-1
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/common/hooks/apiHooks.js +182 -114
- package/common/hooks/newApiHook.js +225 -143
- package/common/utils/security/index.js +2 -2
- package/common/utils/security/securityConfig.js +2 -1
- package/components/Canvas.js +88 -164
- package/components/DragBox/index.js +26 -21
- package/components/InputWithChip/index.js +57 -164
- package/components/RightContext/index.js +28 -19
- package/components/WorkFlow.js +23 -18
- package/components/WorkFlowBuilder.js +48 -33
- package/components/alert/Style.js +14 -11
- package/components/alert/index.js +12 -10
- package/components/attachment/index.js +28 -21
- package/components/authenticationProvider/AuthError.js +4 -3
- package/components/authenticationProvider/AuthLoader.js +4 -3
- package/components/authenticationProvider/index.js +116 -60
- package/components/avatar/index.js +14 -13
- package/components/avatar/styles.js +77 -74
- package/components/breadCrumbs/index.js +53 -42
- package/components/breadCrumbs/style.js +4 -1
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +5 -4
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +5 -4
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +6 -5
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
- package/components/browsingTestCaseLayout/index.js +30 -25
- package/components/button/index.js +43 -36
- package/components/chatBotModal/index.js +45 -36
- package/components/checkBox/index.js +9 -8
- package/components/combobox/index.js +72 -51
- package/components/divider/index.js +18 -14
- package/components/editableField/index.js +28 -19
- package/components/error/index.js +12 -6
- package/components/errorBoundary/index.js +94 -74
- package/components/fileUploader/index.js +35 -30
- package/components/fileUploader/style.js +49 -46
- package/components/filter/ValueSelector.js +210 -137
- package/components/filter/index.js +39 -29
- package/components/iconButton/index.js +4 -3
- package/components/input/index.js +38 -31
- package/components/layout/index.js +31 -27
- package/components/layout/main/index.js +13 -10
- package/components/layout/main/style.js +14 -11
- package/components/layout/pageContent/index.js +7 -6
- package/components/layout/sidebar/FlatMenu.js +43 -43
- package/components/layout/sidebar/GroupedIconMenu.js +108 -95
- package/components/layout/sidebar/GroupedMenu.js +48 -38
- package/components/layout/sidebar/ProjectMenu.js +116 -109
- package/components/layout/sidebar/index.js +18 -15
- package/components/layout/sidebar/style.js +143 -138
- package/components/layout/topBar/ProjectTopbar.js +138 -104
- package/components/layout/topBar/UserAvatar.js +60 -51
- package/components/layout/topBar/index.js +33 -22
- package/components/loader/index.js +12 -9
- package/components/menu/index.js +35 -26
- package/components/modal/Modal.js +6 -5
- package/components/modal/index.js +13 -10
- package/components/modal/style.js +56 -53
- package/components/optionMenu/index.js +41 -34
- package/components/pagination/index.js +39 -24
- package/components/pagination/style.js +28 -25
- package/components/paginationUpdated/index.js +16 -14
- package/components/paper/index.js +16 -15
- package/components/paper/style.js +27 -24
- package/components/reactSelect/index.js +63 -46
- package/components/reactSelect/style.js +150 -117
- package/components/richTextEditor/index.js +44 -25
- package/components/select/GroupedSelect.js +61 -45
- package/components/select/SimpleSelect.js +82 -52
- package/components/select/index.js +54 -38
- package/components/simpleSelect/index.js +15 -12
- package/components/sort/index.js +22 -19
- package/components/switch/index.js +11 -10
- package/components/switch/style.js +32 -29
- package/components/switch/switch.js +23 -17
- package/components/table/ReactTable.js +71 -54
- package/components/table/SimpleTable.js +78 -59
- package/components/table/index.js +186 -311
- package/components/text/index.js +17 -15
- package/components/timeStamp/index.js +9 -4
- package/components/timeStamp/style.js +15 -12
- package/components/topBar/index.js +92 -85
- package/components/tree/index.js +47 -29
- package/components/tree/style.js +23 -20
- package/components/valuePicker/ValueSelector.js +138 -70
- package/components/valuePicker/index.js +26 -19
- package/components/wrapperLayout/layout/index.js +5 -4
- package/components/wrapperLayout/main/index.js +5 -4
- package/components/wrapperLayout/main/pageContainer/index.js +5 -4
- package/components/wrapperLayout/main/sideBar/index.js +110 -120
- package/components/wrapperLayout/main/sideBar/style.js +183 -177
- package/components/wrapperLayout/topBar/UserAvatar.js +5 -4
- package/components/wrapperLayout/topBar/avatar.js +12 -10
- package/components/wrapperLayout/topBar/index.js +97 -111
- package/components/wrapperLayout/topBar/menuIcon.js +5 -4
- package/components/wrapperLayout/topBar/style.js +64 -61
- package/http/index.js +184 -91
- package/index.js +55 -53
- package/package.json +2 -4
- package/templates/listPage/index.js +57 -36
- package/themes/default.js +7 -5
- package/themes/defaultSmall.js +3 -2
- package/themes/responsiveTheme.js +8 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -8,15 +9,16 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
9
|
var _material = require("@mui/material");
|
|
9
10
|
var _fi = require("react-icons/fi");
|
|
10
11
|
var _text = _interopRequireDefault(require("../text"));
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function
|
|
13
|
-
function
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
16
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
function _unsupportedIterableToArray(
|
|
16
|
-
function _arrayLikeToArray(
|
|
17
|
-
function _iterableToArrayLimit(
|
|
18
|
-
function _arrayWithHoles(
|
|
19
|
-
|
|
17
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
var ITEM_HEIGHT = 500;
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
*
|
|
@@ -45,22 +47,22 @@ const ITEM_HEIGHT = 500;
|
|
|
45
47
|
* @returns An option component
|
|
46
48
|
*/
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
var OptionMenu = function OptionMenu(_ref) {
|
|
51
|
+
var options = _ref.options,
|
|
50
52
|
_ref$optionId = _ref.optionId,
|
|
51
53
|
optionId = _ref$optionId === void 0 ? null : _ref$optionId;
|
|
52
|
-
|
|
54
|
+
var _React$useState = _react.default.useState(null),
|
|
53
55
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
54
56
|
anchorEl = _React$useState2[0],
|
|
55
57
|
setAnchorEl = _React$useState2[1];
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
var open = Boolean(anchorEl);
|
|
59
|
+
var handleClick = function handleClick(event) {
|
|
58
60
|
setAnchorEl(event.currentTarget);
|
|
59
61
|
};
|
|
60
|
-
|
|
62
|
+
var handleClose = function handleClose() {
|
|
61
63
|
setAnchorEl(null);
|
|
62
64
|
};
|
|
63
|
-
|
|
65
|
+
var handleMenuItemClick = function handleMenuItemClick(callback) {
|
|
64
66
|
handleClose();
|
|
65
67
|
callback();
|
|
66
68
|
};
|
|
@@ -83,23 +85,28 @@ const OptionMenu = _ref => {
|
|
|
83
85
|
width: "27ch"
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
|
-
}, options === null || options === void 0 ? void 0 : options.map((option, index)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
}, options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
key: option.name
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
92
|
+
disabled: option.visibility === false,
|
|
93
|
+
onClick: function onClick() {
|
|
94
|
+
handleMenuItemClick(function () {
|
|
95
|
+
return option === null || option === void 0 ? void 0 : option.onClick(option.name, optionId);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
99
|
+
container: true,
|
|
100
|
+
alignItems: "center"
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, option.icon && /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
102
|
+
mr: 1
|
|
103
|
+
}, option.icon)), /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
104
|
+
style: {
|
|
105
|
+
display: "flex",
|
|
106
|
+
flexWrap: "wrap"
|
|
107
|
+
}
|
|
108
|
+
}, option === null || option === void 0 ? void 0 : option.displayName))), option.divider && index < options.length - 1 && /*#__PURE__*/_react.default.createElement(_material.Divider, null));
|
|
109
|
+
}))));
|
|
104
110
|
};
|
|
105
|
-
var _default =
|
|
111
|
+
var _default = OptionMenu;
|
|
112
|
+
exports.default = _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -12,45 +13,54 @@ var _material = require("@mui/material");
|
|
|
12
13
|
var _style = _interopRequireDefault(require("./style"));
|
|
13
14
|
var _default2 = _interopRequireDefault(require("../../themes/default"));
|
|
14
15
|
var _text = _interopRequireDefault(require("../text"));
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
function
|
|
17
|
-
function
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
20
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
function _unsupportedIterableToArray(
|
|
20
|
-
function _arrayLikeToArray(
|
|
21
|
-
function _iterableToArrayLimit(
|
|
22
|
-
function _arrayWithHoles(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
23
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
var Pagination = function Pagination(props) {
|
|
26
|
+
var classes = (0, _style.default)();
|
|
27
|
+
var _useState = (0, _react.useState)(props.initialPage),
|
|
26
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
29
|
page = _useState2[0],
|
|
28
30
|
setPage = _useState2[1];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
var handlePaginationInputKeyDown = function handlePaginationInputKeyDown(e) {
|
|
32
|
+
var key = e.key;
|
|
31
33
|
if (key === "Enter") {
|
|
32
34
|
if (Number(page) > Number(props.totalPage) || Number(page) < Number(props.initialPage) || !Number(page)) {
|
|
33
35
|
window.alert("Invalid Page Number");
|
|
34
36
|
setPage(props.initialPage);
|
|
35
37
|
} else {
|
|
36
38
|
setPage(page);
|
|
37
|
-
props === null || props === void 0
|
|
39
|
+
props === null || props === void 0 ? void 0 : props.setInputPage(page);
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
};
|
|
41
|
-
|
|
43
|
+
var onPrevClick = function onPrevClick() {
|
|
42
44
|
if (props.inputPage === null) {
|
|
43
|
-
setPage(
|
|
45
|
+
setPage(function (prev) {
|
|
46
|
+
return prev - 1;
|
|
47
|
+
});
|
|
44
48
|
} else {
|
|
45
|
-
setPage(
|
|
49
|
+
setPage(function (prev) {
|
|
50
|
+
return Number(props.inputPage) - 1;
|
|
51
|
+
});
|
|
46
52
|
props.setInputPage(null);
|
|
47
53
|
}
|
|
48
54
|
};
|
|
49
|
-
|
|
55
|
+
var onNextClick = function onNextClick() {
|
|
50
56
|
if (props.inputPage === null) {
|
|
51
|
-
setPage(
|
|
57
|
+
setPage(function (prev) {
|
|
58
|
+
return prev + 1;
|
|
59
|
+
});
|
|
52
60
|
} else {
|
|
53
|
-
setPage(
|
|
61
|
+
setPage(function (prev) {
|
|
62
|
+
return Number(props.inputPage) + 1;
|
|
63
|
+
});
|
|
54
64
|
props.setInputPage(null);
|
|
55
65
|
}
|
|
56
66
|
};
|
|
@@ -67,7 +77,9 @@ const Pagination = props => {
|
|
|
67
77
|
display: "flex",
|
|
68
78
|
alignItems: "center"
|
|
69
79
|
},
|
|
70
|
-
onClick:
|
|
80
|
+
onClick: function onClick() {
|
|
81
|
+
return page > props.initialPage ? onPrevClick() : "";
|
|
82
|
+
},
|
|
71
83
|
disabled: page === props.initialPage ? true : false,
|
|
72
84
|
title: "Previous"
|
|
73
85
|
})
|
|
@@ -82,7 +94,7 @@ const Pagination = props => {
|
|
|
82
94
|
type: "text",
|
|
83
95
|
value: page,
|
|
84
96
|
className: classes.pageNumberInput,
|
|
85
|
-
onChange: e
|
|
97
|
+
onChange: function onChange(e) {
|
|
86
98
|
setPage(e.target.value);
|
|
87
99
|
},
|
|
88
100
|
onKeyDown: handlePaginationInputKeyDown
|
|
@@ -97,13 +109,15 @@ const Pagination = props => {
|
|
|
97
109
|
display: "flex",
|
|
98
110
|
alignItems: "center"
|
|
99
111
|
},
|
|
100
|
-
onClick: ()
|
|
112
|
+
onClick: function onClick() {
|
|
113
|
+
return page < props.totalPage && onNextClick();
|
|
114
|
+
},
|
|
101
115
|
disabled: page === props.totalPage ? true : false,
|
|
102
116
|
title: "Next"
|
|
103
117
|
})
|
|
104
118
|
}))));
|
|
105
119
|
};
|
|
106
|
-
|
|
120
|
+
var PaginationButton = function PaginationButton(icon) {
|
|
107
121
|
return /*#__PURE__*/_react.default.createElement(_iconButton.default, {
|
|
108
122
|
disabled: icon.icon.props.disabled,
|
|
109
123
|
onClick: icon.onClick,
|
|
@@ -111,4 +125,5 @@ const PaginationButton = icon => {
|
|
|
111
125
|
title: icon.icon.props.title
|
|
112
126
|
});
|
|
113
127
|
};
|
|
114
|
-
var _default =
|
|
128
|
+
var _default = Pagination;
|
|
129
|
+
exports.default = _default;
|
|
@@ -6,28 +6,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styles = require("@mui/styles");
|
|
8
8
|
var _default2 = _interopRequireDefault(require("../../themes/default"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
var _default =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _default = (0, _styles.makeStyles)(function () {
|
|
11
|
+
return {
|
|
12
|
+
paginationText: {
|
|
13
|
+
fontWeight: 500,
|
|
14
|
+
fontSize: _default2.default.typography.fontSize - 2
|
|
15
|
+
},
|
|
16
|
+
paginationContent: {
|
|
17
|
+
display: "flex",
|
|
18
|
+
margin: "0px 1rem",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "space-evenly"
|
|
21
|
+
},
|
|
22
|
+
pageNumberInput: {
|
|
23
|
+
width: "40px",
|
|
24
|
+
border: "1px solid #ccc",
|
|
25
|
+
borderRadius: "3px",
|
|
26
|
+
margin: "2px 0.5rem 2px 0.5rem",
|
|
27
|
+
// top: "1px",
|
|
28
|
+
position: "relative",
|
|
29
|
+
fontFamily: _default2.default.typography.fontFamily,
|
|
30
|
+
textAlign: "center",
|
|
31
|
+
fontSize: _default2.default.typography.fontSize - 2,
|
|
32
|
+
fontWeight: 500
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
exports.default = _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -7,30 +8,31 @@ exports.default = Pagination;
|
|
|
7
8
|
var React = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _TablePagination = _interopRequireDefault(require("@mui/material/TablePagination"));
|
|
9
10
|
var _material = require("@mui/material");
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function
|
|
12
|
-
function
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
15
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
-
function _unsupportedIterableToArray(
|
|
15
|
-
function _arrayLikeToArray(
|
|
16
|
-
function _iterableToArrayLimit(
|
|
17
|
-
function _arrayWithHoles(
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
20
|
function Pagination(_ref) {
|
|
19
|
-
|
|
21
|
+
var page = _ref.page,
|
|
20
22
|
setPage = _ref.setPage,
|
|
21
23
|
rowsPerPage = _ref.rowsPerPage,
|
|
22
24
|
setRowsPerPage = _ref.setRowsPerPage,
|
|
23
25
|
totalPage = _ref.totalPage,
|
|
24
26
|
ofLabel = _ref.ofLabel;
|
|
25
|
-
|
|
27
|
+
var _React$useState = React.useState(false),
|
|
26
28
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
27
29
|
negativeState = _React$useState2[0],
|
|
28
30
|
setNegativeState = _React$useState2[1];
|
|
29
|
-
|
|
31
|
+
var handleChangePage = function handleChangePage(event, newPage) {
|
|
30
32
|
setPage(newPage);
|
|
31
33
|
setNegativeState(false);
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
var handleChangeRowsPerPage = function handleChangeRowsPerPage(event) {
|
|
34
36
|
setRowsPerPage(parseInt(event.target.value, 10));
|
|
35
37
|
setPage(0);
|
|
36
38
|
};
|
|
@@ -45,13 +47,13 @@ function Pagination(_ref) {
|
|
|
45
47
|
onPageChange: handleChangePage,
|
|
46
48
|
rowsPerPage: rowsPerPage,
|
|
47
49
|
onRowsPerPageChange: handleChangeRowsPerPage,
|
|
48
|
-
labelDisplayedRows: _ref2
|
|
49
|
-
|
|
50
|
+
labelDisplayedRows: function labelDisplayedRows(_ref2) {
|
|
51
|
+
var from = _ref2.from,
|
|
50
52
|
to = _ref2.to,
|
|
51
53
|
count = _ref2.count;
|
|
52
54
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", {
|
|
53
55
|
value: negativeState ? "" : page + 1,
|
|
54
|
-
onChange: e
|
|
56
|
+
onChange: function onChange(e) {
|
|
55
57
|
if (/^\d*$/.test(e.target.value) && !(Number(e.target.value) > Math.ceil(totalPage / rowsPerPage))) {
|
|
56
58
|
if (Number(e.target.value) == 0) {
|
|
57
59
|
setNegativeState(true);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -7,29 +8,28 @@ exports.default = void 0;
|
|
|
7
8
|
var _material = require("@mui/material");
|
|
8
9
|
var _loader = _interopRequireDefault(require("../loader"));
|
|
9
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var
|
|
11
|
+
var _clsx2 = _interopRequireDefault(require("clsx"));
|
|
11
12
|
var _react = _interopRequireDefault(require("react"));
|
|
12
13
|
var _style = _interopRequireDefault(require("./style"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
var _excluded = ["className", "sx", "children", "loading", "fullHeight", "position"];
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
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; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
19
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
+
var Paper = function Paper(_ref) {
|
|
22
|
+
var _clsx;
|
|
23
|
+
var className = _ref.className,
|
|
19
24
|
sx = _ref.sx,
|
|
20
25
|
children = _ref.children,
|
|
21
26
|
loading = _ref.loading,
|
|
22
27
|
fullHeight = _ref.fullHeight,
|
|
23
28
|
position = _ref.position,
|
|
24
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
|
|
30
|
+
var classes = (0, _style.default)();
|
|
26
31
|
return /*#__PURE__*/_react.default.createElement(_material.Paper, {
|
|
27
|
-
className: (0,
|
|
28
|
-
[classes.paper]: true,
|
|
29
|
-
[classes.fullHeight]: fullHeight,
|
|
30
|
-
[className]: true,
|
|
31
|
-
[classes[position]]: true
|
|
32
|
-
}),
|
|
32
|
+
className: (0, _clsx2.default)((_clsx = {}, _defineProperty(_clsx, classes.paper, true), _defineProperty(_clsx, classes.fullHeight, fullHeight), _defineProperty(_clsx, className, true), _defineProperty(_clsx, classes[position], true), _clsx)),
|
|
33
33
|
sx: sx
|
|
34
34
|
}, loading ? /*#__PURE__*/_react.default.createElement(_loader.default, null) : children);
|
|
35
35
|
};
|
|
@@ -40,4 +40,5 @@ Paper.propTypes = {
|
|
|
40
40
|
Paper.defaultProps = {
|
|
41
41
|
position: "static"
|
|
42
42
|
};
|
|
43
|
-
var _default =
|
|
43
|
+
var _default = Paper;
|
|
44
|
+
exports.default = _default;
|
|
@@ -5,27 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styles = require("@mui/styles");
|
|
8
|
-
var _default =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
8
|
+
var _default = (0, _styles.makeStyles)(function (theme) {
|
|
9
|
+
return {
|
|
10
|
+
paper: {
|
|
11
|
+
border: "1px solid #D6D9E0",
|
|
12
|
+
boxShadow: "0px 3px 10px #667CBC1A"
|
|
13
|
+
},
|
|
14
|
+
fullHeight: {
|
|
15
|
+
height: "100%"
|
|
16
|
+
},
|
|
17
|
+
relative: {
|
|
18
|
+
position: "relative"
|
|
19
|
+
},
|
|
20
|
+
fixed: {
|
|
21
|
+
position: "fixed"
|
|
22
|
+
},
|
|
23
|
+
static: {
|
|
24
|
+
position: "static"
|
|
25
|
+
},
|
|
26
|
+
sticky: {
|
|
27
|
+
position: "sticky"
|
|
28
|
+
},
|
|
29
|
+
absolute: {
|
|
30
|
+
position: "absolute"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
exports.default = _default;
|