@dataloop-ai/components 0.17.134 → 0.18.1
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 +3 -1
- package/src/App.vue +5 -227
- package/src/assets/globals.scss +4 -0
- package/src/components/basic/DlAccordion/DlAccordion.vue +26 -4
- package/src/components/basic/DlButton/DlButton.vue +2 -6
- package/src/components/basic/DlChip/DlChip.vue +1 -5
- package/src/components/basic/DlEmptyState/DlEmptyState.vue +282 -0
- package/src/components/basic/DlEmptyState/index.ts +2 -0
- package/src/components/basic/DlEmptyState/types.ts +20 -0
- package/src/components/basic/DlListItem/DlListItem.vue +96 -63
- package/src/components/basic/DlListItem/utils.ts +0 -3
- package/src/components/basic/DlPanelContainer/DlPanelContainer.vue +35 -12
- package/src/components/basic/DlPopup/DlPopup.vue +29 -7
- package/src/components/basic/DlWidget/DlWidget.vue +32 -4
- package/src/components/basic/index.ts +2 -1
- package/src/components/basic/types.ts +2 -0
- package/src/components/compound/DlCard/DlCard.vue +796 -0
- package/src/components/compound/DlCard/components/DescriptionModal.vue +137 -0
- package/src/components/compound/DlCard/types.ts +38 -0
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +35 -3
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +51 -12
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +71 -14
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +28 -4
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/components/DlDoughnutChartLegend.vue +1 -1
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +46 -8
- package/src/components/compound/DlCharts/components/DlBrush.vue +2 -2
- package/src/components/compound/DlCharts/types/props.ts +5 -1
- package/src/components/compound/DlCharts/utils.ts +1 -1
- package/src/components/compound/DlCodeEditor/DlCodeEditor.vue +171 -0
- package/src/components/compound/DlCodeEditor/README.md +11 -0
- package/src/components/compound/DlCodeEditor/components/CodeEditor.vue +705 -0
- package/src/components/compound/DlCodeEditor/index.ts +3 -0
- package/src/components/compound/DlCodeEditor/styles/themes-base16.css +12809 -0
- package/src/components/compound/DlCodeEditor/styles/themes.css +3999 -0
- package/src/components/compound/DlCodeEditor/types.ts +21 -0
- package/src/components/compound/DlDateTime/DlDateTimeRange/{DlCardSidebar.vue → CardSidebar.vue} +10 -11
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +8 -8
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +26 -2
- package/src/components/compound/DlInput/DlInput.vue +2 -2
- package/src/components/compound/DlOptionGroup/components/MenuItemWrapper.vue +2 -2
- package/src/components/compound/DlRange/DlRange.vue +2 -2
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +1 -1
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSuggestionsDropdown.vue +1 -1
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +10 -6
- package/src/components/compound/DlSelect/DlSelect.vue +78 -70
- package/src/components/compound/DlSlider/components/DlSliderBase.vue +2 -2
- package/src/components/compound/DlSlider/useSlider.ts +2 -2
- package/src/components/compound/DlStepper/DlStepper.vue +33 -3
- package/src/components/compound/DlStepper/components/DlStepperContent.vue +6 -2
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +12 -6
- package/src/components/compound/DlTable/DlTable.vue +30 -4
- package/src/components/compound/DlTable/components/DlTd.vue +8 -8
- package/src/components/compound/DlTable/components/DlTh.vue +1 -1
- package/src/components/compound/DlTable/hooks/tableColumnSelection.ts +35 -40
- package/src/components/compound/DlTable/hooks/tableFilter.ts +33 -21
- package/src/components/compound/DlTable/hooks/tablePagination.ts +10 -13
- package/src/components/compound/DlTable/hooks/tableRowExpand.ts +2 -1
- package/src/components/compound/DlTable/hooks/tableRowSelection.ts +0 -1
- package/src/components/compound/DlTable/hooks/tableSort.ts +52 -47
- package/src/components/compound/DlThumbnailGallery/DlThumbnailGallery.vue +268 -0
- package/src/components/compound/DlThumbnailGallery/index.ts +2 -0
- package/src/components/compound/DlThumbnailGallery/types.ts +11 -0
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +1293 -0
- package/src/components/compound/DlTreeTable/components/DlTdTree.vue +119 -0
- package/src/components/compound/DlTreeTable/components/DlTrTree.vue +52 -0
- package/src/components/compound/DlTreeTable/index.ts +3 -0
- package/src/components/compound/DlTreeTable/types.ts +1 -0
- package/src/components/compound/DlTreeTable/utils/convertToNestedObject.ts +51 -0
- package/src/components/compound/DlTreeTable/utils/flatTreeData.ts +19 -0
- package/src/components/compound/DlTreeTable/utils/getFromChildren.ts +39 -0
- package/src/components/compound/DlTreeTable/utils/trSpacing.ts +13 -0
- package/src/components/compound/DlTreeTable/utils/treeTableRowSelection.ts +184 -0
- package/src/components/compound/index.ts +5 -0
- package/src/components/compound/types.ts +2 -0
- package/src/components/essential/DlBadge/DlBadge.vue +3 -3
- package/src/components/essential/DlCheckbox/DlCheckbox.vue +6 -3
- package/src/components/essential/DlEllipsis/DlEllipsis.vue +18 -14
- package/src/components/essential/DlIcon/DlIcon.vue +1 -1
- package/src/components/essential/DlLabel/DlLabel.vue +174 -0
- package/src/components/essential/DlLabel/index.ts +2 -0
- package/src/components/essential/DlList/DlList.vue +2 -2
- package/src/components/essential/DlMenu/DlMenu.vue +26 -20
- package/src/components/essential/DlMenu/utils.ts +7 -6
- package/src/components/essential/DlPageLayout/DlPageLayout.vue +90 -0
- package/src/components/essential/DlPageLayout/index.ts +2 -0
- package/src/components/essential/DlSeparator/DlSeparator.vue +2 -2
- package/src/components/essential/DlThemeProvider/DlThemeProvider.vue +6 -0
- package/src/components/essential/index.ts +2 -1
- package/src/components/shared/DlTooltip/DlTooltip.vue +9 -10
- package/src/demos/BarChartDemo.vue +47 -2
- package/src/demos/ColumnChartDemo.vue +51 -2
- package/src/demos/DlAccordionDemo.vue +92 -43
- package/src/demos/DlCardDemo.vue +156 -19
- package/src/demos/DlChartDoughnutDemo.vue +49 -2
- package/src/demos/DlCheckboxDemo.vue +13 -0
- package/src/demos/DlCodeEditor/DlCodeEditorDemo.vue +247 -0
- package/src/demos/DlCodeEditor/index.ts +2 -0
- package/src/demos/DlConfusionMatrixDemo.vue +51 -6
- package/src/demos/DlDemoPage.vue +235 -0
- package/src/demos/DlDialogBoxDemo.vue +56 -51
- package/src/demos/DlDropdownButtonDemo.vue +1 -1
- package/src/demos/DlEmptyStateDemo.vue +81 -0
- package/src/demos/DlLabelDemo.vue +128 -0
- package/src/demos/DlLineChartDemo.vue +50 -2
- package/src/demos/DlListDemo.vue +12 -9
- package/src/demos/DlMenuDemo.vue +13 -14
- package/src/demos/DlPageLayoutDemo.vue +146 -0
- package/src/demos/DlPanelContainerDemo.vue +113 -2
- package/src/demos/DlPopupDemo.vue +51 -0
- package/src/demos/DlSelectDemo.vue +14 -5
- package/src/demos/DlStepperDemo/DlStepperDemo.vue +5 -1
- package/src/demos/DlStepperDemo/EmptyStateStepper.vue +149 -0
- package/src/demos/DlTableDemo.vue +65 -2
- package/src/demos/DlTabsDemo.vue +1 -1
- package/src/demos/DlThumbnailGalleryDemo.vue +99 -0
- package/src/demos/DlTreeTableDemo.vue +694 -0
- package/src/demos/DlWidgetDemo.vue +48 -3
- package/src/demos/index.ts +17 -4
- package/src/hooks/use-anchor.ts +14 -16
- package/src/hooks/use-model-toggle.ts +12 -14
- package/src/hooks/use-portal.ts +2 -2
- package/src/hooks/use-scroll-target.ts +2 -4
- package/src/hooks/use-size-observer.ts +3 -2
- package/src/hooks/use-transition.ts +10 -4
- package/src/index.ts +22 -1
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetFooter.vue +78 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetHeader.vue +22 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetLeftDrawer.vue +96 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetMainContent.vue +51 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetRightDrawer.vue +88 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/ActionsMenu.vue +70 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/AutomationMenu.vue +106 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardView.vue +101 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardViewGallery.vue +141 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardViewTable.vue +193 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/LayoutEmptyState.vue +227 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/UploadData.vue +106 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/MainContentImages.vue +540 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/MainContentNav.vue +329 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/NavbarKpi.vue +84 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/NavbarSearch.vue +132 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/SearchFilterMenu.vue +19 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/filters/AddFilter.vue +212 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/types/imageMetadata.ts +28 -0
- package/src/layouts/DlDatasetBrowser/DlDatasetBrowser.vue +42 -0
- package/src/layouts/DlStudioLayout/DlStudioLayout.vue +42 -0
- package/src/layouts/DlStudioLayout/components/Demo/LeftMenuContent.vue +23 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioFooter.vue +25 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioHeader.vue +121 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioLeftDrawer.vue +245 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioMainContent.vue +31 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioTabsMenu.vue +117 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/FilterMenu.vue +62 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/TabMenuAnnotations.vue +98 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/TabMenuItem.vue +66 -0
- package/src/layouts/DlStudioLayout/components/LayoutNavbar.vue +24 -0
- package/src/layouts/DlStudioLayout/components/ListAutocomplete.vue +149 -0
- package/src/layouts/DlStudioLayout/components/NavigationDrawer.vue +147 -0
- package/src/layouts/DlStudioLayout/index.ts +2 -0
- package/src/layouts/DlStudioLayout/types/HorizontalItems.ts +9 -0
- package/src/layouts/DlStudioLayout/types/VerticalItems.ts +10 -0
- package/src/simple-code-editor.d.ts +1 -0
- package/src/utils/click-outside.ts +1 -1
- package/src/utils/dom.ts +5 -5
- package/src/utils/events.ts +3 -3
- package/src/utils/global-nodes.ts +2 -2
- package/src/utils/is-ellipsis-active.ts +4 -1
- package/src/utils/portal.ts +5 -5
- package/src/utils/position-engine.ts +5 -5
- package/src/utils/render.ts +1 -1
- package/src/utils/scroll.ts +2 -2
- package/src/utils/selection.ts +3 -3
- package/vite.config.ts +9 -1
- package/src/components/basic/DlCard/DlCard.vue +0 -242
- package/src/components/basic/DlCard/types.ts +0 -20
- package/src/components/essential/DlTextHolder/DlTextHolder.vue +0 -93
- package/src/components/essential/DlTextHolder/index.ts +0 -2
- package/src/demos/DlTextHolderDemo.vue +0 -50
- /package/src/components/{basic → compound}/DlCard/index.ts +0 -0
- /package/src/components/compound/DlDateTime/DlDateTimeRange/{DlDateInput.vue → DateInput.vue} +0 -0
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="card"
|
|
4
|
-
:style="[{ width, height }, computedStyles]"
|
|
5
|
-
>
|
|
6
|
-
<div
|
|
7
|
-
v-if="icon"
|
|
8
|
-
class="card--icon"
|
|
9
|
-
>
|
|
10
|
-
<dl-icon
|
|
11
|
-
:icon="icon.src"
|
|
12
|
-
:styles="iconStyles"
|
|
13
|
-
:size="iconSize"
|
|
14
|
-
:color="iconColor"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
<div
|
|
18
|
-
v-else-if="image"
|
|
19
|
-
class="card--image"
|
|
20
|
-
>
|
|
21
|
-
<img
|
|
22
|
-
:src="image.src"
|
|
23
|
-
:style="imageStyles"
|
|
24
|
-
:alt="imageAlt"
|
|
25
|
-
>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="card--content">
|
|
28
|
-
<div>
|
|
29
|
-
<slot
|
|
30
|
-
v-if="!!$slots.header"
|
|
31
|
-
name="header"
|
|
32
|
-
/>
|
|
33
|
-
<div
|
|
34
|
-
v-else
|
|
35
|
-
class="card--header"
|
|
36
|
-
>
|
|
37
|
-
<span class="card--header_title">{{ title }}</span>
|
|
38
|
-
<span class="card--header_shortcut">{{
|
|
39
|
-
keyboardShortcut
|
|
40
|
-
}}</span>
|
|
41
|
-
</div>
|
|
42
|
-
<slot
|
|
43
|
-
v-if="!!$slots.content"
|
|
44
|
-
name="content"
|
|
45
|
-
/>
|
|
46
|
-
<span
|
|
47
|
-
v-else
|
|
48
|
-
class="card--content_text"
|
|
49
|
-
>{{ text }}</span>
|
|
50
|
-
</div>
|
|
51
|
-
<slot
|
|
52
|
-
v-if="!!$slots.footer"
|
|
53
|
-
name="footer"
|
|
54
|
-
/>
|
|
55
|
-
<div
|
|
56
|
-
v-else
|
|
57
|
-
class="card--links"
|
|
58
|
-
>
|
|
59
|
-
<div
|
|
60
|
-
v-for="(link, idx) in links"
|
|
61
|
-
:key="idx"
|
|
62
|
-
class="card--links_linkItem"
|
|
63
|
-
>
|
|
64
|
-
<div class="card--links_linkItem_icon">
|
|
65
|
-
<dl-icon
|
|
66
|
-
v-if="link.icon"
|
|
67
|
-
:icon="link.icon"
|
|
68
|
-
size="12px"
|
|
69
|
-
/>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="card--links_linkItem_link">
|
|
72
|
-
<dl-link
|
|
73
|
-
:external="!!link.external"
|
|
74
|
-
:href="link.href"
|
|
75
|
-
:newtab="!!link.newtab"
|
|
76
|
-
>
|
|
77
|
-
{{ link.title }}
|
|
78
|
-
</dl-link>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</template>
|
|
85
|
-
|
|
86
|
-
<script lang="ts">
|
|
87
|
-
import { isString } from 'lodash'
|
|
88
|
-
import { defineComponent, PropType } from 'vue-demi'
|
|
89
|
-
import { stringStyleToRecord } from '../../../utils'
|
|
90
|
-
import { DlIcon } from '../../essential/DlIcon'
|
|
91
|
-
import { DlLink } from '../../essential/DlLink'
|
|
92
|
-
import { IconItem, ImageItem, LinkItem } from './types'
|
|
93
|
-
|
|
94
|
-
export default defineComponent({
|
|
95
|
-
name: 'DlCard',
|
|
96
|
-
components: { DlLink, DlIcon },
|
|
97
|
-
props: {
|
|
98
|
-
image: {
|
|
99
|
-
type: Object as PropType<ImageItem>,
|
|
100
|
-
default: null
|
|
101
|
-
},
|
|
102
|
-
icon: {
|
|
103
|
-
type: Object as PropType<IconItem>,
|
|
104
|
-
default: null
|
|
105
|
-
},
|
|
106
|
-
title: {
|
|
107
|
-
type: String,
|
|
108
|
-
default: ''
|
|
109
|
-
},
|
|
110
|
-
text: {
|
|
111
|
-
type: String,
|
|
112
|
-
default: ''
|
|
113
|
-
},
|
|
114
|
-
keyboardShortcut: {
|
|
115
|
-
type: String,
|
|
116
|
-
default: ''
|
|
117
|
-
},
|
|
118
|
-
links: {
|
|
119
|
-
type: Array as PropType<LinkItem[]>,
|
|
120
|
-
default: () => Array as PropType<LinkItem[]>
|
|
121
|
-
},
|
|
122
|
-
height: {
|
|
123
|
-
type: String,
|
|
124
|
-
default: 'auto'
|
|
125
|
-
},
|
|
126
|
-
width: {
|
|
127
|
-
type: String,
|
|
128
|
-
default: '200px'
|
|
129
|
-
},
|
|
130
|
-
styles: {
|
|
131
|
-
type: [Object, String],
|
|
132
|
-
default: null
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
computed: {
|
|
136
|
-
computedStyles(): Record<string, string> {
|
|
137
|
-
return isString(this.styles)
|
|
138
|
-
? stringStyleToRecord(this.styles)
|
|
139
|
-
: this.styles
|
|
140
|
-
},
|
|
141
|
-
iconStyles(): string {
|
|
142
|
-
return this.icon?.styles ?? ''
|
|
143
|
-
},
|
|
144
|
-
iconSize(): string {
|
|
145
|
-
return this.icon?.size ?? '50px'
|
|
146
|
-
},
|
|
147
|
-
iconColor(): string {
|
|
148
|
-
return this.icon?.color ?? 'var(--dl-color-darker)'
|
|
149
|
-
},
|
|
150
|
-
imageStyles(): string {
|
|
151
|
-
return this.image?.styles ?? ''
|
|
152
|
-
},
|
|
153
|
-
imageAlt(): string {
|
|
154
|
-
return this.image?.alt ?? ''
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
})
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<style lang="scss" scoped>
|
|
161
|
-
.card {
|
|
162
|
-
color: var(--dl-color-darker);
|
|
163
|
-
background-color: var(--dl-color-panel-background);
|
|
164
|
-
border: 1px solid var(--dl-color-separator);
|
|
165
|
-
border-radius: 2px;
|
|
166
|
-
pointer-events: auto;
|
|
167
|
-
box-shadow: 0px 5px 15px 0px var(--dl-color-shadow);
|
|
168
|
-
|
|
169
|
-
&--content {
|
|
170
|
-
padding: 16px;
|
|
171
|
-
&_text {
|
|
172
|
-
font-size: 12px;
|
|
173
|
-
color: var(--dl-color-medium);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&--header {
|
|
178
|
-
display: flex;
|
|
179
|
-
align-items: center;
|
|
180
|
-
flex-wrap: wrap;
|
|
181
|
-
|
|
182
|
-
&_title {
|
|
183
|
-
color: var(--dl-color-darker);
|
|
184
|
-
font-size: 14px;
|
|
185
|
-
line-height: 16px;
|
|
186
|
-
font-weight: 700;
|
|
187
|
-
margin-right: 10px;
|
|
188
|
-
margin-bottom: 10px;
|
|
189
|
-
}
|
|
190
|
-
&_shortcut {
|
|
191
|
-
color: #767676;
|
|
192
|
-
font-size: 10px;
|
|
193
|
-
line-height: 10px;
|
|
194
|
-
border-radius: 2px;
|
|
195
|
-
border: 1px solid #767676;
|
|
196
|
-
padding: 4px;
|
|
197
|
-
text-align: center;
|
|
198
|
-
margin-bottom: 10px;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
&--links {
|
|
202
|
-
margin-top: 16px;
|
|
203
|
-
display: flex;
|
|
204
|
-
align-items: center;
|
|
205
|
-
flex-wrap: wrap;
|
|
206
|
-
|
|
207
|
-
&_linkItem {
|
|
208
|
-
margin-right: 15px;
|
|
209
|
-
color: var(--dl-color-secondary);
|
|
210
|
-
font-size: 10px;
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
|
|
214
|
-
&_icon {
|
|
215
|
-
margin-right: 7px;
|
|
216
|
-
margin-top: 2px;
|
|
217
|
-
vertical-align: middle;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
&_link {
|
|
221
|
-
vertical-align: middle;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
&--image {
|
|
226
|
-
width: 200px;
|
|
227
|
-
height: 100px;
|
|
228
|
-
overflow: hidden;
|
|
229
|
-
img {
|
|
230
|
-
width: 100%;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
&--icon {
|
|
234
|
-
display: flex;
|
|
235
|
-
justify-content: center;
|
|
236
|
-
align-items: center;
|
|
237
|
-
padding-top: 34px;
|
|
238
|
-
padding-bottom: 16px;
|
|
239
|
-
color: var(--dl-color-darker);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type ImageItem = {
|
|
2
|
-
src: string
|
|
3
|
-
styles?: string
|
|
4
|
-
alt?: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type IconItem = {
|
|
8
|
-
src: string
|
|
9
|
-
styles?: string
|
|
10
|
-
size?: string
|
|
11
|
-
color?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type LinkItem = {
|
|
15
|
-
title: string
|
|
16
|
-
href: string
|
|
17
|
-
icon?: string
|
|
18
|
-
newtab?: boolean
|
|
19
|
-
external?: boolean
|
|
20
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span
|
|
3
|
-
:id="uuid"
|
|
4
|
-
class="dl-text-holder"
|
|
5
|
-
>
|
|
6
|
-
<span v-if="prefix">{{ prefixPreview }}</span>
|
|
7
|
-
<dl-ellipsis
|
|
8
|
-
:text="textPreview"
|
|
9
|
-
:split="split"
|
|
10
|
-
:split-position="splitPosition"
|
|
11
|
-
/>
|
|
12
|
-
<span v-if="suffix"> {{ suffixPreview }}</span>
|
|
13
|
-
</span>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import { v4 } from 'uuid'
|
|
18
|
-
// todo: this causes an issue
|
|
19
|
-
import { DlEllipsis } from '../../'
|
|
20
|
-
|
|
21
|
-
import { defineComponent } from 'vue-demi'
|
|
22
|
-
|
|
23
|
-
export default defineComponent({
|
|
24
|
-
name: 'DlTextHolder',
|
|
25
|
-
components: { DlEllipsis },
|
|
26
|
-
props: {
|
|
27
|
-
/**
|
|
28
|
-
* Prefix to be displayed
|
|
29
|
-
*/
|
|
30
|
-
prefix: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: null
|
|
33
|
-
},
|
|
34
|
-
/**
|
|
35
|
-
* Suffix to be displayed
|
|
36
|
-
*/
|
|
37
|
-
suffix: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: null
|
|
40
|
-
},
|
|
41
|
-
/**
|
|
42
|
-
* Text to be displayed
|
|
43
|
-
*/
|
|
44
|
-
text: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: ''
|
|
47
|
-
},
|
|
48
|
-
/**
|
|
49
|
-
* Allows to split the text in two parts
|
|
50
|
-
*/
|
|
51
|
-
split: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: false,
|
|
54
|
-
required: false
|
|
55
|
-
},
|
|
56
|
-
/**
|
|
57
|
-
* Position of the split in the text, % of the text length
|
|
58
|
-
*/
|
|
59
|
-
splitPosition: {
|
|
60
|
-
type: Number,
|
|
61
|
-
required: false,
|
|
62
|
-
default: 0.5,
|
|
63
|
-
validator: (value: number) => value >= 0 && value <= 1
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
data() {
|
|
67
|
-
return {
|
|
68
|
-
uuid: `dl-text-holder-${v4()}`
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
computed: {
|
|
72
|
-
prefixPreview(): string {
|
|
73
|
-
return this.prefix?.trim() ?? ''
|
|
74
|
-
},
|
|
75
|
-
suffixPreview(): string {
|
|
76
|
-
return this.suffix?.trim() ?? ''
|
|
77
|
-
},
|
|
78
|
-
textPreview(): string {
|
|
79
|
-
return this.text || ''
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style scoped lang="scss">
|
|
86
|
-
.dl-text-holder {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-wrap: nowrap;
|
|
89
|
-
width: 100%;
|
|
90
|
-
white-space: nowrap;
|
|
91
|
-
}
|
|
92
|
-
</style>
|
|
93
|
-
../DlEllipsis
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="dl-text-holder-demo">
|
|
4
|
-
<dl-text-holder
|
|
5
|
-
prefix="home/Desktop/"
|
|
6
|
-
suffix=".mp3"
|
|
7
|
-
text="very-loooooooooooong-named-song"
|
|
8
|
-
/>
|
|
9
|
-
|
|
10
|
-
<dl-text-holder
|
|
11
|
-
prefix="home/Desktop/"
|
|
12
|
-
suffix=".mp3"
|
|
13
|
-
text="very-loooooooooooong-named-song"
|
|
14
|
-
split
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<dl-text-holder
|
|
18
|
-
prefix="home/Desktop/"
|
|
19
|
-
suffix=".mp3"
|
|
20
|
-
text="very-loooooooooooong-named-song"
|
|
21
|
-
split
|
|
22
|
-
:split-position="0.7"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script lang="ts">
|
|
29
|
-
import { defineComponent } from 'vue-demi'
|
|
30
|
-
import { DlTextHolder } from '../components'
|
|
31
|
-
|
|
32
|
-
export default defineComponent({
|
|
33
|
-
components: {
|
|
34
|
-
DlTextHolder
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<style scoped>
|
|
40
|
-
.dl-text-holder-demo {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-wrap: wrap;
|
|
43
|
-
resize: horizontal;
|
|
44
|
-
overflow: auto;
|
|
45
|
-
width: 300px;
|
|
46
|
-
box-shadow: var(--dl-menu-shadow);
|
|
47
|
-
padding: 5px;
|
|
48
|
-
word-wrap: break-word;
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
File without changes
|
/package/src/components/compound/DlDateTime/DlDateTimeRange/{DlDateInput.vue → DateInput.vue}
RENAMED
|
File without changes
|