@dhiraj0720/report1chart 2.9.4 → 2.9.5
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/package.json
CHANGED
|
@@ -19,12 +19,11 @@ const PercentCell = ({ value }) => {
|
|
|
19
19
|
);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const Cell = ({ children, bold = false,
|
|
22
|
+
const Cell = ({ children, bold = false, isFrozen = false }) => (
|
|
23
23
|
<View style={[
|
|
24
24
|
styles.cell,
|
|
25
25
|
isFrozen && styles.frozenCell,
|
|
26
|
-
bold && styles.
|
|
27
|
-
highlight && styles.highlightCell
|
|
26
|
+
bold && styles.boldCell
|
|
28
27
|
]}>
|
|
29
28
|
<Text
|
|
30
29
|
style={[styles.cellText, bold && styles.boldText]}
|
|
@@ -36,40 +35,43 @@ const Cell = ({ children, bold = false, highlight = false, isFrozen = false }) =
|
|
|
36
35
|
</View>
|
|
37
36
|
);
|
|
38
37
|
|
|
39
|
-
const FrozenTableReport1A = ({ rows = []
|
|
38
|
+
const FrozenTableReport1A = ({ rows = [] }) => {
|
|
40
39
|
if (!rows.length) {
|
|
41
40
|
return <Text style={{ textAlign: 'center', padding: 20, color: '#666' }}>No data available</Text>;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
const frozenColumnWidth =
|
|
43
|
+
const frozenColumnWidth = 150;
|
|
44
|
+
const rowHeight = 48; // Fixed height for perfect alignment
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
47
|
<View style={styles.container}>
|
|
48
|
-
{/* Frozen Column */}
|
|
48
|
+
{/* Frozen Column - Fixed Height Rows */}
|
|
49
49
|
<View style={[styles.frozenColumn, { width: frozenColumnWidth }]}>
|
|
50
50
|
<Cell bold isFrozen>FAALİYET</Cell>
|
|
51
51
|
{rows.map((row, i) => (
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
<View key={i} style={{ height: rowHeight }}>
|
|
53
|
+
<Cell bold isFrozen>
|
|
54
|
+
{row.name}
|
|
55
|
+
</Cell>
|
|
56
|
+
</View>
|
|
55
57
|
))}
|
|
56
58
|
</View>
|
|
57
59
|
|
|
58
|
-
{/* Scrollable Columns */}
|
|
60
|
+
{/* Scrollable Columns - Same Fixed Height Rows */}
|
|
59
61
|
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
|
|
60
62
|
<View>
|
|
61
|
-
{/* Header
|
|
63
|
+
{/* Header */}
|
|
62
64
|
<View style={styles.headerRow}>
|
|
63
65
|
{['2024', '2025', 'Artış %', '2025 Bütçe', 'Sapma %'].map((header) => (
|
|
64
|
-
<
|
|
65
|
-
{header}
|
|
66
|
-
</
|
|
66
|
+
<View key={header} style={{ height: rowHeight }}>
|
|
67
|
+
<Cell bold>{header}</Cell>
|
|
68
|
+
</View>
|
|
67
69
|
))}
|
|
68
70
|
</View>
|
|
69
71
|
|
|
70
72
|
{/* Data Rows */}
|
|
71
73
|
{rows.map((row, i) => (
|
|
72
|
-
<View key={i} style={styles.dataRow}>
|
|
74
|
+
<View key={i} style={[styles.dataRow, { height: rowHeight }]}>
|
|
73
75
|
<Cell>{formatNumber(row.actual2024)}</Cell>
|
|
74
76
|
<Cell>{formatNumber(row.actual2025)}</Cell>
|
|
75
77
|
<Cell><PercentCell value={row.actualChangePercent} /></Cell>
|
|
@@ -96,45 +98,42 @@ const styles = StyleSheet.create({
|
|
|
96
98
|
backgroundColor: '#fff',
|
|
97
99
|
},
|
|
98
100
|
frozenColumn: {
|
|
99
|
-
backgroundColor: '#
|
|
101
|
+
backgroundColor: '#f5f7fa',
|
|
100
102
|
borderRightWidth: 1,
|
|
101
103
|
borderColor: '#ddd',
|
|
102
104
|
},
|
|
103
105
|
headerRow: {
|
|
104
106
|
flexDirection: 'row',
|
|
105
|
-
backgroundColor: '#
|
|
107
|
+
backgroundColor: '#f0f0f0',
|
|
106
108
|
},
|
|
107
109
|
dataRow: {
|
|
108
110
|
flexDirection: 'row',
|
|
109
111
|
},
|
|
110
112
|
cell: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
flex: 1,
|
|
114
|
+
minWidth: 105,
|
|
113
115
|
paddingHorizontal: 12,
|
|
114
|
-
paddingVertical: 12,
|
|
115
116
|
justifyContent: 'center',
|
|
116
117
|
alignItems: 'center',
|
|
117
118
|
borderBottomWidth: 1,
|
|
118
|
-
borderColor: '#
|
|
119
|
+
borderColor: '#eee',
|
|
119
120
|
},
|
|
120
121
|
frozenCell: {
|
|
121
122
|
justifyContent: 'flex-start',
|
|
122
123
|
paddingLeft: 16,
|
|
124
|
+
paddingRight: 8,
|
|
125
|
+
},
|
|
126
|
+
boldCell: {
|
|
127
|
+
backgroundColor: '#e9f0f8',
|
|
123
128
|
},
|
|
124
129
|
cellText: {
|
|
125
130
|
fontSize: 12.5,
|
|
126
131
|
textAlign: 'center',
|
|
127
132
|
color: '#333',
|
|
128
133
|
},
|
|
129
|
-
bold: {
|
|
130
|
-
backgroundColor: '#e9f0f8',
|
|
131
|
-
},
|
|
132
134
|
boldText: {
|
|
133
135
|
fontWeight: '700',
|
|
134
136
|
},
|
|
135
|
-
highlightCell: {
|
|
136
|
-
backgroundColor: '#e9f0f8',
|
|
137
|
-
},
|
|
138
137
|
percentText: {
|
|
139
138
|
fontWeight: '700',
|
|
140
139
|
fontSize: 12.5,
|
|
@@ -97,9 +97,11 @@ const styles = StyleSheet.create({
|
|
|
97
97
|
header: {
|
|
98
98
|
flexDirection: 'row',
|
|
99
99
|
alignItems: 'center',
|
|
100
|
-
paddingVertical: 18,
|
|
101
100
|
paddingHorizontal: 16,
|
|
102
|
-
|
|
101
|
+
paddingVertical: 18,
|
|
102
|
+
backgroundColor: '#4E79A7',
|
|
103
|
+
borderBottomWidth: 1,
|
|
104
|
+
borderColor: '#4E79A7',
|
|
103
105
|
},
|
|
104
106
|
backButton: {
|
|
105
107
|
padding: 8,
|
|
@@ -205,7 +205,7 @@ const styles = StyleSheet.create({
|
|
|
205
205
|
borderBottomWidth: 1,
|
|
206
206
|
borderColor: '#4E79A7',
|
|
207
207
|
},
|
|
208
|
-
backIcon: { fontSize:
|
|
208
|
+
backIcon: { fontSize: 32, color: '#fff', fontWeight: '800' },
|
|
209
209
|
headerTitle: { fontSize: 19, fontWeight: '700', color: '#fff', flex: 1, textAlign: 'center' },
|
|
210
210
|
|
|
211
211
|
filterBar: {
|