kitchen-simulator 1.1.1-test.30 → 1.1.1-test.32
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 +28 -27
- package/es/KitchenConfiguratorApp.js +33 -35
- package/es/catalog/catalog.js +2 -2
- package/es/catalog/molding/molding-dcm/planner-element.js +2 -0
- package/es/catalog/molding/molding-fbm/planner-element.js +2 -0
- package/es/catalog/molding/molding-lrm/planner-element.js +2 -0
- package/es/catalog/properties/property-checkbox.js +72 -26
- package/es/catalog/properties/property-color.js +10 -12
- package/es/catalog/properties/property-enum.js +58 -16
- package/es/catalog/properties/property-hidden.js +10 -11
- package/es/catalog/properties/property-lenght-measure.js +15 -16
- package/es/catalog/properties/property-length-measure.js +69 -21
- package/es/catalog/properties/property-length-measure_hole.js +15 -16
- package/es/catalog/properties/property-number.js +10 -11
- package/es/catalog/properties/property-read-only.js +9 -10
- package/es/catalog/properties/property-string.js +9 -10
- package/es/catalog/properties/property-toggle.js +10 -11
- package/es/components/content.js +11 -11
- package/es/components/disclaimer/disclaimer.js +86 -66
- package/es/components/style/button.js +7 -8
- package/es/components/style/content-container.js +1 -2
- package/es/components/style/content-title.js +1 -1
- package/es/components/style/form-number-input.js +50 -25
- package/es/components/style/form-number-input_2.js +17 -16
- package/es/components/style/form-select.js +55 -6
- package/es/components/style/form-text-input.js +30 -10
- package/es/components/viewer2d/area.js +6 -7
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +7 -7
- package/es/components/viewer2d/grids/grid-streak.js +7 -7
- package/es/components/viewer2d/grids/grid-vertical-streak.js +7 -7
- package/es/components/viewer2d/grids/grids.js +4 -6
- package/es/components/viewer2d/group.js +10 -12
- package/es/components/viewer2d/item.js +14 -14
- package/es/components/viewer2d/layer.js +7 -8
- package/es/components/viewer2d/line.js +7 -8
- package/es/components/viewer2d/ruler.js +8 -8
- package/es/components/viewer2d/rulerDist.js +6 -7
- package/es/components/viewer2d/rulerX.js +17 -17
- package/es/components/viewer2d/rulerY.js +15 -15
- package/es/components/viewer2d/scene.js +12 -10
- package/es/components/viewer2d/snap.js +6 -7
- package/es/components/viewer2d/state.js +6 -7
- package/es/components/viewer2d/utils.js +1 -1
- package/es/components/viewer2d/vertex.js +5 -6
- package/es/components/viewer2d/viewer2d.js +16 -18
- package/es/components/viewer3d/front3D.js +1 -1
- package/es/components/viewer3d/grids/grid-streak.js +1 -0
- package/es/components/viewer3d/ruler-utils/layer3D.js +1 -1
- package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -1
- package/es/components/viewer3d/ruler-utils/scene3D.js +1 -0
- package/es/components/viewer3d/viewer3d-first-person.js +16 -15
- package/es/components/viewer3d/viewer3d.js +18 -17
- package/es/utils/geometry.js +3 -3
- package/es/utils/react-if.js +5 -6
- package/es/utils/snap-scene.js +2 -2
- package/es/utils/snap.js +1 -1
- package/lib/KitchenConfigurator.js +29 -27
- package/lib/KitchenConfiguratorApp.js +34 -35
- package/lib/catalog/molding/molding-dcm/planner-element.js +5 -0
- package/lib/catalog/molding/molding-fbm/planner-element.js +5 -0
- package/lib/catalog/molding/molding-lrm/planner-element.js +5 -0
- package/lib/catalog/properties/property-checkbox.js +74 -26
- package/lib/catalog/properties/property-color.js +11 -11
- package/lib/catalog/properties/property-enum.js +60 -15
- package/lib/catalog/properties/property-hidden.js +13 -11
- package/lib/catalog/properties/property-lenght-measure.js +17 -15
- package/lib/catalog/properties/property-length-measure.js +71 -20
- package/lib/catalog/properties/property-length-measure_hole.js +17 -15
- package/lib/catalog/properties/property-number.js +12 -12
- package/lib/catalog/properties/property-read-only.js +11 -11
- package/lib/catalog/properties/property-string.js +11 -11
- package/lib/catalog/properties/property-toggle.js +11 -11
- package/lib/components/content.js +11 -12
- package/lib/components/disclaimer/disclaimer.js +86 -66
- package/lib/components/style/button.js +8 -8
- package/lib/components/style/content-container.js +2 -2
- package/lib/components/style/content-title.js +2 -1
- package/lib/components/style/form-number-input.js +50 -25
- package/lib/components/style/form-number-input_2.js +18 -16
- package/lib/components/style/form-select.js +55 -6
- package/lib/components/style/form-text-input.js +30 -11
- package/lib/components/viewer2d/area.js +8 -8
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +9 -8
- package/lib/components/viewer2d/grids/grid-streak.js +9 -8
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +9 -8
- package/lib/components/viewer2d/grids/grids.js +5 -5
- package/lib/components/viewer2d/group.js +10 -13
- package/lib/components/viewer2d/item.js +12 -12
- package/lib/components/viewer2d/layer.js +8 -8
- package/lib/components/viewer2d/line.js +7 -9
- package/lib/components/viewer2d/ruler.js +9 -8
- package/lib/components/viewer2d/rulerDist.js +8 -8
- package/lib/components/viewer2d/rulerX.js +18 -17
- package/lib/components/viewer2d/rulerY.js +16 -15
- package/lib/components/viewer2d/scene.js +12 -9
- package/lib/components/viewer2d/snap.js +6 -8
- package/lib/components/viewer2d/state.js +7 -7
- package/lib/components/viewer2d/vertex.js +5 -7
- package/lib/components/viewer2d/viewer2d.js +17 -18
- package/lib/components/viewer3d/grids/grid-streak.js +1 -0
- package/lib/components/viewer3d/ruler-utils/scene3D.js +1 -0
- package/lib/components/viewer3d/viewer3d-first-person.js +16 -14
- package/lib/components/viewer3d/viewer3d.js +18 -16
- package/lib/utils/geometry.js +1 -1
- package/lib/utils/react-if.js +7 -7
- package/package.json +5 -24
|
@@ -3,10 +3,11 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
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
|
-
|
|
7
|
-
import {
|
|
6
|
+
import * as PropTypes from 'prop-types';
|
|
7
|
+
import { UNITS_LENGTH, UNIT_INCH, UNIT_CENTIMETER, BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
8
8
|
import convert from 'convert-units';
|
|
9
9
|
import { FormLabel, FormNumberInput1, FormSelect } from "../../components/style/export";
|
|
10
|
+
import { Map } from 'immutable';
|
|
10
11
|
import { toFixedFloat } from "../../utils/math";
|
|
11
12
|
import PropertyStyle from "./shared-property-style";
|
|
12
13
|
var internalTableStyle = {
|
|
@@ -86,17 +87,15 @@ export default function PropertyLengthMeasureHole(_ref, _ref2) {
|
|
|
86
87
|
}, el);
|
|
87
88
|
}))))))))));
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
// catalog: PropTypes.object.isRequired
|
|
102
|
-
// };
|
|
90
|
+
PropertyLengthMeasureHole.propTypes = {
|
|
91
|
+
value: PropTypes.instanceOf(Map).isRequired,
|
|
92
|
+
onUpdate: PropTypes.func.isRequired,
|
|
93
|
+
onValid: PropTypes.func,
|
|
94
|
+
configs: PropTypes.object.isRequired,
|
|
95
|
+
sourceElement: PropTypes.object,
|
|
96
|
+
internalState: PropTypes.object,
|
|
97
|
+
state: PropTypes.object.isRequired
|
|
98
|
+
};
|
|
99
|
+
PropertyLengthMeasureHole.contextTypes = {
|
|
100
|
+
catalog: PropTypes.object.isRequired
|
|
101
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel, FormNumberInput } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyNumber(_ref) {
|
|
@@ -37,13 +37,12 @@ export default function PropertyNumber(_ref) {
|
|
|
37
37
|
max: configs.max
|
|
38
38
|
})))));
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// };
|
|
40
|
+
PropertyNumber.propTypes = {
|
|
41
|
+
value: PropTypes.any.isRequired,
|
|
42
|
+
onUpdate: PropTypes.func.isRequired,
|
|
43
|
+
onValid: PropTypes.func,
|
|
44
|
+
configs: PropTypes.object.isRequired,
|
|
45
|
+
sourceElement: PropTypes.object,
|
|
46
|
+
internalState: PropTypes.object,
|
|
47
|
+
state: PropTypes.object.isRequired
|
|
48
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyReadOnly(_ref) {
|
|
@@ -16,12 +16,11 @@ export default function PropertyReadOnly(_ref) {
|
|
|
16
16
|
style: PropertyStyle.firstTdStyle
|
|
17
17
|
}, /*#__PURE__*/React.createElement(FormLabel, null, configs.label)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, value)))));
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// };
|
|
19
|
+
PropertyReadOnly.propTypes = {
|
|
20
|
+
value: PropTypes.any.isRequired,
|
|
21
|
+
onUpdate: PropTypes.func.isRequired,
|
|
22
|
+
configs: PropTypes.object.isRequired,
|
|
23
|
+
sourceElement: PropTypes.object,
|
|
24
|
+
internalState: PropTypes.object,
|
|
25
|
+
state: PropTypes.object.isRequired
|
|
26
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel, FormTextInput } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
var tableStyle = {
|
|
@@ -38,12 +38,11 @@ export default function PropertyString(_ref) {
|
|
|
38
38
|
}
|
|
39
39
|
})))));
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// };
|
|
41
|
+
PropertyString.propTypes = {
|
|
42
|
+
value: PropTypes.any.isRequired,
|
|
43
|
+
onUpdate: PropTypes.func.isRequired,
|
|
44
|
+
configs: PropTypes.object.isRequired,
|
|
45
|
+
sourceElement: PropTypes.object,
|
|
46
|
+
internalState: PropTypes.object,
|
|
47
|
+
state: PropTypes.object.isRequired
|
|
48
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
2
|
+
import * as PropTypes from 'prop-types';
|
|
3
|
+
import { FormLabel, Button } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyToggle(_ref) {
|
|
6
6
|
var value = _ref.value,
|
|
@@ -29,12 +29,11 @@ export default function PropertyToggle(_ref) {
|
|
|
29
29
|
size: "small"
|
|
30
30
|
}, configs.actionName)))));
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// };
|
|
32
|
+
PropertyToggle.propTypes = {
|
|
33
|
+
value: PropTypes.any.isRequired,
|
|
34
|
+
onUpdate: PropTypes.func.isRequired,
|
|
35
|
+
configs: PropTypes.object.isRequired,
|
|
36
|
+
sourceElement: PropTypes.object,
|
|
37
|
+
internalState: PropTypes.object,
|
|
38
|
+
state: PropTypes.object.isRequired
|
|
39
|
+
};
|
package/es/components/content.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import * as PropTypes from 'prop-types';
|
|
3
3
|
import Viewer2D from "./viewer2d/viewer2d";
|
|
4
4
|
import Viewer3D from "./viewer3d/viewer3d";
|
|
5
5
|
import Viewer3DFirstPerson from "./viewer3d/viewer3d-first-person";
|
|
@@ -17,6 +17,7 @@ export default function Content(_ref, _ref2) {
|
|
|
17
17
|
catalog = _ref.catalog;
|
|
18
18
|
var projectActions = _ref2.projectActions;
|
|
19
19
|
var mode = state.get('mode');
|
|
20
|
+
console.log('mode =>', mode);
|
|
20
21
|
switch (mode) {
|
|
21
22
|
// this mode is when view elevation
|
|
22
23
|
case constants.MODE_ELEVATION_VIEW:
|
|
@@ -95,13 +96,12 @@ export default function Content(_ref, _ref2) {
|
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// };
|
|
99
|
+
Content.propTypes = {
|
|
100
|
+
state: PropTypes.object.isRequired,
|
|
101
|
+
width: PropTypes.number.isRequired,
|
|
102
|
+
height: PropTypes.number.isRequired,
|
|
103
|
+
replaceCabinet: PropTypes.func.isRequired
|
|
104
|
+
};
|
|
105
|
+
Content.contextTypes = {
|
|
106
|
+
projectActions: PropTypes.object.isRequired
|
|
107
|
+
};
|
|
@@ -1,62 +1,80 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
2
|
+
import { Typography, Button, makeStyles } from '@material-ui/core';
|
|
3
|
+
var useStyles = makeStyles(function (theme) {
|
|
4
|
+
return {
|
|
5
|
+
root: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
justifyContent: 'center',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
backgroundColor: '#D1C4E9',
|
|
10
|
+
background: 'url("/assets/img/svg/disclaimer/background.svg") no-repeat center',
|
|
11
|
+
backgroundSize: 'cover',
|
|
12
|
+
padding: theme.spacing(2),
|
|
13
|
+
height: '100dvh',
|
|
14
|
+
width: '100dvw'
|
|
15
|
+
},
|
|
16
|
+
card: {
|
|
17
|
+
'@media (orientation: landscape)': {
|
|
18
|
+
padding: '0.75rem',
|
|
19
|
+
gap: '0.5rem'
|
|
20
|
+
},
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
backgroundColor: '#fff',
|
|
25
|
+
borderRadius: 24,
|
|
26
|
+
width: '85vw',
|
|
27
|
+
textAlign: 'center',
|
|
28
|
+
boxShadow: '0 8px 20px rgba(0,0,0,0.08)',
|
|
29
|
+
height: 'fit-content',
|
|
30
|
+
opacity: '90%',
|
|
31
|
+
gap: '1rem',
|
|
32
|
+
padding: '1.5rem',
|
|
33
|
+
maxWidth: '364px'
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
fontWeight: 'bold',
|
|
37
|
+
fontSize: '1.5rem',
|
|
38
|
+
lineHeight: '133%',
|
|
39
|
+
letterSpacing: '0px',
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
verticalAlign: 'middle',
|
|
42
|
+
maxWidth: '200px'
|
|
43
|
+
},
|
|
44
|
+
body: {
|
|
45
|
+
fontWeight: 400,
|
|
46
|
+
fontStyle: 'normal',
|
|
47
|
+
fontSize: '0.875rem',
|
|
48
|
+
lineHeight: '143%',
|
|
49
|
+
letterSpacing: '0.17px',
|
|
50
|
+
color: '#49454F',
|
|
51
|
+
maxWidth: '90%'
|
|
52
|
+
},
|
|
53
|
+
button: {
|
|
54
|
+
'@media (orientation: landscape)': {
|
|
55
|
+
padding: '12px 36px'
|
|
56
|
+
},
|
|
57
|
+
marginTop: '0.5rem',
|
|
58
|
+
backgroundColor: '#6750A4',
|
|
59
|
+
color: '#fff',
|
|
60
|
+
borderRadius: 100,
|
|
61
|
+
padding: '16px 72px',
|
|
62
|
+
textTransform: 'none',
|
|
63
|
+
fontWeight: 500,
|
|
64
|
+
fontSize: '1rem',
|
|
65
|
+
'&:hover': {
|
|
66
|
+
backgroundColor: '#7c3aed'
|
|
67
|
+
},
|
|
68
|
+
'&:active': {
|
|
69
|
+
backgroundColor: '#5a25c2'
|
|
70
|
+
},
|
|
71
|
+
'&:disabled': {
|
|
72
|
+
backgroundColor: '#F3E5F5',
|
|
73
|
+
color: '#1D1B20'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
});
|
|
60
78
|
export default function DisclaimerScreen(_ref) {
|
|
61
79
|
var _ref$open = _ref.open,
|
|
62
80
|
open = _ref$open === void 0 ? true : _ref$open,
|
|
@@ -67,6 +85,7 @@ export default function DisclaimerScreen(_ref) {
|
|
|
67
85
|
message = _ref$message === void 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "We\u2019re adding the finishing touches to the mobile version.", /*#__PURE__*/React.createElement("br", null), "In the meantime, try our desktop version to start designing your dream room.") : _ref$message,
|
|
68
86
|
_ref$buttonText = _ref.buttonText,
|
|
69
87
|
buttonText = _ref$buttonText === void 0 ? 'Close' : _ref$buttonText;
|
|
88
|
+
var classes = useStyles();
|
|
70
89
|
useEffect(function () {
|
|
71
90
|
var viewportMeta = document.querySelector('meta[name="viewport"]');
|
|
72
91
|
if (!viewportMeta) {
|
|
@@ -78,20 +97,21 @@ export default function DisclaimerScreen(_ref) {
|
|
|
78
97
|
}, []);
|
|
79
98
|
if (!open) return null;
|
|
80
99
|
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
|
|
100
|
+
className: classes.root
|
|
82
101
|
}, /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
|
|
102
|
+
className: classes.card
|
|
84
103
|
}, /*#__PURE__*/React.createElement("img", {
|
|
85
104
|
width: 40,
|
|
86
105
|
height: 40,
|
|
87
106
|
alt: "loog",
|
|
88
107
|
src: '/assets/img/svg/disclaimer/logo-dots.svg'
|
|
89
|
-
}), /*#__PURE__*/React.createElement(
|
|
90
|
-
|
|
91
|
-
}, titleTop), /*#__PURE__*/React.createElement(
|
|
92
|
-
|
|
93
|
-
}, message), /*#__PURE__*/React.createElement(
|
|
94
|
-
|
|
108
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
109
|
+
className: classes.title
|
|
110
|
+
}, titleTop), /*#__PURE__*/React.createElement(Typography, {
|
|
111
|
+
className: classes.body
|
|
112
|
+
}, message), /*#__PURE__*/React.createElement(Button, {
|
|
113
|
+
variant: "contained",
|
|
114
|
+
className: classes.button,
|
|
95
115
|
onClick: onClose
|
|
96
116
|
}, buttonText)));
|
|
97
117
|
}
|
|
@@ -16,7 +16,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
16
16
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
17
17
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
18
18
|
import React, { Component } from 'react';
|
|
19
|
-
|
|
19
|
+
import * as PropTypes from 'prop-types';
|
|
20
20
|
import * as SharedStyle from "../../shared-style";
|
|
21
21
|
var BASE_STYLE = {
|
|
22
22
|
display: 'inline-block',
|
|
@@ -105,10 +105,9 @@ Button.defaultProps = {
|
|
|
105
105
|
borderColor: '#8c8c8c'
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// };
|
|
108
|
+
Button.propTypes = {
|
|
109
|
+
type: PropTypes.string,
|
|
110
|
+
style: PropTypes.object,
|
|
111
|
+
styleHover: PropTypes.object,
|
|
112
|
+
size: PropTypes.oneOf(['large', 'normal', 'small'])
|
|
113
|
+
};
|
|
@@ -5,8 +5,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
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); }
|
|
7
7
|
import React from 'react';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import * as PropTypes from 'prop-types';
|
|
10
9
|
var STYLE = {
|
|
11
10
|
padding: '0 20px',
|
|
12
11
|
overflowY: 'auto'
|
|
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
9
|
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; }
|
|
10
10
|
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; }
|
|
11
11
|
import React from 'react';
|
|
12
|
-
|
|
12
|
+
import * as PropTypes from 'prop-types';
|
|
13
13
|
import * as SharedStyle from "../../shared-style";
|
|
14
14
|
var STYLE = {
|
|
15
15
|
color: SharedStyle.PRIMARY_COLOR.alt,
|
|
@@ -1,5 +1,7 @@
|
|
|
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
|
|
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; }
|
|
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; }
|
|
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; }
|
|
3
5
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
4
6
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
5
7
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -12,13 +14,32 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
12
14
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
13
15
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
14
16
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
17
|
import React, { Component } from 'react';
|
|
17
|
-
|
|
18
|
+
import * as PropTypes from 'prop-types';
|
|
18
19
|
import { DEFAULT_FONT_FAMILY, KEYBOARD_BUTTON_CODE, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
19
|
-
import styled from 'styled-components';
|
|
20
20
|
import { isValidNumber } from "../../utils/helper";
|
|
21
|
-
var
|
|
21
|
+
var styles = {
|
|
22
|
+
input: {
|
|
23
|
+
display: 'block',
|
|
24
|
+
padding: '15px 25px 12px 0px',
|
|
25
|
+
width: 120,
|
|
26
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
27
|
+
backgroundColor: 'rgb(255, 255, 255)',
|
|
28
|
+
border: '2px solid',
|
|
29
|
+
textAlign: 'right',
|
|
30
|
+
"float": 'right',
|
|
31
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
32
|
+
fontSize: 16,
|
|
33
|
+
fontWeight: 600,
|
|
34
|
+
lineHeight: '17px',
|
|
35
|
+
borderRadius: 5,
|
|
36
|
+
outline: 0,
|
|
37
|
+
transition: 'border-color 0.2s'
|
|
38
|
+
},
|
|
39
|
+
inputFocus: {
|
|
40
|
+
borderColor: SECONDARY_PURPLE_COLOR
|
|
41
|
+
}
|
|
42
|
+
};
|
|
22
43
|
var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
23
44
|
function FormNumberInput(props, context) {
|
|
24
45
|
var _this;
|
|
@@ -110,13 +131,16 @@ var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
|
110
131
|
});
|
|
111
132
|
}
|
|
112
133
|
};
|
|
113
|
-
|
|
134
|
+
|
|
135
|
+
// Merge base style, focus style, and custom style
|
|
136
|
+
var inputStyle = _objectSpread(_objectSpread(_objectSpread({}, styles.input), this.state.focusOn ? styles.inputFocus : {}), style);
|
|
137
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
114
138
|
id: "form_number_input",
|
|
115
139
|
autoFocus: this.state.focusOn,
|
|
116
140
|
readOnly: !!this.props.disabled,
|
|
117
141
|
type: "text",
|
|
118
142
|
value: currValue,
|
|
119
|
-
style:
|
|
143
|
+
style: inputStyle,
|
|
120
144
|
onChange: function onChange(evt) {
|
|
121
145
|
_this2.context.projectActions.copyProperties('ddddd');
|
|
122
146
|
var valid = regexp.test(evt.nativeEvent.target.value);
|
|
@@ -158,25 +182,26 @@ var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
|
158
182
|
});
|
|
159
183
|
}
|
|
160
184
|
}]);
|
|
161
|
-
}(Component);
|
|
162
|
-
// value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
163
|
-
// style: PropTypes.object,
|
|
164
|
-
// onChange: PropTypes.func.isRequired,
|
|
165
|
-
// onValid: PropTypes.func,
|
|
166
|
-
// onInvalid: PropTypes.func,
|
|
167
|
-
// min: PropTypes.number,
|
|
168
|
-
// max: PropTypes.number,
|
|
169
|
-
// precision: PropTypes.number,
|
|
170
|
-
// placeholder: PropTypes.string,
|
|
171
|
-
// labelName: PropTypes.string,
|
|
172
|
-
// isCeiling: PropTypes.string
|
|
173
|
-
// };
|
|
174
|
-
// FormNumberInput.contextTypes = {
|
|
175
|
-
// translator: PropTypes.object.isRequired,
|
|
176
|
-
// projectActions: PropTypes.object.isRequired,
|
|
177
|
-
// linesActions: PropTypes.object.isRequired
|
|
178
|
-
// };
|
|
185
|
+
}(Component);
|
|
179
186
|
export { FormNumberInput as default };
|
|
187
|
+
FormNumberInput.propTypes = {
|
|
188
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
189
|
+
style: PropTypes.object,
|
|
190
|
+
onChange: PropTypes.func.isRequired,
|
|
191
|
+
onValid: PropTypes.func,
|
|
192
|
+
onInvalid: PropTypes.func,
|
|
193
|
+
min: PropTypes.number,
|
|
194
|
+
max: PropTypes.number,
|
|
195
|
+
precision: PropTypes.number,
|
|
196
|
+
placeholder: PropTypes.string,
|
|
197
|
+
labelName: PropTypes.string,
|
|
198
|
+
isCeiling: PropTypes.string
|
|
199
|
+
};
|
|
200
|
+
FormNumberInput.contextTypes = {
|
|
201
|
+
translator: PropTypes.object.isRequired,
|
|
202
|
+
projectActions: PropTypes.object.isRequired,
|
|
203
|
+
linesActions: PropTypes.object.isRequired
|
|
204
|
+
};
|
|
180
205
|
FormNumberInput.defaultProps = {
|
|
181
206
|
value: 0,
|
|
182
207
|
style: {},
|
|
@@ -15,7 +15,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
15
15
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
16
16
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
17
17
|
import React, { Component } from 'react';
|
|
18
|
-
|
|
18
|
+
import * as PropTypes from 'prop-types';
|
|
19
19
|
import * as SharedStyle from "../../shared-style";
|
|
20
20
|
import { MdUpdate } from 'react-icons/md';
|
|
21
21
|
import { KEYBOARD_BUTTON_CODE } from "../../constants";
|
|
@@ -179,22 +179,23 @@ var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
|
179
179
|
})));
|
|
180
180
|
}
|
|
181
181
|
}]);
|
|
182
|
-
}(Component);
|
|
183
|
-
// value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
184
|
-
// style: PropTypes.object,
|
|
185
|
-
// onChange: PropTypes.func.isRequired,
|
|
186
|
-
// onValid: PropTypes.func,
|
|
187
|
-
// onInvalid: PropTypes.func,
|
|
188
|
-
// min: PropTypes.number,
|
|
189
|
-
// max: PropTypes.number,
|
|
190
|
-
// precision: PropTypes.number,
|
|
191
|
-
// placeholder: PropTypes.string
|
|
192
|
-
// };
|
|
193
|
-
// FormNumberInput.contextTypes = {
|
|
194
|
-
// translator: PropTypes.object.isRequired,
|
|
195
|
-
// projectActions: PropTypes.object.isRequired
|
|
196
|
-
// };
|
|
182
|
+
}(Component);
|
|
197
183
|
export { FormNumberInput as default };
|
|
184
|
+
FormNumberInput.propTypes = {
|
|
185
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
186
|
+
style: PropTypes.object,
|
|
187
|
+
onChange: PropTypes.func.isRequired,
|
|
188
|
+
onValid: PropTypes.func,
|
|
189
|
+
onInvalid: PropTypes.func,
|
|
190
|
+
min: PropTypes.number,
|
|
191
|
+
max: PropTypes.number,
|
|
192
|
+
precision: PropTypes.number,
|
|
193
|
+
placeholder: PropTypes.string
|
|
194
|
+
};
|
|
195
|
+
FormNumberInput.contextTypes = {
|
|
196
|
+
translator: PropTypes.object.isRequired,
|
|
197
|
+
projectActions: PropTypes.object.isRequired
|
|
198
|
+
};
|
|
198
199
|
FormNumberInput.defaultProps = {
|
|
199
200
|
value: 0,
|
|
200
201
|
style: {},
|