vpt-sebraeds 0.0.31 → 0.0.33
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/components/Dropdown/index.jsx +40 -5
- package/components/NavigationItem/index.tsx +12 -4
- package/components/Select/index.jsx +28 -24
- package/components/Table/index.jsx +34 -24
- package/dist/components/Dropdown/index.d.ts +3 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +32 -6
- package/dist/components/NavigationItem/index.d.ts +2 -0
- package/dist/components/NavigationItem/index.d.ts.map +1 -1
- package/dist/components/NavigationItem/index.js +9 -5
- package/dist/components/Select/index.d.ts +3 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +5 -5
- package/dist/components/Table/index.d.ts +4 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +13 -10
- package/package.json +1 -1
|
@@ -171,6 +171,8 @@ const Dropdown = ({
|
|
|
171
171
|
onConfirm,
|
|
172
172
|
displayMode = 'list',
|
|
173
173
|
selectedValue,
|
|
174
|
+
showCloseButton = false,
|
|
175
|
+
itemGap = 0,
|
|
174
176
|
}) => {
|
|
175
177
|
// Estado centralizado para checkboxes
|
|
176
178
|
const [checkedItems, setCheckedItems] = useState({});
|
|
@@ -353,7 +355,7 @@ const Dropdown = ({
|
|
|
353
355
|
}
|
|
354
356
|
|
|
355
357
|
return (
|
|
356
|
-
<ScrollView style={styles.optionsList} contentContainerStyle={{ paddingBottom: 8 }} showsVerticalScrollIndicator={false} bounces={false}>
|
|
358
|
+
<ScrollView style={styles.optionsList} contentContainerStyle={{ paddingBottom: 8, gap: itemGap || 0 }} showsVerticalScrollIndicator={false} bounces={false}>
|
|
357
359
|
{options.map((item, index) => (<RenderItem key={index.toString()} item={item} index={index} />))}
|
|
358
360
|
</ScrollView>
|
|
359
361
|
);
|
|
@@ -377,9 +379,25 @@ const Dropdown = ({
|
|
|
377
379
|
|
|
378
380
|
{/* Conteúdo do modal - não propaga toque para o overlay */}
|
|
379
381
|
<View style={styles.modalContainer}>
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
382
|
+
{showCloseButton ? (
|
|
383
|
+
<>
|
|
384
|
+
<View style={styles.modalHeaderWithClose}>
|
|
385
|
+
<TouchableOpacity
|
|
386
|
+
style={styles.closeButton}
|
|
387
|
+
onPress={() => setIsOpen(false)}
|
|
388
|
+
>
|
|
389
|
+
<Icon name="close-line" size={24} color="#666666" />
|
|
390
|
+
</TouchableOpacity>
|
|
391
|
+
</View>
|
|
392
|
+
<View style={styles.titleContainerCentered}>
|
|
393
|
+
<Text style={styles.modalTitle}>{title || "Título"}</Text>
|
|
394
|
+
</View>
|
|
395
|
+
</>
|
|
396
|
+
) : (
|
|
397
|
+
<View style={styles.modalHeader}>
|
|
398
|
+
<Text style={styles.modalTitle}>{title || "Título"}</Text>
|
|
399
|
+
</View>
|
|
400
|
+
)}
|
|
383
401
|
|
|
384
402
|
{renderContent()}
|
|
385
403
|
|
|
@@ -453,6 +471,18 @@ const styles = StyleSheet.create({
|
|
|
453
471
|
paddingTop: 8,
|
|
454
472
|
paddingBottom: 16,
|
|
455
473
|
},
|
|
474
|
+
modalHeaderWithClose: {
|
|
475
|
+
alignItems: 'flex-end',
|
|
476
|
+
justifyContent: 'flex-end',
|
|
477
|
+
paddingHorizontal: 20,
|
|
478
|
+
paddingTop: 16,
|
|
479
|
+
paddingBottom: 8,
|
|
480
|
+
},
|
|
481
|
+
titleContainerCentered: {
|
|
482
|
+
alignItems: 'center',
|
|
483
|
+
paddingHorizontal: 20,
|
|
484
|
+
paddingBottom: 24,
|
|
485
|
+
},
|
|
456
486
|
modalTitle: {
|
|
457
487
|
fontSize: 18,
|
|
458
488
|
fontWeight: '600',
|
|
@@ -460,7 +490,12 @@ const styles = StyleSheet.create({
|
|
|
460
490
|
fontFamily: 'Nunito Sans',
|
|
461
491
|
},
|
|
462
492
|
closeButton: {
|
|
463
|
-
|
|
493
|
+
width: 32,
|
|
494
|
+
height: 32,
|
|
495
|
+
borderRadius: 16,
|
|
496
|
+
backgroundColor: '#F5F5F5',
|
|
497
|
+
alignItems: 'center',
|
|
498
|
+
justifyContent: 'center',
|
|
464
499
|
},
|
|
465
500
|
optionsList: {
|
|
466
501
|
paddingHorizontal: 20,
|
|
@@ -20,6 +20,8 @@ interface NavigationItemProps {
|
|
|
20
20
|
description?: string;
|
|
21
21
|
layout?: 'standard' | 'expanded' | 'list';
|
|
22
22
|
iconBackgroundColor?: string;
|
|
23
|
+
arrowSize?: number;
|
|
24
|
+
iconAlignment?: 'flex-start' | 'center';
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
@@ -39,6 +41,8 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
39
41
|
description,
|
|
40
42
|
layout = 'standard',
|
|
41
43
|
iconBackgroundColor,
|
|
44
|
+
arrowSize,
|
|
45
|
+
iconAlignment = 'flex-start',
|
|
42
46
|
}) => {
|
|
43
47
|
// Estilos dinâmicos baseados nas props
|
|
44
48
|
const containerStyle = [
|
|
@@ -57,7 +61,10 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
57
61
|
styles.iconContainer,
|
|
58
62
|
size === 'small' ? styles.iconContainerSmall : size === 'large' ? styles.iconContainerLarge : styles.iconContainerMedium,
|
|
59
63
|
variant === 'selected' ? styles.iconContainerSelected : variant === 'disabled' ? styles.iconContainerDisabled : styles.iconContainerDefault,
|
|
60
|
-
layout === 'expanded' &&
|
|
64
|
+
layout === 'expanded' && [
|
|
65
|
+
styles.iconContainerExpanded,
|
|
66
|
+
{ alignSelf: iconAlignment }
|
|
67
|
+
],
|
|
61
68
|
layout === 'list' && styles.iconContainerHidden,
|
|
62
69
|
iconBackgroundColor && { backgroundColor: iconBackgroundColor },
|
|
63
70
|
];
|
|
@@ -104,13 +111,15 @@ const NavigationItem: React.FC<NavigationItemProps> = ({
|
|
|
104
111
|
};
|
|
105
112
|
|
|
106
113
|
const getArrowSize = () => {
|
|
114
|
+
if (arrowSize !== undefined) return arrowSize;
|
|
115
|
+
|
|
107
116
|
switch (size) {
|
|
108
117
|
case 'small':
|
|
109
118
|
return 11;
|
|
110
119
|
case 'large':
|
|
111
|
-
return
|
|
120
|
+
return 16;
|
|
112
121
|
default:
|
|
113
|
-
return
|
|
122
|
+
return 13.33;
|
|
114
123
|
}
|
|
115
124
|
};
|
|
116
125
|
|
|
@@ -359,7 +368,6 @@ const styles = StyleSheet.create({
|
|
|
359
368
|
width: 48,
|
|
360
369
|
height: 48,
|
|
361
370
|
borderRadius: 12,
|
|
362
|
-
alignSelf: 'center',
|
|
363
371
|
},
|
|
364
372
|
iconContainerHidden: {
|
|
365
373
|
width: 0,
|
|
@@ -17,7 +17,9 @@ const Select = ({
|
|
|
17
17
|
supportText,
|
|
18
18
|
variant = "default",
|
|
19
19
|
displayMode,
|
|
20
|
-
innerTitle
|
|
20
|
+
innerTitle,
|
|
21
|
+
showCloseButton = false,
|
|
22
|
+
itemGap = 0
|
|
21
23
|
}) => {
|
|
22
24
|
const [isOpen, setIsOpen] = useState(false);
|
|
23
25
|
const [selectedOption, setSelectedOption] = useState(value || null);
|
|
@@ -40,7 +42,7 @@ const Select = ({
|
|
|
40
42
|
// setSelectedOption(option.map(option => option.value));
|
|
41
43
|
setSelectedOption(option.value);
|
|
42
44
|
setIsOpen(false);
|
|
43
|
-
|
|
45
|
+
|
|
44
46
|
// Compatibilidade com ambas as props
|
|
45
47
|
if (onSelect) {
|
|
46
48
|
onSelect(option);
|
|
@@ -52,7 +54,7 @@ const Select = ({
|
|
|
52
54
|
|
|
53
55
|
const getContainerStyle = () => {
|
|
54
56
|
const baseStyle = variant === "inverse" ? styles.containerInverse : styles.container;
|
|
55
|
-
|
|
57
|
+
|
|
56
58
|
if (disabled) return [baseStyle, variant === "inverse" ? styles.containerInverseDisabled : styles.containerDisabled];
|
|
57
59
|
if (error) return [baseStyle, variant === "inverse" ? styles.containerInverseError : styles.containerError];
|
|
58
60
|
if (success) return [baseStyle, variant === "inverse" ? styles.containerInverseSuccess : styles.containerSuccess];
|
|
@@ -62,7 +64,7 @@ const Select = ({
|
|
|
62
64
|
|
|
63
65
|
const getLabelStyle = () => {
|
|
64
66
|
const baseStyle = variant === "inverse" ? styles.labelInverse : styles.label;
|
|
65
|
-
|
|
67
|
+
|
|
66
68
|
if (disabled) return [baseStyle, variant === "inverse" ? styles.labelInverseDisabled : styles.labelDisabled];
|
|
67
69
|
if (error) return [baseStyle, variant === "inverse" ? styles.labelInverseError : styles.labelError];
|
|
68
70
|
if (success) return [baseStyle, variant === "inverse" ? styles.labelInverseSuccess : styles.labelSuccess];
|
|
@@ -71,7 +73,7 @@ const Select = ({
|
|
|
71
73
|
|
|
72
74
|
const getTextStyle = () => {
|
|
73
75
|
const baseStyle = variant === "inverse" ? styles.textInverse : styles.text;
|
|
74
|
-
|
|
76
|
+
|
|
75
77
|
if (disabled) return [baseStyle, variant === "inverse" ? styles.textInverseDisabled : styles.textDisabled];
|
|
76
78
|
if (error) return [baseStyle, variant === "inverse" ? styles.textInverseError : styles.textError];
|
|
77
79
|
if (success) return [baseStyle, variant === "inverse" ? styles.textInverseSuccess : styles.textSuccess];
|
|
@@ -80,7 +82,7 @@ const Select = ({
|
|
|
80
82
|
|
|
81
83
|
const getSupportTextStyle = () => {
|
|
82
84
|
const baseStyle = variant === "inverse" ? styles.supportTextInverse : styles.supportText;
|
|
83
|
-
|
|
85
|
+
|
|
84
86
|
if (error) return [baseStyle, variant === "inverse" ? styles.supportTextInverseError : styles.supportTextError];
|
|
85
87
|
if (success) return [baseStyle, variant === "inverse" ? styles.supportTextInverseSuccess : styles.supportTextSuccess];
|
|
86
88
|
return baseStyle;
|
|
@@ -93,7 +95,7 @@ const Select = ({
|
|
|
93
95
|
if (success) return '#52C41A';
|
|
94
96
|
return '#FFFFFF';
|
|
95
97
|
}
|
|
96
|
-
|
|
98
|
+
|
|
97
99
|
if (disabled) return '#BFBFBF';
|
|
98
100
|
if (error) return '#FF4D4F';
|
|
99
101
|
if (success) return '#52C41A';
|
|
@@ -105,7 +107,7 @@ const Select = ({
|
|
|
105
107
|
return (
|
|
106
108
|
<View style={wrapperStyle}>
|
|
107
109
|
{label && <SEText type="ns-sm-body" style={getLabelStyle()}>{label}</SEText>}
|
|
108
|
-
|
|
110
|
+
|
|
109
111
|
<View style={styles.selectContainer}>
|
|
110
112
|
<TouchableOpacity
|
|
111
113
|
style={getContainerStyle()}
|
|
@@ -122,30 +124,32 @@ const Select = ({
|
|
|
122
124
|
ellipsizeMode="tail"
|
|
123
125
|
>
|
|
124
126
|
{selectedOption ? (
|
|
125
|
-
selectedOption.label ||
|
|
127
|
+
selectedOption.label ||
|
|
126
128
|
selectedOption
|
|
127
129
|
) : placeholder}
|
|
128
130
|
</SEText>
|
|
129
|
-
|
|
131
|
+
|
|
130
132
|
<Icon
|
|
131
|
-
name={isOpen ? "arrow-up-s-line" : "arrow-down-s-line"}
|
|
133
|
+
name={isOpen ? "arrow-up-s-line" : "arrow-down-s-line"}
|
|
132
134
|
size={20}
|
|
133
|
-
color={getIconColor()}
|
|
135
|
+
color={getIconColor()}
|
|
134
136
|
/>
|
|
135
137
|
</TouchableOpacity>
|
|
136
138
|
|
|
137
|
-
<Dropdown
|
|
139
|
+
<Dropdown
|
|
138
140
|
title={innerTitle}
|
|
139
|
-
options={options}
|
|
140
|
-
isOpen={isOpen}
|
|
141
|
-
setIsOpen={setIsOpen}
|
|
141
|
+
options={options}
|
|
142
|
+
isOpen={isOpen}
|
|
143
|
+
setIsOpen={setIsOpen}
|
|
142
144
|
onSelect={handleSelect}
|
|
143
145
|
displayMode={displayMode}
|
|
144
146
|
selectedValue={selectedOption}
|
|
147
|
+
showCloseButton={showCloseButton}
|
|
148
|
+
itemGap={itemGap}
|
|
145
149
|
/>
|
|
146
150
|
</View>
|
|
147
151
|
|
|
148
|
-
|
|
152
|
+
{supportText && <SEText type="ns-xs-body" style={getSupportTextStyle()}>{supportText}</SEText>}
|
|
149
153
|
</View>
|
|
150
154
|
);
|
|
151
155
|
};
|
|
@@ -163,7 +167,7 @@ const styles = StyleSheet.create({
|
|
|
163
167
|
position: 'relative',
|
|
164
168
|
zIndex: 1000,
|
|
165
169
|
},
|
|
166
|
-
|
|
170
|
+
|
|
167
171
|
// DEFAULT VARIANT STYLES
|
|
168
172
|
container: {
|
|
169
173
|
flexDirection: 'row',
|
|
@@ -192,7 +196,7 @@ const styles = StyleSheet.create({
|
|
|
192
196
|
borderColor: '#E6EEFF',
|
|
193
197
|
backgroundColor: '#F5F5F5',
|
|
194
198
|
},
|
|
195
|
-
|
|
199
|
+
|
|
196
200
|
// INVERSE VARIANT STYLES
|
|
197
201
|
containerInverse: {
|
|
198
202
|
flexDirection: 'row',
|
|
@@ -222,7 +226,7 @@ const styles = StyleSheet.create({
|
|
|
222
226
|
borderColor: 'rgba(255, 255, 255, 0.1)',
|
|
223
227
|
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
224
228
|
},
|
|
225
|
-
|
|
229
|
+
|
|
226
230
|
// LABEL STYLES
|
|
227
231
|
label: {
|
|
228
232
|
fontSize: 18,
|
|
@@ -251,7 +255,7 @@ const styles = StyleSheet.create({
|
|
|
251
255
|
labelInverseDisabled: {
|
|
252
256
|
color: 'rgba(255, 255, 255, 0.4)',
|
|
253
257
|
},
|
|
254
|
-
|
|
258
|
+
|
|
255
259
|
// TEXT STYLES
|
|
256
260
|
text: {
|
|
257
261
|
flex: 1,
|
|
@@ -282,7 +286,7 @@ const styles = StyleSheet.create({
|
|
|
282
286
|
textInverseDisabled: {
|
|
283
287
|
color: 'rgba(255, 255, 255, 0.4)',
|
|
284
288
|
},
|
|
285
|
-
|
|
289
|
+
|
|
286
290
|
// PLACEHOLDER STYLES
|
|
287
291
|
placeholderText: {
|
|
288
292
|
color: '#BFBFBF',
|
|
@@ -290,12 +294,12 @@ const styles = StyleSheet.create({
|
|
|
290
294
|
placeholderTextInverse: {
|
|
291
295
|
color: 'rgba(255, 255, 255, 0.6)',
|
|
292
296
|
},
|
|
293
|
-
|
|
297
|
+
|
|
294
298
|
// SUPPORT TEXT STYLES
|
|
295
299
|
supportText: {
|
|
296
300
|
fontSize: 12,
|
|
297
301
|
color: '#4F7CFE',
|
|
298
|
-
|
|
302
|
+
|
|
299
303
|
},
|
|
300
304
|
supportTextError: {
|
|
301
305
|
color: '#FF4D4F',
|
|
@@ -5,13 +5,16 @@ import Icon from '../Icon';
|
|
|
5
5
|
import Select from '../Select';
|
|
6
6
|
import { SEText } from 'vpt-sebraeds';
|
|
7
7
|
|
|
8
|
-
const Table = ({
|
|
9
|
-
data = [],
|
|
10
|
-
showMoreComponent,
|
|
8
|
+
const Table = ({
|
|
9
|
+
data = [],
|
|
10
|
+
showMoreComponent,
|
|
11
11
|
showFilters = false,
|
|
12
12
|
onFilterChange,
|
|
13
13
|
selectedRowIndex = null,
|
|
14
|
-
onRowPress
|
|
14
|
+
onRowPress,
|
|
15
|
+
hideUnavailableStatus = false,
|
|
16
|
+
statusDropdownShowCloseButton = false,
|
|
17
|
+
statusDropdownItemGap = 0
|
|
15
18
|
}) => {
|
|
16
19
|
const [selectedYear, setSelectedYear] = useState(null);
|
|
17
20
|
const [selectedStatuses, setSelectedStatuses] = useState([]);
|
|
@@ -53,7 +56,7 @@ const Table = ({
|
|
|
53
56
|
// Função para mapear o status do backend para o status do componente
|
|
54
57
|
const mapStatus = (statusObj) => {
|
|
55
58
|
if (!statusObj) return 'overdue';
|
|
56
|
-
|
|
59
|
+
|
|
57
60
|
switch (statusObj.label) {
|
|
58
61
|
case 'PAGO':
|
|
59
62
|
return 'paid';
|
|
@@ -68,11 +71,11 @@ const Table = ({
|
|
|
68
71
|
// Função para formatar o valor
|
|
69
72
|
const formatPrice = (valorTotal) => {
|
|
70
73
|
if (!valorTotal || valorTotal === '0') return 'R$ 0,00';
|
|
71
|
-
|
|
74
|
+
|
|
72
75
|
if (typeof valorTotal === 'string' && valorTotal.includes('R$')) {
|
|
73
76
|
return valorTotal;
|
|
74
77
|
}
|
|
75
|
-
|
|
78
|
+
|
|
76
79
|
const numValue = parseFloat(valorTotal);
|
|
77
80
|
return new Intl.NumberFormat('pt-BR', {
|
|
78
81
|
style: 'currency',
|
|
@@ -123,7 +126,7 @@ const Table = ({
|
|
|
123
126
|
if (statusData && statusData.label) {
|
|
124
127
|
return statusData.label;
|
|
125
128
|
}
|
|
126
|
-
|
|
129
|
+
|
|
127
130
|
switch (statusData) {
|
|
128
131
|
case 'paid':
|
|
129
132
|
return 'Pago';
|
|
@@ -168,7 +171,7 @@ const Table = ({
|
|
|
168
171
|
if (a.year !== b.year) {
|
|
169
172
|
return b.year - a.year;
|
|
170
173
|
}
|
|
171
|
-
|
|
174
|
+
|
|
172
175
|
const aMonth = new Date(a.originalData.dtCompetenciaLocal).getMonth();
|
|
173
176
|
const bMonth = new Date(b.originalData.dtCompetenciaLocal).getMonth();
|
|
174
177
|
return aMonth - bMonth;
|
|
@@ -185,13 +188,18 @@ const Table = ({
|
|
|
185
188
|
}, [transformedData]);
|
|
186
189
|
|
|
187
190
|
const statusOptions = useMemo(() => {
|
|
188
|
-
|
|
191
|
+
const options = [
|
|
189
192
|
{ value: 'ATRASADO', label: 'Atrasado', isCheckbox: true },
|
|
190
193
|
{ value: 'A VENCER', label: 'A vencer', isCheckbox: true },
|
|
191
|
-
{ value: 'PAGO', label: 'Pago', isCheckbox: true }
|
|
192
|
-
{ value: 'INDISPONÍVEL', label: 'Indisponível', isCheckbox: true }
|
|
194
|
+
{ value: 'PAGO', label: 'Pago', isCheckbox: true }
|
|
193
195
|
];
|
|
194
|
-
|
|
196
|
+
|
|
197
|
+
if (!hideUnavailableStatus) {
|
|
198
|
+
options.push({ value: 'INDISPONÍVEL', label: 'Indisponível', isCheckbox: true });
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return options;
|
|
202
|
+
}, [hideUnavailableStatus]);
|
|
195
203
|
|
|
196
204
|
// Handlers para os filtros
|
|
197
205
|
const handleYearChange = (yearOption) => {
|
|
@@ -227,7 +235,7 @@ const Table = ({
|
|
|
227
235
|
displayMode="picker"
|
|
228
236
|
innerTitle="Escolha um ano para exibir:"
|
|
229
237
|
disabled={yearOptions.length === 0}
|
|
230
|
-
|
|
238
|
+
/>
|
|
231
239
|
</View>
|
|
232
240
|
|
|
233
241
|
<View style={[styles.filterItem, { width: '60%' }]}>
|
|
@@ -237,17 +245,19 @@ const Table = ({
|
|
|
237
245
|
.filter(option => selectedStatuses.includes(option.value))
|
|
238
246
|
.map(option => option.value)
|
|
239
247
|
.join(', ')
|
|
240
|
-
.toLowerCase()
|
|
248
|
+
.toLowerCase()
|
|
241
249
|
}
|
|
242
250
|
onSelect={handleStatusChange}
|
|
243
251
|
options={statusOptions}
|
|
244
252
|
placeholder="Selecione o status"
|
|
245
253
|
innerTitle="Escolha qual status exibir:"
|
|
254
|
+
showCloseButton={statusDropdownShowCloseButton}
|
|
255
|
+
itemGap={statusDropdownItemGap}
|
|
246
256
|
/>
|
|
247
257
|
</View>
|
|
248
258
|
</View>
|
|
249
259
|
)}
|
|
250
|
-
|
|
260
|
+
|
|
251
261
|
{transformedData.length === 0 ? (
|
|
252
262
|
<View style={styles.emptyContainer}>
|
|
253
263
|
<SEText type="ns-sm-body" style={styles.emptyText}>Nenhum registro encontrado</SEText>
|
|
@@ -259,11 +269,11 @@ const Table = ({
|
|
|
259
269
|
activeOpacity: 0.6,
|
|
260
270
|
onPress: () => onRowPress(index, item)
|
|
261
271
|
} : {};
|
|
262
|
-
|
|
272
|
+
|
|
263
273
|
const isSelected = selectedRowIndex === index;
|
|
264
|
-
|
|
274
|
+
|
|
265
275
|
return (
|
|
266
|
-
<RowComponent
|
|
276
|
+
<RowComponent
|
|
267
277
|
key={`${item.originalData.dtCompetenciaLocal}-${index}`}
|
|
268
278
|
style={getRowStyle(index)}
|
|
269
279
|
{...rowProps}
|
|
@@ -279,7 +289,7 @@ const Table = ({
|
|
|
279
289
|
{item.month}
|
|
280
290
|
</SEText>
|
|
281
291
|
</View>
|
|
282
|
-
|
|
292
|
+
|
|
283
293
|
<View style={styles.centerContent}>
|
|
284
294
|
<SEText
|
|
285
295
|
type="ns-sm-body"
|
|
@@ -291,7 +301,7 @@ const Table = ({
|
|
|
291
301
|
{item.price}
|
|
292
302
|
</SEText>
|
|
293
303
|
</View>
|
|
294
|
-
|
|
304
|
+
|
|
295
305
|
<View style={styles.rightContent}>
|
|
296
306
|
<View style={styles.statusContainer}>
|
|
297
307
|
<SEText
|
|
@@ -315,7 +325,7 @@ const Table = ({
|
|
|
315
325
|
);
|
|
316
326
|
})
|
|
317
327
|
)}
|
|
318
|
-
|
|
328
|
+
|
|
319
329
|
{showMoreComponent && transformedData.length !== 0 && (
|
|
320
330
|
<View style={styles.showMoreContainer}>
|
|
321
331
|
{showMoreComponent}
|
|
@@ -357,7 +367,7 @@ const styles = StyleSheet.create({
|
|
|
357
367
|
rowSelected: {
|
|
358
368
|
backgroundColor: '#E3E9FF',
|
|
359
369
|
borderWidth: 2,
|
|
360
|
-
borderRadius: 8,
|
|
370
|
+
borderRadius: 8,
|
|
361
371
|
borderColor: '#3B82F6',
|
|
362
372
|
borderTopColor: '#3B82F6',
|
|
363
373
|
borderLeftColor: '#3B82F6',
|
|
@@ -409,7 +419,7 @@ const styles = StyleSheet.create({
|
|
|
409
419
|
justifyContent: 'center',
|
|
410
420
|
},
|
|
411
421
|
emptyText: {
|
|
412
|
-
|
|
422
|
+
|
|
413
423
|
fontSize: 16,
|
|
414
424
|
color: '#6B7280',
|
|
415
425
|
textAlign: 'center',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function DropdownCommitments(): React.JSX.Element;
|
|
2
2
|
export default Dropdown;
|
|
3
3
|
import React from 'react';
|
|
4
|
-
declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isCheckbox, setIsOpen, confirmButtonLabel, onConfirm, displayMode, selectedValue, }: {
|
|
4
|
+
declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isCheckbox, setIsOpen, confirmButtonLabel, onConfirm, displayMode, selectedValue, showCloseButton, itemGap, }: {
|
|
5
5
|
title: any;
|
|
6
6
|
onSelect: any;
|
|
7
7
|
options?: never[] | undefined;
|
|
@@ -13,5 +13,7 @@ declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isC
|
|
|
13
13
|
onConfirm: any;
|
|
14
14
|
displayMode?: string | undefined;
|
|
15
15
|
selectedValue: any;
|
|
16
|
+
showCloseButton?: boolean | undefined;
|
|
17
|
+
itemGap?: number | undefined;
|
|
16
18
|
}): React.JSX.Element;
|
|
17
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Dropdown/index.jsx"],"names":[],"mappings":"AA+FO,yDA6DN;;kBA3JkD,OAAO;AAgK1D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Dropdown/index.jsx"],"names":[],"mappings":"AA+FO,yDA6DN;;kBA3JkD,OAAO;AAgK1D;;;;;;;;;;;;;;sBA+QC"}
|
|
@@ -136,7 +136,7 @@ export const DropdownCommitments = () => {
|
|
|
136
136
|
};
|
|
137
137
|
const { height: screenHeight } = Dimensions.get('window');
|
|
138
138
|
const ITEM_HEIGHT = 50;
|
|
139
|
-
const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen = false, isCheckbox = false, setIsOpen = () => { }, confirmButtonLabel, onConfirm, displayMode = 'list', selectedValue, }) => {
|
|
139
|
+
const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen = false, isCheckbox = false, setIsOpen = () => { }, confirmButtonLabel, onConfirm, displayMode = 'list', selectedValue, showCloseButton = false, itemGap = 0, }) => {
|
|
140
140
|
// Estado centralizado para checkboxes
|
|
141
141
|
const [checkedItems, setCheckedItems] = useState({});
|
|
142
142
|
const scrollViewRef = useRef(null);
|
|
@@ -261,7 +261,7 @@ const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen
|
|
|
261
261
|
</ScrollView>
|
|
262
262
|
</View>);
|
|
263
263
|
}
|
|
264
|
-
return (<ScrollView style={styles.optionsList} contentContainerStyle={{ paddingBottom: 8 }} showsVerticalScrollIndicator={false} bounces={false}>
|
|
264
|
+
return (<ScrollView style={styles.optionsList} contentContainerStyle={{ paddingBottom: 8, gap: itemGap || 0 }} showsVerticalScrollIndicator={false} bounces={false}>
|
|
265
265
|
{options.map((item, index) => (<RenderItem key={index.toString()} item={item} index={index}/>))}
|
|
266
266
|
</ScrollView>);
|
|
267
267
|
};
|
|
@@ -273,9 +273,18 @@ const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen
|
|
|
273
273
|
|
|
274
274
|
{/* Conteúdo do modal - não propaga toque para o overlay */}
|
|
275
275
|
<View style={styles.modalContainer}>
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
{showCloseButton ? (<>
|
|
277
|
+
<View style={styles.modalHeaderWithClose}>
|
|
278
|
+
<TouchableOpacity style={styles.closeButton} onPress={() => setIsOpen(false)}>
|
|
279
|
+
<Icon name="close-line" size={24} color="#666666"/>
|
|
280
|
+
</TouchableOpacity>
|
|
281
|
+
</View>
|
|
282
|
+
<View style={styles.titleContainerCentered}>
|
|
283
|
+
<Text style={styles.modalTitle}>{title || "Título"}</Text>
|
|
284
|
+
</View>
|
|
285
|
+
</>) : (<View style={styles.modalHeader}>
|
|
286
|
+
<Text style={styles.modalTitle}>{title || "Título"}</Text>
|
|
287
|
+
</View>)}
|
|
279
288
|
|
|
280
289
|
{renderContent()}
|
|
281
290
|
|
|
@@ -344,6 +353,18 @@ const styles = StyleSheet.create({
|
|
|
344
353
|
paddingTop: 8,
|
|
345
354
|
paddingBottom: 16,
|
|
346
355
|
},
|
|
356
|
+
modalHeaderWithClose: {
|
|
357
|
+
alignItems: 'flex-end',
|
|
358
|
+
justifyContent: 'flex-end',
|
|
359
|
+
paddingHorizontal: 20,
|
|
360
|
+
paddingTop: 16,
|
|
361
|
+
paddingBottom: 8,
|
|
362
|
+
},
|
|
363
|
+
titleContainerCentered: {
|
|
364
|
+
alignItems: 'center',
|
|
365
|
+
paddingHorizontal: 20,
|
|
366
|
+
paddingBottom: 24,
|
|
367
|
+
},
|
|
347
368
|
modalTitle: {
|
|
348
369
|
fontSize: 18,
|
|
349
370
|
fontWeight: '600',
|
|
@@ -351,7 +372,12 @@ const styles = StyleSheet.create({
|
|
|
351
372
|
fontFamily: 'Nunito Sans',
|
|
352
373
|
},
|
|
353
374
|
closeButton: {
|
|
354
|
-
|
|
375
|
+
width: 32,
|
|
376
|
+
height: 32,
|
|
377
|
+
borderRadius: 16,
|
|
378
|
+
backgroundColor: '#F5F5F5',
|
|
379
|
+
alignItems: 'center',
|
|
380
|
+
justifyContent: 'center',
|
|
355
381
|
},
|
|
356
382
|
optionsList: {
|
|
357
383
|
paddingHorizontal: 20,
|
|
@@ -17,6 +17,8 @@ interface NavigationItemProps {
|
|
|
17
17
|
description?: string;
|
|
18
18
|
layout?: 'standard' | 'expanded' | 'list';
|
|
19
19
|
iconBackgroundColor?: string;
|
|
20
|
+
arrowSize?: number;
|
|
21
|
+
iconAlignment?: 'flex-start' | 'center';
|
|
20
22
|
}
|
|
21
23
|
declare const NavigationItem: React.FC<NavigationItemProps>;
|
|
22
24
|
export default NavigationItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/NavigationItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsC,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAInG,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC9C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/NavigationItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsC,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAInG,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC9C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC;CACzC;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwOjD,CAAC;AAwQF,eAAe,cAAc,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
3
|
import Icon from '../Icon';
|
|
4
4
|
import SEText from '../SEText';
|
|
5
|
-
const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium', onPress, style, iconColor, textColor, backgroundColor, borderColor, showArrow = true, badge, badgeStyle = 'standard', description, layout = 'standard', iconBackgroundColor, }) => {
|
|
5
|
+
const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium', onPress, style, iconColor, textColor, backgroundColor, borderColor, showArrow = true, badge, badgeStyle = 'standard', description, layout = 'standard', iconBackgroundColor, arrowSize, iconAlignment = 'flex-start', }) => {
|
|
6
6
|
// Estilos dinâmicos baseados nas props
|
|
7
7
|
const containerStyle = [
|
|
8
8
|
styles.container,
|
|
@@ -19,7 +19,10 @@ const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium',
|
|
|
19
19
|
styles.iconContainer,
|
|
20
20
|
size === 'small' ? styles.iconContainerSmall : size === 'large' ? styles.iconContainerLarge : styles.iconContainerMedium,
|
|
21
21
|
variant === 'selected' ? styles.iconContainerSelected : variant === 'disabled' ? styles.iconContainerDisabled : styles.iconContainerDefault,
|
|
22
|
-
layout === 'expanded' &&
|
|
22
|
+
layout === 'expanded' && [
|
|
23
|
+
styles.iconContainerExpanded,
|
|
24
|
+
{ alignSelf: iconAlignment }
|
|
25
|
+
],
|
|
23
26
|
layout === 'list' && styles.iconContainerHidden,
|
|
24
27
|
iconBackgroundColor && { backgroundColor: iconBackgroundColor },
|
|
25
28
|
];
|
|
@@ -62,13 +65,15 @@ const NavigationItem = ({ iconName, label, variant = 'default', size = 'medium',
|
|
|
62
65
|
}
|
|
63
66
|
};
|
|
64
67
|
const getArrowSize = () => {
|
|
68
|
+
if (arrowSize !== undefined)
|
|
69
|
+
return arrowSize;
|
|
65
70
|
switch (size) {
|
|
66
71
|
case 'small':
|
|
67
72
|
return 11;
|
|
68
73
|
case 'large':
|
|
69
|
-
return
|
|
74
|
+
return 16;
|
|
70
75
|
default:
|
|
71
|
-
return
|
|
76
|
+
return 13.33;
|
|
72
77
|
}
|
|
73
78
|
};
|
|
74
79
|
const getBadgeStyle = () => {
|
|
@@ -260,7 +265,6 @@ const styles = StyleSheet.create({
|
|
|
260
265
|
width: 48,
|
|
261
266
|
height: 48,
|
|
262
267
|
borderRadius: 12,
|
|
263
|
-
alignSelf: 'center',
|
|
264
268
|
},
|
|
265
269
|
iconContainerHidden: {
|
|
266
270
|
width: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default Select;
|
|
2
|
-
declare function Select({ label, placeholder, value, onSelect, onValueChange, options, error, success, disabled, supportText, variant, displayMode, innerTitle }: {
|
|
2
|
+
declare function Select({ label, placeholder, value, onSelect, onValueChange, options, error, success, disabled, supportText, variant, displayMode, innerTitle, showCloseButton, itemGap }: {
|
|
3
3
|
label: any;
|
|
4
4
|
placeholder?: string | undefined;
|
|
5
5
|
value: any;
|
|
@@ -13,6 +13,8 @@ declare function Select({ label, placeholder, value, onSelect, onValueChange, op
|
|
|
13
13
|
variant?: string | undefined;
|
|
14
14
|
displayMode: any;
|
|
15
15
|
innerTitle: any;
|
|
16
|
+
showCloseButton?: boolean | undefined;
|
|
17
|
+
itemGap?: number | undefined;
|
|
16
18
|
}): React.JSX.Element;
|
|
17
19
|
import React from 'react';
|
|
18
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Select/index.jsx"],"names":[],"mappings":";AAMA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Select/index.jsx"],"names":[],"mappings":";AAMA;;;;;;;;;;;;;;;;sBAoJC;kBA1J0C,OAAO"}
|
|
@@ -4,7 +4,7 @@ import { SEText } from 'vpt-sebraeds';
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import Dropdown from '../Dropdown';
|
|
6
6
|
const Select = ({ label, placeholder = "Selecione uma opção", value, onSelect, onValueChange, // Manter compatibilidade
|
|
7
|
-
options = [], error, success, disabled, supportText, variant = "default", displayMode, innerTitle }) => {
|
|
7
|
+
options = [], error, success, disabled, supportText, variant = "default", displayMode, innerTitle, showCloseButton = false, itemGap = 0 }) => {
|
|
8
8
|
const [isOpen, setIsOpen] = useState(false);
|
|
9
9
|
const [selectedOption, setSelectedOption] = useState(value || null);
|
|
10
10
|
useEffect(() => {
|
|
@@ -91,7 +91,7 @@ options = [], error, success, disabled, supportText, variant = "default", displa
|
|
|
91
91
|
const wrapperStyle = variant === "inverse" ? styles.wrapperInverse : styles.wrapper;
|
|
92
92
|
return (<View style={wrapperStyle}>
|
|
93
93
|
{label && <SEText type="ns-sm-body" style={getLabelStyle()}>{label}</SEText>}
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
<View style={styles.selectContainer}>
|
|
96
96
|
<TouchableOpacity style={getContainerStyle()} onPress={toggleDropdown} activeOpacity={disabled ? 1 : 0.7}>
|
|
97
97
|
<SEText type="ns-sm-body" style={[
|
|
@@ -101,14 +101,14 @@ options = [], error, success, disabled, supportText, variant = "default", displa
|
|
|
101
101
|
{selectedOption ? (selectedOption.label ||
|
|
102
102
|
selectedOption) : placeholder}
|
|
103
103
|
</SEText>
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
<Icon name={isOpen ? "arrow-up-s-line" : "arrow-down-s-line"} size={20} color={getIconColor()}/>
|
|
106
106
|
</TouchableOpacity>
|
|
107
107
|
|
|
108
|
-
<Dropdown title={innerTitle} options={options} isOpen={isOpen} setIsOpen={setIsOpen} onSelect={handleSelect} displayMode={displayMode} selectedValue={selectedOption}/>
|
|
108
|
+
<Dropdown title={innerTitle} options={options} isOpen={isOpen} setIsOpen={setIsOpen} onSelect={handleSelect} displayMode={displayMode} selectedValue={selectedOption} showCloseButton={showCloseButton} itemGap={itemGap}/>
|
|
109
109
|
</View>
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
{supportText && <SEText type="ns-xs-body" style={getSupportTextStyle()}>{supportText}</SEText>}
|
|
112
112
|
</View>);
|
|
113
113
|
};
|
|
114
114
|
const styles = StyleSheet.create({
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export default Table;
|
|
2
|
-
declare function Table({ data, showMoreComponent, showFilters, onFilterChange, selectedRowIndex, onRowPress }: {
|
|
2
|
+
declare function Table({ data, showMoreComponent, showFilters, onFilterChange, selectedRowIndex, onRowPress, hideUnavailableStatus, statusDropdownShowCloseButton, statusDropdownItemGap }: {
|
|
3
3
|
data?: never[] | undefined;
|
|
4
4
|
showMoreComponent: any;
|
|
5
5
|
showFilters?: boolean | undefined;
|
|
6
6
|
onFilterChange: any;
|
|
7
7
|
selectedRowIndex?: null | undefined;
|
|
8
8
|
onRowPress: any;
|
|
9
|
+
hideUnavailableStatus?: boolean | undefined;
|
|
10
|
+
statusDropdownShowCloseButton?: boolean | undefined;
|
|
11
|
+
statusDropdownItemGap?: number | undefined;
|
|
9
12
|
}): React.JSX.Element;
|
|
10
13
|
import React from 'react';
|
|
11
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Table/index.jsx"],"names":[],"mappings":";AAOA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Table/index.jsx"],"names":[],"mappings":";AAOA;;;;;;;;;;sBAwUC;kBA/UsE,OAAO"}
|
|
@@ -4,7 +4,7 @@ import moment from 'moment';
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import Select from '../Select';
|
|
6
6
|
import { SEText } from 'vpt-sebraeds';
|
|
7
|
-
const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChange, selectedRowIndex = null, onRowPress }) => {
|
|
7
|
+
const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChange, selectedRowIndex = null, onRowPress, hideUnavailableStatus = false, statusDropdownShowCloseButton = false, statusDropdownItemGap = 0 }) => {
|
|
8
8
|
const [selectedYear, setSelectedYear] = useState(null);
|
|
9
9
|
const [selectedStatuses, setSelectedStatuses] = useState([]);
|
|
10
10
|
const [selectedFilter, setSelectedFilter] = useState({});
|
|
@@ -160,13 +160,16 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
160
160
|
}));
|
|
161
161
|
}, [transformedData]);
|
|
162
162
|
const statusOptions = useMemo(() => {
|
|
163
|
-
|
|
163
|
+
const options = [
|
|
164
164
|
{ value: 'ATRASADO', label: 'Atrasado', isCheckbox: true },
|
|
165
165
|
{ value: 'A VENCER', label: 'A vencer', isCheckbox: true },
|
|
166
|
-
{ value: 'PAGO', label: 'Pago', isCheckbox: true }
|
|
167
|
-
{ value: 'INDISPONÍVEL', label: 'Indisponível', isCheckbox: true }
|
|
166
|
+
{ value: 'PAGO', label: 'Pago', isCheckbox: true }
|
|
168
167
|
];
|
|
169
|
-
|
|
168
|
+
if (!hideUnavailableStatus) {
|
|
169
|
+
options.push({ value: 'INDISPONÍVEL', label: 'Indisponível', isCheckbox: true });
|
|
170
|
+
}
|
|
171
|
+
return options;
|
|
172
|
+
}, [hideUnavailableStatus]);
|
|
170
173
|
// Handlers para os filtros
|
|
171
174
|
const handleYearChange = (yearOption) => {
|
|
172
175
|
const newYear = yearOption?.value || null;
|
|
@@ -195,10 +198,10 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
195
198
|
.filter(option => selectedStatuses.includes(option.value))
|
|
196
199
|
.map(option => option.value)
|
|
197
200
|
.join(', ')
|
|
198
|
-
.toLowerCase()} onSelect={handleStatusChange} options={statusOptions} placeholder="Selecione o status" innerTitle="Escolha qual status exibir:"/>
|
|
201
|
+
.toLowerCase()} onSelect={handleStatusChange} options={statusOptions} placeholder="Selecione o status" innerTitle="Escolha qual status exibir:" showCloseButton={statusDropdownShowCloseButton} itemGap={statusDropdownItemGap}/>
|
|
199
202
|
</View>
|
|
200
203
|
</View>)}
|
|
201
|
-
|
|
204
|
+
|
|
202
205
|
{transformedData.length === 0 ? (<View style={styles.emptyContainer}>
|
|
203
206
|
<SEText type="ns-sm-body" style={styles.emptyText}>Nenhum registro encontrado</SEText>
|
|
204
207
|
</View>) : (transformedData.map((item, index) => {
|
|
@@ -217,7 +220,7 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
217
220
|
{item.month}
|
|
218
221
|
</SEText>
|
|
219
222
|
</View>
|
|
220
|
-
|
|
223
|
+
|
|
221
224
|
<View style={styles.centerContent}>
|
|
222
225
|
<SEText type="ns-sm-body" style={[
|
|
223
226
|
styles.priceText,
|
|
@@ -226,7 +229,7 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
226
229
|
{item.price}
|
|
227
230
|
</SEText>
|
|
228
231
|
</View>
|
|
229
|
-
|
|
232
|
+
|
|
230
233
|
<View style={styles.rightContent}>
|
|
231
234
|
<View style={styles.statusContainer}>
|
|
232
235
|
<SEText type="ns-sm-body" style={[
|
|
@@ -241,7 +244,7 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
241
244
|
</View>
|
|
242
245
|
</RowComponent>);
|
|
243
246
|
}))}
|
|
244
|
-
|
|
247
|
+
|
|
245
248
|
{showMoreComponent && transformedData.length !== 0 && (<View style={styles.showMoreContainer}>
|
|
246
249
|
{showMoreComponent}
|
|
247
250
|
</View>)}
|