@wise/dynamic-flow-client 3.9.2 → 3.9.3
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
|
@@ -11652,6 +11652,7 @@ function SelectInputRendererComponent(props) {
|
|
|
11652
11652
|
label,
|
|
11653
11653
|
options,
|
|
11654
11654
|
placeholder,
|
|
11655
|
+
required,
|
|
11655
11656
|
selectedIndex,
|
|
11656
11657
|
onSelect
|
|
11657
11658
|
} = props;
|
|
@@ -11694,7 +11695,7 @@ function SelectInputRendererComponent(props) {
|
|
|
11694
11695
|
renderValue,
|
|
11695
11696
|
filterable: items.length >= 8,
|
|
11696
11697
|
onChange: onSelect,
|
|
11697
|
-
onClear: () => onSelect(null)
|
|
11698
|
+
onClear: required ? void 0 : () => onSelect(null)
|
|
11698
11699
|
}
|
|
11699
11700
|
) }),
|
|
11700
11701
|
children
|
|
@@ -15341,7 +15342,7 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
15341
15342
|
onFilterChange: search && onSearchChange ? ({ query }) => {
|
|
15342
15343
|
onSearchChange(query);
|
|
15343
15344
|
} : void 0,
|
|
15344
|
-
onClear: () => {
|
|
15345
|
+
onClear: required ? void 0 : () => {
|
|
15345
15346
|
this.setState({ selectedOption: null });
|
|
15346
15347
|
this.props.onChange(null);
|
|
15347
15348
|
}
|
|
@@ -15679,7 +15680,18 @@ var getOptions = (schema, controlType) => {
|
|
|
15679
15680
|
return null;
|
|
15680
15681
|
};
|
|
15681
15682
|
function SchemaFormControl(props) {
|
|
15682
|
-
const {
|
|
15683
|
+
const {
|
|
15684
|
+
id,
|
|
15685
|
+
schema,
|
|
15686
|
+
value,
|
|
15687
|
+
disabled,
|
|
15688
|
+
required,
|
|
15689
|
+
onChange,
|
|
15690
|
+
onFocus,
|
|
15691
|
+
onBlur,
|
|
15692
|
+
onSearchChange,
|
|
15693
|
+
describedBy
|
|
15694
|
+
} = props;
|
|
15683
15695
|
const log = useLogger();
|
|
15684
15696
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
15685
15697
|
const onModelChange = (value2, type, metadata) => {
|
|
@@ -15710,7 +15722,8 @@ function SchemaFormControl(props) {
|
|
|
15710
15722
|
displayPattern: schema.displayFormat,
|
|
15711
15723
|
// TODO: LOW avoid type assertion below
|
|
15712
15724
|
uploadProps: mapSchemaToUploadOptions(schema),
|
|
15713
|
-
describedBy
|
|
15725
|
+
describedBy,
|
|
15726
|
+
required
|
|
15714
15727
|
};
|
|
15715
15728
|
return /* @__PURE__ */ jsx88("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ jsx88(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
|
|
15716
15729
|
}
|
|
@@ -15830,6 +15843,7 @@ function OneOfSchema(props) {
|
|
|
15830
15843
|
value: schemaIndex,
|
|
15831
15844
|
disabled: props.disabled,
|
|
15832
15845
|
describedBy: feedbackId,
|
|
15846
|
+
required: props.required,
|
|
15833
15847
|
onChange: onChooseNewSchema,
|
|
15834
15848
|
onFocus,
|
|
15835
15849
|
onBlur,
|