vim-web 0.3.44-dev.75 → 0.3.44-dev.77

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.
@@ -75685,29 +75685,30 @@ Averrage Date/Second ${avgDataRatePS} kb
75685
75685
  );
75686
75686
  }
75687
75687
  function GenericEntry(field) {
75688
- var _a3;
75688
+ var _a3, _b2;
75689
75689
  if (((_a3 = field.visible) == null ? void 0 : _a3.call(field)) === false) return null;
75690
+ const isEnabled = ((_b2 = field.enabled) == null ? void 0 : _b2.call(field)) !== false;
75690
75691
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
75691
75692
  "div",
75692
75693
  {
75693
- style: {},
75694
- className: "vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-between vc-my-2",
75694
+ className: `vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-between vc-my-2 ${isEnabled ? "" : "vc-opacity-50 vc-pointer-events-none"}`,
75695
75695
  children: [
75696
75696
  /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: field.label }),
75697
- /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GenericField, { field }) })
75697
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GenericField, { field, disabled: !isEnabled }) })
75698
75698
  ]
75699
75699
  },
75700
75700
  field.id
75701
75701
  );
75702
75702
  }
75703
75703
  function GenericField(props) {
75704
+ var _a3, _b2, _c, _d, _e, _f;
75704
75705
  switch (props.field.type) {
75705
75706
  case "number":
75706
- return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state, disabled: !props.field.enabled() });
75707
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(InputNumber, { state: props.field.state, disabled: ((_b2 = (_a3 = props.field).enabled) == null ? void 0 : _b2.call(_a3)) === false });
75707
75708
  case "text":
75708
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: !props.field.enabled() });
75709
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericTextField, { state: props.field.state, disabled: !((_d = (_c = props.field).enabled) == null ? void 0 : _d.call(_c)) === false });
75709
75710
  case "bool":
75710
- return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: !props.field.enabled() });
75711
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(GenericBoolField, { state: props.field.state, disabled: !((_f = (_e = props.field).enabled) == null ? void 0 : _f.call(_e)) === false });
75711
75712
  default:
75712
75713
  return null;
75713
75714
  }
@@ -75986,7 +75987,7 @@ Averrage Date/Second ${avgDataRatePS} kb
75986
75987
  entries: [
75987
75988
  { type: "bool", id: "showGhost", label: "Show Ghost", state: props.state.showGhost },
75988
75989
  // { type: "bool", id: "showRooms", label: "Show Rooms", state: props.state.showRooms },
75989
- { type: "number", id: "ghostOpacity", label: "Ghost Opacity", state: props.state.ghostOpacity }
75990
+ { type: "number", id: "ghostOpacity", label: "Ghost Opacity", state: props.state.ghostOpacity, enabled: () => false }
75990
75991
  ]
75991
75992
  }
75992
75993
  );