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