bfg-common 1.2.222 → 1.2.223

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.
@@ -262,26 +262,23 @@ const validationFunc = async (
262
262
  wizard.isValidateForStep(1, currentStep.id, nextStep.id) ||
263
263
  wizard.isValidateForStep(2, currentStep.id, nextStep.id)
264
264
  ) {
265
- let nameValidation: any = {}
266
265
 
267
- nameValidation = await checkName(value)
266
+ const nameValidation = await checkName(value)
268
267
 
269
- value = nameValidation.value
268
+ value = nameValidation.newValue
270
269
  stepHasError = stepHasError || nameValidation.stepHasError
271
270
  } else if (wizard.isValidateForStep(4, currentStep.id, nextStep.id)) {
272
- let storageValidation: any = {}
273
271
 
274
- storageValidation = await checkStorage(value)
272
+ const storageValidation = await checkStorage(value)
275
273
 
276
- value = storageValidation.value
274
+ value = storageValidation.newValue
277
275
 
278
276
  stepHasError = stepHasError || storageValidation.stepHasError
279
277
  } else if (wizard.isValidateForStep(8, currentStep.id, nextStep.id)) {
280
- let storageValidation: any = {}
281
278
 
282
- storageValidation = await checkCustomizeHardware(value)
279
+ const storageValidation = await checkCustomizeHardware(value)
283
280
 
284
- value = storageValidation.value
281
+ value = storageValidation.newValue
285
282
 
286
283
  stepHasError = stepHasError || storageValidation.stepHasError
287
284
  }
@@ -293,7 +290,7 @@ const validationFunc = async (
293
290
  stepShouldStop,
294
291
  }
295
292
  }
296
- const checkName = async (value: UI_I_WizardStep[]): Promise<any> => {
293
+ const checkName = async (value: UI_I_WizardStep[]): Promise<UI_I_ValidationReturn> => {
297
294
  let stepHasError = false
298
295
 
299
296
  return new Promise((resolve) => {
@@ -308,14 +305,14 @@ const checkName = async (value: UI_I_WizardStep[]): Promise<any> => {
308
305
  }
309
306
 
310
307
  resolve({
311
- value,
312
308
  stepHasError,
309
+ newValue: value,
313
310
  })
314
311
  nameFormSubmit.value = null
315
312
  }
316
313
  })
317
314
  }
318
- const checkStorage = async (value: UI_I_WizardStep[]): Promise<any> => {
315
+ const checkStorage = async (value: UI_I_WizardStep[]): Promise<UI_I_ValidationReturn> => {
319
316
  let stepHasError = false
320
317
 
321
318
  return new Promise((resolve) => {
@@ -330,8 +327,8 @@ const checkStorage = async (value: UI_I_WizardStep[]): Promise<any> => {
330
327
  }
331
328
 
332
329
  resolve({
333
- value,
334
330
  stepHasError,
331
+ newValue: value,
335
332
  })
336
333
  storageSubmit.value = null
337
334
  }
@@ -339,7 +336,7 @@ const checkStorage = async (value: UI_I_WizardStep[]): Promise<any> => {
339
336
  }
340
337
  const checkCustomizeHardware = async (
341
338
  value: UI_I_WizardStep[]
342
- ): Promise<any> => {
339
+ ): Promise<UI_I_ValidationReturn> => {
343
340
  let stepHasError = false
344
341
 
345
342
  return new Promise((resolve) => {
@@ -354,8 +351,8 @@ const checkCustomizeHardware = async (
354
351
  }
355
352
 
356
353
  resolve({
357
- value,
358
354
  stepHasError,
355
+ newValue: value,
359
356
  })
360
357
  storageSubmit.value = null
361
358
  }
@@ -473,7 +470,7 @@ watch(
473
470
  }
474
471
  )
475
472
 
476
- const validateSendData = async (value: UI_I_WizardStep[]): Promise<any> => {
473
+ const validateSendData = async (value: UI_I_WizardStep[]): Promise<UI_I_ValidationReturn> => {
477
474
  wizard.setLoader(true)
478
475
  let stepHasError = false
479
476
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.222",
4
+ "version": "1.2.223",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",