@unbxd-ui/unbxd-react-components 0.2.105 → 0.2.107-beta.2
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/.babelrc +4 -0
- package/.eslintrc.js +38 -0
- package/CONTRIBUTE.md +105 -0
- package/components/Accordian/Accordian.js +45 -13
- package/components/Accordian/Accordian.stories.js +25 -6
- package/components/Accordian/index.js +3 -0
- package/components/Button/Button.js +26 -9
- package/components/Button/Button.stories.js +14 -1
- package/components/Button/DropdownButton.js +31 -9
- package/components/Button/DropdownButton.stories.js +23 -6
- package/components/Button/index.js +8 -1
- package/components/DataLoader/DataLoader.js +40 -10
- package/components/DataLoader/DataLoader.stories.js +30 -5
- package/components/DataLoader/index.js +3 -0
- package/components/Form/Checkbox.js +42 -14
- package/components/Form/DragDropFileUploader.js +42 -12
- package/components/Form/Dropdown.js +181 -104
- package/components/Form/FileUploader.js +32 -10
- package/components/Form/Form.js +45 -15
- package/components/Form/FormElementWrapper.js +7 -2
- package/components/Form/Input.js +72 -27
- package/components/Form/RadioList.js +48 -17
- package/components/Form/RangeSlider.js +73 -37
- package/components/Form/ServerPaginatedDDList.js +130 -86
- package/components/Form/Textarea.js +43 -18
- package/components/Form/Toggle.js +48 -16
- package/components/Form/index.js +30 -18
- package/components/Form/stories/Checkbox.stories.js +12 -1
- package/components/Form/stories/DragDropFileUploader.stories.js +8 -0
- package/components/Form/stories/Dropdown.stories.js +24 -6
- package/components/Form/stories/FileUploader.stories.js +8 -0
- package/components/Form/stories/FormDefault.stories.js +21 -1
- package/components/Form/stories/RadioList.stories.js +12 -1
- package/components/Form/stories/RangeSlider.stories.js +15 -1
- package/components/Form/stories/TextInput.stories.js +19 -3
- package/components/Form/stories/Textarea.stories.js +12 -1
- package/components/Form/stories/Toggle.stories.js +7 -0
- package/components/Form/stories/form.stories.js +40 -3
- package/components/InlineModal/InlineModal.js +51 -14
- package/components/InlineModal/InlineModal.stories.js +14 -2
- package/components/InlineModal/index.js +6 -1
- package/components/List/List.js +24 -9
- package/components/List/index.js +3 -0
- package/components/List/list.stories.js +10 -0
- package/components/Modal/Modal.js +49 -17
- package/components/Modal/Modal.stories.js +15 -1
- package/components/Modal/index.js +3 -0
- package/components/NotificationComponent/NotificationComponent.js +34 -11
- package/components/NotificationComponent/NotificationComponent.stories.js +6 -0
- package/components/NotificationComponent/index.js +3 -0
- package/components/ProgressBar/ProgressBar.js +11 -2
- package/components/ProgressBar/ProgressBar.stories.js +6 -0
- package/components/ProgressBar/index.js +3 -0
- package/components/Table/BaseTable.js +134 -69
- package/components/Table/PaginationComponent.js +23 -11
- package/components/Table/Table.js +149 -68
- package/components/Table/Table.stories.js +67 -22
- package/components/Table/index.js +4 -0
- package/components/TabsComponent/TabsComponent.js +57 -20
- package/components/TabsComponent/TabsComponent.stories.js +16 -0
- package/components/TabsComponent/index.js +3 -0
- package/components/Tooltip/Tooltip.js +47 -25
- package/components/Tooltip/Tooltip.stories.js +6 -0
- package/components/Tooltip/index.js +3 -0
- package/components/core.css +1 -3
- package/components/index.js +17 -1
- package/components/theme.css +0 -2
- package/lib/Readme.md +82 -0
- package/lib/components/Accordian/Accordian.js +117 -0
- package/lib/components/Accordian/Accordian.stories.js +137 -0
- package/lib/components/Accordian/index.js +10 -0
- package/lib/components/Button/Button.js +84 -0
- package/lib/components/Button/Button.stories.js +89 -0
- package/lib/components/Button/DropdownButton.js +77 -0
- package/lib/components/Button/DropdownButton.stories.js +51 -0
- package/lib/components/Button/index.js +32 -0
- package/lib/components/DataLoader/DataLoader.js +88 -0
- package/lib/components/DataLoader/DataLoader.stories.js +77 -0
- package/lib/components/DataLoader/index.js +10 -0
- package/lib/components/Form/Checkbox.js +93 -0
- package/lib/components/Form/DragDropFileUploader.js +85 -0
- package/lib/components/Form/Dropdown.js +478 -0
- package/lib/components/Form/FileUploader.js +81 -0
- package/lib/components/Form/Form.js +106 -0
- package/lib/components/Form/FormElementWrapper.js +27 -0
- package/lib/components/Form/Input.js +140 -0
- package/lib/components/Form/RadioList.js +111 -0
- package/lib/components/Form/RangeSlider.js +142 -0
- package/lib/components/Form/ServerPaginatedDDList.js +267 -0
- package/lib/components/Form/Textarea.js +95 -0
- package/lib/components/Form/Toggle.js +117 -0
- package/lib/components/Form/index.js +73 -0
- package/lib/components/Form/stories/Checkbox.stories.js +54 -0
- package/lib/components/Form/stories/DragDropFileUploader.stories.js +27 -0
- package/lib/components/Form/stories/Dropdown.stories.js +114 -0
- package/lib/components/Form/stories/FileUploader.stories.js +31 -0
- package/lib/components/Form/stories/FormDefault.stories.js +117 -0
- package/lib/components/Form/stories/RadioList.stories.js +55 -0
- package/lib/components/Form/stories/RangeSlider.stories.js +82 -0
- package/lib/components/Form/stories/TextInput.stories.js +79 -0
- package/lib/components/Form/stories/Textarea.stories.js +48 -0
- package/lib/components/Form/stories/Toggle.stories.js +25 -0
- package/lib/components/Form/stories/form.stories.js +240 -0
- package/lib/components/InlineModal/InlineModal.js +146 -0
- package/lib/components/InlineModal/InlineModal.stories.js +61 -0
- package/lib/components/InlineModal/index.js +24 -0
- package/lib/components/List/List.js +76 -0
- package/lib/components/List/index.js +10 -0
- package/lib/components/List/list.stories.js +38 -0
- package/lib/components/Modal/Modal.js +117 -0
- package/lib/components/Modal/Modal.stories.js +55 -0
- package/lib/components/Modal/index.js +10 -0
- package/lib/components/NotificationComponent/NotificationComponent.js +76 -0
- package/lib/components/NotificationComponent/NotificationComponent.stories.js +29 -0
- package/lib/components/NotificationComponent/index.js +10 -0
- package/lib/components/ProgressBar/ProgressBar.js +49 -0
- package/lib/components/ProgressBar/ProgressBar.stories.js +21 -0
- package/lib/components/ProgressBar/index.js +10 -0
- package/lib/components/Table/BaseTable.js +352 -0
- package/lib/components/Table/PaginationComponent.js +87 -0
- package/lib/components/Table/Table.js +333 -0
- package/lib/components/Table/Table.stories.js +204 -0
- package/lib/components/Table/index.js +17 -0
- package/lib/components/TabsComponent/TabsComponent.js +134 -0
- package/lib/components/TabsComponent/TabsComponent.stories.js +65 -0
- package/lib/components/TabsComponent/index.js +10 -0
- package/lib/components/Tooltip/Tooltip.js +102 -0
- package/lib/components/Tooltip/Tooltip.stories.js +25 -0
- package/lib/components/Tooltip/index.js +10 -0
- package/lib/components/core.css +3 -0
- package/lib/components/core.scss +29 -0
- package/lib/components/index.js +159 -0
- package/lib/components/theme.css +3 -0
- package/lib/components/theme.scss +11 -0
- package/lib/package-lock.json +20607 -0
- package/lib/package.json +94 -0
- package/package.json +1 -1
- package/src/Intro.stories.mdx +119 -0
- package/src/components/Accordian/Accordian.js +89 -0
- package/src/components/Accordian/Accordian.stories.js +92 -0
- package/src/components/Accordian/accordianCore.css +1 -0
- package/src/components/Accordian/accordianCore.scss +8 -0
- package/src/components/Accordian/accordianTheme.css +1 -0
- package/src/components/Accordian/accordianTheme.scss +6 -0
- package/src/components/Accordian/index.js +3 -0
- package/src/components/Button/Button.js +67 -0
- package/src/components/Button/Button.stories.js +103 -0
- package/src/components/Button/DropdownButton.js +60 -0
- package/src/components/Button/DropdownButton.stories.js +38 -0
- package/src/components/Button/button.css +1 -0
- package/src/components/Button/buttonTheme.css +1 -0
- package/src/components/Button/buttonTheme.scss +45 -0
- package/src/components/Button/index.js +5 -0
- package/src/components/DataLoader/DataLoader.js +86 -0
- package/src/components/DataLoader/DataLoader.stories.js +72 -0
- package/src/components/DataLoader/index.js +3 -0
- package/src/components/Form/Checkbox.js +73 -0
- package/src/components/Form/DragDropFileUploader.js +67 -0
- package/src/components/Form/Dropdown.js +430 -0
- package/src/components/Form/FileUploader.js +64 -0
- package/src/components/Form/Form.js +83 -0
- package/src/components/Form/FormElementWrapper.js +22 -0
- package/src/components/Form/Input.js +121 -0
- package/src/components/Form/RadioList.js +86 -0
- package/src/components/Form/RangeSlider.js +100 -0
- package/src/components/Form/ServerPaginatedDDList.js +231 -0
- package/src/components/Form/Textarea.js +76 -0
- package/src/components/Form/Toggle.js +96 -0
- package/src/components/Form/form.css +1 -0
- package/src/components/Form/formCore.css +1 -0
- package/src/components/Form/formCore.scss +142 -0
- package/src/components/Form/formTheme.css +1 -0
- package/src/components/Form/formTheme.scss +27 -0
- package/src/components/Form/index.js +13 -0
- package/src/components/Form/stories/Checkbox.stories.js +41 -0
- package/src/components/Form/stories/DragDropFileUploader.stories.js +21 -0
- package/src/components/Form/stories/Dropdown.stories.js +124 -0
- package/src/components/Form/stories/FileUploader.stories.js +21 -0
- package/src/components/Form/stories/FormDefault.stories.js +87 -0
- package/src/components/Form/stories/RadioList.stories.js +48 -0
- package/src/components/Form/stories/RangeSlider.stories.js +84 -0
- package/src/components/Form/stories/TextInput.stories.js +77 -0
- package/src/components/Form/stories/Textarea.stories.js +43 -0
- package/src/components/Form/stories/Toggle.stories.js +14 -0
- package/src/components/Form/stories/form.stories.js +216 -0
- package/src/components/InlineModal/InlineModal.js +135 -0
- package/src/components/InlineModal/InlineModal.stories.js +54 -0
- package/src/components/InlineModal/index.js +4 -0
- package/src/components/InlineModal/inlineModal.css +1 -0
- package/src/components/InlineModal/inlineModalCore.css +1 -0
- package/src/components/InlineModal/inlineModalCore.scss +31 -0
- package/src/components/InlineModal/inlineModalTheme.css +1 -0
- package/src/components/InlineModal/inlineModalTheme.scss +16 -0
- package/src/components/List/List.js +72 -0
- package/src/components/List/index.js +3 -0
- package/src/components/List/list.css +1 -0
- package/src/components/List/list.stories.js +28 -0
- package/src/components/List/listCore.css +1 -0
- package/src/components/List/listCore.scss +6 -0
- package/src/components/List/listTheme.css +0 -0
- package/src/components/List/listTheme.scss +0 -0
- package/src/components/Modal/Modal.js +99 -0
- package/src/components/Modal/Modal.stories.js +54 -0
- package/src/components/Modal/index.js +3 -0
- package/src/components/Modal/modal.css +1 -0
- package/src/components/Modal/modalCore.css +1 -0
- package/src/components/Modal/modalCore.scss +34 -0
- package/src/components/Modal/modalTheme.css +0 -0
- package/src/components/Modal/modalTheme.scss +0 -0
- package/src/components/NotificationComponent/NotificationComponent.js +58 -0
- package/src/components/NotificationComponent/NotificationComponent.stories.js +28 -0
- package/src/components/NotificationComponent/index.js +3 -0
- package/src/components/NotificationComponent/notificationComponent.css +1 -0
- package/src/components/NotificationComponent/notificationTheme.css +1 -0
- package/src/components/NotificationComponent/notificationTheme.scss +30 -0
- package/src/components/ProgressBar/ProgressBar.js +45 -0
- package/src/components/ProgressBar/ProgressBar.stories.js +14 -0
- package/src/components/ProgressBar/index.js +3 -0
- package/src/components/ProgressBar/progressBar.css +1 -0
- package/src/components/ProgressBar/progressBarCore.css +1 -0
- package/src/components/ProgressBar/progressBarCore.scss +14 -0
- package/src/components/ProgressBar/progressBarTheme.css +0 -0
- package/src/components/ProgressBar/progressBarTheme.scss +0 -0
- package/src/components/Table/BaseTable.js +306 -0
- package/src/components/Table/PaginationComponent.js +73 -0
- package/src/components/Table/Table.js +295 -0
- package/src/components/Table/Table.stories.js +198 -0
- package/src/components/Table/index.js +8 -0
- package/src/components/Table/table.css +1 -0
- package/src/components/Table/tableCore.css +1 -0
- package/src/components/Table/tableCore.scss +94 -0
- package/src/components/Table/tableTheme.css +1 -0
- package/src/components/Table/tableTheme.scss +34 -0
- package/src/components/TabsComponent/TabsComponent.js +99 -0
- package/src/components/TabsComponent/TabsComponent.stories.js +69 -0
- package/src/components/TabsComponent/index.js +3 -0
- package/src/components/TabsComponent/tabs.css +1 -0
- package/src/components/TabsComponent/tabsCore.css +1 -0
- package/src/components/TabsComponent/tabsCore.scss +59 -0
- package/src/components/TabsComponent/tabsTheme.css +0 -0
- package/src/components/TabsComponent/tabsTheme.scss +0 -0
- package/src/components/Tooltip/Tooltip.js +87 -0
- package/src/components/Tooltip/Tooltip.stories.js +16 -0
- package/src/components/Tooltip/index.js +3 -0
- package/src/components/Tooltip/tooltipCore.css +1 -0
- package/src/components/Tooltip/tooltipCore.scss +22 -0
- package/src/components/Tooltip/tooltipTheme.css +1 -0
- package/src/components/Tooltip/tooltipTheme.scss +21 -0
- package/src/components/core.css +1 -0
- package/src/components/core.scss +29 -0
- package/src/components/index.js +38 -0
- package/src/components/theme.css +1 -0
- package/src/components/theme.scss +11 -0
- package/src/core/Validators.js +34 -0
- package/src/core/customHooks.js +20 -0
- package/src/core/dataLoader.js +143 -0
- package/src/core/dataLoader.stories.js +123 -0
- package/src/core/index.js +3 -0
- package/src/core/utils.js +95 -0
- package/src/index.js +68 -0
- package/vscode-templates/NewStoryTemplate.stories.js +8 -0
- /package/{Readme.md → README.md} +0 -0
- /package/{components → lib/components}/Accordian/accordianCore.css +0 -0
- /package/{components → lib/components}/Accordian/accordianTheme.css +0 -0
- /package/{components → lib/components}/Button/buttonTheme.css +0 -0
- /package/{components → lib/components}/Form/formCore.css +0 -0
- /package/{components → lib/components}/Form/formTheme.css +0 -0
- /package/{components → lib/components}/InlineModal/inlineModalCore.css +0 -0
- /package/{components → lib/components}/InlineModal/inlineModalTheme.css +0 -0
- /package/{components → lib/components}/List/listCore.css +0 -0
- /package/{components → lib/components}/List/listTheme.css +0 -0
- /package/{components → lib/components}/Modal/modalCore.css +0 -0
- /package/{components → lib/components}/Modal/modalTheme.css +0 -0
- /package/{components → lib/components}/NotificationComponent/notificationTheme.css +0 -0
- /package/{components → lib/components}/ProgressBar/progressBarCore.css +0 -0
- /package/{components → lib/components}/ProgressBar/progressBarTheme.css +0 -0
- /package/{components → lib/components}/Table/tableCore.css +0 -0
- /package/{components → lib/components}/Table/tableTheme.css +0 -0
- /package/{components → lib/components}/TabsComponent/tabsCore.css +0 -0
- /package/{components → lib/components}/TabsComponent/tabsTheme.css +0 -0
- /package/{components → lib/components}/Tooltip/tooltipCore.css +0 -0
- /package/{components → lib/components}/Tooltip/tooltipTheme.css +0 -0
- /package/{core → lib/core}/Validators.js +0 -0
- /package/{core → lib/core}/customHooks.js +0 -0
- /package/{core → lib/core}/dataLoader.js +0 -0
- /package/{core → lib/core}/dataLoader.stories.js +0 -0
- /package/{core → lib/core}/index.js +0 -0
- /package/{core → lib/core}/utils.js +0 -0
- /package/{index.js → lib/index.js} +0 -0
|
@@ -4,28 +4,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
9
12
|
var _Dropdown = _interopRequireDefault(require("../Form/Dropdown"));
|
|
13
|
+
|
|
10
14
|
var _utils = _interopRequireDefault(require("../../core/utils"));
|
|
15
|
+
|
|
11
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
-
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
function
|
|
17
|
+
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
+
|
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
|
|
18
24
|
var PaginationComponent = function PaginationComponent(props) {
|
|
19
25
|
var pageSizeList = props.pageSizeList,
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
pageConfig = props.pageConfig,
|
|
27
|
+
onPageConfigChanged = props.onPageConfigChanged;
|
|
22
28
|
var perPageCount = pageConfig.perPageCount,
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
pageNo = pageConfig.pageNo,
|
|
30
|
+
total = pageConfig.total;
|
|
31
|
+
|
|
25
32
|
var SelectionSummary = function SelectionSummary() {
|
|
26
33
|
var pagIndex = _utils["default"].getPagIndex(pageConfig);
|
|
34
|
+
|
|
27
35
|
var start = pagIndex.start,
|
|
28
|
-
|
|
36
|
+
end = pagIndex.end;
|
|
29
37
|
var startVal = start + 1;
|
|
30
38
|
var endVal = total < end ? total : end;
|
|
31
39
|
var summaryString = "".concat(startVal, "-").concat(endVal);
|
|
@@ -35,6 +43,7 @@ var PaginationComponent = function PaginationComponent(props) {
|
|
|
35
43
|
className: "RCB-select-arrow"
|
|
36
44
|
}));
|
|
37
45
|
};
|
|
46
|
+
|
|
38
47
|
var onPerPageChanged = function onPerPageChanged(perPageObj) {
|
|
39
48
|
var perPage = +perPageObj.id;
|
|
40
49
|
onPageConfigChanged(_objectSpread(_objectSpread({}, pageConfig), {}, {
|
|
@@ -42,12 +51,14 @@ var PaginationComponent = function PaginationComponent(props) {
|
|
|
42
51
|
perPageCount: perPage
|
|
43
52
|
}));
|
|
44
53
|
};
|
|
54
|
+
|
|
45
55
|
var changePage = function changePage(moveUnit, event) {
|
|
46
56
|
event.preventDefault();
|
|
47
57
|
onPageConfigChanged(_objectSpread(_objectSpread({}, pageConfig), {}, {
|
|
48
58
|
pageNo: pageNo + moveUnit
|
|
49
59
|
}));
|
|
50
60
|
};
|
|
61
|
+
|
|
51
62
|
var isLeftNavDisbaled = pageNo <= 1;
|
|
52
63
|
var isRightNavDisbaled = pageNo >= Math.ceil(total / +perPageCount);
|
|
53
64
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -75,6 +86,7 @@ var PaginationComponent = function PaginationComponent(props) {
|
|
|
75
86
|
}
|
|
76
87
|
}, ">")));
|
|
77
88
|
};
|
|
89
|
+
|
|
78
90
|
PaginationComponent.propTypes = {
|
|
79
91
|
pageSizeList: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
80
92
|
id: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
@@ -4,61 +4,94 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.REQUEST_KEYS = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
9
12
|
var _BaseTable = _interopRequireDefault(require("./BaseTable"));
|
|
13
|
+
|
|
10
14
|
var _DataLoader = _interopRequireDefault(require("../DataLoader"));
|
|
15
|
+
|
|
11
16
|
var _PaginationComponent = _interopRequireDefault(require("./PaginationComponent"));
|
|
17
|
+
|
|
12
18
|
var _utils = _interopRequireDefault(require("../../core/utils"));
|
|
19
|
+
|
|
13
20
|
var _excluded = ["className", "wrapperClassName", "records", "columnConfigs", "idAttribute", "searchBy", "getRequestKeys", "showPaginateBar", "paginationPosition", "paginationType", "paginationBar", "requestId", "pageNoKey", "perPageKey", "pageSizeList", "isExpandableTable", "ExpandedRowComponent", "responseFormatter", "noDataComponent", "omitProps", "getUrlParams", "getRequestParams", "checkboxConfig"];
|
|
21
|
+
|
|
14
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
15
24
|
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); }
|
|
25
|
+
|
|
16
26
|
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; }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
22
34
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
|
+
|
|
23
36
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
+
|
|
24
38
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39
|
+
|
|
25
40
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
41
|
+
|
|
26
42
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
27
44
|
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."); }
|
|
45
|
+
|
|
28
46
|
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); }
|
|
29
|
-
|
|
30
|
-
function
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
+
|
|
31
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
32
54
|
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; }
|
|
55
|
+
|
|
33
56
|
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; }
|
|
34
|
-
|
|
57
|
+
|
|
58
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
59
|
+
|
|
35
60
|
var getPageRecords = function getPageRecords() {
|
|
36
61
|
var records = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
37
62
|
var pageConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
63
|
+
|
|
38
64
|
var pagIndex = _utils["default"].getPagIndex(pageConfig);
|
|
65
|
+
|
|
39
66
|
var start = pagIndex.start,
|
|
40
|
-
|
|
67
|
+
end = pagIndex.end;
|
|
41
68
|
return records.slice(start, end);
|
|
42
69
|
};
|
|
70
|
+
|
|
43
71
|
var sortNumbersASC = function sortNumbersASC(a, b) {
|
|
44
72
|
return a - b;
|
|
45
73
|
};
|
|
74
|
+
|
|
46
75
|
var sortNumbersDSC = function sortNumbersDSC(a, b) {
|
|
47
76
|
return b - a;
|
|
48
77
|
};
|
|
78
|
+
|
|
49
79
|
var sortAlphaASC = function sortAlphaASC(a, b) {
|
|
50
80
|
return a < b ? -1 : 1;
|
|
51
81
|
};
|
|
82
|
+
|
|
52
83
|
var sortAlphaDSC = function sortAlphaDSC(a, b) {
|
|
53
84
|
return b < a ? -1 : 1;
|
|
54
85
|
};
|
|
86
|
+
|
|
55
87
|
var getFilteredRecords = function getFilteredRecords(_ref) {
|
|
56
88
|
var _ref$records = _ref.records,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
89
|
+
records = _ref$records === void 0 ? [] : _ref$records,
|
|
90
|
+
searchBy = _ref.searchBy,
|
|
91
|
+
searchByKey = _ref.searchByKey,
|
|
92
|
+
sortByConfig = _ref.sortByConfig;
|
|
61
93
|
var filteredRecords = records;
|
|
94
|
+
|
|
62
95
|
if (searchBy) {
|
|
63
96
|
searchBy = searchBy.toLowerCase();
|
|
64
97
|
filteredRecords = records.filter(function (obj) {
|
|
@@ -66,10 +99,11 @@ var getFilteredRecords = function getFilteredRecords(_ref) {
|
|
|
66
99
|
return val.indexOf(searchBy) !== -1;
|
|
67
100
|
});
|
|
68
101
|
}
|
|
102
|
+
|
|
69
103
|
if (_typeof(sortByConfig) === "object" && !_utils["default"].isObjectEmpty(sortByConfig)) {
|
|
70
104
|
var sortBy = sortByConfig.sortBy,
|
|
71
|
-
|
|
72
|
-
|
|
105
|
+
sortOrder = sortByConfig.sortOrder,
|
|
106
|
+
columnConfig = sortByConfig.columnConfig;
|
|
73
107
|
var valueFormatter = columnConfig.valueFormatter;
|
|
74
108
|
filteredRecords = records.slice().sort(function (obj1, obj2) {
|
|
75
109
|
var rowValue1 = obj1[sortBy];
|
|
@@ -82,6 +116,7 @@ var getFilteredRecords = function getFilteredRecords(_ref) {
|
|
|
82
116
|
value: rowValue2,
|
|
83
117
|
record: obj2
|
|
84
118
|
}) : rowValue2;
|
|
119
|
+
|
|
85
120
|
if (typeof sortValue === "number") {
|
|
86
121
|
return sortOrder === "ASC" ? sortNumbersASC(sortValue1, sortValue2) : sortNumbersDSC(sortValue1, sortValue2);
|
|
87
122
|
} else {
|
|
@@ -89,8 +124,10 @@ var getFilteredRecords = function getFilteredRecords(_ref) {
|
|
|
89
124
|
}
|
|
90
125
|
});
|
|
91
126
|
}
|
|
127
|
+
|
|
92
128
|
return filteredRecords;
|
|
93
129
|
};
|
|
130
|
+
|
|
94
131
|
var REQUEST_KEYS = {
|
|
95
132
|
searchBy: "search",
|
|
96
133
|
sortBy: "sortBy",
|
|
@@ -99,121 +136,146 @@ var REQUEST_KEYS = {
|
|
|
99
136
|
sortDSC: "DSC"
|
|
100
137
|
};
|
|
101
138
|
exports.REQUEST_KEYS = REQUEST_KEYS;
|
|
139
|
+
|
|
102
140
|
var Table = function Table(props, ref) {
|
|
103
141
|
var _objectSpread2;
|
|
142
|
+
|
|
104
143
|
var className = props.className,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
144
|
+
wrapperClassName = props.wrapperClassName,
|
|
145
|
+
records = props.records,
|
|
146
|
+
columnConfigs = props.columnConfigs,
|
|
147
|
+
idAttribute = props.idAttribute,
|
|
148
|
+
searchBy = props.searchBy,
|
|
149
|
+
getRequestKeys = props.getRequestKeys,
|
|
150
|
+
showPaginateBar = props.showPaginateBar,
|
|
151
|
+
paginationPosition = props.paginationPosition,
|
|
152
|
+
paginationType = props.paginationType,
|
|
153
|
+
paginationBar = props.paginationBar,
|
|
154
|
+
requestId = props.requestId,
|
|
155
|
+
pageNoKey = props.pageNoKey,
|
|
156
|
+
perPageKey = props.perPageKey,
|
|
157
|
+
pageSizeList = props.pageSizeList,
|
|
158
|
+
isExpandableTable = props.isExpandableTable,
|
|
159
|
+
ExpandedRowComponent = props.ExpandedRowComponent,
|
|
160
|
+
responseFormatter = props.responseFormatter,
|
|
161
|
+
noDataComponent = props.noDataComponent,
|
|
162
|
+
omitProps = props.omitProps,
|
|
163
|
+
getUrlParams = props.getUrlParams,
|
|
164
|
+
getRequestParams = props.getRequestParams,
|
|
165
|
+
checkboxConfig = props.checkboxConfig,
|
|
166
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
128
167
|
/* variables for server data */
|
|
168
|
+
|
|
169
|
+
|
|
129
170
|
var _useState = (0, _react.useState)([]),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var _useState3 = (0, _react.useState)(0),
|
|
134
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
135
|
-
serverTotal = _useState4[0],
|
|
136
|
-
setServerTotal = _useState4[1];
|
|
171
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
172
|
+
serverRecords = _useState2[0],
|
|
173
|
+
setServerRecords = _useState2[1];
|
|
137
174
|
|
|
175
|
+
var _useState3 = (0, _react.useState)(0),
|
|
176
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
177
|
+
serverTotal = _useState4[0],
|
|
178
|
+
setServerTotal = _useState4[1];
|
|
138
179
|
/* variables for search, sort data */
|
|
180
|
+
|
|
181
|
+
|
|
139
182
|
var _useState5 = (0, _react.useState)(searchBy),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
183
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
184
|
+
searchQuery = _useState6[0],
|
|
185
|
+
setSearchQuery = _useState6[1];
|
|
186
|
+
|
|
143
187
|
var _useState7 = (0, _react.useState)({}),
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
var sortBy = sortByConfig.sortBy,
|
|
148
|
-
sortOrder = sortByConfig.sortOrder;
|
|
188
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
189
|
+
sortByConfig = _useState8[0],
|
|
190
|
+
setSortByConfig = _useState8[1];
|
|
149
191
|
|
|
192
|
+
var sortBy = sortByConfig.sortBy,
|
|
193
|
+
sortOrder = sortByConfig.sortOrder;
|
|
150
194
|
/* variables for pagination data */
|
|
195
|
+
|
|
151
196
|
var _useState9 = (0, _react.useState)({
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
197
|
+
perPageCount: pageSizeList[0].id,
|
|
198
|
+
pageNo: 1
|
|
199
|
+
}),
|
|
200
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
201
|
+
pageConfig = _useState10[0],
|
|
202
|
+
setPageConfig = _useState10[1];
|
|
203
|
+
|
|
158
204
|
var perPageCount = pageConfig.perPageCount,
|
|
159
|
-
|
|
205
|
+
pageNo = pageConfig.pageNo;
|
|
160
206
|
var omitParams = [pageNoKey, perPageKey].concat(_toConsumableArray(omitProps.split(",")));
|
|
207
|
+
|
|
161
208
|
var _REQUEST_KEYS$getRequ = _objectSpread(_objectSpread({}, REQUEST_KEYS), getRequestKeys()),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
209
|
+
searchByKey = _REQUEST_KEYS$getRequ.searchBy,
|
|
210
|
+
sortByKey = _REQUEST_KEYS$getRequ.sortBy,
|
|
211
|
+
sortOrderKey = _REQUEST_KEYS$getRequ.sortOrder,
|
|
212
|
+
ASCEnum = _REQUEST_KEYS$getRequ.sortASC,
|
|
213
|
+
DSCEnum = _REQUEST_KEYS$getRequ.sortDSC;
|
|
214
|
+
|
|
167
215
|
var extraParams = _utils["default"].omit(restProps, omitParams);
|
|
216
|
+
|
|
168
217
|
var requestParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getRequestParams()), extraParams), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, pageNoKey, pageNo), _defineProperty(_objectSpread2, perPageKey, perPageCount), _objectSpread2), searchQuery && _defineProperty({}, searchByKey, searchQuery)), sortBy && _defineProperty({}, sortByKey, sortBy)), sortOrder && _defineProperty({}, sortOrderKey, sortOrder === "DSC" ? DSCEnum : ASCEnum));
|
|
218
|
+
|
|
169
219
|
var requests = [{
|
|
170
220
|
requestId: requestId,
|
|
171
221
|
params: requestParams,
|
|
172
222
|
urlParams: getUrlParams()
|
|
173
223
|
}];
|
|
224
|
+
|
|
174
225
|
var onDataLoaded = function onDataLoaded(_ref5) {
|
|
175
226
|
var _ref6 = _slicedToArray(_ref5, 1),
|
|
176
|
-
|
|
227
|
+
response = _ref6[0];
|
|
228
|
+
|
|
177
229
|
var apiResponse = response;
|
|
230
|
+
|
|
178
231
|
if (typeof responseFormatter === "function") {
|
|
179
232
|
apiResponse = responseFormatter(response);
|
|
180
233
|
}
|
|
234
|
+
|
|
181
235
|
var _apiResponse = apiResponse,
|
|
182
|
-
|
|
183
|
-
|
|
236
|
+
entries = _apiResponse.entries,
|
|
237
|
+
total = _apiResponse.total;
|
|
184
238
|
entries = entries || [];
|
|
239
|
+
|
|
185
240
|
if (pageNo > 1 && entries.length === 0) {
|
|
186
241
|
/* current page does not have records, so fetch previous page */
|
|
187
242
|
setPageConfig(_objectSpread(_objectSpread({}, pageConfig), {}, {
|
|
188
243
|
pageNo: pageNo - 1
|
|
189
244
|
}));
|
|
190
245
|
}
|
|
246
|
+
|
|
191
247
|
setServerRecords(entries);
|
|
192
248
|
setServerTotal(total);
|
|
193
249
|
};
|
|
250
|
+
|
|
194
251
|
var resetPageNo = function resetPageNo() {
|
|
195
252
|
setPageConfig(_objectSpread(_objectSpread({}, pageConfig), {}, {
|
|
196
253
|
pageNo: 1
|
|
197
254
|
}));
|
|
198
255
|
};
|
|
256
|
+
|
|
199
257
|
(0, _react.useEffect)(function () {
|
|
200
258
|
/* Search value changed: reset pageNo. */
|
|
201
259
|
resetPageNo();
|
|
202
260
|
setSearchQuery(searchBy);
|
|
203
261
|
}, [searchBy]);
|
|
262
|
+
|
|
204
263
|
var onSort = function onSort(columnConfig) {
|
|
205
264
|
var newSortBy = columnConfig.key;
|
|
206
265
|
var newSortOrder = "ASC";
|
|
266
|
+
|
|
207
267
|
if (sortBy === newSortBy) {
|
|
208
268
|
/* clicked sort on the same column */
|
|
209
269
|
newSortOrder = sortOrder === "ASC" ? "DSC" : "ASC";
|
|
210
270
|
}
|
|
271
|
+
|
|
211
272
|
setSortByConfig({
|
|
212
273
|
sortBy: newSortBy,
|
|
213
274
|
sortOrder: newSortOrder,
|
|
214
275
|
columnConfig: columnConfig
|
|
215
276
|
});
|
|
216
277
|
};
|
|
278
|
+
|
|
217
279
|
var filteredRecords = getFilteredRecords({
|
|
218
280
|
records: records,
|
|
219
281
|
searchBy: searchBy,
|
|
@@ -228,10 +290,13 @@ var Table = function Table(props, ref) {
|
|
|
228
290
|
total: totalRecords
|
|
229
291
|
})
|
|
230
292
|
};
|
|
293
|
+
|
|
231
294
|
var paginationComponent = /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
295
|
className: "RCB-paginate-bar"
|
|
233
296
|
}, paginationBar ? /*#__PURE__*/_react["default"].cloneElement(paginationBar, paginationProps) : /*#__PURE__*/_react["default"].createElement(_PaginationComponent["default"], paginationProps));
|
|
297
|
+
|
|
234
298
|
var finalRecords = paginationType === "SERVER" ? serverRecords : showPaginateBar ? getPageRecords(filteredRecords, pageConfig) : filteredRecords;
|
|
299
|
+
|
|
235
300
|
var wrappedComponent = /*#__PURE__*/_react["default"].createElement(_BaseTable["default"], {
|
|
236
301
|
ref: ref,
|
|
237
302
|
records: finalRecords,
|
|
@@ -245,41 +310,53 @@ var Table = function Table(props, ref) {
|
|
|
245
310
|
isExpandableTable: isExpandableTable,
|
|
246
311
|
ExpandedRowComponent: ExpandedRowComponent
|
|
247
312
|
});
|
|
313
|
+
|
|
248
314
|
if (paginationType === "SERVER") {
|
|
249
315
|
wrappedComponent = /*#__PURE__*/_react["default"].createElement(_DataLoader["default"], {
|
|
250
316
|
requests: requests,
|
|
251
317
|
onDataLoaded: onDataLoaded
|
|
252
318
|
}, wrappedComponent);
|
|
253
319
|
}
|
|
320
|
+
|
|
254
321
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
255
322
|
className: className
|
|
256
323
|
}, showPaginateBar && paginationPosition === "TOP" && totalRecords > 0 && paginationComponent, /*#__PURE__*/_react["default"].createElement("div", {
|
|
257
324
|
className: wrapperClassName
|
|
258
325
|
}, wrappedComponent), showPaginateBar && paginationPosition === "BOTTOM" && totalRecords > 0 && paginationComponent);
|
|
259
326
|
};
|
|
327
|
+
|
|
260
328
|
Table = /*#__PURE__*/(0, _react.forwardRef)(Table);
|
|
261
329
|
Table.propTypes = _objectSpread(_objectSpread({}, _BaseTable["default"].propTypes), {}, {
|
|
262
330
|
/** search value to search data in the table */
|
|
263
331
|
searchBy: _propTypes["default"].string,
|
|
332
|
+
|
|
264
333
|
/** list of supported page sizes */
|
|
265
334
|
pageSizeList: _propTypes["default"].array,
|
|
335
|
+
|
|
266
336
|
/** set to false to disable pagination bar */
|
|
267
337
|
showPaginateBar: _propTypes["default"].bool,
|
|
338
|
+
|
|
268
339
|
/** location where the pagination component must be displayed */
|
|
269
340
|
paginationPosition: _propTypes["default"].oneOf(["TOP", "BOTTOM"]),
|
|
341
|
+
|
|
270
342
|
/** CLIENT side pagination or SERVER side pagination */
|
|
271
343
|
paginationType: _propTypes["default"].oneOf(["CLIENT", "SERVER"]),
|
|
344
|
+
|
|
272
345
|
/** You can provide a custom component for the pagination bar
|
|
273
346
|
* if you want to add more content to the pagination bar other than the pagination widget.
|
|
274
347
|
* Make sure to include <PagniationComponent /> and pass on all the props sent to this custom component
|
|
275
348
|
*/
|
|
276
349
|
paginationBar: _propTypes["default"].any,
|
|
350
|
+
|
|
277
351
|
/** [SERVER side pagination] the ID of the request to call */
|
|
278
352
|
requestId: _propTypes["default"].string,
|
|
353
|
+
|
|
279
354
|
/** [SERVER side pagination] key to send the page number value in, to the API */
|
|
280
355
|
pageNoKey: _propTypes["default"].string,
|
|
356
|
+
|
|
281
357
|
/** [SERVER side pagination] key to send the page count value in, to the API */
|
|
282
358
|
perPageKey: _propTypes["default"].string,
|
|
359
|
+
|
|
283
360
|
/** If paginationType is "SERVER",
|
|
284
361
|
* component expects the response to be of the form
|
|
285
362
|
* { [pageNoKey]: <pageNo>, [perPageKey]: <pageSize>, total: <totalCount>, entries: [{}] }
|
|
@@ -287,15 +364,19 @@ Table.propTypes = _objectSpread(_objectSpread({}, _BaseTable["default"].propType
|
|
|
287
364
|
* Input to this function is the response received from your API
|
|
288
365
|
* */
|
|
289
366
|
responseFormatter: _propTypes["default"].func,
|
|
367
|
+
|
|
290
368
|
/** If paginationType is "SERVER",
|
|
291
369
|
* a comma separated list of the props to be omitted from being added to the API request */
|
|
292
370
|
omitProps: _propTypes["default"].string,
|
|
371
|
+
|
|
293
372
|
/** If paginationType is "SERVER", function that is expected to return the key configs for the various request settings
|
|
294
373
|
* in the format { searchBy, sortBy, sortOrder }
|
|
295
374
|
*/
|
|
296
375
|
getRequestKeys: _propTypes["default"].func,
|
|
376
|
+
|
|
297
377
|
/** If paginationType is "SERVER", function that is expected to return the URL Params object */
|
|
298
378
|
getUrlParams: _propTypes["default"].func,
|
|
379
|
+
|
|
299
380
|
/** If paginationType is "SERVER", function that is expected to return the Request Params object */
|
|
300
381
|
getRequestParams: _propTypes["default"].func
|
|
301
382
|
});
|