@bit.rhplus/ag-grid 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/dist/index.js +120 -57
- package/dist/index.js.map +1 -1
- package/index.jsx +127 -57
- package/package.json +2 -2
- /package/dist/{preview-1754923422987.js → preview-1756735815679.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -17,68 +17,96 @@ import ButtonRenderer from './Renderers/ButtonRenderer';
|
|
|
17
17
|
import CountrySelectRenderer from './Renderers/CountrySelectRenderer';
|
|
18
18
|
const AgGrid = React.forwardRef((props, ref) => {
|
|
19
19
|
const internalRef = React.useRef();
|
|
20
|
-
const { rowData = [], newRowFlash = true, onGridReady } = props;
|
|
20
|
+
const { rowData = [], newRowFlash = true, updatedRowFlash = false, onGridReady } = props;
|
|
21
21
|
const [, setIsGridReady] = React.useState(false);
|
|
22
22
|
const previousRowDataRef = React.useRef(rowData);
|
|
23
23
|
const findNewRows = (oldData, newData) => {
|
|
24
24
|
const oldIds = new Set(oldData.map((row) => row.id));
|
|
25
25
|
return newData.filter((row) => !oldIds.has(row.id));
|
|
26
26
|
};
|
|
27
|
+
const findUpdatedRows = (oldData, newData) => {
|
|
28
|
+
const oldDataMap = new Map(oldData.map((row) => [row.id, row]));
|
|
29
|
+
return newData.filter((newRow) => {
|
|
30
|
+
const oldRow = oldDataMap.get(newRow.id);
|
|
31
|
+
if (!oldRow)
|
|
32
|
+
return false; // Nový řádek, ne aktualizovaný
|
|
33
|
+
// Porovnáme pouze základní vlastnosti pro rychlost
|
|
34
|
+
return JSON.stringify(oldRow) !== JSON.stringify(newRow);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
27
37
|
React.useImperativeHandle(ref, () => internalRef.current, [internalRef]);
|
|
28
38
|
React.useEffect(() => {
|
|
29
|
-
if (!newRowFlash)
|
|
39
|
+
if (!newRowFlash && !updatedRowFlash)
|
|
30
40
|
return;
|
|
31
41
|
const previousRowData = previousRowDataRef.current;
|
|
32
|
-
const addedRows = findNewRows(previousRowData, rowData);
|
|
33
|
-
|
|
42
|
+
const addedRows = newRowFlash ? findNewRows(previousRowData, rowData) : [];
|
|
43
|
+
const updatedRows = updatedRowFlash ? findUpdatedRows(previousRowData, rowData) : [];
|
|
44
|
+
if (addedRows.length > 0 || updatedRows.length > 0) {
|
|
34
45
|
setTimeout(() => {
|
|
35
46
|
try {
|
|
36
47
|
// Bezpečnostní kontrola API dostupnosti
|
|
37
48
|
if (!internalRef.current?.api || internalRef.current.api.isDestroyed?.()) {
|
|
38
|
-
console.log("⚠️ AG-Grid: API not available or destroyed, skipping flashCells");
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const newRowNodes = [];
|
|
42
|
-
internalRef.current.api.forEachNode((node) => {
|
|
43
|
-
if (addedRows.some((row) => row.id === node.data.id)) {
|
|
44
|
-
newRowNodes.push(node);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
// Kontrola, že máme platné row nodes
|
|
48
|
-
if (newRowNodes.length === 0) {
|
|
49
|
-
console.log("⚠️ AG-Grid: No valid row nodes found for flashing");
|
|
50
49
|
return;
|
|
51
50
|
}
|
|
52
51
|
// Modern AG-Grid (33+): getColumnState() moved to main api
|
|
53
52
|
const columnApi = internalRef.current?.columnApi || internalRef.current?.api;
|
|
54
|
-
if (columnApi?.getColumnState) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
if (!columnApi?.getColumnState) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const columnStates = columnApi.getColumnState();
|
|
57
|
+
const allColumns = columnStates
|
|
58
|
+
.filter(colState => colState.colId) // Filtrujeme pouze platné colId
|
|
59
|
+
.map((colState) => colState.colId);
|
|
60
|
+
// Kontrola, že máme platné sloupce
|
|
61
|
+
if (allColumns.length === 0) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Flash efekt pro nové řádky (používá defaultní zelená barva AG Grid)
|
|
65
|
+
if (addedRows.length > 0) {
|
|
66
|
+
const newRowNodes = [];
|
|
67
|
+
internalRef.current.api.forEachNode((node) => {
|
|
68
|
+
if (addedRows.some((row) => row.id === node.data.id)) {
|
|
69
|
+
newRowNodes.push(node);
|
|
70
|
+
}
|
|
67
71
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
if (newRowNodes.length > 0) {
|
|
73
|
+
internalRef.current.api.flashCells({
|
|
74
|
+
rowNodes: newRowNodes,
|
|
75
|
+
columns: allColumns,
|
|
76
|
+
flashDelay: 0,
|
|
77
|
+
fadeDelay: 1000,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Flash efekt pro aktualizované řádky (modrá barva)
|
|
82
|
+
if (updatedRows.length > 0) {
|
|
83
|
+
const updatedRowNodes = [];
|
|
84
|
+
internalRef.current.api.forEachNode((node) => {
|
|
85
|
+
if (updatedRows.some((row) => row.id === node.data.id)) {
|
|
86
|
+
updatedRowNodes.push(node);
|
|
87
|
+
}
|
|
71
88
|
});
|
|
89
|
+
if (updatedRowNodes.length > 0) {
|
|
90
|
+
// Použijeme vlastní CSS animaci pro modrou flash
|
|
91
|
+
updatedRowNodes.forEach(node => {
|
|
92
|
+
const rowElement = node.eGridRow || document.querySelector(`[row-id="${node.data.id}"]`);
|
|
93
|
+
if (rowElement) {
|
|
94
|
+
rowElement.classList.add('ag-row-flash-updated');
|
|
95
|
+
setTimeout(() => {
|
|
96
|
+
rowElement.classList.remove('ag-row-flash-updated');
|
|
97
|
+
}, 1000);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
72
101
|
}
|
|
73
102
|
}
|
|
74
103
|
catch (error) {
|
|
75
|
-
console.warn("⚠️ AG-Grid: Error during flashCells, ignoring:", error);
|
|
76
104
|
// Ignorujeme chybu a pokračujeme bez crash aplikace
|
|
77
105
|
}
|
|
78
106
|
}, 100); // Zvýšený timeout pro stabilizaci gridu
|
|
79
107
|
}
|
|
80
108
|
previousRowDataRef.current = rowData;
|
|
81
|
-
}, [rowData, newRowFlash]);
|
|
109
|
+
}, [rowData, newRowFlash, updatedRowFlash]);
|
|
82
110
|
const RhPlusRangeSelectionChanged = React.useCallback(() => {
|
|
83
111
|
// Zakomentovaná funkcionalita pro budoucí použití
|
|
84
112
|
// if (internalRef && !!internalRef.current && enableNotification) {
|
|
@@ -100,17 +128,6 @@ const AgGrid = React.forwardRef((props, ref) => {
|
|
|
100
128
|
// if (props.onRangeSelectionChanged) props.onRangeSelectionChanged(event);
|
|
101
129
|
}, []);
|
|
102
130
|
const AgGridOnGridReady = (event, options) => {
|
|
103
|
-
console.log("🔥 AgGrid AgGridOnGridReady called:", {
|
|
104
|
-
props,
|
|
105
|
-
hasEvent: !!event,
|
|
106
|
-
hasOptions: !!options,
|
|
107
|
-
hasOptionsOnGridReady: !!options?.onGridReady,
|
|
108
|
-
eventApi: !!event?.api,
|
|
109
|
-
eventColumnApi: !!event?.columnApi,
|
|
110
|
-
optionsOnGridReadyType: typeof options?.onGridReady,
|
|
111
|
-
propsOnGridReadyType: typeof props?.onGridReady,
|
|
112
|
-
areTheSame: options?.onGridReady === props?.onGridReady
|
|
113
|
-
});
|
|
114
131
|
if (onGridReady) {
|
|
115
132
|
onGridReady(event, options);
|
|
116
133
|
}
|
|
@@ -118,31 +135,77 @@ const AgGrid = React.forwardRef((props, ref) => {
|
|
|
118
135
|
if (internalRef.current) {
|
|
119
136
|
internalRef.current.api = event.api;
|
|
120
137
|
internalRef.current.columnApi = event.columnApi || event.api; // fallback for modern AG-Grid
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
138
|
+
}
|
|
139
|
+
// Registruj callback pro AG Grid transactions (SignalR optimalizace)
|
|
140
|
+
if (event.api && !window.agGridTransactionCallback) {
|
|
141
|
+
window.agGridTransactionCallback = (transactionData) => {
|
|
142
|
+
try {
|
|
143
|
+
if (!event.api || event.api.isDestroyed?.())
|
|
144
|
+
return;
|
|
145
|
+
const { operation, records } = transactionData;
|
|
146
|
+
switch (operation) {
|
|
147
|
+
case 'add':
|
|
148
|
+
event.api.applyTransaction({ add: records });
|
|
149
|
+
// Flash efekt pro nové řádky
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
records.forEach(record => {
|
|
152
|
+
const rowNode = event.api.getRowNode(record.id);
|
|
153
|
+
if (rowNode && rowNode.rowElement) {
|
|
154
|
+
rowNode.rowElement.classList.add('ag-row-flash-created');
|
|
155
|
+
setTimeout(() => {
|
|
156
|
+
rowNode.rowElement.classList.remove('ag-row-flash-created');
|
|
157
|
+
}, 1000);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}, 100);
|
|
161
|
+
break;
|
|
162
|
+
case 'update':
|
|
163
|
+
event.api.applyTransaction({ update: records });
|
|
164
|
+
// Flash efekt pro aktualizované řádky
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
records.forEach(record => {
|
|
167
|
+
const rowNode = event.api.getRowNode(record.id);
|
|
168
|
+
if (rowNode && rowNode.rowElement) {
|
|
169
|
+
rowNode.rowElement.classList.add('ag-row-flash-updated');
|
|
170
|
+
setTimeout(() => {
|
|
171
|
+
rowNode.rowElement.classList.remove('ag-row-flash-updated');
|
|
172
|
+
}, 1000);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}, 100);
|
|
176
|
+
break;
|
|
177
|
+
case 'remove':
|
|
178
|
+
// Flash efekt před smazáním
|
|
179
|
+
records.forEach(record => {
|
|
180
|
+
const rowNode = event.api.getRowNode(record.id);
|
|
181
|
+
if (rowNode && rowNode.rowElement) {
|
|
182
|
+
rowNode.rowElement.classList.add('ag-row-flash-deleted');
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
event.api.applyTransaction({ remove: records });
|
|
187
|
+
}, 500); // Krátké zpoždění pro zobrazení flash efektu
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
// Ignorujeme chyby
|
|
193
|
+
}
|
|
194
|
+
};
|
|
126
195
|
}
|
|
127
196
|
// Pak zavoláme parent onGridReady handler, pokud existuje
|
|
128
197
|
// Toto je kritické pro správné fungování bit/ui/grid a GridLayout
|
|
129
198
|
if (options.onGridReady) {
|
|
130
199
|
try {
|
|
131
|
-
console.log("🎯 AgGrid: Calling parent onGridReady handler");
|
|
132
200
|
options.onGridReady(event);
|
|
133
|
-
console.log("✅ AgGrid: Parent onGridReady handler completed");
|
|
134
201
|
}
|
|
135
202
|
catch (error) {
|
|
136
|
-
|
|
203
|
+
// Error handling without console output
|
|
137
204
|
}
|
|
138
205
|
}
|
|
139
|
-
else {
|
|
140
|
-
console.log("❌ AgGrid: No parent onGridReady handler found");
|
|
141
|
-
}
|
|
142
206
|
// Nakonec nastavíme grid ready state s timeout
|
|
143
207
|
setTimeout(() => {
|
|
144
208
|
setIsGridReady(true);
|
|
145
|
-
console.log("✅ AgGrid: setIsGridReady(true) called");
|
|
146
209
|
}, 1000);
|
|
147
210
|
};
|
|
148
211
|
const components = React.useMemo(() => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.jsx"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAA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AAE,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC;QACjE,uBAAuB,EAAE,2BAA2B;QACpD,OAAO,EAAE,EAAE,eAAe,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE;QAC1C,UAAU;KACX,CAAC;IACF,OAAO,KAAC,WAAW,OAAK,YAAY,GAAI,CAAC;AAC3C,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
package/index.jsx
CHANGED
|
@@ -21,6 +21,7 @@ const AgGrid = React.forwardRef((props, ref) => {
|
|
|
21
21
|
const {
|
|
22
22
|
rowData = [],
|
|
23
23
|
newRowFlash = true,
|
|
24
|
+
updatedRowFlash = false,
|
|
24
25
|
onGridReady
|
|
25
26
|
} = props;
|
|
26
27
|
const [, setIsGridReady] = React.useState(false);
|
|
@@ -31,69 +32,99 @@ const AgGrid = React.forwardRef((props, ref) => {
|
|
|
31
32
|
return newData.filter((row) => !oldIds.has(row.id));
|
|
32
33
|
};
|
|
33
34
|
|
|
35
|
+
const findUpdatedRows = (oldData, newData) => {
|
|
36
|
+
const oldDataMap = new Map(oldData.map((row) => [row.id, row]));
|
|
37
|
+
return newData.filter((newRow) => {
|
|
38
|
+
const oldRow = oldDataMap.get(newRow.id);
|
|
39
|
+
if (!oldRow) return false; // Nový řádek, ne aktualizovaný
|
|
40
|
+
|
|
41
|
+
// Porovnáme pouze základní vlastnosti pro rychlost
|
|
42
|
+
return JSON.stringify(oldRow) !== JSON.stringify(newRow);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
34
46
|
React.useImperativeHandle(ref, () => internalRef.current, [internalRef]);
|
|
35
47
|
|
|
36
48
|
React.useEffect(() => {
|
|
37
|
-
if (!newRowFlash) return;
|
|
49
|
+
if (!newRowFlash && !updatedRowFlash) return;
|
|
38
50
|
|
|
39
51
|
const previousRowData = previousRowDataRef.current;
|
|
40
|
-
const addedRows = findNewRows(previousRowData, rowData);
|
|
52
|
+
const addedRows = newRowFlash ? findNewRows(previousRowData, rowData) : [];
|
|
53
|
+
const updatedRows = updatedRowFlash ? findUpdatedRows(previousRowData, rowData) : [];
|
|
41
54
|
|
|
42
|
-
if (addedRows.length > 0) {
|
|
55
|
+
if (addedRows.length > 0 || updatedRows.length > 0) {
|
|
43
56
|
setTimeout(() => {
|
|
44
57
|
try {
|
|
45
58
|
// Bezpečnostní kontrola API dostupnosti
|
|
46
59
|
if (!internalRef.current?.api || internalRef.current.api.isDestroyed?.()) {
|
|
47
|
-
console.log("⚠️ AG-Grid: API not available or destroyed, skipping flashCells");
|
|
48
60
|
return;
|
|
49
61
|
}
|
|
50
62
|
|
|
51
|
-
|
|
52
|
-
internalRef.current.api
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
// Modern AG-Grid (33+): getColumnState() moved to main api
|
|
64
|
+
const columnApi = internalRef.current?.columnApi || internalRef.current?.api;
|
|
65
|
+
if (!columnApi?.getColumnState) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const columnStates = columnApi.getColumnState();
|
|
70
|
+
const allColumns = columnStates
|
|
71
|
+
.filter(colState => colState.colId) // Filtrujeme pouze platné colId
|
|
72
|
+
.map((colState) => colState.colId);
|
|
57
73
|
|
|
58
|
-
// Kontrola, že máme platné
|
|
59
|
-
if (
|
|
60
|
-
console.log("⚠️ AG-Grid: No valid row nodes found for flashing");
|
|
74
|
+
// Kontrola, že máme platné sloupce
|
|
75
|
+
if (allColumns.length === 0) {
|
|
61
76
|
return;
|
|
62
77
|
}
|
|
63
78
|
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
// Flash efekt pro nové řádky (používá defaultní zelená barva AG Grid)
|
|
80
|
+
if (addedRows.length > 0) {
|
|
81
|
+
const newRowNodes = [];
|
|
82
|
+
internalRef.current.api.forEachNode((node) => {
|
|
83
|
+
if (addedRows.some((row) => row.id === node.data.id)) {
|
|
84
|
+
newRowNodes.push(node);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
if (newRowNodes.length > 0) {
|
|
89
|
+
internalRef.current.api.flashCells({
|
|
90
|
+
rowNodes: newRowNodes,
|
|
91
|
+
columns: allColumns,
|
|
92
|
+
flashDelay: 0,
|
|
93
|
+
fadeDelay: 1000,
|
|
94
|
+
});
|
|
76
95
|
}
|
|
96
|
+
}
|
|
77
97
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
98
|
+
// Flash efekt pro aktualizované řádky (modrá barva)
|
|
99
|
+
if (updatedRows.length > 0) {
|
|
100
|
+
const updatedRowNodes = [];
|
|
101
|
+
internalRef.current.api.forEachNode((node) => {
|
|
102
|
+
if (updatedRows.some((row) => row.id === node.data.id)) {
|
|
103
|
+
updatedRowNodes.push(node);
|
|
104
|
+
}
|
|
81
105
|
});
|
|
82
106
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
107
|
+
if (updatedRowNodes.length > 0) {
|
|
108
|
+
// Použijeme vlastní CSS animaci pro modrou flash
|
|
109
|
+
updatedRowNodes.forEach(node => {
|
|
110
|
+
const rowElement = node.eGridRow || document.querySelector(`[row-id="${node.data.id}"]`);
|
|
111
|
+
if (rowElement) {
|
|
112
|
+
rowElement.classList.add('ag-row-flash-updated');
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
rowElement.classList.remove('ag-row-flash-updated');
|
|
115
|
+
}, 1000);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
87
119
|
}
|
|
88
120
|
} catch (error) {
|
|
89
|
-
console.warn("⚠️ AG-Grid: Error during flashCells, ignoring:", error);
|
|
90
121
|
// Ignorujeme chybu a pokračujeme bez crash aplikace
|
|
91
122
|
}
|
|
92
123
|
}, 100); // Zvýšený timeout pro stabilizaci gridu
|
|
93
124
|
}
|
|
94
125
|
|
|
95
126
|
previousRowDataRef.current = rowData;
|
|
96
|
-
}, [rowData, newRowFlash]);
|
|
127
|
+
}, [rowData, newRowFlash, updatedRowFlash]);
|
|
97
128
|
|
|
98
129
|
const RhPlusRangeSelectionChanged = React.useCallback(
|
|
99
130
|
() => {
|
|
@@ -120,18 +151,6 @@ const AgGrid = React.forwardRef((props, ref) => {
|
|
|
120
151
|
);
|
|
121
152
|
|
|
122
153
|
const AgGridOnGridReady = (event, options) => {
|
|
123
|
-
console.log("🔥 AgGrid AgGridOnGridReady called:", {
|
|
124
|
-
props,
|
|
125
|
-
hasEvent: !!event,
|
|
126
|
-
hasOptions: !!options,
|
|
127
|
-
hasOptionsOnGridReady: !!options?.onGridReady,
|
|
128
|
-
eventApi: !!event?.api,
|
|
129
|
-
eventColumnApi: !!event?.columnApi,
|
|
130
|
-
optionsOnGridReadyType: typeof options?.onGridReady,
|
|
131
|
-
propsOnGridReadyType: typeof props?.onGridReady,
|
|
132
|
-
areTheSame: options?.onGridReady === props?.onGridReady
|
|
133
|
-
});
|
|
134
|
-
|
|
135
154
|
if (onGridReady) {
|
|
136
155
|
onGridReady(event, options);
|
|
137
156
|
}
|
|
@@ -140,31 +159,82 @@ const AgGrid = React.forwardRef((props, ref) => {
|
|
|
140
159
|
if (internalRef.current) {
|
|
141
160
|
internalRef.current.api = event.api;
|
|
142
161
|
internalRef.current.columnApi = event.columnApi || event.api; // fallback for modern AG-Grid
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Registruj callback pro AG Grid transactions (SignalR optimalizace)
|
|
165
|
+
if (event.api && !window.agGridTransactionCallback) {
|
|
166
|
+
window.agGridTransactionCallback = (transactionData) => {
|
|
167
|
+
try {
|
|
168
|
+
if (!event.api || event.api.isDestroyed?.()) return;
|
|
169
|
+
|
|
170
|
+
const { operation, records } = transactionData;
|
|
171
|
+
|
|
172
|
+
switch (operation) {
|
|
173
|
+
case 'add':
|
|
174
|
+
event.api.applyTransaction({ add: records });
|
|
175
|
+
// Flash efekt pro nové řádky
|
|
176
|
+
setTimeout(() => {
|
|
177
|
+
records.forEach(record => {
|
|
178
|
+
const rowNode = event.api.getRowNode(record.id);
|
|
179
|
+
if (rowNode && rowNode.rowElement) {
|
|
180
|
+
rowNode.rowElement.classList.add('ag-row-flash-created');
|
|
181
|
+
setTimeout(() => {
|
|
182
|
+
rowNode.rowElement.classList.remove('ag-row-flash-created');
|
|
183
|
+
}, 1000);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}, 100);
|
|
187
|
+
break;
|
|
188
|
+
|
|
189
|
+
case 'update':
|
|
190
|
+
event.api.applyTransaction({ update: records });
|
|
191
|
+
// Flash efekt pro aktualizované řádky
|
|
192
|
+
setTimeout(() => {
|
|
193
|
+
records.forEach(record => {
|
|
194
|
+
const rowNode = event.api.getRowNode(record.id);
|
|
195
|
+
if (rowNode && rowNode.rowElement) {
|
|
196
|
+
rowNode.rowElement.classList.add('ag-row-flash-updated');
|
|
197
|
+
setTimeout(() => {
|
|
198
|
+
rowNode.rowElement.classList.remove('ag-row-flash-updated');
|
|
199
|
+
}, 1000);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}, 100);
|
|
203
|
+
break;
|
|
204
|
+
|
|
205
|
+
case 'remove':
|
|
206
|
+
// Flash efekt před smazáním
|
|
207
|
+
records.forEach(record => {
|
|
208
|
+
const rowNode = event.api.getRowNode(record.id);
|
|
209
|
+
if (rowNode && rowNode.rowElement) {
|
|
210
|
+
rowNode.rowElement.classList.add('ag-row-flash-deleted');
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
event.api.applyTransaction({ remove: records });
|
|
216
|
+
}, 500); // Krátké zpoždění pro zobrazení flash efektu
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
} catch (error) {
|
|
220
|
+
// Ignorujeme chyby
|
|
221
|
+
}
|
|
222
|
+
};
|
|
148
223
|
}
|
|
149
224
|
|
|
150
225
|
// Pak zavoláme parent onGridReady handler, pokud existuje
|
|
151
226
|
// Toto je kritické pro správné fungování bit/ui/grid a GridLayout
|
|
152
227
|
if (options.onGridReady) {
|
|
153
228
|
try {
|
|
154
|
-
console.log("🎯 AgGrid: Calling parent onGridReady handler");
|
|
155
229
|
options.onGridReady(event);
|
|
156
|
-
console.log("✅ AgGrid: Parent onGridReady handler completed");
|
|
157
230
|
} catch (error) {
|
|
158
|
-
|
|
231
|
+
// Error handling without console output
|
|
159
232
|
}
|
|
160
|
-
} else {
|
|
161
|
-
console.log("❌ AgGrid: No parent onGridReady handler found");
|
|
162
233
|
}
|
|
163
234
|
|
|
164
235
|
// Nakonec nastavíme grid ready state s timeout
|
|
165
236
|
setTimeout(() => {
|
|
166
237
|
setIsGridReady(true);
|
|
167
|
-
console.log("✅ AgGrid: setIsGridReady(true) called");
|
|
168
238
|
}, 1000);
|
|
169
239
|
};
|
|
170
240
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bit.rhplus/ag-grid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"homepage": "https://bit.cloud/remote-scope/ag-grid",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "remote-scope",
|
|
8
8
|
"name": "ag-grid",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.33"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"linq": "^4.0.3",
|
|
File without changes
|