tenjin-ui-kit 0.3.72-dev → 0.3.72-dev-1
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 +182 -114
- package/common/hooks/newApiHook.js +225 -143
- package/common/utils/security/index.js +2 -2
- package/common/utils/security/securityConfig.js +2 -1
- package/components/Canvas.js +88 -164
- package/components/DragBox/index.js +26 -21
- package/components/InputWithChip/index.js +57 -164
- package/components/RightContext/index.js +28 -19
- package/components/WorkFlow.js +23 -18
- package/components/WorkFlowBuilder.js +48 -33
- package/components/alert/Style.js +14 -11
- package/components/alert/index.js +12 -10
- package/components/attachment/index.js +28 -21
- package/components/authenticationProvider/AuthError.js +4 -3
- package/components/authenticationProvider/AuthLoader.js +4 -3
- package/components/authenticationProvider/index.js +116 -60
- package/components/avatar/index.js +14 -13
- package/components/avatar/styles.js +77 -74
- package/components/breadCrumbs/index.js +53 -42
- package/components/breadCrumbs/style.js +4 -1
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +5 -4
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +5 -4
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +6 -5
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
- package/components/browsingTestCaseLayout/index.js +30 -25
- package/components/button/index.js +43 -36
- package/components/chatBotModal/index.js +45 -36
- package/components/checkBox/index.js +9 -8
- package/components/combobox/index.js +72 -51
- package/components/divider/index.js +18 -14
- package/components/editableField/index.js +28 -19
- package/components/error/index.js +12 -6
- package/components/errorBoundary/index.js +94 -74
- package/components/fileUploader/index.js +35 -30
- package/components/fileUploader/style.js +49 -46
- package/components/filter/ValueSelector.js +210 -137
- package/components/filter/index.js +39 -29
- package/components/iconButton/index.js +4 -3
- package/components/input/index.js +38 -31
- package/components/layout/index.js +31 -27
- package/components/layout/main/index.js +13 -10
- package/components/layout/main/style.js +14 -11
- package/components/layout/pageContent/index.js +7 -6
- package/components/layout/sidebar/FlatMenu.js +43 -43
- package/components/layout/sidebar/GroupedIconMenu.js +108 -95
- package/components/layout/sidebar/GroupedMenu.js +48 -38
- package/components/layout/sidebar/ProjectMenu.js +116 -109
- package/components/layout/sidebar/index.js +18 -15
- package/components/layout/sidebar/style.js +143 -138
- package/components/layout/topBar/ProjectTopbar.js +138 -104
- package/components/layout/topBar/UserAvatar.js +60 -51
- package/components/layout/topBar/index.js +33 -22
- package/components/loader/index.js +12 -9
- package/components/menu/index.js +35 -26
- package/components/modal/Modal.js +6 -5
- package/components/modal/index.js +13 -10
- package/components/modal/style.js +56 -53
- package/components/optionMenu/index.js +41 -34
- package/components/pagination/index.js +39 -24
- package/components/pagination/style.js +28 -25
- package/components/paginationUpdated/index.js +16 -14
- package/components/paper/index.js +16 -15
- package/components/paper/style.js +27 -24
- package/components/reactSelect/index.js +63 -46
- package/components/reactSelect/style.js +150 -117
- package/components/richTextEditor/index.js +44 -25
- package/components/select/GroupedSelect.js +61 -45
- package/components/select/SimpleSelect.js +82 -52
- package/components/select/index.js +54 -38
- package/components/simpleSelect/index.js +15 -12
- package/components/sort/index.js +22 -19
- package/components/switch/index.js +11 -10
- package/components/switch/style.js +32 -29
- package/components/switch/switch.js +23 -17
- package/components/table/ReactTable.js +71 -54
- package/components/table/SimpleTable.js +78 -59
- package/components/table/index.js +186 -311
- package/components/text/index.js +17 -15
- package/components/timeStamp/index.js +9 -4
- package/components/timeStamp/style.js +15 -12
- package/components/topBar/index.js +92 -85
- package/components/tree/index.js +47 -29
- package/components/tree/style.js +23 -20
- package/components/valuePicker/ValueSelector.js +138 -70
- package/components/valuePicker/index.js +26 -19
- package/components/wrapperLayout/layout/index.js +5 -4
- package/components/wrapperLayout/main/index.js +5 -4
- package/components/wrapperLayout/main/pageContainer/index.js +5 -4
- package/components/wrapperLayout/main/sideBar/index.js +110 -120
- package/components/wrapperLayout/main/sideBar/style.js +183 -177
- package/components/wrapperLayout/topBar/UserAvatar.js +5 -4
- package/components/wrapperLayout/topBar/avatar.js +12 -10
- package/components/wrapperLayout/topBar/index.js +97 -111
- package/components/wrapperLayout/topBar/menuIcon.js +5 -4
- package/components/wrapperLayout/topBar/style.js +64 -61
- package/http/index.js +184 -91
- package/index.js +55 -53
- package/package.json +2 -4
- package/templates/listPage/index.js +57 -36
- package/themes/default.js +7 -5
- package/themes/defaultSmall.js +3 -2
- package/themes/responsiveTheme.js +8 -6
package/index.js
CHANGED
|
@@ -1,311 +1,312 @@
|
|
|
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
|
});
|
|
6
7
|
Object.defineProperty(exports, "Alert", {
|
|
7
8
|
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
+
get: function get() {
|
|
9
10
|
return _alert.default;
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
Object.defineProperty(exports, "AuthenticationProvider", {
|
|
13
14
|
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
+
get: function get() {
|
|
15
16
|
return _authenticationProvider.default;
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
19
|
Object.defineProperty(exports, "Avatar", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
+
get: function get() {
|
|
21
22
|
return _avatar.default;
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
Object.defineProperty(exports, "BreadCrumbs", {
|
|
25
26
|
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
+
get: function get() {
|
|
27
28
|
return _breadCrumbs.default;
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
Object.defineProperty(exports, "BrowsingTestCaseLayout", {
|
|
31
32
|
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
+
get: function get() {
|
|
33
34
|
return _browsingTestCaseLayout.default;
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
Object.defineProperty(exports, "Button", {
|
|
37
38
|
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
+
get: function get() {
|
|
39
40
|
return _button.default;
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(exports, "ChatBotModal", {
|
|
43
44
|
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
+
get: function get() {
|
|
45
46
|
return _chatBotModal.default;
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "CheckBox", {
|
|
49
50
|
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
+
get: function get() {
|
|
51
52
|
return _checkBox.default;
|
|
52
53
|
}
|
|
53
54
|
});
|
|
54
55
|
Object.defineProperty(exports, "Divider", {
|
|
55
56
|
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
+
get: function get() {
|
|
57
58
|
return _divider.default;
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
Object.defineProperty(exports, "EditableField", {
|
|
61
62
|
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
+
get: function get() {
|
|
63
64
|
return _editableField.default;
|
|
64
65
|
}
|
|
65
66
|
});
|
|
66
67
|
Object.defineProperty(exports, "Error", {
|
|
67
68
|
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
+
get: function get() {
|
|
69
70
|
return _error.default;
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
Object.defineProperty(exports, "ErrorBoundary", {
|
|
73
74
|
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
+
get: function get() {
|
|
75
76
|
return _errorBoundary.default;
|
|
76
77
|
}
|
|
77
78
|
});
|
|
78
79
|
Object.defineProperty(exports, "FileUploader", {
|
|
79
80
|
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
+
get: function get() {
|
|
81
82
|
return _fileUploader.default;
|
|
82
83
|
}
|
|
83
84
|
});
|
|
84
85
|
Object.defineProperty(exports, "Filter", {
|
|
85
86
|
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
+
get: function get() {
|
|
87
88
|
return _filter.default;
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
Object.defineProperty(exports, "GroupSimpleSelect", {
|
|
91
92
|
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
+
get: function get() {
|
|
93
94
|
return _GroupedSelect.default;
|
|
94
95
|
}
|
|
95
96
|
});
|
|
96
97
|
Object.defineProperty(exports, "GroupedSelect", {
|
|
97
98
|
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
+
get: function get() {
|
|
99
100
|
return _GroupedSelect.default;
|
|
100
101
|
}
|
|
101
102
|
});
|
|
102
103
|
Object.defineProperty(exports, "IconButton", {
|
|
103
104
|
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
+
get: function get() {
|
|
105
106
|
return _iconButton.default;
|
|
106
107
|
}
|
|
107
108
|
});
|
|
108
109
|
Object.defineProperty(exports, "Input", {
|
|
109
110
|
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
+
get: function get() {
|
|
111
112
|
return _input.default;
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
Object.defineProperty(exports, "InputWithChip", {
|
|
115
116
|
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
+
get: function get() {
|
|
117
118
|
return _InputWithChip.default;
|
|
118
119
|
}
|
|
119
120
|
});
|
|
120
121
|
Object.defineProperty(exports, "Layout", {
|
|
121
122
|
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
+
get: function get() {
|
|
123
124
|
return _layout.default;
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
Object.defineProperty(exports, "Modal", {
|
|
127
128
|
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
+
get: function get() {
|
|
129
130
|
return _modal.default;
|
|
130
131
|
}
|
|
131
132
|
});
|
|
132
133
|
Object.defineProperty(exports, "OptionMenu", {
|
|
133
134
|
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
+
get: function get() {
|
|
135
136
|
return _optionMenu.default;
|
|
136
137
|
}
|
|
137
138
|
});
|
|
138
139
|
Object.defineProperty(exports, "Pagination", {
|
|
139
140
|
enumerable: true,
|
|
140
|
-
get: function () {
|
|
141
|
+
get: function get() {
|
|
141
142
|
return _paginationUpdated.default;
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
Object.defineProperty(exports, "Paper", {
|
|
145
146
|
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
+
get: function get() {
|
|
147
148
|
return _paper.default;
|
|
148
149
|
}
|
|
149
150
|
});
|
|
150
151
|
Object.defineProperty(exports, "ReactSelect", {
|
|
151
152
|
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
+
get: function get() {
|
|
153
154
|
return _reactSelect.default;
|
|
154
155
|
}
|
|
155
156
|
});
|
|
156
157
|
Object.defineProperty(exports, "ReactTable", {
|
|
157
158
|
enumerable: true,
|
|
158
|
-
get: function () {
|
|
159
|
+
get: function get() {
|
|
159
160
|
return _ReactTable.default;
|
|
160
161
|
}
|
|
161
162
|
});
|
|
162
163
|
Object.defineProperty(exports, "RichTextEditor", {
|
|
163
164
|
enumerable: true,
|
|
164
|
-
get: function () {
|
|
165
|
+
get: function get() {
|
|
165
166
|
return _richTextEditor.default;
|
|
166
167
|
}
|
|
167
168
|
});
|
|
168
169
|
Object.defineProperty(exports, "Select", {
|
|
169
170
|
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
+
get: function get() {
|
|
171
172
|
return _select.default;
|
|
172
173
|
}
|
|
173
174
|
});
|
|
174
175
|
Object.defineProperty(exports, "SimpleSelect", {
|
|
175
176
|
enumerable: true,
|
|
176
|
-
get: function () {
|
|
177
|
+
get: function get() {
|
|
177
178
|
return _SimpleSelect.default;
|
|
178
179
|
}
|
|
179
180
|
});
|
|
180
181
|
Object.defineProperty(exports, "SimpleTable", {
|
|
181
182
|
enumerable: true,
|
|
182
|
-
get: function () {
|
|
183
|
+
get: function get() {
|
|
183
184
|
return _SimpleTable.default;
|
|
184
185
|
}
|
|
185
186
|
});
|
|
186
187
|
Object.defineProperty(exports, "Sort", {
|
|
187
188
|
enumerable: true,
|
|
188
|
-
get: function () {
|
|
189
|
+
get: function get() {
|
|
189
190
|
return _sort.default;
|
|
190
191
|
}
|
|
191
192
|
});
|
|
192
193
|
Object.defineProperty(exports, "Switch", {
|
|
193
194
|
enumerable: true,
|
|
194
|
-
get: function () {
|
|
195
|
+
get: function get() {
|
|
195
196
|
return _switch.default;
|
|
196
197
|
}
|
|
197
198
|
});
|
|
198
199
|
Object.defineProperty(exports, "SystemContext", {
|
|
199
200
|
enumerable: true,
|
|
200
|
-
get: function () {
|
|
201
|
+
get: function get() {
|
|
201
202
|
return _authenticationProvider.SystemContext;
|
|
202
203
|
}
|
|
203
204
|
});
|
|
204
205
|
Object.defineProperty(exports, "Table", {
|
|
205
206
|
enumerable: true,
|
|
206
|
-
get: function () {
|
|
207
|
+
get: function get() {
|
|
207
208
|
return _table.default;
|
|
208
209
|
}
|
|
209
210
|
});
|
|
210
211
|
Object.defineProperty(exports, "Text", {
|
|
211
212
|
enumerable: true,
|
|
212
|
-
get: function () {
|
|
213
|
+
get: function get() {
|
|
213
214
|
return _text.default;
|
|
214
215
|
}
|
|
215
216
|
});
|
|
216
217
|
Object.defineProperty(exports, "TimeStamp", {
|
|
217
218
|
enumerable: true,
|
|
218
|
-
get: function () {
|
|
219
|
+
get: function get() {
|
|
219
220
|
return _timeStamp.default;
|
|
220
221
|
}
|
|
221
222
|
});
|
|
222
223
|
Object.defineProperty(exports, "ValuePicker", {
|
|
223
224
|
enumerable: true,
|
|
224
|
-
get: function () {
|
|
225
|
+
get: function get() {
|
|
225
226
|
return _valuePicker.default;
|
|
226
227
|
}
|
|
227
228
|
});
|
|
228
229
|
Object.defineProperty(exports, "defaultTheme", {
|
|
229
230
|
enumerable: true,
|
|
230
|
-
get: function () {
|
|
231
|
+
get: function get() {
|
|
231
232
|
return _default.default;
|
|
232
233
|
}
|
|
233
234
|
});
|
|
234
235
|
Object.defineProperty(exports, "doDelete", {
|
|
235
236
|
enumerable: true,
|
|
236
|
-
get: function () {
|
|
237
|
+
get: function get() {
|
|
237
238
|
return _http.doDelete;
|
|
238
239
|
}
|
|
239
240
|
});
|
|
240
241
|
Object.defineProperty(exports, "get", {
|
|
241
242
|
enumerable: true,
|
|
242
|
-
get: function () {
|
|
243
|
+
get: function get() {
|
|
243
244
|
return _http.get;
|
|
244
245
|
}
|
|
245
246
|
});
|
|
246
247
|
Object.defineProperty(exports, "getClient", {
|
|
247
248
|
enumerable: true,
|
|
248
|
-
get: function () {
|
|
249
|
+
get: function get() {
|
|
249
250
|
return _http.getClient;
|
|
250
251
|
}
|
|
251
252
|
});
|
|
252
253
|
Object.defineProperty(exports, "getSecureClient", {
|
|
253
254
|
enumerable: true,
|
|
254
|
-
get: function () {
|
|
255
|
+
get: function get() {
|
|
255
256
|
return _http.getSecureClient;
|
|
256
257
|
}
|
|
257
258
|
});
|
|
258
259
|
Object.defineProperty(exports, "parseAxiosError", {
|
|
259
260
|
enumerable: true,
|
|
260
|
-
get: function () {
|
|
261
|
+
get: function get() {
|
|
261
262
|
return _http.parseAxiosError;
|
|
262
263
|
}
|
|
263
264
|
});
|
|
264
265
|
Object.defineProperty(exports, "post", {
|
|
265
266
|
enumerable: true,
|
|
266
|
-
get: function () {
|
|
267
|
+
get: function get() {
|
|
267
268
|
return _http.post;
|
|
268
269
|
}
|
|
269
270
|
});
|
|
270
271
|
Object.defineProperty(exports, "postClient", {
|
|
271
272
|
enumerable: true,
|
|
272
|
-
get: function () {
|
|
273
|
+
get: function get() {
|
|
273
274
|
return _http.postClient;
|
|
274
275
|
}
|
|
275
276
|
});
|
|
276
277
|
Object.defineProperty(exports, "put", {
|
|
277
278
|
enumerable: true,
|
|
278
|
-
get: function () {
|
|
279
|
+
get: function get() {
|
|
279
280
|
return _http.put;
|
|
280
281
|
}
|
|
281
282
|
});
|
|
282
283
|
Object.defineProperty(exports, "useAPI", {
|
|
283
284
|
enumerable: true,
|
|
284
|
-
get: function () {
|
|
285
|
+
get: function get() {
|
|
285
286
|
return _newApiHook.default;
|
|
286
287
|
}
|
|
287
288
|
});
|
|
288
289
|
Object.defineProperty(exports, "useDelete", {
|
|
289
290
|
enumerable: true,
|
|
290
|
-
get: function () {
|
|
291
|
+
get: function get() {
|
|
291
292
|
return _apiHooks.useDelete;
|
|
292
293
|
}
|
|
293
294
|
});
|
|
294
295
|
Object.defineProperty(exports, "useFetch", {
|
|
295
296
|
enumerable: true,
|
|
296
|
-
get: function () {
|
|
297
|
+
get: function get() {
|
|
297
298
|
return _apiHooks.useFetch;
|
|
298
299
|
}
|
|
299
300
|
});
|
|
300
301
|
Object.defineProperty(exports, "usePost", {
|
|
301
302
|
enumerable: true,
|
|
302
|
-
get: function () {
|
|
303
|
+
get: function get() {
|
|
303
304
|
return _apiHooks.usePost;
|
|
304
305
|
}
|
|
305
306
|
});
|
|
306
307
|
Object.defineProperty(exports, "usePut", {
|
|
307
308
|
enumerable: true,
|
|
308
|
-
get: function () {
|
|
309
|
+
get: function get() {
|
|
309
310
|
return _apiHooks.usePut;
|
|
310
311
|
}
|
|
311
312
|
});
|
|
@@ -348,5 +349,6 @@ var _text = _interopRequireDefault(require("./components/text"));
|
|
|
348
349
|
var _sort = _interopRequireDefault(require("./components/sort"));
|
|
349
350
|
var _filter = _interopRequireDefault(require("./components/filter"));
|
|
350
351
|
var _chatBotModal = _interopRequireDefault(require("./components/chatBotModal"));
|
|
351
|
-
function
|
|
352
|
-
function
|
|
352
|
+
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); }
|
|
353
|
+
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; }
|
|
354
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tenjin-ui-kit",
|
|
3
|
-
"version": "0.3.72-dev",
|
|
3
|
+
"version": "0.3.72-dev-1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://gitlab.com/yethi/react/tenjin-ui-kit.git"
|
|
6
6
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"clean": "rimraf dist",
|
|
52
52
|
"compile": "npm run clean && cross-env NODE_ENV=production babel src/package --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__",
|
|
53
53
|
"copy-and-publish-dev": "copy package.json dist && copy README.md dist && cd dist && npm publish --tag dev",
|
|
54
|
-
"copy-and-publish": "copy package.json dist && copy README.md dist && cd dist && npm publish",
|
|
54
|
+
"copy-and-publish": "copy package.json dist && copy README.md dist && cd dist && npm publish --tag latest",
|
|
55
55
|
"publish-dev": "npm-run-all compile copy-and-publish-dev",
|
|
56
56
|
"publish-prod": "npm-run-all compile copy-and-publish"
|
|
57
57
|
},
|
|
@@ -101,10 +101,8 @@
|
|
|
101
101
|
"@storybook/preset-create-react-app": "^4.1.2",
|
|
102
102
|
"@storybook/react": "^6.5.15",
|
|
103
103
|
"@storybook/testing-library": "^0.0.13",
|
|
104
|
-
"ajv": "^8.20.0",
|
|
105
104
|
"babel-plugin-named-exports-order": "^0.0.2",
|
|
106
105
|
"cross-env": "^7.0.3",
|
|
107
|
-
"postcss": "^8.5.15",
|
|
108
106
|
"prop-types": "^15.8.1",
|
|
109
107
|
"react": "^18.2.0",
|
|
110
108
|
"react-dom": "^18.2.0",
|
|
@@ -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,20 +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
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
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(); }
|
|
20
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."); }
|
|
21
|
-
function _unsupportedIterableToArray(
|
|
22
|
-
function _arrayLikeToArray(
|
|
23
|
-
function _iterableToArrayLimit(
|
|
24
|
-
function _arrayWithHoles(
|
|
25
|
-
|
|
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 = [{
|
|
26
32
|
name: "id",
|
|
27
33
|
displayName: "User ID"
|
|
28
34
|
}, {
|
|
@@ -34,11 +40,15 @@ const columns = [{
|
|
|
34
40
|
}, {
|
|
35
41
|
name: "address.city",
|
|
36
42
|
displayName: "City",
|
|
37
|
-
render: d
|
|
43
|
+
render: function render(d) {
|
|
44
|
+
return d.address.city;
|
|
45
|
+
}
|
|
38
46
|
}, {
|
|
39
47
|
name: "address.zipcode",
|
|
40
48
|
displayName: "Zip Code",
|
|
41
|
-
render: d
|
|
49
|
+
render: function render(d) {
|
|
50
|
+
return d.address.zipcode;
|
|
51
|
+
}
|
|
42
52
|
}, {
|
|
43
53
|
name: "phone",
|
|
44
54
|
displayName: "Phone"
|
|
@@ -48,11 +58,13 @@ const columns = [{
|
|
|
48
58
|
}, {
|
|
49
59
|
name: "company.name",
|
|
50
60
|
displayName: "Company",
|
|
51
|
-
render: d
|
|
61
|
+
render: function render(d) {
|
|
62
|
+
return d.company.name;
|
|
63
|
+
}
|
|
52
64
|
}];
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
var ListPage = function ListPage(_ref) {
|
|
66
|
+
var pageTitle = _ref.pageTitle;
|
|
67
|
+
var _useState = (0, _react.useState)({
|
|
56
68
|
filtered: [],
|
|
57
69
|
filter: null,
|
|
58
70
|
unfiltered: [{
|
|
@@ -192,16 +204,16 @@ const ListPage = _ref => {
|
|
|
192
204
|
_useState2 = _slicedToArray(_useState, 2),
|
|
193
205
|
data = _useState2[0],
|
|
194
206
|
setData = _useState2[1];
|
|
195
|
-
(0, _react.useEffect)(()
|
|
207
|
+
(0, _react.useEffect)(function () {
|
|
196
208
|
search();
|
|
197
209
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
198
210
|
}, [data.unfiltered, data.filter]);
|
|
199
|
-
|
|
211
|
+
var search = function search() {
|
|
200
212
|
if (data.filter) {
|
|
201
|
-
|
|
213
|
+
var filter = data.filter,
|
|
202
214
|
unfiltered = data.unfiltered;
|
|
203
|
-
|
|
204
|
-
|
|
215
|
+
var newFiltered = unfiltered.filter(function (u) {
|
|
216
|
+
var mergedData = "".concat(u.id).concat(u.username.toLowerCase()).concat(u.email.toLowerCase());
|
|
205
217
|
return mergedData.includes(filter.toLowerCase());
|
|
206
218
|
});
|
|
207
219
|
setData(_objectSpread(_objectSpread({}, data), {}, {
|
|
@@ -209,7 +221,7 @@ const ListPage = _ref => {
|
|
|
209
221
|
}));
|
|
210
222
|
} else {
|
|
211
223
|
setData(_objectSpread(_objectSpread({}, data), {}, {
|
|
212
|
-
filtered:
|
|
224
|
+
filtered: _toConsumableArray(data.unfiltered)
|
|
213
225
|
}));
|
|
214
226
|
}
|
|
215
227
|
};
|
|
@@ -256,9 +268,11 @@ const ListPage = _ref => {
|
|
|
256
268
|
}, /*#__PURE__*/_react.default.createElement(_input.default, {
|
|
257
269
|
fullWidth: true,
|
|
258
270
|
placeholder: "Search by ID, name or Email",
|
|
259
|
-
onChange:
|
|
260
|
-
|
|
261
|
-
|
|
271
|
+
onChange: function onChange(e) {
|
|
272
|
+
return setData(_objectSpread(_objectSpread({}, data), {}, {
|
|
273
|
+
filter: e.target.value
|
|
274
|
+
}));
|
|
275
|
+
},
|
|
262
276
|
value: data.filter,
|
|
263
277
|
disableAutocomplete: true,
|
|
264
278
|
startIcon: /*#__PURE__*/_react.default.createElement(_fi.FiSearch, null)
|
|
@@ -269,12 +283,19 @@ const ListPage = _ref => {
|
|
|
269
283
|
xs: 12
|
|
270
284
|
}, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, {
|
|
271
285
|
"aria-label": pageTitle
|
|
272
|
-
}, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns.map(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
|
|
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
|
+
}))))));
|
|
279
299
|
};
|
|
280
|
-
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;
|