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.
- package/README.md +13 -13
- package/common/hooks/apiHooks.js +199 -91
- package/common/hooks/newApiHook.js +258 -127
- package/common/utils/security/index.js +2 -2
- package/common/utils/security/securityConfig.js +2 -1
- package/components/Canvas.js +101 -172
- package/components/DragBox/index.js +31 -21
- package/components/InputWithChip/index.js +83 -178
- package/components/RightContext/index.css +20 -20
- package/components/RightContext/index.js +41 -17
- package/components/WorkFlow.js +29 -19
- package/components/WorkFlowBuilder.js +56 -32
- package/components/alert/Style.js +14 -11
- package/components/alert/index.js +14 -8
- package/components/attachment/index.js +31 -26
- package/components/authenticationProvider/AuthError.js +4 -3
- package/components/authenticationProvider/AuthLoader.js +4 -3
- package/components/authenticationProvider/index.js +130 -58
- package/components/avatar/index.js +23 -24
- package/components/avatar/styles.js +77 -76
- package/components/breadCrumbs/index.js +89 -64
- package/components/breadCrumbs/style.js +4 -1
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -7
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +6 -7
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +7 -8
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +7 -8
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
- package/components/browsingTestCaseLayout/index.js +46 -30
- package/components/browsingTestCaseLayout/style.css +82 -82
- package/components/button/index.js +58 -47
- package/components/chatBotModal/index.js +61 -40
- package/components/checkBox/index.js +10 -8
- package/components/combobox/index.js +216 -182
- package/components/divider/index.js +18 -9
- package/components/editableField/index.js +46 -19
- package/components/error/index.js +12 -6
- package/components/errorBoundary/index.js +98 -74
- package/components/fileUploader/index.js +58 -46
- package/components/fileUploader/style.js +49 -46
- package/components/filter/ValueSelector.js +243 -148
- package/components/filter/index.js +66 -43
- package/components/iconButton/index.js +4 -3
- package/components/input/index.js +74 -60
- package/components/layout/index.js +49 -36
- package/components/layout/main/index.js +14 -13
- package/components/layout/main/style.js +14 -11
- package/components/layout/pageContent/index.js +7 -8
- package/components/layout/sidebar/FlatMenu.js +47 -51
- package/components/layout/sidebar/GroupedIconMenu.js +194 -169
- package/components/layout/sidebar/GroupedMenu.js +50 -45
- package/components/layout/sidebar/ProjectMenu.js +185 -165
- package/components/layout/sidebar/index.js +26 -27
- package/components/layout/sidebar/style.js +143 -138
- package/components/layout/topBar/ProjectTopbar.js +119 -86
- package/components/layout/topBar/UserAvatar.js +65 -51
- package/components/layout/topBar/index.js +41 -23
- package/components/loader/index.js +12 -9
- package/components/menu/index.js +42 -23
- package/components/modal/Modal.js +6 -5
- package/components/modal/index.js +20 -16
- package/components/modal/style.js +56 -53
- package/components/optionMenu/index.js +72 -57
- package/components/pagination/index.js +43 -23
- package/components/pagination/style.js +28 -25
- package/components/paginationUpdated/index.js +26 -19
- package/components/paper/index.js +22 -20
- package/components/paper/style.js +27 -24
- package/components/reactSelect/index.js +97 -64
- package/components/reactSelect/style.js +151 -131
- package/components/richTextEditor/index.js +48 -24
- package/components/select/GroupedSelect.js +100 -56
- package/components/select/SimpleSelect.js +99 -59
- package/components/select/index.js +69 -56
- package/components/simpleSelect/index.js +22 -18
- package/components/sort/index.js +36 -23
- package/components/switch/index.js +15 -14
- package/components/switch/style.js +32 -29
- package/components/switch/switch.js +47 -30
- package/components/table/ReactTable.js +83 -59
- package/components/table/SimpleTable.js +91 -67
- package/components/table/index.js +206 -300
- package/components/text/index.js +30 -22
- package/components/timeStamp/index.js +6 -4
- package/components/timeStamp/style.js +15 -12
- package/components/topBar/index.js +102 -86
- package/components/tree/index.js +58 -30
- package/components/tree/style.js +23 -20
- package/components/valuePicker/ValueSelector.js +160 -78
- package/components/valuePicker/index.js +50 -30
- package/components/wrapperLayout/layout/index.js +7 -8
- package/components/wrapperLayout/main/index.js +7 -8
- package/components/wrapperLayout/main/pageContainer/index.js +5 -6
- package/components/wrapperLayout/main/sideBar/index.js +175 -171
- package/components/wrapperLayout/main/sideBar/style.js +183 -177
- package/components/wrapperLayout/topBar/UserAvatar.js +5 -6
- package/components/wrapperLayout/topBar/avatar.js +18 -15
- package/components/wrapperLayout/topBar/index.js +107 -115
- package/components/wrapperLayout/topBar/menuIcon.js +5 -6
- package/components/wrapperLayout/topBar/style.js +64 -63
- package/http/index.js +188 -92
- package/index.js +55 -53
- package/package.json +124 -125
- package/templates/listPage/index.js +196 -168
- package/themes/default.js +7 -5
- package/themes/defaultSmall.js +3 -2
- package/themes/responsiveTheme.js +8 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -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(
|
|
13
|
-
function
|
|
14
|
-
|
|
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
|
|
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
|
|
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
|
|
61
|
+
render: function render(d) {
|
|
62
|
+
return d.company.name;
|
|
63
|
+
}
|
|
41
64
|
}];
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
-
|
|
211
|
+
var search = function search() {
|
|
188
212
|
if (data.filter) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
|
|
204
|
-
|
|
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
|
|
252
|
-
|
|
253
|
-
|
|
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(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
|
|
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 =
|
|
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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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 =
|
|
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;
|
package/themes/defaultSmall.js
CHANGED
|
@@ -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 =
|
|
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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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 =
|
|
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;
|