vim-web 0.3.44-dev.73 → 0.3.44-dev.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vim-web.js
CHANGED
|
@@ -75659,6 +75659,7 @@ function InputNumber(props) {
|
|
|
75659
75659
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75660
75660
|
"input",
|
|
75661
75661
|
{
|
|
75662
|
+
disabled: props.disabled ?? false,
|
|
75662
75663
|
type: "number",
|
|
75663
75664
|
value: inputValue,
|
|
75664
75665
|
onChange: handleChange,
|
|
@@ -75668,9 +75669,12 @@ function InputNumber(props) {
|
|
|
75668
75669
|
);
|
|
75669
75670
|
}
|
|
75670
75671
|
function GenericEntry(field) {
|
|
75672
|
+
var _a3;
|
|
75673
|
+
if (((_a3 = field.visible) == null ? void 0 : _a3.call(field)) === false) return null;
|
|
75671
75674
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
75672
75675
|
"div",
|
|
75673
75676
|
{
|
|
75677
|
+
style: {},
|
|
75674
75678
|
className: "vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-between vc-my-2",
|
|
75675
75679
|
children: [
|
|
75676
75680
|
/* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: field.label }),
|
|
@@ -75683,11 +75687,11 @@ function GenericEntry(field) {
|
|
|
75683
75687
|
function GenericField(props) {
|
|
75684
75688
|
switch (props.field.type) {
|
|
75685
75689
|
case "number":
|
|
75686
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state });
|
|
75690
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state, disabled: !props.field.enabled() });
|
|
75687
75691
|
case "text":
|
|
75688
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { field: props.field });
|
|
75692
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: !props.field.enabled() });
|
|
75689
75693
|
case "bool":
|
|
75690
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { field: props.field });
|
|
75694
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: !props.field.enabled() });
|
|
75691
75695
|
default:
|
|
75692
75696
|
return null;
|
|
75693
75697
|
}
|
|
@@ -75697,15 +75701,15 @@ function GenericTextField(props) {
|
|
|
75697
75701
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75698
75702
|
"input",
|
|
75699
75703
|
{
|
|
75700
|
-
id: props.field.id,
|
|
75701
75704
|
type: "text",
|
|
75702
|
-
|
|
75705
|
+
disabled: props.disabled ?? false,
|
|
75706
|
+
value: props.state.get(),
|
|
75703
75707
|
onChange: (e) => {
|
|
75704
75708
|
refresher.refresh();
|
|
75705
|
-
props.
|
|
75709
|
+
props.state.set(e.target.value);
|
|
75706
75710
|
},
|
|
75707
75711
|
className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
|
|
75708
|
-
onBlur: () => props.
|
|
75712
|
+
onBlur: () => props.state.confirm()
|
|
75709
75713
|
}
|
|
75710
75714
|
);
|
|
75711
75715
|
}
|
|
@@ -75714,12 +75718,12 @@ function GenericBoolField(props) {
|
|
|
75714
75718
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75715
75719
|
"input",
|
|
75716
75720
|
{
|
|
75717
|
-
id: props.field.id,
|
|
75718
75721
|
type: "checkbox",
|
|
75719
|
-
|
|
75722
|
+
disabled: props.disabled ?? false,
|
|
75723
|
+
checked: props.state.get(),
|
|
75720
75724
|
onChange: (e) => {
|
|
75721
75725
|
refresher.refresh();
|
|
75722
|
-
props.
|
|
75726
|
+
props.state.set(e.target.checked);
|
|
75723
75727
|
},
|
|
75724
75728
|
className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1"
|
|
75725
75729
|
}
|