kitchen-simulator 1.1.1-test.6 → 1.1.1-test.60
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/es/KitchenConfigurator.js +8 -15
- package/es/KitchenConfiguratorApp.js +11 -27
- package/es/actions/holes-actions.js +1 -1
- package/es/actions/items-actions.js +1 -1
- package/es/actions/lines-actions.js +1 -1
- package/es/actions/project-actions.js +1 -1
- package/es/actions/scene-actions.js +1 -1
- package/es/actions/vertices-actions.js +1 -1
- package/es/actions/viewer2d-actions.js +1 -1
- package/es/actions/viewer3d-actions.js +1 -1
- package/es/catalog/areas/area/planner-element.js +10 -7
- package/es/catalog/factories/wall-factory-3d.js +1 -1
- package/es/catalog/holes/export.js +13 -13
- package/es/catalog/lines/wall/planner-element.js +13 -10
- package/es/catalog/properties/property-checkbox.js +63 -18
- package/es/catalog/properties/property-enum.js +51 -9
- package/es/catalog/properties/property-lenght-measure.js +2 -2
- package/es/catalog/properties/property-length-measure.js +58 -9
- package/es/catalog/properties/property-length-measure_hole.js +2 -2
- package/es/catalog/utils/exporter.js +1 -1
- package/es/catalog/utils/item-loader.js +1 -1
- package/es/catalog/utils/mtl-loader.js +3 -2
- package/es/catalog/utils/obj-loader.js +3 -2
- package/es/class/area.js +1 -1
- package/es/class/group.js +3 -3
- package/es/class/hole.js +5 -6
- package/es/class/item.js +8 -10
- package/es/class/layer.js +2 -2
- package/es/class/project.js +4 -4
- package/es/components/content.js +1 -0
- package/es/components/disclaimer/disclaimer.js +66 -86
- package/es/components/style/form-number-input.js +31 -7
- package/es/components/style/form-select.js +56 -8
- package/es/components/style/form-slider.js +22 -6
- package/es/components/style/form-text-input.js +31 -12
- package/es/components/viewer2d/area.js +4 -4
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -1
- package/es/components/viewer2d/item.js +3 -5
- package/es/components/viewer2d/line.js +2 -5
- package/es/components/viewer2d/ruler.js +2 -3
- package/es/components/viewer2d/rulerDist.js +1 -1
- package/es/components/viewer2d/scene.js +2 -2
- package/es/components/viewer2d/utils.js +37 -1
- package/es/components/viewer2d/viewer2d.js +10 -4
- package/es/components/viewer3d/libs/mtl-loader.js +2 -2
- package/es/components/viewer3d/libs/obj-loader.js +2 -2
- package/es/components/viewer3d/libs/orbit-controls.js +6 -5
- package/es/components/viewer3d/libs/pointer-lock-controls.js +5 -4
- package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
- package/es/components/viewer3d/ruler-utils/layer3D.js +2 -2
- package/es/components/viewer3d/ruler-utils/scene3D.js +2 -3
- package/es/components/viewer3d/scene-creator.js +1 -1
- package/es/components/viewer3d/viewer3d.js +12 -13
- package/es/index.js +20 -14
- package/es/models.js +4 -3
- package/es/plugins/keyboard.js +2 -2
- package/es/reducers/holes-reducer.js +1 -1
- package/es/reducers/items-reducer.js +2 -5
- package/es/reducers/lines-reducer.js +1 -1
- package/es/reducers/project-reducer.js +1 -1
- package/es/reducers/reducer.js +2 -2
- package/es/reducers/scene-reducer.js +1 -1
- package/es/reducers/user-reducer.js +1 -2
- package/es/reducers/vertices-reducer.js +1 -1
- package/es/reducers/viewer2d-reducer.js +2 -2
- package/es/reducers/viewer3d-reducer.js +2 -2
- package/es/utils/convert-units-lite.js +29 -0
- package/es/utils/geometry.js +4 -4
- package/es/utils/get-edges-of-subgraphs.js +2 -1
- package/es/utils/graph-cycles.js +2 -3
- package/es/utils/graph.js +2 -1
- package/es/utils/helper.js +1 -69
- package/es/utils/id-broker.js +2 -2
- package/es/utils/molding.js +34 -34
- package/lib/KitchenConfigurator.js +33 -40
- package/lib/KitchenConfiguratorApp.js +34 -49
- package/lib/catalog/areas/area/planner-element.js +12 -8
- package/lib/catalog/factories/wall-factory-3d.js +2 -2
- package/lib/catalog/holes/export.js +13 -13
- package/lib/catalog/lines/wall/planner-element.js +15 -11
- package/lib/catalog/properties/property-checkbox.js +64 -19
- package/lib/catalog/properties/property-enum.js +49 -7
- package/lib/catalog/properties/property-lenght-measure.js +3 -3
- package/lib/catalog/properties/property-length-measure.js +60 -11
- package/lib/catalog/properties/property-length-measure_hole.js +3 -3
- package/lib/catalog/utils/exporter.js +5 -6
- package/lib/catalog/utils/item-loader.js +20 -21
- package/lib/catalog/utils/mtl-loader.js +7 -3
- package/lib/catalog/utils/obj-loader.js +7 -3
- package/lib/class/item.js +13 -16
- package/lib/components/content.js +1 -0
- package/lib/components/disclaimer/disclaimer.js +66 -86
- package/lib/components/style/form-number-input.js +30 -6
- package/lib/components/style/form-select.js +54 -8
- package/lib/components/style/form-slider.js +22 -6
- package/lib/components/style/form-text-input.js +30 -12
- package/lib/components/viewer2d/area.js +5 -5
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -1
- package/lib/components/viewer2d/grids/grid-streak.js +0 -1
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -1
- package/lib/components/viewer2d/item.js +7 -8
- package/lib/components/viewer2d/line.js +2 -5
- package/lib/components/viewer2d/ruler.js +6 -7
- package/lib/components/viewer2d/rulerDist.js +4 -4
- package/lib/components/viewer2d/scene.js +1 -1
- package/lib/components/viewer2d/utils.js +37 -0
- package/lib/components/viewer2d/viewer2d.js +25 -17
- package/lib/components/viewer3d/libs/mtl-loader.js +6 -2
- package/lib/components/viewer3d/libs/obj-loader.js +6 -2
- package/lib/components/viewer3d/libs/orbit-controls.js +10 -5
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +9 -4
- package/lib/components/viewer3d/ruler-utils/itemRect.js +7 -7
- package/lib/components/viewer3d/ruler-utils/layer3D.js +32 -32
- package/lib/components/viewer3d/ruler-utils/scene3D.js +3 -4
- package/lib/components/viewer3d/scene-creator.js +24 -24
- package/lib/components/viewer3d/viewer3d.js +17 -17
- package/lib/index.js +22 -88
- package/lib/models.js +7 -7
- package/lib/reducers/user-reducer.js +0 -1
- package/lib/reducers/viewer2d-reducer.js +3 -4
- package/lib/reducers/viewer3d-reducer.js +3 -4
- package/lib/utils/convert-units-lite.js +35 -0
- package/lib/utils/geometry.js +9 -10
- package/lib/utils/get-edges-of-subgraphs.js +7 -1
- package/lib/utils/graph-cycles.js +9 -9
- package/lib/utils/graph.js +9 -3
- package/lib/utils/helper.js +7 -76
- package/lib/utils/id-broker.js +2 -2
- package/lib/utils/molding.js +52 -52
- package/package.json +34 -70
- package/es/analytics/ga4.js +0 -191
- package/es/analytics/posthog.js +0 -60
- package/lib/analytics/ga4.js +0 -197
- package/lib/analytics/posthog.js +0 -68
|
@@ -29,16 +29,14 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
29
29
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
30
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
31
|
import axios from 'axios';
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
32
|
+
import { convert } from "./utils/convert-units-lite";
|
|
33
|
+
import { Autosave } from "./plugins/export";
|
|
34
|
+
import PropTypes from 'prop-types';
|
|
35
35
|
import React, { Component } from 'react';
|
|
36
|
-
import ReactGA from 'react-ga4';
|
|
37
|
-
import { hotjar } from 'react-hotjar';
|
|
38
36
|
import { connect } from 'react-redux';
|
|
39
37
|
import { bindActionCreators } from 'redux';
|
|
40
38
|
import * as constants from "./constants";
|
|
41
|
-
import { base64Decode
|
|
39
|
+
import { base64Decode } from "./utils/helper";
|
|
42
40
|
import actions from "./actions/export";
|
|
43
41
|
import Catalog from "./catalog/catalog";
|
|
44
42
|
import { Content } from "./components/export";
|
|
@@ -361,11 +359,6 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
361
359
|
key: "componentDidMount",
|
|
362
360
|
value: function componentDidMount() {
|
|
363
361
|
var _this3 = this;
|
|
364
|
-
ReactGA.send({
|
|
365
|
-
hitType: 'pageview',
|
|
366
|
-
page: getPath()
|
|
367
|
-
});
|
|
368
|
-
hotjar.event && hotjar.event("pageview:".concat(getPath()));
|
|
369
362
|
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
370
363
|
console.log('context =>', this.context);
|
|
371
364
|
window.forRedo = [];
|
|
@@ -385,7 +378,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
385
378
|
return;
|
|
386
379
|
}
|
|
387
380
|
if (match && match.params.pid === undefined) {
|
|
388
|
-
var newplugins = [].concat(_toConsumableArray(plugins), [
|
|
381
|
+
var newplugins = [].concat(_toConsumableArray(plugins), [Autosave('KitchenConfigurator_v0', false)]);
|
|
389
382
|
newplugins.forEach(function (newplugin) {
|
|
390
383
|
return newplugin(store, stateExtractor);
|
|
391
384
|
});
|
|
@@ -580,7 +573,9 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
580
573
|
});
|
|
581
574
|
return /*#__PURE__*/React.createElement("section", null, /*#__PURE__*/React.createElement("div", {
|
|
582
575
|
style: _objectSpread(_objectSpread({}, wrapperStyle), {}, {
|
|
583
|
-
height: height
|
|
576
|
+
height: height,
|
|
577
|
+
display: 'flex',
|
|
578
|
+
justifyContent: 'center'
|
|
584
579
|
})
|
|
585
580
|
}, /*#__PURE__*/React.createElement(Content, _extends({
|
|
586
581
|
width: contentW,
|
|
@@ -609,7 +604,6 @@ KitchenConfigurator.propTypes = {
|
|
|
609
604
|
width: PropTypes.number.isRequired,
|
|
610
605
|
height: PropTypes.number.isRequired,
|
|
611
606
|
stateExtractor: PropTypes.func.isRequired,
|
|
612
|
-
toolbarButtons: PropTypes.array,
|
|
613
607
|
sidebarComponents: PropTypes.array,
|
|
614
608
|
footerbarComponents: PropTypes.array,
|
|
615
609
|
customContents: PropTypes.object,
|
|
@@ -631,7 +625,6 @@ KitchenConfigurator.defaultProps = {
|
|
|
631
625
|
plugins: [],
|
|
632
626
|
allowProjectFileSupport: true,
|
|
633
627
|
softwareSignature: "KitchenConfigurator ".concat(VERSION),
|
|
634
|
-
toolbarButtons: [],
|
|
635
628
|
sidebarComponents: [],
|
|
636
629
|
footerbarComponents: [],
|
|
637
630
|
customContents: {},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["width", "height", "projectElement", "categoryData", "dataBundle", "configData", "
|
|
2
|
+
var _excluded = ["width", "height", "projectElement", "categoryData", "dataBundle", "configData", "options", "user", "auth", "featureFlags", "sentry", "analytics", "onEvent", "onSave", "onError"];
|
|
3
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -19,42 +19,36 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
19
19
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
20
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
21
21
|
import React, { useEffect } from 'react';
|
|
22
|
-
import
|
|
22
|
+
import PropTypes from 'prop-types';
|
|
23
23
|
import { Provider } from 'react-redux';
|
|
24
24
|
import { createStore } from 'redux';
|
|
25
25
|
import * as Models from "./models";
|
|
26
|
+
import { State } from "./models";
|
|
27
|
+
import PlannerReducer from "./reducers/reducer";
|
|
26
28
|
import KitchenConfigurator from "./KitchenConfigurator";
|
|
27
29
|
import AppContext from "./AppContext";
|
|
28
30
|
import Catalog from "./catalog/catalog";
|
|
29
31
|
import { SVGLoader } from 'three/addons/loaders/SVGLoader';
|
|
30
32
|
import { isEmpty } from "./utils/helper";
|
|
31
33
|
import { TOE_KICK_MOLDING } from "./constants";
|
|
32
|
-
import * as Areas from "./catalog/areas/area/planner-element
|
|
33
|
-
import * as Lines from "./catalog/lines/wall/planner-element
|
|
34
|
+
import * as Areas from "./catalog/areas/area/planner-element";
|
|
35
|
+
import * as Lines from "./catalog/lines/wall/planner-element";
|
|
34
36
|
import * as Holes from "./catalog/holes/export";
|
|
35
37
|
import { render2DItem, render3DApplianceItem, render3DItem, render3DLightingItem } from "./catalog/utils/item-loader";
|
|
36
|
-
import {
|
|
38
|
+
import { ConsoleDebugger, Keyboard } from "./plugins/export";
|
|
37
39
|
import { Map } from 'immutable';
|
|
38
|
-
import ReactGA from 'react-ga4';
|
|
39
|
-
import { hotjar } from 'react-hotjar';
|
|
40
40
|
import * as Sentry from '@sentry/react';
|
|
41
41
|
import { loadProject, rename } from "./actions/project-actions";
|
|
42
42
|
import exporter from "./catalog/utils/exporter";
|
|
43
|
+
import * as THREE from 'three';
|
|
44
|
+
if (typeof window !== 'undefined') window.THREE = THREE;
|
|
43
45
|
|
|
44
46
|
/* ============================== component ============================= */
|
|
45
47
|
var MyCatalog = new Catalog();
|
|
46
48
|
var AppState = Map({
|
|
47
|
-
KitchenConfigurator: new
|
|
49
|
+
KitchenConfigurator: new State()
|
|
48
50
|
});
|
|
49
51
|
console.log('Version: 378.45-202509_DIY-364-mbox-crash');
|
|
50
|
-
ReactGA.initialize([{
|
|
51
|
-
trackingId: 'G-YK2JCC9F9G' // https://dev.addovisuals.com
|
|
52
|
-
}, {
|
|
53
|
-
trackingId: 'G-3Y44W0RY2E' // https://demo.kc.addovisuals.com/
|
|
54
|
-
}, {
|
|
55
|
-
trackingId: 'G-M2VD74KP44' // https://rtastore.diydesignspace.com/
|
|
56
|
-
}]);
|
|
57
|
-
hotjar.initialize('3010506', '6');
|
|
58
52
|
isProduction && Sentry.init({
|
|
59
53
|
dsn: process.env.SENTRY_DSN,
|
|
60
54
|
environment: process.env.SENTRY_ENVIRONMENT
|
|
@@ -94,7 +88,7 @@ var store = createStore(reducer, null, !isProduction && window.devToolsExtension
|
|
|
94
88
|
}) : function (f) {
|
|
95
89
|
return f;
|
|
96
90
|
});
|
|
97
|
-
var plugins = [
|
|
91
|
+
var plugins = [Keyboard(), ConsoleDebugger()];
|
|
98
92
|
export default function KitchenConfiguratorApp(props) {
|
|
99
93
|
var width = props.width,
|
|
100
94
|
height = props.height,
|
|
@@ -102,7 +96,6 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
102
96
|
categoryData = props.categoryData,
|
|
103
97
|
dataBundle = props.dataBundle,
|
|
104
98
|
configData = props.configData,
|
|
105
|
-
toolbarButtons = props.toolbarButtons,
|
|
106
99
|
options = props.options,
|
|
107
100
|
user = props.user,
|
|
108
101
|
auth = props.auth,
|
|
@@ -447,7 +440,6 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
447
440
|
logoImage: logoImg,
|
|
448
441
|
companyURL: companyUrl,
|
|
449
442
|
plugins: plugins,
|
|
450
|
-
toolbarButtons: toolbarButtons,
|
|
451
443
|
stateExtractor: function stateExtractor(state) {
|
|
452
444
|
return state.get('KitchenConfigurator');
|
|
453
445
|
},
|
|
@@ -472,7 +464,6 @@ KitchenConfiguratorApp.propTypes = {
|
|
|
472
464
|
catalog: PropTypes.oneOfType([PropTypes.object, PropTypes.instanceOf(Models.Catalog)]),
|
|
473
465
|
logoImg: PropTypes.any,
|
|
474
466
|
companyUrl: PropTypes.string,
|
|
475
|
-
toolbarButtons: PropTypes.any,
|
|
476
467
|
options: PropTypes.object,
|
|
477
468
|
user: PropTypes.object,
|
|
478
469
|
auth: PropTypes.object,
|
|
@@ -481,13 +472,6 @@ KitchenConfiguratorApp.propTypes = {
|
|
|
481
472
|
dsn: PropTypes.string,
|
|
482
473
|
environment: PropTypes.string
|
|
483
474
|
}),
|
|
484
|
-
analytics: PropTypes.shape({
|
|
485
|
-
ga4Id: PropTypes.string,
|
|
486
|
-
hotjar: PropTypes.shape({
|
|
487
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
488
|
-
sv: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
489
|
-
})
|
|
490
|
-
}),
|
|
491
475
|
onEvent: PropTypes.func,
|
|
492
476
|
onSave: PropTypes.func,
|
|
493
477
|
onError: PropTypes.func,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BEGIN_DRAGGING_HOLE, BEGIN_DRAGGING_HOLE_3D, END_CREATING_HOLE, END_DRAGGING_HOLE, END_DRAGGING_HOLE_3D, END_DRAWING_HOLE, END_DRAWING_HOLE_3D, SELECT_HOLE, SELECT_TOOL_DRAWING_HOLE, SELECT_TOOL_DRAWING_HOLE_3D, UPDATE_DRAGGING_HOLE, UPDATE_DRAGGING_HOLE_CHANGED, UPDATE_DRAGGING_HOLE_RULER_CHANGED, UPDATE_DRAWING_HOLE, UPDATE_DRAWING_HOLE_3D, UPDATE_POPUP_OPEN } from "../constants";
|
|
2
2
|
export function endCreatingHole() {
|
|
3
3
|
return {
|
|
4
4
|
type: END_CREATING_HOLE
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ANIMATE_OBJECT, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D, DUPLICATE_SELECTED, EDIT_WIDTH, END_CREATING_CABINET, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, END_DRAWING_ITEM, END_LOADING, END_ROTATING_ITEM, END_ROTATING_ITEM_3D, ITEM_MOVE_UP, REMOVE_REPLACE_SUBMODULE, REPLACE_ITEM, REPLACE_SUBMODULE, SELECT_ITEM, SELECT_TOOL_DRAWING_ITEM, SELECT_TOOL_DRAWING_ITEM_3D, SET_APPLIANCE_MATERIAL, SET_BACKSPLASH, SET_BACKSPLASH_VISIBLE, SET_COUNTER_TOP, SET_DOOR_HANDLE, SET_DOOR_STYLE, SET_HANDLE_MATERIAL, SET_INITIAL_DOOR_STYLE, SET_MODELLING, SET_MOLDING, SET_MOVE_STATUS, SET_ROTATE_STATUS, SET_WALL_COLOR, STORE_DIST_ARRAY, TOGGLE_LOADING_CABINET, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAWING_ITEM, UPDATE_MOLDING, UPDATE_POPUP_OPEN, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, VALIDATE_ITEM_POSTIONS } from "../constants";
|
|
2
2
|
export function storeDistArray(layerID, itemID, distArray) {
|
|
3
3
|
return {
|
|
4
4
|
type: STORE_DIST_ARRAY,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BEGIN_DRAGGING_LINE, BEGIN_DRAWING_LINE, END_DRAGGING_LINE, END_DRAWING_LINE, SELECT_LINE, SELECT_TOOL_DRAWING_LINE, SET_RELATED_LINE, STOP_DRAWING_LINE, UPDATE_DRAGGING_LINE, UPDATE_DRAWING_LINE } from "../constants";
|
|
2
2
|
export function selectLine(layerID, lineID) {
|
|
3
3
|
return {
|
|
4
4
|
type: SELECT_LINE,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ADD_CIRCULAR_GUIDE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ALTERATE_STATE, CHANGE_CATALOG_PAGE, COPY_PROPERTIES, GO_BACK_TO_CATALOG_PAGE, INIT_CATALOG, LOAD_PROJECT, NEW_PROJECT, OPEN_CATALOG, OPEN_PROJECT_CONFIGURATOR, PASTE_PROPERTIES, PROJECT_RE_NAME, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, RECREATE, REDO, REMOVE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, ROLLBACK, SAVE_PROJECT, SELECT_ALL, SELECT_TOOL_EDIT, SET_HOLES_ATTRIBUTES, SET_IS_CABINET_DRAWING, SET_IS_HELP, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_MODE, SET_PROJECT_ID, SET_PROJECT_PROPERTIES, SET_PROPERTIES, SET_STATE_PROPERTIES, SHIFT2DOFF, SHIFT2DON, THROW_ERROR, THROW_WARNING, TOGGLE_SNAP, UNCREATE, UNDO, UNSELECT_ALL, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE } from "../constants";
|
|
2
2
|
export function setIsHelp(isHelp) {
|
|
3
3
|
return {
|
|
4
4
|
type: SET_IS_HELP,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ADD_LAYER, REMOVE_LAYER, SELECT_LAYER, SET_LAYER_PROPERTIES, UPDATE_MOVING_STATE } from "../constants";
|
|
2
2
|
export function selectLayer(layerID) {
|
|
3
3
|
return {
|
|
4
4
|
type: SELECT_LAYER,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BEGIN_DRAGGING_VERTEX,
|
|
1
|
+
import { BEGIN_DRAGGING_VERTEX, END_DRAGGING_VERTEX, UPDATE_DRAGGING_VERTEX } from "../constants";
|
|
2
2
|
export function beginDraggingVertex(layerID, vertexID, x, y, snapMask) {
|
|
3
3
|
return {
|
|
4
4
|
type: BEGIN_DRAGGING_VERTEX,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WALL_LENGTH_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, UPDATE_2D_CAMERA, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
2
|
export function updateCeilHeight(value) {
|
|
3
3
|
return {
|
|
4
4
|
type: UPDATE_CEIL_HEIGHT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SELECT_TOOL_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
2
|
export function selectTool3DView() {
|
|
3
3
|
return {
|
|
4
4
|
type: SELECT_TOOL_3D_VIEW
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ElementsFactories from "../../factories/export";
|
|
2
|
+
var textureUrl = function textureUrl(file) {
|
|
3
|
+
return new URL("./textures/".concat(file), import.meta.url).href;
|
|
4
|
+
};
|
|
2
5
|
var info = {
|
|
3
6
|
title: 'area',
|
|
4
7
|
tag: ['area'],
|
|
5
8
|
description: 'Generic Room',
|
|
6
|
-
image: ''
|
|
9
|
+
image: '' // no image provided yet
|
|
7
10
|
};
|
|
8
11
|
var textures = {
|
|
9
12
|
parquet: {
|
|
10
13
|
name: 'Parquet',
|
|
11
|
-
uri:
|
|
14
|
+
uri: textureUrl('parquet.jpg'),
|
|
12
15
|
lengthRepeatScale: 0.004,
|
|
13
16
|
heightRepeatScale: 0.004
|
|
14
17
|
},
|
|
15
18
|
tile1: {
|
|
16
19
|
name: 'Tile1',
|
|
17
|
-
uri:
|
|
20
|
+
uri: textureUrl('tile1.jpg'),
|
|
18
21
|
lengthRepeatScale: 0.01,
|
|
19
22
|
heightRepeatScale: 0.01
|
|
20
23
|
},
|
|
21
24
|
ceramic: {
|
|
22
25
|
name: 'Ceramic Tile',
|
|
23
|
-
uri:
|
|
26
|
+
uri: textureUrl('ceramic-tile.jpg'),
|
|
24
27
|
lengthRepeatScale: 0.02,
|
|
25
28
|
heightRepeatScale: 0.02
|
|
26
29
|
},
|
|
27
30
|
strand_porcelain: {
|
|
28
31
|
name: 'Strand Porcelain Tile',
|
|
29
|
-
uri:
|
|
32
|
+
uri: textureUrl('strand-porcelain.jpg'),
|
|
30
33
|
lengthRepeatScale: 0.02,
|
|
31
34
|
heightRepeatScale: 0.02
|
|
32
35
|
},
|
|
33
36
|
grass: {
|
|
34
37
|
name: 'Grass',
|
|
35
|
-
uri:
|
|
38
|
+
uri: textureUrl('grass.jpg'),
|
|
36
39
|
lengthRepeatScale: 0.01,
|
|
37
40
|
heightRepeatScale: 0.01
|
|
38
41
|
}
|
|
@@ -4,7 +4,7 @@ import { verticesDistance } from "../../utils/geometry";
|
|
|
4
4
|
import { isElevationView } from "../../utils/helper";
|
|
5
5
|
import * as SharedStyle from "../../shared-style";
|
|
6
6
|
import { LINE_THICKNESS, UNIT_CENTIMETER } from "../../constants";
|
|
7
|
-
import convert from
|
|
7
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
8
8
|
import ThreeBSP from "../../utils/threeCSG.es6";
|
|
9
9
|
var params = {
|
|
10
10
|
envMap: 'HDR',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { default as doorCloset } from "./door-closet/planner-element.
|
|
2
|
-
export { default as doorDouble } from "./door-double/planner-element.
|
|
3
|
-
export { default as doorExterior } from "./door-exterior/planner-element.
|
|
4
|
-
export { default as doorInterior } from "./door-interior/planner-element.
|
|
5
|
-
export { default as doorPanic } from "./door-panic/planner-element.
|
|
6
|
-
export { default as doorPanicDouble } from "./door-panic-double/planner-element.
|
|
7
|
-
export { default as doorSliding } from "./door-sliding/planner-element.
|
|
8
|
-
export { default as doorwayFramed } from "./doorway-framed/planner-element.
|
|
9
|
-
export { default as doorwayFrameless } from "./doorway-frameless/planner-element.
|
|
10
|
-
export { default as windowClear } from "./window-clear/planner-element.
|
|
11
|
-
export { default as windowCross } from "./window-cross/planner-element.
|
|
12
|
-
export { default as windowDoubleHung } from "./window-double-hung/planner-element.
|
|
13
|
-
export { default as windowVertical } from "./window-vertical/planner-element.
|
|
1
|
+
export { default as doorCloset } from "./door-closet/planner-element.js";
|
|
2
|
+
export { default as doorDouble } from "./door-double/planner-element.js";
|
|
3
|
+
export { default as doorExterior } from "./door-exterior/planner-element.js";
|
|
4
|
+
export { default as doorInterior } from "./door-interior/planner-element.js";
|
|
5
|
+
export { default as doorPanic } from "./door-panic/planner-element.js";
|
|
6
|
+
export { default as doorPanicDouble } from "./door-panic-double/planner-element.js";
|
|
7
|
+
export { default as doorSliding } from "./door-sliding/planner-element.js";
|
|
8
|
+
export { default as doorwayFramed } from "./doorway-framed/planner-element.js";
|
|
9
|
+
export { default as doorwayFrameless } from "./doorway-frameless/planner-element.js";
|
|
10
|
+
export { default as windowClear } from "./window-clear/planner-element.js";
|
|
11
|
+
export { default as windowCross } from "./window-cross/planner-element.js";
|
|
12
|
+
export { default as windowDoubleHung } from "./window-double-hung/planner-element.js";
|
|
13
|
+
export { default as windowVertical } from "./window-vertical/planner-element.js";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ElementsFactories from "../../factories/export";
|
|
2
|
+
var textureUrl = function textureUrl(file) {
|
|
3
|
+
return new URL("./textures/".concat(file), import.meta.url).href;
|
|
4
|
+
};
|
|
2
5
|
var info = {
|
|
3
6
|
title: 'wall',
|
|
4
7
|
tag: ['wall'],
|
|
5
8
|
description: 'Wall with bricks or painted',
|
|
6
|
-
image:
|
|
9
|
+
image: new URL('./wall.png', import.meta.url).href,
|
|
7
10
|
visibility: {
|
|
8
11
|
catalog: true,
|
|
9
12
|
layerElementsVisible: true
|
|
@@ -12,11 +15,11 @@ var info = {
|
|
|
12
15
|
var textures = {
|
|
13
16
|
plaster: {
|
|
14
17
|
name: 'Plaster',
|
|
15
|
-
uri:
|
|
18
|
+
uri: textureUrl('plaster.jpg'),
|
|
16
19
|
lengthRepeatScale: 0.005,
|
|
17
20
|
heightRepeatScale: 0.005,
|
|
18
21
|
normal: {
|
|
19
|
-
uri:
|
|
22
|
+
uri: textureUrl('plaster-normal.jpg'),
|
|
20
23
|
lengthRepeatScale: 0.005,
|
|
21
24
|
heightRepeatScale: 0.005,
|
|
22
25
|
normalScaleX: 0.4,
|
|
@@ -26,11 +29,11 @@ var textures = {
|
|
|
26
29
|
},
|
|
27
30
|
bricks: {
|
|
28
31
|
name: 'Bricks',
|
|
29
|
-
uri:
|
|
32
|
+
uri: textureUrl('bricks.jpg'),
|
|
30
33
|
lengthRepeatScale: 0.009,
|
|
31
34
|
heightRepeatScale: 0.009,
|
|
32
35
|
normal: {
|
|
33
|
-
uri:
|
|
36
|
+
uri: textureUrl('bricks-normal.jpg'),
|
|
34
37
|
lengthRepeatScale: 0.009,
|
|
35
38
|
heightRepeatScale: 0.009,
|
|
36
39
|
normalScaleX: 0.4,
|
|
@@ -40,11 +43,11 @@ var textures = {
|
|
|
40
43
|
},
|
|
41
44
|
painted: {
|
|
42
45
|
name: 'Painted',
|
|
43
|
-
uri:
|
|
46
|
+
uri: textureUrl('painted.jpg'),
|
|
44
47
|
lengthRepeatScale: 0.005,
|
|
45
48
|
heightRepeatScale: 0.005,
|
|
46
49
|
normal: {
|
|
47
|
-
uri:
|
|
50
|
+
uri: textureUrl('painted-normal.jpg'),
|
|
48
51
|
lengthRepeatScale: 0.005,
|
|
49
52
|
heightRepeatScale: 0.005,
|
|
50
53
|
normalScaleX: 0.4,
|
|
@@ -54,11 +57,11 @@ var textures = {
|
|
|
54
57
|
},
|
|
55
58
|
morden: {
|
|
56
59
|
name: 'Morden',
|
|
57
|
-
uri:
|
|
60
|
+
uri: textureUrl('morden.jpg'),
|
|
58
61
|
lengthRepeatScale: 0.005,
|
|
59
62
|
heightRepeatScale: 0.005,
|
|
60
63
|
normal: {
|
|
61
|
-
uri:
|
|
64
|
+
uri: textureUrl('morden-normal.jpg'),
|
|
62
65
|
lengthRepeatScale: 0.005,
|
|
63
66
|
heightRepeatScale: 0.005,
|
|
64
67
|
normalScaleX: 0.4,
|
|
@@ -1,23 +1,60 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
3
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
7
|
import React from 'react';
|
|
10
8
|
import PropTypes from 'prop-types';
|
|
11
|
-
import { FormLabel } from "../../components/style/export";
|
|
12
|
-
import PropertyStyle from "./shared-property-style";
|
|
13
|
-
import styled from 'styled-components';
|
|
14
9
|
import { DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
var styles = {
|
|
11
|
+
flipWrapper: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
margin: '15px 0',
|
|
15
|
+
justifyContent: 'space-between'
|
|
16
|
+
},
|
|
17
|
+
flipTitle: {
|
|
18
|
+
marginRight: 'auto',
|
|
19
|
+
color: SECONDARY_PURPLE_COLOR,
|
|
20
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
21
|
+
fontSize: 16,
|
|
22
|
+
fontWeight: 600,
|
|
23
|
+
lineHeight: '18px',
|
|
24
|
+
textAlign: 'left'
|
|
25
|
+
},
|
|
26
|
+
flipDescription: {
|
|
27
|
+
marginRight: 'auto',
|
|
28
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
29
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
30
|
+
fontSize: 13,
|
|
31
|
+
fontWeight: 400,
|
|
32
|
+
lineHeight: '18px',
|
|
33
|
+
textAlign: 'left'
|
|
34
|
+
},
|
|
35
|
+
flipInfoWrapper: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
flexDirection: 'column'
|
|
38
|
+
},
|
|
39
|
+
flipToggle: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
position: 'relative',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
fontSize: 14,
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
userSelect: 'none'
|
|
47
|
+
},
|
|
48
|
+
flipToggleIcon: {
|
|
49
|
+
top: 0,
|
|
50
|
+
position: 'absolute'
|
|
51
|
+
},
|
|
52
|
+
flipToggleIconImg: {
|
|
53
|
+
fontSize: '1.4rem',
|
|
54
|
+
boxSizing: 'border-box',
|
|
55
|
+
borderRadius: '50%'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
21
58
|
export default function PropertyCheckbox(_ref) {
|
|
22
59
|
var value = _ref.value,
|
|
23
60
|
onUpdate = _ref.onUpdate,
|
|
@@ -38,10 +75,18 @@ export default function PropertyCheckbox(_ref) {
|
|
|
38
75
|
} : {
|
|
39
76
|
right: 0
|
|
40
77
|
};
|
|
41
|
-
return /*#__PURE__*/React.createElement(
|
|
42
|
-
style:
|
|
78
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
style: styles.flipWrapper
|
|
80
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
style: styles.flipInfoWrapper
|
|
82
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
83
|
+
style: styles.flipTitle
|
|
84
|
+
}, configs.label), configs.description && /*#__PURE__*/React.createElement("span", {
|
|
85
|
+
style: styles.flipDescription
|
|
86
|
+
}, configs.description)), /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
style: _objectSpread(_objectSpread({}, styles.flipToggle), {}, {
|
|
43
88
|
color: 'black'
|
|
44
|
-
},
|
|
89
|
+
}),
|
|
45
90
|
onClick: function onClick(e) {
|
|
46
91
|
return update(!value);
|
|
47
92
|
}
|
|
@@ -51,14 +96,14 @@ export default function PropertyCheckbox(_ref) {
|
|
|
51
96
|
width: '55px',
|
|
52
97
|
height: '30px'
|
|
53
98
|
}
|
|
54
|
-
}), /*#__PURE__*/React.createElement(
|
|
55
|
-
style: _objectSpread({}, activeStyle)
|
|
99
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
style: _objectSpread(_objectSpread({}, styles.flipToggleIcon), activeStyle)
|
|
56
101
|
}, /*#__PURE__*/React.createElement("img", {
|
|
57
102
|
src: "/assets/img/svg/bottombar/".concat(value != 0 ? '2d3d_button_active.svg' : '2d3d_button.svg'),
|
|
58
|
-
style: {
|
|
103
|
+
style: _objectSpread({
|
|
59
104
|
width: '30px',
|
|
60
105
|
height: '30px'
|
|
61
|
-
}
|
|
106
|
+
}, styles.flipToggleIconImg)
|
|
62
107
|
}))));
|
|
63
108
|
}
|
|
64
109
|
PropertyCheckbox.propTypes = {
|
|
@@ -1,20 +1,45 @@
|
|
|
1
|
-
var _templateObject, _templateObject2;
|
|
2
1
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
7
|
import React from 'react';
|
|
10
8
|
import PropTypes from 'prop-types';
|
|
11
9
|
import { Seq } from 'immutable';
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
import { FormSelect } from "../../components/style/export";
|
|
11
|
+
import { DEFAULT_FONT_FAMILY, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
12
|
+
var styles = {
|
|
13
|
+
enumWrapper: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
marginTop: 3
|
|
17
|
+
},
|
|
18
|
+
enumTitle: function enumTitle(fontSize) {
|
|
19
|
+
return {
|
|
20
|
+
marginRight: 'auto',
|
|
21
|
+
width: 110,
|
|
22
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
23
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
24
|
+
fontSize: fontSize,
|
|
25
|
+
fontWeight: 400,
|
|
26
|
+
lineHeight: '15px',
|
|
27
|
+
textAlign: 'left'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Responsive font size logic
|
|
33
|
+
function getFontSize() {
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
|
+
var w = window.innerWidth;
|
|
36
|
+
if (w <= 1024) return 11;
|
|
37
|
+
if (w <= 1366) return 13;
|
|
38
|
+
if (w <= 1440) return 16;
|
|
39
|
+
return 16;
|
|
40
|
+
}
|
|
41
|
+
return 13;
|
|
42
|
+
}
|
|
18
43
|
export default function PropertyEnum(_ref) {
|
|
19
44
|
var value = _ref.value,
|
|
20
45
|
onUpdate = _ref.onUpdate,
|
|
@@ -30,7 +55,24 @@ export default function PropertyEnum(_ref) {
|
|
|
30
55
|
}
|
|
31
56
|
return onUpdate(val);
|
|
32
57
|
};
|
|
33
|
-
|
|
58
|
+
var _React$useState = React.useState(getFontSize()),
|
|
59
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
60
|
+
fontSize = _React$useState2[0],
|
|
61
|
+
setFontSize = _React$useState2[1];
|
|
62
|
+
React.useEffect(function () {
|
|
63
|
+
function handleResize() {
|
|
64
|
+
setFontSize(getFontSize());
|
|
65
|
+
}
|
|
66
|
+
window.addEventListener('resize', handleResize);
|
|
67
|
+
return function () {
|
|
68
|
+
return window.removeEventListener('resize', handleResize);
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
style: styles.enumWrapper
|
|
73
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
74
|
+
style: styles.enumTitle(fontSize)
|
|
75
|
+
}, configs.label), /*#__PURE__*/React.createElement(FormSelect, {
|
|
34
76
|
value: value,
|
|
35
77
|
onChange: function onChange(event) {
|
|
36
78
|
return update(event.target.value);
|
|
@@ -4,8 +4,8 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS,
|
|
8
|
-
import convert from
|
|
7
|
+
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS, UNIT_INCH, UNITS_LENGTH } from "./../../constants";
|
|
8
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
9
9
|
import { FormLabel, FormNumberInput, FormSelect } from "../../components/style/export";
|
|
10
10
|
import { Map } from 'immutable';
|
|
11
11
|
import { toFixedFloat } from "../../utils/math";
|