tenjin-ui-kit 0.3.72-dev-1 → 0.3.73
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/common/hooks/apiHooks.js +91 -199
- package/common/hooks/newApiHook.js +127 -258
- package/common/utils/security/index.js +2 -2
- package/common/utils/security/securityConfig.js +1 -2
- package/components/Canvas.js +172 -101
- package/components/DragBox/index.js +21 -31
- package/components/InputWithChip/index.js +178 -83
- package/components/RightContext/index.js +17 -41
- package/components/WorkFlow.js +19 -29
- package/components/WorkFlowBuilder.js +32 -56
- package/components/alert/Style.js +11 -14
- package/components/alert/index.js +8 -14
- package/components/attachment/index.js +26 -31
- package/components/authenticationProvider/AuthError.js +3 -4
- package/components/authenticationProvider/AuthLoader.js +3 -4
- package/components/authenticationProvider/index.js +58 -130
- package/components/avatar/index.js +24 -23
- package/components/avatar/styles.js +76 -77
- package/components/breadCrumbs/index.js +64 -89
- package/components/breadCrumbs/style.js +1 -4
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +7 -6
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +5 -8
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +7 -6
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +8 -7
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +8 -7
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +16 -19
- package/components/browsingTestCaseLayout/index.js +30 -46
- package/components/button/index.js +47 -58
- package/components/chatBotModal/index.js +40 -61
- package/components/checkBox/index.js +8 -10
- package/components/combobox/index.js +66 -100
- package/components/divider/index.js +9 -18
- package/components/editableField/index.js +19 -46
- package/components/error/index.js +6 -12
- package/components/errorBoundary/index.js +74 -98
- package/components/fileUploader/index.js +46 -58
- package/components/fileUploader/style.js +46 -49
- package/components/filter/ValueSelector.js +149 -245
- package/components/filter/index.js +45 -71
- package/components/iconButton/index.js +3 -4
- package/components/input/index.js +60 -74
- package/components/layout/index.js +36 -49
- package/components/layout/main/index.js +13 -14
- package/components/layout/main/style.js +11 -14
- package/components/layout/pageContent/index.js +8 -7
- package/components/layout/sidebar/FlatMenu.js +51 -47
- package/components/layout/sidebar/GroupedIconMenu.js +169 -194
- package/components/layout/sidebar/GroupedMenu.js +45 -50
- package/components/layout/sidebar/ProjectMenu.js +165 -185
- package/components/layout/sidebar/index.js +27 -26
- package/components/layout/sidebar/style.js +138 -143
- package/components/layout/topBar/ProjectTopbar.js +91 -208
- package/components/layout/topBar/UserAvatar.js +53 -69
- package/components/layout/topBar/index.js +23 -41
- package/components/loader/index.js +9 -12
- package/components/menu/index.js +23 -42
- package/components/modal/Modal.js +5 -6
- package/components/modal/index.js +16 -20
- package/components/modal/style.js +53 -56
- package/components/optionMenu/index.js +32 -47
- package/components/pagination/index.js +23 -43
- package/components/pagination/style.js +25 -28
- package/components/paginationUpdated/index.js +22 -29
- package/components/paper/index.js +20 -22
- package/components/paper/style.js +24 -27
- package/components/reactSelect/index.js +64 -97
- package/components/reactSelect/style.js +131 -151
- package/components/richTextEditor/index.js +24 -48
- package/components/select/GroupedSelect.js +96 -99
- package/components/select/SimpleSelect.js +61 -103
- package/components/select/index.js +56 -69
- package/components/simpleSelect/index.js +18 -22
- package/components/sort/index.js +23 -36
- package/components/switch/index.js +14 -15
- package/components/switch/style.js +29 -32
- package/components/switch/switch.js +30 -47
- package/components/table/ReactTable.js +59 -83
- package/components/table/SimpleTable.js +67 -91
- package/components/table/index.js +300 -206
- package/components/text/index.js +22 -30
- package/components/timeStamp/index.js +4 -9
- package/components/timeStamp/style.js +12 -15
- package/components/topBar/index.js +86 -102
- package/components/tree/index.js +30 -58
- package/components/tree/style.js +20 -23
- package/components/valuePicker/ValueSelector.js +78 -160
- package/components/valuePicker/index.js +30 -50
- package/components/wrapperLayout/layout/index.js +8 -7
- package/components/wrapperLayout/main/index.js +8 -7
- package/components/wrapperLayout/main/pageContainer/index.js +6 -5
- package/components/wrapperLayout/main/sideBar/index.js +171 -175
- package/components/wrapperLayout/main/sideBar/style.js +177 -183
- package/components/wrapperLayout/topBar/UserAvatar.js +6 -5
- package/components/wrapperLayout/topBar/avatar.js +15 -18
- package/components/wrapperLayout/topBar/index.js +115 -107
- package/components/wrapperLayout/topBar/menuIcon.js +6 -5
- package/components/wrapperLayout/topBar/style.js +63 -64
- package/http/index.js +92 -188
- package/index.js +53 -55
- package/package.json +3 -3
- package/templates/listPage/index.js +168 -196
- package/themes/default.js +5 -7
- package/themes/defaultSmall.js +2 -3
- package/themes/responsiveTheme.js +6 -8
|
@@ -1,6 +1,5 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,25 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
9
|
var _fi = require("react-icons/fi");
|
|
11
10
|
var _button = _interopRequireDefault(require("../../components/button"));
|
|
12
11
|
var _input = _interopRequireDefault(require("../../components/input"));
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function
|
|
15
|
-
|
|
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 = [{
|
|
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 = [{
|
|
32
15
|
name: "id",
|
|
33
16
|
displayName: "User ID"
|
|
34
17
|
}, {
|
|
@@ -40,15 +23,11 @@ var columns = [{
|
|
|
40
23
|
}, {
|
|
41
24
|
name: "address.city",
|
|
42
25
|
displayName: "City",
|
|
43
|
-
render:
|
|
44
|
-
return d.address.city;
|
|
45
|
-
}
|
|
26
|
+
render: d => d.address.city
|
|
46
27
|
}, {
|
|
47
28
|
name: "address.zipcode",
|
|
48
29
|
displayName: "Zip Code",
|
|
49
|
-
render:
|
|
50
|
-
return d.address.zipcode;
|
|
51
|
-
}
|
|
30
|
+
render: d => d.address.zipcode
|
|
52
31
|
}, {
|
|
53
32
|
name: "phone",
|
|
54
33
|
displayName: "Phone"
|
|
@@ -58,171 +37,172 @@ var columns = [{
|
|
|
58
37
|
}, {
|
|
59
38
|
name: "company.name",
|
|
60
39
|
displayName: "Company",
|
|
61
|
-
render:
|
|
62
|
-
return d.company.name;
|
|
63
|
-
}
|
|
40
|
+
render: d => d.company.name
|
|
64
41
|
}];
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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"
|
|
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"
|
|
91
62
|
}
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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"
|
|
113
84
|
}
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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"
|
|
135
106
|
}
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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"
|
|
157
128
|
}
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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"
|
|
179
150
|
}
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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"
|
|
201
172
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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)(() => {
|
|
208
184
|
search();
|
|
209
185
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
210
186
|
}, [data.unfiltered, data.filter]);
|
|
211
|
-
|
|
187
|
+
const search = () => {
|
|
212
188
|
if (data.filter) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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()}`;
|
|
217
195
|
return mergedData.includes(filter.toLowerCase());
|
|
218
196
|
});
|
|
219
|
-
setData(
|
|
197
|
+
setData({
|
|
198
|
+
...data,
|
|
220
199
|
filtered: newFiltered
|
|
221
|
-
})
|
|
200
|
+
});
|
|
222
201
|
} else {
|
|
223
|
-
setData(
|
|
224
|
-
|
|
225
|
-
|
|
202
|
+
setData({
|
|
203
|
+
...data,
|
|
204
|
+
filtered: [...data.unfiltered]
|
|
205
|
+
});
|
|
226
206
|
}
|
|
227
207
|
};
|
|
228
208
|
return /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
@@ -268,11 +248,10 @@ var ListPage = function ListPage(_ref) {
|
|
|
268
248
|
}, /*#__PURE__*/_react.default.createElement(_input.default, {
|
|
269
249
|
fullWidth: true,
|
|
270
250
|
placeholder: "Search by ID, name or Email",
|
|
271
|
-
onChange:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
},
|
|
251
|
+
onChange: e => setData({
|
|
252
|
+
...data,
|
|
253
|
+
filter: e.target.value
|
|
254
|
+
}),
|
|
276
255
|
value: data.filter,
|
|
277
256
|
disableAutocomplete: true,
|
|
278
257
|
startIcon: /*#__PURE__*/_react.default.createElement(_fi.FiSearch, null)
|
|
@@ -283,19 +262,12 @@ var ListPage = function ListPage(_ref) {
|
|
|
283
262
|
xs: 12
|
|
284
263
|
}, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, {
|
|
285
264
|
"aria-label": pageTitle
|
|
286
|
-
}, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns.map(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
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
|
-
}))))));
|
|
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]))))))))));
|
|
299
272
|
};
|
|
300
|
-
var _default = ListPage;
|
|
301
|
-
exports.default = _default;
|
|
273
|
+
var _default = exports.default = ListPage;
|
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
|
+
const getFontSize = () => {
|
|
9
|
+
const 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 @@ var getFontSize = function getFontSize() {
|
|
|
17
17
|
return 40;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
const 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 @@ var getSpacing = function getSpacing() {
|
|
|
28
28
|
return 8;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
var _default = (0, _material.createTheme)({
|
|
31
|
+
var _default = exports.default = (0, _material.createTheme)({
|
|
32
32
|
spacing: getSpacing(),
|
|
33
33
|
components: {
|
|
34
34
|
MuiButton: {
|
|
@@ -70,7 +70,6 @@ var _default = (0, _material.createTheme)({
|
|
|
70
70
|
// },
|
|
71
71
|
// },
|
|
72
72
|
},
|
|
73
|
-
|
|
74
73
|
MuiAutocomplete: {
|
|
75
74
|
styleOverrides: {
|
|
76
75
|
root: {
|
|
@@ -249,5 +248,4 @@ var _default = (0, _material.createTheme)({
|
|
|
249
248
|
fontFamily: ["-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(",")
|
|
250
249
|
// fontSize: getFontSize(),
|
|
251
250
|
}
|
|
252
|
-
});
|
|
253
|
-
exports.default = _default;
|
|
251
|
+
});
|
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 = (0, _material.createTheme)({
|
|
8
|
+
var _default = exports.default = (0, _material.createTheme)({
|
|
9
9
|
// spacing: 4,
|
|
10
10
|
|
|
11
11
|
overrides: {
|
|
@@ -82,5 +82,4 @@ var _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
|
-
});
|
|
86
|
-
exports.default = _default;
|
|
85
|
+
});
|
|
@@ -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
|
+
const getFontSize = () => {
|
|
9
|
+
const 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 @@ var getFontSize = function getFontSize() {
|
|
|
17
17
|
return 40;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const getSpacing = () => {
|
|
21
|
+
const 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 @@ var getSpacing = function getSpacing() {
|
|
|
29
29
|
return 8;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
var _default = (0, _material.createTheme)({
|
|
32
|
+
var _default = exports.default = (0, _material.createTheme)({
|
|
33
33
|
spacing: getSpacing(),
|
|
34
34
|
components: {
|
|
35
35
|
MuiButton: {
|
|
@@ -71,7 +71,6 @@ var _default = (0, _material.createTheme)({
|
|
|
71
71
|
// },
|
|
72
72
|
// },
|
|
73
73
|
},
|
|
74
|
-
|
|
75
74
|
MuiAutocomplete: {
|
|
76
75
|
styleOverrides: {
|
|
77
76
|
root: {
|
|
@@ -246,5 +245,4 @@ var _default = (0, _material.createTheme)({
|
|
|
246
245
|
fontFamily: ["-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(","),
|
|
247
246
|
fontSize: getFontSize()
|
|
248
247
|
}
|
|
249
|
-
});
|
|
250
|
-
exports.default = _default;
|
|
248
|
+
});
|