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