@legalplace/wizardx-core 4.13.0 → 4.13.1

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.
@@ -7,7 +7,6 @@ import { selectInputs } from "../selectors/inputs";
7
7
  import { OvcConverter } from "../../libs/OvcConverter";
8
8
  import { updateInstanceArguments } from "../../service/api.manager";
9
9
  import { cancelOnResetState } from "../../helpers/sagaCancelOnResetState";
10
- import { trimInputs } from "../../helpers/trimInputs";
11
10
  function* saveDataDecorator(action) {
12
11
  try {
13
12
  yield put(setDataStatus("saving"));
@@ -15,7 +14,7 @@ function* saveDataDecorator(action) {
15
14
  const uniqid = selectInstanceUniqid();
16
15
  if (uniqid === undefined)
17
16
  throw new Error("Cannot save data, uniqid is not defined");
18
- const response = yield call(fetch, ...updateInstanceArguments(permalink, uniqid, OvcConverter.convertToOvc(trimInputs(selectInputs())), action.confirmAnswer ? 0 : 1, action.additionalProperties));
17
+ const response = yield call(fetch, ...updateInstanceArguments(permalink, uniqid, OvcConverter.convertToOvc(selectInputs()), action.confirmAnswer ? 0 : 1, action.additionalProperties));
19
18
  const responseData = yield call([response, "json"]);
20
19
  if (action.redirect === true) {
21
20
  const searchParams = new URLSearchParams(window.location.search);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.13.0",
3
+ "version": "4.13.1",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -96,5 +96,5 @@
96
96
  "*.test.ts",
97
97
  "*.test.tsx"
98
98
  ],
99
- "gitHead": "331e8226c0c2a9f66024621240f8485cabe874de"
99
+ "gitHead": "19728f2e4283a9e854b52405a63281e0c28b0913"
100
100
  }
@@ -1,2 +0,0 @@
1
- import type { StateType } from "../types/State.type";
2
- export declare const trimInputs: (inputs: StateType.Inputs) => StateType.Inputs;
@@ -1,7 +0,0 @@
1
- export const trimInputs = (inputs) => {
2
- const trimmedVariables = Object.keys(inputs.variables).reduce((acc, key) => {
3
- acc[key] = inputs.variables[key].map((value) => typeof value === "string" ? value.trim() : value);
4
- return acc;
5
- }, {});
6
- return Object.assign(Object.assign({}, inputs), { variables: trimmedVariables });
7
- };