@dataloop-ai/components 0.18.0 → 0.18.2
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 +6 -3
- package/src/App.vue +5 -227
- package/src/assets/constants.scss +2 -1
- package/src/assets/globals.scss +21 -0
- package/src/components/basic/DlAccordion/DlAccordion.vue +26 -4
- package/src/components/basic/DlAccordion/components/AccordionHeader.vue +2 -1
- package/src/components/basic/DlAvatar/DlAvatar.vue +1 -1
- package/src/components/basic/DlButton/DlButton.vue +115 -25
- package/src/components/basic/DlButton/utils.ts +45 -2
- package/src/components/basic/DlChip/DlChip.vue +3 -7
- package/src/components/basic/DlChip/utils.ts +4 -4
- package/src/components/basic/DlContainer/DlContainer.vue +70 -0
- package/src/components/basic/DlContainer/index.ts +3 -0
- 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/DlGrid/DlGrid.vue +163 -0
- package/src/components/basic/DlGrid/index.ts +4 -0
- package/src/components/basic/DlGrid/types.ts +5 -0
- package/src/components/basic/DlKpi/components/KpiInfo.vue +2 -1
- package/src/components/basic/DlListItem/DlListItem.vue +96 -66
- package/src/components/basic/DlListItem/utils.ts +0 -3
- package/src/components/basic/DlPanelContainer/DlPanelContainer.vue +37 -13
- package/src/components/basic/DlPopup/DlPopup.vue +58 -11
- package/src/components/basic/DlPopup/components/PopupHeader.vue +11 -6
- package/src/components/basic/DlProgressChart/DlProgressChart.vue +2 -1
- package/src/components/basic/DlWidget/DlWidget.vue +273 -141
- package/src/components/basic/DlWidget/index.ts +1 -3
- package/src/components/basic/DlWidget/utils.ts +90 -8
- package/src/components/basic/index.ts +4 -2
- 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 +39 -4
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +128 -36
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +167 -87
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/utils.ts +2 -1
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +44 -3
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChartWidget.vue +1 -2
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/components/DlDoughnutChartLegend.vue +9 -18
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +48 -9
- package/src/components/compound/DlCharts/charts/DlScatterChart/DlScatterChart.vue +667 -0
- package/src/components/compound/DlCharts/charts/DlScatterChart/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/index.ts +1 -0
- package/src/components/compound/DlCharts/components/DlBrush.vue +3 -2
- package/src/components/compound/DlCharts/components/DlChartLabels.vue +2 -1
- package/src/components/compound/DlCharts/components/DlChartScrollBar.vue +1 -0
- 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 +173 -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/DlDatePicker/DlDatePicker.vue +9 -1
- package/src/components/compound/DlDateTime/DlDatePicker/components/DlCalendar.vue +4 -2
- package/src/components/compound/DlDateTime/DlDatePicker/components/DlMonthCalendar.vue +2 -1
- package/src/components/compound/DlDateTime/DlDateTimeRange/{DlCardSidebar.vue → CardSidebar.vue} +10 -11
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +18 -9
- package/src/components/compound/DlDateTime/DlTimePicker/DlTimePicker.vue +2 -2
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +74 -15
- package/src/components/compound/DlDialogBox/components/DlDialogBoxFooter.vue +1 -1
- package/src/components/compound/DlDialogBox/components/DlDialogBoxHeader.vue +9 -7
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +13 -4
- package/src/components/compound/DlInput/DlInput.vue +80 -17
- package/src/components/compound/DlJsonEditor/DlJsonEditor.vue +42 -219
- package/src/components/compound/DlOptionGroup/DlOptionGroup.vue +16 -17
- package/src/components/compound/DlOptionGroup/components/MenuItemWrapper.vue +2 -2
- package/src/components/compound/DlPagination/DlPagination.vue +1 -1
- package/src/components/compound/DlPagination/components/PaginationLegend.vue +0 -2
- package/src/components/compound/DlPagination/components/RowsSelector.vue +0 -2
- package/src/components/compound/DlRange/DlRange.vue +3 -2
- package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +12 -5
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +413 -97
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchFilters.vue +4 -1
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +100 -39
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSuggestionsDropdown.vue +12 -7
- package/src/components/compound/DlSearches/DlSmartSearch/components/FiltersQuery.vue +5 -6
- package/src/components/compound/DlSearches/DlSmartSearch/types.ts +14 -0
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +10 -6
- package/src/components/compound/DlSearches/DlSmartSearch/utils/index.ts +172 -48
- package/src/components/compound/DlSelect/DlSelect.vue +264 -130
- package/src/components/compound/DlSelect/utils.ts +4 -1
- package/src/components/compound/DlSlider/DlSlider.vue +10 -2
- package/src/components/compound/DlSlider/components/DlSliderBase.vue +3 -3
- package/src/components/compound/DlSlider/components/DlSliderInput.vue +17 -26
- package/src/components/compound/DlSlider/sliderStyles.scss +5 -1
- package/src/components/compound/DlSlider/useSlider.ts +2 -2
- package/src/components/compound/DlSlider/utils.ts +2 -2
- package/src/components/compound/DlStepper/DlStepper.vue +46 -4
- package/src/components/compound/DlStepper/components/DlStepperContent.vue +6 -2
- package/src/components/compound/DlStepper/components/DlStepperFooter.vue +12 -0
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +24 -11
- package/src/components/compound/DlStepper/models/Step.ts +37 -8
- package/src/components/compound/DlStepper/models/Stepper.ts +108 -15
- package/src/components/compound/DlStepper/models/interfaces.ts +2 -1
- package/src/components/compound/DlTable/DlTable.vue +49 -14
- package/src/components/compound/DlTable/components/DlTd.vue +9 -9
- package/src/components/compound/DlTable/components/DlTh.vue +3 -2
- 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 +18 -18
- 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/DlTable/styles/dl-table-styles.scss +8 -0
- package/src/components/compound/DlTabs/DlTabs.vue +83 -31
- package/src/components/compound/DlTabs/components/DlTab.vue +14 -4
- package/src/components/compound/DlTabs/components/TabsWrapper.vue +32 -27
- 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/DlToast/api/useToast.ts +42 -1
- package/src/components/compound/DlToast/components/ToastComponent.vue +24 -32
- package/src/components/compound/DlToast/types.ts +52 -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 +14 -1
- package/src/components/compound/types.ts +2 -0
- package/src/components/essential/DlBadge/DlBadge.vue +3 -3
- package/src/components/essential/DlCheckbox/DlCheckbox.vue +10 -7
- package/src/components/essential/DlEllipsis/DlEllipsis.vue +141 -0
- package/src/components/essential/DlIcon/DlIcon.vue +5 -5
- package/src/components/essential/DlLabel/DlLabel.vue +190 -0
- package/src/components/essential/DlLabel/index.ts +2 -0
- package/src/components/essential/DlList/DlList.vue +3 -3
- package/src/components/essential/DlMenu/DlMenu.vue +41 -22
- package/src/components/essential/DlMenu/utils.ts +8 -7
- package/src/components/essential/DlPageLayout/DlPageLayout.vue +90 -0
- package/src/components/essential/DlPageLayout/index.ts +2 -0
- package/src/components/essential/DlProgressBar/DlProgressBar.vue +1 -1
- package/src/components/essential/DlRadio/DlRadio.vue +10 -5
- package/src/components/essential/DlSeparator/DlSeparator.vue +2 -2
- package/src/components/essential/DlSpinner/index.ts +1 -13
- package/src/components/essential/DlSpinner/styles/spinnerStyles.scss +7 -0
- package/src/components/essential/DlSwitch/DlSwitch.vue +6 -3
- package/src/components/essential/DlTextArea/DlTextArea.vue +212 -7
- package/src/components/essential/DlThemeProvider/DlThemeProvider.vue +6 -0
- package/src/components/essential/DlTypography/DlTypography.vue +7 -1
- package/src/components/essential/index.ts +3 -2
- package/src/components/shared/DlInfoErrorMessage/DlInfoErrorMessage.vue +1 -1
- package/src/components/{essential → shared}/DlTooltip/DlTooltip.vue +26 -19
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +106 -43
- package/src/components/shared/DlVirtualScroll/useVirtualScroll.ts +28 -4
- package/src/components/shared/index.ts +1 -0
- package/src/components/types.ts +2 -0
- package/src/demos/BarChartDemo.vue +59 -2
- package/src/demos/ColumnChartDemo.vue +67 -2
- package/src/demos/DlAccordionDemo.vue +92 -43
- package/src/demos/DlAlertDemo.vue +14 -0
- package/src/demos/DlButtonDemo.vue +41 -4
- package/src/demos/DlCardDemo.vue +156 -19
- package/src/demos/DlChartDoughnutDemo.vue +49 -2
- package/src/demos/DlCheckboxDemo.vue +28 -3
- package/src/demos/DlCodeEditor/DlCodeEditorDemo.vue +247 -0
- package/src/demos/DlCodeEditor/index.ts +2 -0
- package/src/demos/DlConfusionMatrixDemo.vue +93 -37
- package/src/demos/DlDemoPage.vue +235 -0
- package/src/demos/DlDialogBoxDemo.vue +56 -51
- package/src/demos/DlDropdownButtonDemo.vue +35 -27
- package/src/demos/DlEmptyStateDemo.vue +81 -0
- package/src/demos/DlGridDemo.vue +40 -0
- package/src/demos/DlInputDemo.vue +21 -1
- package/src/demos/DlJsonEditorDemo.vue +59 -0
- package/src/demos/DlLabelDemo.vue +208 -0
- package/src/demos/DlLineChartDemo.vue +50 -2
- package/src/demos/DlListDemo.vue +12 -9
- package/src/demos/DlMenuDemo.vue +147 -20
- package/src/demos/DlPageLayoutDemo.vue +146 -0
- package/src/demos/DlPanelContainerDemo.vue +113 -2
- package/src/demos/DlPopupDemo.vue +82 -1
- package/src/demos/DlRadioDemo.vue +16 -1
- package/src/demos/DlScatterChartDemo.vue +161 -0
- package/src/demos/DlSearchDemo.vue +9 -0
- package/src/demos/DlSelectDemo.vue +124 -27
- package/src/demos/DlSpinnerDemo.vue +0 -2
- package/src/demos/DlStepperDemo/DlStepperDemo.vue +5 -1
- package/src/demos/DlStepperDemo/EmptyStateStepper.vue +149 -0
- package/src/demos/DlStepperDemo/SimpleStepper.vue +4 -0
- package/src/demos/DlStepperDemo/steps/GeneralStep.vue +1 -0
- package/src/demos/DlSwitchDemo.vue +12 -0
- package/src/demos/DlTableDemo.vue +84 -5
- package/src/demos/DlTabsDemo.vue +92 -3
- package/src/demos/DlTextAreaDemo.vue +14 -17
- package/src/demos/DlThumbnailGalleryDemo.vue +99 -0
- package/src/demos/DlToastDemo.vue +3 -9
- package/src/demos/DlTooltipDemo.vue +66 -2
- package/src/demos/DlTreeTableDemo.vue +694 -0
- package/src/demos/DlVirtualScrollDemo.vue +3 -12
- package/src/demos/DlWidgetDemo.vue +252 -61
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +151 -32
- package/src/demos/index.ts +23 -4
- package/src/hooks/use-anchor.ts +15 -17
- package/src/hooks/use-arrow-navigation.ts +64 -21
- package/src/hooks/use-model-toggle.ts +14 -16
- package/src/hooks/use-portal.ts +9 -3
- package/src/hooks/use-scroll-target.ts +2 -4
- package/src/hooks/use-size-observer.ts +3 -2
- package/src/hooks/use-suggestions.ts +239 -49
- 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/input-sizes.ts +5 -2
- package/src/utils/is-ellipsis-active.ts +4 -1
- package/src/utils/parse-smart-query.ts +209 -111
- package/src/utils/portal.ts +5 -5
- package/src/utils/position-engine.ts +7 -7
- 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 -241
- package/src/components/basic/DlCard/types.ts +0 -20
- package/src/components/basic/DlEllipsis/DlEllipsis.vue +0 -114
- package/src/components/basic/DlWidget/DlGrid.vue +0 -33
- package/src/components/basic/DlWidget/DlGridRow.vue +0 -32
- package/src/components/compound/DlSearches/DlSmartSearch/utils/utils.ts +0 -124
- package/src/components/compound/DlToast/utils/config.ts +0 -17
- package/src/components/essential/DlTextHolder/DlTextHolder.vue +0 -65
- package/src/components/essential/DlTextHolder/index.ts +0 -2
- package/src/demos/DlTextHolderDemo.vue +0 -42
- package/src/utils/swapNodes.ts +0 -30
- /package/src/components/{basic → compound}/DlCard/index.ts +0 -0
- /package/src/components/compound/DlDateTime/DlDateTimeRange/{DlDateInput.vue → DateInput.vue} +0 -0
- /package/src/components/{basic → essential}/DlEllipsis/index.ts +0 -0
- /package/src/components/{essential → shared}/DlTooltip/index.ts +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main-content">
|
|
3
|
+
<main-content-header @onChangeViewMode="handleViewMode" />
|
|
4
|
+
<main-content-images :view-mode="viewMode" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
10
|
+
import MainContentHeader from './MainContent/MainContentNav.vue'
|
|
11
|
+
import MainContentImages from './MainContent/MainContentImages.vue'
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
name: 'DatasetMainContent',
|
|
15
|
+
components: {
|
|
16
|
+
MainContentHeader,
|
|
17
|
+
MainContentImages
|
|
18
|
+
},
|
|
19
|
+
setup() {
|
|
20
|
+
const viewMode = ref('')
|
|
21
|
+
const handleViewMode = (value: string) => {
|
|
22
|
+
viewMode.value = value
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
viewMode,
|
|
27
|
+
handleViewMode
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped lang="scss">
|
|
34
|
+
.main-content {
|
|
35
|
+
display: flex;
|
|
36
|
+
gap: 10px;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
padding-top: 10px;
|
|
40
|
+
padding-inline: 20px;
|
|
41
|
+
align-content: center;
|
|
42
|
+
text-align: center;
|
|
43
|
+
|
|
44
|
+
img {
|
|
45
|
+
width: 135px;
|
|
46
|
+
height: 135px;
|
|
47
|
+
object-fit: cover;
|
|
48
|
+
border-radius: 2px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="right-drawer-content"
|
|
4
|
+
:style="cssVars"
|
|
5
|
+
>
|
|
6
|
+
<div class="right-drawer-content__toggle-icon">
|
|
7
|
+
<dl-button
|
|
8
|
+
flat
|
|
9
|
+
:icon="expandIcon"
|
|
10
|
+
color="secondary"
|
|
11
|
+
@click="onToggle"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
<div
|
|
15
|
+
style="
|
|
16
|
+
padding-bottom: 10px;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: center;
|
|
20
|
+
padding-top: 300px;
|
|
21
|
+
"
|
|
22
|
+
>
|
|
23
|
+
<dl-icon
|
|
24
|
+
icon="icon-dl-item-outline"
|
|
25
|
+
size="30px"
|
|
26
|
+
color="dl-color-darker"
|
|
27
|
+
/>
|
|
28
|
+
<dl-typography
|
|
29
|
+
size="12px"
|
|
30
|
+
color="secondary"
|
|
31
|
+
>
|
|
32
|
+
Select an item from the left to get more item details.
|
|
33
|
+
</dl-typography>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { computed, defineComponent, ref } from 'vue-demi'
|
|
40
|
+
import { DlTypography, DlIcon, DlButton } from '../../../components'
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: 'DatasetRightDrawer',
|
|
44
|
+
components: {
|
|
45
|
+
DlTypography,
|
|
46
|
+
DlIcon,
|
|
47
|
+
DlButton
|
|
48
|
+
},
|
|
49
|
+
setup() {
|
|
50
|
+
const LARGE_WIDTH = '300px'
|
|
51
|
+
const SMALL_WIDTH = '30px'
|
|
52
|
+
const rightDrawerContentWidth = ref(LARGE_WIDTH)
|
|
53
|
+
const isExpanded = ref(true)
|
|
54
|
+
|
|
55
|
+
const onToggle = () => {
|
|
56
|
+
isExpanded.value = !isExpanded.value
|
|
57
|
+
rightDrawerContentWidth.value = isExpanded.value
|
|
58
|
+
? LARGE_WIDTH
|
|
59
|
+
: SMALL_WIDTH
|
|
60
|
+
}
|
|
61
|
+
const expandIcon = computed(() =>
|
|
62
|
+
isExpanded.value ? 'icon-dl-collapse' : 'icon-dl-expand'
|
|
63
|
+
)
|
|
64
|
+
const cssVars = computed(() => {
|
|
65
|
+
return {
|
|
66
|
+
'--right-drawer-content-width': rightDrawerContentWidth.value
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
onToggle,
|
|
72
|
+
expandIcon,
|
|
73
|
+
cssVars
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style scoped lang="scss">
|
|
80
|
+
.right-drawer-content {
|
|
81
|
+
width: var(--right-drawer-content-width);
|
|
82
|
+
transition: all 350ms;
|
|
83
|
+
|
|
84
|
+
&__toggle-icon {
|
|
85
|
+
left: 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dl-dropdown-button
|
|
3
|
+
auto-close
|
|
4
|
+
flat
|
|
5
|
+
label="Actions"
|
|
6
|
+
:no-wrap="false"
|
|
7
|
+
:overflow="false"
|
|
8
|
+
fit-content
|
|
9
|
+
size="s"
|
|
10
|
+
text-color="dl-color-darker"
|
|
11
|
+
>
|
|
12
|
+
<dl-list
|
|
13
|
+
bordered
|
|
14
|
+
separator
|
|
15
|
+
>
|
|
16
|
+
<dl-list-item
|
|
17
|
+
v-for="item in items"
|
|
18
|
+
:key="item.id"
|
|
19
|
+
clickable
|
|
20
|
+
:bordered="item.isBordered"
|
|
21
|
+
:start-icon="item.icon"
|
|
22
|
+
:start-icon-color="item.iconColor"
|
|
23
|
+
@click="handleOption(item)"
|
|
24
|
+
>
|
|
25
|
+
<dl-item-section :color="item.labelColor">
|
|
26
|
+
{{ item.label }}
|
|
27
|
+
</dl-item-section>
|
|
28
|
+
</dl-list-item>
|
|
29
|
+
</dl-list>
|
|
30
|
+
</dl-dropdown-button>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts">
|
|
34
|
+
import { defineComponent } from 'vue-demi'
|
|
35
|
+
import {
|
|
36
|
+
DlDropdownButton,
|
|
37
|
+
DlList,
|
|
38
|
+
DlListItem,
|
|
39
|
+
DlItemSection
|
|
40
|
+
} from '../../../../components'
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: 'ActionsMenu',
|
|
44
|
+
components: {
|
|
45
|
+
DlDropdownButton,
|
|
46
|
+
DlList,
|
|
47
|
+
DlListItem,
|
|
48
|
+
DlItemSection
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
items: {
|
|
52
|
+
type: Array,
|
|
53
|
+
default: () => [] as Record<string, any>[]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
emits: ['onChange'],
|
|
57
|
+
setup(props, context) {
|
|
58
|
+
const handleOption = (event: Event) => {
|
|
59
|
+
console.log('click: ', event)
|
|
60
|
+
context.emit('onChange', event)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
handleOption
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<style scoped></style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dl-dropdown-button
|
|
3
|
+
flat
|
|
4
|
+
label="Automations"
|
|
5
|
+
:no-wrap="false"
|
|
6
|
+
:overflow="false"
|
|
7
|
+
fit-content
|
|
8
|
+
size="s"
|
|
9
|
+
text-color="dl-color-darker"
|
|
10
|
+
>
|
|
11
|
+
<dl-list
|
|
12
|
+
bordered
|
|
13
|
+
separator
|
|
14
|
+
>
|
|
15
|
+
<dl-list-item
|
|
16
|
+
v-for="item in items"
|
|
17
|
+
:key="item.id"
|
|
18
|
+
clickable
|
|
19
|
+
:bordered="item.isBordered"
|
|
20
|
+
:start-icon="item.icon"
|
|
21
|
+
:start-icon-color="item.iconColor"
|
|
22
|
+
@click="handleOption(item)"
|
|
23
|
+
>
|
|
24
|
+
<dl-item-section :color="item.labelColor">
|
|
25
|
+
{{ item.label }}
|
|
26
|
+
</dl-item-section>
|
|
27
|
+
<dl-item-section
|
|
28
|
+
v-if="item.children"
|
|
29
|
+
side
|
|
30
|
+
>
|
|
31
|
+
<dl-icon icon="icon-dl-right-chevron" />
|
|
32
|
+
</dl-item-section>
|
|
33
|
+
<dl-menu
|
|
34
|
+
v-if="item.children"
|
|
35
|
+
auto-close
|
|
36
|
+
anchor="top end"
|
|
37
|
+
self="top start"
|
|
38
|
+
>
|
|
39
|
+
<dl-list
|
|
40
|
+
bordered
|
|
41
|
+
separator
|
|
42
|
+
>
|
|
43
|
+
<dl-list-item
|
|
44
|
+
v-for="itemChildren in item.children"
|
|
45
|
+
:key="itemChildren.id"
|
|
46
|
+
dense
|
|
47
|
+
clickable
|
|
48
|
+
>
|
|
49
|
+
<dl-item-section>
|
|
50
|
+
{{ itemChildren.label }}
|
|
51
|
+
</dl-item-section>
|
|
52
|
+
<dl-item-section
|
|
53
|
+
v-if="itemChildren.icon"
|
|
54
|
+
side
|
|
55
|
+
>
|
|
56
|
+
<dl-icon :icon="itemChildren.icon" />
|
|
57
|
+
</dl-item-section>
|
|
58
|
+
</dl-list-item>
|
|
59
|
+
</dl-list>
|
|
60
|
+
</dl-menu>
|
|
61
|
+
</dl-list-item>
|
|
62
|
+
</dl-list>
|
|
63
|
+
</dl-dropdown-button>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script lang="ts">
|
|
67
|
+
import { defineComponent } from 'vue-demi'
|
|
68
|
+
import {
|
|
69
|
+
DlList,
|
|
70
|
+
DlMenu,
|
|
71
|
+
DlListItem,
|
|
72
|
+
DlItemSection,
|
|
73
|
+
DlIcon,
|
|
74
|
+
DlDropdownButton
|
|
75
|
+
} from '../../../../components'
|
|
76
|
+
export default defineComponent({
|
|
77
|
+
name: 'AutomationMenu',
|
|
78
|
+
components: {
|
|
79
|
+
DlDropdownButton,
|
|
80
|
+
DlMenu,
|
|
81
|
+
DlList,
|
|
82
|
+
DlListItem,
|
|
83
|
+
DlItemSection,
|
|
84
|
+
DlIcon
|
|
85
|
+
},
|
|
86
|
+
props: {
|
|
87
|
+
items: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: () => [] as Record<string, any>[]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
emits: ['onChange'],
|
|
93
|
+
setup(props, context) {
|
|
94
|
+
const handleOption = (event: Event) => {
|
|
95
|
+
console.log('click: ', event)
|
|
96
|
+
context.emit('onChange', event)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
handleOption
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style scoped></style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="card-view">
|
|
3
|
+
<DlCard
|
|
4
|
+
v-for="(image, imageIndex) in items"
|
|
5
|
+
:key="imageIndex"
|
|
6
|
+
interactive
|
|
7
|
+
zoom
|
|
8
|
+
:image="{
|
|
9
|
+
src: image.url,
|
|
10
|
+
link: {
|
|
11
|
+
icon: 'icon-dl-link',
|
|
12
|
+
color: 'black',
|
|
13
|
+
size: '12px',
|
|
14
|
+
href: 'https://dataloop.ai/'
|
|
15
|
+
}
|
|
16
|
+
}"
|
|
17
|
+
description="text"
|
|
18
|
+
title="title"
|
|
19
|
+
:links="{
|
|
20
|
+
title: 'title',
|
|
21
|
+
href: image.url
|
|
22
|
+
}"
|
|
23
|
+
:tags="[
|
|
24
|
+
{
|
|
25
|
+
label: 'A',
|
|
26
|
+
color: '#FFBBFF',
|
|
27
|
+
textColor: 'black'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Lemon',
|
|
31
|
+
color: '#7000FF',
|
|
32
|
+
textColor: 'black'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'B',
|
|
36
|
+
color: '#FFDA3A',
|
|
37
|
+
textColor: 'black'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'D',
|
|
41
|
+
color: '#00A0FF',
|
|
42
|
+
textColor: 'black'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: 'X',
|
|
46
|
+
color: '#AADC3A',
|
|
47
|
+
textColor: 'black'
|
|
48
|
+
}
|
|
49
|
+
]"
|
|
50
|
+
indicator-color="red"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script lang="ts">
|
|
56
|
+
import { defineComponent, PropType } from 'vue-demi'
|
|
57
|
+
import { ImageMetadata } from '../types/imageMetadata'
|
|
58
|
+
import { DlCard } from '../../../../components'
|
|
59
|
+
|
|
60
|
+
export default defineComponent({
|
|
61
|
+
name: 'CardView',
|
|
62
|
+
components: {
|
|
63
|
+
DlCard
|
|
64
|
+
},
|
|
65
|
+
props: {
|
|
66
|
+
items: {
|
|
67
|
+
type: Array,
|
|
68
|
+
default: () => Array as PropType<ImageMetadata[]>
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
setup() {
|
|
72
|
+
const imageStyles = (url: string) => {
|
|
73
|
+
return {
|
|
74
|
+
backgroundImage: `url(${url})`,
|
|
75
|
+
width: '127px',
|
|
76
|
+
height: '135px',
|
|
77
|
+
backgroundPosition: 'center',
|
|
78
|
+
backgroundRepeat: 'no-repeat',
|
|
79
|
+
backgroundSize: 'cover',
|
|
80
|
+
marginRight: '10px'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
imageStyles
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<style scoped lang="scss">
|
|
92
|
+
.card-view {
|
|
93
|
+
display: flex;
|
|
94
|
+
gap: 30px;
|
|
95
|
+
flex-wrap: wrap;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
padding-top: 10px;
|
|
98
|
+
align-content: center;
|
|
99
|
+
text-align: center;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="cardViewGalleryWrapper"
|
|
4
|
+
style="padding-top: 10px"
|
|
5
|
+
>
|
|
6
|
+
<dl-virtual-scroll
|
|
7
|
+
:items="itemsToDisplay"
|
|
8
|
+
:virtual-scroll-item-size="295"
|
|
9
|
+
:virtual-scroll-sticky-size-start="20"
|
|
10
|
+
:virtual-scroll-sticky-size-end="20"
|
|
11
|
+
separator
|
|
12
|
+
@virtual-scroll="log"
|
|
13
|
+
>
|
|
14
|
+
<template #default="{ item, index }">
|
|
15
|
+
<dl-list-item
|
|
16
|
+
:key="index"
|
|
17
|
+
dense
|
|
18
|
+
>
|
|
19
|
+
<dl-item-section>
|
|
20
|
+
<div
|
|
21
|
+
class="row custom-element"
|
|
22
|
+
:style="`gap: ${imagesGap}px; margin-bottom: 20px`"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
v-for="(col, i) in item.items"
|
|
26
|
+
:key="`${index}-${i}`"
|
|
27
|
+
:style="imageStyles(col.url)"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
</dl-item-section>
|
|
31
|
+
</dl-list-item>
|
|
32
|
+
</template>
|
|
33
|
+
</dl-virtual-scroll>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script lang="ts">
|
|
38
|
+
import {
|
|
39
|
+
defineComponent,
|
|
40
|
+
onMounted,
|
|
41
|
+
onUnmounted,
|
|
42
|
+
PropType,
|
|
43
|
+
ref
|
|
44
|
+
} from 'vue-demi'
|
|
45
|
+
import { ImageMetadata } from '../types/imageMetadata'
|
|
46
|
+
import { DlVirtualScroll } from '../../../../components'
|
|
47
|
+
|
|
48
|
+
export default defineComponent({
|
|
49
|
+
name: 'CardViewGallery',
|
|
50
|
+
components: {
|
|
51
|
+
DlVirtualScroll
|
|
52
|
+
},
|
|
53
|
+
props: {
|
|
54
|
+
items: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: () => Array as PropType<ImageMetadata[]>
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
setup(props, { emit }) {
|
|
60
|
+
const imageStyles = (url: string): Record<string, string> => ({
|
|
61
|
+
backgroundImage: `url(${url})`,
|
|
62
|
+
width: '140px',
|
|
63
|
+
height: '135px',
|
|
64
|
+
backgroundPosition: 'center',
|
|
65
|
+
backgroundRepeat: 'no-repeat',
|
|
66
|
+
backgroundSize: 'cover',
|
|
67
|
+
marginRight: '10px'
|
|
68
|
+
})
|
|
69
|
+
const log = console.log
|
|
70
|
+
|
|
71
|
+
const cardViewGalleryWrapper = ref(null)
|
|
72
|
+
const resizeObserver = ref(null)
|
|
73
|
+
const itemsToDisplay = ref(props.items)
|
|
74
|
+
const imageWidth = 150
|
|
75
|
+
const imagesGap = ref(0)
|
|
76
|
+
|
|
77
|
+
const restructureData = (width: number) => {
|
|
78
|
+
if (!props.items.length) return
|
|
79
|
+
|
|
80
|
+
const cols = Math.floor(width / imageWidth) || 1
|
|
81
|
+
const remaningPixels = width - cols * imageWidth
|
|
82
|
+
imagesGap.value =
|
|
83
|
+
cols !== 1 ? Math.floor(remaningPixels / (cols - 1)) : 0
|
|
84
|
+
const rows = Math.ceil(props.items.length / cols)
|
|
85
|
+
const toDisplay = []
|
|
86
|
+
|
|
87
|
+
for (let i = 0; i < rows; ++i) {
|
|
88
|
+
const items = []
|
|
89
|
+
for (
|
|
90
|
+
let j = 0;
|
|
91
|
+
j < cols &&
|
|
92
|
+
toDisplay.length * cols + j !== props.items.length;
|
|
93
|
+
++j
|
|
94
|
+
) {
|
|
95
|
+
items.push(props.items[i * cols + j])
|
|
96
|
+
}
|
|
97
|
+
toDisplay.push({ items })
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
itemsToDisplay.value = toDisplay.slice(0, props.items.length - 1)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
onMounted(() => {
|
|
104
|
+
restructureData(cardViewGalleryWrapper.value.offsetWidth)
|
|
105
|
+
|
|
106
|
+
resizeObserver.value = new ResizeObserver((elems) => {
|
|
107
|
+
const elem = elems[0]
|
|
108
|
+
if (!elem) return
|
|
109
|
+
const width = elem.contentRect.width
|
|
110
|
+
restructureData(width)
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
resizeObserver.value.observe(cardViewGalleryWrapper.value)
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
onUnmounted(() => {
|
|
117
|
+
resizeObserver.value?.disconnect()
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
cardViewGalleryWrapper,
|
|
122
|
+
itemsToDisplay,
|
|
123
|
+
imageStyles,
|
|
124
|
+
log,
|
|
125
|
+
imagesGap
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<style scoped lang="scss">
|
|
132
|
+
.card-view-gallery {
|
|
133
|
+
display: flex;
|
|
134
|
+
gap: 1vw;
|
|
135
|
+
flex-wrap: wrap;
|
|
136
|
+
justify-content: flex-start;
|
|
137
|
+
padding-top: 10px;
|
|
138
|
+
align-content: center;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
</style>
|