@principal-ade/dynamic-file-tree 0.2.36 → 0.2.37

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.mjs CHANGED
@@ -3488,20 +3488,34 @@ var CanvasListTreeCore = ({
3488
3488
  const lastSelectionRef = useRef6(null);
3489
3489
  const lastClickEventRef = useRef6(null);
3490
3490
  const handleSelect = (selectedNodes) => {
3491
+ console.log("[CanvasListTreeCore] handleSelect called:", {
3492
+ nodeCount: selectedNodes.length
3493
+ });
3491
3494
  if (selectedNodes.length === 0)
3492
3495
  return;
3493
3496
  const node = selectedNodes[0];
3494
3497
  const nodeData = node.data;
3498
+ console.log("[CanvasListTreeCore] Selected node:", {
3499
+ id: nodeData.id,
3500
+ name: nodeData.name,
3501
+ type: nodeData.type,
3502
+ hasDashboard: !!nodeData.dashboard,
3503
+ hasCanvas: !!nodeData.canvas
3504
+ });
3495
3505
  const now = Date.now();
3496
3506
  const lastSelection = lastSelectionRef.current;
3497
3507
  if (lastSelection && lastSelection.nodeId === nodeData.id && now - lastSelection.timestamp < 50) {
3508
+ console.log("[CanvasListTreeCore] Skipping duplicate selection");
3498
3509
  return;
3499
3510
  }
3500
3511
  lastSelectionRef.current = { nodeId: nodeData.id, timestamp: now };
3501
3512
  if (nodeData.type === "overview" || nodeData.type === "canvas") {
3513
+ console.log("[CanvasListTreeCore] Emitting onClick for node:", nodeData.id);
3502
3514
  const event = lastClickEventRef.current;
3503
3515
  lastClickEventRef.current = null;
3504
3516
  onClick(nodeData, event ?? undefined);
3517
+ } else {
3518
+ console.log("[CanvasListTreeCore] Not emitting onClick - node type is:", nodeData.type);
3505
3519
  }
3506
3520
  };
3507
3521
  const initialHeight = 600;
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasListTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/CanvasListTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAS/C,OAAO,KAAK,EAEV,mBAAmB,EAGpB,MAAM,SAAS,CAAC;AAuUjB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoO5D,CAAC"}
1
+ {"version":3,"file":"CanvasListTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/CanvasListTree/CanvasListTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAS/C,OAAO,KAAK,EAEV,mBAAmB,EAGpB,MAAM,SAAS,CAAC;AAuUjB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoP5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principal-ade/dynamic-file-tree",
3
- "version": "0.2.36",
3
+ "version": "0.2.37",
4
4
  "description": "React component for selective directory filtering and file tree visualization",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",