kui-utils 0.0.23 → 0.0.24

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/index.d.ts CHANGED
@@ -127,10 +127,7 @@ declare class MultistepForm<T extends object, U extends readonly string[] = []>
127
127
  updateFormFields: (fields: Partial<T>) => void;
128
128
  replaceFieldInArray: <V>(fieldName: keyof T, newValue: V, index: number) => void;
129
129
  addValueToField: (valueName: string, value: any, fieldName?: string | undefined) => void;
130
- getNestedField: (fieldName?: string | undefined) => {
131
- path: Partial<T>;
132
- fields: Partial<T>;
133
- };
130
+ getNestedField: (fieldName?: string | undefined) => Partial<T>;
134
131
  nextStep: () => void;
135
132
  prevStep: () => void;
136
133
  setStage: (stage: Values<U>) => void;
package/index.js CHANGED
@@ -2238,9 +2238,8 @@ var MultistepForm = /** @class */ (function () {
2238
2238
  this.addValueToField = function (valueName, value, fieldName) {
2239
2239
  if (!_this.fields)
2240
2240
  _this.fields = {};
2241
- var _a = _this.getNestedField(fieldName), path = _a.path, fields = _a.fields;
2241
+ var path = _this.getNestedField(fieldName);
2242
2242
  path[valueName] = value;
2243
- _this.fields = fields;
2244
2243
  };
2245
2244
  this.getNestedField = function (fieldName) {
2246
2245
  if (!_this.fields)
@@ -2252,12 +2251,11 @@ var MultistepForm = /** @class */ (function () {
2252
2251
  // @ts-ignore
2253
2252
  _this.fields[fieldParts[0]] = [];
2254
2253
  }
2255
- var fields = _this.fields;
2256
- var path = fields;
2254
+ var path = _this.fields;
2257
2255
  fieldParts === null || fieldParts === void 0 ? void 0 : fieldParts.forEach(function (part) {
2258
2256
  path = path[part];
2259
2257
  });
2260
- return { path: path, fields: fields };
2258
+ return path;
2261
2259
  };
2262
2260
  this.nextStep = function () {
2263
2261
  _this.step += 1;