@dataloop-ai/components 0.19.121 → 0.19.122

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.19.121",
3
+ "version": "0.19.122",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -707,8 +707,12 @@ export default defineComponent({
707
707
  updateSyntax()
708
708
  setCaretAtTheEnd(input.value)
709
709
 
710
- emit('input', trimmed)
711
- emit('update:model-value', trimmed)
710
+ const toEmit = trimmed.replace(
711
+ new RegExp(' ', 'g'),
712
+ ' '
713
+ )
714
+ emit('input', toEmit)
715
+ emit('update:model-value', toEmit)
712
716
  }
713
717
  })
714
718
  }
@@ -729,8 +733,12 @@ export default defineComponent({
729
733
  isMenuOpen.value = true
730
734
  updateSyntax()
731
735
  const target = e.target as HTMLElement
732
- emit('input', target.innerText, e)
733
- emit('update:model-value', target.innerText)
736
+ const toEmit = target.innerText.replace(
737
+ new RegExp(' ', 'g'),
738
+ ' '
739
+ )
740
+ emit('input', toEmit, e)
741
+ emit('update:model-value', toEmit)
734
742
  if (autoTrim.value) {
735
743
  debouncedHandleValueTrim.value()
736
744
  }
@@ -739,9 +747,10 @@ export default defineComponent({
739
747
  const onAutoSuggestClick = (e: Event, item: string): void => {
740
748
  const newValue = clearSuggestion(modelValue.value.toString(), item)
741
749
  if (!maxLength.value || newValue.length < maxLength.value) {
742
- emit('input', newValue, e)
743
- emit('update:model-value', newValue)
744
- input.value.innerHTML = newValue
750
+ const toEmit = newValue.replace(new RegExp('&nbsp;', 'g'), ' ')
751
+ emit('input', toEmit, e)
752
+ emit('update:model-value', toEmit)
753
+ input.value.innerHTML = toEmit.replace(/ /g, '&nbsp;')
745
754
  setCaretAtTheEnd(input.value)
746
755
  isInternalChange.value = true
747
756
  }
@@ -863,8 +872,9 @@ export default defineComponent({
863
872
  stringSuggestions,
864
873
  showPlaceholder,
865
874
  spanText,
866
- handleValueTrim,
867
- debouncedHandleValueTrim
875
+ handleValueTrim: debouncedHandleValueTrim,
876
+ onModelValueChange: debouncedOnModelValueChange,
877
+ isInternalChange
868
878
  }
869
879
  },
870
880
  data() {