@babylonjs/node-editor 5.53.0 → 5.53.1
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.
@@ -49073,6 +49073,9 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
49073
49073
|
return 0;
|
49074
49074
|
}
|
49075
49075
|
updateValue(value, valueToValidate) {
|
49076
|
+
if (this.props.disabled) {
|
49077
|
+
return;
|
49078
|
+
}
|
49076
49079
|
if (this.props.numbersOnly) {
|
49077
49080
|
if (/[^0-9.\p\x%-]/g.test(value)) {
|
49078
49081
|
return;
|
@@ -49133,7 +49136,7 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
49133
49136
|
this.updateValue((currentValue + amount).toFixed(2));
|
49134
49137
|
}
|
49135
49138
|
onKeyDown(event) {
|
49136
|
-
if (this.props.arrows) {
|
49139
|
+
if (!this.props.disabled && this.props.arrows) {
|
49137
49140
|
if (event.key === "ArrowUp") {
|
49138
49141
|
this.incrementValue(1);
|
49139
49142
|
event.preventDefault();
|
@@ -49148,7 +49151,8 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
49148
49151
|
const value = this.state.value === _targetsProxy__WEBPACK_IMPORTED_MODULE_2__.conflictingValuesPlaceholder ? "" : this.state.value;
|
49149
49152
|
const placeholder = this.state.value === _targetsProxy__WEBPACK_IMPORTED_MODULE_2__.conflictingValuesPlaceholder ? _targetsProxy__WEBPACK_IMPORTED_MODULE_2__.conflictingValuesPlaceholder : this.props.placeholder || "";
|
49150
49153
|
const step = this.props.step || (this.props.roundValues ? 1 : 0.01);
|
49151
|
-
|
49154
|
+
const className = this.props.multilines ? "textInputArea" : this.props.unit !== undefined ? "textInputLine withUnits" : "textInputLine";
|
49155
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: className, children: [this.props.icon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, color: "black", className: "icon" }), this.props.label !== undefined && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "label", title: this.props.label, children: this.props.label })), this.props.multilines && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { className: this.props.disabled ? "disabled" : "", value: this.state.value, onFocus: () => {
|
49152
49156
|
if (this.props.lockObject) {
|
49153
49157
|
this.props.lockObject.lock = true;
|
49154
49158
|
}
|
@@ -49162,7 +49166,7 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
49162
49166
|
if (this.props.lockObject) {
|
49163
49167
|
this.props.lockObject.lock = false;
|
49164
49168
|
}
|
49165
|
-
} }) })), !this.props.multilines && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: `value${this.props.noUnderline === true ? " noUnderline" : ""}${this.props.arrows ? " hasArrows" : ""}${this.state.dragging ? " dragging" : ""}`, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { value: value, onBlur: (evt) => {
|
49169
|
+
}, disabled: this.props.disabled }) })), !this.props.multilines && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: `value${this.props.noUnderline === true ? " noUnderline" : ""}${this.props.arrows ? " hasArrows" : ""}${this.state.dragging ? " dragging" : ""}`, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { className: this.props.disabled ? "disabled" : "", value: value, onBlur: (evt) => {
|
49166
49170
|
if (this.props.lockObject) {
|
49167
49171
|
this.props.lockObject.lock = false;
|
49168
49172
|
}
|
@@ -49171,7 +49175,7 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
49171
49175
|
if (this.props.lockObject) {
|
49172
49176
|
this.props.lockObject.lock = true;
|
49173
49177
|
}
|
49174
|
-
}, onChange: (evt) => this.updateValue(evt.target.value), onKeyDown: (evt) => this.onKeyDown(evt), placeholder: placeholder, type: this.props.numeric ? "number" : "text", step: step }), this.props.arrows && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_inputArrowsComponent__WEBPACK_IMPORTED_MODULE_3__.InputArrowsComponent, { incrementValue: (amount) => this.incrementValue(amount), setDragging: (dragging) => this.setState({ dragging }) }))] })), this.props.unit] }));
|
49178
|
+
}, onChange: (evt) => this.updateValue(evt.target.value), onKeyDown: (evt) => this.onKeyDown(evt), placeholder: placeholder, type: this.props.numeric ? "number" : "text", step: step, disabled: this.props.disabled }), this.props.arrows && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_inputArrowsComponent__WEBPACK_IMPORTED_MODULE_3__.InputArrowsComponent, { incrementValue: (amount) => this.incrementValue(amount), setDragging: (dragging) => this.setState({ dragging }) }))] })), this.props.unit] }));
|
49175
49179
|
}
|
49176
49180
|
}
|
49177
49181
|
|