@dataloop-ai/components 0.20.258 → 0.20.259-new-json.0
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.20.
|
|
3
|
+
"version": "0.20.259-new-json.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./index.ts",
|
|
6
6
|
"./models": "./models.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"tokenizr": "^1.7.0",
|
|
43
43
|
"uuid": "^8.3.2",
|
|
44
44
|
"v-wave": "^1.5.0",
|
|
45
|
-
"vanilla-jsoneditor": "^0.
|
|
45
|
+
"vanilla-jsoneditor": "^0.15.1",
|
|
46
46
|
"vue-demi": "^0.14.5",
|
|
47
47
|
"vue-sortable": "^0.1.3",
|
|
48
48
|
"vue2-teleport": "^1.0.1"
|
|
@@ -53,6 +53,11 @@ export default defineComponent({
|
|
|
53
53
|
required: false,
|
|
54
54
|
type: String as PropType<Mode>,
|
|
55
55
|
default: Mode.text
|
|
56
|
+
},
|
|
57
|
+
autoFocus: {
|
|
58
|
+
required: false,
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
56
61
|
}
|
|
57
62
|
},
|
|
58
63
|
emits: [
|
|
@@ -64,7 +69,8 @@ export default defineComponent({
|
|
|
64
69
|
'blur'
|
|
65
70
|
],
|
|
66
71
|
setup(props, { emit }) {
|
|
67
|
-
const { modelValue, indentation, readonly, mode } =
|
|
72
|
+
const { modelValue, indentation, readonly, mode, autoFocus } =
|
|
73
|
+
toRefs(props)
|
|
68
74
|
|
|
69
75
|
const jsonEditorRef = ref(null)
|
|
70
76
|
const jsonEditor = ref<JSONEditor>(null as any)
|
|
@@ -159,6 +165,9 @@ export default defineComponent({
|
|
|
159
165
|
|
|
160
166
|
nextTick(() => {
|
|
161
167
|
jsonEditor.value?.refresh()
|
|
168
|
+
if (autoFocus.value) {
|
|
169
|
+
jsonEditor.value?.focus()
|
|
170
|
+
}
|
|
162
171
|
})
|
|
163
172
|
}
|
|
164
173
|
|