tenjin-ui-kit 0.3.73 → 0.3.74

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 (107) hide show
  1. package/README.md +13 -13
  2. package/common/hooks/apiHooks.js +199 -91
  3. package/common/hooks/newApiHook.js +258 -127
  4. package/common/utils/security/index.js +2 -2
  5. package/common/utils/security/securityConfig.js +2 -1
  6. package/components/Canvas.js +101 -172
  7. package/components/DragBox/index.js +31 -21
  8. package/components/InputWithChip/index.js +83 -178
  9. package/components/RightContext/index.css +20 -20
  10. package/components/RightContext/index.js +41 -17
  11. package/components/WorkFlow.js +29 -19
  12. package/components/WorkFlowBuilder.js +56 -32
  13. package/components/alert/Style.js +14 -11
  14. package/components/alert/index.js +14 -8
  15. package/components/attachment/index.js +31 -26
  16. package/components/authenticationProvider/AuthError.js +4 -3
  17. package/components/authenticationProvider/AuthLoader.js +4 -3
  18. package/components/authenticationProvider/index.js +130 -58
  19. package/components/avatar/index.js +23 -24
  20. package/components/avatar/styles.js +77 -76
  21. package/components/breadCrumbs/index.js +89 -64
  22. package/components/breadCrumbs/style.js +4 -1
  23. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -7
  24. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
  25. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +6 -7
  26. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +7 -8
  27. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +7 -8
  28. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
  29. package/components/browsingTestCaseLayout/index.js +46 -30
  30. package/components/browsingTestCaseLayout/style.css +82 -82
  31. package/components/button/index.js +58 -47
  32. package/components/chatBotModal/index.js +61 -40
  33. package/components/checkBox/index.js +10 -8
  34. package/components/combobox/index.js +216 -182
  35. package/components/divider/index.js +18 -9
  36. package/components/editableField/index.js +46 -19
  37. package/components/error/index.js +12 -6
  38. package/components/errorBoundary/index.js +98 -74
  39. package/components/fileUploader/index.js +58 -46
  40. package/components/fileUploader/style.js +49 -46
  41. package/components/filter/ValueSelector.js +243 -148
  42. package/components/filter/index.js +66 -43
  43. package/components/iconButton/index.js +4 -3
  44. package/components/input/index.js +74 -60
  45. package/components/layout/index.js +49 -36
  46. package/components/layout/main/index.js +14 -13
  47. package/components/layout/main/style.js +14 -11
  48. package/components/layout/pageContent/index.js +7 -8
  49. package/components/layout/sidebar/FlatMenu.js +47 -51
  50. package/components/layout/sidebar/GroupedIconMenu.js +194 -169
  51. package/components/layout/sidebar/GroupedMenu.js +50 -45
  52. package/components/layout/sidebar/ProjectMenu.js +185 -165
  53. package/components/layout/sidebar/index.js +26 -27
  54. package/components/layout/sidebar/style.js +143 -138
  55. package/components/layout/topBar/ProjectTopbar.js +119 -86
  56. package/components/layout/topBar/UserAvatar.js +65 -51
  57. package/components/layout/topBar/index.js +41 -23
  58. package/components/loader/index.js +12 -9
  59. package/components/menu/index.js +42 -23
  60. package/components/modal/Modal.js +6 -5
  61. package/components/modal/index.js +20 -16
  62. package/components/modal/style.js +56 -53
  63. package/components/optionMenu/index.js +72 -57
  64. package/components/pagination/index.js +43 -23
  65. package/components/pagination/style.js +28 -25
  66. package/components/paginationUpdated/index.js +26 -19
  67. package/components/paper/index.js +22 -20
  68. package/components/paper/style.js +27 -24
  69. package/components/reactSelect/index.js +97 -64
  70. package/components/reactSelect/style.js +151 -131
  71. package/components/richTextEditor/index.js +48 -24
  72. package/components/select/GroupedSelect.js +100 -56
  73. package/components/select/SimpleSelect.js +99 -59
  74. package/components/select/index.js +69 -56
  75. package/components/simpleSelect/index.js +22 -18
  76. package/components/sort/index.js +36 -23
  77. package/components/switch/index.js +15 -14
  78. package/components/switch/style.js +32 -29
  79. package/components/switch/switch.js +47 -30
  80. package/components/table/ReactTable.js +83 -59
  81. package/components/table/SimpleTable.js +91 -67
  82. package/components/table/index.js +206 -300
  83. package/components/text/index.js +30 -22
  84. package/components/timeStamp/index.js +6 -4
  85. package/components/timeStamp/style.js +15 -12
  86. package/components/topBar/index.js +102 -86
  87. package/components/tree/index.js +58 -30
  88. package/components/tree/style.js +23 -20
  89. package/components/valuePicker/ValueSelector.js +160 -78
  90. package/components/valuePicker/index.js +50 -30
  91. package/components/wrapperLayout/layout/index.js +7 -8
  92. package/components/wrapperLayout/main/index.js +7 -8
  93. package/components/wrapperLayout/main/pageContainer/index.js +5 -6
  94. package/components/wrapperLayout/main/sideBar/index.js +175 -171
  95. package/components/wrapperLayout/main/sideBar/style.js +183 -177
  96. package/components/wrapperLayout/topBar/UserAvatar.js +5 -6
  97. package/components/wrapperLayout/topBar/avatar.js +18 -15
  98. package/components/wrapperLayout/topBar/index.js +107 -115
  99. package/components/wrapperLayout/topBar/menuIcon.js +5 -6
  100. package/components/wrapperLayout/topBar/style.js +64 -63
  101. package/http/index.js +188 -92
  102. package/index.js +55 -53
  103. package/package.json +124 -125
  104. package/templates/listPage/index.js +196 -168
  105. package/themes/default.js +7 -5
  106. package/themes/defaultSmall.js +3 -2
  107. package/themes/responsiveTheme.js +8 -6
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -9,9 +10,25 @@ var _react = _interopRequireWildcard(require("react"));
9
10
  var _fi = require("react-icons/fi");
