@dataloop-ai/components 0.18.75 → 0.18.77
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 +9 -1
- package/src/components/basic/DlKpi/DlKpi.vue +3 -1
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +6 -1
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +7 -1
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +6 -1
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +6 -1
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +6 -1
- package/src/components/compound/DlSlider/DlSlider.vue +83 -61
- package/src/components/compound/DlSlider/sliderStyles.scss +2 -2
- package/src/components/compound/DlTable/utils/props.ts +5 -1
- package/src/demos/BarChartDemo.vue +3 -40
- package/src/demos/ColumnChartDemo.vue +3 -40
- package/src/demos/DlAccordionDemo.vue +3 -39
- package/src/demos/DlChartDoughnutDemo.vue +3 -40
- package/src/demos/DlConfusionMatrixDemo.vue +2 -39
- package/src/demos/DlLineChartDemo.vue +3 -40
- package/src/demos/DlSliderDemo.vue +13 -6
- package/src/demos/DlTableDemo.vue +1 -37
package/package.json
CHANGED
|
@@ -50,6 +50,14 @@ import { DlEmptyStateProps } from '../DlEmptyState/types'
|
|
|
50
50
|
import { defineComponent, PropType } from 'vue-demi'
|
|
51
51
|
import { v4 } from 'uuid'
|
|
52
52
|
|
|
53
|
+
const accordionEmptyStateProps = {
|
|
54
|
+
title: '',
|
|
55
|
+
subtitle: 'No content to show',
|
|
56
|
+
icon: '',
|
|
57
|
+
align: 'left',
|
|
58
|
+
subtitleSize: '12px'
|
|
59
|
+
}
|
|
60
|
+
|
|
53
61
|
export default defineComponent({
|
|
54
62
|
name: 'DlAccordion',
|
|
55
63
|
components: {
|
|
@@ -71,7 +79,7 @@ export default defineComponent({
|
|
|
71
79
|
isEmpty: Boolean,
|
|
72
80
|
emptyStateProps: {
|
|
73
81
|
type: Object as PropType<DlEmptyStateProps>,
|
|
74
|
-
default:
|
|
82
|
+
default: accordionEmptyStateProps
|
|
75
83
|
}
|
|
76
84
|
},
|
|
77
85
|
emits: ['update:model-value', 'hide', 'show'],
|
|
@@ -109,6 +109,11 @@ import { useThemeVariables } from '../../../../../hooks/use-theme'
|
|
|
109
109
|
import { DlEmptyStateProps } from '../../../../basic/DlEmptyState/types'
|
|
110
110
|
import DlEmptyState from '../../../../basic/DlEmptyState/DlEmptyState.vue'
|
|
111
111
|
|
|
112
|
+
const barChartEmptyStateProps = {
|
|
113
|
+
subtitle:
|
|
114
|
+
'There was a problem processing the request. Please refresh the page.'
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
ChartJS.register(
|
|
113
118
|
CategoryScale,
|
|
114
119
|
LinearScale,
|
|
@@ -141,7 +146,7 @@ export default defineComponent({
|
|
|
141
146
|
isEmpty: Boolean,
|
|
142
147
|
emptyStateProps: {
|
|
143
148
|
type: Object as PropType<DlEmptyStateProps>,
|
|
144
|
-
default:
|
|
149
|
+
default: barChartEmptyStateProps
|
|
145
150
|
}
|
|
146
151
|
},
|
|
147
152
|
setup(props) {
|
|
@@ -140,6 +140,12 @@ import { updateKeys } from '../../../../../utils/update-key'
|
|
|
140
140
|
import { useThemeVariables } from '../../../../../hooks/use-theme'
|
|
141
141
|
import { getMaxDatasetValue } from '../../utils'
|
|
142
142
|
|
|
143
|
+
const columnChartEmptyStateProps = {
|
|
144
|
+
title: 'Something went wrong',
|
|
145
|
+
subtitle:
|
|
146
|
+
'There was a problem processing the request. Please refresh the page.'
|
|
147
|
+
}
|
|
148
|
+
|
|
143
149
|
ChartJS.register(
|
|
144
150
|
Title,
|
|
145
151
|
Tooltip,
|
|
@@ -175,7 +181,7 @@ export default defineComponent({
|
|
|
175
181
|
isEmpty: Boolean,
|
|
176
182
|
emptyStateProps: {
|
|
177
183
|
type: Object as PropType<DlEmptyStateProps>,
|
|
178
|
-
default:
|
|
184
|
+
default: columnChartEmptyStateProps
|
|
179
185
|
},
|
|
180
186
|
...CommonProps,
|
|
181
187
|
...ColumnChartProps
|
|
@@ -238,6 +238,11 @@ import {
|
|
|
238
238
|
} from './utils'
|
|
239
239
|
import { debounce, isObject } from 'lodash'
|
|
240
240
|
import { stateManager } from '../../../../../StateManager'
|
|
241
|
+
|
|
242
|
+
const confusionMatrixEmptyStateProps = {
|
|
243
|
+
subtitle:
|
|
244
|
+
'There was a problem processing the request. Please refresh the page.'
|
|
245
|
+
}
|
|
241
246
|
export default defineComponent({
|
|
242
247
|
components: {
|
|
243
248
|
DlBrush,
|
|
@@ -282,7 +287,7 @@ export default defineComponent({
|
|
|
282
287
|
isEmpty: Boolean,
|
|
283
288
|
emptyStateProps: {
|
|
284
289
|
type: Object as PropType<DlEmptyStateProps>,
|
|
285
|
-
default:
|
|
290
|
+
default: confusionMatrixEmptyStateProps
|
|
286
291
|
}
|
|
287
292
|
},
|
|
288
293
|
setup(props) {
|
|
@@ -93,6 +93,11 @@ import {
|
|
|
93
93
|
DoughnutControllerChartOptions
|
|
94
94
|
} from 'chart.js'
|
|
95
95
|
|
|
96
|
+
const doughnutChartEmptyStateProps = {
|
|
97
|
+
subtitle:
|
|
98
|
+
'There was a problem processing the request. Please refresh the page.'
|
|
99
|
+
}
|
|
100
|
+
|
|
96
101
|
ChartJS.register(Tooltip, Legend, DoughnutController, ArcElement)
|
|
97
102
|
|
|
98
103
|
import { cloneDeep, merge } from 'lodash'
|
|
@@ -136,7 +141,7 @@ export default defineComponent({
|
|
|
136
141
|
isEmpty: Boolean,
|
|
137
142
|
emptyStateProps: {
|
|
138
143
|
type: Object as PropType<DlEmptyStateProps>,
|
|
139
|
-
default:
|
|
144
|
+
default: doughnutChartEmptyStateProps
|
|
140
145
|
}
|
|
141
146
|
},
|
|
142
147
|
setup(props) {
|
|
@@ -140,6 +140,11 @@ import type {
|
|
|
140
140
|
import { orderBy, merge, isEqual, unionBy, cloneDeep } from 'lodash'
|
|
141
141
|
import { useThemeVariables } from '../../../../../hooks/use-theme'
|
|
142
142
|
|
|
143
|
+
const lineChartEmptyStateProps = {
|
|
144
|
+
subtitle:
|
|
145
|
+
'There was a problem processing the request. Please refresh the page.'
|
|
146
|
+
}
|
|
147
|
+
|
|
143
148
|
ChartJS.register(
|
|
144
149
|
Title,
|
|
145
150
|
Tooltip,
|
|
@@ -175,7 +180,7 @@ export default defineComponent({
|
|
|
175
180
|
isEmpty: Boolean,
|
|
176
181
|
emptyStateProps: {
|
|
177
182
|
type: Object as PropType<DlEmptyStateProps>,
|
|
178
|
-
default:
|
|
183
|
+
default: lineChartEmptyStateProps
|
|
179
184
|
},
|
|
180
185
|
...CommonProps,
|
|
181
186
|
...ColumnChartProps
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
:style="sliderStyles"
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
8
|
-
v-if="
|
|
9
|
-
class="slider
|
|
10
|
-
data-test="
|
|
8
|
+
v-if="slim"
|
|
9
|
+
class="slider slim"
|
|
10
|
+
data-test="slim-slider"
|
|
11
11
|
>
|
|
12
12
|
<span class="text capitalize">{{ text }}</span>
|
|
13
13
|
<dl-slider-input
|
|
14
|
-
v-model="
|
|
14
|
+
v-model="value"
|
|
15
15
|
:min="min"
|
|
16
16
|
:max="max"
|
|
17
17
|
:readonly="readonly"
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
:style="{ marginRight: '10px' }"
|
|
20
|
-
data-test="
|
|
20
|
+
data-test="slim-slider-input"
|
|
21
21
|
/>
|
|
22
22
|
<div class="slider-bar-container">
|
|
23
23
|
<dl-slider-base
|
|
24
|
-
v-model.number="
|
|
24
|
+
v-model.number="value"
|
|
25
25
|
:min="min"
|
|
26
26
|
:max="max"
|
|
27
27
|
:step="step"
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
</div>
|
|
38
38
|
<div
|
|
39
39
|
v-else
|
|
40
|
-
class="slider non-
|
|
41
|
-
data-test="non-
|
|
40
|
+
class="slider non-slim"
|
|
41
|
+
data-test="non-slim-slider"
|
|
42
42
|
>
|
|
43
43
|
<div class="header">
|
|
44
44
|
<div class="row text capitalize">
|
|
@@ -60,24 +60,24 @@
|
|
|
60
60
|
size="12px"
|
|
61
61
|
label="Reset"
|
|
62
62
|
:disabled="disabled || readonly"
|
|
63
|
-
data-test="non-
|
|
63
|
+
data-test="non-slim-slider-button"
|
|
64
64
|
@click="handleResetButtonClick"
|
|
65
65
|
/>
|
|
66
66
|
<dl-slider-input
|
|
67
67
|
id="slider-input"
|
|
68
|
-
v-model="
|
|
68
|
+
v-model="value"
|
|
69
69
|
:min="min"
|
|
70
70
|
:max="max"
|
|
71
71
|
:readonly="readonly"
|
|
72
72
|
:disabled="disabled"
|
|
73
|
-
data-test="non-
|
|
74
|
-
@change="
|
|
73
|
+
data-test="non-slim-slider-input"
|
|
74
|
+
@change="onChange"
|
|
75
75
|
/>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
78
|
<div class="slider-bar-container">
|
|
79
79
|
<dl-slider-base
|
|
80
|
-
v-model.number="
|
|
80
|
+
v-model.number="value"
|
|
81
81
|
:min="min"
|
|
82
82
|
:max="max"
|
|
83
83
|
:step="step"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
:disabled="disabled"
|
|
88
88
|
:snap="snap"
|
|
89
89
|
:name="name"
|
|
90
|
-
@change="
|
|
90
|
+
@change="onChange"
|
|
91
91
|
/>
|
|
92
92
|
</div>
|
|
93
93
|
</div>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
</template>
|
|
96
96
|
|
|
97
97
|
<script lang="ts">
|
|
98
|
-
import { defineComponent } from 'vue-demi'
|
|
98
|
+
import { computed, defineComponent, ref, toRefs, watch } from 'vue-demi'
|
|
99
99
|
import { DlSliderBase, DlSliderInput } from './components/'
|
|
100
100
|
import { DlButton } from '../../basic'
|
|
101
101
|
import { DlIcon } from '../../essential'
|
|
@@ -133,7 +133,7 @@ export default defineComponent({
|
|
|
133
133
|
type: Boolean,
|
|
134
134
|
default: false
|
|
135
135
|
},
|
|
136
|
-
|
|
136
|
+
slim: {
|
|
137
137
|
type: Boolean,
|
|
138
138
|
default: false
|
|
139
139
|
},
|
|
@@ -185,60 +185,82 @@ export default defineComponent({
|
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
187
|
emits: ['update:model-value', 'change'],
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
setup(props, { emit }) {
|
|
189
|
+
const { modelValue, min, max, textColor, width, thumbSize, color } =
|
|
190
|
+
toRefs(props)
|
|
191
|
+
const initialValue = ref(
|
|
192
|
+
modelValue.value === null
|
|
193
|
+
? min.value
|
|
194
|
+
: between(modelValue.value, min.value, max.value)
|
|
195
|
+
)
|
|
196
|
+
const displaySliderInput = ref(false)
|
|
193
197
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
computed: {
|
|
202
|
-
valueUpdate(): string {
|
|
203
|
-
return `${this.modelValue}|${this.min}|${this.max}`
|
|
204
|
-
},
|
|
205
|
-
sliderValue: {
|
|
206
|
-
get(): number {
|
|
207
|
-
return this.value
|
|
198
|
+
const value = computed({
|
|
199
|
+
get: () => {
|
|
200
|
+
return modelValue.value === null
|
|
201
|
+
? min.value
|
|
202
|
+
: between(modelValue.value, min.value, max.value)
|
|
208
203
|
},
|
|
209
|
-
set(val: number
|
|
210
|
-
|
|
211
|
-
'
|
|
212
|
-
|
|
204
|
+
set(val: number) {
|
|
205
|
+
console.log(
|
|
206
|
+
'@@@ intial, cur',
|
|
207
|
+
initialValue.value,
|
|
208
|
+
modelValue.value
|
|
213
209
|
)
|
|
210
|
+
console.log(`@@@ model value update `, val)
|
|
211
|
+
if (val === modelValue.value) {
|
|
212
|
+
return
|
|
213
|
+
}
|
|
214
|
+
emit('update:model-value', val)
|
|
215
|
+
emit('change', val)
|
|
214
216
|
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
const sliderStyles = computed<Record<string, any>>(() => {
|
|
217
220
|
return {
|
|
218
|
-
'--text-color': getColor(
|
|
219
|
-
'--width':
|
|
220
|
-
'--thumb-size': parseInt(
|
|
221
|
-
'--color': getColor(
|
|
221
|
+
'--text-color': getColor(textColor.value, 'dl-color-darker'),
|
|
222
|
+
'--width': width.value,
|
|
223
|
+
'--thumb-size': parseInt(thumbSize.value) / 2 + 'px',
|
|
224
|
+
'--color': getColor(color.value, 'dl-color-secondary')
|
|
222
225
|
}
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
const onChange = (val: number) => {
|
|
229
|
+
value.value = between(val, min.value, max.value)
|
|
223
230
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
this.value =
|
|
228
|
-
this.modelValue === null
|
|
229
|
-
? this.min
|
|
230
|
-
: between(this.modelValue, this.min, this.max)
|
|
231
|
+
|
|
232
|
+
const handleResetButtonClick = () => {
|
|
233
|
+
onChange(initialValue.value)
|
|
231
234
|
}
|
|
232
|
-
},
|
|
233
|
-
methods: {
|
|
234
|
-
handleChange(value: number) {
|
|
235
|
-
if (this.sliderValue === value) return
|
|
236
235
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
watch(
|
|
237
|
+
modelValue,
|
|
238
|
+
() => {
|
|
239
|
+
if (modelValue.value === value.value) {
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (modelValue.value === null) {
|
|
244
|
+
value.value = min.value
|
|
245
|
+
} else {
|
|
246
|
+
value.value = between(
|
|
247
|
+
modelValue.value,
|
|
248
|
+
min.value,
|
|
249
|
+
max.value
|
|
250
|
+
)
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{ immediate: true }
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
return {
|
|
257
|
+
uuid: `dl-slider-${v4()}`,
|
|
258
|
+
initialValue,
|
|
259
|
+
value,
|
|
260
|
+
sliderStyles,
|
|
261
|
+
displaySliderInput,
|
|
262
|
+
onChange,
|
|
263
|
+
handleResetButtonClick
|
|
242
264
|
}
|
|
243
265
|
}
|
|
244
266
|
})
|
|
@@ -90,7 +90,11 @@ export const props = {
|
|
|
90
90
|
isEmpty: Boolean,
|
|
91
91
|
emptyStateProps: {
|
|
92
92
|
type: Object as PropType<DlEmptyStateProps>,
|
|
93
|
-
default:
|
|
93
|
+
default: {
|
|
94
|
+
title: '',
|
|
95
|
+
subtitle: 'No data to show yet',
|
|
96
|
+
icon: 'icon-dl-dataset-filled'
|
|
97
|
+
} as unknown as PropType<DlEmptyStateProps>
|
|
94
98
|
},
|
|
95
99
|
scrollDebounce: {
|
|
96
100
|
type: Number,
|
|
@@ -21,50 +21,14 @@
|
|
|
21
21
|
:options="options"
|
|
22
22
|
:items-in-view="6"
|
|
23
23
|
is-empty
|
|
24
|
-
|
|
25
|
-
responsive: true,
|
|
26
|
-
style: 'min-height: 350px;',
|
|
27
|
-
bgSize: '130px',
|
|
28
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
29
|
-
title: 'Lorem ipsum',
|
|
30
|
-
subtitle:
|
|
31
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
32
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
33
|
-
}"
|
|
34
|
-
>
|
|
35
|
-
<template #links="">
|
|
36
|
-
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
37
|
-
<dl-button
|
|
38
|
-
padding="0px"
|
|
39
|
-
icon="icon-dl-sdk-documentation"
|
|
40
|
-
flat
|
|
41
|
-
uppercase
|
|
42
|
-
label="SDK"
|
|
43
|
-
/>
|
|
44
|
-
<div class="break" />
|
|
45
|
-
<dl-button
|
|
46
|
-
padding="0px"
|
|
47
|
-
icon="icon-dl-file"
|
|
48
|
-
flat
|
|
49
|
-
label="Documentation"
|
|
50
|
-
/>
|
|
51
|
-
<div class="break" />
|
|
52
|
-
<dl-button
|
|
53
|
-
padding="0px"
|
|
54
|
-
icon="icon-dl-youtube"
|
|
55
|
-
flat
|
|
56
|
-
label="Video"
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
59
|
-
</template>
|
|
60
|
-
</dl-bar-chart>
|
|
24
|
+
/>
|
|
61
25
|
</div>
|
|
62
26
|
</template>
|
|
63
27
|
|
|
64
28
|
<script lang="ts">
|
|
65
29
|
import { defineComponent } from 'vue-demi'
|
|
66
30
|
import { ChartOptions } from 'chart.js'
|
|
67
|
-
import { DlBarChart
|
|
31
|
+
import { DlBarChart } from '../components'
|
|
68
32
|
|
|
69
33
|
const labelsFn = () => {
|
|
70
34
|
const a = []
|
|
@@ -117,8 +81,7 @@ const options: ChartOptions = {
|
|
|
117
81
|
export default defineComponent({
|
|
118
82
|
name: 'DlChartDemo',
|
|
119
83
|
components: {
|
|
120
|
-
DlBarChart
|
|
121
|
-
DlButton
|
|
84
|
+
DlBarChart
|
|
122
85
|
},
|
|
123
86
|
data() {
|
|
124
87
|
return {
|
|
@@ -77,49 +77,13 @@
|
|
|
77
77
|
:options="options[0]"
|
|
78
78
|
style="width: 50%"
|
|
79
79
|
is-empty
|
|
80
|
-
|
|
81
|
-
responsive: true,
|
|
82
|
-
style: 'min-height: 350px;',
|
|
83
|
-
bgSize: '130px',
|
|
84
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
85
|
-
title: 'Lorem ipsum',
|
|
86
|
-
subtitle:
|
|
87
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
88
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
89
|
-
}"
|
|
90
|
-
>
|
|
91
|
-
<template #links="">
|
|
92
|
-
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
93
|
-
<dl-button
|
|
94
|
-
padding="0px"
|
|
95
|
-
icon="icon-dl-sdk-documentation"
|
|
96
|
-
flat
|
|
97
|
-
uppercase
|
|
98
|
-
label="SDK"
|
|
99
|
-
/>
|
|
100
|
-
<div class="break" />
|
|
101
|
-
<dl-button
|
|
102
|
-
padding="0px"
|
|
103
|
-
icon="icon-dl-file"
|
|
104
|
-
flat
|
|
105
|
-
label="Documentation"
|
|
106
|
-
/>
|
|
107
|
-
<div class="break" />
|
|
108
|
-
<dl-button
|
|
109
|
-
padding="0px"
|
|
110
|
-
icon="icon-dl-youtube"
|
|
111
|
-
flat
|
|
112
|
-
label="Video"
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</template>
|
|
116
|
-
</dl-column-chart>
|
|
80
|
+
/>
|
|
117
81
|
</div>
|
|
118
82
|
</template>
|
|
119
83
|
|
|
120
84
|
<script lang="ts">
|
|
121
85
|
import { defineComponent } from 'vue-demi'
|
|
122
|
-
import { DlAvatar, DlColumnChart, DlTooltip
|
|
86
|
+
import { DlAvatar, DlColumnChart, DlTooltip } from '../components'
|
|
123
87
|
|
|
124
88
|
import { orderBy } from 'lodash'
|
|
125
89
|
|
|
@@ -277,8 +241,7 @@ export default defineComponent({
|
|
|
277
241
|
components: {
|
|
278
242
|
DlColumnChart,
|
|
279
243
|
DlAvatar,
|
|
280
|
-
DlTooltip
|
|
281
|
-
DlButton
|
|
244
|
+
DlTooltip
|
|
282
245
|
},
|
|
283
246
|
data() {
|
|
284
247
|
return {
|
|
@@ -88,55 +88,19 @@
|
|
|
88
88
|
v-model="isAccordionOpen"
|
|
89
89
|
title="Empty State Component"
|
|
90
90
|
is-empty
|
|
91
|
-
|
|
92
|
-
responsive: true,
|
|
93
|
-
style: 'max-width: 300px;',
|
|
94
|
-
align: 'left',
|
|
95
|
-
bgSize: '200px',
|
|
96
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
97
|
-
title: 'Lorem ipsum',
|
|
98
|
-
subtitle:
|
|
99
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
100
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
101
|
-
}"
|
|
102
|
-
>
|
|
103
|
-
<template #links="">
|
|
104
|
-
<div style="display: flex; gap: 15px; flex-wrap: wrap">
|
|
105
|
-
<dl-button
|
|
106
|
-
padding="0px"
|
|
107
|
-
icon="icon-dl-sdk-documentation"
|
|
108
|
-
flat
|
|
109
|
-
uppercase
|
|
110
|
-
label="SDK"
|
|
111
|
-
/>
|
|
112
|
-
<dl-button
|
|
113
|
-
padding="0px"
|
|
114
|
-
icon="icon-dl-file"
|
|
115
|
-
flat
|
|
116
|
-
label="Documentation"
|
|
117
|
-
/>
|
|
118
|
-
<dl-button
|
|
119
|
-
padding="0px"
|
|
120
|
-
icon="icon-dl-youtube"
|
|
121
|
-
flat
|
|
122
|
-
label="Video"
|
|
123
|
-
/>
|
|
124
|
-
</div>
|
|
125
|
-
</template>
|
|
126
|
-
</dl-accordion>
|
|
91
|
+
/>
|
|
127
92
|
</div>
|
|
128
93
|
</div>
|
|
129
94
|
</template>
|
|
130
95
|
|
|
131
96
|
<script lang="ts">
|
|
132
|
-
import { DlAccordion, DlSwitch
|
|
97
|
+
import { DlAccordion, DlSwitch } from '../components'
|
|
133
98
|
import { defineComponent } from 'vue-demi'
|
|
134
99
|
|
|
135
100
|
export default defineComponent({
|
|
136
101
|
components: {
|
|
137
102
|
DlAccordion,
|
|
138
|
-
DlSwitch
|
|
139
|
-
DlButton
|
|
103
|
+
DlSwitch
|
|
140
104
|
},
|
|
141
105
|
data() {
|
|
142
106
|
return {
|
|
@@ -68,43 +68,7 @@
|
|
|
68
68
|
:has-summary="true"
|
|
69
69
|
:animation="doughnutAnimation"
|
|
70
70
|
is-empty
|
|
71
|
-
|
|
72
|
-
responsive: true,
|
|
73
|
-
style: 'min-height: 350px;',
|
|
74
|
-
bgSize: '130px',
|
|
75
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
76
|
-
title: 'Lorem ipsum',
|
|
77
|
-
subtitle:
|
|
78
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
79
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
80
|
-
}"
|
|
81
|
-
>
|
|
82
|
-
<template #links="">
|
|
83
|
-
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
84
|
-
<dl-button
|
|
85
|
-
padding="0px"
|
|
86
|
-
icon="icon-dl-sdk-documentation"
|
|
87
|
-
flat
|
|
88
|
-
uppercase
|
|
89
|
-
label="SDK"
|
|
90
|
-
/>
|
|
91
|
-
<div class="break" />
|
|
92
|
-
<dl-button
|
|
93
|
-
padding="0px"
|
|
94
|
-
icon="icon-dl-file"
|
|
95
|
-
flat
|
|
96
|
-
label="Documentation"
|
|
97
|
-
/>
|
|
98
|
-
<div class="break" />
|
|
99
|
-
<dl-button
|
|
100
|
-
padding="0px"
|
|
101
|
-
icon="icon-dl-youtube"
|
|
102
|
-
flat
|
|
103
|
-
label="Video"
|
|
104
|
-
/>
|
|
105
|
-
</div>
|
|
106
|
-
</template>
|
|
107
|
-
</DlDoughnutChart>
|
|
71
|
+
/>
|
|
108
72
|
</div>
|
|
109
73
|
</div>
|
|
110
74
|
</div>
|
|
@@ -113,14 +77,13 @@
|
|
|
113
77
|
<script lang="ts">
|
|
114
78
|
import { defineComponent, ref } from 'vue-demi'
|
|
115
79
|
import { DoughnutControllerChartOptions } from 'chart.js'
|
|
116
|
-
import { DlDoughnutChart
|
|
80
|
+
import { DlDoughnutChart } from '../components'
|
|
117
81
|
import { TDoughnutChartData } from '../components/compound/DlCharts/charts/DlDoughnutChart/types'
|
|
118
82
|
|
|
119
83
|
export default defineComponent({
|
|
120
84
|
name: 'DlChartDoughnutDemo',
|
|
121
85
|
components: {
|
|
122
|
-
DlDoughnutChart
|
|
123
|
-
DlButton
|
|
86
|
+
DlDoughnutChart
|
|
124
87
|
},
|
|
125
88
|
setup() {
|
|
126
89
|
const doughnutAnimation = ref<
|
|
@@ -29,50 +29,14 @@
|
|
|
29
29
|
:matrix="matrix"
|
|
30
30
|
:labels="labels"
|
|
31
31
|
is-empty
|
|
32
|
-
|
|
33
|
-
responsive: true,
|
|
34
|
-
style: 'min-height: 350px;',
|
|
35
|
-
bgSize: '130px',
|
|
36
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
37
|
-
title: 'Lorem ipsum',
|
|
38
|
-
subtitle:
|
|
39
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
40
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
41
|
-
}"
|
|
42
|
-
>
|
|
43
|
-
<template #links="">
|
|
44
|
-
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
45
|
-
<dl-button
|
|
46
|
-
padding="0px"
|
|
47
|
-
icon="icon-dl-sdk-documentation"
|
|
48
|
-
flat
|
|
49
|
-
uppercase
|
|
50
|
-
label="SDK"
|
|
51
|
-
/>
|
|
52
|
-
<div class="break" />
|
|
53
|
-
<dl-button
|
|
54
|
-
padding="0px"
|
|
55
|
-
icon="icon-dl-file"
|
|
56
|
-
flat
|
|
57
|
-
label="Documentation"
|
|
58
|
-
/>
|
|
59
|
-
<div class="break" />
|
|
60
|
-
<dl-button
|
|
61
|
-
padding="0px"
|
|
62
|
-
icon="icon-dl-youtube"
|
|
63
|
-
flat
|
|
64
|
-
label="Video"
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
</template>
|
|
68
|
-
</dl-confusion-matrix>
|
|
32
|
+
/>
|
|
69
33
|
</dl-accordion>
|
|
70
34
|
</div>
|
|
71
35
|
</template>
|
|
72
36
|
|
|
73
37
|
<script lang="ts">
|
|
74
38
|
import { defineComponent } from 'vue-demi'
|
|
75
|
-
import { DlConfusionMatrix,
|
|
39
|
+
import { DlConfusionMatrix, DlAccordion } from '../components'
|
|
76
40
|
import { DlConfusionMatrixCell } from '../types'
|
|
77
41
|
|
|
78
42
|
const getLink = (number: number) => {
|
|
@@ -118,7 +82,6 @@ const getLabels = (size: number) => {
|
|
|
118
82
|
export default defineComponent({
|
|
119
83
|
components: {
|
|
120
84
|
DlConfusionMatrix,
|
|
121
|
-
DlButton,
|
|
122
85
|
DlAccordion
|
|
123
86
|
},
|
|
124
87
|
setup() {
|
|
@@ -62,49 +62,13 @@
|
|
|
62
62
|
:options="tensionOptions"
|
|
63
63
|
style="width: 100%"
|
|
64
64
|
is-empty
|
|
65
|
-
|
|
66
|
-
responsive: true,
|
|
67
|
-
style: 'min-height: 450px;',
|
|
68
|
-
bgSize: '130px',
|
|
69
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
70
|
-
title: 'Lorem ipsum',
|
|
71
|
-
subtitle:
|
|
72
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
73
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
74
|
-
}"
|
|
75
|
-
>
|
|
76
|
-
<template #links="">
|
|
77
|
-
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
78
|
-
<dl-button
|
|
79
|
-
padding="0px"
|
|
80
|
-
icon="icon-dl-sdk-documentation"
|
|
81
|
-
flat
|
|
82
|
-
uppercase
|
|
83
|
-
label="SDK"
|
|
84
|
-
/>
|
|
85
|
-
<div class="break" />
|
|
86
|
-
<dl-button
|
|
87
|
-
padding="0px"
|
|
88
|
-
icon="icon-dl-file"
|
|
89
|
-
flat
|
|
90
|
-
label="Documentation"
|
|
91
|
-
/>
|
|
92
|
-
<div class="break" />
|
|
93
|
-
<dl-button
|
|
94
|
-
padding="0px"
|
|
95
|
-
icon="icon-dl-youtube"
|
|
96
|
-
flat
|
|
97
|
-
label="Video"
|
|
98
|
-
/>
|
|
99
|
-
</div>
|
|
100
|
-
</template>
|
|
101
|
-
</dl-line-chart>
|
|
65
|
+
/>
|
|
102
66
|
</div>
|
|
103
67
|
</template>
|
|
104
68
|
|
|
105
69
|
<script lang="ts">
|
|
106
70
|
import { defineComponent } from 'vue-demi'
|
|
107
|
-
import { DlLineChart
|
|
71
|
+
import { DlLineChart } from '../components'
|
|
108
72
|
import { orderBy } from 'lodash'
|
|
109
73
|
|
|
110
74
|
function randomIntFromInterval(min: number, max: number) {
|
|
@@ -383,8 +347,7 @@ const legendProps = {
|
|
|
383
347
|
export default defineComponent({
|
|
384
348
|
name: 'DlLineChartDemo',
|
|
385
349
|
components: {
|
|
386
|
-
DlLineChart
|
|
387
|
-
DlButton
|
|
350
|
+
DlLineChart
|
|
388
351
|
},
|
|
389
352
|
data() {
|
|
390
353
|
return {
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
:step="1"
|
|
8
8
|
:min="-100"
|
|
9
9
|
:max="100"
|
|
10
|
-
:
|
|
10
|
+
:slim="slim"
|
|
11
11
|
:readonly="readonly"
|
|
12
12
|
:disabled="disabled"
|
|
13
13
|
@change="handleChange"
|
|
14
14
|
/>
|
|
15
15
|
<div>
|
|
16
|
-
<button @click="
|
|
17
|
-
|
|
16
|
+
<button @click="slim = !slim">
|
|
17
|
+
slim: {{ slim }}
|
|
18
18
|
</button>
|
|
19
19
|
<button @click="readonly = !readonly">
|
|
20
20
|
Readonly: {{ readonly }}
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
Disable: {{ disabled }}
|
|
24
24
|
</button>
|
|
25
25
|
</div>
|
|
26
|
+
<div>
|
|
27
|
+
Events: <br>
|
|
28
|
+
{{ events }}
|
|
29
|
+
</div>
|
|
26
30
|
</div>
|
|
27
31
|
</template>
|
|
28
32
|
|
|
@@ -37,20 +41,23 @@ export default defineComponent({
|
|
|
37
41
|
},
|
|
38
42
|
data() {
|
|
39
43
|
return {
|
|
40
|
-
value:
|
|
41
|
-
|
|
44
|
+
value: null,
|
|
45
|
+
slim: false,
|
|
42
46
|
disabled: false,
|
|
43
|
-
readonly: false
|
|
47
|
+
readonly: false,
|
|
48
|
+
events: []
|
|
44
49
|
}
|
|
45
50
|
},
|
|
46
51
|
watch: {
|
|
47
52
|
value(newValue, oldValue) {
|
|
48
53
|
console.log(`@@@ model value update ${oldValue} to ${newValue}`)
|
|
54
|
+
this.events[0] = `@@@ model value update ${oldValue} to ${newValue}`
|
|
49
55
|
}
|
|
50
56
|
},
|
|
51
57
|
methods: {
|
|
52
58
|
handleChange(value: number) {
|
|
53
59
|
console.log(`@@@ handling change ${value}`)
|
|
60
|
+
this.events[1] = `@@@ handling change ${value}`
|
|
54
61
|
}
|
|
55
62
|
},
|
|
56
63
|
template: 'dl-slider-demo'
|
|
@@ -138,46 +138,10 @@
|
|
|
138
138
|
:rows-per-page-options="rowsPerPageOptions"
|
|
139
139
|
hide-pagination
|
|
140
140
|
is-empty
|
|
141
|
-
:empty-state-props="{
|
|
142
|
-
responsive: false,
|
|
143
|
-
style: 'min-height: 350px; width: 300px;',
|
|
144
|
-
bgSize: '130px',
|
|
145
|
-
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
146
|
-
title: 'Lorem ipsum',
|
|
147
|
-
subtitle:
|
|
148
|
-
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
149
|
-
info: 'To learn more about this analytics, read our documentation.'
|
|
150
|
-
}"
|
|
151
141
|
@row-click="log"
|
|
152
142
|
@th-click="log"
|
|
153
143
|
@update:selected="updateSeleted"
|
|
154
|
-
|
|
155
|
-
<template #links="">
|
|
156
|
-
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
157
|
-
<dl-button
|
|
158
|
-
padding="0px"
|
|
159
|
-
icon="icon-dl-sdk-documentation"
|
|
160
|
-
flat
|
|
161
|
-
uppercase
|
|
162
|
-
label="SDK"
|
|
163
|
-
/>
|
|
164
|
-
<div class="break" />
|
|
165
|
-
<dl-button
|
|
166
|
-
padding="0px"
|
|
167
|
-
icon="icon-dl-file"
|
|
168
|
-
flat
|
|
169
|
-
label="Documentation"
|
|
170
|
-
/>
|
|
171
|
-
<div class="break" />
|
|
172
|
-
<dl-button
|
|
173
|
-
padding="0px"
|
|
174
|
-
icon="icon-dl-youtube"
|
|
175
|
-
flat
|
|
176
|
-
label="Video"
|
|
177
|
-
/>
|
|
178
|
-
</div>
|
|
179
|
-
</template>
|
|
180
|
-
</DlTable>
|
|
144
|
+
/>
|
|
181
145
|
</div>
|
|
182
146
|
|
|
183
147
|
<div style="margin-top: 100px">
|