@controleonline/ui-default 1.0.264 → 1.0.265

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/AGENTS.md +3 -2
  2. package/package.json +21 -18
  3. package/src/react/components/errors/DefaultErrors.js +64 -82
  4. package/src/react/components/filters/CompactFilterSelector.js +58 -23
  5. package/src/react/components/filters/CompactFilterSelector.styles.js +17 -5
  6. package/src/react/components/filters/DefaultColumnFilter.js +177 -45
  7. package/src/react/components/filters/DefaultExternalFilters.js +201 -143
  8. package/src/react/components/filters/DefaultSearch.js +27 -25
  9. package/src/react/components/form/DefaultForm.js +72 -53
  10. package/src/react/components/form/DefaultForm.styles.js +71 -66
  11. package/src/react/components/inputs/DefaultDateInput.js +150 -0
  12. package/src/react/components/inputs/DefaultInput.js +44 -11
  13. package/src/react/components/inputs/DefaultInput.styles.js +6 -0
  14. package/src/react/components/inputs/DefaultSelect.js +200 -43
  15. package/src/react/components/inputs/defaultInputUtils.js +40 -19
  16. package/src/react/components/table/DefaultColumnMenu.js +108 -0
  17. package/src/react/components/table/DefaultDebug.js +233 -0
  18. package/src/react/components/table/DefaultFiltersModal.js +142 -0
  19. package/src/react/components/table/DefaultModalButton.js +18 -0
  20. package/src/react/components/table/DefaultSearchModal.js +49 -0
  21. package/src/react/components/table/DefaultTable.js +350 -2025
  22. package/src/react/components/table/DefaultTable.styles.js +217 -97
  23. package/src/react/components/table/DefaultTable.utils.js +502 -0
  24. package/src/react/components/table/DefaultTableBody.js +26 -0
  25. package/src/react/components/table/DefaultTableCards.js +171 -0
  26. package/src/react/components/table/DefaultTableControls.js +208 -0
  27. package/src/react/components/table/DefaultTableEmptyState.js +22 -0
  28. package/src/react/components/table/DefaultTableFooter.js +172 -0
  29. package/src/react/components/table/DefaultTableInput.js +145 -0
  30. package/src/react/components/table/DefaultTableRows.js +340 -0
  31. package/src/react/components/table/DefaultTableSearch.js +100 -0
  32. package/src/react/components/table/DefaultTableToolbar.js +98 -0
  33. package/src/react/components/table/DefaultToolbarAction.js +56 -0
  34. package/src/react/components/table/useDefaultTablePagination.js +370 -0
  35. package/src/react/components/table/useDefaultTableSorting.js +126 -0
  36. package/src/react/components/table/useDefaultTableTheme.js +58 -0
  37. package/src/react/utils/tableVisibleColumnsPreferences.js +239 -211
  38. package/src/store/default/actions.js +51 -13
  39. package/src/store/default/getters.js +10 -8
  40. package/src/store/default/mutation_types.js +4 -2
  41. package/src/store/default/mutations.js +10 -1
  42. package/src/tests/react/components/form/DefaultForm.test.js +81 -0
  43. package/src/tests/react/components/inputs/DefaultSelect.test.js +106 -14
  44. package/src/tests/react/components/table/DefaultTable.test.js +945 -96
  45. package/src/tests/react/store/defaultActions.test.js +59 -0
  46. 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: 'wrap',
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: 'wrap',
43
+ flexWrap: 'nowrap',
39
44
  alignItems: 'center',
40
- flexShrink: 1,
45
+ flexShrink: 0,
41
46
  gap: 6,
42
47
  minWidth: 0,
43
- justifyContent: 'flex-end',
48
+ justifyContent: 'space-between',
44
49
  },
