@wise/dynamic-flow-client 2.8.1 → 2.8.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 +14 -11
- package/build/main.min.js +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/legacy/common/contexts/eventsContext/EventsContext.d.ts +1 -1
- package/build/types/legacy/common/contexts/featureContext/FeatureContext.d.ts +1 -1
- package/build/types/legacy/common/contexts/httpClientContext/HttpClientContext.d.ts +1 -1
- package/build/types/legacy/common/contexts/logContext/LogContext.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/DynamicFlow.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/stories/fixtureHttpClient.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/utils/responseParsers/response-parsers.d.ts +1 -1
- package/build/types/legacy/dynamicFlow/utils/useLoader.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/JsonSchemaForm.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/oneOfSchema/utils.d.ts +1 -1
- package/build/types/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +1 -1
- package/build/types/legacy/layout/search/useSearch.d.ts +1 -1
- package/build/types/legacy/step/cameraStep/cameraCapture/CameraCapture.d.ts +1 -1
- package/build/types/legacy/step/cameraStep/cameraCapture/hooks/useFullScreenOrientationLock.d.ts +1 -1
- package/build/types/legacy/step/cameraStep/cameraCapture/tracking/index.d.ts +1 -1
- package/build/types/legacy/test-utils/DynamicFlowProviders.d.ts +1 -1
- package/build/types/legacy/test-utils/legacy-utils.d.ts +1 -1
- package/build/types/revamp/DynamicFlowRevamp.d.ts +2 -6
- package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +8 -0
- package/build/types/revamp/domain/components/NumberInputComponent.d.ts +8 -0
- package/build/types/revamp/domain/components/ObjectComponent.d.ts +2 -1
- package/build/types/revamp/domain/components/TextInputComponent.d.ts +4 -20
- package/build/types/revamp/domain/components/utils/component-utils.d.ts +12 -0
- package/build/types/revamp/domain/events/getAnalyticsEventDispatcher.d.ts +9 -0
- package/build/types/revamp/domain/events/getLogggingEventDispatcher.d.ts +4 -0
- package/build/types/revamp/domain/events/index.d.ts +2 -0
- package/build/types/revamp/domain/mappers/mapSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/integerSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/numberSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/schema/objectSchemaToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/stringSchemaToComponent.d.ts +1 -8
- package/build/types/revamp/domain/mappers/schema/tests/test-utils.d.ts +21 -0
- package/build/types/revamp/domain/mappers/schema/types.d.ts +5 -1
- package/build/types/revamp/domain/mappers/types.d.ts +4 -3
- package/build/types/revamp/domain/mappers/utils/getAutocompleteString.d.ts +2 -0
- package/build/types/revamp/domain/types.d.ts +16 -2
- package/build/types/revamp/domain/validation/getModelValidationErrors.d.ts +6 -0
- package/build/types/revamp/domain/validation/spec-utils.d.ts +11 -0
- package/build/types/revamp/{utils → domain/validation}/validateComponents.d.ts +1 -1
- package/build/types/revamp/domain/validation/value-checks.d.ts +13 -0
- package/build/types/revamp/dynamic-flow-types.d.ts +38 -0
- package/build/types/revamp/renderers/mappers/integerInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/numberInputComponentToProps.d.ts +3 -0
- package/build/types/revamp/renderers/mappers/textInputComponentToProps.d.ts +1 -1
- package/build/types/revamp/renderers/types.d.ts +18 -4
- package/build/types/revamp/step/Step.d.ts +4 -1
- package/build/types/revamp/utils/type-utils.d.ts +3 -1
- package/build/types/revamp/wise/renderers/IntegerInputRenderer.d.ts +3 -0
- package/build/types/revamp/wise/renderers/NumberInputRenderer.d.ts +3 -0
- package/package.json +1 -1
- package/build/types/revamp/domain/mappers/utils/value-checks.d.ts +0 -10
- /package/build/types/{dynamic-flow-types.d.ts → legacy/dynamic-flow-types.d.ts} +0 -0
package/build/main.js
CHANGED
|
@@ -1008,7 +1008,7 @@ function getActionById(actions, id) {
|
|
|
1008
1008
|
return action;
|
|
1009
1009
|
}
|
|
1010
1010
|
function isReference(block) {
|
|
1011
|
-
return Object.
|
|
1011
|
+
return Object.hasOwnProperty.call(block, "$ref");
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
1014
|
// src/legacy/dynamicFlow/DynamicFlow.tsx
|
|
@@ -1694,7 +1694,7 @@ var isEqual = (a, b) => {
|
|
|
1694
1694
|
var isObjectEquals = (a, b) => {
|
|
1695
1695
|
const keysA = Object.keys(a);
|
|
1696
1696
|
const keysB = Object.keys(b);
|
|
1697
|
-
return keysA.length === keysB.length && keysA.every((key) => Object.
|
|
1697
|
+
return keysA.length === keysB.length && keysA.every((key) => Object.hasOwnProperty.call(b, key) && isEqual(a[key], b[key]));
|
|
1698
1698
|
};
|
|
1699
1699
|
var isNonNullObject = (a) => typeof a === "object" && a !== null;
|
|
1700
1700
|
|
|
@@ -3113,24 +3113,27 @@ var getActiveSchemaIndex = (schema, model) => {
|
|
|
3113
3113
|
return null;
|
|
3114
3114
|
};
|
|
3115
3115
|
var getValidIndexFromValue = (schema, value) => {
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3116
|
+
const predicate = (childSchema) => !isUndefined(value) && isValidSchema(value, childSchema);
|
|
3117
|
+
if (schema.oneOf.filter(predicate).length === 1) {
|
|
3118
|
+
return schema.oneOf.findIndex(predicate);
|
|
3119
|
+
}
|
|
3120
|
+
return -1;
|
|
3119
3121
|
};
|
|
3120
3122
|
function getBestMatchingSchemaIndexForValue(schema, value) {
|
|
3121
3123
|
if (value === null || value === void 0) {
|
|
3122
3124
|
return null;
|
|
3123
3125
|
}
|
|
3124
|
-
const schemaPoints = schema.oneOf.map(
|
|
3125
|
-
|
|
3126
|
+
const schemaPoints = schema.oneOf.map(
|
|
3127
|
+
(childSchema) => getSchemaProperties(childSchema).reduce((total, [key, propertySchema]) => {
|
|
3126
3128
|
if (isConstSchema(propertySchema) && propertySchema.const === value[key]) {
|
|
3127
3129
|
return total + 2;
|
|
3128
|
-
}
|
|
3130
|
+
}
|
|
3131
|
+
if (isNoNConstSchema(propertySchema) && typeof value[key] !== "undefined") {
|
|
3129
3132
|
return total + 1;
|
|
3130
3133
|
}
|
|
3131
3134
|
return total;
|
|
3132
|
-
}, 0)
|
|
3133
|
-
|
|
3135
|
+
}, 0)
|
|
3136
|
+
);
|
|
3134
3137
|
if (schemaPoints.every((p) => p === schemaPoints[0])) {
|
|
3135
3138
|
return null;
|
|
3136
3139
|
}
|
|
@@ -7049,7 +7052,7 @@ var getSchemaReference = (component) => {
|
|
|
7049
7052
|
}
|
|
7050
7053
|
return component.schemaId;
|
|
7051
7054
|
};
|
|
7052
|
-
var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object" && !Object.
|
|
7055
|
+
var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object" && !Object.hasOwnProperty.call(schema, "$ref");
|
|
7053
7056
|
|
|
7054
7057
|
// src/legacy/dynamicFlow/utils/useLoader.tsx
|
|
7055
7058
|
var import_components35 = require("@transferwise/components");
|