@controleonline/ui-default 1.0.264 → 1.0.266
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/AGENTS.md +3 -2
- package/package.json +21 -18
- package/src/react/components/errors/DefaultErrors.js +64 -82
- package/src/react/components/filters/CompactFilterSelector.js +58 -23
- package/src/react/components/filters/CompactFilterSelector.styles.js +17 -5
- package/src/react/components/filters/DefaultColumnFilter.js +177 -45
- package/src/react/components/filters/DefaultExternalFilters.js +201 -143
- package/src/react/components/filters/DefaultSearch.js +27 -25
- package/src/react/components/form/DefaultForm.js +72 -53
- package/src/react/components/form/DefaultForm.styles.js +71 -66
- package/src/react/components/inputs/DefaultDateInput.js +150 -0
- package/src/react/components/inputs/DefaultInput.js +44 -11
- package/src/react/components/inputs/DefaultInput.styles.js +6 -0
- package/src/react/components/inputs/DefaultSelect.js +200 -43
- package/src/react/components/inputs/defaultInputUtils.js +40 -19
- package/src/react/components/table/DefaultColumnMenu.js +108 -0
- package/src/react/components/table/DefaultDebug.js +234 -0
- package/src/react/components/table/DefaultFiltersModal.js +142 -0
- package/src/react/components/table/DefaultModalButton.js +18 -0
- package/src/react/components/table/DefaultSearchModal.js +49 -0
- package/src/react/components/table/DefaultTable.js +322 -1964
- package/src/react/components/table/DefaultTable.styles.js +234 -102
- package/src/react/components/table/DefaultTable.utils.js +502 -0
- package/src/react/components/table/DefaultTableBody.js +26 -0
- package/src/react/components/table/DefaultTableCards.js +171 -0
- package/src/react/components/table/DefaultTableControls.js +205 -0
- package/src/react/components/table/DefaultTableEmptyState.js +22 -0
- package/src/react/components/table/DefaultTableFooter.js +172 -0
- package/src/react/components/table/DefaultTableInput.js +145 -0
- package/src/react/components/table/DefaultTableRows.js +344 -0
- package/src/react/components/table/DefaultTableSearch.js +100 -0
- package/src/react/components/table/DefaultTableToolbar.js +98 -0
- package/src/react/components/table/DefaultToolbarAction.js +56 -0
- package/src/react/components/table/useDefaultTablePagination.js +370 -0
- package/src/react/components/table/useDefaultTableSorting.js +126 -0
- package/src/react/components/table/useDefaultTableTheme.js +52 -0
- package/src/react/utils/tableVisibleColumnsPreferences.js +239 -211
- package/src/store/default/actions.js +51 -13
- package/src/store/default/getters.js +10 -8
- package/src/store/default/mutation_types.js +4 -2
- package/src/store/default/mutations.js +10 -1
- package/src/tests/react/components/form/DefaultForm.test.js +81 -0
- package/src/tests/react/components/inputs/DefaultSelect.test.js +106 -14
- package/src/tests/react/components/table/DefaultTable.test.js +1318 -334
- package/src/tests/react/store/defaultActions.test.js +59 -0
- package/src/tests/react/utils/tableVisibleColumnsPreferences.test.js +247 -168
|
@@ -27,28 +27,33 @@ const styles = StyleSheet.create({
|
|
|
27
27
|
paddingVertical: 4,
|
|
28
28
|
borderBottomWidth: 1,
|
|
29
29
|
flexDirection: 'row',
|
|
30
|
-
flexWrap: '
|
|
30
|
+
flexWrap: 'nowrap',
|
|
31
31
|
alignItems: 'center',
|
|
32
32
|
justifyContent: 'flex-end',
|
|
33
33
|
gap: 6,
|
|
34
34
|
zIndex: 10,
|
|
35
35
|
},
|
|
36
|
+
toolbarWithCompactTotal: {
|
|
37
|
+
flexWrap: 'wrap',
|
|
38
|
+
},
|
|
36
39
|
toolbarLeft: {
|
|
40
|
+
flex: 1,
|
|
41
|
+
width: '100%',
|
|
37
42
|
flexDirection: 'row',
|
|
38
|
-
flexWrap: '
|
|
43
|
+
flexWrap: 'nowrap',
|
|
39
44
|
alignItems: 'center',
|
|
40
|
-
flexShrink:
|
|
45
|
+
flexShrink: 0,
|
|
41
46
|
gap: 6,
|
|
42
47
|
minWidth: 0,
|
|
43
|
-
justifyContent: '
|
|
48
|
+
justifyContent: 'space-between',
|
|
44
49
|
},
|
|
45
50
|
toolbarActionGroup: {
|
|
46
51
|
flexDirection: 'row',
|
|
47
|
-
flexWrap: '
|
|
52
|
+
flexWrap: 'nowrap',
|
|
48
53
|
alignItems: 'center',
|
|
49
54
|
gap: 6,
|
|
50
55
|
flexShrink: 0,
|
|
51
|
-
marginLeft:
|
|
56
|
+
marginLeft: 'auto',
|
|
52
57
|
},
|
|
53
58
|
toolbarCompactLead: {
|
|
54
59
|
flex: 1,
|
|
@@ -70,11 +75,21 @@ const styles = StyleSheet.create({
|
|
|
70
75
|
flexShrink: 0,
|
|
71
76
|
marginLeft: 0,
|
|
72
77
|
},
|
|
73
|
-
toolbarSearch: {
|
|
74
|
-
width: 190,
|
|
75
|
-
maxWidth: 220,
|
|
76
|
-
flexShrink: 1,
|
|
77
|
-
},
|
|
78
|
+
toolbarSearch: {
|
|
79
|
+
width: 190,
|
|
80
|
+
maxWidth: 220,
|
|
81
|
+
flexShrink: 1,
|
|
82
|
+
},
|
|
83
|
+
toolbarSearchButton: {
|
|
84
|
+
minWidth: 30,
|
|
85
|
+
width: 30,
|
|
86
|
+
height: 30,
|
|
87
|
+
borderRadius: 15,
|
|
88
|
+
borderWidth: 1,
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
justifyContent: 'center',
|
|
91
|
+
flexShrink: 0,
|
|
92
|
+
},
|
|
78
93
|
toolbarCompactSearch: {
|
|
79
94
|
flex: 1,
|
|
80
95
|
width: 'auto',
|
|
@@ -108,11 +123,23 @@ const styles = StyleSheet.create({
|
|
|
108
123
|
},
|
|
109
124
|
toolbarButtonActive: {
|
|
110
125
|
},
|
|
111
|
-
toolbarAddButton: {
|
|
112
|
-
minWidth: 30,
|
|
113
|
-
width: 30,
|
|
114
|
-
paddingHorizontal: 0,
|
|
115
|
-
},
|
|
126
|
+
toolbarAddButton: {
|
|
127
|
+
minWidth: 30,
|
|
128
|
+
width: 30,
|
|
129
|
+
paddingHorizontal: 0,
|
|
130
|
+
},
|
|
131
|
+
floatingAddButton: {
|
|
132
|
+
position: 'absolute',
|
|
133
|
+
right: 16,
|
|
134
|
+
bottom: 16,
|
|
135
|
+
width: 52,
|
|
136
|
+
height: 52,
|
|
137
|
+
borderRadius: 26,
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
justifyContent: 'center',
|
|
140
|
+
zIndex: 30,
|
|
141
|
+
...shadow,
|
|
142
|
+
},
|
|
116
143
|
toolbarBadgeText: {
|
|
117
144
|
fontSize: 10,
|
|
118
145
|
fontWeight: '900',
|
|
@@ -158,17 +185,101 @@ const styles = StyleSheet.create({
|
|
|
158
185
|
columnMenuModalBody: {
|
|
159
186
|
maxHeight: 520,
|
|
160
187
|
},
|
|
188
|
+
searchModalCard: {
|
|
189
|
+
width: '100%',
|
|
190
|
+
maxWidth: 420,
|
|
191
|
+
},
|
|
192
|
+
filtersModalCard: {
|
|
193
|
+
width: '100%',
|
|
194
|
+
maxWidth: 560,
|
|
195
|
+
},
|
|
196
|
+
debugModalCard: {
|
|
197
|
+
width: '100%',
|
|
198
|
+
maxWidth: 760,
|
|
199
|
+
},
|
|
200
|
+
filtersModalBody: {
|
|
201
|
+
maxHeight: 520,
|
|
202
|
+
},
|
|
203
|
+
filtersModalList: {
|
|
204
|
+
padding: 14,
|
|
205
|
+
gap: 12,
|
|
206
|
+
},
|
|
207
|
+
filtersModalField: {
|
|
208
|
+
width: '100%',
|
|
209
|
+
gap: 4,
|
|
210
|
+
},
|
|
211
|
+
filtersModalInput: {
|
|
212
|
+
width: '100%',
|
|
213
|
+
},
|
|
214
|
+
searchModalBody: {
|
|
215
|
+
padding: 14,
|
|
216
|
+
},
|
|
217
|
+
searchModalInput: {
|
|
218
|
+
width: '100%',
|
|
219
|
+
maxWidth: '100%',
|
|
220
|
+
},
|
|
161
221
|
columnMenuModalList: {
|
|
162
222
|
paddingVertical: 6,
|
|
163
223
|
},
|
|
224
|
+
debugModalBody: {
|
|
225
|
+
maxHeight: 560,
|
|
226
|
+
},
|
|
227
|
+
debugModalContent: {
|
|
228
|
+
padding: 14,
|
|
229
|
+
gap: 12,
|
|
230
|
+
},
|
|
231
|
+
debugSectionHeader: {
|
|
232
|
+
minHeight: 30,
|
|
233
|
+
flexDirection: 'row',
|
|
234
|
+
alignItems: 'center',
|
|
235
|
+
justifyContent: 'space-between',
|
|
236
|
+
gap: 8,
|
|
237
|
+
},
|
|
238
|
+
debugSectionTitle: {
|
|
239
|
+
fontSize: 11,
|
|
240
|
+
fontWeight: '900',
|
|
241
|
+
textTransform: 'uppercase',
|
|
242
|
+
},
|
|
243
|
+
debugCopyButton: {
|
|
244
|
+
height: 28,
|
|
245
|
+
borderRadius: 8,
|
|
246
|
+
borderWidth: 1,
|
|
247
|
+
paddingHorizontal: 9,
|
|
248
|
+
flexDirection: 'row',
|
|
249
|
+
alignItems: 'center',
|
|
250
|
+
justifyContent: 'center',
|
|
251
|
+
gap: 5,
|
|
252
|
+
},
|
|
253
|
+
debugCopyButtonText: {
|
|
254
|
+
fontSize: 11,
|
|
255
|
+
fontWeight: '800',
|
|
256
|
+
},
|
|
257
|
+
debugCodeBlock: {
|
|
258
|
+
minHeight: 92,
|
|
259
|
+
borderWidth: 1,
|
|
260
|
+
borderRadius: 8,
|
|
261
|
+
padding: 10,
|
|
262
|
+
backgroundColor: '#F8FAFC',
|
|
263
|
+
fontSize: 11,
|
|
264
|
+
lineHeight: 16,
|
|
265
|
+
fontFamily: Platform.select({
|
|
266
|
+
ios: 'Menlo',
|
|
267
|
+
android: 'monospace',
|
|
268
|
+
default: 'monospace',
|
|
269
|
+
}),
|
|
270
|
+
},
|
|
164
271
|
scroll: {
|
|
165
|
-
flex: 1,
|
|
166
|
-
width: '100%',
|
|
167
|
-
minHeight: 0,
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
272
|
+
flex: 1,
|
|
273
|
+
width: '100%',
|
|
274
|
+
minHeight: 0,
|
|
275
|
+
},
|
|
276
|
+
horizontalScrollContent: {
|
|
277
|
+
flexGrow: 1,
|
|
278
|
+
minWidth: '100%',
|
|
279
|
+
},
|
|
280
|
+
content: {
|
|
281
|
+
flex: 1,
|
|
282
|
+
width: '100%',
|
|
172
283
|
minWidth: '100%',
|
|
173
284
|
minHeight: 0,
|
|
174
285
|
},
|
|
@@ -209,14 +320,61 @@ const styles = StyleSheet.create({
|
|
|
209
320
|
borderRightWidth: 1,
|
|
210
321
|
borderRightColor: '#EEF2F7',
|
|
211
322
|
},
|
|
212
|
-
identityCell: {
|
|
213
|
-
minWidth: 76,
|
|
214
|
-
flexBasis: 76,
|
|
215
|
-
flexGrow: 0.62,
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
323
|
+
identityCell: {
|
|
324
|
+
minWidth: 76,
|
|
325
|
+
flexBasis: 76,
|
|
326
|
+
flexGrow: 0.62,
|
|
327
|
+
},
|
|
328
|
+
stickyIdentityCell: {
|
|
329
|
+
backgroundColor: '#FFFFFF',
|
|
330
|
+
zIndex: 5,
|
|
331
|
+
...Platform.select({
|
|
332
|
+
web: {
|
|
333
|
+
position: 'sticky',
|
|
334
|
+
left: 0,
|
|
335
|
+
},
|
|
336
|
+
default: {},
|
|
337
|
+
}),
|
|
338
|
+
},
|
|
339
|
+
stickyActionsCell: {
|
|
340
|
+
backgroundColor: '#FFFFFF',
|
|
341
|
+
zIndex: 5,
|
|
342
|
+
...Platform.select({
|
|
343
|
+
web: {
|
|
344
|
+
position: 'sticky',
|
|
345
|
+
right: 0,
|
|
346
|
+
},
|
|
347
|
+
default: {},
|
|
348
|
+
}),
|
|
349
|
+
},
|
|
350
|
+
stickyHeaderCell: {
|
|
351
|
+
zIndex: 8,
|
|
352
|
+
},
|
|
353
|
+
pinnedIdentityCell: {
|
|
354
|
+
backgroundColor: '#FFFFFF',
|
|
355
|
+
zIndex: 6,
|
|
356
|
+
...Platform.select({
|
|
357
|
+
web: {
|
|
358
|
+
boxShadow: '2px 0 0 rgba(226,232,240,0.9)',
|
|
359
|
+
position: 'relative',
|
|
360
|
+
},
|
|
361
|
+
default: {},
|
|
362
|
+
}),
|
|
363
|
+
},
|
|
364
|
+
pinnedActionsCell: {
|
|
365
|
+
backgroundColor: '#FFFFFF',
|
|
366
|
+
zIndex: 6,
|
|
367
|
+
...Platform.select({
|
|
368
|
+
web: {
|
|
369
|
+
boxShadow: '-2px 0 0 rgba(226,232,240,0.9)',
|
|
370
|
+
position: 'relative',
|
|
371
|
+
},
|
|
372
|
+
default: {},
|
|
373
|
+
}),
|
|
374
|
+
},
|
|
375
|
+
moneyCell: {
|
|
376
|
+
minWidth: 132,
|
|
377
|
+
flexBasis: 132,
|
|
220
378
|
flexGrow: 0.9,
|
|
221
379
|
},
|
|
222
380
|
headerText: {
|
|
@@ -257,16 +415,11 @@ const styles = StyleSheet.create({
|
|
|
257
415
|
editableCell: {
|
|
258
416
|
backgroundColor: '#FFFFFF',
|
|
259
417
|
},
|
|
260
|
-
editingCell: {
|
|
261
|
-
paddingVertical: 4,
|
|
262
|
-
backgroundColor: '#EFF6FF',
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
flexDirection: 'row',
|
|
266
|
-
alignItems: 'center',
|
|
267
|
-
gap: 6,
|
|
268
|
-
},
|
|
269
|
-
input: {
|
|
418
|
+
editingCell: {
|
|
419
|
+
paddingVertical: 4,
|
|
420
|
+
backgroundColor: '#EFF6FF',
|
|
421
|
+
},
|
|
422
|
+
input: {
|
|
270
423
|
flex: 1,
|
|
271
424
|
height: 32,
|
|
272
425
|
borderWidth: 1,
|
|
@@ -285,20 +438,26 @@ const styles = StyleSheet.create({
|
|
|
285
438
|
fontWeight: '800',
|
|
286
439
|
textTransform: 'uppercase',
|
|
287
440
|
},
|
|
288
|
-
actionsCell: {
|
|
289
|
-
minWidth: 60,
|
|
290
|
-
width: 60,
|
|
291
|
-
flexBasis: 60,
|
|
292
|
-
flexGrow: 0,
|
|
293
|
-
flexShrink: 0,
|
|
294
|
-
maxWidth: 72,
|
|
295
|
-
alignItems: 'center',
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
441
|
+
actionsCell: {
|
|
442
|
+
minWidth: 60,
|
|
443
|
+
width: 60,
|
|
444
|
+
flexBasis: 60,
|
|
445
|
+
flexGrow: 0,
|
|
446
|
+
flexShrink: 0,
|
|
447
|
+
maxWidth: 72,
|
|
448
|
+
alignItems: 'center',
|
|
449
|
+
},
|
|
450
|
+
rowActionsGroup: {
|
|
451
|
+
flexDirection: 'row',
|
|
452
|
+
alignItems: 'center',
|
|
453
|
+
justifyContent: 'center',
|
|
454
|
+
gap: 6,
|
|
455
|
+
},
|
|
456
|
+
iconButton: {
|
|
457
|
+
width: 28,
|
|
458
|
+
height: 28,
|
|
459
|
+
borderRadius: 14,
|
|
460
|
+
alignItems: 'center',
|
|
302
461
|
justifyContent: 'center',
|
|
303
462
|
borderWidth: 1,
|
|
304
463
|
borderColor: '#E2E8F0',
|
|
@@ -335,15 +494,26 @@ const styles = StyleSheet.create({
|
|
|
335
494
|
cardItem: {
|
|
336
495
|
position: 'relative',
|
|
337
496
|
},
|
|
338
|
-
cardActions: {
|
|
339
|
-
position: 'absolute',
|
|
340
|
-
right: 10,
|
|
341
|
-
bottom: 10,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
497
|
+
cardActions: {
|
|
498
|
+
position: 'absolute',
|
|
499
|
+
right: 10,
|
|
500
|
+
bottom: 10,
|
|
501
|
+
flexDirection: 'row',
|
|
502
|
+
alignItems: 'center',
|
|
503
|
+
gap: 6,
|
|
504
|
+
},
|
|
505
|
+
cardActionGroup: {
|
|
506
|
+
position: 'absolute',
|
|
507
|
+
right: 8,
|
|
508
|
+
top: 8,
|
|
509
|
+
flexDirection: 'row',
|
|
510
|
+
alignItems: 'center',
|
|
511
|
+
gap: 6,
|
|
512
|
+
},
|
|
513
|
+
defaultCard: {
|
|
514
|
+
borderWidth: 1,
|
|
515
|
+
borderColor: '#E2E8F0',
|
|
516
|
+
borderRadius: 10,
|
|
347
517
|
backgroundColor: '#FFFFFF',
|
|
348
518
|
padding: 12,
|
|
349
519
|
gap: 8,
|
|
@@ -385,43 +555,6 @@ const styles = StyleSheet.create({
|
|
|
385
555
|
justifyContent: 'center',
|
|
386
556
|
gap: 8,
|
|
387
557
|
},
|
|
388
|
-
loadingFooter: {
|
|
389
|
-
padding: 14,
|
|
390
|
-
alignItems: 'center',
|
|
391
|
-
justifyContent: 'center',
|
|
392
|
-
gap: 8,
|
|
393
|
-
},
|
|
394
|
-
loadingOverlay: {
|
|
395
|
-
...Platform.select({
|
|
396
|
-
web: {
|
|
397
|
-
position: 'absolute',
|
|
398
|
-
inset: 0,
|
|
399
|
-
},
|
|
400
|
-
default: {
|
|
401
|
-
position: 'absolute',
|
|
402
|
-
top: 0,
|
|
403
|
-
right: 0,
|
|
404
|
-
bottom: 0,
|
|
405
|
-
left: 0,
|
|
406
|
-
},
|
|
407
|
-
}),
|
|
408
|
-
alignItems: 'center',
|
|
409
|
-
justifyContent: 'center',
|
|
410
|
-
zIndex: 14,
|
|
411
|
-
padding: 16,
|
|
412
|
-
},
|
|
413
|
-
loadingOverlayCard: {
|
|
414
|
-
minWidth: 220,
|
|
415
|
-
maxWidth: '100%',
|
|
416
|
-
paddingHorizontal: 18,
|
|
417
|
-
paddingVertical: 14,
|
|
418
|
-
borderRadius: 12,
|
|
419
|
-
borderWidth: 1,
|
|
420
|
-
alignItems: 'center',
|
|
421
|
-
justifyContent: 'center',
|
|
422
|
-
gap: 8,
|
|
423
|
-
...shadow,
|
|
424
|
-
},
|
|
425
558
|
footerBar: {
|
|
426
559
|
minHeight: 40,
|
|
427
560
|
paddingHorizontal: 8,
|
|
@@ -472,7 +605,6 @@ const styles = StyleSheet.create({
|
|
|
472
605
|
minWidth: 0,
|
|
473
606
|
flexShrink: 1,
|
|
474
607
|
borderRadius: 999,
|
|
475
|
-
backgroundColor: '#EFF6FF',
|
|
476
608
|
paddingHorizontal: 10,
|
|
477
609
|
paddingVertical: 5,
|
|
478
610
|
},
|