45
50
  toolbarActionGroup: {
46
51
  flexDirection: 'row',
47
- flexWrap: 'wrap',
52
+ flexWrap: 'nowrap',
48
53
  alignItems: 'center',
49
54
  gap: 6,
50
55
  flexShrink: 0,
51
- marginLeft: 6,
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',
@@ -158,17 +173,101 @@ const styles = StyleSheet.create({
158
173
  columnMenuModalBody: {
159
174
  maxHeight: 520,
160
175
  },
176
+ searchModalCard: {
177
+ width: '100%',
178
+ maxWidth: 420,
179
+ },
180
+ filtersModalCard: {
181
+ width: '100%',
182
+ maxWidth: 560,
183
+ },
184
+ debugModalCard: {
185
+ width: '100%',
186
+ maxWidth: 760,
187
+ },
188
+ filtersModalBody: {
189
+ maxHeight: 520,
190
+ },
191
+ filtersModalList: {
192
+ padding: 14,
193
+ gap: 12,
194
+ },
195
+ filtersModalField: {
196
+ width: '100%',
197
+ gap: 4,
198
+ },
199
+ filtersModalInput: {
200
+ width: '100%',
201
+ },
202
+ searchModalBody: {
203
+ padding: 14,
204
+ },
205
+ searchModalInput: {
206
+ width: '100%',
207
+ maxWidth: '100%',
208
+ },
161
209
  columnMenuModalList: {
162
210
  paddingVertical: 6,
163
211
  },
212
+ debugModalBody: {
213
+ maxHeight: 560,
214
+ },
215
+ debugModalContent: {
216
+ padding: 14,
217
+ gap: 12,
218
+ },
219
+ debugSectionHeader: {
220
+ minHeight: 30,
221
+ flexDirection: 'row',
222
+ alignItems: 'center',
223
+ justifyContent: 'space-between',
224
+ gap: 8,
225
+ },
226
+ debugSectionTitle: {
227
+ fontSize: 11,
228
+ fontWeight: '900',
229
+ textTransform: 'uppercase',
230
+ },
231
+ debugCopyButton: {
232
+ height: 28,
233
+ borderRadius: 8,
234
+ borderWidth: 1,
235
+ paddingHorizontal: 9,
236
+ flexDirection: 'row',
237
+ alignItems: 'center',
238
+ justifyContent: 'center',
239
+ gap: 5,
240
+ },
241
+ debugCopyButtonText: {
242
+ fontSize: 11,
243
+ fontWeight: '800',
244
+ },
245
+ debugCodeBlock: {
246
+ minHeight: 92,
247
+ borderWidth: 1,
248
+ borderRadius: 8,
249
+ padding: 10,
250
+ backgroundColor: '#F8FAFC',
251
+ fontSize: 11,
252
+ lineHeight: 16,
253
+ fontFamily: Platform.select({
254
+ ios: 'Menlo',
255
+ android: 'monospace',
256
+ default: 'monospace',
257
+ }),
258
+ },
164
259
  scroll: {
165
- flex: 1,
166
- width: '100%',
167
- minHeight: 0,
168
- },
169
- content: {
170
- flex: 1,
171
- width: '100%',
260
+ flex: 1,
261
+ width: '100%',
262
+ minHeight: 0,
263
+ },
264
+ horizontalScrollContent: {
265
+ flexGrow: 1,
266
+ minWidth: '100%',
267
+ },
268
+ content: {
269
+ flex: 1,
270
+ width: '100%',
172
271
  minWidth: '100%',
173
272
  minHeight: 0,
174
273
  },
@@ -209,14 +308,61 @@ const styles = StyleSheet.create({
209
308
  borderRightWidth: 1,
210
309
  borderRightColor: '#EEF2F7',
211
310
  },
212
- identityCell: {
213
- minWidth: 76,
214
- flexBasis: 76,
215
- flexGrow: 0.62,
216
- },
217
- moneyCell: {
218
- minWidth: 132,
219
- flexBasis: 132,
311
+ identityCell: {
312
+ minWidth: 76,
313
+ flexBasis: 76,
314
+ flexGrow: 0.62,
315
+ },
316
+ stickyIdentityCell: {
317
+ backgroundColor: '#FFFFFF',
318
+ zIndex: 5,
319
+ ...Platform.select({
320
+ web: {
321
+ position: 'sticky',
322
+ left: 0,
323
+ },
324
+ default: {},
325
+ }),
326
+ },
327
+ stickyActionsCell: {
328
+ backgroundColor: '#FFFFFF',
329
+ zIndex: 5,
330
+ ...Platform.select({
331
+ web: {
332
+ position: 'sticky',
333
+ right: 0,
334
+ },
335
+ default: {},
336
+ }),
337
+ },
338
+ stickyHeaderCell: {
339
+ zIndex: 8,
340
+ },
341
+ pinnedIdentityCell: {
342
+ backgroundColor: '#FFFFFF',
343
+ zIndex: 6,
344
+ ...Platform.select({
345
+ web: {
346
+ boxShadow: '2px 0 0 rgba(226,232,240,0.9)',
347
+ position: 'relative',
348
+ },
349
+ default: {},
350
+ }),
351
+ },
352
+ pinnedActionsCell: {
353
+ backgroundColor: '#FFFFFF',
354
+ zIndex: 6,
355
+ ...Platform.select({
356
+ web: {
357
+ boxShadow: '-2px 0 0 rgba(226,232,240,0.9)',
358
+ position: 'relative',
359
+ },
360
+ default: {},
361
+ }),
362
+ },
363
+ moneyCell: {
364
+ minWidth: 132,
365
+ flexBasis: 132,
220
366
  flexGrow: 0.9,
221
367
  },
222
368
  headerText: {
@@ -257,16 +403,11 @@ const styles = StyleSheet.create({
257
403
  editableCell: {
258
404
  backgroundColor: '#FFFFFF',
259
405
  },
260
- editingCell: {
261
- paddingVertical: 4,
262
- backgroundColor: '#EFF6FF',
263
- },
264
- editingRow: {
265
- flexDirection: 'row',
266
- alignItems: 'center',
267
- gap: 6,
268
- },
269
- input: {
406
+ editingCell: {
407
+ paddingVertical: 4,
408
+ backgroundColor: '#EFF6FF',
409
+ },
410
+ input: {
270
411
  flex: 1,
271
412
  height: 32,
272
413
  borderWidth: 1,
@@ -285,20 +426,26 @@ const styles = StyleSheet.create({
285
426
  fontWeight: '800',
286
427
  textTransform: 'uppercase',
287
428
  },
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
- iconButton: {
298
- width: 28,
299
- height: 28,
300
- borderRadius: 14,
301
- alignItems: 'center',
429
+ actionsCell: {
430
+ minWidth: 60,
431
+ width: 60,
432
+ flexBasis: 60,
433
+ flexGrow: 0,
434
+ flexShrink: 0,
435
+ maxWidth: 72,
436
+ alignItems: 'center',
437
+ },
438
+ rowActionsGroup: {
439
+ flexDirection: 'row',
440
+ alignItems: 'center',
441
+ justifyContent: 'center',
442
+ gap: 6,
443
+ },
444
+ iconButton: {
445
+ width: 28,
446
+ height: 28,
447
+ borderRadius: 14,
448
+ alignItems: 'center',
302
449
  justifyContent: 'center',
303
450
  borderWidth: 1,
304
451
  borderColor: '#E2E8F0',
@@ -335,15 +482,26 @@ const styles = StyleSheet.create({
335
482
  cardItem: {
336
483
  position: 'relative',
337
484
  },
338
- cardActions: {
339
- position: 'absolute',
340
- right: 10,
341
- bottom: 10,
342
- },
343
- defaultCard: {
344
- borderWidth: 1,
345
- borderColor: '#E2E8F0',
346
- borderRadius: 10,
485
+ cardActions: {
486
+ position: 'absolute',
487
+ right: 10,
488
+ bottom: 10,
489
+ flexDirection: 'row',
490
+ alignItems: 'center',
491
+ gap: 6,
492
+ },
493
+ cardActionGroup: {
494
+ position: 'absolute',
495
+ right: 8,
496
+ top: 8,
497
+ flexDirection: 'row',
498
+ alignItems: 'center',
499
+ gap: 6,
500
+ },
501
+ defaultCard: {
502
+ borderWidth: 1,
503
+ borderColor: '#E2E8F0',
504
+ borderRadius: 10,
347
505
  backgroundColor: '#FFFFFF',
348
506
  padding: 12,
349
507
  gap: 8,
@@ -385,43 +543,6 @@ const styles = StyleSheet.create({
385
543
  justifyContent: 'center',
386
544
  gap: 8,
387
545
  },
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
546
  footerBar: {
426
547
  minHeight: 40,
427
548
  paddingHorizontal: 8,
@@ -472,7 +593,6 @@ const styles = StyleSheet.create({
472
593
  minWidth: 0,
473
594
  flexShrink: 1,
474
595
  borderRadius: 999,
475
- backgroundColor: '#EFF6FF',
476
596
  paddingHorizontal: 10,
477
597
  paddingVertical: 5,
478
598
  },