@dataloop-ai/components 0.16.45 → 0.16.46
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/.eslintrc.js +2 -2
- package/package.json +10 -9
- package/src/App.vue +116 -57
- package/src/assets/globals.scss +2 -0
- package/src/components/basic/DlAlert/DlAlert.vue +1 -1
- package/src/components/basic/DlButton/DlButton.vue +13 -13
- package/src/components/basic/DlCard/DlCard.vue +217 -0
- package/src/components/basic/DlCard/index.ts +3 -0
- package/src/components/basic/DlCard/types.ts +20 -0
- package/src/components/basic/DlChip/DlChip.vue +1 -0
- package/src/components/basic/DlEllipsis/DlEllipsis.vue +90 -0
- package/src/components/basic/DlEllipsis/index.ts +2 -0
- package/src/components/basic/DlListItem/DlListItem.vue +11 -5
- package/src/components/basic/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +8 -1
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +22 -6
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +526 -0
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/utils.ts +96 -0
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +2 -2
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +22 -6
- package/src/components/compound/DlCharts/charts/index.ts +1 -0
- package/src/components/compound/DlCharts/components/DlBrush.vue +8 -1
- package/src/components/compound/DlCharts/components/DlChartScrollBar.vue +34 -21
- package/src/components/compound/DlCharts/types/DlConfusionMatrix.types.ts +19 -0
- package/src/components/compound/DlCharts/types/index.ts +2 -1
- package/src/components/compound/DlCharts/types/props.ts +14 -0
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +1 -1
- package/src/components/compound/DlDialogBox/components/DlDialogBoxFooter.vue +1 -0
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +58 -12
- package/src/components/compound/DlInput/DlInput.vue +45 -23
- package/src/components/compound/DlJsonEditor/DlJsonEditor.vue +13 -29
- package/src/components/compound/DlPagination/DlPagination.vue +14 -4
- package/src/components/compound/DlPagination/components/PageNavigation.vue +24 -25
- package/src/components/compound/DlPagination/components/PaginationLegend.vue +2 -1
- package/src/components/compound/DlPagination/components/QuickNavigation.vue +1 -0
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +86 -49
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +20 -13
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSuggestionsDropdown.vue +43 -4
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +1 -55
- package/src/components/compound/DlSearches/DlSmartSearch/utils/index.ts +42 -10
- package/src/components/compound/DlSearches/DlSmartSearch/utils/utils.ts +107 -0
- package/src/components/compound/DlSelect/DlSelect.vue +41 -8
- package/src/components/compound/DlTable/DlTable.vue +13 -10
- package/src/components/compound/DlTable/styles/dl-table-styles.scss +16 -4
- package/src/components/compound/DlToggleButton/DlToggleButton.vue +109 -0
- package/src/components/compound/DlToggleButton/config.ts +27 -0
- package/src/components/compound/DlToggleButton/index.ts +3 -0
- package/src/components/compound/DlToggleButton/types.ts +4 -0
- package/src/components/compound/index.ts +1 -0
- package/src/components/compound/types.ts +1 -0
- package/src/components/essential/DlColorPicker/DlColorPicker.vue +4 -1
- package/src/components/essential/DlColorPicker/components/DlColors.vue +2 -6
- package/src/components/essential/DlIcon/DlIcon.vue +5 -1
- package/src/components/essential/DlMenu/DlMenu.vue +30 -2
- package/src/components/essential/DlSeparator/DlSeparator.vue +62 -0
- package/src/components/essential/DlSeparator/index.ts +2 -0
- package/src/components/essential/DlSpinner/DlSpinner.vue +53 -217
- package/src/components/essential/DlSpinner/components/DlSpinnerCircle.vue +44 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerClock.vue +79 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerDots.vue +113 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerGrid.vue +166 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerLogo.vue +152 -0
- package/src/components/essential/DlSpinner/index.ts +14 -1
- package/src/components/essential/DlSpinner/styles/spinnerStyles.scss +111 -0
- package/src/components/essential/DlSpinner/types.ts +7 -0
- package/src/components/essential/index.ts +1 -0
- package/src/components/essential/types.ts +1 -0
- package/src/components/shared/DlItemSection/DlItemSection.vue +21 -15
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +36 -21
- package/src/components/shared/DlVirtualScroll/useVirtualScroll.ts +8 -10
- package/src/{demo → demos}/DlButtonDemo.vue +15 -0
- package/src/demos/DlCardDemo.vue +47 -0
- package/src/{demo → demos}/DlColorPickerDemo.vue +16 -1
- package/src/demos/DlConfusionMatrixDemo.vue +53 -0
- package/src/{demo → demos}/DlDialogBoxDemo.vue +4 -1
- package/src/demos/DlDropdownButtonDemo.vue +386 -0
- package/src/demos/DlEllipsisDemo.vue +30 -0
- package/src/{demo → demos}/DlLineChartDemo.vue +8 -8
- package/src/{demo → demos}/DlMenuDemo.vue +61 -2
- package/src/{demo → demos}/DlSearchDemo.vue +3 -2
- package/src/demos/DlSeparatorDemo.vue +44 -0
- package/src/demos/DlSpinnerDemo.vue +59 -0
- package/src/{demo → demos}/DlTableDemo.vue +117 -29
- package/src/demos/DlToggleButtonDemo.vue +57 -0
- package/src/{demo → demos}/DlTooltipDemo.vue +43 -2
- package/src/{demo → demos}/DlWidgetDemo.vue +34 -19
- package/src/{demo → demos}/SmartSearchDemo/DlSmartSearchDemo.vue +2 -50
- package/src/{demo → demos}/index.ts +14 -56
- package/src/hooks/use-arrow-navigation.ts +58 -0
- package/src/hooks/use-suggestions.ts +97 -74
- package/src/utils/colors.ts +1 -1
- package/src/utils/draggable-table.ts +2 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/parse-smart-query.ts +87 -0
- package/src/components/compound/DlCharts/types.ts +0 -1
- package/src/demo/DlDropdownButtonDemo.vue +0 -260
- package/src/demo/DlSpinnerDemo.vue +0 -20
- /package/src/{demo → demos}/BarChartDemo.vue +0 -0
- /package/src/{demo → demos}/ColumnChartDemo.vue +0 -0
- /package/src/{demo → demos}/DlAccordionDemo.vue +0 -0
- /package/src/{demo → demos}/DlAlertDemo.vue +0 -0
- /package/src/{demo → demos}/DlAvatarDemo.vue +0 -0
- /package/src/{demo → demos}/DlBadgeDemo.vue +0 -0
- /package/src/{demo → demos}/DlChartDoughnutDemo.vue +0 -0
- /package/src/{demo → demos}/DlCheckboxDemo.vue +0 -0
- /package/src/{demo → demos}/DlChipDemo.vue +0 -0
- /package/src/{demo → demos}/DlCounterDemo.vue +0 -0
- /package/src/{demo → demos}/DlDateTimeRangeDemo.vue +0 -0
- /package/src/{demo → demos}/DlIconDemo.vue +0 -0
- /package/src/{demo → demos}/DlInputDemo.vue +0 -0
- /package/src/{demo → demos}/DlKpiDemo.vue +0 -0
- /package/src/{demo → demos}/DlLinkDemo.vue +0 -0
- /package/src/{demo → demos}/DlListDemo.vue +0 -0
- /package/src/{demo → demos}/DlOptionGroupDemo.vue +0 -0
- /package/src/{demo → demos}/DlPaginationDemo.vue +0 -0
- /package/src/{demo → demos}/DlPanelContainerDemo.vue +0 -0
- /package/src/{demo → demos}/DlPopupDemo.vue +0 -0
- /package/src/{demo → demos}/DlProgressBarDemo.vue +0 -0
- /package/src/{demo → demos}/DlProgressChartDemo.vue +0 -0
- /package/src/{demo → demos}/DlRadioDemo.vue +0 -0
- /package/src/{demo → demos}/DlRangeDemo.vue +0 -0
- /package/src/{demo → demos}/DlSelectDemo.vue +0 -0
- /package/src/{demo → demos}/DlSkeletonDemo.vue +0 -0
- /package/src/{demo → demos}/DlSliderDemo.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/CenteredStepperInDialogBox.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/DlStepperDemo.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/SimpleStepper.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/StepperInDialogBox.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/index.ts +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/AssignmentsStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/DataStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/GeneralStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/InstructionStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/QualityStep.vue +0 -0
- /package/src/{demo → demos}/DlSwitchDemo.vue +0 -0
- /package/src/{demo → demos}/DlTabsDemo.vue +0 -0
- /package/src/{demo → demos}/DlTdDemo.vue +0 -0
- /package/src/{demo → demos}/DlTextAreaDemo.vue +0 -0
- /package/src/{demo → demos}/DlTextHolderDemo.vue +0 -0
- /package/src/{demo → demos}/DlThDemo.vue +0 -0
- /package/src/{demo → demos}/DlToastDemo.vue +0 -0
- /package/src/{demo → demos}/DlTrDemo.vue +0 -0
- /package/src/{demo → demos}/DlTrendDemo.vue +0 -0
- /package/src/{demo → demos}/DlTypographyDemo.vue +0 -0
- /package/src/{demo → demos}/SmartSearchDemo/schema.ts +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="spinner-wrapper">
|
|
3
|
+
<svg
|
|
4
|
+
class="dl-spinner"
|
|
5
|
+
:fill="color"
|
|
6
|
+
:width="size"
|
|
7
|
+
:height="size"
|
|
8
|
+
viewBox="0 0 105 105"
|
|
9
|
+
>
|
|
10
|
+
<circle
|
|
11
|
+
cx="12.5"
|
|
12
|
+
cy="12.5"
|
|
13
|
+
r="12.5"
|
|
14
|
+
>
|
|
15
|
+
<animate
|
|
16
|
+
attributeName="fill-opacity"
|
|
17
|
+
begin="0s"
|
|
18
|
+
dur="1s"
|
|
19
|
+
values="1;.2;1"
|
|
20
|
+
calcMode="linear"
|
|
21
|
+
repeatCount="indefinite"
|
|
22
|
+
/>
|
|
23
|
+
</circle>
|
|
24
|
+
|
|
25
|
+
<circle
|
|
26
|
+
cx="12.5"
|
|
27
|
+
cy="52.5"
|
|
28
|
+
r="12.5"
|
|
29
|
+
fill-opacity=".5"
|
|
30
|
+
>
|
|
31
|
+
<animate
|
|
32
|
+
attributeName="fill-opacity"
|
|
33
|
+
begin="100ms"
|
|
34
|
+
dur="1s"
|
|
35
|
+
values="1;.2;1"
|
|
36
|
+
calcMode="linear"
|
|
37
|
+
repeatCount="indefinite"
|
|
38
|
+
/>
|
|
39
|
+
</circle>
|
|
40
|
+
|
|
41
|
+
<circle
|
|
42
|
+
cx="52.5"
|
|
43
|
+
cy="12.5"
|
|
44
|
+
r="12.5"
|
|
45
|
+
>
|
|
46
|
+
<animate
|
|
47
|
+
attributeName="fill-opacity"
|
|
48
|
+
begin="300ms"
|
|
49
|
+
dur="1s"
|
|
50
|
+
values="1;.2;1"
|
|
51
|
+
calcMode="linear"
|
|
52
|
+
repeatCount="indefinite"
|
|
53
|
+
/>
|
|
54
|
+
</circle>
|
|
55
|
+
|
|
56
|
+
<circle
|
|
57
|
+
cx="52.5"
|
|
58
|
+
cy="52.5"
|
|
59
|
+
r="12.5"
|
|
60
|
+
>
|
|
61
|
+
<animate
|
|
62
|
+
attributeName="fill-opacity"
|
|
63
|
+
begin="600ms"
|
|
64
|
+
dur="1s"
|
|
65
|
+
values="1;.2;1"
|
|
66
|
+
calcMode="linear"
|
|
67
|
+
repeatCount="indefinite"
|
|
68
|
+
/>
|
|
69
|
+
</circle>
|
|
70
|
+
|
|
71
|
+
<circle
|
|
72
|
+
cx="92.5"
|
|
73
|
+
cy="12.5"
|
|
74
|
+
r="12.5"
|
|
75
|
+
>
|
|
76
|
+
<animate
|
|
77
|
+
attributeName="fill-opacity"
|
|
78
|
+
begin="800ms"
|
|
79
|
+
dur="1s"
|
|
80
|
+
values="1;.2;1"
|
|
81
|
+
calcMode="linear"
|
|
82
|
+
repeatCount="indefinite"
|
|
83
|
+
/>
|
|
84
|
+
</circle>
|
|
85
|
+
|
|
86
|
+
<circle
|
|
87
|
+
cx="92.5"
|
|
88
|
+
cy="52.5"
|
|
89
|
+
r="12.5"
|
|
90
|
+
>
|
|
91
|
+
<animate
|
|
92
|
+
attributeName="fill-opacity"
|
|
93
|
+
begin="400ms"
|
|
94
|
+
dur="1s"
|
|
95
|
+
values="1;.2;1"
|
|
96
|
+
calcMode="linear"
|
|
97
|
+
repeatCount="indefinite"
|
|
98
|
+
/>
|
|
99
|
+
</circle>
|
|
100
|
+
|
|
101
|
+
<circle
|
|
102
|
+
cx="12.5"
|
|
103
|
+
cy="92.5"
|
|
104
|
+
r="12.5"
|
|
105
|
+
>
|
|
106
|
+
<animate
|
|
107
|
+
attributeName="fill-opacity"
|
|
108
|
+
begin="700ms"
|
|
109
|
+
dur="1s"
|
|
110
|
+
values="1;.2;1"
|
|
111
|
+
calcMode="linear"
|
|
112
|
+
repeatCount="indefinite"
|
|
113
|
+
/>
|
|
114
|
+
</circle>
|
|
115
|
+
|
|
116
|
+
<circle
|
|
117
|
+
cx="52.5"
|
|
118
|
+
cy="92.5"
|
|
119
|
+
r="12.5"
|
|
120
|
+
>
|
|
121
|
+
<animate
|
|
122
|
+
attributeName="fill-opacity"
|
|
123
|
+
begin="500ms"
|
|
124
|
+
dur="1s"
|
|
125
|
+
values="1;.2;1"
|
|
126
|
+
calcMode="linear"
|
|
127
|
+
repeatCount="indefinite"
|
|
128
|
+
/>
|
|
129
|
+
</circle>
|
|
130
|
+
|
|
131
|
+
<circle
|
|
132
|
+
cx="92.5"
|
|
133
|
+
cy="92.5"
|
|
134
|
+
r="12.5"
|
|
135
|
+
>
|
|
136
|
+
<animate
|
|
137
|
+
attributeName="fill-opacity"
|
|
138
|
+
begin="200ms"
|
|
139
|
+
dur="1s"
|
|
140
|
+
values="1;.2;1"
|
|
141
|
+
calcMode="linear"
|
|
142
|
+
repeatCount="indefinite"
|
|
143
|
+
/>
|
|
144
|
+
</circle>
|
|
145
|
+
</svg>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
|
|
149
|
+
<script lang="ts">
|
|
150
|
+
import { defineComponent } from 'vue-demi'
|
|
151
|
+
|
|
152
|
+
export default defineComponent({
|
|
153
|
+
props: {
|
|
154
|
+
color: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: 'var(--dl-color-secondary)'
|
|
157
|
+
},
|
|
158
|
+
size: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: '40px'
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
</script>
|
|
165
|
+
|
|
166
|
+
<style src="../styles/spinnerStyles.scss" />
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="spinner-wrapper">
|
|
3
|
+
<div
|
|
4
|
+
class="spinner"
|
|
5
|
+
:style="spinnerStyles"
|
|
6
|
+
>
|
|
7
|
+
<div class="spin-bg">
|
|
8
|
+
<svg
|
|
9
|
+
id="Layer_2"
|
|
10
|
+
data-name="Layer 2"
|
|
11
|
+
viewBox="0 0 140 140"
|
|
12
|
+
>
|
|
13
|
+
<g
|
|
14
|
+
id="Layer_1-2"
|
|
15
|
+
data-name="Layer 1"
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
class="dl-svg"
|
|
19
|
+
d="M70,0C31.33,0,0,31.33,0,70s31.33,70,70,70,70-31.33,70-70S108.67,0,70,0Zm0,131.97c-34.2,0-61.97-27.77-61.97-61.97S35.8,8.03,70,8.03s61.97,27.77,61.97,61.97-27.77,61.97-61.97,61.97Z"
|
|
20
|
+
/>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="spin-loader">
|
|
25
|
+
<svg
|
|
26
|
+
id="Layer_2"
|
|
27
|
+
data-name="Layer 2"
|
|
28
|
+
viewBox="0 0 140 140"
|
|
29
|
+
>
|
|
30
|
+
<defs>
|
|
31
|
+
<linearGradient
|
|
32
|
+
id="linear-gradient"
|
|
33
|
+
x1="12.53"
|
|
34
|
+
y1="229.07"
|
|
35
|
+
x2="119.46"
|
|
36
|
+
y2="229.07"
|
|
37
|
+
gradientTransform="translate(0 246.89) scale(1 -1)"
|
|
38
|
+
gradientUnits="userSpaceOnUse"
|
|
39
|
+
>
|
|
40
|
+
<stop
|
|
41
|
+
offset="0"
|
|
42
|
+
:stop-color="color"
|
|
43
|
+
stop-opacity="0"
|
|
44
|
+
/>
|
|
45
|
+
<stop
|
|
46
|
+
offset=".12"
|
|
47
|
+
:stop-color="color"
|
|
48
|
+
stop-opacity="0"
|
|
49
|
+
/>
|
|
50
|
+
<stop
|
|
51
|
+
offset=".34"
|
|
52
|
+
:stop-color="color"
|
|
53
|
+
/>
|
|
54
|
+
<stop
|
|
55
|
+
offset=".69"
|
|
56
|
+
:stop-color="color"
|
|
57
|
+
/>
|
|
58
|
+
<stop
|
|
59
|
+
offset=".91"
|
|
60
|
+
:stop-color="color"
|
|
61
|
+
stop-opacity="0"
|
|
62
|
+
/>
|
|
63
|
+
</linearGradient>
|
|
64
|
+
</defs>
|
|
65
|
+
<g
|
|
66
|
+
id="Layer_1-2"
|
|
67
|
+
data-name="Layer 1"
|
|
68
|
+
>
|
|
69
|
+
<g>
|
|
70
|
+
<path
|
|
71
|
+
class="spinner-color-bg"
|
|
72
|
+
d="M70,0C31.33,0,0,31.33,0,70s31.33,70,70,70,70-31.33,70-70S108.67,0,70,0Zm0,131.97c-34.2,0-61.97-27.77-61.97-61.97S35.8,8.03,70,8.03s61.97,27.77,61.97,61.97-27.77,61.97-61.97,61.97Z"
|
|
73
|
+
/>
|
|
74
|
+
<path
|
|
75
|
+
class="spinner-color"
|
|
76
|
+
d="M114.87,25.82c1.38-1.38,2.87-2.75,4.25-4.13,.46-.34,.46-1.03,0-1.49C106.49,7.69,89.16,0,70,0,46.36,0,25.48,11.7,12.74,29.72c-.34,.46-.23,.92,.11,1.38l4.25,4.25c.46,.46,1.15,.34,1.61-.11,11.25-16.52,29.95-27.2,51.3-27.2,16.98,0,32.25,6.77,43.49,17.79,.34,.34,1.03,.34,1.38,0Z"
|
|
77
|
+
/>
|
|
78
|
+
</g>
|
|
79
|
+
</g>
|
|
80
|
+
</svg>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="dl-spinner-icon">
|
|
83
|
+
<svg
|
|
84
|
+
viewBox="0 0 51 45"
|
|
85
|
+
fill="none"
|
|
86
|
+
>
|
|
87
|
+
<path
|
|
88
|
+
d="M23.2962 0.558083H0.830566V32.2536L10.1727 44.284H23.2962V38.5002H12.6195L6.39136 30.4028V6.11058H23.2962V0.558083Z"
|
|
89
|
+
:fill="iconColor"
|
|
90
|
+
/>
|
|
91
|
+
<path
|
|
92
|
+
d="M27.5224 6.11058V0.558083C33.3056 -0.137737 52.8796 3.56565 50.6553 25.0816C48.9091 41.9727 34.3436 44.901 27.5224 44.284V38.5002C41.2242 39.4256 45.0945 29.1689 45.3169 23.9249C46.2067 8.19281 33.8246 5.49365 27.5224 6.11058Z"
|
|
93
|
+
:fill="iconColor"
|
|
94
|
+
/>
|
|
95
|
+
<path
|
|
96
|
+
d="M23.2962 19.0664V13.5139H13.0643V27.3952L16.8457 31.7909H23.2962V26.2384H19.07L18.6251 25.5443V19.0664H23.2962Z"
|
|
97
|
+
:fill="iconColor"
|
|
98
|
+
/>
|
|
99
|
+
<path
|
|
100
|
+
d="M27.5224 19.0664V13.5139C31.2296 13.2054 38.644 14.5782 38.644 22.5367C38.644 30.4953 31.2296 32.0223 27.5224 31.7909V26.2384C29.3018 26.7782 33.3056 26.9038 33.3056 22.9994C33.3056 19.0664 29.5984 18.758 27.5224 19.0664Z"
|
|
101
|
+
:fill="iconColor"
|
|
102
|
+
/>
|
|
103
|
+
</svg>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</template>
|
|
108
|
+
|
|
109
|
+
<script>
|
|
110
|
+
import { defineComponent } from 'vue-demi'
|
|
111
|
+
|
|
112
|
+
export default defineComponent({
|
|
113
|
+
props: {
|
|
114
|
+
size: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: '140px'
|
|
117
|
+
},
|
|
118
|
+
iconSize: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: '50px'
|
|
121
|
+
},
|
|
122
|
+
borderColor: {
|
|
123
|
+
type: String,
|
|
124
|
+
default: 'var(--dl-color-separator)'
|
|
125
|
+
},
|
|
126
|
+
color: {
|
|
127
|
+
type: String,
|
|
128
|
+
default: 'var(--dl-color-secondary)'
|
|
129
|
+
},
|
|
130
|
+
iconColor: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: 'var(--dl-color-tooltip-background)'
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
computed: {
|
|
136
|
+
spinnerStyles() {
|
|
137
|
+
return {
|
|
138
|
+
'--dl-spinner-size': this.size,
|
|
139
|
+
'--dl-spinner-icon-size': this.iconSize,
|
|
140
|
+
'--dl-spinner-border-color': this.borderColor,
|
|
141
|
+
'--icon-top': `${
|
|
142
|
+
parseInt(this.size) / 2 -
|
|
143
|
+
parseInt(this.iconSize) / 2 +
|
|
144
|
+
parseInt(this.iconSize) / 25
|
|
145
|
+
}px`
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
</script>
|
|
151
|
+
|
|
152
|
+
<style src="../styles/spinnerStyles.scss" />
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
import DlSpinnerGrid from './components/DlSpinnerGrid.vue'
|
|
2
|
+
import DlSpinnerCircle from './components/DlSpinnerCircle.vue'
|
|
3
|
+
import DlSpinnerClock from './components/DlSpinnerClock.vue'
|
|
4
|
+
import DlSpinnerDots from './components/DlSpinnerDots.vue'
|
|
5
|
+
import DlSpinnerLogo from './components/DlSpinnerLogo.vue'
|
|
1
6
|
import DlSpinner from './DlSpinner.vue'
|
|
2
|
-
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
DlSpinner,
|
|
10
|
+
DlSpinnerLogo,
|
|
11
|
+
DlSpinnerCircle,
|
|
12
|
+
DlSpinnerGrid,
|
|
13
|
+
DlSpinnerDots,
|
|
14
|
+
DlSpinnerClock
|
|
15
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.spinner-wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
}
|
|
6
|
+
.dl-spinner {
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dl-spinner-mat {
|
|
11
|
+
animation: spinCircle 2s linear infinite;
|
|
12
|
+
transform-origin: center center;
|
|
13
|
+
}
|
|
14
|
+
.spinner-path {
|
|
15
|
+
stroke-dasharray: 1, 200 #{'/* rtl:ignore */'};
|
|
16
|
+
stroke-dashoffset: 0 #{'/* rtl:ignore */'};
|
|
17
|
+
animation: dash 1.5s ease-in-out infinite;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.spinner {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.spin-loader,
|
|
25
|
+
.spin-bg {
|
|
26
|
+
width: var(--dl-spinner-size);
|
|
27
|
+
height: var(--dl-spinner-size);
|
|
28
|
+
top: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.spin-loader {
|
|
33
|
+
position: absolute;
|
|
34
|
+
animation: spin 2s linear infinite;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dl-spinner-icon {
|
|
38
|
+
top: var(--icon-top);
|
|
39
|
+
left: var(--icon-top);
|
|
40
|
+
position: absolute;
|
|
41
|
+
width: var(--dl-spinner-icon-size);
|
|
42
|
+
height: var(--dl-spinner-icon-size);
|
|
43
|
+
opacity: 1;
|
|
44
|
+
animation: pulse 2s infinite;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dl-svg {
|
|
48
|
+
fill: var(--dl-spinner-border-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.spinner-color-bg {
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.spinner-color {
|
|
56
|
+
fill: url(#linear-gradient);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes dash {
|
|
60
|
+
0% {
|
|
61
|
+
stroke-dasharray: 1, 200;
|
|
62
|
+
stroke-dashoffset: 0;
|
|
63
|
+
}
|
|
64
|
+
50% {
|
|
65
|
+
stroke-dasharray: 89, 200;
|
|
66
|
+
stroke-dashoffset: -35px;
|
|
67
|
+
}
|
|
68
|
+
100% {
|
|
69
|
+
stroke-dasharray: 89, 200;
|
|
70
|
+
stroke-dashoffset: -124px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@keyframes spinCircle {
|
|
75
|
+
0% {
|
|
76
|
+
transform: rotate3d(0, 0, 1, 0deg) #{'/* rtl:ignore */'};
|
|
77
|
+
}
|
|
78
|
+
25% {
|
|
79
|
+
transform: rotate3d(0, 0, 1, 90deg) #{'/* rtl:ignore */'};
|
|
80
|
+
}
|
|
81
|
+
50% {
|
|
82
|
+
transform: rotate3d(0, 0, 1, 180deg) #{'/* rtl:ignore */'};
|
|
83
|
+
}
|
|
84
|
+
75% {
|
|
85
|
+
transform: rotate3d(0, 0, 1, 270deg) #{'/* rtl:ignore */'};
|
|
86
|
+
}
|
|
87
|
+
100% {
|
|
88
|
+
transform: rotate3d(0, 0, 1, 359deg) #{'/* rtl:ignore */'};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes spin {
|
|
93
|
+
0% {
|
|
94
|
+
transform: rotate(0deg);
|
|
95
|
+
}
|
|
96
|
+
100% {
|
|
97
|
+
transform: rotate(360deg);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@keyframes pulse {
|
|
102
|
+
0% {
|
|
103
|
+
opacity: 1;
|
|
104
|
+
}
|
|
105
|
+
50% {
|
|
106
|
+
opacity: 0;
|
|
107
|
+
}
|
|
108
|
+
100% {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { v4 } from 'uuid'
|
|
13
|
-
import { defineComponent } from 'vue-demi'
|
|
13
|
+
import { defineComponent, ref, computed } from 'vue-demi'
|
|
14
14
|
import { getColor } from '../../../utils'
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
@@ -23,24 +23,29 @@ export default defineComponent({
|
|
|
23
23
|
side: Boolean,
|
|
24
24
|
noWrap: Boolean
|
|
25
25
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
computed: {
|
|
32
|
-
classes(): Record<string, boolean> {
|
|
26
|
+
setup(props) {
|
|
27
|
+
const uuid = `dl-item-section-${v4()}`
|
|
28
|
+
|
|
29
|
+
const classes = computed(() => {
|
|
33
30
|
return {
|
|
34
31
|
'dl-item__section': true,
|
|
35
|
-
'dl-item__section--side':
|
|
36
|
-
'dl-item__section--nowrap':
|
|
37
|
-
'dl-item__section--main': !
|
|
32
|
+
'dl-item__section--side': props.side,
|
|
33
|
+
'dl-item__section--nowrap': props.noWrap,
|
|
34
|
+
'dl-item__section--main': !props.side
|
|
38
35
|
}
|
|
39
|
-
}
|
|
40
|
-
cssVars()
|
|
36
|
+
})
|
|
37
|
+
const cssVars = computed(() => {
|
|
41
38
|
return {
|
|
42
|
-
'--dl-item-color':
|
|
39
|
+
'--dl-item-color': props.color
|
|
40
|
+
? getColor(props.color)
|
|
41
|
+
: 'inherit'
|
|
43
42
|
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
uuid,
|
|
47
|
+
classes,
|
|
48
|
+
cssVars
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
})
|
|
@@ -56,8 +61,9 @@ export default defineComponent({
|
|
|
56
61
|
justify-content: flex-start;
|
|
57
62
|
&--nowrap {
|
|
58
63
|
white-space: nowrap;
|
|
64
|
+
width: 100%;
|
|
59
65
|
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
66
|
+
text-overflow-middle: ellipsis;
|
|
61
67
|
& > * {
|
|
62
68
|
overflow: hidden;
|
|
63
69
|
text-overflow: ellipsis;
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
<div
|
|
4
4
|
:id="uuid"
|
|
5
5
|
ref="rootRef"
|
|
6
|
+
:style="cssVars"
|
|
6
7
|
class="dl-table__middle"
|
|
7
8
|
:class="classes"
|
|
8
9
|
>
|
|
9
|
-
<table
|
|
10
|
+
<table
|
|
11
|
+
class="dl-table"
|
|
12
|
+
:class="draggableClasses"
|
|
13
|
+
>
|
|
10
14
|
<slot
|
|
11
15
|
v-if="hasBeforeSlot"
|
|
12
16
|
name="before"
|
|
@@ -18,16 +22,13 @@
|
|
|
18
22
|
>
|
|
19
23
|
<tr>
|
|
20
24
|
<td
|
|
21
|
-
|
|
22
|
-
height: virtualScrollPaddingBefore + 'px',
|
|
23
|
-
'--dl-virtual-scroll-item-height':
|
|
24
|
-
virtualScrollItemSize + 'px'
|
|
25
|
-
}"
|
|
25
|
+
class="dl-virtual-scroll__before"
|
|
26
26
|
:colspan="colspanAttr"
|
|
27
27
|
/>
|
|
28
28
|
</tr>
|
|
29
29
|
</tbody>
|
|
30
30
|
<tbody
|
|
31
|
+
id="draggable"
|
|
31
32
|
key="content"
|
|
32
33
|
ref="contentRef"
|
|
33
34
|
class="dl-virtual-scroll__content"
|
|
@@ -45,11 +46,7 @@
|
|
|
45
46
|
>
|
|
46
47
|
<tr>
|
|
47
48
|
<td
|
|
48
|
-
|
|
49
|
-
height: virtualScrollPaddingAfter + 'px',
|
|
50
|
-
'--dl-virtual-scroll-item-height':
|
|
51
|
-
virtualScrollItemSize + 'px'
|
|
52
|
-
}"
|
|
49
|
+
class="dl-virtual-scroll__after"
|
|
53
50
|
:colspan="colspanAttr"
|
|
54
51
|
/>
|
|
55
52
|
</tr>
|
|
@@ -81,6 +78,7 @@ import { getScrollTarget } from '../../../utils/scroll'
|
|
|
81
78
|
import { useVirtualScroll, useVirtualScrollProps } from './useVirtualScroll'
|
|
82
79
|
|
|
83
80
|
export default defineComponent({
|
|
81
|
+
name: 'DlVirtualScroll',
|
|
84
82
|
props: {
|
|
85
83
|
...useVirtualScrollProps,
|
|
86
84
|
|
|
@@ -89,6 +87,11 @@ export default defineComponent({
|
|
|
89
87
|
default: () => [] as Record<string, any>[]
|
|
90
88
|
},
|
|
91
89
|
|
|
90
|
+
draggableClasses: {
|
|
91
|
+
type: [String, Array, Object],
|
|
92
|
+
default: null
|
|
93
|
+
},
|
|
94
|
+
|
|
92
95
|
itemsFn: { type: Function, default: void 0 },
|
|
93
96
|
itemsSize: { type: Number, default: 0 },
|
|
94
97
|
|
|
@@ -98,6 +101,7 @@ export default defineComponent({
|
|
|
98
101
|
},
|
|
99
102
|
setup(props, { slots, attrs }) {
|
|
100
103
|
const vm = getCurrentInstance()
|
|
104
|
+
|
|
101
105
|
let localScrollTarget: HTMLElement | undefined
|
|
102
106
|
const rootRef: Ref<HTMLElement | null> = ref(null)
|
|
103
107
|
|
|
@@ -157,6 +161,15 @@ export default defineComponent({
|
|
|
157
161
|
(props.scrollTarget !== void 0 ? '' : ' scroll')
|
|
158
162
|
)
|
|
159
163
|
|
|
164
|
+
const cssVars = computed(() => {
|
|
165
|
+
return {
|
|
166
|
+
'--item-height-before': virtualScrollPaddingBefore.value + 'px',
|
|
167
|
+
'--item-height-after': virtualScrollPaddingAfter.value + 'px',
|
|
168
|
+
'--dl-virtual-scroll-item-height':
|
|
169
|
+
props.virtualScrollItemSize + 'px'
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
|
|
160
173
|
const attributes = computed(() =>
|
|
161
174
|
props.scrollTarget !== void 0 ? {} : { tabindex: 0 }
|
|
162
175
|
)
|
|
@@ -243,7 +256,8 @@ export default defineComponent({
|
|
|
243
256
|
classes,
|
|
244
257
|
hasBeforeSlot,
|
|
245
258
|
hasAfterSlot,
|
|
246
|
-
colspanAttr
|
|
259
|
+
colspanAttr,
|
|
260
|
+
cssVars
|
|
247
261
|
}
|
|
248
262
|
}
|
|
249
263
|
})
|
|
@@ -265,17 +279,18 @@ export default defineComponent({
|
|
|
265
279
|
overflow-anchor: auto;
|
|
266
280
|
}
|
|
267
281
|
}
|
|
282
|
+
&__before {
|
|
283
|
+
height: var(--item-height-before);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&__after {
|
|
287
|
+
height: var(--item-height-after);
|
|
288
|
+
}
|
|
268
289
|
&__padding {
|
|
269
|
-
background: linear-gradient(
|
|
270
|
-
rgba(
|
|
271
|
-
rgba(
|
|
272
|
-
rgba(128, 128, 128, 0.03) 20%,
|
|
273
|
-
rgba(128, 128, 128, 0.08) 50%,
|
|
274
|
-
rgba(128, 128, 128, 0.03) 80%,
|
|
275
|
-
rgba(255, 255, 255, 0) 80%,
|
|
276
|
-
rgba(255, 255, 255, 0)
|
|
290
|
+
background: repeating-linear-gradient(
|
|
291
|
+
rgba(128, 128, 128, 0.03),
|
|
292
|
+
rgba(128, 128, 128, 0.08) var(--dl-virtual-scroll-item-height, 50px)
|
|
277
293
|
);
|
|
278
|
-
background-size: 100%, var(--dl-virtual-scroll-item-height, 50px);
|
|
279
294
|
|
|
280
295
|
.dl-table & {
|
|
281
296
|
tr {
|
|
@@ -203,7 +203,7 @@ export const commonVirtScrollProps = {
|
|
|
203
203
|
|
|
204
204
|
virtualScrollItemSize: {
|
|
205
205
|
type: [Number, String],
|
|
206
|
-
default:
|
|
206
|
+
default: 0
|
|
207
207
|
},
|
|
208
208
|
|
|
209
209
|
virtualScrollStickySizeStart: {
|
|
@@ -756,15 +756,13 @@ export function useVirtualScroll({
|
|
|
756
756
|
|
|
757
757
|
function emitScroll(index: number) {
|
|
758
758
|
if (prevToIndex !== index) {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
})
|
|
767
|
-
}
|
|
759
|
+
emit('virtual-scroll', {
|
|
760
|
+
index,
|
|
761
|
+
from: virtualScrollSliceRange.value.from,
|
|
762
|
+
to: virtualScrollSliceRange.value.to - 1,
|
|
763
|
+
direction: index < prevToIndex ? 'decrease' : 'increase',
|
|
764
|
+
ref: proxy
|
|
765
|
+
})
|
|
768
766
|
|
|
769
767
|
prevToIndex = index
|
|
770
768
|
}
|