door_models 2.0.1 → 2.0.2

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.esm.js CHANGED
@@ -1,9 +1,7 @@
1
- import require$$0, { useContext, createContext, useState, useCallback, useEffect, useMemo, useRef } from 'react';
1
+ import require$$0, { useContext, createContext, useState, useCallback, useEffect, useMemo } from 'react';
2
2
  import { Geometry, Base, Subtraction } from '@react-three/csg';
3
3
  import { useSpring, a } from '@react-spring/three';
4
4
  import * as THREE from 'three';
5
- import { Box, Typography, Stack, Paper, FormControl, FormLabel, TextField, Button, Autocomplete, Tooltip, IconButton, Divider, RadioGroup, FormControlLabel, Radio, InputAdornment, Switch, Slider, Select, MenuItem } from '@mui/material';
6
- import { Visibility, VisibilityOff } from '@mui/icons-material';
7
5
 
8
6
  function _defineProperty(e, r, t) {
9
7
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
@@ -1450,7 +1448,7 @@ function requireJsxRuntime () {
1450
1448
 
1451
1449
  var jsxRuntimeExports = requireJsxRuntime();
1452
1450
 
1453
- const _excluded$1 = ["doorDepth"];
1451
+ const _excluded = ["doorDepth"];
1454
1452
  const ConfiguratorContext = /*#__PURE__*/createContext(undefined);
1455
1453
  const ConfiguratorProvider = _ref => {
1456
1454
  let {
@@ -1938,7 +1936,7 @@ const ConfiguratorProvider = _ref => {
1938
1936
  const {
1939
1937
  doorDepth
1940
1938
  } = newSettings,
1941
- newFrameSettings = _objectWithoutProperties(newSettings, _excluded$1);
1939
+ newFrameSettings = _objectWithoutProperties(newSettings, _excluded);
1942
1940
  setDoorFrame(prev => _objectSpread2(_objectSpread2({}, prev), newFrameSettings));
1943
1941
  if (doorDepth !== undefined) {
1944
1942
  setDoor(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
@@ -2967,1302 +2965,15 @@ function DoorModels(_ref3) {
2967
2965
  });
2968
2966
  }
2969
2967
 
2970
- const _excluded = ["frameType"];
2971
- const cpidOptions = ["P_SD_FH_AF20_40", "P_SD_FH_AF20_40OCC", "P_SD_FH_AF40_40", "P_SD_FH_AF40_40OCC", "P_SD_FH_WF_40", "P_SD_FH_WF_40OCC", "P_SD_FH_MXF_40", "P_SD_FH_MXF_40OCC", "P_SD_FH_MXCAF_40", "P_SD_FH_MXCAF_40OCC", "P_SD_FH_AF20_50", "P_SD_FH_AF20_50OCC", "P_SD_FH_AF40_50", "P_SD_FH_AF40_50OCC", "P_SD_FH_WF_50", "P_SD_FH_WF_50OCC", "P_SD_FH_WF_FLI", "P_SD_FH_AF20_SG8", "P_SD_FH_AF20_SG10", "P_SD_FH_AF20_SG12", "P_SD_FH_AF40_SG8", "P_SD_FH_AF40_SG10", "P_SD_FH_AF40_SG12", "P_SD_FH_NOF_SG8", "P_SD_FH_NOF_SG10", "P_SD_FH_NOF_SG12", "P_SD_FH_WF_100", "P_SD_FH_WDGF_WDG100", "P_SD_FH_AF20_40_IFL", "P_SD_FH_AF20_40OCC_IFL", "P_SD_FH_AF40_40_IFL", "P_SD_FH_AF40_40OCC_IFL", "P_SD_FH_WF_40_IFL", "P_SD_FH_WF_40OCC_IFL", "P_SD_FH_AF20_50_IFL", "P_SD_FH_AF20_50OCC_IFL", "P_SD_FH_AF40_50_IFL", "P_SD_FH_AF40_50OCC_IFL", "P_SD_FH_WF_50_IFL", "P_SD_FH_WF_50OCC_IFL", "P_SD_WPFL_AF20_40", "P_SD_WPFL_AF20_40OCC", "P_SD_WPFL_AF40_40", "P_SD_WPFL_AF40_40OCC", "P_SD_WPFL_WF_40", "P_SD_WPFL_WF_40OCC", "P_SD_WPFL_AF20_50", "P_SD_WPFL_AF20_50OCC", "P_SD_WPFL_AF40_50", "P_SD_WPFL_AF40_50OCC", "P_SD_WPFL_WF_50", "P_SD_WPFL_WF_50OCC", "P_SD_WPFL_AF20_SG8", "P_SD_WPFL_AF20_SG10", "P_SD_WPFL_AF20_SG12", "P_SD_WPFL_AF40_SG8", "P_SD_WPFL_AF40_SG10", "P_SD_WPFL_AF40_SG12", "P_SD_ALSGFL_AF20_40", "P_SD_ALSGFL_AF20_40OCC", "P_SD_ALSGFL_AF40_40", "P_SD_ALSGFL_AF40_40OCC", "P_SD_ALSGFL_WF_40", "P_SD_ALSGFL_WF_40OCC", "P_SD_ALSGFL_AF20_SG8", "P_SD_ALSGFL_AF20_SG10", "P_SD_ALSGFL_AF20_SG12", "P_SD_ALSGFL_AF40_SG8", "P_SD_ALSGFL_AF40_SG10", "P_SD_ALSGFL_AF40_SG12", "P_SD_ALDGFL_AF20_40", "P_SD_ALDGFL_AF20_40OCC", "P_SD_ALDGFL_AF40_40", "P_SD_ALDGFL_AF40_40OCC", "P_SD_ALDGFL_WF_40", "P_SD_ALDGFL_WF_40OCC", "P_SD_ALDGFL_AF20_50", "P_SD_ALDGFL_AF20_50OCC", "P_SD_ALDGFL_AF40_50", "P_SD_ALDGFL_AF40_50OCC", "P_SD_ALDGFL_WF_50", "P_SD_ALDGFL_WF_50OCC", "P_SD_ALDGFL_AF20_SG8", "P_SD_ALDGFL_AF20_SG10", "P_SD_ALDGFL_AF20_SG12", "P_SD_ALDGFL_AF40_SG8", "P_SD_ALDGFL_AF40_SG10", "P_SD_ALDGFL_AF40_SG12"];
2972
- const EditableSlider = _ref => {
2973
- let {
2974
- label,
2975
- value,
2976
- min,
2977
- max,
2978
- step = 1,
2979
- onChange
2980
- } = _ref;
2981
- const [inputValue, setInputValue] = useState(String(value));
2982
- require$$0.useEffect(() => {
2983
- setInputValue(String(value));
2984
- }, [value]);
2985
- const handleSliderChange = (_, newValue) => {
2986
- onChange(Array.isArray(newValue) ? newValue[0] : newValue);
2987
- };
2988
- const handleInputChange = event => {
2989
- setInputValue(event.target.value);
2990
- };
2991
- const handleInputBlur = () => {
2992
- let numericValue = inputValue === "" || isNaN(Number(inputValue)) ? min : Number(inputValue);
2993
- if (numericValue < min) numericValue = min;
2994
- if (numericValue > max) numericValue = max;
2995
- onChange(numericValue);
2996
- };
2997
- const handleInputKeyDown = event => {
2998
- if (event.key === "Enter") {
2999
- handleInputBlur();
3000
- event.target.blur();
3001
- }
3002
- };
3003
- return /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3004
- fullWidth: true,
3005
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs(FormLabel, {
3006
- sx: {
3007
- mb: 1,
3008
- display: "flex",
3009
- justifyContent: "space-between",
3010
- alignItems: "center"
3011
- },
3012
- children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
3013
- children: label
3014
- }), /*#__PURE__*/jsxRuntimeExports.jsx(TextField, {
3015
- value: inputValue,
3016
- size: "small",
3017
- onChange: handleInputChange,
3018
- onBlur: handleInputBlur,
3019
- onKeyDown: handleInputKeyDown,
3020
- type: "number",
3021
- variant: "outlined",
3022
- inputProps: {
3023
- step: step,
3024
- min: min,
3025
- max: max,
3026
- "aria-labelledby": "input-slider"
3027
- },
3028
- InputProps: {
3029
- endAdornment: /*#__PURE__*/jsxRuntimeExports.jsx(InputAdornment, {
3030
- position: "end",
3031
- children: "mm"
3032
- })
3033
- },
3034
- sx: {
3035
- width: "140px"
3036
- }
3037
- })]
3038
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Slider, {
3039
- value: typeof value === "number" ? value : min,
3040
- min: min,
3041
- max: max,
3042
- step: step,
3043
- onChange: handleSliderChange,
3044
- "aria-labelledby": "input-slider"
3045
- })]
3046
- });
3047
- };
3048
- const MaterialInput = _ref2 => {
3049
- let {
3050
- label,
3051
- value,
3052
- onChange,
3053
- onApply
3054
- } = _ref2;
3055
- const [inputValue, setInputValue] = useState(value);
3056
- require$$0.useEffect(() => {
3057
- setInputValue(value);
3058
- }, [value]);
3059
- const handleApply = () => {
3060
- if (onApply) {
3061
- onApply(inputValue);
3062
- }
3063
- onChange(inputValue);
3064
- };
3065
- return /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3066
- fullWidth: true,
3067
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3068
- children: label
3069
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3070
- direction: "row",
3071
- spacing: 1,
3072
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(TextField, {
3073
- size: "small",
3074
- value: inputValue,
3075
- onChange: e => setInputValue(e.target.value)
3076
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Button, {
3077
- variant: "contained",
3078
- onClick: handleApply,
3079
- children: "Apply"
3080
- })]
3081
- })]
3082
- });
3083
- };
3084
- const MaterialSelector = _ref3 => {
3085
- let {
3086
- label,
3087
- value,
3088
- onChange
3089
- } = _ref3;
3090
- const materialOptions = Object.keys(availableMaterials);
3091
- return /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3092
- fullWidth: true,
3093
- size: "small",
3094
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3095
- children: label
3096
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Select, {
3097
- value: value,
3098
- onChange: e => onChange(e.target.value),
3099
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(MenuItem, {
3100
- value: "none",
3101
- children: /*#__PURE__*/jsxRuntimeExports.jsx("em", {
3102
- children: "None"
3103
- })
3104
- }), materialOptions.map(name => /*#__PURE__*/jsxRuntimeExports.jsx(MenuItem, {
3105
- value: name,
3106
- children: name
3107
- }, name))]
3108
- })]
3109
- });
3110
- };
3111
- const Interface = () => {
3112
- const {
3113
- isPlaneVisible,
3114
- setIsPlaneVisible,
3115
- cpid,
3116
- setCpid,
3117
- door,
3118
- setDoor,
3119
- doorFrame,
3120
- setDoorFrame,
3121
- interiorFanlight,
3122
- setInteriorFanlight,
3123
- exteriorFanlight,
3124
- setExteriorFanlight,
3125
- occulus,
3126
- setOcculus,
3127
- frontCoverPanel,
3128
- setFrontCoverPanel,
3129
- backCoverPanel,
3130
- setBackCoverPanel,
3131
- frameType,
3132
- setFrameType,
3133
- bodyType,
3134
- setBodyType,
3135
- totalHeight,
3136
- setTotalHeight,
3137
- totalWidth,
3138
- setTotalWidth,
3139
- exteriorFanlightType,
3140
- setExteriorFanlightType,
3141
- testDoorMaterial,
3142
- setTestDoorMaterial,
3143
- testFrameMaterial,
3144
- setTestFrameMaterial,
3145
- testInteriorFanlightMaterial,
3146
- setTestInteriorFanlightMaterial,
3147
- testExteriorFanlightMaterial,
3148
- setTestExteriorFanlightMaterial,
3149
- testOcculusInfillMaterial,
3150
- setTestOcculusInfillMaterial,
3151
- testGlassInfillMaterial,
3152
- setTestGlassInfillMaterial,
3153
- testGasketMaterial,
3154
- setTestGasketMaterial,
3155
- testDoorStopMaterial,
3156
- setTestDoorStopMaterial,
3157
- testHingeMaterial,
3158
- setTestHingeMaterial,
3159
- glassVisible,
3160
- setGlassVisible,
3161
- glassDepth,
3162
- setGlassDepth,
3163
- testFrontCoverPanelMaterial,
3164
- setTestFrontCoverPanelMaterial,
3165
- setTestBackCoverPanelMaterial
3166
- } = useConfigurator();
3167
- const [parseMessage, setParseMessage] = useState({
3168
- type: "",
3169
- text: ""
3170
- });
3171
- const handleMaterialApply = materialName => {
3172
- console.log("[DATABASE SIMULATION] Started fetching data for material: \"".concat(materialName, "\""));
3173
- };
3174
- const fileInputRef = useRef(null);
3175
- const handleExport = () => {
3176
- if (!cpid || cpid.trim() === "") {
3177
- alert("Please enter a Door Title (CPID) before exporting.");
3178
- return;
3179
- }
3180
- const doorFrameWithFrameType = _objectSpread2(_objectSpread2({}, doorFrame), {}, {
3181
- frameType: frameType
3182
- });
3183
- const exportData = {
3184
- cpid,
3185
- door,
3186
- doorFrame: doorFrameWithFrameType,
3187
- interiorFanlight,
3188
- exteriorFanlight,
3189
- occulus,
3190
- frontCoverPanel,
3191
- backCoverPanel
3192
- };
3193
- const jsonString = "data:text/json;charset=utf-8,".concat(encodeURIComponent(JSON.stringify(exportData, null, 2)));
3194
- const link = document.createElement("a");
3195
- link.href = jsonString;
3196
- link.download = "".concat(cpid.trim(), ".json");
3197
- link.click();
3198
- };
3199
- const handleImportClick = () => {
3200
- if (fileInputRef.current) {
3201
- fileInputRef.current.click();
3202
- }
3203
- };
3204
- const handleFileChange = event => {
3205
- var _event$target$files;
3206
- const file = (_event$target$files = event.target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
3207
- if (!file) return;
3208
- const reader = new FileReader();
3209
- reader.onload = e => {
3210
- if (e.target && typeof e.target.result === "string") {
3211
- try {
3212
- const importedData = JSON.parse(e.target.result);
3213
- if (importedData.cpid) setCpid(importedData.cpid);
3214
- if (importedData.door) setDoor(importedData.door);
3215
- if (importedData.doorFrame) {
3216
- const _importedData$doorFra = importedData.doorFrame,
3217
- {
3218
- frameType: importedFrameType
3219
- } = _importedData$doorFra,
3220
- doorFrameData = _objectWithoutProperties(_importedData$doorFra, _excluded);
3221
- setDoorFrame(doorFrameData);
3222
- if (importedFrameType) setFrameType(importedFrameType);
3223
- }
3224
- if (importedData.interiorFanlight) setInteriorFanlight(importedData.interiorFanlight);
3225
- if (importedData.exteriorFanlight) setExteriorFanlight(importedData.exteriorFanlight);
3226
- if (importedData.occulus) setOcculus(importedData.occulus);
3227
- if (importedData.frontCoverPanel) setFrontCoverPanel(importedData.frontCoverPanel);
3228
- if (importedData.backCoverPanel) setBackCoverPanel(importedData.backCoverPanel);
3229
- } catch (error) {
3230
- console.error("Error parsing JSON file:", error);
3231
- alert("Error: Could not parse the JSON file.");
3232
- }
3233
- } else {
3234
- console.error("FileReader error: result is not a string or target is null");
3235
- alert("Error: Could not read the file.");
3236
- }
3237
- };
3238
- reader.readAsText(file);
3239
- event.target.value = "";
3240
- };
3241
- const handleParseCpid = useCallback(cpidToParse => {
3242
- const showMessage = function (text) {
3243
- let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "error";
3244
- setParseMessage({
3245
- text,
3246
- type
3247
- });
3248
- setTimeout(() => setParseMessage({
3249
- text: "",
3250
- type: ""
3251
- }), 4000);
3252
- };
3253
- if (!cpidToParse || !cpidToParse.trim().startsWith("P_")) {
3254
- showMessage("Invalid format: CPID must start with 'P_'.");
3255
- return;
3256
- }
3257
- const parts = cpidToParse.trim().split("_");
3258
- if (parts.length < 4) {
3259
- showMessage("Invalid format: Not enough parts in CPID.");
3260
- return;
3261
- }
3262
- const newConfig = {
3263
- fanlightVisible: false,
3264
- fanlightType: "WPFL",
3265
- interiorFanlightVisible: false,
3266
- occulusVisible: false,
3267
- frameType: "",
3268
- bodyType: ""
3269
- };
3270
- let currentIndex = 1;
3271
-
3272
- // Door Type
3273
- if (parts[currentIndex] === "SD") {
3274
- currentIndex++;
3275
- } else {
3276
- showMessage("Unsupported Door Type: Only 'SD' is supported.");
3277
- return;
3278
- }
3279
-
3280
- //Fanlight Type
3281
- const fanlightPart = parts[currentIndex];
3282
- const validFanlights = ["WPFL", "ALDGFL", "ALSGFL"];
3283
- if (fanlightPart === "FH") {
3284
- newConfig.fanlightVisible = false;
3285
- currentIndex++;
3286
- } else if (validFanlights.includes(fanlightPart)) {
3287
- newConfig.fanlightVisible = true;
3288
- newConfig.fanlightType = fanlightPart;
3289
- currentIndex++;
3290
- } else {
3291
- showMessage("Invalid Fanlight Type: '".concat(fanlightPart, "'."));
3292
- return;
3293
- }
3294
-
3295
- // Frame and Body Type
3296
- const validSimpleFrameTypes = ["AF20", "AF40", "WF", "MXF", "MXCAF", "NOF"];
3297
- const validBodyTypes = ["40", "50", "FLI", "100", "WDG100", "SG8", "SG10", "SG12"];
3298
- let framePart = parts[currentIndex];
3299
- let bodyPartRaw = parts[currentIndex + 1] || "";
3300
- let frameFound = false;
3301
- if ("".concat(framePart, "_").concat(bodyPartRaw) === "WDGF_WDG100") {
3302
- newConfig.frameType = "WDGF_WDG100";
3303
- newConfig.bodyType = "WDG100";
3304
- currentIndex += 2;
3305
- frameFound = true;
3306
- } else if (validSimpleFrameTypes.includes(framePart)) {
3307
- let tempBody = bodyPartRaw.replace("OCC", "");
3308
- if (validBodyTypes.includes(tempBody)) {
3309
- newConfig.frameType = framePart === "NOF" ? "NOF" : "".concat(framePart, "_").concat(tempBody);
3310
- newConfig.bodyType = tempBody;
3311
- if (bodyPartRaw.endsWith("OCC")) {
3312
- newConfig.occulusVisible = true;
3313
- }
3314
- currentIndex += 2;
3315
- frameFound = true;
3316
- }
3317
- }
3318
- if (!frameFound) {
3319
- showMessage("Invalid Frame/Body combination starting with '".concat(framePart, "'."));
3320
- return;
3321
- }
3322
- for (let i = currentIndex; i < parts.length; i++) {
3323
- if (parts[i] === "IFL") {
3324
- newConfig.interiorFanlightVisible = true;
3325
- } else if (parts[i] === "OCC") {
3326
- newConfig.occulusVisible = true;
3327
- }
3328
- }
3329
-
3330
- // Apply final configuration
3331
- setFrameType(newConfig.frameType);
3332
- setBodyType(newConfig.bodyType);
3333
- setExteriorFanlight(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3334
- visible: newConfig.fanlightVisible
3335
- }));
3336
- if (newConfig.fanlightVisible) {
3337
- setExteriorFanlightType(newConfig.fanlightType);
3338
- }
3339
- setInteriorFanlight(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3340
- visible: newConfig.interiorFanlightVisible
3341
- }));
3342
- setOcculus(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3343
- visible: newConfig.occulusVisible
3344
- }));
3345
- showMessage("Configuration Applied!", "success");
3346
- }, [setBodyType, setExteriorFanlight, setExteriorFanlightType, setFrameType, setInteriorFanlight, setOcculus]);
3347
- const mainDoorHeight = door.doorHeight - (interiorFanlight.visible ? interiorFanlight.height : 0);
3348
- const handleExteriorFanlightHeightChange = newHeight => {
3349
- const oldHeight = exteriorFanlight.height;
3350
- const heightDifference = newHeight - oldHeight;
3351
- setExteriorFanlight(_objectSpread2(_objectSpread2({}, exteriorFanlight), {}, {
3352
- height: newHeight
3353
- }));
3354
- setTotalHeight(totalHeight + heightDifference);
3355
- };
3356
- return /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
3357
- children: [parseMessage.text && /*#__PURE__*/jsxRuntimeExports.jsx(Box, {
3358
- sx: {
3359
- position: "absolute",
3360
- top: 20,
3361
- left: "50%",
3362
- transform: "translateX(-50%)",
3363
- padding: "10px 20px",
3364
- backgroundColor: parseMessage.type === "error" ? "rgba(211, 47, 47, 0.8)" : "rgba(46, 125, 50, 0.8)",
3365
- backdropFilter: "blur(5px)",
3366
- borderRadius: "10px",
3367
- color: "white",
3368
- zIndex: 20,
3369
- textAlign: "center"
3370
- },
3371
- children: /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3372
- variant: "body1",
3373
- children: parseMessage.text
3374
- })
3375
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Box, {
3376
- sx: {
3377
- position: "absolute",
3378
- top: 20,
3379
- left: 20,
3380
- padding: "10px 15px",
3381
- backgroundColor: "rgba(0, 0, 0, 0.6)",
3382
- backdropFilter: "blur(10px)",
3383
- borderRadius: "10px",
3384
- color: "white",
3385
- zIndex: 10
3386
- },
3387
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs(Typography, {
3388
- variant: "body1",
3389
- children: ["Total Width: ", Math.round(totalWidth), " mm"]
3390
- }), frontCoverPanel.visible && /*#__PURE__*/jsxRuntimeExports.jsxs(Typography, {
3391
- variant: "body1",
3392
- sx: {
3393
- color: "#81d4fa"
3394
- },
3395
- children: ["Total Width with CAS:", " ", Math.round(totalWidth + frontCoverPanel.width * 2), " mm"]
3396
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Typography, {
3397
- variant: "body1",
3398
- children: ["Total Height: ", Math.round(totalHeight), " mm"]
3399
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Typography, {
3400
- variant: "body1",
3401
- children: ["Frame Depth: ", Math.round(doorFrame.frameDepth), " mm"]
3402
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Typography, {
3403
- variant: "body1",
3404
- children: ["Door Depth: ", Math.round(door.theDoorDepth), " mm"]
3405
- })]
3406
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Box, {
3407
- sx: {
3408
- position: "absolute",
3409
- top: 0,
3410
- right: 0,
3411
- height: "100vh",
3412
- width: "25%",
3413
- overflowY: "auto",
3414
- boxSizing: "border-box",
3415
- backgroundColor: "rgba(255, 255, 255, 0.95)",
3416
- backdropFilter: "blur(10px)"
3417
- },
3418
- p: 2,
3419
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3420
- spacing: 2,
3421
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs(Paper, {
3422
- elevation: 3,
3423
- sx: {
3424
- p: 2
3425
- },
3426
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3427
- fullWidth: true,
3428
- sx: {
3429
- mb: 2
3430
- },
3431
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3432
- children: "Door Title (CPID)"
3433
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3434
- direction: "row",
3435
- spacing: 1,
3436
- alignItems: "center",
3437
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(TextField, {
3438
- value: cpid,
3439
- onChange: e => {
3440
- setCpid(e.target.value);
3441
- },
3442
- variant: "outlined",
3443
- size: "small",
3444
- fullWidth: true,
3445
- placeholder: "e.g. P_SD_WPFL_AF20_50_IFL"
3446
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Button, {
3447
- variant: "contained",
3448
- onClick: () => handleParseCpid(cpid),
3449
- children: "Apply"
3450
- })]
3451
- })]
3452
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3453
- fullWidth: true,
3454
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3455
- children: "Or Select a Preset (Searchable)"
3456
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Autocomplete, {
3457
- value: cpid,
3458
- onChange: (event, newValue) => {
3459
- if (newValue) {
3460
- setCpid(newValue);
3461
- handleParseCpid(newValue);
3462
- }
3463
- },
3464
- onInputChange: (event, newInputValue) => {
3465
- setCpid(newInputValue);
3466
- },
3467
- options: cpidOptions,
3468
- renderInput: params => /*#__PURE__*/jsxRuntimeExports.jsx(TextField, _objectSpread2(_objectSpread2({}, params), {}, {
3469
- size: "small"
3470
- })),
3471
- ListboxProps: {
3472
- style: {
3473
- maxHeight: 300
3474
- }
3475
- },
3476
- freeSolo: true,
3477
- disableClearable: true
3478
- })]
3479
- })]
3480
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3481
- elevation: 3,
3482
- sx: {
3483
- p: 2
3484
- },
3485
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3486
- direction: "row",
3487
- spacing: 2,
3488
- justifyContent: "center",
3489
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(Button, {
3490
- variant: "contained",
3491
- color: "primary",
3492
- onClick: handleExport,
3493
- children: "Export JSON"
3494
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Button, {
3495
- variant: "contained",
3496
- color: "secondary",
3497
- onClick: handleImportClick,
3498
- children: "Import JSON"
3499
- }), /*#__PURE__*/jsxRuntimeExports.jsx("input", {
3500
- type: "file",
3501
- ref: fileInputRef,
3502
- style: {
3503
- display: "none"
3504
- },
3505
- accept: ".json",
3506
- onChange: handleFileChange
3507
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Tooltip, {
3508
- title: isPlaneVisible ? "Hide Ground Plane" : "Show Ground Plane",
3509
- children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
3510
- onClick: () => setIsPlaneVisible(!isPlaneVisible),
3511
- children: isPlaneVisible ? /*#__PURE__*/jsxRuntimeExports.jsx(Visibility, {}) : /*#__PURE__*/jsxRuntimeExports.jsx(VisibilityOff, {})
3512
- })
3513
- })]
3514
- })
3515
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3516
- elevation: 3,
3517
- sx: {
3518
- p: 2
3519
- },
3520
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3521
- spacing: 2,
3522
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3523
- variant: "h6",
3524
- color: "primary",
3525
- children: "Door Properties"
3526
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3527
- direction: "row",
3528
- spacing: 2,
3529
- alignItems: "flex-end",
3530
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
3531
- label: "Door Material",
3532
- value: door.doorMaterial,
3533
- onChange: value => setDoor(_objectSpread2(_objectSpread2({}, door), {}, {
3534
- doorMaterial: value
3535
- })),
3536
- onApply: handleMaterialApply
3537
- })
3538
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3539
- direction: "row",
3540
- spacing: 2,
3541
- alignItems: "flex-end",
3542
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
3543
- label: "Test Material",
3544
- value: testDoorMaterial,
3545
- onChange: setTestDoorMaterial
3546
- })
3547
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Divider, {}), /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3548
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3549
- children: "Body Type"
3550
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(RadioGroup, {
3551
- row: true,
3552
- value: bodyType,
3553
- onChange: (_, value) => setBodyType(value),
3554
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3555
- value: "40",
3556
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3557
- size: "small"
3558
- }),
3559
- label: "40mm"
3560
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3561
- value: "50",
3562
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3563
- size: "small"
3564
- }),
3565
- label: "50mm"
3566
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3567
- value: "SG8",
3568
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3569
- size: "small"
3570
- }),
3571
- label: "8mm Glass"
3572
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3573
- value: "SG10",
3574
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3575
- size: "small"
3576
- }),
3577
- label: "10mm Glass"
3578
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3579
- value: "SG12",
3580
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3581
- size: "small"
3582
- }),
3583
- label: "12mm Glass"
3584
- })]
3585
- })]
3586
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Divider, {}), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
3587
- label: "Total Width",
3588
- value: totalWidth,
3589
- min: 600,
3590
- max: 2200,
3591
- onChange: setTotalWidth
3592
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControl, {
3593
- fullWidth: true,
3594
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(FormLabel, {
3595
- sx: {
3596
- display: "flex",
3597
- justifyContent: "space-between",
3598
- alignItems: "center"
3599
- },
3600
- children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
3601
- children: "Calculated Door Width"
3602
- }), /*#__PURE__*/jsxRuntimeExports.jsx(TextField, {
3603
- value: Math.round(door.doorWidth),
3604
- size: "small",
3605
- disabled: true,
3606
- variant: "outlined",
3607
- InputProps: {
3608
- endAdornment: /*#__PURE__*/jsxRuntimeExports.jsx(InputAdornment, {
3609
- position: "end",
3610
- children: "mm"
3611
- })
3612
- },
3613
- sx: {
3614
- width: "140px"
3615
- }
3616
- })]
3617
- })
3618
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
3619
- label: "Total Height",
3620
- value: totalHeight,
3621
- min: 1500,
3622
- max: 4000,
3623
- onChange: setTotalHeight
3624
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControl, {
3625
- fullWidth: true,
3626
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(FormLabel, {
3627
- sx: {
3628
- display: "flex",
3629
- justifyContent: "space-between",
3630
- alignItems: "center"
3631
- },
3632
- children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
3633
- children: "Calculated Door Height"
3634
- }), /*#__PURE__*/jsxRuntimeExports.jsx(TextField, {
3635
- value: Math.round(door.doorHeight),
3636
- size: "small",
3637
- disabled: true,
3638
- variant: "outlined",
3639
- InputProps: {
3640
- endAdornment: /*#__PURE__*/jsxRuntimeExports.jsx(InputAdornment, {
3641
- position: "end",
3642
- children: "mm"
3643
- })
3644
- },
3645
- sx: {
3646
- width: "140px"
3647
- }
3648
- })]
3649
- })
3650
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3651
- direction: "row",
3652
- justifyContent: "space-around",
3653
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3654
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3655
- children: "Pivot"
3656
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(RadioGroup, {
3657
- row: true,
3658
- value: door.doorPivot,
3659
- onChange: (_, value) => setDoor(_objectSpread2(_objectSpread2({}, door), {}, {
3660
- doorPivot: value
3661
- })),
3662
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3663
- value: "left",
3664
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3665
- size: "small"
3666
- }),
3667
- label: "Left"
3668
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3669
- value: "right",
3670
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3671
- size: "small"
3672
- }),
3673
- label: "Right"
3674
- })]
3675
- })]
3676
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3677
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3678
- children: "Opening"
3679
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(RadioGroup, {
3680
- row: true,
3681
- value: door.doorOpening,
3682
- onChange: (_, value) => setDoor(_objectSpread2(_objectSpread2({}, door), {}, {
3683
- doorOpening: value
3684
- })),
3685
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3686
- value: "in",
3687
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3688
- size: "small"
3689
- }),
3690
- label: "In"
3691
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3692
- value: "out",
3693
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3694
- size: "small"
3695
- }),
3696
- label: "Out"
3697
- })]
3698
- })]
3699
- })]
3700
- })]
3701
- })
3702
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3703
- elevation: 3,
3704
- sx: {
3705
- p: 2
3706
- },
3707
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3708
- spacing: 2,
3709
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3710
- variant: "h6",
3711
- color: "primary",
3712
- children: "Frame Properties"
3713
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3714
- direction: "row",
3715
- spacing: 2,
3716
- alignItems: "flex-end",
3717
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
3718
- label: "Frame Material",
3719
- value: doorFrame.frameMaterial,
3720
- onChange: value => setDoorFrame(_objectSpread2(_objectSpread2({}, doorFrame), {}, {
3721
- frameMaterial: value
3722
- })),
3723
- onApply: handleMaterialApply
3724
- })
3725
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
3726
- label: "Test Material",
3727
- value: testFrameMaterial,
3728
- onChange: setTestFrameMaterial
3729
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
3730
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(Divider, {}), /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3731
- variant: "subtitle1",
3732
- color: "secondary",
3733
- children: "Doorstop Properties"
3734
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3735
- direction: "row",
3736
- spacing: 2,
3737
- alignItems: "flex-end",
3738
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
3739
- label: "Doorstop Material",
3740
- value: doorFrame.doorStopMaterial || "",
3741
- onChange: value => setDoorFrame(_objectSpread2(_objectSpread2({}, doorFrame), {}, {
3742
- doorStopMaterial: value
3743
- })),
3744
- onApply: handleMaterialApply
3745
- })
3746
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
3747
- label: "Test Doorstop Material",
3748
- value: testDoorStopMaterial,
3749
- onChange: setTestDoorStopMaterial
3750
- })]
3751
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
3752
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
3753
- children: "Frame Type"
3754
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(RadioGroup, {
3755
- value: frameType,
3756
- onChange: (_, value) => setFrameType(value),
3757
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3758
- value: "NOF",
3759
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3760
- size: "small"
3761
- }),
3762
- label: "NOF"
3763
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3764
- value: "AF20_40",
3765
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3766
- size: "small"
3767
- }),
3768
- label: "AF20_40"
3769
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3770
- value: "AF20_50",
3771
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3772
- size: "small"
3773
- }),
3774
- label: "AF20_50"
3775
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3776
- value: "AF40_40",
3777
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3778
- size: "small"
3779
- }),
3780
- label: "AF40_40"
3781
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3782
- value: "AF40_50",
3783
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3784
- size: "small"
3785
- }),
3786
- label: "AF40_50"
3787
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3788
- value: "WF_40",
3789
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3790
- size: "small"
3791
- }),
3792
- label: "WF_40"
3793
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3794
- value: "WF_50",
3795
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3796
- size: "small"
3797
- }),
3798
- label: "WF_50"
3799
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3800
- value: "WF_100",
3801
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3802
- size: "small"
3803
- }),
3804
- label: "WF_100"
3805
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3806
- value: "WF_FLI",
3807
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3808
- size: "small"
3809
- }),
3810
- label: "WF_FLI"
3811
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3812
- value: "WDGF_WDG100",
3813
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3814
- size: "small"
3815
- }),
3816
- label: "WDGF_WDG100"
3817
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3818
- value: "MXF_40",
3819
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3820
- size: "small"
3821
- }),
3822
- label: "MXF_40"
3823
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3824
- value: "MXF_50",
3825
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3826
- size: "small"
3827
- }),
3828
- label: "MXF_50"
3829
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3830
- value: "MXCAF_40",
3831
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3832
- size: "small"
3833
- }),
3834
- label: "MXCAF_40"
3835
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3836
- value: "MXCAF_50",
3837
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
3838
- size: "small"
3839
- }),
3840
- label: "MXCAF_50"
3841
- })]
3842
- })]
3843
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Divider, {}), /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3844
- variant: "subtitle1",
3845
- color: "secondary",
3846
- children: "Gasket Properties"
3847
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3848
- direction: "row",
3849
- spacing: 2,
3850
- alignItems: "flex-end",
3851
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
3852
- label: "Gasket Material",
3853
- value: doorFrame.gasketMaterial,
3854
- onChange: value => setDoorFrame(_objectSpread2(_objectSpread2({}, doorFrame), {}, {
3855
- gasketMaterial: value
3856
- })),
3857
- onApply: handleMaterialApply
3858
- })
3859
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
3860
- label: "Test Gasket Material",
3861
- value: testGasketMaterial,
3862
- onChange: setTestGasketMaterial
3863
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Divider, {}), /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3864
- variant: "subtitle1",
3865
- color: "secondary",
3866
- children: "Hinge Properties"
3867
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3868
- direction: "row",
3869
- spacing: 2,
3870
- alignItems: "flex-end",
3871
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
3872
- label: "Hinge Material",
3873
- value: doorFrame.hingeMaterial,
3874
- onChange: value => setDoorFrame(_objectSpread2(_objectSpread2({}, doorFrame), {}, {
3875
- hingeMaterial: value
3876
- })),
3877
- onApply: handleMaterialApply
3878
- })
3879
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
3880
- label: "Test Hinge Material",
3881
- value: testHingeMaterial,
3882
- onChange: setTestHingeMaterial
3883
- })]
3884
- })
3885
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3886
- elevation: 3,
3887
- sx: {
3888
- p: 2
3889
- },
3890
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3891
- spacing: 2,
3892
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3893
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Switch, {
3894
- checked: frontCoverPanel.visible,
3895
- onChange: e => {
3896
- const isVisible = e.target.checked;
3897
- setFrontCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3898
- visible: isVisible
3899
- }));
3900
- setBackCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3901
- visible: isVisible
3902
- }));
3903
- }
3904
- }),
3905
- label: /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3906
- variant: "h6",
3907
- color: "primary",
3908
- children: "CAS Properties"
3909
- })
3910
- }), frontCoverPanel.visible && /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3911
- variant: "outlined",
3912
- sx: {
3913
- p: 2,
3914
- mt: 1
3915
- },
3916
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3917
- spacing: 2,
3918
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
3919
- label: "Material",
3920
- value: frontCoverPanel.material,
3921
- onChange: value => {
3922
- setFrontCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3923
- material: value
3924
- }));
3925
- setBackCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3926
- material: value
3927
- }));
3928
- },
3929
- onApply: handleMaterialApply
3930
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
3931
- label: "Test Material",
3932
- value: testFrontCoverPanelMaterial,
3933
- onChange: value => {
3934
- setTestFrontCoverPanelMaterial(value);
3935
- setTestBackCoverPanelMaterial(value);
3936
- }
3937
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
3938
- label: "Profile Width",
3939
- value: frontCoverPanel.width,
3940
- min: 20,
3941
- max: 500,
3942
- onChange: value => {
3943
- setFrontCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3944
- width: value
3945
- }));
3946
- setBackCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3947
- width: value
3948
- }));
3949
- }
3950
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
3951
- label: "Depth (from frame)",
3952
- value: frontCoverPanel.depth,
3953
- min: 5,
3954
- max: 100,
3955
- onChange: value => {
3956
- setFrontCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3957
- depth: value
3958
- }));
3959
- setBackCoverPanel(prev => _objectSpread2(_objectSpread2({}, prev), {}, {
3960
- depth: value
3961
- }));
3962
- }
3963
- })]
3964
- })
3965
- })]
3966
- })
3967
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3968
- elevation: 3,
3969
- sx: {
3970
- p: 2
3971
- },
3972
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3973
- spacing: 2,
3974
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
3975
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Switch, {
3976
- checked: interiorFanlight.visible,
3977
- onChange: e => {
3978
- setInteriorFanlight(_objectSpread2(_objectSpread2({}, interiorFanlight), {}, {
3979
- visible: e.target.checked
3980
- }));
3981
- }
3982
- }),
3983
- label: /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
3984
- variant: "h6",
3985
- color: "primary",
3986
- children: "Interior Fanlight"
3987
- })
3988
- }), interiorFanlight.visible && /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
3989
- variant: "outlined",
3990
- sx: {
3991
- p: 2,
3992
- mt: 1
3993
- },
3994
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
3995
- spacing: 2,
3996
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
3997
- direction: "row",
3998
- spacing: 2,
3999
- alignItems: "flex-end",
4000
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
4001
- label: "Material",
4002
- value: interiorFanlight.material,
4003
- onChange: value => setInteriorFanlight(_objectSpread2(_objectSpread2({}, interiorFanlight), {}, {
4004
- material: value
4005
- })),
4006
- onApply: handleMaterialApply
4007
- })
4008
- }), " ", /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
4009
- label: "Test Material",
4010
- value: testInteriorFanlightMaterial,
4011
- onChange: setTestInteriorFanlightMaterial
4012
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4013
- label: "Height",
4014
- value: interiorFanlight.height,
4015
- min: 100,
4016
- max: door.doorHeight - 1500 > 100 ? door.doorHeight - 1500 : 100,
4017
- onChange: value => setInteriorFanlight(_objectSpread2(_objectSpread2({}, interiorFanlight), {}, {
4018
- height: value
4019
- }))
4020
- })]
4021
- })
4022
- })]
4023
- })
4024
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
4025
- elevation: 3,
4026
- sx: {
4027
- p: 2
4028
- },
4029
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
4030
- spacing: 2,
4031
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4032
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Switch, {
4033
- checked: exteriorFanlight.visible,
4034
- onChange: e => setExteriorFanlight(_objectSpread2(_objectSpread2({}, exteriorFanlight), {}, {
4035
- visible: e.target.checked
4036
- }))
4037
- }),
4038
- label: /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
4039
- variant: "h6",
4040
- color: "primary",
4041
- children: "Exterior Fanlight"
4042
- })
4043
- }), exteriorFanlight.visible && /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
4044
- variant: "outlined",
4045
- sx: {
4046
- p: 2,
4047
- mt: 1
4048
- },
4049
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
4050
- spacing: 2,
4051
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs(FormControl, {
4052
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormLabel, {
4053
- children: "Type"
4054
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(RadioGroup, {
4055
- row: true,
4056
- value: exteriorFanlightType,
4057
- onChange: e => setExteriorFanlightType(e.target.value),
4058
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4059
- value: "WPFL",
4060
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
4061
- size: "small"
4062
- }),
4063
- label: "WPFL"
4064
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4065
- value: "ALDGFL",
4066
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
4067
- size: "small"
4068
- }),
4069
- label: "ALDGFL"
4070
- }), /*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4071
- value: "ALSGFL",
4072
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Radio, {
4073
- size: "small"
4074
- }),
4075
- label: "ALSGFL"
4076
- })]
4077
- })]
4078
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
4079
- label: "Material",
4080
- value: exteriorFanlight.material,
4081
- onChange: value => setExteriorFanlight(_objectSpread2(_objectSpread2({}, exteriorFanlight), {}, {
4082
- material: value
4083
- })),
4084
- onApply: handleMaterialApply
4085
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
4086
- label: "Test Material",
4087
- value: testExteriorFanlightMaterial,
4088
- onChange: setTestExteriorFanlightMaterial
4089
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4090
- label: "Height",
4091
- value: exteriorFanlight.height,
4092
- min: 100,
4093
- max: 1000,
4094
- onChange: handleExteriorFanlightHeightChange
4095
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4096
- label: "Depth",
4097
- value: exteriorFanlight.depth,
4098
- min: 40,
4099
- max: doorFrame.frameDepth,
4100
- onChange: value => setExteriorFanlight(_objectSpread2(_objectSpread2({}, exteriorFanlight), {}, {
4101
- depth: value
4102
- }))
4103
- })]
4104
- })
4105
- })]
4106
- })
4107
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
4108
- elevation: 3,
4109
- sx: {
4110
- p: 2
4111
- },
4112
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
4113
- spacing: 2,
4114
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4115
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Switch, {
4116
- checked: occulus.visible,
4117
- onChange: e => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4118
- visible: e.target.checked
4119
- }))
4120
- }),
4121
- label: /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
4122
- variant: "h6",
4123
- color: "primary",
4124
- children: "Occulus"
4125
- })
4126
- }), occulus.visible && /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
4127
- variant: "outlined",
4128
- sx: {
4129
- p: 2,
4130
- mt: 1
4131
- },
4132
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
4133
- spacing: 2,
4134
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4135
- label: "Offset from Left (x1)",
4136
- value: occulus.x1,
4137
- min: 50,
4138
- max: door.doorWidth - occulus.x2 - 50,
4139
- onChange: value => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4140
- x1: value
4141
- }))
4142
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4143
- label: "Offset from Right (x2)",
4144
- value: occulus.x2,
4145
- min: 50,
4146
- max: door.doorWidth - occulus.x1 - 50,
4147
- onChange: value => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4148
- x2: value
4149
- }))
4150
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4151
- label: "Offset from Top (y1)",
4152
- value: occulus.y1,
4153
- min: 50,
4154
- max: mainDoorHeight - occulus.y2 - 50,
4155
- onChange: value => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4156
- y1: value
4157
- }))
4158
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4159
- label: "Offset from Bottom (y2)",
4160
- value: occulus.y2,
4161
- min: 50,
4162
- max: mainDoorHeight - occulus.y1 - 50,
4163
- onChange: value => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4164
- y2: value
4165
- }))
4166
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Divider, {}), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
4167
- variant: "outlined",
4168
- sx: {
4169
- p: 2,
4170
- mt: 1
4171
- },
4172
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
4173
- spacing: 2,
4174
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4175
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Switch, {
4176
- checked: occulus.infillVisible,
4177
- onChange: e => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4178
- infillVisible: e.target.checked
4179
- }))
4180
- }),
4181
- label: "Show Infill"
4182
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Stack, {
4183
- direction: "row",
4184
- spacing: 2,
4185
- alignItems: "flex-end",
4186
- children: /*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
4187
- label: "Infill Material",
4188
- value: occulus.material,
4189
- onChange: value => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4190
- material: value
4191
- })),
4192
- onApply: handleMaterialApply
4193
- })
4194
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
4195
- label: "Test Material",
4196
- value: testOcculusInfillMaterial,
4197
- onChange: setTestOcculusInfillMaterial
4198
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4199
- label: "Infill Depth",
4200
- value: occulus.depth,
4201
- min: 10,
4202
- max: door.theDoorDepth,
4203
- onChange: value => setOcculus(_objectSpread2(_objectSpread2({}, occulus), {}, {
4204
- depth: value
4205
- }))
4206
- })]
4207
- })
4208
- })]
4209
- })
4210
- })]
4211
- })
4212
- }), /*#__PURE__*/jsxRuntimeExports.jsx(Paper, {
4213
- elevation: 3,
4214
- sx: {
4215
- p: 2
4216
- },
4217
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(Stack, {
4218
- spacing: 2,
4219
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(FormControlLabel, {
4220
- control: /*#__PURE__*/jsxRuntimeExports.jsx(Switch, {
4221
- checked: glassVisible,
4222
- onChange: e => setGlassVisible(e.target.checked)
4223
- }),
4224
- label: /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
4225
- variant: "h6",
4226
- color: "primary",
4227
- children: "Glass"
4228
- })
4229
- }), glassVisible && /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
4230
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(MaterialInput, {
4231
- label: "Glass Material",
4232
- value: doorFrame.glassMaterial || "",
4233
- onChange: value => setDoorFrame(_objectSpread2(_objectSpread2({}, doorFrame), {}, {
4234
- glassMaterial: value
4235
- })),
4236
- onApply: handleMaterialApply
4237
- }), /*#__PURE__*/jsxRuntimeExports.jsx(MaterialSelector, {
4238
- label: "Test Glass Material",
4239
- value: testGlassInfillMaterial,
4240
- onChange: setTestGlassInfillMaterial
4241
- }), /*#__PURE__*/jsxRuntimeExports.jsx(EditableSlider, {
4242
- label: "Glass Depth",
4243
- value: glassDepth,
4244
- min: 4,
4245
- max: 20,
4246
- step: 0.5,
4247
- onChange: setGlassDepth
4248
- })]
4249
- })]
4250
- })
4251
- })]
4252
- })
4253
- })]
4254
- });
4255
- };
4256
-
4257
2968
  const DoorConfigurator = _ref => {
4258
2969
  let {
4259
2970
  doorName,
4260
2971
  showInterface = true
4261
2972
  } = _ref;
4262
- return /*#__PURE__*/jsxRuntimeExports.jsxs(ConfiguratorProvider, {
4263
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(DoorModels, {
2973
+ return /*#__PURE__*/jsxRuntimeExports.jsx(ConfiguratorProvider, {
2974
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(DoorModels, {
4264
2975
  doorName: doorName
4265
- }), showInterface && /*#__PURE__*/jsxRuntimeExports.jsx(Interface, {})]
2976
+ })
4266
2977
  });
4267
2978
  };
4268
2979