@dataloop-ai/components 0.18.76 → 0.18.78
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/DlTable/DlTable.vue +77 -4
- package/src/components/compound/DlTable/hooks/tableColumnSelection.ts +5 -4
- package/src/components/compound/DlTable/utils/props.ts +6 -1
- package/src/components/compound/DlTreeTable/emits.ts +1 -0
- 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/DlTableDemo.vue +10 -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
|
|
@@ -332,6 +332,34 @@
|
|
|
332
332
|
{{ col.label }}
|
|
333
333
|
</DlTh>
|
|
334
334
|
</slot>
|
|
335
|
+
<DlTh
|
|
336
|
+
v-if="hasEditableColumns"
|
|
337
|
+
key="visibleColsBtn"
|
|
338
|
+
>
|
|
339
|
+
<dl-button
|
|
340
|
+
text-color="dl-color-medium"
|
|
341
|
+
flat
|
|
342
|
+
icon="icon-dl-column"
|
|
343
|
+
>
|
|
344
|
+
<dl-menu>
|
|
345
|
+
<dl-list separator>
|
|
346
|
+
<dl-option-group
|
|
347
|
+
:model-value="
|
|
348
|
+
computedVisibleCols
|
|
349
|
+
"
|
|
350
|
+
:options="groupOptions"
|
|
351
|
+
:left-label="true"
|
|
352
|
+
max-width="250px"
|
|
353
|
+
type="switch"
|
|
354
|
+
class="table-options"
|
|
355
|
+
@update:model-value="
|
|
356
|
+
handleVisibleColumnsUpdate
|
|
357
|
+
"
|
|
358
|
+
/>
|
|
359
|
+
</dl-list>
|
|
360
|
+
</dl-menu>
|
|
361
|
+
</dl-button>
|
|
362
|
+
</DlTh>
|
|
335
363
|
</DlTr>
|
|
336
364
|
|
|
337
365
|
<tr
|
|
@@ -583,8 +611,16 @@ import {
|
|
|
583
611
|
import { injectProp } from '../../../utils/inject-object-prop'
|
|
584
612
|
import { DlTableRow, DlTableProps, DlTableColumn } from './types'
|
|
585
613
|
import { DlPagination } from '../DlPagination'
|
|
586
|
-
import {
|
|
614
|
+
import {
|
|
615
|
+
DlIcon,
|
|
616
|
+
DlCheckbox,
|
|
617
|
+
DlProgressBar,
|
|
618
|
+
DlMenu,
|
|
619
|
+
DlList
|
|
620
|
+
} from '../../essential'
|
|
587
621
|
import { ResizableManager } from './utils'
|
|
622
|
+
import { DlButton } from '../../basic'
|
|
623
|
+
import { DlOptionGroup } from '../../compound'
|
|
588
624
|
import DlEmptyState from '../../basic/DlEmptyState/DlEmptyState.vue'
|
|
589
625
|
import { v4 } from 'uuid'
|
|
590
626
|
import { flatTreeData } from '../DlTreeTable/utils/flatTreeData'
|
|
@@ -606,7 +642,11 @@ export default defineComponent({
|
|
|
606
642
|
DlProgressBar,
|
|
607
643
|
DlIcon,
|
|
608
644
|
DlCheckbox,
|
|
609
|
-
DlEmptyState
|
|
645
|
+
DlEmptyState,
|
|
646
|
+
DlButton,
|
|
647
|
+
DlOptionGroup,
|
|
648
|
+
DlMenu,
|
|
649
|
+
DlList
|
|
610
650
|
},
|
|
611
651
|
props,
|
|
612
652
|
emits,
|
|
@@ -625,6 +665,21 @@ export default defineComponent({
|
|
|
625
665
|
const virtScrollRef = ref(null)
|
|
626
666
|
const hasVirtScroll = computed(() => props.virtualScroll === true)
|
|
627
667
|
|
|
668
|
+
const groupOptions = computed(() =>
|
|
669
|
+
(props.columns as DlTableColumn[]).map((item) => ({
|
|
670
|
+
label: item.label,
|
|
671
|
+
value: item.name
|
|
672
|
+
}))
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
const visibleColumnsState = ref(
|
|
676
|
+
(props.columns as DlTableColumn[]).map((col) => col.name)
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
const computedVisibleCols = computed(() =>
|
|
680
|
+
computedCols.value.map((col) => col.name)
|
|
681
|
+
)
|
|
682
|
+
|
|
628
683
|
const { hasAnyAction } = useTableActions(props) // todo: does not work
|
|
629
684
|
|
|
630
685
|
const getRowKey = computed(() =>
|
|
@@ -790,6 +845,13 @@ export default defineComponent({
|
|
|
790
845
|
}
|
|
791
846
|
)
|
|
792
847
|
|
|
848
|
+
watch(
|
|
849
|
+
() => (props as any).visibleColummns,
|
|
850
|
+
(value) => {
|
|
851
|
+
visibleColumnsState.value = value
|
|
852
|
+
}
|
|
853
|
+
)
|
|
854
|
+
|
|
793
855
|
watch(
|
|
794
856
|
() => props.draggable,
|
|
795
857
|
() => {
|
|
@@ -950,7 +1012,8 @@ export default defineComponent({
|
|
|
950
1012
|
props as unknown as DlTableProps,
|
|
951
1013
|
computedPagination,
|
|
952
1014
|
hasSelectionMode,
|
|
953
|
-
hasDraggableRows
|
|
1015
|
+
hasDraggableRows,
|
|
1016
|
+
visibleColumnsState
|
|
954
1017
|
)
|
|
955
1018
|
|
|
956
1019
|
const { columnToSort, computedSortMethod, sort } = useTableSort(
|
|
@@ -1243,6 +1306,12 @@ export default defineComponent({
|
|
|
1243
1306
|
() => Object.keys(props.emptyStateProps).length > 0
|
|
1244
1307
|
)
|
|
1245
1308
|
|
|
1309
|
+
const handleVisibleColumnsUpdate = (columns: string[]) => {
|
|
1310
|
+
if (columns.length < 1) return
|
|
1311
|
+
visibleColumnsState.value = columns
|
|
1312
|
+
emit('update-visible-columns', columns)
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1246
1315
|
return {
|
|
1247
1316
|
uuid: `dl-table-${v4()}`,
|
|
1248
1317
|
rootRef,
|
|
@@ -1296,7 +1365,11 @@ export default defineComponent({
|
|
|
1296
1365
|
hasSlotHeaderSelection,
|
|
1297
1366
|
stopAndPrevent,
|
|
1298
1367
|
updatePagination,
|
|
1299
|
-
hasEmptyStateProps
|
|
1368
|
+
hasEmptyStateProps,
|
|
1369
|
+
groupOptions,
|
|
1370
|
+
visibleColumnsState,
|
|
1371
|
+
handleVisibleColumnsUpdate,
|
|
1372
|
+
computedVisibleCols
|
|
1300
1373
|
}
|
|
1301
1374
|
}
|
|
1302
1375
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, ComputedRef } from 'vue-demi'
|
|
1
|
+
import { computed, ComputedRef, Ref } from 'vue-demi'
|
|
2
2
|
|
|
3
3
|
import { isNumber } from '../../../../utils/is'
|
|
4
4
|
import { DlTableProps, DlTableColumn, DlTableRow } from '../types'
|
|
@@ -12,7 +12,8 @@ export function useTableColumnSelection(
|
|
|
12
12
|
props: DlTableProps,
|
|
13
13
|
computedPagination: ComputedRef<TablePagination>,
|
|
14
14
|
hasSelectionMode: ComputedRef<boolean>,
|
|
15
|
-
hasDraggableRows: ComputedRef<boolean
|
|
15
|
+
hasDraggableRows: ComputedRef<boolean>,
|
|
16
|
+
visibleColumnsState: Ref
|
|
16
17
|
) {
|
|
17
18
|
const colList = computed(() => {
|
|
18
19
|
if (props.columns) {
|
|
@@ -40,11 +41,11 @@ export function useTableColumnSelection(
|
|
|
40
41
|
const computedCols = computed(() => {
|
|
41
42
|
const { sortBy, descending } = computedPagination.value
|
|
42
43
|
|
|
43
|
-
const cols =
|
|
44
|
+
const cols = visibleColumnsState?.value
|
|
44
45
|
? colList.value.filter(
|
|
45
46
|
(col) =>
|
|
46
47
|
col.required === true ||
|
|
47
|
-
|
|
48
|
+
visibleColumnsState.value.includes(col.name) === true
|
|
48
49
|
)
|
|
49
50
|
: colList.value
|
|
50
51
|
|
|
@@ -46,6 +46,7 @@ export const props = {
|
|
|
46
46
|
virtualScroll: Boolean,
|
|
47
47
|
hidePagination: Boolean,
|
|
48
48
|
hideSelectedBanner: Boolean,
|
|
49
|
+
hasEditableColumns: Boolean,
|
|
49
50
|
selectedRowsLabel: {
|
|
50
51
|
type: Function,
|
|
51
52
|
default: (val: number) => `${val} records selected`
|
|
@@ -90,7 +91,11 @@ export const props = {
|
|
|
90
91
|
isEmpty: Boolean,
|
|
91
92
|
emptyStateProps: {
|
|
92
93
|
type: Object as PropType<DlEmptyStateProps>,
|
|
93
|
-
default:
|
|
94
|
+
default: {
|
|
95
|
+
title: '',
|
|
96
|
+
subtitle: 'No data to show yet',
|
|
97
|
+
icon: 'icon-dl-dataset-filled'
|
|
98
|
+
} as unknown as PropType<DlEmptyStateProps>
|
|
94
99
|
},
|
|
95
100
|
scrollDebounce: {
|
|
96
101
|
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 {
|
|
@@ -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">
|
|
@@ -444,6 +408,15 @@
|
|
|
444
408
|
</template>
|
|
445
409
|
</DlTable>
|
|
446
410
|
</div>
|
|
411
|
+
<div>
|
|
412
|
+
<p>With editable columns</p>
|
|
413
|
+
<DlTable
|
|
414
|
+
:rows="tableRows"
|
|
415
|
+
:columns="tableColumns"
|
|
416
|
+
title="Editable Columns"
|
|
417
|
+
has-editable-columns
|
|
418
|
+
/>
|
|
419
|
+
</div>
|
|
447
420
|
</div>
|
|
448
421
|
</div>
|
|
449
422
|
</template>
|