@dataloop-ai/components 0.18.141 → 0.18.143
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
|
@@ -216,7 +216,7 @@ export default defineComponent({
|
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
contentStyle(): Record<string, any> {
|
|
219
|
-
|
|
219
|
+
const styles: Record<string, any> = {
|
|
220
220
|
'padding-top':
|
|
221
221
|
this.hasHeader && this.headerHeight
|
|
222
222
|
? this.headerHeight
|
|
@@ -226,6 +226,15 @@ export default defineComponent({
|
|
|
226
226
|
? this.footerHeight
|
|
227
227
|
: 0 + 'px'
|
|
228
228
|
}
|
|
229
|
+
|
|
230
|
+
if (this.isEmpty) {
|
|
231
|
+
styles['display'] = 'flex'
|
|
232
|
+
styles['justify-content'] = 'center'
|
|
233
|
+
styles['height'] = '100%'
|
|
234
|
+
styles['max-height'] = '100%'
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return styles
|
|
229
238
|
},
|
|
230
239
|
position(): 'left' | 'right' {
|
|
231
240
|
return this.direction === 'right' ? 'left' : 'right'
|
|
@@ -57,7 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
default: Mode.text
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
emits: ['update:model-value', 'align-text', 'change'],
|
|
60
|
+
emits: ['update:model-value', 'align-text', 'change', 'focus', 'blur'],
|
|
61
61
|
setup(props, { emit }) {
|
|
62
62
|
const { modelValue, indentation, readonly, mode } = toRefs(props)
|
|
63
63
|
|
|
@@ -128,7 +128,13 @@ export default defineComponent({
|
|
|
128
128
|
readOnly: readonly.value || mode.value === Mode.tree,
|
|
129
129
|
mainMenuBar: false,
|
|
130
130
|
navigationBar: false,
|
|
131
|
-
statusBar: false
|
|
131
|
+
statusBar: false,
|
|
132
|
+
onFocus: () => {
|
|
133
|
+
emit('focus')
|
|
134
|
+
},
|
|
135
|
+
onBlur: () => {
|
|
136
|
+
emit('blur')
|
|
137
|
+
}
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
// There is type instantiation issue with JSONEditor,
|
|
@@ -27,9 +27,20 @@
|
|
|
27
27
|
v-model="jsonModel"
|
|
28
28
|
:readonly="readonly"
|
|
29
29
|
:mode="mode"
|
|
30
|
+
@change="onChange"
|
|
31
|
+
@focus="onFocus"
|
|
32
|
+
@blur="onBlur"
|
|
30
33
|
/>
|
|
31
34
|
</div>
|
|
32
35
|
<span>JSON: {{ jsonModel }}</span>
|
|
36
|
+
<div>
|
|
37
|
+
<div>changes</div>
|
|
38
|
+
{{ changes }}
|
|
39
|
+
</div>
|
|
40
|
+
<div>
|
|
41
|
+
<div>events</div>
|
|
42
|
+
{{ events }}
|
|
43
|
+
</div>
|
|
33
44
|
|
|
34
45
|
<dl-button @click="dialogState = !dialogState">
|
|
35
46
|
JsonEditor
|
|
@@ -82,6 +93,19 @@ export default defineComponent({
|
|
|
82
93
|
const jsonEditorEl = ref(null)
|
|
83
94
|
const readonly = ref(false)
|
|
84
95
|
const mode = ref(DlJsonEditorModes.text)
|
|
96
|
+
const changes = ref<any[]>([])
|
|
97
|
+
const events = ref<string[]>([])
|
|
98
|
+
|
|
99
|
+
const onChange = (change: any) => {
|
|
100
|
+
changes.value.push(change)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const onFocus = () => {
|
|
104
|
+
events.value.push('focus')
|
|
105
|
+
}
|
|
106
|
+
const onBlur = () => {
|
|
107
|
+
events.value.push('blur')
|
|
108
|
+
}
|
|
85
109
|
|
|
86
110
|
return {
|
|
87
111
|
jsonModel,
|
|
@@ -89,7 +113,12 @@ export default defineComponent({
|
|
|
89
113
|
dialogJsonModel,
|
|
90
114
|
jsonEditorEl,
|
|
91
115
|
readonly,
|
|
92
|
-
mode
|
|
116
|
+
mode,
|
|
117
|
+
changes,
|
|
118
|
+
events,
|
|
119
|
+
onChange,
|
|
120
|
+
onFocus,
|
|
121
|
+
onBlur
|
|
93
122
|
}
|
|
94
123
|
}
|
|
95
124
|
})
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width: 700px">
|
|
3
|
+
<div style="height: 1000px">
|
|
4
|
+
<dl-panel-container
|
|
5
|
+
v-model="collapseP1"
|
|
6
|
+
:direction="direction"
|
|
7
|
+
:resizable="resizable"
|
|
8
|
+
:collapsable="collapsable"
|
|
9
|
+
width="500px"
|
|
10
|
+
style="height: 100%"
|
|
11
|
+
>
|
|
12
|
+
<dl-panel
|
|
13
|
+
resizable
|
|
14
|
+
collapsable
|
|
15
|
+
>
|
|
16
|
+
<div>
|
|
17
|
+
<h3>RESIZABLE & COLLAPSABLE</h3>
|
|
18
|
+
<p>
|
|
19
|
+
Lorem ipsum dolor sit amet consectetur adipisicing
|
|
20
|
+
elit. Excepturi, rerum harum aut sunt recusandae
|
|
21
|
+
obcaecati necessitatibus. Alias nulla aliquid,
|
|
22
|
+
dolorem qui, nesciunt hic iste ratione voluptates
|
|
23
|
+
magni optio quae. Vero!
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
</dl-panel>
|
|
27
|
+
</dl-panel-container>
|
|
28
|
+
</div>
|
|
3
29
|
<div class="dl-panel-container-demo">
|
|
4
30
|
<dl-panel-container
|
|
5
31
|
v-model="collapseP1"
|