@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.js
CHANGED
|
@@ -11674,6 +11674,7 @@ function SelectInputRendererComponent(props) {
|
|
|
11674
11674
|
label,
|
|
11675
11675
|
options,
|
|
11676
11676
|
placeholder,
|
|
11677
|
+
required,
|
|
11677
11678
|
selectedIndex,
|
|
11678
11679
|
onSelect
|
|
11679
11680
|
} = props;
|
|
@@ -11716,7 +11717,7 @@ function SelectInputRendererComponent(props) {
|
|
|
11716
11717
|
renderValue,
|
|
11717
11718
|
filterable: items.length >= 8,
|
|
11718
11719
|
onChange: onSelect,
|
|
11719
|
-
onClear: () => onSelect(null)
|
|
11720
|
+
onClear: required ? void 0 : () => onSelect(null)
|
|
11720
11721
|
}
|
|
11721
11722
|
) }),
|
|
11722
11723
|
children
|
|
@@ -15342,7 +15343,7 @@ var _FormControl = class _FormControl extends import_react37.PureComponent {
|
|
|
15342
15343
|
onFilterChange: search && onSearchChange ? ({ query }) => {
|
|
15343
15344
|
onSearchChange(query);
|
|
15344
15345
|
} : void 0,
|
|
15345
|
-
onClear: () => {
|
|
15346
|
+
onClear: required ? void 0 : () => {
|
|
15346
15347
|
this.setState({ selectedOption: null });
|
|
15347
15348
|
this.props.onChange(null);
|
|
15348
15349
|
}
|
|
@@ -15680,7 +15681,18 @@ var getOptions = (schema, controlType) => {
|
|
|
15680
15681
|
return null;
|
|
15681
15682
|
};
|
|
15682
15683
|
function SchemaFormControl(props) {
|
|
15683
|
-
const {
|
|
15684
|
+
const {
|
|
15685
|
+
id,
|
|
15686
|
+
schema,
|
|
15687
|
+
value,
|
|
15688
|
+
disabled,
|
|
15689
|
+
required,
|
|
15690
|
+
onChange,
|
|
15691
|
+
onFocus,
|
|
15692
|
+
onBlur,
|
|
15693
|
+
onSearchChange,
|
|
15694
|
+
describedBy
|
|
15695
|
+
} = props;
|
|
15684
15696
|
const log = useLogger();
|
|
15685
15697
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
15686
15698
|
const onModelChange = (value2, type, metadata) => {
|
|
@@ -15711,7 +15723,8 @@ function SchemaFormControl(props) {
|
|
|
15711
15723
|
displayPattern: schema.displayFormat,
|
|
15712
15724
|
// TODO: LOW avoid type assertion below
|
|
15713
15725
|
uploadProps: mapSchemaToUploadOptions(schema),
|
|
15714
|
-
describedBy
|
|
15726
|
+
describedBy,
|
|
15727
|
+
required
|
|
15715
15728
|
};
|
|
15716
15729
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
|
|
15717
15730
|
}
|
|
@@ -15831,6 +15844,7 @@ function OneOfSchema(props) {
|
|
|
15831
15844
|
value: schemaIndex,
|
|
15832
15845
|
disabled: props.disabled,
|
|
15833
15846
|
describedBy: feedbackId,
|
|
15847
|
+
required: props.required,
|
|
15834
15848
|
onChange: onChooseNewSchema,
|
|
15835
15849
|
onFocus,
|
|
15836
15850
|
onBlur,
|