@dataloop-ai/components 0.19.38 → 0.19.40
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,321 +1,337 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:id="uuid"
|
|
4
|
-
|
|
5
|
-
:class="rootContainerClasses"
|
|
4
|
+
style="display: block"
|
|
6
5
|
>
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
6
|
+
<div
|
|
7
|
+
:style="cssVars"
|
|
8
|
+
:class="rootContainerClasses"
|
|
9
|
+
>
|
|
10
|
+
<div class="row full-width full-height">
|
|
12
11
|
<div
|
|
13
|
-
|
|
14
|
-
:
|
|
15
|
-
'dl-input__title-container': true,
|
|
16
|
-
'dl-input__title-container--s': isSmall
|
|
17
|
-
}"
|
|
12
|
+
:class="`${isSmall ? 'col' : 'row full-width'} top`"
|
|
13
|
+
:style="`${isSmall ? 'flex-grow: 0;' : ''}`"
|
|
18
14
|
>
|
|
19
|
-
<
|
|
20
|
-
v-if="!!title.length"
|
|
21
|
-
class="
|
|
22
|
-
|
|
15
|
+
<div
|
|
16
|
+
v-if="!!title.length || !!tooltip.length"
|
|
17
|
+
:class="{
|
|
18
|
+
'dl-input__title-container': true,
|
|
19
|
+
'dl-input__title-container--s': isSmall
|
|
20
|
+
}"
|
|
23
21
|
>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
<label
|
|
23
|
+
v-if="!!title.length"
|
|
24
|
+
class="dl-input__title"
|
|
25
|
+
:style="`${isSmall ? 'width: 90%' : 'width: 100%'}`"
|
|
26
|
+
>
|
|
27
|
+
<dl-ellipsis>
|
|
28
|
+
{{ title
|
|
29
|
+
}}<span
|
|
30
|
+
v-if="required"
|
|
31
|
+
:class="asteriskClasses"
|
|
32
|
+
>
|
|
33
|
+
*</span>
|
|
34
|
+
{{
|
|
35
|
+
!required && optional ? ' (Optional)' : null
|
|
36
|
+
}}
|
|
37
|
+
</dl-ellipsis>
|
|
38
|
+
</label>
|
|
39
|
+
<span v-if="!!tooltip.length">
|
|
40
|
+
<dl-icon
|
|
41
|
+
class="dl-input__tooltip-icon"
|
|
42
|
+
icon="icon-dl-info"
|
|
43
|
+
size="12px"
|
|
44
|
+
/>
|
|
45
|
+
<dl-tooltip>
|
|
46
|
+
{{ tooltip }}
|
|
47
|
+
</dl-tooltip>
|
|
48
|
+
</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div
|
|
51
|
+
v-if="!!topMessage.length && !isSmall"
|
|
52
|
+
class="break"
|
|
53
|
+
/>
|
|
54
|
+
<div
|
|
55
|
+
v-if="!!topMessage.length"
|
|
56
|
+
:class="{
|
|
57
|
+
'dl-input__top-message-container': true,
|
|
58
|
+
'dl-input__top-message-container--s': isSmall
|
|
59
|
+
}"
|
|
60
|
+
>
|
|
61
|
+
<dl-info-error-message
|
|
62
|
+
v-if="!!topMessage.length"
|
|
63
|
+
position="above"
|
|
64
|
+
:value="topMessage"
|
|
39
65
|
/>
|
|
40
|
-
|
|
41
|
-
{{ tooltip }}
|
|
42
|
-
</dl-tooltip>
|
|
43
|
-
</span>
|
|
66
|
+
</div>
|
|
44
67
|
</div>
|
|
45
|
-
<div
|
|
46
|
-
v-if="!!topMessage.length && !isSmall"
|
|
47
|
-
class="break"
|
|
48
|
-
/>
|
|
49
68
|
<div
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}"
|
|
69
|
+
:class="`${
|
|
70
|
+
isSmall ? 'col' : 'row'
|
|
71
|
+
} bottom-section full-width full-height`"
|
|
72
|
+
:style="{ cursor: disabled ? 'not-allowed' : '' }"
|
|
55
73
|
>
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:class="`${
|
|
65
|
-
isSmall ? 'col' : 'row'
|
|
66
|
-
} bottom-section full-width full-height`"
|
|
67
|
-
:style="{ cursor: disabled ? 'not-allowed' : '' }"
|
|
68
|
-
>
|
|
69
|
-
<div class="row center full-width full-height">
|
|
70
|
-
<div :class="wrapperClasses">
|
|
71
|
-
<div
|
|
72
|
-
v-if="hasPrepend"
|
|
73
|
-
:class="[
|
|
74
|
-
...adornmentClasses,
|
|
75
|
-
'dl-input__adornment-container--pos-left'
|
|
76
|
-
]"
|
|
77
|
-
>
|
|
78
|
-
<slot name="prepend" />
|
|
79
|
-
</div>
|
|
80
|
-
<div
|
|
81
|
-
ref="input"
|
|
82
|
-
:contenteditable="!readonly && !disabled"
|
|
83
|
-
:class="inputClasses"
|
|
84
|
-
:placeholder="placeholder"
|
|
85
|
-
@input="onChange"
|
|
86
|
-
@focus="onFocus"
|
|
87
|
-
@blur="onBlur"
|
|
88
|
-
@keydown="onKeydown"
|
|
89
|
-
@keyup.enter="onEnterPress"
|
|
90
|
-
@paste="handlePaste"
|
|
91
|
-
>
|
|
92
|
-
<span
|
|
93
|
-
v-if="readonly || disabled"
|
|
94
|
-
:class="{
|
|
95
|
-
'placeholder-string': showPlaceholder,
|
|
96
|
-
'placeholder-string--disabled': disabled
|
|
97
|
-
}"
|
|
98
|
-
>{{
|
|
99
|
-
showPlaceholder ? placeholder : modelValue
|
|
100
|
-
}}</span>
|
|
101
|
-
</div>
|
|
102
|
-
<div
|
|
103
|
-
v-if="
|
|
104
|
-
hasAppend ||
|
|
105
|
-
showClearButton ||
|
|
106
|
-
showShowPassButton
|
|
107
|
-
"
|
|
108
|
-
:class="[
|
|
109
|
-
...adornmentClasses,
|
|
110
|
-
'dl-input__adornment-container--pos-right'
|
|
111
|
-
]"
|
|
112
|
-
>
|
|
113
|
-
<slot
|
|
114
|
-
v-if="hasAppend"
|
|
115
|
-
name="append"
|
|
116
|
-
/>
|
|
117
|
-
<span
|
|
118
|
-
v-if="showClearButton"
|
|
119
|
-
class="dl-input__adornment-container--clear"
|
|
74
|
+
<div class="row center full-width full-height">
|
|
75
|
+
<div :class="wrapperClasses">
|
|
76
|
+
<div
|
|
77
|
+
v-if="hasPrepend"
|
|
78
|
+
:class="[
|
|
79
|
+
...adornmentClasses,
|
|
80
|
+
'dl-input__adornment-container--pos-left'
|
|
81
|
+
]"
|
|
120
82
|
>
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<span v-if="showShowPassButton">
|
|
135
|
-
<dl-button
|
|
136
|
-
ref="input-show-pass-button"
|
|
137
|
-
:icon="passShowIcon"
|
|
138
|
-
size="s"
|
|
139
|
-
text-color="dl-color-darker"
|
|
140
|
-
flat
|
|
141
|
-
fluid
|
|
142
|
-
@click="onPassShowClick"
|
|
143
|
-
/>
|
|
144
|
-
<dl-tooltip>
|
|
145
|
-
{{ showPass ? 'Hide' : 'Show' }}
|
|
146
|
-
</dl-tooltip>
|
|
147
|
-
</span>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
<dl-menu
|
|
151
|
-
v-if="showSuggestItems"
|
|
152
|
-
v-model="isMenuOpen"
|
|
153
|
-
auto-close
|
|
154
|
-
no-focus
|
|
155
|
-
:offset="[0, 3]"
|
|
156
|
-
fit-container
|
|
157
|
-
:fit-content="fitContent"
|
|
158
|
-
:arrow-nav-items="stringSuggestions"
|
|
159
|
-
@click="onMenuShow"
|
|
160
|
-
@highlightedIndex="setHighlightedIndex"
|
|
161
|
-
@handleSelectedItem="handleSelectedItem"
|
|
162
|
-
>
|
|
163
|
-
<dl-list
|
|
164
|
-
bordered
|
|
165
|
-
:style="{ maxWidth: suggestMenuWidth }"
|
|
166
|
-
>
|
|
167
|
-
<dl-list-item
|
|
168
|
-
v-for="(item, suggestIndex) in suggestItems"
|
|
169
|
-
:key="item.suggestion"
|
|
170
|
-
clickable
|
|
171
|
-
style="font-size: 12px"
|
|
172
|
-
:highlighted="suggestIndex === highlightedIndex"
|
|
173
|
-
@click="onClick($event, item)"
|
|
83
|
+
<slot name="prepend" />
|
|
84
|
+
</div>
|
|
85
|
+
<div
|
|
86
|
+
ref="input"
|
|
87
|
+
:contenteditable="!readonly && !disabled"
|
|
88
|
+
:class="inputClasses"
|
|
89
|
+
:placeholder="placeholder"
|
|
90
|
+
@input="onChange"
|
|
91
|
+
@focus="onFocus"
|
|
92
|
+
@blur="onBlur"
|
|
93
|
+
@keydown="onKeydown"
|
|
94
|
+
@keyup.enter="onEnterPress"
|
|
95
|
+
@paste="handlePaste"
|
|
174
96
|
>
|
|
175
|
-
<img
|
|
176
|
-
v-if="item.image"
|
|
177
|
-
:src="item.image"
|
|
178
|
-
class="dl-input__suggestion--image"
|
|
179
|
-
>
|
|
180
97
|
<span
|
|
181
|
-
v-
|
|
182
|
-
item.suggestion,
|
|
183
|
-
modelValue
|
|
184
|
-
)"
|
|
185
|
-
:key="JSON.stringify(word) + index"
|
|
98
|
+
v-if="readonly || disabled"
|
|
186
99
|
:class="{
|
|
187
|
-
'
|
|
188
|
-
|
|
100
|
+
'placeholder-string': showPlaceholder,
|
|
101
|
+
'placeholder-string--disabled': disabled
|
|
189
102
|
}"
|
|
190
|
-
>
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
] === ' '
|
|
198
|
-
"
|
|
199
|
-
> </span>
|
|
200
|
-
</span>
|
|
201
|
-
</dl-list-item>
|
|
202
|
-
</dl-list>
|
|
203
|
-
</dl-menu>
|
|
204
|
-
</div>
|
|
205
|
-
<div class="row bottom full-width">
|
|
206
|
-
<div
|
|
207
|
-
v-if="bottomMessage"
|
|
208
|
-
class="row full-width dl-input__bottom-message-container"
|
|
209
|
-
style="justify-content: space-between"
|
|
210
|
-
>
|
|
211
|
-
<div>
|
|
212
|
-
<dl-info-error-message
|
|
103
|
+
>{{
|
|
104
|
+
showPlaceholder
|
|
105
|
+
? placeholder
|
|
106
|
+
: modelValue
|
|
107
|
+
}}</span>
|
|
108
|
+
</div>
|
|
109
|
+
<div
|
|
213
110
|
v-if="
|
|
214
|
-
|
|
111
|
+
hasAppend ||
|
|
112
|
+
showClearButton ||
|
|
113
|
+
showShowPassButton
|
|
215
114
|
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
115
|
+
:class="[
|
|
116
|
+
...adornmentClasses,
|
|
117
|
+
'dl-input__adornment-container--pos-right'
|
|
118
|
+
]"
|
|
119
|
+
>
|
|
120
|
+
<slot
|
|
121
|
+
v-if="hasAppend"
|
|
122
|
+
name="append"
|
|
123
|
+
/>
|
|
124
|
+
<span
|
|
125
|
+
v-if="showClearButton"
|
|
126
|
+
class="dl-input__adornment-container--clear"
|
|
127
|
+
>
|
|
128
|
+
<dl-button
|
|
129
|
+
ref="input-clear-button"
|
|
130
|
+
icon="icon-dl-close"
|
|
131
|
+
:size="clearIconSize"
|
|
132
|
+
text-color="dl-color-darker"
|
|
133
|
+
flat
|
|
134
|
+
fluid
|
|
135
|
+
@click="onClear"
|
|
136
|
+
/>
|
|
137
|
+
<dl-tooltip v-if="clearButtonTooltip">
|
|
138
|
+
Remove text
|
|
139
|
+
</dl-tooltip>
|
|
140
|
+
</span>
|
|
141
|
+
<span v-if="showShowPassButton">
|
|
142
|
+
<dl-button
|
|
143
|
+
ref="input-show-pass-button"
|
|
144
|
+
:icon="passShowIcon"
|
|
145
|
+
size="s"
|
|
146
|
+
text-color="dl-color-darker"
|
|
147
|
+
flat
|
|
148
|
+
fluid
|
|
149
|
+
@click="onPassShowClick"
|
|
150
|
+
/>
|
|
151
|
+
<dl-tooltip>
|
|
152
|
+
{{ showPass ? 'Hide' : 'Show' }}
|
|
153
|
+
</dl-tooltip>
|
|
154
|
+
</span>
|
|
155
|
+
</div>
|
|
240
156
|
</div>
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
157
|
+
<dl-menu
|
|
158
|
+
v-if="showSuggestItems"
|
|
159
|
+
v-model="isMenuOpen"
|
|
160
|
+
auto-close
|
|
161
|
+
no-focus
|
|
162
|
+
:offset="[0, 3]"
|
|
163
|
+
fit-container
|
|
164
|
+
:fit-content="fitContent"
|
|
165
|
+
:arrow-nav-items="stringSuggestions"
|
|
166
|
+
@click="onMenuShow"
|
|
167
|
+
@highlightedIndex="setHighlightedIndex"
|
|
168
|
+
@handleSelectedItem="handleSelectedItem"
|
|
169
|
+
>
|
|
170
|
+
<dl-list
|
|
171
|
+
bordered
|
|
172
|
+
:style="{ maxWidth: suggestMenuWidth }"
|
|
245
173
|
>
|
|
246
|
-
|
|
247
|
-
|
|
174
|
+
<dl-list-item
|
|
175
|
+
v-for="(item, suggestIndex) in suggestItems"
|
|
176
|
+
:key="item.suggestion"
|
|
177
|
+
clickable
|
|
178
|
+
style="font-size: 12px"
|
|
179
|
+
:highlighted="
|
|
180
|
+
suggestIndex === highlightedIndex
|
|
181
|
+
"
|
|
182
|
+
@click="onClick($event, item)"
|
|
183
|
+
>
|
|
184
|
+
<img
|
|
185
|
+
v-if="item.image"
|
|
186
|
+
:src="item.image"
|
|
187
|
+
class="dl-input__suggestion--image"
|
|
188
|
+
>
|
|
189
|
+
<span
|
|
190
|
+
v-for="(word, index) in getSuggestWords(
|
|
191
|
+
item.suggestion,
|
|
192
|
+
modelValue
|
|
193
|
+
)"
|
|
194
|
+
:key="JSON.stringify(word) + index"
|
|
195
|
+
:class="{
|
|
196
|
+
'dl-input__suggestion--highlighted':
|
|
197
|
+
word.highlighted
|
|
198
|
+
}"
|
|
199
|
+
>
|
|
200
|
+
<span v-if="word.value[0] === ' '"> </span>
|
|
201
|
+
{{ word.value }}
|
|
202
|
+
<span
|
|
203
|
+
v-if="
|
|
204
|
+
word.value[
|
|
205
|
+
word.value.length - 1
|
|
206
|
+
] === ' '
|
|
207
|
+
"
|
|
208
|
+
> </span>
|
|
209
|
+
</span>
|
|
210
|
+
</dl-list-item>
|
|
211
|
+
</dl-list>
|
|
212
|
+
</dl-menu>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="row bottom full-width">
|
|
215
|
+
<div
|
|
216
|
+
v-if="bottomMessage"
|
|
217
|
+
class="row full-width dl-input__bottom-message-container"
|
|
218
|
+
style="justify-content: space-between"
|
|
219
|
+
>
|
|
220
|
+
<div>
|
|
221
|
+
<dl-info-error-message
|
|
222
|
+
v-if="
|
|
223
|
+
!!infoMessage.length &&
|
|
224
|
+
!error &&
|
|
225
|
+
!warning
|
|
226
|
+
"
|
|
227
|
+
position="below"
|
|
228
|
+
:value="infoMessage"
|
|
229
|
+
/>
|
|
230
|
+
<dl-info-error-message
|
|
231
|
+
v-else-if="
|
|
232
|
+
error &&
|
|
233
|
+
!!errorMessage &&
|
|
234
|
+
!!errorMessage.length
|
|
235
|
+
"
|
|
236
|
+
position="below"
|
|
237
|
+
error
|
|
238
|
+
:value="errorMessage"
|
|
239
|
+
/>
|
|
240
|
+
<dl-info-error-message
|
|
241
|
+
v-else-if="
|
|
242
|
+
warning &&
|
|
243
|
+
!!warningMessage &&
|
|
244
|
+
!!warningMessage.length &&
|
|
245
|
+
!error
|
|
246
|
+
"
|
|
247
|
+
position="below"
|
|
248
|
+
warning
|
|
249
|
+
:value="warningMessage"
|
|
250
|
+
/>
|
|
251
|
+
</div>
|
|
252
|
+
<div>
|
|
253
|
+
<span
|
|
254
|
+
v-if="
|
|
255
|
+
showCounter &&
|
|
256
|
+
maxLength &&
|
|
257
|
+
maxLength > 0
|
|
258
|
+
"
|
|
259
|
+
class="dl-input__counter"
|
|
260
|
+
>
|
|
261
|
+
{{ characterCounter }}
|
|
262
|
+
</span>
|
|
263
|
+
</div>
|
|
248
264
|
</div>
|
|
249
265
|
</div>
|
|
250
266
|
</div>
|
|
267
|
+
<div
|
|
268
|
+
v-if="files.length"
|
|
269
|
+
class="dl-input__files"
|
|
270
|
+
>
|
|
271
|
+
<input-file-element
|
|
272
|
+
v-for="file in files"
|
|
273
|
+
:key="file.id"
|
|
274
|
+
:file="file"
|
|
275
|
+
@remove-file="emitRemoveFile"
|
|
276
|
+
@zoom-image="handleZoomImage"
|
|
277
|
+
@rename-file="handleRenameFileModal"
|
|
278
|
+
/>
|
|
279
|
+
</div>
|
|
251
280
|
</div>
|
|
281
|
+
<dl-dialog-box
|
|
282
|
+
v-if="currentZoomImage"
|
|
283
|
+
v-model="zoomImageModel"
|
|
284
|
+
volatile
|
|
285
|
+
width="60vw"
|
|
286
|
+
style="--dl-dialog-box-content-padding: 0"
|
|
287
|
+
>
|
|
288
|
+
<template #body>
|
|
289
|
+
<img
|
|
290
|
+
class="dl-input__zoom-image"
|
|
291
|
+
:src="currentZoomImage"
|
|
292
|
+
>
|
|
293
|
+
</template>
|
|
294
|
+
</dl-dialog-box>
|
|
295
|
+
<dl-dialog-box
|
|
296
|
+
v-model="renameFileModel"
|
|
297
|
+
volatile
|
|
298
|
+
:style="`--dl-dialog-box-header-height: 25px;
|
|
299
|
+
--dl-dialog-box-footer-height: 25px;`"
|
|
300
|
+
>
|
|
301
|
+
<template #header>
|
|
302
|
+
<dl-dialog-box-header
|
|
303
|
+
title="Rename File"
|
|
304
|
+
close-button
|
|
305
|
+
@onClose="renameFileModel = false"
|
|
306
|
+
/>
|
|
307
|
+
</template>
|
|
308
|
+
<template #body>
|
|
309
|
+
<dl-input
|
|
310
|
+
v-model="newFileName"
|
|
311
|
+
title="Name"
|
|
312
|
+
red-asterisk
|
|
313
|
+
min-width="80%"
|
|
314
|
+
hide-clear-button
|
|
315
|
+
:placeholder="`Enter new file ${currentFile.name}`"
|
|
316
|
+
/>
|
|
317
|
+
</template>
|
|
318
|
+
<template #footer>
|
|
319
|
+
<dl-dialog-box-footer>
|
|
320
|
+
<div style="display: flex; justify-content: flex-end">
|
|
321
|
+
<dl-button @click="handleRenameFile">
|
|
322
|
+
Rename
|
|
323
|
+
</dl-button>
|
|
324
|
+
</div>
|
|
325
|
+
</dl-dialog-box-footer>
|
|
326
|
+
</template>
|
|
327
|
+
</dl-dialog-box>
|
|
252
328
|
<div
|
|
253
|
-
v-if="
|
|
254
|
-
class="dl-
|
|
329
|
+
v-if="hasAction"
|
|
330
|
+
class="dl-input__action"
|
|
255
331
|
>
|
|
256
|
-
<
|
|
257
|
-
v-for="file in files"
|
|
258
|
-
:key="file.id"
|
|
259
|
-
:file="file"
|
|
260
|
-
@remove-file="emitRemoveFile"
|
|
261
|
-
@zoom-image="handleZoomImage"
|
|
262
|
-
@rename-file="handleRenameFileModal"
|
|
263
|
-
/>
|
|
332
|
+
<slot name="action" />
|
|
264
333
|
</div>
|
|
265
334
|
</div>
|
|
266
|
-
<dl-dialog-box
|
|
267
|
-
v-if="currentZoomImage"
|
|
268
|
-
v-model="zoomImageModel"
|
|
269
|
-
volatile
|
|
270
|
-
width="60vw"
|
|
271
|
-
style="--dl-dialog-box-content-padding: 0"
|
|
272
|
-
>
|
|
273
|
-
<template #body>
|
|
274
|
-
<img
|
|
275
|
-
class="dl-input__zoom-image"
|
|
276
|
-
:src="currentZoomImage"
|
|
277
|
-
>
|
|
278
|
-
</template>
|
|
279
|
-
</dl-dialog-box>
|
|
280
|
-
<dl-dialog-box
|
|
281
|
-
v-model="renameFileModel"
|
|
282
|
-
volatile
|
|
283
|
-
:style="`--dl-dialog-box-header-height: 25px;
|
|
284
|
-
--dl-dialog-box-footer-height: 25px;`"
|
|
285
|
-
>
|
|
286
|
-
<template #header>
|
|
287
|
-
<dl-dialog-box-header
|
|
288
|
-
title="Rename File"
|
|
289
|
-
close-button
|
|
290
|
-
@onClose="renameFileModel = false"
|
|
291
|
-
/>
|
|
292
|
-
</template>
|
|
293
|
-
<template #body>
|
|
294
|
-
<dl-input
|
|
295
|
-
v-model="newFileName"
|
|
296
|
-
title="Name"
|
|
297
|
-
red-asterisk
|
|
298
|
-
min-width="80%"
|
|
299
|
-
hide-clear-button
|
|
300
|
-
:placeholder="`Enter new file ${currentFile.name}`"
|
|
301
|
-
/>
|
|
302
|
-
</template>
|
|
303
|
-
<template #footer>
|
|
304
|
-
<dl-dialog-box-footer>
|
|
305
|
-
<div style="display: flex; justify-content: flex-end">
|
|
306
|
-
<dl-button @click="handleRenameFile">
|
|
307
|
-
Rename
|
|
308
|
-
</dl-button>
|
|
309
|
-
</div>
|
|
310
|
-
</dl-dialog-box-footer>
|
|
311
|
-
</template>
|
|
312
|
-
</dl-dialog-box>
|
|
313
|
-
<div
|
|
314
|
-
v-if="hasAction"
|
|
315
|
-
class="dl-input__action"
|
|
316
|
-
>
|
|
317
|
-
<slot name="action" />
|
|
318
|
-
</div>
|
|
319
335
|
</div>
|
|
320
336
|
</template>
|
|
321
337
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
@virtual-scroll="onVScroll"
|
|
71
71
|
>
|
|
72
72
|
<template #before>
|
|
73
|
-
<thead
|
|
73
|
+
<thead>
|
|
74
74
|
<slot
|
|
75
75
|
v-if="!hideHeader"
|
|
76
76
|
name="header"
|
|
@@ -166,6 +166,7 @@
|
|
|
166
166
|
flat
|
|
167
167
|
icon="icon-dl-column"
|
|
168
168
|
tooltip="Manage columns"
|
|
169
|
+
:disabled="isDataEmpty"
|
|
169
170
|
>
|
|
170
171
|
<slot
|
|
171
172
|
name="header-cell-visible-columns-menu"
|
|
@@ -418,10 +419,7 @@
|
|
|
418
419
|
class="dl-table"
|
|
419
420
|
:class="additionalClasses"
|
|
420
421
|
>
|
|
421
|
-
<thead
|
|
422
|
-
v-if="hasThead"
|
|
423
|
-
:colspan="columns.length"
|
|
424
|
-
>
|
|
422
|
+
<thead :colspan="columns.length">
|
|
425
423
|
<slot
|
|
426
424
|
v-if="!hideHeader"
|
|
427
425
|
name="header"
|
|
@@ -516,6 +514,7 @@
|
|
|
516
514
|
flat
|
|
517
515
|
icon="icon-dl-column"
|
|
518
516
|
tooltip="Manage columns"
|
|
517
|
+
:disabled="isDataEmpty"
|
|
519
518
|
>
|
|
520
519
|
<slot
|
|
521
520
|
name="header-cell-visible-columns-menu"
|
|
@@ -750,23 +749,6 @@
|
|
|
750
749
|
</slot>
|
|
751
750
|
</slot>
|
|
752
751
|
|
|
753
|
-
<DlTr v-if="isDataEmpty && hasEmptyStateProps">
|
|
754
|
-
<DlTd colspan="100%">
|
|
755
|
-
<div class="flex justify-center full-width">
|
|
756
|
-
<dl-empty-state v-bind="emptyStateProps">
|
|
757
|
-
<template
|
|
758
|
-
v-for="(_, slot) in $slots"
|
|
759
|
-
#[slot]="emptyStateProps"
|
|
760
|
-
>
|
|
761
|
-
<slot
|
|
762
|
-
:name="slot"
|
|
763
|
-
v-bind="emptyStateProps"
|
|
764
|
-
/>
|
|
765
|
-
</template>
|
|
766
|
-
</dl-empty-state>
|
|
767
|
-
</div>
|
|
768
|
-
</DlTd>
|
|
769
|
-
</DlTr>
|
|
770
752
|
<slot
|
|
771
753
|
name="bottom-row"
|
|
772
754
|
:cols="computedCols"
|
|
@@ -781,11 +763,30 @@
|
|
|
781
763
|
:class="bottomClasses"
|
|
782
764
|
>
|
|
783
765
|
<div
|
|
784
|
-
v-if="nothingToDisplay && !hideNoData
|
|
766
|
+
v-if="nothingToDisplay && !hideNoData"
|
|
785
767
|
class="dl-table__control"
|
|
786
768
|
>
|
|
787
769
|
<slot name="no-data">
|
|
788
|
-
|
|
770
|
+
<DlTr v-if="isDataEmpty && hasEmptyStateProps && !loading">
|
|
771
|
+
<DlTd colspan="100%">
|
|
772
|
+
<div class="flex justify-center full-width">
|
|
773
|
+
<dl-empty-state v-bind="emptyStateProps">
|
|
774
|
+
<template
|
|
775
|
+
v-for="(_, slot) in $slots"
|
|
776
|
+
#[slot]="emptyStateProps"
|
|
777
|
+
>
|
|
778
|
+
<slot
|
|
779
|
+
:name="slot"
|
|
780
|
+
v-bind="emptyStateProps"
|
|
781
|
+
/>
|
|
782
|
+
</template>
|
|
783
|
+
</dl-empty-state>
|
|
784
|
+
</div>
|
|
785
|
+
</DlTd>
|
|
786
|
+
</DlTr>
|
|
787
|
+
<div v-else>
|
|
788
|
+
{{ noDataMessage }}
|
|
789
|
+
</div>
|
|
789
790
|
</slot>
|
|
790
791
|
</div>
|
|
791
792
|
<div
|
|
@@ -1101,10 +1102,6 @@ export default defineComponent({
|
|
|
1101
1102
|
default: null as unknown as PropType<any[]>
|
|
1102
1103
|
},
|
|
1103
1104
|
noHover: Boolean,
|
|
1104
|
-
/**
|
|
1105
|
-
* Indicates the data is empty
|
|
1106
|
-
*/
|
|
1107
|
-
isEmpty: Boolean,
|
|
1108
1105
|
/**
|
|
1109
1106
|
* Will add another column with a button opening a menu which lets the user choose the visible columns
|
|
1110
1107
|
*/
|
|
@@ -1244,11 +1241,6 @@ export default defineComponent({
|
|
|
1244
1241
|
!!slots['top-selection']
|
|
1245
1242
|
)
|
|
1246
1243
|
//
|
|
1247
|
-
|
|
1248
|
-
const hasThead = computed(() => {
|
|
1249
|
-
return !isDataEmpty.value || !!slots['tbody']
|
|
1250
|
-
})
|
|
1251
|
-
|
|
1252
1244
|
const containerClass = computed(() => {
|
|
1253
1245
|
const { separator, bordered, dense, loading } = props
|
|
1254
1246
|
return getContainerClass(separator, bordered, dense, loading)
|
|
@@ -1870,7 +1862,6 @@ export default defineComponent({
|
|
|
1870
1862
|
return {
|
|
1871
1863
|
containerStyle,
|
|
1872
1864
|
isDataEmpty,
|
|
1873
|
-
hasThead,
|
|
1874
1865
|
handleSortableEvent,
|
|
1875
1866
|
tbodyKey,
|
|
1876
1867
|
tableKey,
|
|
@@ -33,25 +33,43 @@
|
|
|
33
33
|
<div
|
|
34
34
|
style="
|
|
35
35
|
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
36
37
|
align-content: center;
|
|
37
38
|
width: 100%;
|
|
38
39
|
height: 100%;
|
|
39
40
|
"
|
|
40
41
|
>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</
|
|
42
|
+
<div style="display: flex; width: 100%">
|
|
43
|
+
<dl-input
|
|
44
|
+
title="Group Name"
|
|
45
|
+
placeholder="Enter Group Name"
|
|
46
|
+
dense
|
|
47
|
+
required
|
|
48
|
+
red-asterisk
|
|
49
|
+
:max-length="50"
|
|
50
|
+
info-message=" "
|
|
51
|
+
show-counter
|
|
52
|
+
:error="true"
|
|
53
|
+
:error-message="'This is an error message'"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div style="display: flex; width: 100%">
|
|
58
|
+
<dl-input
|
|
59
|
+
width="100px"
|
|
60
|
+
max-width="100px"
|
|
61
|
+
placeholder="placeholder input"
|
|
62
|
+
/>
|
|
63
|
+
<p
|
|
64
|
+
style="
|
|
65
|
+
margin: 5px;
|
|
66
|
+
color: var(--dl-color-medium);
|
|
67
|
+
font-size: 10px;
|
|
68
|
+
"
|
|
69
|
+
>
|
|
70
|
+
Updated by rotemshaham@dataloop.ai
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
55
73
|
</div>
|
|
56
74
|
<p
|
|
57
75
|
style="
|
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
disabled
|
|
11
11
|
/>
|
|
12
12
|
|
|
13
|
+
<dl-input
|
|
14
|
+
style="width: 500px"
|
|
15
|
+
title="Group Name"
|
|
16
|
+
placeholder="Enter Group Name"
|
|
17
|
+
dense
|
|
18
|
+
required
|
|
19
|
+
red-asterisk
|
|
20
|
+
:max-length="50"
|
|
21
|
+
info-message=" "
|
|
22
|
+
show-counter
|
|
23
|
+
:error="true"
|
|
24
|
+
:error-message="'This is an error message'"
|
|
25
|
+
/>
|
|
26
|
+
|
|
13
27
|
<dl-input
|
|
14
28
|
v-model="textInputValue"
|
|
15
29
|
max-width="100%"
|