@controleonline/ui-default 1.0.263 → 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 (61) hide show
  1. package/AGENTS.md +47 -45
  2. package/package.json +20 -20
  3. package/src/react/components/errors/DefaultErrors.js +307 -325
  4. package/src/react/components/files/DefaultFile.js +46 -46
  5. package/src/react/components/filters/CompactFilterSelector.js +78 -24
  6. package/src/react/components/filters/CompactFilterSelector.styles.js +17 -5
  7. package/src/react/components/filters/DefaultColumnFilter.js +191 -57
  8. package/src/react/components/filters/DefaultExternalFilters.js +245 -182
  9. package/src/react/components/filters/DefaultSearch.js +131 -92
  10. package/src/react/components/filters/DefaultSearch.styles.js +65 -70
  11. package/src/react/components/form/DefaultForm.js +172 -151
  12. package/src/react/components/form/DefaultForm.styles.js +71 -66
  13. package/src/react/components/help/DefaultTooltip.js +87 -87
  14. package/src/react/components/help/DefaultTooltip.styles.js +61 -61
  15. package/src/react/components/inputs/DefaultDateInput.js +150 -0
  16. package/src/react/components/inputs/DefaultInput.js +162 -127
  17. package/src/react/components/inputs/DefaultInput.styles.js +6 -0
  18. package/src/react/components/inputs/DefaultSelect.js +320 -152
  19. package/src/react/components/inputs/defaultInputUtils.js +40 -19
  20. package/src/react/components/map/DefaultGoogleMap.styles.js +115 -9
  21. package/src/react/components/map/DefaultGoogleMap.web.js +560 -446
  22. package/src/react/components/map/DefaultMap.native.js +73 -71
  23. package/src/react/components/map/DefaultMap.styles.js +16 -16
  24. package/src/react/components/map/DefaultMap.web.js +68 -66
  25. package/src/react/components/map/DefaultNativeMap.native.js +307 -183
  26. package/src/react/components/map/DefaultNativeMap.shared.js +439 -340
  27. package/src/react/components/map/DefaultNativeMap.styles.js +156 -122
  28. package/src/react/components/table/DefaultColumnMenu.js +108 -0
  29. package/src/react/components/table/DefaultDebug.js +233 -0
  30. package/src/react/components/table/DefaultFiltersModal.js +142 -0
  31. package/src/react/components/table/DefaultModalButton.js +18 -0
  32. package/src/react/components/table/DefaultSearchModal.js +49 -0
  33. package/src/react/components/table/DefaultTable.js +345 -1846
  34. package/src/react/components/table/DefaultTable.styles.js +247 -136
  35. package/src/react/components/table/DefaultTable.utils.js +502 -0
  36. package/src/react/components/table/DefaultTableBody.js +26 -0
  37. package/src/react/components/table/DefaultTableCards.js +171 -0
  38. package/src/react/components/table/DefaultTableControls.js +208 -0
  39. package/src/react/components/table/DefaultTableEmptyState.js +22 -0
  40. package/src/react/components/table/DefaultTableFooter.js +172 -0
  41. package/src/react/components/table/DefaultTableInput.js +145 -0
  42. package/src/react/components/table/DefaultTableRows.js +340 -0
  43. package/src/react/components/table/DefaultTableSearch.js +100 -0
  44. package/src/react/components/table/DefaultTableToolbar.js +98 -0
  45. package/src/react/components/table/DefaultToolbarAction.js +56 -0
  46. package/src/react/components/table/useDefaultTablePagination.js +370 -0
  47. package/src/react/components/table/useDefaultTableSorting.js +126 -0
  48. package/src/react/components/table/useDefaultTableTheme.js +58 -0
  49. package/src/react/index.js +10 -10
  50. package/src/react/utils/tableVisibleColumnsPreferences.js +239 -211
  51. package/src/store/default/actions.js +51 -13
  52. package/src/store/default/getters.js +10 -8
  53. package/src/store/default/mutation_types.js +4 -2
  54. package/src/store/default/mutations.js +10 -1
  55. package/src/tests/react/components/errors/DefaultErrors.test.js +162 -162
  56. package/src/tests/react/components/files/DefaultFile.test.js +80 -80
  57. package/src/tests/react/components/form/DefaultForm.test.js +81 -0
  58. package/src/tests/react/components/inputs/DefaultSelect.test.js +185 -0
  59. package/src/tests/react/components/table/DefaultTable.test.js +1183 -0
  60. package/src/tests/react/store/defaultActions.test.js +59 -0
  61. package/src/tests/react/utils/tableVisibleColumnsPreferences.test.js +247 -168
