@wise/dynamic-flow-client 3.6.0 → 3.6.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.
package/build/main.js CHANGED
@@ -2515,7 +2515,7 @@ function ControlFeedback(props) {
2515
2515
  const validationMessages = __spreadValues(__spreadValues(__spreadValues({}, defaultValidationMessages), props.validationMessages), props.schema.validationMessages);
2516
2516
  const isErrorVisible = (props.submitted || !props.changed) && Boolean(props.errors);
2517
2517
  const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean((_a = props.validations) == null ? void 0 : _a.length);
2518
- const isDescriptionVisible = props.schema.description && !isErrorVisible && !isValidationVisible;
2518
+ const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
2519
2519
  const hasInfoMessage = Boolean(props.infoMessage);
2520
2520
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { id: props.id, children: [
2521
2521
  isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components7.InlineAlert, { type: "error", children: props.errors }) : null,
@@ -3869,6 +3869,7 @@ var _FormControl = class _FormControl extends import_react19.PureComponent {
3869
3869
  size,
3870
3870
  uploadProps,
3871
3871
  label,
3872
+ description,
3872
3873
  monthFormat,
3873
3874
  // FIXME pass id to all components that accept it
3874
3875
  id,
@@ -3896,6 +3897,7 @@ var _FormControl = class _FormControl extends import_react19.PureComponent {
3896
3897
  checked: getSafeBooleanValue(value, { coerceValue: true }),
3897
3898
  disabled,
3898
3899
  label,
3900
+ secondary: description,
3899
3901
  required,
3900
3902
  readOnly,
3901
3903
  onChange: this.handleOnChange,
@@ -4294,6 +4296,7 @@ function SchemaFormControl(props) {
4294
4296
  id,
4295
4297
  name: id,
4296
4298
  label: schema.title,
4299
+ description: schema.description,
4297
4300
  options: options || [],
4298
4301
  placeholder: schema.placeholder,
4299
4302
  autoComplete: !schema.help,
@@ -8565,8 +8568,8 @@ var BooleanInputRenderer = {
8565
8568
  canRenderType: "input-boolean",
8566
8569
  render: (props) => {
8567
8570
  const _a = props, { id, control, label = "", description, help, error, type, value } = _a, rest = __objRest(_a, ["id", "control", "label", "description", "help", "error", "type", "value"]);
8568
- const checkboxProps = __spreadProps(__spreadValues({}, rest), { label, checked: value });
8569
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FieldInput_default, { id, label: "", description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components43.Checkbox, __spreadValues({ id }, checkboxProps)) });
8571
+ const checkboxProps = __spreadProps(__spreadValues({}, rest), { label, secondary: description, checked: value });
8572
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FieldInput_default, { id, label: "", description: "", error, help, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components43.Checkbox, __spreadValues({ id }, checkboxProps)) });
8570
8573
  }
8571
8574
  };
8572
8575
  var BooleanInputRenderer_default = BooleanInputRenderer;