@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.mjs
CHANGED
|
@@ -2497,7 +2497,7 @@ function ControlFeedback(props) {
|
|
|
2497
2497
|
const validationMessages = __spreadValues(__spreadValues(__spreadValues({}, defaultValidationMessages), props.validationMessages), props.schema.validationMessages);
|
|
2498
2498
|
const isErrorVisible = (props.submitted || !props.changed) && Boolean(props.errors);
|
|
2499
2499
|
const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean((_a = props.validations) == null ? void 0 : _a.length);
|
|
2500
|
-
const isDescriptionVisible = props.schema.description && !isErrorVisible && !isValidationVisible;
|
|
2500
|
+
const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
|
|
2501
2501
|
const hasInfoMessage = Boolean(props.infoMessage);
|
|
2502
2502
|
return /* @__PURE__ */ jsxs4("div", { id: props.id, children: [
|
|
2503
2503
|
isErrorVisible ? /* @__PURE__ */ jsx18(InlineAlert, { type: "error", children: props.errors }) : null,
|
|
@@ -3863,6 +3863,7 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
3863
3863
|
size,
|
|
3864
3864
|
uploadProps,
|
|
3865
3865
|
label,
|
|
3866
|
+
description,
|
|
3866
3867
|
monthFormat,
|
|
3867
3868
|
// FIXME pass id to all components that accept it
|
|
3868
3869
|
id,
|
|
@@ -3890,6 +3891,7 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
3890
3891
|
checked: getSafeBooleanValue(value, { coerceValue: true }),
|
|
3891
3892
|
disabled,
|
|
3892
3893
|
label,
|
|
3894
|
+
secondary: description,
|
|
3893
3895
|
required,
|
|
3894
3896
|
readOnly,
|
|
3895
3897
|
onChange: this.handleOnChange,
|
|
@@ -4288,6 +4290,7 @@ function SchemaFormControl(props) {
|
|
|
4288
4290
|
id,
|
|
4289
4291
|
name: id,
|
|
4290
4292
|
label: schema.title,
|
|
4293
|
+
description: schema.description,
|
|
4291
4294
|
options: options || [],
|
|
4292
4295
|
placeholder: schema.placeholder,
|
|
4293
4296
|
autoComplete: !schema.help,
|
|
@@ -8559,8 +8562,8 @@ var BooleanInputRenderer = {
|
|
|
8559
8562
|
canRenderType: "input-boolean",
|
|
8560
8563
|
render: (props) => {
|
|
8561
8564
|
const _a = props, { id, control, label = "", description, help, error, type, value } = _a, rest = __objRest(_a, ["id", "control", "label", "description", "help", "error", "type", "value"]);
|
|
8562
|
-
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label, checked: value });
|
|
8563
|
-
return /* @__PURE__ */ jsx79(FieldInput_default, { id, label: "", description, error, help, children: /* @__PURE__ */ jsx79(Checkbox3, __spreadValues({ id }, checkboxProps)) });
|
|
8565
|
+
const checkboxProps = __spreadProps(__spreadValues({}, rest), { label, secondary: description, checked: value });
|
|
8566
|
+
return /* @__PURE__ */ jsx79(FieldInput_default, { id, label: "", description: "", error, help, children: /* @__PURE__ */ jsx79(Checkbox3, __spreadValues({ id }, checkboxProps)) });
|
|
8564
8567
|
}
|
|
8565
8568
|
};
|
|
8566
8569
|
var BooleanInputRenderer_default = BooleanInputRenderer;
|