@@ -12,47 +12,48 @@ const shadow = Platform.select({
12
12
  });
13
13
 
14
14
  const styles = StyleSheet.create({
15
- wrap: {
16
- flex: 1,
17
- width: '100%',
18
- minHeight: 0,
19
- borderWidth: 1,
20
- borderColor: '#E2E8F0',
21
- borderRadius: 10,
22
- backgroundColor: '#FFFFFF',
23
- overflow: 'visible',
24
- position: 'relative',
25
- },
15
+ wrap: {
16
+ flex: 1,
17
+ width: '100%',
18
+ minHeight: 0,
19
+ borderWidth: 1,
20
+ borderRadius: 10,
21
+ overflow: 'visible',
22
+ position: 'relative',
23
+ },
26
24
  toolbar: {
27
25
  minHeight: 36,
28
26
  paddingHorizontal: 8,
29
27
  paddingVertical: 4,
30
28
  borderBottomWidth: 1,
31
- borderBottomColor: '#E2E8F0',
32
29
  flexDirection: 'row',
33
- flexWrap: 'wrap',
30
+ flexWrap: 'nowrap',
34
31
  alignItems: 'center',
35
32
  justifyContent: 'flex-end',
36
33
  gap: 6,
37
- backgroundColor: '#FFFFFF',
38
34
  zIndex: 10,
39
35
  },
36
+ toolbarWithCompactTotal: {
37
+ flexWrap: 'wrap',
38
+ },
40
39
  toolbarLeft: {
40
+ flex: 1,
41
+ width: '100%',
41
42
  flexDirection: 'row',
42
- flexWrap: 'wrap',
43
+ flexWrap: 'nowrap',
43
44
  alignItems: 'center',
44
- flexShrink: 1,
45
+ flexShrink: 0,
45
46
  gap: 6,
46
47
  minWidth: 0,
47
- justifyContent: 'flex-end',
48
+ justifyContent: 'space-between',
48
49
  },
49
50
  toolbarActionGroup: {
50
51
  flexDirection: 'row',
51
- flexWrap: 'wrap',
52
+ flexWrap: 'nowrap',
52
53
  alignItems: 'center',
53
54
  gap: 6,
54
55
  flexShrink: 0,
55
- marginLeft: 6,
56
+ marginLeft: 'auto',
56
57
  },
57
58
  toolbarCompactLead: {
58
59
  flex: 1,
@@ -74,49 +75,54 @@ const styles = StyleSheet.create({
74
75
  flexShrink: 0,
75
76
  marginLeft: 0,
76
77
  },
77
- toolbarSearch: {
78
- width: 190,
79
- maxWidth: 220,
80
- flexShrink: 1,
81
- },
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
+ },
82
93
  toolbarCompactSearch: {
83
94
  flex: 1,
84
95
  width: 'auto',
85
96
  maxWidth: '100%',
86
97
  minWidth: 104,
87
98
  },
88
- toolbarCountPill: {
89
- minWidth: 0,
90
- maxWidth: 112,
91
- height: 28,
92
- borderRadius: 999,
93
- backgroundColor: '#EFF6FF',
94
- paddingHorizontal: 10,
95
- alignItems: 'center',
96
- justifyContent: 'center',
97
- flexShrink: 1,
99
+ toolbarCountPill: {
100
+ minWidth: 0,
101
+ maxWidth: 112,
102
+ height: 28,
103
+ borderRadius: 999,
104
+ paddingHorizontal: 10,
105
+ alignItems: 'center',
106
+ justifyContent: 'center',
107
+ flexShrink: 1,
98
108
  },
99
109
  toolbarCountText: {
100
110
  fontSize: 9,
101
111
  fontWeight: '900',
102
112
  },
103
- toolbarButton: {
104
- minWidth: 28,
105
- height: 28,
106
- borderRadius: 14,
107
- paddingHorizontal: 7,
108
- borderWidth: 1,
109
- borderColor: '#E2E8F0',
110
- backgroundColor: '#FFFFFF',
111
- flexDirection: 'row',
112
- alignItems: 'center',
113
- justifyContent: 'center',
114
- gap: 4,
115
- },
116
- toolbarButtonActive: {
117
- backgroundColor: '#F8FAFC',
118
- borderColor: '#CBD5E1',
113
+ toolbarButton: {
114
+ minWidth: 28,
115
+ height: 28,
116
+ borderRadius: 14,
117
+ paddingHorizontal: 7,
118
+ borderWidth: 1,
119
+ flexDirection: 'row',
120
+ alignItems: 'center',
121
+ justifyContent: 'center',
122
+ gap: 4,
119
123
  },
124
+ toolbarButtonActive: {
125
+ },
120
126
  toolbarAddButton: {
121
127
  minWidth: 30,
122
128
  width: 30,
@@ -167,17 +173,101 @@ const styles = StyleSheet.create({
167
173
  columnMenuModalBody: {
168
174
  maxHeight: 520,
169
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
+ },
170
209
  columnMenuModalList: {
171
210
  paddingVertical: 6,
172
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
+ },
173
259
  scroll: {
174
- flex: 1,
175
- width: '100%',
176
- minHeight: 0,
177
- },
178
- content: {
179
- flex: 1,
180
- 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%',
181
271
  minWidth: '100%',
182
272
  minHeight: 0,
183
273
  },
@@ -218,14 +308,61 @@ const styles = StyleSheet.create({
218
308
  borderRightWidth: 1,
219
309
  borderRightColor: '#EEF2F7',
220
310
  },
221
- identityCell: {
222
- minWidth: 76,
223
- flexBasis: 76,
224
- flexGrow: 0.62,
225
- },
226
- moneyCell: {
227
- minWidth: 132,
228
- 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,
229
366
  flexGrow: 0.9,
230
367
  },
231
368
  headerText: {
@@ -266,16 +403,11 @@ const styles = StyleSheet.create({
266
403
  editableCell: {
267
404
  backgroundColor: '#FFFFFF',
268
405
  },
269
- editingCell: {
270
- paddingVertical: 4,
271
- backgroundColor: '#EFF6FF',
272
- },
273
- editingRow: {
274
- flexDirection: 'row',
275
- alignItems: 'center',
276
- gap: 6,
277
- },
278
- input: {
406
+ editingCell: {
407
+ paddingVertical: 4,
408
+ backgroundColor: '#EFF6FF',
409
+ },
410
+ input: {
279
411
  flex: 1,
280
412
  height: 32,
281
413
  borderWidth: 1,
@@ -294,20 +426,26 @@ const styles = StyleSheet.create({
294
426
  fontWeight: '800',
295
427
  textTransform: 'uppercase',
296
428
  },
297
- actionsCell: {
298
- minWidth: 60,
299
- width: 60,
300
- flexBasis: 60,
301
- flexGrow: 0,
302
- flexShrink: 0,
303
- maxWidth: 72,
304
- alignItems: 'center',
305
- },
306
- iconButton: {
307
- width: 28,
308
- height: 28,
309
- borderRadius: 14,
310
- 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',
311
449
  justifyContent: 'center',
312
450
  borderWidth: 1,
313
451
  borderColor: '#E2E8F0',
@@ -344,15 +482,26 @@ const styles = StyleSheet.create({
344
482
  cardItem: {
345
483
  position: 'relative',
346
484
  },
347
- cardActions: {
348
- position: 'absolute',
349
- right: 10,
350
- bottom: 10,
351
- },
352
- defaultCard: {
353
- borderWidth: 1,
354
- borderColor: '#E2E8F0',
355
- 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,
356
505
  backgroundColor: '#FFFFFF',
357
506
  padding: 12,
358
507
  gap: 8,
@@ -394,43 +543,6 @@ const styles = StyleSheet.create({
394
543
  justifyContent: 'center',
395
544
  gap: 8,
396
545
  },
397
- loadingFooter: {
398
- padding: 14,
399
- alignItems: 'center',
400
- justifyContent: 'center',
401
- gap: 8,
402
- },
403
- loadingOverlay: {
404
- ...Platform.select({
405
- web: {
406
- position: 'absolute',
407
- inset: 0,
408
- },
409
- default: {
410
- position: 'absolute',
411
- top: 0,
412
- right: 0,
413
- bottom: 0,
414
- left: 0,
415
- },
416
- }),
417
- alignItems: 'center',
418
- justifyContent: 'center',
419
- zIndex: 14,
420
- padding: 16,
421
- },
422
- loadingOverlayCard: {
423
- minWidth: 220,
424
- maxWidth: '100%',
425
- paddingHorizontal: 18,
426
- paddingVertical: 14,
427
- borderRadius: 12,
428
- borderWidth: 1,
429
- alignItems: 'center',
430
- justifyContent: 'center',
431
- gap: 8,
432
- ...shadow,
433
- },
434
546
  footerBar: {
435
547
  minHeight: 40,
436
548
  paddingHorizontal: 8,
@@ -481,7 +593,6 @@ const styles = StyleSheet.create({
481
593
  minWidth: 0,
482
594
  flexShrink: 1,
483
595
  borderRadius: 999,
484
- backgroundColor: '#EFF6FF',
485
596
  paddingHorizontal: 10,
486
597
  paddingVertical: 5,
487
598
  },