@controleonline/ui-default 1.0.263

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 (56) hide show
  1. package/.github/agents/developer.agent.md +30 -0
  2. package/.github/agents/devops.agent.md +30 -0
  3. package/.github/agents/qa.agent.md +30 -0
  4. package/.github/agents/security.agent.md +30 -0
  5. package/.scrutinizer.yml +20 -0
  6. package/AGENTS.md +47 -0
  7. package/FUNDING.yml +1 -0
  8. package/package.json +21 -0
  9. package/src/react/components/errors/DefaultErrors.js +360 -0
  10. package/src/react/components/files/DefaultFile.js +46 -0
  11. package/src/react/components/filters/CompactFilterSelector.js +262 -0
  12. package/src/react/components/filters/CompactFilterSelector.styles.js +124 -0
  13. package/src/react/components/filters/DateShortcutFilter.js +264 -0
  14. package/src/react/components/filters/DateShortcutFilter.styles.js +82 -0
  15. package/src/react/components/filters/DefaultColumnFilter.js +97 -0
  16. package/src/react/components/filters/DefaultColumnFilter.styles.js +21 -0
  17. package/src/react/components/filters/DefaultExternalFilters.js +441 -0
  18. package/src/react/components/filters/DefaultExternalFilters.styles.js +177 -0
  19. package/src/react/components/filters/DefaultSearch.js +103 -0
  20. package/src/react/components/filters/DefaultSearch.styles.js +70 -0
  21. package/src/react/components/filters/dateFilterSelection.js +29 -0
  22. package/src/react/components/form/DefaultForm.js +198 -0
  23. package/src/react/components/form/DefaultForm.styles.js +70 -0
  24. package/src/react/components/help/DefaultTooltip.js +87 -0
  25. package/src/react/components/help/DefaultTooltip.styles.js +61 -0
  26. package/src/react/components/inputs/DefaultInput.js +160 -0
  27. package/src/react/components/inputs/DefaultInput.styles.js +93 -0
  28. package/src/react/components/inputs/DefaultSelect.js +192 -0
  29. package/src/react/components/inputs/DefaultSelect.styles.js +65 -0
  30. package/src/react/components/inputs/defaultInputUtils.js +230 -0
  31. package/src/react/components/map/DefaultGoogleMap.styles.js +9 -0
  32. package/src/react/components/map/DefaultGoogleMap.web.js +698 -0
  33. package/src/react/components/map/DefaultMap.native.js +71 -0
  34. package/src/react/components/map/DefaultMap.shared.js +762 -0
  35. package/src/react/components/map/DefaultMap.styles.js +16 -0
  36. package/src/react/components/map/DefaultMap.web.js +66 -0
  37. package/src/react/components/map/DefaultNativeMap.native.js +615 -0
  38. package/src/react/components/map/DefaultNativeMap.shared.js +532 -0
  39. package/src/react/components/map/DefaultNativeMap.styles.js +122 -0
  40. package/src/react/components/table/DefaultTable.js +1897 -0
  41. package/src/react/components/table/DefaultTable.styles.js +610 -0
  42. package/src/react/index.js +10 -0
  43. package/src/react/utils/tableVisibleColumnsPreferences.js +264 -0
  44. package/src/store/default/actions.js +444 -0
  45. package/src/store/default/getters.js +28 -0
  46. package/src/store/default/mutation_types.js +26 -0
  47. package/src/store/default/mutations.js +138 -0
  48. package/src/tests/react/components/DateShortcutFilter.test.js +96 -0
  49. package/src/tests/react/components/errors/DefaultErrors.test.js +162 -0
  50. package/src/tests/react/components/files/DefaultFile.test.js +80 -0
  51. package/src/tests/react/components/map/DefaultMap.shared.test.js +162 -0
  52. package/src/tests/react/filters/dateFilterSelection.test.js +46 -0
  53. package/src/tests/react/inputs/defaultInputUtils.test.js +45 -0
  54. package/src/tests/react/store/defaultActions.test.js +112 -0
  55. package/src/tests/react/utils/tableVisibleColumnsPreferences.test.js +223 -0
  56. package/src/utils/filters.js +56 -0
