Moved the simulationDashBoard from src to components

This commit is contained in:
2025-10-16 14:40:09 +05:30
parent a02051292c
commit 48c7007431
26 changed files with 16 additions and 16 deletions

View File

@@ -4,7 +4,7 @@ import ControlPanel from "./ControlPanel";
import SwapModal from "./SwapModal";
import DataModelPanel from "./components/models/DataModelPanel";
import { useSceneContext } from "../modules/scene/sceneContext";
import { useSceneContext } from "../../modules/scene/sceneContext";
import { calculateMinBlockSize } from "./functions/block/calculateMinBlockSize";
import { handleElementDragStart, handleElementResizeStart, handleBlockResizeStart, handleSwapStart, handleSwapTarget, handleBlockClick, handleElementClick } from "./functions/eventHandlers";
import BlockGrid from "./components/block/BlockGrid";

View File

@@ -1,5 +1,5 @@
import type { RefObject } from "react";
import { Block } from "../../../types/exportedTypes";
import { Block } from "../../../../types/exportedTypes";
import ElementComponent from "../element/ElementComponent";
interface BlockComponentProps {

View File

@@ -1,5 +1,5 @@
import type { RefObject } from "react";
import { Block } from "../../../types/exportedTypes";
import { Block } from "../../../../types/exportedTypes";
import { getAlphaFromRgba, rgbaToHex } from "../../functions/helpers/colorHandlers";
import { getCurrentBlockStyleValue } from "../../functions/helpers/getCurrentBlockStyleValue";
import { handleBackgroundColorChange } from "../../functions/helpers/handleBackgroundColorChange";

View File

@@ -1,5 +1,5 @@
import React, { type RefObject, useRef } from "react";
import type { Block } from "../../../types/exportedTypes";
import type { Block } from "../../../../types/exportedTypes";
import BlockComponent from "./BlockComponent";
// components/BlockGrid.tsx - Updated props

View File

@@ -1,5 +1,5 @@
import React from "react";
import type { UIElement } from "../../../types/exportedTypes";
import type { UIElement } from "../../../../types/exportedTypes";
import { resolveElementValue } from "../../functions/helpers/resolveElementValue";
import ElementContent from "./ElementContent";

View File

@@ -19,7 +19,7 @@ import {
ResponsiveContainer,
Cell,
} from "recharts";
import { UIElement } from "../../../types/exportedTypes";
import { UIElement } from "../../../../types/exportedTypes";
interface ElementContentProps {
element: UIElement;

View File

@@ -1,5 +1,5 @@
import type { RefObject } from "react";
import { ExtendedCSSProperties, UIElement, Block } from "../../../types/exportedTypes";
import { ExtendedCSSProperties, UIElement, Block } from "../../../../types/exportedTypes";
import { getCurrentElementStyleValue } from "../../functions/helpers/getCurrentElementStyleValue";
import type { DataModelManager } from "../../data/dataModel";

View File

@@ -1,4 +1,4 @@
import type { Block } from "../../../types/exportedTypes";
import type { Block } from "../../../../types/exportedTypes";
export const calculateMinBlockSize = (block: Block): Size => {
let minWidth = 300;

View File

@@ -1,4 +1,4 @@
import type { UIElement, Block } from "../../../types/exportedTypes";
import type { UIElement } from "../../../../types/exportedTypes";
export const handleElementDragStart = (
elementId: string,

View File

@@ -1,4 +1,4 @@
import type { Block } from "../../../types/exportedTypes";
import type { Block } from "../../../../types/exportedTypes";
export const getCurrentBlockStyleValue = (
currentBlock: Block,

View File

@@ -1,4 +1,4 @@
import type { UIElement } from "../../../types/exportedTypes";
import type { UIElement } from "../../../../types/exportedTypes";
export const getCurrentElementStyleValue = (
currentElement: UIElement,

View File

@@ -1,4 +1,4 @@
import type { Block } from "../../../types/exportedTypes";
import type { Block } from "../../../../types/exportedTypes";
import { hexToRgba, rgbaToHex } from "./colorHandlers";
import { getCurrentBlockStyleValue } from "./getCurrentBlockStyleValue";

View File

@@ -1,4 +1,4 @@
import type { Block } from "../../../types/exportedTypes";
import type { Block } from "../../../../types/exportedTypes";
import { getAlphaFromRgba, hexToRgba } from "./colorHandlers";
import { getCurrentBlockStyleValue } from "./getCurrentBlockStyleValue";

View File

@@ -1,5 +1,5 @@
import { dataModelManager } from "../../data/dataModel";
import type { UIElement } from "../../../types/exportedTypes";
import type { UIElement } from "../../../../types/exportedTypes";
export const resolveElementValue = (element: UIElement) => {
// Implementation from original code

View File

@@ -33,7 +33,7 @@ import { recentlyViewedApi } from "../../../services/dashboard/recentlyViewedApi
import { setAssetsApi } from "../../../services/builder/asset/floorAsset/setAssetsApi";
import { getVersionHistoryApi } from "../../../services/builder/versionControl/getVersionHistoryApi";
import { getUserData } from "../../../functions/getUserData";
import DashboardEditor from "../../../SimulationDashboard/DashboardEditor";
import DashboardEditor from "../../SimulationDashboard/DashboardEditor";
function MainScene() {
const { setMainState, clearComparisonState } = useSimulationState();

View File

@@ -1,7 +1,7 @@
import { MathUtils } from "three";
import { create } from "zustand";
import { immer } from "zustand/middleware/immer";
import { defaultGraphData } from "../../SimulationDashboard/data/defaultGraphData";
import { defaultGraphData } from "../../components/SimulationDashboard/data/defaultGraphData";
import { Block, UIElement, ExtendedCSSProperties } from "../../types/exportedTypes";
interface SimulationDashboardStore {