Moved the simulationDashBoard from src to components
This commit is contained in:
@@ -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";
|
||||
@@ -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 {
|
||||
@@ -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";
|
||||
@@ -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
|
||||
@@ -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";
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
ResponsiveContainer,
|
||||
Cell,
|
||||
} from "recharts";
|
||||
import { UIElement } from "../../../types/exportedTypes";
|
||||
import { UIElement } from "../../../../types/exportedTypes";
|
||||
|
||||
interface ElementContentProps {
|
||||
element: UIElement;
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UIElement, Block } from "../../../types/exportedTypes";
|
||||
import type { UIElement } from "../../../../types/exportedTypes";
|
||||
|
||||
export const handleElementDragStart = (
|
||||
elementId: string,
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Block } from "../../../types/exportedTypes";
|
||||
import type { Block } from "../../../../types/exportedTypes";
|
||||
|
||||
export const getCurrentBlockStyleValue = (
|
||||
currentBlock: Block,
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UIElement } from "../../../types/exportedTypes";
|
||||
import type { UIElement } from "../../../../types/exportedTypes";
|
||||
|
||||
export const getCurrentElementStyleValue = (
|
||||
currentElement: UIElement,
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
@@ -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();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user