@@ -0,0 +1,610 @@
1
+ import { Platform, StyleSheet } from 'react-native';
2
+
3
+ const shadow = Platform.select({
4
+ ios: {
5
+ shadowColor: '#0F172A',
6
+ shadowOffset: { width: 0, height: 8 },
7
+ shadowOpacity: 0.14,
8
+ shadowRadius: 20,
9
+ },
10
+ android: { elevation: 6 },
11
+ web: { boxShadow: '0 14px 36px rgba(15,23,42,0.16)' },
12
+ });
13
+
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
+ },
26
+ toolbar: {
27
+ minHeight: 36,
28
+ paddingHorizontal: 8,
29
+ paddingVertical: 4,
30
+ borderBottomWidth: 1,
31
+ borderBottomColor: '#E2E8F0',
32
+ flexDirection: 'row',
33
+ flexWrap: 'wrap',
34
+ alignItems: 'center',
35
+ justifyContent: 'flex-end',
36
+ gap: 6,
37
+ backgroundColor: '#FFFFFF',
38
+ zIndex: 10,
39
+ },
40
+ toolbarLeft: {
41
+ flexDirection: 'row',
42
+ flexWrap: 'wrap',
43
+ alignItems: 'center',
44
+ flexShrink: 1,
45
+ gap: 6,
46
+ minWidth: 0,
47
+ justifyContent: 'flex-end',
48
+ },
49
+ toolbarActionGroup: {
50
+ flexDirection: 'row',
51
+ flexWrap: 'wrap',
52
+ alignItems: 'center',
53
+ gap: 6,
54
+ flexShrink: 0,
55
+ marginLeft: 6,
56
+ },
57
+ toolbarCompactLead: {
58
+ flex: 1,
59
+ flexBasis: '100%',
60
+ minWidth: 0,
61
+ flexDirection: 'row',
62
+ flexWrap: 'wrap',
63
+ alignItems: 'center',
64
+ justifyContent: 'flex-end',
65
+ gap: 6,
66
+ },
67
+ toolbarCompactActions: {
68
+ width: '100%',
69
+ flexDirection: 'row',
70
+ flexWrap: 'wrap',
71
+ alignItems: 'center',
72
+ justifyContent: 'flex-end',
73
+ gap: 6,
74
+ flexShrink: 0,
75
+ marginLeft: 0,
76
+ },
77
+ toolbarSearch: {
78
+ width: 190,
79
+ maxWidth: 220,
80
+ flexShrink: 1,
81
+ },
82
+ toolbarCompactSearch: {
83
+ flex: 1,
84
+ width: 'auto',
85
+ maxWidth: '100%',
86
+ minWidth: 104,
87
+ },
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,
98
+ },
99
+ toolbarCountText: {
100
+ fontSize: 9,
101
+ fontWeight: '900',
102
+ },
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',
119
+ },
120
+ toolbarAddButton: {
121
+ minWidth: 30,
122
+ width: 30,
123
+ paddingHorizontal: 0,
124
+ },
125
+ toolbarBadgeText: {
126
+ fontSize: 10,
127
+ fontWeight: '900',
128
+ },
129
+ toolbarActionLabel: {
130
+ flexShrink: 1,
131
+ fontSize: 11,
132
+ fontWeight: '800',
133
+ letterSpacing: 0.2,
134
+ },
135
+ columnMenu: {
136
+ position: 'absolute',
137
+ right: 8,
138
+ top: 36,
139
+ width: 230,
140
+ maxHeight: 520,
141
+ borderWidth: 1,
142
+ borderColor: '#CBD5E1',
143
+ borderRadius: 10,
144
+ backgroundColor: '#FFFFFF',
145
+ paddingVertical: 6,
146
+ zIndex: 50,
147
+ ...shadow,
148
+ },
149
+ columnMenuItem: {
150
+ minHeight: 32,
151
+ paddingHorizontal: 10,
152
+ flexDirection: 'row',
153
+ alignItems: 'center',
154
+ gap: 8,
155
+ },
156
+ columnMenuText: {
157
+ flex: 1,
158
+ color: '#0F172A',
159
+ fontSize: 12,
160
+ fontWeight: '700',
161
+ },
162
+ columnMenuModalCard: {
163
+ width: 250,
164
+ maxWidth: 250,
165
+ maxHeight: '78%',
166
+ },
167
+ columnMenuModalBody: {
168
+ maxHeight: 520,
169
+ },
170
+ columnMenuModalList: {
171
+ paddingVertical: 6,
172
+ },
173
+ scroll: {
174
+ flex: 1,
175
+ width: '100%',
176
+ minHeight: 0,
177
+ },
178
+ content: {
179
+ flex: 1,
180
+ width: '100%',
181
+ minWidth: '100%',
182
+ minHeight: 0,
183
+ },
184
+ headerRow: {
185
+ minHeight: 34,
186
+ width: '100%',
187
+ flexDirection: 'row',
188
+ alignItems: 'center',
189
+ backgroundColor: '#F8FAFC',
190
+ borderBottomWidth: 1,
191
+ borderBottomColor: '#E2E8F0',
192
+ },
193
+ filterRow: {
194
+ minHeight: 40,
195
+ width: '100%',
196
+ flexDirection: 'row',
197
+ alignItems: 'stretch',
198
+ backgroundColor: '#FFFFFF',
199
+ borderBottomWidth: 1,
200
+ borderBottomColor: '#E2E8F0',
201
+ },
202
+ row: {
203
+ minHeight: 44,
204
+ width: '100%',
205
+ flexDirection: 'row',
206
+ alignItems: 'stretch',
207
+ borderBottomWidth: 1,
208
+ borderBottomColor: '#EEF2F7',
209
+ },
210
+ cell: {
211
+ minWidth: 118,
212
+ flexBasis: 118,
213
+ flexGrow: 1,
214
+ flexShrink: 0,
215
+ paddingHorizontal: 10,
216
+ paddingVertical: 8,
217
+ justifyContent: 'center',
218
+ borderRightWidth: 1,
219
+ borderRightColor: '#EEF2F7',
220
+ },
221
+ identityCell: {
222
+ minWidth: 76,
223
+ flexBasis: 76,
224
+ flexGrow: 0.62,
225
+ },
226
+ moneyCell: {
227
+ minWidth: 132,
228
+ flexBasis: 132,
229
+ flexGrow: 0.9,
230
+ },
231
+ headerText: {
232
+ color: '#64748B',
233
+ fontSize: 10,
234
+ fontWeight: '900',
235
+ letterSpacing: 0.35,
236
+ textTransform: 'uppercase',
237
+ },
238
+ sortableHeader: {
239
+ flexDirection: 'row',
240
+ alignItems: 'center',
241
+ gap: 4,
242
+ },
243
+ filterCell: {
244
+ paddingVertical: 4,
245
+ backgroundColor: '#FFFFFF',
246
+ },
247
+ filterInput: {
248
+ height: 30,
249
+ borderWidth: 1,
250
+ borderColor: '#CBD5E1',
251
+ borderRadius: 8,
252
+ paddingHorizontal: 8,
253
+ color: '#0F172A',
254
+ backgroundColor: '#FFFFFF',
255
+ fontSize: 11,
256
+ fontWeight: '700',
257
+ },
258
+ cellText: {
259
+ color: '#0F172A',
260
+ fontSize: 12,
261
+ fontWeight: '700',
262
+ },
263
+ mutedCellText: {
264
+ color: '#94A3B8',
265
+ },
266
+ editableCell: {
267
+ backgroundColor: '#FFFFFF',
268
+ },
269
+ editingCell: {
270
+ paddingVertical: 4,
271
+ backgroundColor: '#EFF6FF',
272
+ },
273
+ editingRow: {
274
+ flexDirection: 'row',
275
+ alignItems: 'center',
276
+ gap: 6,
277
+ },
278
+ input: {
279
+ flex: 1,
280
+ height: 32,
281
+ borderWidth: 1,
282
+ borderColor: '#93C5FD',
283
+ borderRadius: 8,
284
+ paddingHorizontal: 8,
285
+ color: '#0F172A',
286
+ fontSize: 12,
287
+ fontWeight: '700',
288
+ backgroundColor: '#FFFFFF',
289
+ },
290
+ savingText: {
291
+ marginTop: 2,
292
+ color: '#64748B',
293
+ fontSize: 9,
294
+ fontWeight: '800',
295
+ textTransform: 'uppercase',
296
+ },
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',
311
+ justifyContent: 'center',
312
+ borderWidth: 1,
313
+ borderColor: '#E2E8F0',
314
+ backgroundColor: '#F8FAFC',
315
+ },
316
+ cancelButton: {
317
+ width: 28,
318
+ height: 28,
319
+ borderRadius: 14,
320
+ alignItems: 'center',
321
+ justifyContent: 'center',
322
+ backgroundColor: '#FFFFFF',
323
+ borderWidth: 1,
324
+ borderColor: '#CBD5E1',
325
+ },
326
+ cardsScroll: {
327
+ flex: 1,
328
+ minHeight: 0,
329
+ },
330
+ cardsGrid: {
331
+ padding: 10,
332
+ gap: 10,
333
+ flexGrow: 1,
334
+ },
335
+ tableList: {
336
+ flex: 1,
337
+ width: '100%',
338
+ minHeight: 0,
339
+ },
340
+ tableListContent: {
341
+ flexGrow: 1,
342
+ width: '100%',
343
+ },
344
+ cardItem: {
345
+ position: 'relative',
346
+ },
347
+ cardActions: {
348
+ position: 'absolute',
349
+ right: 10,
350
+ bottom: 10,
351
+ },
352
+ defaultCard: {
353
+ borderWidth: 1,
354
+ borderColor: '#E2E8F0',
355
+ borderRadius: 10,
356
+ backgroundColor: '#FFFFFF',
357
+ padding: 12,
358
+ gap: 8,
359
+ },
360
+ defaultCardLine: {
361
+ flexDirection: 'row',
362
+ alignItems: 'center',
363
+ gap: 12,
364
+ },
365
+ defaultCardLabel: {
366
+ width: 130,
367
+ color: '#64748B',
368
+ fontSize: 10,
369
+ fontWeight: '900',
370
+ textTransform: 'uppercase',
371
+ },
372
+ defaultCardValue: {
373
+ flex: 1,
374
+ color: '#0F172A',
375
+ fontSize: 12,
376
+ fontWeight: '700',
377
+ },
378
+ cardEditButton: {
379
+ position: 'absolute',
380
+ top: 8,
381
+ right: 8,
382
+ width: 28,
383
+ height: 28,
384
+ borderRadius: 14,
385
+ alignItems: 'center',
386
+ justifyContent: 'center',
387
+ borderWidth: 1,
388
+ borderColor: '#E2E8F0',
389
+ backgroundColor: '#F8FAFC',
390
+ },
391
+ emptyBox: {
392
+ padding: 20,
393
+ alignItems: 'center',
394
+ justifyContent: 'center',
395
+ gap: 8,
396
+ },
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
+ footerBar: {
435
+ minHeight: 40,
436
+ paddingHorizontal: 8,
437
+ paddingVertical: 5,
438
+ borderTopWidth: 1,
439
+ borderTopColor: '#E2E8F0',
440
+ backgroundColor: '#FFFFFF',
441
+ flexDirection: 'row',
442
+ alignItems: 'center',
443
+ justifyContent: 'space-between',
444
+ gap: 6,
445
+ zIndex: 12,
446
+ ...Platform.select({
447
+ web: {
448
+ position: 'sticky',
449
+ bottom: 0,
450
+ },
451
+ default: {},
452
+ }),
453
+ },
454
+ footerSummaryList: {
455
+ flex: 1,
456
+ minWidth: 0,
457
+ flexDirection: 'row',
458
+ alignItems: 'center',
459
+ gap: 4,
460
+ },
461
+ footerSummaryItem: {
462
+ flex: 1,
463
+ minWidth: 0,
464
+ flexBasis: 0,
465
+ flexShrink: 1,
466
+ paddingHorizontal: 4,
467
+ },
468
+ footerSummaryLabel: {
469
+ color: '#64748B',
470
+ fontSize: 9,
471
+ fontWeight: '900',
472
+ textTransform: 'uppercase',
473
+ },
474
+ footerSummaryValue: {
475
+ color: '#0F172A',
476
+ fontSize: 13,
477
+ fontWeight: '900',
478
+ },
479
+ footerCountPill: {
480
+ maxWidth: '100%',
481
+ minWidth: 0,
482
+ flexShrink: 1,
483
+ borderRadius: 999,
484
+ backgroundColor: '#EFF6FF',
485
+ paddingHorizontal: 10,
486
+ paddingVertical: 5,
487
+ },
488
+ footerCountText: {
489
+ fontSize: 11,
490
+ fontWeight: '900',
491
+ },
492
+ emptyText: {
493
+ color: '#64748B',
494
+ fontSize: 12,
495
+ fontWeight: '700',
496
+ },
497
+ modalOverlay: {
498
+ flex: 1,
499
+ alignItems: 'center',
500
+ justifyContent: 'center',
501
+ padding: 16,
502
+ backgroundColor: 'rgba(15,23,42,0.42)',
503
+ },
504
+ modalCard: {
505
+ width: '100%',
506
+ maxWidth: 860,
507
+ maxHeight: '86%',
508
+ borderRadius: 12,
509
+ backgroundColor: '#FFFFFF',
510
+ overflow: 'hidden',
511
+ ...shadow,
512
+ },
513
+ modalHeader: {
514
+ minHeight: 48,
515
+ paddingHorizontal: 14,
516
+ borderBottomWidth: 1,
517
+ borderBottomColor: '#E2E8F0',
518
+ flexDirection: 'row',
519
+ alignItems: 'center',
520
+ justifyContent: 'space-between',
521
+ },
522
+ modalTitle: {
523
+ color: '#0F172A',
524
+ fontSize: 16,
525
+ fontWeight: '900',
526
+ },
527
+ modalCloseButton: {
528
+ width: 32,
529
+ height: 32,
530
+ borderRadius: 16,
531
+ alignItems: 'center',
532
+ justifyContent: 'center',
533
+ borderWidth: 1,
534
+ borderColor: '#E2E8F0',
535
+ backgroundColor: '#F8FAFC',
536
+ },
537
+ modalBody: {
538
+ maxHeight: 520,
539
+ },
540
+ formGrid: {
541
+ padding: 14,
542
+ flexDirection: 'row',
543
+ flexWrap: 'wrap',
544
+ gap: 10,
545
+ },
546
+ formField: {
547
+ flexGrow: 1,
548
+ flexBasis: 220,
549
+ minWidth: 220,
550
+ },
551
+ formLabel: {
552
+ marginBottom: 4,
553
+ color: '#64748B',
554
+ fontSize: 10,
555
+ fontWeight: '900',
556
+ letterSpacing: 0.3,
557
+ textTransform: 'uppercase',
558
+ },
559
+ formInput: {
560
+ height: 34,
561
+ borderWidth: 1,
562
+ borderColor: '#CBD5E1',
563
+ borderRadius: 8,
564
+ paddingHorizontal: 10,
565
+ color: '#0F172A',
566
+ backgroundColor: '#FFFFFF',
567
+ fontSize: 12,
568
+ fontWeight: '700',
569
+ },
570
+ modalActions: {
571
+ minHeight: 52,
572
+ paddingHorizontal: 14,
573
+ borderTopWidth: 1,
574
+ borderTopColor: '#E2E8F0',
575
+ flexDirection: 'row',
576
+ alignItems: 'center',
577
+ justifyContent: 'flex-end',
578
+ gap: 8,
579
+ },
580
+ secondaryButton: {
581
+ height: 34,
582
+ borderRadius: 8,
583
+ borderWidth: 1,
584
+ borderColor: '#CBD5E1',
585
+ paddingHorizontal: 14,
586
+ alignItems: 'center',
587
+ justifyContent: 'center',
588
+ backgroundColor: '#FFFFFF',
589
+ },
590
+ secondaryButtonText: {
591
+ color: '#334155',
592
+ fontSize: 12,
593
+ fontWeight: '800',
594
+ },
595
+ primaryButton: {
596
+ height: 34,
597
+ borderRadius: 8,
598
+ paddingHorizontal: 16,
599
+ alignItems: 'center',
600
+ justifyContent: 'center',
601
+ backgroundColor: '#0EA5E9',
602
+ },
603
+ primaryButtonText: {
604
+ color: '#FFFFFF',
605
+ fontSize: 12,
606
+ fontWeight: '900',
607
+ },
608
+ });
609
+
610
+ export default styles;
@@ -0,0 +1,10 @@
1
+ // React entrypoint kept after Vue removal.
2
+ import DefaultFile from './components/files/DefaultFile';
3
+
4
+ const moduleEntry = {
5
+ DefaultFile,
6
+ };
7
+
8
+ export {DefaultFile};
9
+
10
+ export default moduleEntry;