@wise/dynamic-flow-client 3.9.2 → 3.9.4
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 +23 -15
- package/build/main.min.js +1 -1
- package/build/main.mjs +23 -15
- package/build/types/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +1 -0
- package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/DateInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
- package/build/types/revamp/domain/components/UploadInputComponent.d.ts +1 -1
- package/package.json +1 -1
package/build/main.mjs
CHANGED
|
@@ -297,16 +297,10 @@ var applyBaseUrl = (input, baseUrl) => typeof input === "string" && isRelativePa
|
|
|
297
297
|
var mergeRequestInit = (init, additionalInit) => __spreadProps(__spreadValues(__spreadValues({}, init), additionalInit), {
|
|
298
298
|
headers: mergeHeaders(init == null ? void 0 : init.headers, additionalInit == null ? void 0 : additionalInit.headers)
|
|
299
299
|
});
|
|
300
|
-
var mergeHeaders = (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const headers2 = new Headers(initHeaders);
|
|
305
|
-
for (const [key, value] of Object.entries(additionalHeaders != null ? additionalHeaders : {})) {
|
|
306
|
-
headers2.set(key, value);
|
|
307
|
-
}
|
|
308
|
-
return headers2;
|
|
309
|
-
};
|
|
300
|
+
var mergeHeaders = (...headersInits) => headersInits.reduce(
|
|
301
|
+
(acc, headers2) => __spreadValues(__spreadValues({}, acc), Object.fromEntries(new Headers(headers2).entries())),
|
|
302
|
+
{}
|
|
303
|
+
);
|
|
310
304
|
|
|
311
305
|
// src/i18n/de.json
|
|
312
306
|
var de_default = {
|
|
@@ -7761,7 +7755,7 @@ var isPartialLocalValueMatch = (partialValue, component) => {
|
|
|
7761
7755
|
const matchingKeys = allKeys.filter(
|
|
7762
7756
|
(key) => !isNullish(partialValue[key]) && !isNullish(componentValue[key])
|
|
7763
7757
|
);
|
|
7764
|
-
return matchingKeys.every((key) => {
|
|
7758
|
+
return matchingKeys.length > 0 && matchingKeys.every((key) => {
|
|
7765
7759
|
const componentForKey = getComponentForLocalValueKey(key, component);
|
|
7766
7760
|
return componentForKey ? isPartialLocalValueMatch(partialValue[key], componentForKey) : false;
|
|
7767
7761
|
});
|
|
@@ -11652,6 +11646,7 @@ function SelectInputRendererComponent(props) {
|
|
|
11652
11646
|
label,
|
|
11653
11647
|
options,
|
|
11654
11648
|
placeholder,
|
|
11649
|
+
required,
|
|
11655
11650
|
selectedIndex,
|
|
11656
11651
|
onSelect
|
|
11657
11652
|
} = props;
|
|
@@ -11694,7 +11689,7 @@ function SelectInputRendererComponent(props) {
|
|
|
11694
11689
|
renderValue,
|
|
11695
11690
|
filterable: items.length >= 8,
|
|
11696
11691
|
onChange: onSelect,
|
|
11697
|
-
onClear: () => onSelect(null)
|
|
11692
|
+
onClear: required ? void 0 : () => onSelect(null)
|
|
11698
11693
|
}
|
|
11699
11694
|
) }),
|
|
11700
11695
|
children
|
|
@@ -15341,7 +15336,7 @@ var _FormControl = class _FormControl extends PureComponent {
|
|
|
15341
15336
|
onFilterChange: search && onSearchChange ? ({ query }) => {
|
|
15342
15337
|
onSearchChange(query);
|
|
15343
15338
|
} : void 0,
|
|
15344
|
-
onClear: () => {
|
|
15339
|
+
onClear: required ? void 0 : () => {
|
|
15345
15340
|
this.setState({ selectedOption: null });
|
|
15346
15341
|
this.props.onChange(null);
|
|
15347
15342
|
}
|
|
@@ -15679,7 +15674,18 @@ var getOptions = (schema, controlType) => {
|
|
|
15679
15674
|
return null;
|
|
15680
15675
|
};
|
|
15681
15676
|
function SchemaFormControl(props) {
|
|
15682
|
-
const {
|
|
15677
|
+
const {
|
|
15678
|
+
id,
|
|
15679
|
+
schema,
|
|
15680
|
+
value,
|
|
15681
|
+
disabled,
|
|
15682
|
+
required,
|
|
15683
|
+
onChange,
|
|
15684
|
+
onFocus,
|
|
15685
|
+
onBlur,
|
|
15686
|
+
onSearchChange,
|
|
15687
|
+
describedBy
|
|
15688
|
+
} = props;
|
|
15683
15689
|
const log = useLogger();
|
|
15684
15690
|
const getSanitisedValue = (value2) => isNativeInput(schema.type) && (isNull3(value2) || isUndefined3(value2)) ? "" : value2;
|
|
15685
15691
|
const onModelChange = (value2, type, metadata) => {
|
|
@@ -15710,7 +15716,8 @@ function SchemaFormControl(props) {
|
|
|
15710
15716
|
displayPattern: schema.displayFormat,
|
|
15711
15717
|
// TODO: LOW avoid type assertion below
|
|
15712
15718
|
uploadProps: mapSchemaToUploadOptions(schema),
|
|
15713
|
-
describedBy
|
|
15719
|
+
describedBy,
|
|
15720
|
+
required
|
|
15714
15721
|
};
|
|
15715
15722
|
return /* @__PURE__ */ jsx88("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ jsx88(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
|
|
15716
15723
|
}
|
|
@@ -15830,6 +15837,7 @@ function OneOfSchema(props) {
|
|
|
15830
15837
|
value: schemaIndex,
|
|
15831
15838
|
disabled: props.disabled,
|
|
15832
15839
|
describedBy: feedbackId,
|
|
15840
|
+
required: props.required,
|
|
15833
15841
|
onChange: onChooseNewSchema,
|
|
15834
15842
|
onFocus,
|
|
15835
15843
|
onBlur,
|
|
@@ -8,7 +8,7 @@ export type BooleanInputComponent = InputComponent<boolean> & {
|
|
|
8
8
|
validationState: ValidationState;
|
|
9
9
|
onChange: (value: boolean) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const createBooleanInputComponent: (booleanInputProps: Pick<BooleanInputComponent, "
|
|
11
|
+
export declare const createBooleanInputComponent: (booleanInputProps: Pick<BooleanInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "description" | "errors" | "hidden" | "help" | "disabled" | "required" | "persistedState" | "validationState"> & {
|
|
12
12
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
13
13
|
performRefresh: PerformRefresh | undefined;
|
|
14
14
|
performValidationAsync: PerformValidationAsync | undefined;
|
|
@@ -11,7 +11,7 @@ export type DateInputComponent = InputComponent<string | null> & {
|
|
|
11
11
|
validationState: ValidationState;
|
|
12
12
|
onChange: (value: string | null) => void;
|
|
13
13
|
};
|
|
14
|
-
export declare const createDateInputComponent: (textInputProps: Pick<DateInputComponent, "
|
|
14
|
+
export declare const createDateInputComponent: (textInputProps: Pick<DateInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "description" | "errors" | "hidden" | "help" | "disabled" | "placeholder" | "required" | "autoComplete" | "persistedState" | "validationState" | "minimumDate" | "maximumDate"> & {
|
|
15
15
|
checks: IsInvalidCheck<string | null>[];
|
|
16
16
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
17
17
|
performRefresh: PerformRefresh | undefined;
|
|
@@ -9,7 +9,7 @@ export type IntegerInputComponent = InputComponent<number | null> & {
|
|
|
9
9
|
validationState: ValidationState;
|
|
10
10
|
onChange: (value: number | null) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "
|
|
12
|
+
export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "description" | "errors" | "hidden" | "help" | "disabled" | "placeholder" | "required" | "autoComplete" | "persistedState" | "validationState"> & {
|
|
13
13
|
checks: IsInvalidCheck<number | null>[];
|
|
14
14
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
15
15
|
performRefresh: PerformRefresh | undefined;
|
|
@@ -14,7 +14,7 @@ export type MultiUploadInputComponent = InputComponent<File[]> & {
|
|
|
14
14
|
onDelete: (fileId: string) => Promise<void>;
|
|
15
15
|
onUpload: (file: File, fileId: string) => Promise<void>;
|
|
16
16
|
};
|
|
17
|
-
export declare const createMultiUploadInputComponent: (uploadInputProps: Pick<MultiUploadInputComponent, "
|
|
17
|
+
export declare const createMultiUploadInputComponent: (uploadInputProps: Pick<MultiUploadInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "maxItems" | "minItems" | "description" | "errors" | "hidden" | "help" | "disabled" | "placeholder" | "accepts" | "maxSize" | "required" | "format" | "autoComplete" | "persistedState" | "uploadLabel"> & {
|
|
18
18
|
checks: IsInvalidCheck<File[]>[];
|
|
19
19
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
20
20
|
onValueChange: OnValueChange;
|
|
@@ -9,7 +9,7 @@ export type NumberInputComponent = InputComponent<number | null> & {
|
|
|
9
9
|
validationState: ValidationState;
|
|
10
10
|
onChange: (value: number | null) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "
|
|
12
|
+
export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "description" | "errors" | "hidden" | "help" | "disabled" | "placeholder" | "required" | "autoComplete" | "persistedState" | "validationState"> & {
|
|
13
13
|
checks: IsInvalidCheck<number | null>[];
|
|
14
14
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
15
15
|
performRefresh: PerformRefresh | undefined;
|
|
@@ -10,7 +10,7 @@ export type TextInputComponent = InputComponent<string | null> & {
|
|
|
10
10
|
validationState: ValidationState;
|
|
11
11
|
onChange: (value: string | null) => void;
|
|
12
12
|
};
|
|
13
|
-
export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "
|
|
13
|
+
export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "description" | "errors" | "hidden" | "help" | "disabled" | "placeholder" | "required" | "displayFormat" | "autoComplete" | "persistedState" | "validationState"> & {
|
|
14
14
|
checks: IsInvalidCheck<string | null>[];
|
|
15
15
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
16
16
|
performValidationAsync: PerformValidationAsync | undefined;
|
|
@@ -10,7 +10,7 @@ export type UploadInputComponent = InputComponent<File | null> & {
|
|
|
10
10
|
persistedState: PersistedState;
|
|
11
11
|
onUpload: (value: File | null) => Promise<void>;
|
|
12
12
|
};
|
|
13
|
-
export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "
|
|
13
|
+
export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "id" | "uid" | "control" | "analyticsId" | "value" | "title" | "description" | "errors" | "hidden" | "help" | "disabled" | "placeholder" | "accepts" | "maxSize" | "required" | "format" | "autoComplete" | "persistedState"> & {
|
|
14
14
|
checks: IsInvalidCheck<File | null>[];
|
|
15
15
|
performPersistAsync: PerformPersistAsync | undefined;
|
|
16
16
|
performRefresh?: PerformRefresh | undefined;
|