@wise/dynamic-flow-client 3.1.0-beta-e9c47a.36 → 3.1.0-beta-81cefd.37
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
|
@@ -10829,7 +10829,6 @@ var buttonLayoutToComponent = (uid, { action, context, control, disabled, margin
|
|
|
10829
10829
|
var _a;
|
|
10830
10830
|
const refAction = (action == null ? void 0 : action.$ref) ? (_a = step == null ? void 0 : step.actions) == null ? void 0 : _a.find((a) => a.$id === (action == null ? void 0 : action.$ref)) : void 0;
|
|
10831
10831
|
const mergedAction = __spreadValues(__spreadValues({}, action), refAction);
|
|
10832
|
-
console.log(mergedAction);
|
|
10833
10832
|
return createButtonComponent({
|
|
10834
10833
|
uid,
|
|
10835
10834
|
context: getButtonContext({ context, action: mergedAction }),
|
|
@@ -11954,6 +11953,12 @@ var isPartialLocalValueMatch = (partialValue, value) => {
|
|
|
11954
11953
|
}
|
|
11955
11954
|
return partialValue === value;
|
|
11956
11955
|
};
|
|
11956
|
+
var pickIndexOfFirstMatch = (arr) => {
|
|
11957
|
+
if (arr.length > 0 && arr.every((e) => e === arr[0])) {
|
|
11958
|
+
return null;
|
|
11959
|
+
}
|
|
11960
|
+
return arr.findIndex((e) => e);
|
|
11961
|
+
};
|
|
11957
11962
|
|
|
11958
11963
|
// src/revamp/domain/components/SelectInputComponent.ts
|
|
11959
11964
|
var createSelectInputComponent = (selectProps, updateComponent) => {
|
|
@@ -11975,8 +11980,10 @@ var createSelectInputComponent = (selectProps, updateComponent) => {
|
|
|
11975
11980
|
"summariser"
|
|
11976
11981
|
]);
|
|
11977
11982
|
const children = options.map((option) => option.component);
|
|
11978
|
-
const selectedIndex =
|
|
11979
|
-
|
|
11983
|
+
const selectedIndex = pickIndexOfFirstMatch(
|
|
11984
|
+
options.map(
|
|
11985
|
+
(option) => isPartialLocalValueMatch(selectProps.initialValue, option.component.getLocalValue())
|
|
11986
|
+
)
|
|
11980
11987
|
);
|
|
11981
11988
|
const update = getInputUpdateFunction(uid, updateComponent);
|
|
11982
11989
|
const getValidationErrors = getLocalValueValidator(checks);
|