@unbxd-ui/unbxd-react-components 0.2.101-beta.3 → 0.2.101-beta.5

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 (72) 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 +14 -42
  13. package/components/Form/DragDropFileUploader.js +12 -42
  14. package/components/Form/Dropdown.js +77 -172
  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 +17 -48
  20. package/components/Form/RangeSlider.js +32 -72
  21. package/components/Form/ServerPaginatedDDList.js +74 -125
  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 +15 -46
  60. package/components/Tooltip/Tooltip.stories.js +0 -6
  61. package/components/Tooltip/index.js +0 -3
  62. package/components/core.css +0 -1
  63. package/components/index.js +1 -17
  64. package/components/theme.css +0 -1
  65. package/core/Validators.js +1 -5
  66. package/core/customHooks.js +4 -14
  67. package/core/dataLoader.js +28 -67
  68. package/core/dataLoader.stories.js +12 -42
  69. package/core/index.js +6 -10
  70. package/core/utils.js +10 -18
  71. package/index.js +0 -4
  72. package/package.json +1 -1
package/core/utils.js CHANGED
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _Validators = _interopRequireDefault(require("./Validators"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- 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; }
13
-
14
- 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; }
15
-
16
- 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; }
17
-
9
+ 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); }
10
+ 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; }
11
+ 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; }
12
+ 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; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ 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); }
18
15
  var uniqueCounter = 1;
19
16
  var utils = {
20
17
  configs: {},
@@ -40,7 +37,7 @@ var utils = {
40
37
  },
41
38
  getPagIndex: function getPagIndex(pageConfig) {
42
39
  var perPageCount = pageConfig.perPageCount,
43
- pageNo = pageConfig.pageNo;
40
+ pageNo = pageConfig.pageNo;
44
41
  var startIndex = (pageNo - 1) * perPageCount;
45
42
  var endIndex = pageNo * perPageCount;
46
43
  return {
@@ -52,13 +49,11 @@ var utils = {
52
49
  var object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
53
50
  var omitKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
54
51
  var newObject = {};
55
-
56
52
  for (var key in object) {
57
53
  if (omitKeys.indexOf(key) === -1) {
58
54
  newObject[key] = object[key];
59
55
  }
60
56
  }
61
-
62
57
  return newObject;
63
58
  },
64
59
  getUniqueId: function getUniqueId() {
@@ -71,7 +66,7 @@ var utils = {
71
66
  var timeout;
72
67
  return function () {
73
68
  var context = this,
74
- args = arguments;
69
+ args = arguments;
75
70
  clearTimeout(timeout);
76
71
  timeout = setTimeout(function () {
77
72
  timeout = null;
@@ -82,20 +77,17 @@ var utils = {
82
77
  checkIfValid: function checkIfValid(value, validations) {
83
78
  var isValidValue = true;
84
79
  var errorMessage;
85
-
86
80
  for (var i = 0; i < validations.length; i++) {
87
81
  var validationObj = validations[i];
88
82
  var type = validationObj.type,
89
- _validationObj$messag = validationObj.message,
90
- message = _validationObj$messag === void 0 ? "Invalid field value" : _validationObj$messag;
83
+ _validationObj$messag = validationObj.message,
84
+ message = _validationObj$messag === void 0 ? "Invalid field value" : _validationObj$messag;
91
85
  isValidValue = _Validators["default"][type](value, validationObj);
92
-
93
86
  if (!isValidValue) {
94
87
  errorMessage = message;
95
88
  break;
96
89
  }
97
90
  }
98
-
99
91
  return {
100
92
  isValid: isValidValue,
101
93
  error: errorMessage
package/index.js CHANGED
@@ -183,11 +183,7 @@ Object.defineProperty(exports, "utils", {
183
183
  return _core.utils;
184
184
  }
185
185
  });
186
-
187
186
  var _components = require("./components");
188
-
189
187
  var _core = require("./core");
190
-
191
188
  var _Button = require("./components/Button");
192
-
193
189
  var _InlineModal = require("./components/InlineModal");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbxd-ui/unbxd-react-components",
3
- "version": "0.2.101-beta.3",
3
+ "version": "0.2.101-beta.5",
4
4
  "description": "React components library",
5
5
  "keywords": [
6
6
  "react components",