@dataloop-ai/components 0.18.78 → 0.18.80
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/DlAccordion/DlAccordion.vue +1 -1
- package/src/components/basic/DlPanelContainer/DlPanelContainer.vue +3 -3
- package/src/components/basic/DlPopup/DlPopup.vue +4 -4
- package/src/components/basic/DlWidget/DlWidget.vue +1 -1
- package/src/components/compound/DlCard/DlCard.vue +1 -1
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +1 -1
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +1 -1
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +1 -1
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +1 -1
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +1 -1
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +2 -2
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +3 -1
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +2 -3
- package/src/components/compound/DlStepper/DlStepper.vue +1 -2
- package/src/components/compound/DlTable/utils/props.ts +6 -5
- package/src/components/compound/DlTreeTable/props.ts +1 -1
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +2 -2
- package/src/hooks/use-suggestions.ts +1 -0
- package/src/utils/parse-smart-query.ts +12 -0
package/package.json
CHANGED
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
isEmpty: Boolean,
|
|
80
80
|
emptyStateProps: {
|
|
81
81
|
type: Object as PropType<DlEmptyStateProps>,
|
|
82
|
-
default: accordionEmptyStateProps
|
|
82
|
+
default: () => accordionEmptyStateProps
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
emits: ['update:model-value', 'hide', 'show'],
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
:style="contentStyle"
|
|
94
94
|
>
|
|
95
95
|
<div class="column" />
|
|
96
|
-
<dl-empty-state
|
|
97
|
-
v-if="isEmpty"
|
|
98
|
-
v-bind="emptyStateProps"
|
|
96
|
+
<dl-empty-state
|
|
97
|
+
v-if="isEmpty && emptyStateProps"
|
|
98
|
+
v-bind="emptyStateProps"
|
|
99
99
|
>
|
|
100
100
|
<template
|
|
101
101
|
v-for="(_, slot) in $slots"
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
</popup-header>
|
|
46
46
|
<div class="popup-content">
|
|
47
47
|
<slot v-if="!isEmpty" />
|
|
48
|
-
<dl-empty-state
|
|
49
|
-
v-if="isEmpty"
|
|
50
|
-
v-bind="emptyStateProps"
|
|
48
|
+
<dl-empty-state
|
|
49
|
+
v-if="isEmpty && emptyStateProps"
|
|
50
|
+
v-bind="emptyStateProps"
|
|
51
51
|
>
|
|
52
52
|
<template
|
|
53
53
|
v-for="(_, slot) in $slots"
|
|
@@ -189,7 +189,7 @@ export default defineComponent({
|
|
|
189
189
|
isEmpty: Boolean,
|
|
190
190
|
emptyStateProps: {
|
|
191
191
|
type: Object as PropType<DlEmptyStateProps>,
|
|
192
|
-
default:
|
|
192
|
+
default: null
|
|
193
193
|
},
|
|
194
194
|
zIndex: {
|
|
195
195
|
type: [Number, String],
|
|
@@ -181,7 +181,7 @@ export default defineComponent({
|
|
|
181
181
|
isEmpty: Boolean,
|
|
182
182
|
emptyStateProps: {
|
|
183
183
|
type: Object as PropType<DlEmptyStateProps>,
|
|
184
|
-
default: columnChartEmptyStateProps
|
|
184
|
+
default: () => columnChartEmptyStateProps
|
|
185
185
|
},
|
|
186
186
|
...CommonProps,
|
|
187
187
|
...ColumnChartProps
|
|
@@ -287,7 +287,7 @@ export default defineComponent({
|
|
|
287
287
|
isEmpty: Boolean,
|
|
288
288
|
emptyStateProps: {
|
|
289
289
|
type: Object as PropType<DlEmptyStateProps>,
|
|
290
|
-
default: confusionMatrixEmptyStateProps
|
|
290
|
+
default: () => confusionMatrixEmptyStateProps
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
293
|
setup(props) {
|
|
@@ -180,7 +180,7 @@ export default defineComponent({
|
|
|
180
180
|
isEmpty: Boolean,
|
|
181
181
|
emptyStateProps: {
|
|
182
182
|
type: Object as PropType<DlEmptyStateProps>,
|
|
183
|
-
default: lineChartEmptyStateProps
|
|
183
|
+
default: () => lineChartEmptyStateProps
|
|
184
184
|
},
|
|
185
185
|
...CommonProps,
|
|
186
186
|
...ColumnChartProps
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
name="body"
|
|
51
51
|
/>
|
|
52
52
|
<dl-empty-state
|
|
53
|
-
v-if="isEmpty"
|
|
53
|
+
v-if="isEmpty && emptyStateProps"
|
|
54
54
|
v-bind="emptyStateProps"
|
|
55
55
|
>
|
|
56
56
|
<template
|
|
@@ -109,7 +109,7 @@ export default defineComponent({
|
|
|
109
109
|
isEmpty: Boolean,
|
|
110
110
|
emptyStateProps: {
|
|
111
111
|
type: Object as PropType<DlEmptyStateProps>,
|
|
112
|
-
default:
|
|
112
|
+
default: null
|
|
113
113
|
},
|
|
114
114
|
zIndex: {
|
|
115
115
|
type: [Number, String],
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
ref="smartSearchInput"
|
|
12
12
|
v-model="queryObject"
|
|
13
13
|
style="margin-bottom: 0px"
|
|
14
|
+
:width="width"
|
|
14
15
|
:status="status"
|
|
15
16
|
:aliases="aliases"
|
|
16
17
|
:schema="schema"
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
height: '28px'
|
|
34
35
|
}"
|
|
35
36
|
:disabled="disabled"
|
|
36
|
-
@click="
|
|
37
|
+
@click="$emit('search-query', queryObject)"
|
|
37
38
|
/>
|
|
38
39
|
</div>
|
|
39
40
|
<div
|
|
@@ -138,6 +139,7 @@ export default defineComponent({
|
|
|
138
139
|
//#endregion
|
|
139
140
|
|
|
140
141
|
//#region data
|
|
142
|
+
// todo: more cleanup
|
|
141
143
|
const inputModel = ref('')
|
|
142
144
|
const jsonEditorModel = ref(false)
|
|
143
145
|
const showJSONEditor = ref(false)
|
|
@@ -901,13 +901,12 @@ export default defineComponent({
|
|
|
901
901
|
|
|
902
902
|
&__search-label {
|
|
903
903
|
font-size: 10px;
|
|
904
|
-
height:
|
|
904
|
+
height: 15px;
|
|
905
905
|
color: gray;
|
|
906
906
|
position: absolute;
|
|
907
907
|
word-break: break-all;
|
|
908
|
-
bottom: -
|
|
908
|
+
bottom: -15px;
|
|
909
909
|
max-width: 100%;
|
|
910
|
-
margin-top: 3px;
|
|
911
910
|
}
|
|
912
911
|
|
|
913
912
|
&__date-picker-wrapper {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
:state="state"
|
|
42
42
|
/>
|
|
43
43
|
<dl-empty-state
|
|
44
|
-
v-if="isEmpty"
|
|
44
|
+
v-if="isEmpty && emptyStateProps"
|
|
45
45
|
v-bind="emptyStateProps"
|
|
46
46
|
>
|
|
47
47
|
<template
|
|
@@ -159,7 +159,6 @@ export default defineComponent({
|
|
|
159
159
|
isEmpty: Boolean,
|
|
160
160
|
emptyStateProps: {
|
|
161
161
|
type: Object as PropType<DlEmptyStateProps>,
|
|
162
|
-
required: false,
|
|
163
162
|
default: null
|
|
164
163
|
}
|
|
165
164
|
},
|
|
@@ -91,11 +91,12 @@ export const props = {
|
|
|
91
91
|
isEmpty: Boolean,
|
|
92
92
|
emptyStateProps: {
|
|
93
93
|
type: Object as PropType<DlEmptyStateProps>,
|
|
94
|
-
default:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
default: () =>
|
|
95
|
+
({
|
|
96
|
+
title: '',
|
|
97
|
+
subtitle: 'No data to show yet',
|
|
98
|
+
icon: 'icon-dl-dataset-filled'
|
|
99
|
+
} as unknown as PropType<DlEmptyStateProps>)
|
|
99
100
|
},
|
|
100
101
|
scrollDebounce: {
|
|
101
102
|
type: Number,
|
|
@@ -117,7 +117,7 @@ export const props = {
|
|
|
117
117
|
isEmpty: Boolean,
|
|
118
118
|
emptyStateProps: {
|
|
119
119
|
type: Object as PropType<DlEmptyStateProps>,
|
|
120
|
-
default:
|
|
120
|
+
default: null as unknown as PropType<DlEmptyStateProps>
|
|
121
121
|
},
|
|
122
122
|
scrollDebounce: {
|
|
123
123
|
type: Number,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<dl-smart-search
|
|
27
27
|
v-model="queryObject"
|
|
28
28
|
:aliases="aliases"
|
|
29
|
-
:schema="
|
|
29
|
+
:schema="schema2"
|
|
30
30
|
:color-schema="colorSchema"
|
|
31
31
|
:filters="filters"
|
|
32
32
|
:disabled="switchState"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<dl-smart-search-input
|
|
49
49
|
v-model="queryObject2"
|
|
50
50
|
:aliases="aliases"
|
|
51
|
-
:schema="
|
|
51
|
+
:schema="schema2"
|
|
52
52
|
:color-schema="colorSchema"
|
|
53
53
|
:strict="strictState"
|
|
54
54
|
:disabled="switchState"
|
|
@@ -383,6 +383,7 @@ const isValidByDataType = (
|
|
|
383
383
|
*/
|
|
384
384
|
|
|
385
385
|
if (Array.isArray(dataType)) {
|
|
386
|
+
str = str.replace(/\'/g, '')
|
|
386
387
|
let isOneOf = !!getValueMatch(dataType, str)
|
|
387
388
|
for (const type of dataType) {
|
|
388
389
|
isOneOf = isOneOf || isValidByDataType(str, type, operator)
|
|
@@ -209,6 +209,18 @@ export const stringifySmartQuery = (query: { [key: string]: any }): string => {
|
|
|
209
209
|
continue
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
if (key === '$and') {
|
|
213
|
+
if (Array.isArray(value)) {
|
|
214
|
+
const andObject: { [key: string]: any } = {}
|
|
215
|
+
for (const subQuery of value) {
|
|
216
|
+
for (const subKey in subQuery) {
|
|
217
|
+
andObject[subKey] = subQuery[subKey]
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return stringifySmartQuery(andObject)
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
212
224
|
if (result.length) {
|
|
213
225
|
result += ' AND '
|
|
214
226
|
}
|