@dataloop-ai/components 0.17.64 → 0.17.65
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 +1 -1
- package/src/components/basic/DlButton/DlButton.vue +17 -8
- package/src/components/basic/DlButton/utils.ts +44 -1
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +2 -2
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +22 -5
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchFilters.vue +1 -0
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +11 -10
- package/src/components/compound/DlSearches/DlSmartSearch/components/FiltersQuery.vue +2 -5
package/package.json
CHANGED
|
@@ -62,6 +62,9 @@ import {
|
|
|
62
62
|
setColorOnHover,
|
|
63
63
|
setBorderOnHover,
|
|
64
64
|
setBgOnHover,
|
|
65
|
+
setBgOnPressed,
|
|
66
|
+
setBorderOnPressed,
|
|
67
|
+
setTextOnPressed,
|
|
65
68
|
setIconSize,
|
|
66
69
|
setIconPadding,
|
|
67
70
|
setMaxHeight
|
|
@@ -291,7 +294,8 @@ export default defineComponent({
|
|
|
291
294
|
disabled: this.disabled,
|
|
292
295
|
flat: this.flat,
|
|
293
296
|
shaded: this.shaded,
|
|
294
|
-
color: this.color
|
|
297
|
+
color: this.color,
|
|
298
|
+
outlined: this.outlined
|
|
295
299
|
}),
|
|
296
300
|
'--dl-button-text-color-hover': setColorOnHover({
|
|
297
301
|
disabled: this.disabled,
|
|
@@ -314,13 +318,18 @@ export default defineComponent({
|
|
|
314
318
|
filled: this.filled,
|
|
315
319
|
color: this.color
|
|
316
320
|
}),
|
|
317
|
-
'--dl-button-text-color-pressed':
|
|
318
|
-
|
|
319
|
-
:
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
:
|
|
323
|
-
|
|
321
|
+
'--dl-button-text-color-pressed': setTextOnPressed({
|
|
322
|
+
shaded: this.shaded,
|
|
323
|
+
outlined: this.shaded
|
|
324
|
+
}),
|
|
325
|
+
'--dl-button-bg-pressed': setBgOnPressed({
|
|
326
|
+
shaded: this.shaded,
|
|
327
|
+
outlined: this.outlined
|
|
328
|
+
}),
|
|
329
|
+
'--dl-button-border-pressed': setBorderOnPressed({
|
|
330
|
+
shaded: this.shaded,
|
|
331
|
+
outlined: this.outlined
|
|
332
|
+
})
|
|
324
333
|
}
|
|
325
334
|
}
|
|
326
335
|
|
|
@@ -70,6 +70,9 @@ export const setTextColor = ({
|
|
|
70
70
|
if (disabled) {
|
|
71
71
|
return getColor('', 'dl-color-disabled')
|
|
72
72
|
}
|
|
73
|
+
if (shaded && outlined) {
|
|
74
|
+
return 'var(--dl-color-text-darker-buttons)'
|
|
75
|
+
}
|
|
73
76
|
if (outlined) {
|
|
74
77
|
return getColor(textColor, 'dl-color-secondary')
|
|
75
78
|
}
|
|
@@ -111,13 +114,17 @@ export const setBorder = ({
|
|
|
111
114
|
disabled,
|
|
112
115
|
flat,
|
|
113
116
|
color = '',
|
|
114
|
-
shaded
|
|
117
|
+
shaded,
|
|
118
|
+
outlined
|
|
115
119
|
}: Partial<DlButtonProps>) => {
|
|
116
120
|
if (disabled) {
|
|
117
121
|
return flat
|
|
118
122
|
? 'var(--dl-color-transparent)'
|
|
119
123
|
: 'var(--dl-color-separator)'
|
|
120
124
|
}
|
|
125
|
+
if (shaded && outlined) {
|
|
126
|
+
return 'var(--dl-color-separator)'
|
|
127
|
+
}
|
|
121
128
|
if (flat || shaded) {
|
|
122
129
|
return 'var(--dl-color-transparent)'
|
|
123
130
|
}
|
|
@@ -177,3 +184,39 @@ export const setBgOnHover = ({
|
|
|
177
184
|
|
|
178
185
|
return 'var(--dl-color-panel-background)'
|
|
179
186
|
}
|
|
187
|
+
|
|
188
|
+
export const setBgOnPressed = ({
|
|
189
|
+
shaded,
|
|
190
|
+
outlined
|
|
191
|
+
}: Partial<DlButtonProps>) => {
|
|
192
|
+
if (shaded && outlined) {
|
|
193
|
+
return 'var(--dl-color-text-buttons)'
|
|
194
|
+
}
|
|
195
|
+
if (shaded) {
|
|
196
|
+
return 'var(--dl-color-secondary)'
|
|
197
|
+
}
|
|
198
|
+
return 'var(--dl-button-bg)'
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const setTextOnPressed = ({
|
|
202
|
+
shaded,
|
|
203
|
+
outlined
|
|
204
|
+
}: Partial<DlButtonProps>) => {
|
|
205
|
+
if (shaded && outlined) {
|
|
206
|
+
return 'var(--dl-color-secondary)'
|
|
207
|
+
}
|
|
208
|
+
if (shaded) {
|
|
209
|
+
return 'var(--dl-color-text-buttons)'
|
|
210
|
+
}
|
|
211
|
+
return 'var(--dl-button-text-color)'
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export const setBorderOnPressed = ({
|
|
215
|
+
shaded,
|
|
216
|
+
outlined
|
|
217
|
+
}: Partial<DlButtonProps>) => {
|
|
218
|
+
if (shaded && outlined) {
|
|
219
|
+
return 'var(--dl-color-secondary)'
|
|
220
|
+
}
|
|
221
|
+
return 'var(--dl-button-border)'
|
|
222
|
+
}
|
|
@@ -262,7 +262,7 @@ export default defineComponent({
|
|
|
262
262
|
|
|
263
263
|
.header {
|
|
264
264
|
display: flex;
|
|
265
|
-
padding: 16px;
|
|
265
|
+
padding: var(--dl-dialog-box-header-padding, 16px);
|
|
266
266
|
border-bottom: var(--dl-dialog-separator);
|
|
267
267
|
}
|
|
268
268
|
|
|
@@ -281,7 +281,7 @@ export default defineComponent({
|
|
|
281
281
|
|
|
282
282
|
.footer {
|
|
283
283
|
display: flex;
|
|
284
|
-
padding: 20px 16px;
|
|
284
|
+
padding: var(--dl-dialog-box-footer-padding, 20px 16px);
|
|
285
285
|
border-top: var(--dl-dialog-separator);
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
<dl-button
|
|
45
45
|
class="dl-smart-search__buttons--filters"
|
|
46
46
|
shaded
|
|
47
|
+
outlined
|
|
47
48
|
size="s"
|
|
48
49
|
>
|
|
49
50
|
Saved Filters
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
v-model="jsonEditorModel"
|
|
66
67
|
:height="500"
|
|
67
68
|
:width="800"
|
|
69
|
+
style="--dl-dialog-box-footer-padding: 10px 16px"
|
|
68
70
|
>
|
|
69
71
|
<template #header>
|
|
70
72
|
<dl-dialog-box-header
|
|
@@ -90,6 +92,7 @@
|
|
|
90
92
|
label="Align Left"
|
|
91
93
|
flat
|
|
92
94
|
color="secondary"
|
|
95
|
+
padding="0px 3px"
|
|
93
96
|
@click="alignJsonText"
|
|
94
97
|
/>
|
|
95
98
|
</div>
|
|
@@ -111,11 +114,13 @@
|
|
|
111
114
|
label="Delete Query"
|
|
112
115
|
flat
|
|
113
116
|
color="secondary"
|
|
117
|
+
padding="0"
|
|
114
118
|
@click="handleQueryRemove"
|
|
115
119
|
/>
|
|
116
120
|
</div>
|
|
117
121
|
<div class="json-editor__footer-save">
|
|
118
122
|
<dl-button
|
|
123
|
+
style="margin-right: 14px"
|
|
119
124
|
outlined
|
|
120
125
|
label="Save As"
|
|
121
126
|
@click="saveQueryDialogBoxModel = true"
|
|
@@ -152,7 +157,10 @@
|
|
|
152
157
|
</div>
|
|
153
158
|
</template>
|
|
154
159
|
</dl-dialog-box>
|
|
155
|
-
<dl-dialog-box
|
|
160
|
+
<dl-dialog-box
|
|
161
|
+
v-model="saveQueryDialogBoxModel"
|
|
162
|
+
style="--dl-dialog-box-footer-padding: 14px 17px"
|
|
163
|
+
>
|
|
156
164
|
<template #header>
|
|
157
165
|
<dl-dialog-box-header
|
|
158
166
|
title="Save Query"
|
|
@@ -162,17 +170,22 @@
|
|
|
162
170
|
<template #body>
|
|
163
171
|
<dl-input
|
|
164
172
|
v-model="newQueryName"
|
|
173
|
+
title="Query name"
|
|
165
174
|
style="text-align: center"
|
|
166
175
|
placeholder="Type query name"
|
|
167
176
|
/>
|
|
168
177
|
</template>
|
|
169
178
|
<template #footer>
|
|
170
179
|
<div class="dl-smart-search__buttons--save">
|
|
171
|
-
<dl-button
|
|
180
|
+
<dl-button
|
|
181
|
+
:disabled="!newQueryName"
|
|
182
|
+
outlined
|
|
183
|
+
@click="handleSaveQuery"
|
|
184
|
+
>
|
|
172
185
|
Save
|
|
173
186
|
</dl-button>
|
|
174
187
|
<dl-button
|
|
175
|
-
|
|
188
|
+
:disabled="!newQueryName"
|
|
176
189
|
@click="handleSaveQuery(true)"
|
|
177
190
|
>
|
|
178
191
|
Save and Search
|
|
@@ -685,8 +698,12 @@ export default defineComponent({
|
|
|
685
698
|
display: flex;
|
|
686
699
|
justify-content: space-between;
|
|
687
700
|
}
|
|
688
|
-
&-
|
|
689
|
-
|
|
701
|
+
&-delete {
|
|
702
|
+
align-items: center;
|
|
703
|
+
display: flex;
|
|
704
|
+
& > * {
|
|
705
|
+
margin-bottom: 6px;
|
|
706
|
+
}
|
|
690
707
|
}
|
|
691
708
|
}
|
|
692
709
|
.json-query {
|
|
@@ -66,15 +66,16 @@
|
|
|
66
66
|
v-if="withSaveButton"
|
|
67
67
|
class="dl-smart-search-input__save-btn-wrapper"
|
|
68
68
|
>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
<div>
|
|
70
|
+
<dl-button
|
|
71
|
+
icon="icon-dl-save"
|
|
72
|
+
size="16px"
|
|
73
|
+
flat
|
|
74
|
+
:disabled="saveStatus"
|
|
75
|
+
@click="save"
|
|
76
|
+
/>
|
|
76
77
|
<dl-tooltip> Save Query </dl-tooltip>
|
|
77
|
-
</
|
|
78
|
+
</div>
|
|
78
79
|
<dl-button
|
|
79
80
|
icon="icon-dl-edit"
|
|
80
81
|
size="16px"
|
|
@@ -612,7 +613,7 @@ export default defineComponent({
|
|
|
612
613
|
}
|
|
613
614
|
|
|
614
615
|
&--disabled {
|
|
615
|
-
border-color: var(--dl-color-
|
|
616
|
+
border-color: var(--dl-color-separator);
|
|
616
617
|
}
|
|
617
618
|
}
|
|
618
619
|
|
|
@@ -650,7 +651,7 @@ export default defineComponent({
|
|
|
650
651
|
height: auto;
|
|
651
652
|
|
|
652
653
|
min-height: 14px;
|
|
653
|
-
max-height:
|
|
654
|
+
max-height: var(--dl-smart-search-bar-wrapper-height);
|
|
654
655
|
display: block;
|
|
655
656
|
}
|
|
656
657
|
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
class="query__header"
|
|
9
9
|
@mousedown="$emit('select')"
|
|
10
10
|
>
|
|
11
|
-
<dl-icon
|
|
12
|
-
:icon="icon"
|
|
13
|
-
style="margin-bottom: 3px"
|
|
14
|
-
/>
|
|
11
|
+
<dl-icon :icon="icon" />
|
|
15
12
|
<span class="query__header--title">
|
|
16
13
|
{{ name }}
|
|
17
14
|
</span>
|
|
@@ -80,7 +77,7 @@ export default defineComponent({
|
|
|
80
77
|
display: flex;
|
|
81
78
|
align-items: center;
|
|
82
79
|
&--title {
|
|
83
|
-
font-size:
|
|
80
|
+
font-size: 12px;
|
|
84
81
|
margin: 0px 12px;
|
|
85
82
|
}
|
|
86
83
|
}
|