reneco-advanced-input-module 0.0.26 → 0.0.27

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.
@@ -4810,6 +4810,8 @@ const VoiceFormRecorder = class {
4810
4810
  if (!originalField.Settings)
4811
4811
  originalField.Settings = {};
4812
4812
  originalField.Settings.Default_Value = field.value;
4813
+ const rawConf = typeof field.confidence === 'number' ? field.confidence : parseFloat(field.confidence);
4814
+ originalField.confidence = isNaN(rawConf) ? null : rawConf;
4813
4815
  }
4814
4816
  });
4815
4817
  }
@@ -4823,6 +4825,8 @@ const VoiceFormRecorder = class {
4823
4825
  originalField = updatedSchema[1].items.find((child) => child.label === field.name);
4824
4826
  if (originalField && field.value !== undefined && field.value !== null && field.value !== '') {
4825
4827
  updatedSchema[2][originalField.name] = field.value;
4828
+ const rawConf = typeof field.confidence === 'number' ? field.confidence : parseFloat(field.confidence);
4829
+ originalField.confidence = isNaN(rawConf) ? null : rawConf;
4826
4830
  }
4827
4831
  });
4828
4832
  }
@@ -4832,11 +4836,14 @@ const VoiceFormRecorder = class {
4832
4836
  if (filledData === null || filledData === void 0 ? void 0 : filledData.fields) {
4833
4837
  Object.entries(filledData.fields).forEach(([fieldID, field]) => {
4834
4838
  if (field.value !== undefined && field.value !== null && field.value !== '') {
4839
+ const rawConf = typeof field.confidence === 'number' ? field.confidence : parseFloat(field.confidence);
4840
+ const confidence = isNaN(rawConf) ? null : rawConf;
4835
4841
  if (field.id) {
4836
4842
  const schemaField = updatedSchema.fields[field.id];
4837
4843
  if (schemaField) {
4838
4844
  schemaField.value = field.value;
4839
4845
  schemaField.default = field.value;
4846
+ schemaField.confidence = confidence;
4840
4847
  }
4841
4848
  }
4842
4849
  else {
@@ -4846,6 +4853,7 @@ const VoiceFormRecorder = class {
4846
4853
  if (schemaField.title === fieldName) {
4847
4854
  schemaField.value = field.value;
4848
4855
  schemaField.default = field.value;
4856
+ schemaField.confidence = confidence;
4849
4857
  break;
4850
4858
  }
4851
4859
  }