vpt-sebraeds 0.0.41 → 0.0.42
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 +2 -2
- package/components/Table/index.jsx +3 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +2 -2
- package/package.json +1 -1
|
@@ -330,7 +330,7 @@ const Dropdown = ({
|
|
|
330
330
|
ref={scrollViewRef}
|
|
331
331
|
style={styles.pickerScrollView}
|
|
332
332
|
contentContainerStyle={{
|
|
333
|
-
paddingVertical: ITEM_HEIGHT *
|
|
333
|
+
paddingVertical: ITEM_HEIGHT * 1
|
|
334
334
|
}}
|
|
335
335
|
showsVerticalScrollIndicator={false}
|
|
336
336
|
snapToInterval={ITEM_HEIGHT}
|
|
@@ -521,7 +521,7 @@ const styles = StyleSheet.create({
|
|
|
521
521
|
},
|
|
522
522
|
// Picker styles
|
|
523
523
|
pickerContainer: {
|
|
524
|
-
height: ITEM_HEIGHT *
|
|
524
|
+
height: ITEM_HEIGHT * 3,
|
|
525
525
|
overflow: 'hidden',
|
|
526
526
|
},
|
|
527
527
|
pickerScrollView: {
|
|
@@ -14,7 +14,8 @@ const Table = ({
|
|
|
14
14
|
onRowPress,
|
|
15
15
|
hideUnavailableStatus = false,
|
|
16
16
|
statusDropdownShowCloseButton = false,
|
|
17
|
-
statusDropdownItemGap = 0
|
|
17
|
+
statusDropdownItemGap = 0,
|
|
18
|
+
yearDropdownShowCloseButton = false
|
|
18
19
|
}) => {
|
|
19
20
|
const [selectedYear, setSelectedYear] = useState(null);
|
|
20
21
|
const [selectedStatuses, setSelectedStatuses] = useState([]);
|
|
@@ -235,6 +236,7 @@ const Table = ({
|
|
|
235
236
|
displayMode="picker"
|
|
236
237
|
innerTitle="Escolha um ano para exibir:"
|
|
237
238
|
disabled={yearOptions.length === 0}
|
|
239
|
+
showCloseButton={yearDropdownShowCloseButton}
|
|
238
240
|
/>
|
|
239
241
|
</View>
|
|
240
242
|
|
|
@@ -247,7 +247,7 @@ const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen
|
|
|
247
247
|
if (isPicker) {
|
|
248
248
|
return (<View style={styles.pickerContainer}>
|
|
249
249
|
<ScrollView ref={scrollViewRef} style={styles.pickerScrollView} contentContainerStyle={{
|
|
250
|
-
paddingVertical: ITEM_HEIGHT *
|
|
250
|
+
paddingVertical: ITEM_HEIGHT * 1
|
|
251
251
|
}} showsVerticalScrollIndicator={false} snapToInterval={ITEM_HEIGHT} decelerationRate="fast" onMomentumScrollEnd={(e) => {
|
|
252
252
|
const idx = Math.round(e.nativeEvent.contentOffset.y / ITEM_HEIGHT);
|
|
253
253
|
const clampedIdx = Math.max(0, Math.min(idx, options.length - 1));
|
|
@@ -403,7 +403,7 @@ const styles = StyleSheet.create({
|
|
|
403
403
|
},
|
|
404
404
|
// Picker styles
|
|
405
405
|
pickerContainer: {
|
|
406
|
-
height: ITEM_HEIGHT *
|
|
406
|
+
height: ITEM_HEIGHT * 3,
|
|
407
407
|
overflow: 'hidden',
|
|
408
408
|
},
|
|
409
409
|
pickerScrollView: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default Table;
|
|
2
|
-
declare function Table({ data, showMoreComponent, showFilters, onFilterChange, selectedRowIndex, onRowPress, hideUnavailableStatus, statusDropdownShowCloseButton, statusDropdownItemGap }: {
|
|
2
|
+
declare function Table({ data, showMoreComponent, showFilters, onFilterChange, selectedRowIndex, onRowPress, hideUnavailableStatus, statusDropdownShowCloseButton, statusDropdownItemGap, yearDropdownShowCloseButton }: {
|
|
3
3
|
data?: never[] | undefined;
|
|
4
4
|
showMoreComponent: any;
|
|
5
5
|
showFilters?: boolean | undefined;
|
|
@@ -9,6 +9,7 @@ declare function Table({ data, showMoreComponent, showFilters, onFilterChange, s
|
|
|
9
9
|
hideUnavailableStatus?: boolean | undefined;
|
|
10
10
|
statusDropdownShowCloseButton?: boolean | undefined;
|
|
11
11
|
statusDropdownItemGap?: number | undefined;
|
|
12
|
+
yearDropdownShowCloseButton?: boolean | undefined;
|
|
12
13
|
}): React.JSX.Element;
|
|
13
14
|
import React from 'react';
|
|
14
15
|
//# 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;;;;;;;;;;;sBA0UC;kBAjVsE,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 '../SEText';
|
|
7
|
-
const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChange, selectedRowIndex = null, onRowPress, hideUnavailableStatus = false, statusDropdownShowCloseButton = false, statusDropdownItemGap = 0 }) => {
|
|
7
|
+
const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChange, selectedRowIndex = null, onRowPress, hideUnavailableStatus = false, statusDropdownShowCloseButton = false, statusDropdownItemGap = 0, yearDropdownShowCloseButton = false }) => {
|
|
8
8
|
const [selectedYear, setSelectedYear] = useState(null);
|
|
9
9
|
const [selectedStatuses, setSelectedStatuses] = useState([]);
|
|
10
10
|
const [selectedFilter, setSelectedFilter] = useState({});
|
|
@@ -190,7 +190,7 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
190
190
|
return (<View style={styles.container}>
|
|
191
191
|
{showFilters && (<View style={styles.filtersContainer}>
|
|
192
192
|
<View style={[styles.filterItem, { width: '35%' }]}>
|
|
193
|
-
<Select label="Ano" value={yearOptions.find(option => option.value === selectedYear)} onSelect={handleYearChange} options={yearOptions} placeholder="Selecione o ano" displayMode="picker" innerTitle="Escolha um ano para exibir:" disabled={yearOptions.length === 0}/>
|
|
193
|
+
<Select label="Ano" value={yearOptions.find(option => option.value === selectedYear)} onSelect={handleYearChange} options={yearOptions} placeholder="Selecione o ano" displayMode="picker" innerTitle="Escolha um ano para exibir:" disabled={yearOptions.length === 0} showCloseButton={yearDropdownShowCloseButton}/>
|
|
194
194
|
</View>
|
|
195
195
|
|
|
196
196
|
<View style={[styles.filterItem, { width: '60%' }]}>
|