vim-web 0.3.44-dev.73 → 0.3.44-dev.74
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,11 @@ function InputNumber(props) {
|
|
|
75668
75669
|
);
|
|
75669
75670
|
}
|
|
75670
75671
|
function GenericEntry(field) {
|
|
75672
|
+
if (field.visible() === false) return null;
|
|
75671
75673
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
75672
75674
|
"div",
|
|
75673
75675
|
{
|
|
75676
|
+
style: {},
|
|
75674
75677
|
className: "vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-between vc-my-2",
|
|
75675
75678
|
children: [
|
|
75676
75679
|
/* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: field.label }),
|
|
@@ -75683,11 +75686,11 @@ function GenericEntry(field) {
|
|
|
75683
75686
|
function GenericField(props) {
|
|
75684
75687
|
switch (props.field.type) {
|
|
75685
75688
|
case "number":
|
|
75686
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state });
|
|
75689
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state, disabled: !props.field.enabled() });
|
|
75687
75690
|
case "text":
|
|
75688
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { field: props.field });
|
|
75691
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: !props.field.enabled() });
|
|
75689
75692
|
case "bool":
|
|
75690
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { field: props.field });
|
|
75693
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: !props.field.enabled() });
|
|
75691
75694
|
default:
|
|
75692
75695
|
return null;
|
|
75693
75696
|
}
|
|
@@ -75697,15 +75700,15 @@ function GenericTextField(props) {
|
|
|
75697
75700
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75698
75701
|
"input",
|
|
75699
75702
|
{
|
|
75700
|
-
id: props.field.id,
|
|
75701
75703
|
type: "text",
|
|
75702
|
-
|
|
75704
|
+
disabled: props.disabled ?? false,
|
|
75705
|
+
value: props.state.get(),
|
|
75703
75706
|
onChange: (e) => {
|
|
75704
75707
|
refresher.refresh();
|
|
75705
|
-
props.
|
|
75708
|
+
props.state.set(e.target.value);
|
|
75706
75709
|
},
|
|
75707
75710
|
className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
|
|
75708
|
-
onBlur: () => props.
|
|
75711
|
+
onBlur: () => props.state.confirm()
|
|
75709
75712
|
}
|
|
75710
75713
|
);
|
|
75711
75714
|
}
|
|
@@ -75714,12 +75717,12 @@ function GenericBoolField(props) {
|
|
|
75714
75717
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75715
75718
|
"input",
|
|
75716
75719
|
{
|
|
75717
|
-
id: props.field.id,
|
|
75718
75720
|
type: "checkbox",
|
|
75719
|
-
|
|
75721
|
+
disabled: props.disabled ?? false,
|
|
75722
|
+
checked: props.state.get(),
|
|
75720
75723
|
onChange: (e) => {
|
|
75721
75724
|
refresher.refresh();
|
|
75722
|
-
props.
|
|
75725
|
+
props.state.set(e.target.checked);
|
|
75723
75726
|
},
|
|
75724
75727
|
className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1"
|
|
75725
75728
|
}
|