@oliasoft-open-source/react-ui-library 4.20.12 → 4.20.13-beta-1
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 +31 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51999,27 +51999,56 @@ const TableDragWrapper = (props) => {
|
|
|
51999
51999
|
[rows]
|
|
52000
52000
|
);
|
|
52001
52001
|
const handleDragStart2 = (event) => {
|
|
52002
|
+
console.log("%c[Drag Start] Event:", "color: green", event);
|
|
52003
|
+
console.log("[Drag Start] Active ID:", event.active.id);
|
|
52004
|
+
console.log("[Drag Start] Active Data:", event.active.data);
|
|
52005
|
+
console.log("[Drag Start] Rows:", rows);
|
|
52006
|
+
console.log("[Drag Start] Item IDs:", itemIds);
|
|
52002
52007
|
setDragIndex(event.active.id);
|
|
52003
52008
|
};
|
|
52004
52009
|
const handleDragEnd = (event) => {
|
|
52010
|
+
var _a2;
|
|
52011
|
+
console.log("%c[Drag End] Event:", "color: blue", event);
|
|
52012
|
+
console.log("[Drag End] Active ID:", event.active.id);
|
|
52013
|
+
console.log("[Drag End] Over ID:", (_a2 = event.over) == null ? void 0 : _a2.id);
|
|
52014
|
+
console.log("[Drag End] Rows:", rows);
|
|
52015
|
+
console.log("[Drag End] Item IDs:", itemIds);
|
|
52005
52016
|
setDragIndex(null);
|
|
52006
52017
|
setDropDisabled(false);
|
|
52007
52018
|
const { active: active2, over } = event;
|
|
52008
52019
|
if (!active2 || !over || active2.id === over.id) {
|
|
52020
|
+
console.log("[Drag End] No movement detected or invalid drag. Exiting.");
|
|
52009
52021
|
return;
|
|
52010
52022
|
}
|
|
52011
52023
|
const from3 = Number(active2.id);
|
|
52012
|
-
const to2 = Number(over
|
|
52024
|
+
const to2 = Number(over.id);
|
|
52025
|
+
console.log(`[Drag End] Moving from index ${from3} to ${to2}`);
|
|
52013
52026
|
if (!canListReorder({ from: from3, to: to2 })) {
|
|
52027
|
+
console.warn(
|
|
52028
|
+
`[Drag End] Reorder from ${from3} to ${to2} is not allowed. Exiting.`
|
|
52029
|
+
);
|
|
52014
52030
|
return;
|
|
52015
52031
|
}
|
|
52032
|
+
console.log(`[Drag End] Reordering rows: from ${from3} to ${to2}`);
|
|
52016
52033
|
onListReorder({ from: from3, to: to2 });
|
|
52017
52034
|
};
|
|
52018
52035
|
const handleDragOver = (event) => {
|
|
52036
|
+
var _a2;
|
|
52037
|
+
console.log("%c[Drag Over] Event:", "color: orange", event);
|
|
52038
|
+
console.log("[Drag Over] Active ID:", event.active.id);
|
|
52039
|
+
console.log("[Drag Over] Over ID:", (_a2 = event.over) == null ? void 0 : _a2.id);
|
|
52040
|
+
console.log("[Drag Over] Rows:", rows);
|
|
52041
|
+
console.log("[Drag Over] Item IDs:", itemIds);
|
|
52019
52042
|
const { active: active2, over } = event;
|
|
52043
|
+
if (!over) {
|
|
52044
|
+
console.log("[Drag Over] Over is null, skipping further checks.");
|
|
52045
|
+
return;
|
|
52046
|
+
}
|
|
52020
52047
|
const from3 = Number(active2.id);
|
|
52021
|
-
const to2 = Number(over
|
|
52048
|
+
const to2 = Number(over.id);
|
|
52049
|
+
console.log(`[Drag Over] Checking canListReorder: from ${from3} to ${to2}`);
|
|
52022
52050
|
const disabled2 = from3 !== to2 && !canListReorder({ from: from3, to: to2 });
|
|
52051
|
+
console.log(`[Drag Over] Drop disabled: ${disabled2}`);
|
|
52023
52052
|
setDropDisabled(disabled2);
|
|
52024
52053
|
};
|
|
52025
52054
|
const getCalculatedWidths = () => {
|