@babylonjs/shared-ui-components 5.28.0 → 5.29.0
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/colorPicker/colorComponentEntry.d.ts +18 -18
- package/colorPicker/colorComponentEntry.js +36 -36
- package/colorPicker/colorPicker.d.ts +43 -43
- package/colorPicker/colorPicker.js +136 -136
- package/colorPicker/hexColor.d.ts +20 -20
- package/colorPicker/hexColor.js +42 -42
- package/components/Button.d.ts +10 -10
- package/components/Button.js +6 -6
- package/components/Icon.d.ts +6 -6
- package/components/Icon.js +6 -6
- package/components/Label.d.ts +7 -7
- package/components/Label.js +6 -6
- package/components/MessageDialog.d.ts +7 -7
- package/components/MessageDialog.js +22 -22
- package/components/Toggle.d.ts +8 -8
- package/components/Toggle.js +15 -15
- package/components/bars/CommandBarComponent.d.ts +16 -16
- package/components/bars/CommandBarComponent.js +68 -68
- package/components/bars/CommandButtonComponent.d.ts +11 -11
- package/components/bars/CommandButtonComponent.js +6 -6
- package/components/bars/CommandDropdownComponent.d.ts +26 -26
- package/components/bars/CommandDropdownComponent.js +48 -48
- package/components/classNames.d.ts +2 -2
- package/components/classNames.js +18 -18
- package/components/colorPicker/ColorComponentEntry.d.ts +18 -18
- package/components/colorPicker/ColorComponentEntry.js +37 -37
- package/components/colorPicker/ColorPicker.d.ts +43 -43
- package/components/colorPicker/ColorPicker.js +137 -137
- package/components/colorPicker/HexColor.d.ts +20 -20
- package/components/colorPicker/HexColor.js +45 -45
- package/components/layout/DraggableIcon.d.ts +23 -0
- package/components/layout/DraggableIcon.js +18 -0
- package/components/layout/DraggableIcon.js.map +1 -0
- package/components/layout/FlexibleColumn.d.ts +17 -0
- package/components/layout/FlexibleColumn.js +12 -0
- package/components/layout/FlexibleColumn.js.map +1 -0
- package/components/layout/FlexibleDragHandler.d.ts +18 -0
- package/components/layout/FlexibleDragHandler.js +88 -0
- package/components/layout/FlexibleDragHandler.js.map +1 -0
- package/components/layout/FlexibleDropZone.d.ts +19 -0
- package/components/layout/FlexibleDropZone.js +12 -0
- package/components/layout/FlexibleDropZone.js.map +1 -0
- package/components/layout/FlexibleGridContainer.d.ts +10 -0
- package/components/layout/FlexibleGridContainer.js +23 -0
- package/components/layout/FlexibleGridContainer.js.map +1 -0
- package/components/layout/FlexibleGridLayout.d.ts +16 -0
- package/components/layout/FlexibleGridLayout.js +24 -0
- package/components/layout/FlexibleGridLayout.js.map +1 -0
- package/components/layout/FlexibleResizeBar.d.ts +40 -0
- package/components/layout/FlexibleResizeBar.js +21 -0
- package/components/layout/FlexibleResizeBar.js.map +1 -0
- package/components/layout/FlexibleTab.d.ts +34 -0
- package/components/layout/FlexibleTab.js +36 -0
- package/components/layout/FlexibleTab.js.map +1 -0
- package/components/layout/FlexibleTabsContainer.d.ts +28 -0
- package/components/layout/FlexibleTabsContainer.js +54 -0
- package/components/layout/FlexibleTabsContainer.js.map +1 -0
- package/components/layout/LayoutContext.d.ts +12 -0
- package/components/layout/LayoutContext.js +3 -0
- package/components/layout/LayoutContext.js.map +1 -0
- package/components/layout/types.d.ts +78 -0
- package/components/layout/types.js +13 -0
- package/components/layout/types.js.map +1 -0
- package/components/layout/utils.d.ts +25 -0
- package/components/layout/utils.js +68 -0
- package/components/layout/utils.js.map +1 -0
- package/components/lines/ColorLineComponent.d.ts +40 -40
- package/components/lines/ColorLineComponent.js +145 -145
- package/components/lines/ColorPickerLineComponent.d.ts +33 -33
- package/components/lines/ColorPickerLineComponent.js +61 -61
- package/components/lines/FileButtonLineComponent.d.ts +16 -16
- package/components/lines/FileButtonLineComponent.js +21 -21
- package/components/lines/NumericInputComponent.d.ts +31 -31
- package/components/lines/NumericInputComponent.js +86 -86
- package/lines/booleanLineComponent.d.ts +11 -11
- package/lines/booleanLineComponent.js +14 -14
- package/lines/buttonLineComponent.d.ts +12 -12
- package/lines/buttonLineComponent.js +10 -10
- package/lines/checkBoxLineComponent.d.ts +36 -36
- package/lines/checkBoxLineComponent.js +88 -88
- package/lines/color3LineComponent.d.ts +18 -18
- package/lines/color3LineComponent.js +9 -9
- package/lines/color4LineComponent.d.ts +18 -18
- package/lines/color4LineComponent.js +9 -9
- package/lines/colorLineComponent.d.ts +40 -40
- package/lines/colorLineComponent.js +144 -144
- package/lines/colorPickerComponent.d.ts +31 -31
- package/lines/colorPickerComponent.js +60 -60
- package/lines/draggableLineComponent.d.ts +9 -9
- package/lines/draggableLineComponent.js +12 -12
- package/lines/fileButtonLineComponent.d.ts +17 -17
- package/lines/fileButtonLineComponent.js +20 -20
- package/lines/fileMultipleButtonLineComponent.d.ts +17 -17
- package/lines/fileMultipleButtonLineComponent.js +20 -20
- package/lines/floatLineComponent.d.ts +50 -50
- package/lines/floatLineComponent.js +175 -175
- package/lines/hexLineComponent.d.ts +40 -40
- package/lines/hexLineComponent.js +121 -121
- package/lines/iSelectedLineContainer.d.ts +4 -4
- package/lines/iSelectedLineContainer.js +1 -1
- package/lines/iconButtonLineComponent.d.ts +11 -11
- package/lines/iconButtonLineComponent.js +10 -10
- package/lines/iconComponent.d.ts +9 -9
- package/lines/iconComponent.js +7 -7
- package/lines/indentedTextLineComponent.d.ts +16 -16
- package/lines/indentedTextLineComponent.js +26 -26
- package/lines/inputArrowsComponent.d.ts +13 -13
- package/lines/inputArrowsComponent.js +37 -37
- package/lines/lineContainerComponent.d.ts +19 -19
- package/lines/lineContainerComponent.js +49 -49
- package/lines/linkButtonComponent.d.ts +16 -16
- package/lines/linkButtonComponent.js +20 -20
- package/lines/matrixLineComponent.d.ts +36 -36
- package/lines/matrixLineComponent.js +102 -102
- package/lines/messageLineComponent.d.ts +12 -12
- package/lines/messageLineComponent.js +14 -14
- package/lines/numericInputComponent.d.ts +31 -31
- package/lines/numericInputComponent.js +85 -85
- package/lines/optionsLineComponent.d.ts +48 -48
- package/lines/optionsLineComponent.js +118 -118
- package/lines/popup.d.ts +4 -4
- package/lines/popup.js +67 -67
- package/lines/radioLineComponent.d.ts +21 -21
- package/lines/radioLineComponent.js +26 -26
- package/lines/sliderLineComponent.d.ts +37 -37
- package/lines/sliderLineComponent.js +89 -89
- package/lines/targetsProxy.d.ts +11 -11
- package/lines/targetsProxy.js +42 -42
- package/lines/textInputLineComponent.d.ts +47 -47
- package/lines/textInputLineComponent.js +154 -154
- package/lines/textLineComponent.d.ts +21 -21
- package/lines/textLineComponent.js +30 -30
- package/lines/unitButton.d.ts +8 -8
- package/lines/unitButton.js +7 -7
- package/lines/valueLineComponent.d.ts +15 -15
- package/lines/valueLineComponent.js +12 -12
- package/lines/vector2LineComponent.d.ts +36 -36
- package/lines/vector2LineComponent.js +63 -63
- package/lines/vector3LineComponent.d.ts +41 -41
- package/lines/vector3LineComponent.js +74 -74
- package/lines/vector4LineComponent.d.ts +42 -42
- package/lines/vector4LineComponent.js +81 -81
- package/nodeGraphSystem/displayLedger.d.ts +5 -5
- package/nodeGraphSystem/displayLedger.js +3 -3
- package/nodeGraphSystem/frameNodePort.d.ts +25 -25
- package/nodeGraphSystem/frameNodePort.js +59 -59
- package/nodeGraphSystem/graphCanvas.d.ts +111 -111
- package/nodeGraphSystem/graphCanvas.js +1131 -1131
- package/nodeGraphSystem/graphFrame.d.ts +153 -153
- package/nodeGraphSystem/graphFrame.js +1328 -1328
- package/nodeGraphSystem/graphNode.d.ts +79 -79
- package/nodeGraphSystem/graphNode.js +459 -459
- package/nodeGraphSystem/interfaces/displayManager.d.ts +13 -13
- package/nodeGraphSystem/interfaces/displayManager.js +1 -1
- package/nodeGraphSystem/interfaces/nodeContainer.d.ts +6 -6
- package/nodeGraphSystem/interfaces/nodeContainer.js +1 -1
- package/nodeGraphSystem/interfaces/nodeData.d.ts +15 -15
- package/nodeGraphSystem/interfaces/nodeData.js +1 -1
- package/nodeGraphSystem/interfaces/nodeLocationInfo.d.ts +26 -26
- package/nodeGraphSystem/interfaces/nodeLocationInfo.js +1 -1
- package/nodeGraphSystem/interfaces/portData.d.ts +28 -28
- package/nodeGraphSystem/interfaces/portData.js +7 -7
- package/nodeGraphSystem/interfaces/propertyComponentProps.d.ts +6 -6
- package/nodeGraphSystem/interfaces/propertyComponentProps.js +1 -1
- package/nodeGraphSystem/interfaces/selectionChangedOptions.d.ts +11 -11
- package/nodeGraphSystem/interfaces/selectionChangedOptions.js +1 -1
- package/nodeGraphSystem/nodeLink.d.ts +31 -31
- package/nodeGraphSystem/nodeLink.js +182 -182
- package/nodeGraphSystem/nodePort.d.ts +35 -35
- package/nodeGraphSystem/nodePort.js +128 -128
- package/nodeGraphSystem/propertyLedger.d.ts +8 -8
- package/nodeGraphSystem/propertyLedger.js +3 -3
- package/nodeGraphSystem/stateManager.d.ts +45 -45
- package/nodeGraphSystem/stateManager.js +18 -18
- package/nodeGraphSystem/tools.d.ts +5 -5
- package/nodeGraphSystem/tools.js +36 -36
- package/nodeGraphSystem/typeLedger.d.ts +8 -8
- package/nodeGraphSystem/typeLedger.js +2 -2
- package/nodeGraphSystem/types/framePortData.d.ts +7 -7
- package/nodeGraphSystem/types/framePortData.js +1 -1
- package/package.json +4 -3
- package/propertyChangedEvent.d.ts +7 -7
- package/propertyChangedEvent.js +2 -2
- package/stories/Button.stories.d.ts +10 -10
- package/stories/Button.stories.js +19 -19
- package/stories/Icon.stories.d.ts +9 -9
- package/stories/Icon.stories.js +16 -16
- package/stories/Label.stories.d.ts +8 -8
- package/stories/Label.stories.js +10 -10
- package/stories/MessageDialog.stories.d.ts +9 -9
- package/stories/MessageDialog.stories.js +19 -19
- package/stories/Toggle.stories.d.ts +9 -9
- package/stories/Toggle.stories.js +17 -17
- package/stories/bars/CommandBarComponent.stories.d.ts +11 -11
- package/stories/bars/CommandBarComponent.stories.js +12 -12
- package/stories/bars/CommandButtonComponent.stories.d.ts +6 -6
- package/stories/bars/CommandButtonComponent.stories.js +6 -6
- package/stories/colorPicker/ColorPicker.stories.d.ts +11 -11
- package/stories/colorPicker/ColorPicker.stories.js +4 -4
- package/stories/layout/FlexibleGridLayout.stories.d.ts +46 -0
- package/stories/layout/FlexibleGridLayout.stories.js +48 -0
- package/stories/layout/FlexibleGridLayout.stories.js.map +1 -0
- package/stories/lines/ColorLineComponent.stories.d.ts +21 -21
- package/stories/lines/ColorLineComponent.stories.js +9 -9
- package/stories/lines/ColorPickerLineComponent.stories.d.ts +14 -14
- package/stories/lines/ColorPickerLineComponent.stories.js +10 -10
- package/stories/lines/FileButtonLineComponent.stories.d.ts +6 -6
- package/stories/lines/FileButtonLineComponent.stories.js +5 -5
- package/stories/lines/NumericInputComponent.stories.d.ts +11 -11
- package/stories/lines/NumericInputComponent.stories.js +5 -5
- package/stringTools.d.ts +11 -11
- package/stringTools.js +88 -88
- package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.js +14 -14
- package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.d.ts +17 -17
- package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.js +55 -55
- package/tabs/propertyGrids/gui/controlPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/controlPropertyGridComponent.js +12 -12
- package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/gridPropertyGridComponent.d.ts +17 -17
- package/tabs/propertyGrids/gui/gridPropertyGridComponent.js +38 -38
- package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.js +16 -16
- package/tabs/propertyGrids/gui/imagePropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/imagePropertyGridComponent.js +25 -25
- package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.js +17 -17
- package/tabs/propertyGrids/gui/linePropertyGridComponent.d.ts +16 -16
- package/tabs/propertyGrids/gui/linePropertyGridComponent.js +27 -27
- package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.js +17 -17
- package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/sliderPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/sliderPropertyGridComponent.js +16 -16
- package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.js +14 -14
- package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.js +34 -34
- package/tabs/propertyGrids/lockObject.d.ts +9 -9
- package/tabs/propertyGrids/lockObject.js +11 -11
@@ -1,122 +1,122 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import * as React from "react";
|
3
|
-
export class HexLineComponent extends React.Component {
|
4
|
-
constructor(props) {
|
5
|
-
super(props);
|
6
|
-
this._localChange = false;
|
7
|
-
this._propertyChange = true;
|
8
|
-
const currentValue = this.props.target[this.props.propertyName];
|
9
|
-
this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 3)) : "0" };
|
10
|
-
this._store = currentValue;
|
11
|
-
}
|
12
|
-
componentWillUnmount() {
|
13
|
-
this.unlock();
|
14
|
-
}
|
15
|
-
shouldComponentUpdate(nextProps, nextState) {
|
16
|
-
if (this._localChange) {
|
17
|
-
this._localChange = false;
|
18
|
-
return true;
|
19
|
-
}
|
20
|
-
const newValue = nextProps.target[nextProps.propertyName];
|
21
|
-
const newValueString = newValue ? (this.props.isInteger ? newValue.toFixed(0) : newValue.toFixed(this.props.digits || 3)) : "0";
|
22
|
-
if (newValueString !== nextState.value) {
|
23
|
-
nextState.value = newValueString;
|
24
|
-
return true;
|
25
|
-
}
|
26
|
-
return false;
|
27
|
-
}
|
28
|
-
raiseOnPropertyChanged(newValue, previousValue) {
|
29
|
-
var _a;
|
30
|
-
if (this.props.onChange) {
|
31
|
-
this.props.onChange(newValue);
|
32
|
-
}
|
33
|
-
if (!this.props.onPropertyChangedObservable) {
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
37
|
-
object: (_a = this.props.replaySourceReplacement) !== null && _a !== void 0 ? _a : this.props.target,
|
38
|
-
property: this.props.propertyName,
|
39
|
-
value: newValue,
|
40
|
-
initialValue: previousValue,
|
41
|
-
});
|
42
|
-
}
|
43
|
-
convertToHexString(valueString) {
|
44
|
-
while (valueString.length < 10) {
|
45
|
-
valueString += "0";
|
46
|
-
}
|
47
|
-
return valueString;
|
48
|
-
}
|
49
|
-
updateValue(valueString, raisePropertyChanged) {
|
50
|
-
if (valueString.substr(0, 2) != "0x") {
|
51
|
-
if (valueString.substr(0, 1) != "0") {
|
52
|
-
valueString = "0x" + valueString;
|
53
|
-
}
|
54
|
-
else {
|
55
|
-
valueString = "0x" + valueString.substr(1);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
const valueSubstr = valueString.substr(2);
|
59
|
-
if (valueSubstr != "" && /^[0-9A-Fa-f]+$/g.test(valueSubstr) == false) {
|
60
|
-
return;
|
61
|
-
}
|
62
|
-
if (valueString.length > 10) {
|
63
|
-
return;
|
64
|
-
}
|
65
|
-
const valueStringAsHex = this.convertToHexString(valueString);
|
66
|
-
let valueAsNumber;
|
67
|
-
valueAsNumber = parseInt(valueStringAsHex);
|
68
|
-
if (!isNaN(valueAsNumber) && this.props.min !== undefined) {
|
69
|
-
if (valueAsNumber < this.props.min) {
|
70
|
-
valueAsNumber = this.props.min;
|
71
|
-
valueString = valueAsNumber.toString();
|
72
|
-
}
|
73
|
-
}
|
74
|
-
this._localChange = true;
|
75
|
-
if (isNaN(valueAsNumber)) {
|
76
|
-
return;
|
77
|
-
}
|
78
|
-
this.setState({ value: valueString });
|
79
|
-
if (raisePropertyChanged) {
|
80
|
-
this._propertyChange = true;
|
81
|
-
this.props.target[this.props.propertyName] = valueAsNumber;
|
82
|
-
this.raiseOnPropertyChanged(valueAsNumber, this._store);
|
83
|
-
}
|
84
|
-
else {
|
85
|
-
this._propertyChange = false;
|
86
|
-
}
|
87
|
-
this._store = valueAsNumber;
|
88
|
-
}
|
89
|
-
lock() {
|
90
|
-
if (this.props.lockObject) {
|
91
|
-
this.props.lockObject.lock = true;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
unlock() {
|
95
|
-
if (this.props.lockObject) {
|
96
|
-
this.props.lockObject.lock = false;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
render() {
|
100
|
-
let valueAsHex;
|
101
|
-
if (this._propertyChange) {
|
102
|
-
const valueAsNumber = parseInt(this.state.value);
|
103
|
-
valueAsHex = valueAsNumber.toString(16);
|
104
|
-
let hex0String = "";
|
105
|
-
for (let i = 0; i < 8 - valueAsHex.length; i++) {
|
106
|
-
//padding the '0's
|
107
|
-
hex0String += "0";
|
108
|
-
}
|
109
|
-
valueAsHex = "0x" + hex0String + valueAsHex.toUpperCase();
|
110
|
-
}
|
111
|
-
else {
|
112
|
-
valueAsHex = this.state.value;
|
113
|
-
}
|
114
|
-
return (_jsx("div", { children: !this.props.useEuler && (_jsxs("div", { className: this.props.additionalClass ? this.props.additionalClass + " floatLine" : "floatLine", children: [this.props.icon && _jsx("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }), _jsx("div", { className: "label", title: this.props.label, children: this.props.label }), _jsx("div", { className: "value", children: _jsx("input", { type: "string", className: "hex-input", value: valueAsHex, onBlur: () => this.unlock(), onFocus: () => this.lock(), onChange: (evt) => this.updateValue(evt.target.value, false), onKeyDown: (evt) => {
|
115
|
-
if (evt.keyCode !== 13) {
|
116
|
-
return;
|
117
|
-
}
|
118
|
-
this.updateValue(this.state.value, true);
|
119
|
-
} }) })] })) }));
|
120
|
-
}
|
121
|
-
}
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
export class HexLineComponent extends React.Component {
|
4
|
+
constructor(props) {
|
5
|
+
super(props);
|
6
|
+
this._localChange = false;
|
7
|
+
this._propertyChange = true;
|
8
|
+
const currentValue = this.props.target[this.props.propertyName];
|
9
|
+
this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 3)) : "0" };
|
10
|
+
this._store = currentValue;
|
11
|
+
}
|
12
|
+
componentWillUnmount() {
|
13
|
+
this.unlock();
|
14
|
+
}
|
15
|
+
shouldComponentUpdate(nextProps, nextState) {
|
16
|
+
if (this._localChange) {
|
17
|
+
this._localChange = false;
|
18
|
+
return true;
|
19
|
+
}
|
20
|
+
const newValue = nextProps.target[nextProps.propertyName];
|
21
|
+
const newValueString = newValue ? (this.props.isInteger ? newValue.toFixed(0) : newValue.toFixed(this.props.digits || 3)) : "0";
|
22
|
+
if (newValueString !== nextState.value) {
|
23
|
+
nextState.value = newValueString;
|
24
|
+
return true;
|
25
|
+
}
|
26
|
+
return false;
|
27
|
+
}
|
28
|
+
raiseOnPropertyChanged(newValue, previousValue) {
|
29
|
+
var _a;
|
30
|
+
if (this.props.onChange) {
|
31
|
+
this.props.onChange(newValue);
|
32
|
+
}
|
33
|
+
if (!this.props.onPropertyChangedObservable) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
this.props.onPropertyChangedObservable.notifyObservers({
|
37
|
+
object: (_a = this.props.replaySourceReplacement) !== null && _a !== void 0 ? _a : this.props.target,
|
38
|
+
property: this.props.propertyName,
|
39
|
+
value: newValue,
|
40
|
+
initialValue: previousValue,
|
41
|
+
});
|
42
|
+
}
|
43
|
+
convertToHexString(valueString) {
|
44
|
+
while (valueString.length < 10) {
|
45
|
+
valueString += "0";
|
46
|
+
}
|
47
|
+
return valueString;
|
48
|
+
}
|
49
|
+
updateValue(valueString, raisePropertyChanged) {
|
50
|
+
if (valueString.substr(0, 2) != "0x") {
|
51
|
+
if (valueString.substr(0, 1) != "0") {
|
52
|
+
valueString = "0x" + valueString;
|
53
|
+
}
|
54
|
+
else {
|
55
|
+
valueString = "0x" + valueString.substr(1);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
const valueSubstr = valueString.substr(2);
|
59
|
+
if (valueSubstr != "" && /^[0-9A-Fa-f]+$/g.test(valueSubstr) == false) {
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
if (valueString.length > 10) {
|
63
|
+
return;
|
64
|
+
}
|
65
|
+
const valueStringAsHex = this.convertToHexString(valueString);
|
66
|
+
let valueAsNumber;
|
67
|
+
valueAsNumber = parseInt(valueStringAsHex);
|
68
|
+
if (!isNaN(valueAsNumber) && this.props.min !== undefined) {
|
69
|
+
if (valueAsNumber < this.props.min) {
|
70
|
+
valueAsNumber = this.props.min;
|
71
|
+
valueString = valueAsNumber.toString();
|
72
|
+
}
|
73
|
+
}
|
74
|
+
this._localChange = true;
|
75
|
+
if (isNaN(valueAsNumber)) {
|
76
|
+
return;
|
77
|
+
}
|
78
|
+
this.setState({ value: valueString });
|
79
|
+
if (raisePropertyChanged) {
|
80
|
+
this._propertyChange = true;
|
81
|
+
this.props.target[this.props.propertyName] = valueAsNumber;
|
82
|
+
this.raiseOnPropertyChanged(valueAsNumber, this._store);
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
this._propertyChange = false;
|
86
|
+
}
|
87
|
+
this._store = valueAsNumber;
|
88
|
+
}
|
89
|
+
lock() {
|
90
|
+
if (this.props.lockObject) {
|
91
|
+
this.props.lockObject.lock = true;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
unlock() {
|
95
|
+
if (this.props.lockObject) {
|
96
|
+
this.props.lockObject.lock = false;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
render() {
|
100
|
+
let valueAsHex;
|
101
|
+
if (this._propertyChange) {
|
102
|
+
const valueAsNumber = parseInt(this.state.value);
|
103
|
+
valueAsHex = valueAsNumber.toString(16);
|
104
|
+
let hex0String = "";
|
105
|
+
for (let i = 0; i < 8 - valueAsHex.length; i++) {
|
106
|
+
//padding the '0's
|
107
|
+
hex0String += "0";
|
108
|
+
}
|
109
|
+
valueAsHex = "0x" + hex0String + valueAsHex.toUpperCase();
|
110
|
+
}
|
111
|
+
else {
|
112
|
+
valueAsHex = this.state.value;
|
113
|
+
}
|
114
|
+
return (_jsx("div", { children: !this.props.useEuler && (_jsxs("div", { className: this.props.additionalClass ? this.props.additionalClass + " floatLine" : "floatLine", children: [this.props.icon && _jsx("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }), _jsx("div", { className: "label", title: this.props.label, children: this.props.label }), _jsx("div", { className: "value", children: _jsx("input", { type: "string", className: "hex-input", value: valueAsHex, onBlur: () => this.unlock(), onFocus: () => this.lock(), onChange: (evt) => this.updateValue(evt.target.value, false), onKeyDown: (evt) => {
|
115
|
+
if (evt.keyCode !== 13) {
|
116
|
+
return;
|
117
|
+
}
|
118
|
+
this.updateValue(this.state.value, true);
|
119
|
+
} }) })] })) }));
|
120
|
+
}
|
121
|
+
}
|
122
122
|
//# sourceMappingURL=hexLineComponent.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export interface ISelectedLineContainer {
|
2
|
-
selectedLineContainerTitles: Array<string>;
|
3
|
-
selectedLineContainerTitlesNoFocus: Array<string>;
|
4
|
-
}
|
1
|
+
export interface ISelectedLineContainer {
|
2
|
+
selectedLineContainerTitles: Array<string>;
|
3
|
+
selectedLineContainerTitlesNoFocus: Array<string>;
|
4
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=iSelectedLineContainer.js.map
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
export interface IIconButtonLineComponentProps {
|
3
|
-
icon: string;
|
4
|
-
onClick: () => void;
|
5
|
-
tooltip: string;
|
6
|
-
active?: boolean;
|
7
|
-
}
|
8
|
-
export declare class IconButtonLineComponent extends React.Component<IIconButtonLineComponentProps> {
|
9
|
-
constructor(props: IIconButtonLineComponentProps);
|
10
|
-
render(): JSX.Element;
|
11
|
-
}
|
1
|
+
import * as React from "react";
|
2
|
+
export interface IIconButtonLineComponentProps {
|
3
|
+
icon: string;
|
4
|
+
onClick: () => void;
|
5
|
+
tooltip: string;
|
6
|
+
active?: boolean;
|
7
|
+
}
|
8
|
+
export declare class IconButtonLineComponent extends React.Component<IIconButtonLineComponentProps> {
|
9
|
+
constructor(props: IIconButtonLineComponentProps);
|
10
|
+
render(): JSX.Element;
|
11
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import * as React from "react";
|
3
|
-
export class IconButtonLineComponent extends React.Component {
|
4
|
-
constructor(props) {
|
5
|
-
super(props);
|
6
|
-
}
|
7
|
-
render() {
|
8
|
-
return (_jsx("div", { style: { backgroundColor: this.props.active ? "#111111" : "" }, title: this.props.tooltip, className: `icon ${this.props.icon}`, onClick: () => this.props.onClick() }));
|
9
|
-
}
|
10
|
-
}
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
export class IconButtonLineComponent extends React.Component {
|
4
|
+
constructor(props) {
|
5
|
+
super(props);
|
6
|
+
}
|
7
|
+
render() {
|
8
|
+
return (_jsx("div", { style: { backgroundColor: this.props.active ? "#111111" : "" }, title: this.props.tooltip, className: `icon ${this.props.icon}`, onClick: () => this.props.onClick() }));
|
9
|
+
}
|
10
|
+
}
|
11
11
|
//# sourceMappingURL=iconButtonLineComponent.js.map
|
package/lines/iconComponent.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
interface IIconComponentProps {
|
3
|
-
icon: string;
|
4
|
-
label?: string;
|
5
|
-
}
|
6
|
-
export declare class IconComponent extends React.Component<IIconComponentProps> {
|
7
|
-
render(): JSX.Element;
|
8
|
-
}
|
9
|
-
export {};
|
1
|
+
import * as React from "react";
|
2
|
+
interface IIconComponentProps {
|
3
|
+
icon: string;
|
4
|
+
label?: string;
|
5
|
+
}
|
6
|
+
export declare class IconComponent extends React.Component<IIconComponentProps> {
|
7
|
+
render(): JSX.Element;
|
8
|
+
}
|
9
|
+
export {};
|
package/lines/iconComponent.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import * as React from "react";
|
3
|
-
export class IconComponent extends React.Component {
|
4
|
-
render() {
|
5
|
-
return _jsx("img", { src: this.props.icon, title: this.props.label, alt: this.props.label, color: "black", className: "icon", onDragStart: (evt) => evt.preventDefault() });
|
6
|
-
}
|
7
|
-
}
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
export class IconComponent extends React.Component {
|
4
|
+
render() {
|
5
|
+
return _jsx("img", { src: this.props.icon, title: this.props.label, alt: this.props.label, color: "black", className: "icon", onDragStart: (evt) => evt.preventDefault() });
|
6
|
+
}
|
7
|
+
}
|
8
8
|
//# sourceMappingURL=iconComponent.js.map
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
interface IIndentedTextLineComponentProps {
|
3
|
-
value?: string;
|
4
|
-
color?: string;
|
5
|
-
underline?: boolean;
|
6
|
-
onLink?: () => void;
|
7
|
-
url?: string;
|
8
|
-
additionalClass?: string;
|
9
|
-
}
|
10
|
-
export declare class IndentedTextLineComponent extends React.Component<IIndentedTextLineComponentProps> {
|
11
|
-
constructor(props: IIndentedTextLineComponentProps);
|
12
|
-
onLink(): void;
|
13
|
-
renderContent(): JSX.Element;
|
14
|
-
render(): JSX.Element;
|
15
|
-
}
|
16
|
-
export {};
|
1
|
+
import * as React from "react";
|
2
|
+
interface IIndentedTextLineComponentProps {
|
3
|
+
value?: string;
|
4
|
+
color?: string;
|
5
|
+
underline?: boolean;
|
6
|
+
onLink?: () => void;
|
7
|
+
url?: string;
|
8
|
+
additionalClass?: string;
|
9
|
+
}
|
10
|
+
export declare class IndentedTextLineComponent extends React.Component<IIndentedTextLineComponentProps> {
|
11
|
+
constructor(props: IIndentedTextLineComponentProps);
|
12
|
+
onLink(): void;
|
13
|
+
renderContent(): JSX.Element;
|
14
|
+
render(): JSX.Element;
|
15
|
+
}
|
16
|
+
export {};
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import * as React from "react";
|
3
|
-
export class IndentedTextLineComponent extends React.Component {
|
4
|
-
constructor(props) {
|
5
|
-
super(props);
|
6
|
-
}
|
7
|
-
onLink() {
|
8
|
-
if (this.props.url) {
|
9
|
-
window.open(this.props.url, "_blank");
|
10
|
-
return;
|
11
|
-
}
|
12
|
-
if (!this.props.onLink) {
|
13
|
-
return;
|
14
|
-
}
|
15
|
-
this.props.onLink();
|
16
|
-
}
|
17
|
-
renderContent() {
|
18
|
-
if (this.props.onLink || this.props.url) {
|
19
|
-
return (_jsx("div", { className: "link-value", title: this.props.value, onClick: () => this.onLink(), children: this.props.url ? "doc" : this.props.value || "no name" }));
|
20
|
-
}
|
21
|
-
return (_jsx("div", { className: "value", title: this.props.value, style: { color: this.props.color ? this.props.color : "" }, children: this.props.value || "no name" }));
|
22
|
-
}
|
23
|
-
render() {
|
24
|
-
return (_jsx("div", { className: "indented " + (this.props.underline ? "textLine underline" : "textLine" + (this.props.additionalClass ? " " + this.props.additionalClass : "")), children: this.renderContent() }));
|
25
|
-
}
|
26
|
-
}
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
export class IndentedTextLineComponent extends React.Component {
|
4
|
+
constructor(props) {
|
5
|
+
super(props);
|
6
|
+
}
|
7
|
+
onLink() {
|
8
|
+
if (this.props.url) {
|
9
|
+
window.open(this.props.url, "_blank");
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
if (!this.props.onLink) {
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
this.props.onLink();
|
16
|
+
}
|
17
|
+
renderContent() {
|
18
|
+
if (this.props.onLink || this.props.url) {
|
19
|
+
return (_jsx("div", { className: "link-value", title: this.props.value, onClick: () => this.onLink(), children: this.props.url ? "doc" : this.props.value || "no name" }));
|
20
|
+
}
|
21
|
+
return (_jsx("div", { className: "value", title: this.props.value, style: { color: this.props.color ? this.props.color : "" }, children: this.props.value || "no name" }));
|
22
|
+
}
|
23
|
+
render() {
|
24
|
+
return (_jsx("div", { className: "indented " + (this.props.underline ? "textLine underline" : "textLine" + (this.props.additionalClass ? " " + this.props.additionalClass : "")), children: this.renderContent() }));
|
25
|
+
}
|
26
|
+
}
|
27
27
|
//# sourceMappingURL=indentedTextLineComponent.js.map
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
interface IInputArrowsComponentProps {
|
3
|
-
incrementValue: (amount: number) => void;
|
4
|
-
setDragging: (dragging: boolean) => void;
|
5
|
-
}
|
6
|
-
export declare class InputArrowsComponent extends React.Component<IInputArrowsComponentProps> {
|
7
|
-
private _arrowsRef;
|
8
|
-
private _drag;
|
9
|
-
private _releaseListener;
|
10
|
-
private _lockChangeListener;
|
11
|
-
render(): JSX.Element;
|
12
|
-
}
|
13
|
-
export {};
|
1
|
+
import * as React from "react";
|
2
|
+
interface IInputArrowsComponentProps {
|
3
|
+
incrementValue: (amount: number) => void;
|
4
|
+
setDragging: (dragging: boolean) => void;
|
5
|
+
}
|
6
|
+
export declare class InputArrowsComponent extends React.Component<IInputArrowsComponentProps> {
|
7
|
+
private _arrowsRef;
|
8
|
+
private _drag;
|
9
|
+
private _releaseListener;
|
10
|
+
private _lockChangeListener;
|
11
|
+
render(): JSX.Element;
|
12
|
+
}
|
13
|
+
export {};
|
@@ -1,38 +1,38 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import * as React from "react";
|
3
|
-
import upArrowIcon from "./valueUpArrowIcon.svg";
|
4
|
-
import downArrowIcon from "./valueDownArrowIcon.svg";
|
5
|
-
export class InputArrowsComponent extends React.Component {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
this._arrowsRef = React.createRef();
|
9
|
-
this._drag = (event) => {
|
10
|
-
this.props.incrementValue(-event.movementY);
|
11
|
-
};
|
12
|
-
this._releaseListener = () => {
|
13
|
-
var _a, _b, _c, _d;
|
14
|
-
this.props.setDragging(false);
|
15
|
-
(_a = this._arrowsRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.exitPointerLock();
|
16
|
-
(_b = this._arrowsRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.defaultView.removeEventListener("pointerup", this._releaseListener);
|
17
|
-
(_c = this._arrowsRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument.removeEventListener("pointerlockchange", this._lockChangeListener);
|
18
|
-
(_d = this._arrowsRef.current) === null || _d === void 0 ? void 0 : _d.ownerDocument.defaultView.removeEventListener("mousemove", this._drag);
|
19
|
-
};
|
20
|
-
this._lockChangeListener = () => {
|
21
|
-
var _a;
|
22
|
-
if (((_a = this._arrowsRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.pointerLockElement) !== this._arrowsRef.current) {
|
23
|
-
this._releaseListener();
|
24
|
-
}
|
25
|
-
};
|
26
|
-
}
|
27
|
-
render() {
|
28
|
-
return (_jsxs("div", { className: "arrows", ref: this._arrowsRef, onPointerDown: () => {
|
29
|
-
var _a, _b, _c, _d;
|
30
|
-
(_a = this._arrowsRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.addEventListener("pointerlockchange", this._lockChangeListener);
|
31
|
-
(_b = this._arrowsRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.defaultView.addEventListener("pointerup", this._releaseListener);
|
32
|
-
(_c = this._arrowsRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument.defaultView.addEventListener("mousemove", this._drag);
|
33
|
-
this.props.setDragging(true);
|
34
|
-
(_d = this._arrowsRef.current) === null || _d === void 0 ? void 0 : _d.requestPointerLock();
|
35
|
-
}, onDragStart: (evt) => evt.preventDefault(), children: [_jsx("img", { className: "upArrowIcon", src: upArrowIcon, alt: "Increase Value" }), _jsx("img", { className: "downArrowIcon", src: downArrowIcon, alt: "Increase Value" })] }));
|
36
|
-
}
|
37
|
-
}
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
import upArrowIcon from "./valueUpArrowIcon.svg";
|
4
|
+
import downArrowIcon from "./valueDownArrowIcon.svg";
|
5
|
+
export class InputArrowsComponent extends React.Component {
|
6
|
+
constructor() {
|
7
|
+
super(...arguments);
|
8
|
+
this._arrowsRef = React.createRef();
|
9
|
+
this._drag = (event) => {
|
10
|
+
this.props.incrementValue(-event.movementY);
|
11
|
+
};
|
12
|
+
this._releaseListener = () => {
|
13
|
+
var _a, _b, _c, _d;
|
14
|
+
this.props.setDragging(false);
|
15
|
+
(_a = this._arrowsRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.exitPointerLock();
|
16
|
+
(_b = this._arrowsRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.defaultView.removeEventListener("pointerup", this._releaseListener);
|
17
|
+
(_c = this._arrowsRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument.removeEventListener("pointerlockchange", this._lockChangeListener);
|
18
|
+
(_d = this._arrowsRef.current) === null || _d === void 0 ? void 0 : _d.ownerDocument.defaultView.removeEventListener("mousemove", this._drag);
|
19
|
+
};
|
20
|
+
this._lockChangeListener = () => {
|
21
|
+
var _a;
|
22
|
+
if (((_a = this._arrowsRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.pointerLockElement) !== this._arrowsRef.current) {
|
23
|
+
this._releaseListener();
|
24
|
+
}
|
25
|
+
};
|
26
|
+
}
|
27
|
+
render() {
|
28
|
+
return (_jsxs("div", { className: "arrows", ref: this._arrowsRef, onPointerDown: () => {
|
29
|
+
var _a, _b, _c, _d;
|
30
|
+
(_a = this._arrowsRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.addEventListener("pointerlockchange", this._lockChangeListener);
|
31
|
+
(_b = this._arrowsRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.defaultView.addEventListener("pointerup", this._releaseListener);
|
32
|
+
(_c = this._arrowsRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument.defaultView.addEventListener("mousemove", this._drag);
|
33
|
+
this.props.setDragging(true);
|
34
|
+
(_d = this._arrowsRef.current) === null || _d === void 0 ? void 0 : _d.requestPointerLock();
|
35
|
+
}, onDragStart: (evt) => evt.preventDefault(), children: [_jsx("img", { className: "upArrowIcon", src: upArrowIcon, alt: "Increase Value" }), _jsx("img", { className: "downArrowIcon", src: downArrowIcon, alt: "Increase Value" })] }));
|
36
|
+
}
|
37
|
+
}
|
38
38
|
//# sourceMappingURL=inputArrowsComponent.js.map
|
@@ -1,19 +1,19 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
import type { ISelectedLineContainer } from "./iSelectedLineContainer";
|
3
|
-
interface ILineContainerComponentProps {
|
4
|
-
selection?: ISelectedLineContainer;
|
5
|
-
title: string;
|
6
|
-
children: any[] | any;
|
7
|
-
closed?: boolean;
|
8
|
-
}
|
9
|
-
export declare class LineContainerComponent extends React.Component<ILineContainerComponentProps, {
|
10
|
-
isExpanded: boolean;
|
11
|
-
isHighlighted: boolean;
|
12
|
-
}> {
|
13
|
-
constructor(props: ILineContainerComponentProps);
|
14
|
-
switchExpandedState(): void;
|
15
|
-
renderHeader(): JSX.Element;
|
16
|
-
componentDidMount(): void;
|
17
|
-
render(): JSX.Element;
|
18
|
-
}
|
19
|
-
export {};
|
1
|
+
import * as React from "react";
|
2
|
+
import type { ISelectedLineContainer } from "./iSelectedLineContainer";
|
3
|
+
interface ILineContainerComponentProps {
|
4
|
+
selection?: ISelectedLineContainer;
|
5
|
+
title: string;
|
6
|
+
children: any[] | any;
|
7
|
+
closed?: boolean;
|
8
|
+
}
|
9
|
+
export declare class LineContainerComponent extends React.Component<ILineContainerComponentProps, {
|
10
|
+
isExpanded: boolean;
|
11
|
+
isHighlighted: boolean;
|
12
|
+
}> {
|
13
|
+
constructor(props: ILineContainerComponentProps);
|
14
|
+
switchExpandedState(): void;
|
15
|
+
renderHeader(): JSX.Element;
|
16
|
+
componentDidMount(): void;
|
17
|
+
render(): JSX.Element;
|
18
|
+
}
|
19
|
+
export {};
|