10
11
  var _button = _interopRequireDefault(require("../../components/button"));
11
12
  var _input = _interopRequireDefault(require("../../components/input"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
- const columns = [{
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ 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); }
15
+ 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; }
16
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
17
+ 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."); }
18
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
19
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
+ 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; }
21
+ 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; }
22
+ 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; }
23
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
24
+ 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); }
25
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
26
+ 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."); }
27
+ 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); }
28
+ 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; }
29
+ 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; } }
30
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
+ var columns = [{
15
32
  name: "id",
16
33
  displayName: "User ID"
17
34
  }, {
@@ -23,11 +40,15 @@ const columns = [{
23
40
  }, {
24
41
  name: "address.city",
25
42
  displayName: "City",
26
- render: d => d.address.city
43
+ render: function render(d) {
44
+ return d.address.city;
45
+ }
27
46
  }, {
28
47
  name: "address.zipcode",
29
48
  displayName: "Zip Code",
30
- render: d => d.address.zipcode
49
+ render: function render(d) {
50
+ return d.address.zipcode;
51
+ }
31
52
  }, {
32
53
  name: "phone",
33
54
  displayName: "Phone"
@@ -37,172 +58,171 @@ const columns = [{
37
58
  }, {
38
59
  name: "company.name",
39
60
  displayName: "Company",
40
- render: d => d.company.name
61
+ render: function render(d) {
62
+ return d.company.name;
63
+ }
41
64
  }];
42
- const ListPage = _ref => {
43
- let {
44
- pageTitle
45
- } = _ref;
46
- const [data, setData] = (0, _react.useState)({
47
- filtered: [],
48
- filter: null,
49
- unfiltered: [{
50
- id: 1,
51
- name: "Leanne Graham",
52
- username: "Bret",
53
- email: "Sincere@april.biz",
54
- address: {
55
- street: "Kulas Light",
56
- suite: "Apt. 556",
57
- city: "Gwenborough",
58
- zipcode: "92998-3874",
59
- geo: {
60
- lat: "-37.3159",
61
- lng: "81.1496"
65
+ var ListPage = function ListPage(_ref) {
66
+ var pageTitle = _ref.pageTitle;
67
+ var _useState = (0, _react.useState)({
68
+ filtered: [],
69
+ filter: null,
70
+ unfiltered: [{
71
+ id: 1,
72
+ name: "Leanne Graham",
73
+ username: "Bret",
74
+ email: "Sincere@april.biz",
75
+ address: {
76
+ street: "Kulas Light",
77
+ suite: "Apt. 556",
78
+ city: "Gwenborough",
79
+ zipcode: "92998-3874",
80
+ geo: {
81
+ lat: "-37.3159",
82
+ lng: "81.1496"
83
+ }
84
+ },
85
+ phone: "1-770-736-8031 x56442",
86
+ website: "hildegard.org",
87
+ company: {
88
+ name: "Romaguera-Crona",
89
+ catchPhrase: "Multi-layered client-server neural-net",
90
+ bs: "harness real-time e-markets"
62
91
  }
63
- },
64
- phone: "1-770-736-8031 x56442",
65
- website: "hildegard.org",
66
- company: {
67
- name: "Romaguera-Crona",
68
- catchPhrase: "Multi-layered client-server neural-net",
69
- bs: "harness real-time e-markets"
70
- }
71
- }, {
72
- id: 2,
73
- name: "Ervin Howell",
74
- username: "Antonette",
75
- email: "Shanna@melissa.tv",
76
- address: {
77
- street: "Victor Plains",
78
- suite: "Suite 879",
79
- city: "Wisokyburgh",
80
- zipcode: "90566-7771",
81
- geo: {
82
- lat: "-43.9509",
83
- lng: "-34.4618"
92
+ }, {
93
+ id: 2,
94
+ name: "Ervin Howell",
95
+ username: "Antonette",
96
+ email: "Shanna@melissa.tv",
97
+ address: {
98
+ street: "Victor Plains",
99
+ suite: "Suite 879",
100
+ city: "Wisokyburgh",
101
+ zipcode: "90566-7771",
102
+ geo: {
103
+ lat: "-43.9509",
104
+ lng: "-34.4618"
105
+ }
106
+ },
107
+ phone: "010-692-6593 x09125",
108
+ website: "anastasia.net",
109
+ company: {
110
+ name: "Deckow-Crist",
111
+ catchPhrase: "Proactive didactic contingency",
112
+ bs: "synergize scalable supply-chains"
84
113
  }
85
- },
86
- phone: "010-692-6593 x09125",
87
- website: "anastasia.net",
88
- company: {
89
- name: "Deckow-Crist",
90
- catchPhrase: "Proactive didactic contingency",
91
- bs: "synergize scalable supply-chains"
92
- }
93
- }, {
94
- id: 3,
95
- name: "Clementine Bauch",
96
- username: "Samantha",
97
- email: "Nathan@yesenia.net",
98
- address: {
99
- street: "Douglas Extension",
100
- suite: "Suite 847",
101
- city: "McKenziehaven",
102
- zipcode: "59590-4157",
103
- geo: {
104
- lat: "-68.6102",
105
- lng: "-47.0653"
114
+ }, {
115
+ id: 3,
116
+ name: "Clementine Bauch",
117
+ username: "Samantha",
118
+ email: "Nathan@yesenia.net",
119
+ address: {
120
+ street: "Douglas Extension",
121
+ suite: "Suite 847",
122
+ city: "McKenziehaven",
123
+ zipcode: "59590-4157",
124
+ geo: {
125
+ lat: "-68.6102",
126
+ lng: "-47.0653"
127
+ }
128
+ },
129
+ phone: "1-463-123-4447",
130
+ website: "ramiro.info",
131
+ company: {
132
+ name: "Romaguera-Jacobson",
133
+ catchPhrase: "Face to face bifurcated interface",
134
+ bs: "e-enable strategic applications"
106
135
  }
107
- },
108
- phone: "1-463-123-4447",
109
- website: "ramiro.info",
110
- company: {
111
- name: "Romaguera-Jacobson",
112
- catchPhrase: "Face to face bifurcated interface",
113
- bs: "e-enable strategic applications"
114
- }
115
- }, {
116
- id: 4,
117
- name: "Patricia Lebsack",
118
- username: "Karianne",
119
- email: "Julianne.OConner@kory.org",
120
- address: {
121
- street: "Hoeger Mall",
122
- suite: "Apt. 692",
123
- city: "South Elvis",
124
- zipcode: "53919-4257",
125
- geo: {
126
- lat: "29.4572",
127
- lng: "-164.2990"
136
+ }, {
137
+ id: 4,
138
+ name: "Patricia Lebsack",
139
+ username: "Karianne",
140
+ email: "Julianne.OConner@kory.org",
141
+ address: {
142
+ street: "Hoeger Mall",
143
+ suite: "Apt. 692",
144
+ city: "South Elvis",
145
+ zipcode: "53919-4257",
146
+ geo: {
147
+ lat: "29.4572",
148
+ lng: "-164.2990"
149
+ }
150
+ },
151
+ phone: "493-170-9623 x156",
152
+ website: "kale.biz",
153
+ company: {
154
+ name: "Robel-Corkery",
155
+ catchPhrase: "Multi-tiered zero tolerance productivity",
156
+ bs: "transition cutting-edge web services"
128
157
  }
129
- },
130
- phone: "493-170-9623 x156",
131
- website: "kale.biz",
132
- company: {
133
- name: "Robel-Corkery",
134
- catchPhrase: "Multi-tiered zero tolerance productivity",
135
- bs: "transition cutting-edge web services"
136
- }
137
- }, {
138
- id: 5,
139
- name: "Chelsey Dietrich",
140
- username: "Kamren",
141
- email: "Lucio_Hettinger@annie.ca",
142
- address: {
143
- street: "Skiles Walks",
144
- suite: "Suite 351",
145
- city: "Roscoeview",
146
- zipcode: "33263",
147
- geo: {
148
- lat: "-31.8129",
149
- lng: "62.5342"
158
+ }, {
159
+ id: 5,
160
+ name: "Chelsey Dietrich",
161
+ username: "Kamren",
162
+ email: "Lucio_Hettinger@annie.ca",
163
+ address: {
164
+ street: "Skiles Walks",
165
+ suite: "Suite 351",
166
+ city: "Roscoeview",
167
+ zipcode: "33263",
168
+ geo: {
169
+ lat: "-31.8129",
170
+ lng: "62.5342"
171
+ }
172
+ },
173
+ phone: "(254)954-1289",
174
+ website: "demarco.info",
175
+ company: {
176
+ name: "Keebler LLC",
177
+ catchPhrase: "User-centric fault-tolerant solution",
178
+ bs: "revolutionize end-to-end systems"
150
179
  }
151
- },
152
- phone: "(254)954-1289",
153
- website: "demarco.info",
154
- company: {
155
- name: "Keebler LLC",
156
- catchPhrase: "User-centric fault-tolerant solution",
157
- bs: "revolutionize end-to-end systems"
158
- }
159
- }, {
160
- id: 6,
161
- name: "Mrs. Dennis Schulist",
162
- username: "Leopoldo_Corkery",
163
- email: "Karley_Dach@jasper.info",
164
- address: {
165
- street: "Norberto Crossing",
166
- suite: "Apt. 950",
167
- city: "South Christy",
168
- zipcode: "23505-1337",
169
- geo: {
170
- lat: "-71.4197",
171
- lng: "71.7478"
180
+ }, {
181
+ id: 6,
182
+ name: "Mrs. Dennis Schulist",
183
+ username: "Leopoldo_Corkery",
184
+ email: "Karley_Dach@jasper.info",
185
+ address: {
186
+ street: "Norberto Crossing",
187
+ suite: "Apt. 950",
188
+ city: "South Christy",
189
+ zipcode: "23505-1337",
190
+ geo: {
191
+ lat: "-71.4197",
192
+ lng: "71.7478"
193
+ }
194
+ },
195
+ phone: "1-477-935-8478 x6430",
196
+ website: "ola.org",
197
+ company: {
198
+ name: "Considine-Lockman",
199
+ catchPhrase: "Synchronised bottom-line interface",
200
+ bs: "e-enable innovative applications"
172
201
  }
173
- },
174
- phone: "1-477-935-8478 x6430",
175
- website: "ola.org",
176
- company: {
177
- name: "Considine-Lockman",
178
- catchPhrase: "Synchronised bottom-line interface",
179
- bs: "e-enable innovative applications"
180
- }
181
- }]
182
- });
183
- (0, _react.useEffect)(() => {
202
+ }]
203
+ }),
204
+ _useState2 = _slicedToArray(_useState, 2),
205
+ data = _useState2[0],
206
+ setData = _useState2[1];
207
+ (0, _react.useEffect)(function () {
184
208
  search();
185
209
  // eslint-disable-next-line react-hooks/exhaustive-deps
186
210
  }, [data.unfiltered, data.filter]);
187
- const search = () => {
211
+ var search = function search() {
188
212
  if (data.filter) {
189
- const {
190
- filter,
191
- unfiltered
192
- } = data;
193
- let newFiltered = unfiltered.filter(u => {
194
- let mergedData = `${u.id}${u.username.toLowerCase()}${u.email.toLowerCase()}`;
213
+ var filter = data.filter,
214
+ unfiltered = data.unfiltered;
215
+ var newFiltered = unfiltered.filter(function (u) {
216
+ var mergedData = "".concat(u.id).concat(u.username.toLowerCase()).concat(u.email.toLowerCase());
195
217
  return mergedData.includes(filter.toLowerCase());
196
218
  });
197
- setData({
198
- ...data,
219
+ setData(_objectSpread(_objectSpread({}, data), {}, {
199
220
  filtered: newFiltered
200
- });
221
+ }));
201
222
  } else {
202
- setData({
203
- ...data,
204
- filtered: [...data.unfiltered]
205
- });
223
+ setData(_objectSpread(_objectSpread({}, data), {}, {
224
+ filtered: _toConsumableArray(data.unfiltered)
225
+ }));
206
226
  }
207
227
  };
208
228
  return /*#__PURE__*/_react.default.createElement(_material.Grid, {
@@ -248,10 +268,11 @@ const ListPage = _ref => {
248
268
  }, /*#__PURE__*/_react.default.createElement(_input.default, {
249
269
  fullWidth: true,
250
270
  placeholder: "Search by ID, name or Email",
251
- onChange: e => setData({
252
- ...data,
253
- filter: e.target.value
254
- }),
271
+ onChange: function onChange(e) {
272
+ return setData(_objectSpread(_objectSpread({}, data), {}, {
273
+ filter: e.target.value
274
+ }));
275
+ },
255
276
  value: data.filter,
256
277
  disableAutocomplete: true,
257
278
  startIcon: /*#__PURE__*/_react.default.createElement(_fi.FiSearch, null)
@@ -262,12 +283,19 @@ const ListPage = _ref => {
262
283
  xs: 12
263
284
  }, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, {
264
285
  "aria-label": pageTitle
265
- }, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns.map(c => /*#__PURE__*/_react.default.createElement(_material.TableCell, {
266
- key: c.name
267
- }, c.displayName)))), /*#__PURE__*/_react.default.createElement(_material.TableBody, null, data.filtered.map(u => /*#__PURE__*/_react.default.createElement(_material.TableRow, {
268
- key: u.id
269
- }, columns.map(c => /*#__PURE__*/_react.default.createElement(_material.TableCell, {
270
- key: u[c.name]
271
- }, /*#__PURE__*/_react.default.createElement(_material.Typography, null, c.render ? c.render(u) : u[c.name]))))))))));
286
+ }, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns.map(function (c) {
287
+ return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
288
+ key: c.name
289
+ }, c.displayName);
290
+ }))), /*#__PURE__*/_react.default.createElement(_material.TableBody, null, data.filtered.map(function (u) {
291
+ return /*#__PURE__*/_react.default.createElement(_material.TableRow, {
292
+ key: u.id
293
+ }, columns.map(function (c) {
294
+ return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
295
+ key: u[c.name]
296
+ }, /*#__PURE__*/_react.default.createElement(_material.Typography, null, c.render ? c.render(u) : u[c.name]));
297
+ }));
298
+ }))))));
272
299
  };
273
- var _default = exports.default = ListPage;
300
+ var _default = ListPage;
301
+ exports.default = _default;
package/themes/default.js CHANGED
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _material = require("@mui/material");
8
- const getFontSize = () => {
9
- const devicePixelRatio = window.devicePixelRatio;
8
+ var getFontSize = function getFontSize() {
9
+ var devicePixelRatio = window.devicePixelRatio;
10
10
  if (devicePixelRatio >= 1 && devicePixelRatio < 1.25) {
11
11
  return 16;
12
12
  } else if (devicePixelRatio >= 1.25 && devicePixelRatio < 1.5) {
@@ -17,7 +17,7 @@ const getFontSize = () => {
17
17
  return 40;
18
18
  }
19
19
  };
20
- const getSpacing = () => {
20
+ var getSpacing = function getSpacing() {
21
21
  if (devicePixelRatio >= 1 && devicePixelRatio < 1.25) {
22
22
  return 8;
23
23
  } else if (devicePixelRatio >= 1.25 && devicePixelRatio < 1.5) {
@@ -28,7 +28,7 @@ const getSpacing = () => {
28
28
  return 8;
29
29
  }
30
30
  };
31
- var _default = exports.default = (0, _material.createTheme)({
31
+ var _default = (0, _material.createTheme)({
32
32
  spacing: getSpacing(),
33
33
  components: {
34
34
  MuiButton: {
@@ -70,6 +70,7 @@ var _default = exports.default = (0, _material.createTheme)({
70
70
  // },
71
71
  // },
72
72
  },
73
+
73
74
  MuiAutocomplete: {
74
75
  styleOverrides: {
75
76
  root: {
@@ -248,4 +249,5 @@ var _default = exports.default = (0, _material.createTheme)({
248
249
  fontFamily: ["-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(",")
249
250
  // fontSize: getFontSize(),
250
251
  }
251
- });
252
+ });
253
+ exports.default = _default;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _material = require("@mui/material");
8
- var _default = exports.default = (0, _material.createTheme)({
8
+ var _default = (0, _material.createTheme)({
9
9
  // spacing: 4,
10
10
 
11
11
  overrides: {
@@ -82,4 +82,5 @@ var _default = exports.default = (0, _material.createTheme)({
82
82
  fontFamily: ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(','),
83
83
  fontSize: 10
84
84
  }
85
- });
85
+ });
86
+ exports.default = _default;
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _material = require("@mui/material");
8
- const getFontSize = () => {
9
- const devicePixelRatio = window.devicePixelRatio;
8
+ var getFontSize = function getFontSize() {
9
+ var devicePixelRatio = window.devicePixelRatio;
10
10
  if (devicePixelRatio >= 1 && devicePixelRatio < 1.25) {
11
11
  return 14;
12
12
  } else if (devicePixelRatio >= 1.25 && devicePixelRatio < 1.5) {
@@ -17,8 +17,8 @@ const getFontSize = () => {
17
17
  return 40;
18
18
  }
19
19
  };
20
- const getSpacing = () => {
21
- const devicePixelRatio = window.devicePixelRatio;
20
+ var getSpacing = function getSpacing() {
21
+ var devicePixelRatio = window.devicePixelRatio;
22
22
  if (devicePixelRatio >= 1 && devicePixelRatio < 1.25) {
23
23
  return 8;
24
24
  } else if (devicePixelRatio >= 1.25 && devicePixelRatio < 1.5) {
@@ -29,7 +29,7 @@ const getSpacing = () => {
29
29
  return 8;
30
30
  }
31
31
  };
32
- var _default = exports.default = (0, _material.createTheme)({
32
+ var _default = (0, _material.createTheme)({
33
33
  spacing: getSpacing(),
34
34
  components: {
35
35
  MuiButton: {
@@ -71,6 +71,7 @@ var _default = exports.default = (0, _material.createTheme)({
71
71
  // },
72
72
  // },
73
73
  },
74
+
74
75
  MuiAutocomplete: {
75
76
  styleOverrides: {
76
77
  root: {
@@ -245,4 +246,5 @@ var _default = exports.default = (0, _material.createTheme)({
245
246
  fontFamily: ["-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(","),
246
247
  fontSize: getFontSize()
247
248
  }
248
- });
249
+ });
250
+ exports.default = _default;