@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,193 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="card-view-table">
|
|
3
|
+
<DlTable
|
|
4
|
+
:hide-pagination="true"
|
|
5
|
+
title="Treats"
|
|
6
|
+
color="dl-color-secondary"
|
|
7
|
+
:rows="items"
|
|
8
|
+
:columns="tableColumns"
|
|
9
|
+
row-key="index"
|
|
10
|
+
style="height: 100%"
|
|
11
|
+
virtual-scroll
|
|
12
|
+
:rows-per-page-options="[0]"
|
|
13
|
+
:visible-columns="visibleColumns"
|
|
14
|
+
>
|
|
15
|
+
<template #header="props">
|
|
16
|
+
<dl-tr :props="props">
|
|
17
|
+
<dl-th
|
|
18
|
+
v-for="col in props.cols"
|
|
19
|
+
:key="col.name"
|
|
20
|
+
:props="props"
|
|
21
|
+
>
|
|
22
|
+
{{ col.label }}
|
|
23
|
+
</dl-th>
|
|
24
|
+
<dl-th :props="props">
|
|
25
|
+
<dl-button
|
|
26
|
+
text-color="dl-color-medium"
|
|
27
|
+
flat
|
|
28
|
+
icon="icon-dl-column"
|
|
29
|
+
>
|
|
30
|
+
<dl-menu>
|
|
31
|
+
<dl-list separator>
|
|
32
|
+
<dl-option-group
|
|
33
|
+
v-model="visibleColumns"
|
|
34
|
+
:options="options"
|
|
35
|
+
:left-label="true"
|
|
36
|
+
max-width="250px"
|
|
37
|
+
type="switch"
|
|
38
|
+
class="table-options"
|
|
39
|
+
/>
|
|
40
|
+
</dl-list>
|
|
41
|
+
</dl-menu>
|
|
42
|
+
</dl-button>
|
|
43
|
+
</dl-th>
|
|
44
|
+
</dl-tr>
|
|
45
|
+
</template>
|
|
46
|
+
<template #body-cell-name="props">
|
|
47
|
+
<dl-td :props="props">
|
|
48
|
+
<div class="flex items-center">
|
|
49
|
+
<div :style="imageStyles(props.row.url)" />
|
|
50
|
+
<div style="display: flex; max-width: 400px">
|
|
51
|
+
<dl-ellipsis :text="props.row.name" />
|
|
52
|
+
{{ props.row.extension }}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</dl-td>
|
|
56
|
+
</template>
|
|
57
|
+
<template #body-cell-createdAt="image">
|
|
58
|
+
<dl-td :props="image">
|
|
59
|
+
{{ formatDate(image.row.createdAt) }}
|
|
60
|
+
</dl-td>
|
|
61
|
+
</template>
|
|
62
|
+
<template #body-cell-updatedAt="image">
|
|
63
|
+
<dl-td :props="image">
|
|
64
|
+
{{ formatDate(image.row.updatedAt) }}
|
|
65
|
+
</dl-td>
|
|
66
|
+
</template>
|
|
67
|
+
</DlTable>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script lang="ts">
|
|
72
|
+
import { ref, defineComponent, PropType } from 'vue-demi'
|
|
73
|
+
import {
|
|
74
|
+
DlTable,
|
|
75
|
+
DlTd,
|
|
76
|
+
DlTr,
|
|
77
|
+
DlTh,
|
|
78
|
+
DlOptionGroup,
|
|
79
|
+
DlList,
|
|
80
|
+
DlMenu,
|
|
81
|
+
DlEllipsis,
|
|
82
|
+
DlButton
|
|
83
|
+
} from '../../../../components'
|
|
84
|
+
import { ImageMetadata } from '../types/imageMetadata'
|
|
85
|
+
|
|
86
|
+
const columns = [
|
|
87
|
+
{
|
|
88
|
+
name: 'name',
|
|
89
|
+
required: true,
|
|
90
|
+
label: 'File Name',
|
|
91
|
+
align: 'left',
|
|
92
|
+
field: 'name',
|
|
93
|
+
sortable: true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'createdAt',
|
|
97
|
+
align: 'right',
|
|
98
|
+
label: 'Created At',
|
|
99
|
+
field: 'createdAt',
|
|
100
|
+
sortable: true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'updatedAt',
|
|
104
|
+
label: 'Updated At',
|
|
105
|
+
align: 'right',
|
|
106
|
+
field: 'updatedAt',
|
|
107
|
+
sortable: true
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'mediaType',
|
|
111
|
+
label: 'Media Type',
|
|
112
|
+
field: 'mediaType',
|
|
113
|
+
align: 'left'
|
|
114
|
+
},
|
|
115
|
+
{ name: 'state', label: 'State', field: 'state', align: 'left' }
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
export default defineComponent({
|
|
119
|
+
name: 'CardViewTable',
|
|
120
|
+
components: {
|
|
121
|
+
DlOptionGroup,
|
|
122
|
+
DlTd,
|
|
123
|
+
DlTr,
|
|
124
|
+
DlTh,
|
|
125
|
+
DlEllipsis,
|
|
126
|
+
DlTable,
|
|
127
|
+
DlButton,
|
|
128
|
+
DlMenu,
|
|
129
|
+
DlList
|
|
130
|
+
},
|
|
131
|
+
props: {
|
|
132
|
+
items: {
|
|
133
|
+
type: Array,
|
|
134
|
+
default: () => Array as PropType<ImageMetadata[]>
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
setup() {
|
|
138
|
+
const tableColumns = ref(columns)
|
|
139
|
+
const separator = ref('horizontal')
|
|
140
|
+
const formatDate = (date: Date) => {
|
|
141
|
+
return date
|
|
142
|
+
.toLocaleDateString('en-US', {
|
|
143
|
+
month: 'short',
|
|
144
|
+
day: 'numeric',
|
|
145
|
+
year: 'numeric',
|
|
146
|
+
hour: 'numeric',
|
|
147
|
+
minute: '2-digit',
|
|
148
|
+
second: '2-digit'
|
|
149
|
+
})
|
|
150
|
+
.split(' ')
|
|
151
|
+
.join(' ')
|
|
152
|
+
}
|
|
153
|
+
const log = console.log
|
|
154
|
+
|
|
155
|
+
const visibleColumns = ref([
|
|
156
|
+
'name',
|
|
157
|
+
'createdAt',
|
|
158
|
+
'updatedAt',
|
|
159
|
+
'mediaType',
|
|
160
|
+
'state'
|
|
161
|
+
])
|
|
162
|
+
const options = tableColumns.value.map((item) => ({
|
|
163
|
+
label: item.label,
|
|
164
|
+
value: item.name
|
|
165
|
+
}))
|
|
166
|
+
const imageStyles = (url: string): Record<string, string> => ({
|
|
167
|
+
backgroundImage: `url(${url})`,
|
|
168
|
+
width: '36px',
|
|
169
|
+
height: '27px',
|
|
170
|
+
backgroundPosition: 'center',
|
|
171
|
+
backgroundRepeat: 'no-repeat',
|
|
172
|
+
backgroundSize: 'cover',
|
|
173
|
+
marginRight: '10px'
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
separator,
|
|
178
|
+
formatDate,
|
|
179
|
+
log,
|
|
180
|
+
tableColumns,
|
|
181
|
+
visibleColumns,
|
|
182
|
+
options,
|
|
183
|
+
imageStyles
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
</script>
|
|
188
|
+
<style lang="scss" scoped>
|
|
189
|
+
.card-view-table {
|
|
190
|
+
width: 100%;
|
|
191
|
+
overflow-x: scroll;
|
|
192
|
+
}
|
|
193
|
+
</style>
|
package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/LayoutEmptyState.vue
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="layout-empty-state grid-cols-2">
|
|
3
|
+
<div class="flex full-width text-center justify-center">
|
|
4
|
+
<upload-data />
|
|
5
|
+
</div>
|
|
6
|
+
<div class="flex full-width text-center justify-center">
|
|
7
|
+
<dl-code-editor
|
|
8
|
+
v-model="codeEditorValue"
|
|
9
|
+
width="485px"
|
|
10
|
+
height="547px"
|
|
11
|
+
:language="language"
|
|
12
|
+
:theme="theme"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { computed, defineComponent, ref } from 'vue-demi'
|
|
20
|
+
import UploadData from './UploadData.vue'
|
|
21
|
+
import { DlCodeEditor } from '../../../../../components'
|
|
22
|
+
import { DlCodeEditorTheme } from '../../../../../components/types'
|
|
23
|
+
|
|
24
|
+
export default defineComponent({
|
|
25
|
+
name: 'LayoutEmptyState',
|
|
26
|
+
components: {
|
|
27
|
+
UploadData,
|
|
28
|
+
DlCodeEditor
|
|
29
|
+
},
|
|
30
|
+
setup() {
|
|
31
|
+
const codeEditorValue = ref(
|
|
32
|
+
'import urllib3\n' +
|
|
33
|
+
'urllib3.disable_warnings()\n' +
|
|
34
|
+
'from base64 import b64encode\n' +
|
|
35
|
+
'import os\n' +
|
|
36
|
+
'import sys\n' +
|
|
37
|
+
'import json\n' +
|
|
38
|
+
'import getpass\n' +
|
|
39
|
+
'from optparse import OptionParser\n' +
|
|
40
|
+
'from datetime import datetime, timedelta\n' +
|
|
41
|
+
'import time\n' +
|
|
42
|
+
'from time import gmtime, strftime, strptime\n' +
|
|
43
|
+
'from operator import itemgetter, attrgetter\n' +
|
|
44
|
+
'from purity_fb import PurityFb, FileSystem, FileSystemSnapshot, SnapshotSuffix, rest\n' +
|
|
45
|
+
'\n' +
|
|
46
|
+
'# Global Variables\n' +
|
|
47
|
+
"VERSION = '2.0.0'\n" +
|
|
48
|
+
"HEADER = 'Pure Storage Take FlashBlade Snapshot (' + VERSION + ')'\n" +
|
|
49
|
+
"BANNER = ('=' * 132)\n" +
|
|
50
|
+
'DEBUG_FLAG = False\n' +
|
|
51
|
+
'VERBOSE_FLAG = False\n' +
|
|
52
|
+
"COOKIE = ''\n" +
|
|
53
|
+
'\n' +
|
|
54
|
+
'def parsecl():\n' +
|
|
55
|
+
" usage = 'usage: %prog [options]'\n" +
|
|
56
|
+
" version = '%prog ' + VERSION\n" +
|
|
57
|
+
' description = "This application has been developed using Pure Storage v1.12 RESTful Web Service interfaces. Developed and tested using Python 3.9.5 Please contact ron@purestorage.com for assistance."\n' +
|
|
58
|
+
'\n' +
|
|
59
|
+
' parser = OptionParser(usage=usage, version=version, description=description)\n' +
|
|
60
|
+
'\n' +
|
|
61
|
+
'\n' +
|
|
62
|
+
" parser.add_option('-d', '--debug',\n" +
|
|
63
|
+
" action = 'store_true',\n" +
|
|
64
|
+
" dest = 'DEBUG_FLAG',\n" +
|
|
65
|
+
' default = False,\n' +
|
|
66
|
+
" help = 'Debug [default: %default]')\n" +
|
|
67
|
+
' \n' +
|
|
68
|
+
" parser.add_option('-f', '--filesystem',\n" +
|
|
69
|
+
" action = 'store',\n" +
|
|
70
|
+
" type = 'string',\n" +
|
|
71
|
+
" dest = 'fs',\n" +
|
|
72
|
+
" help = 'FlashBlade File System')\n" +
|
|
73
|
+
' \n' +
|
|
74
|
+
" parser.add_option('-r', '--replicant',\n" +
|
|
75
|
+
" action = 'store',\n" +
|
|
76
|
+
" type = 'string',\n" +
|
|
77
|
+
" dest = 'flashBladeRep',\n" +
|
|
78
|
+
" help = 'FlashBlade Replicant array')\n" +
|
|
79
|
+
' \n' +
|
|
80
|
+
" parser.add_option('-s', '--server',\n" +
|
|
81
|
+
" action = 'store',\n" +
|
|
82
|
+
" type = 'string',\n" +
|
|
83
|
+
" dest = 'flashBlade',\n" +
|
|
84
|
+
" help = 'FlashBlade array')\n" +
|
|
85
|
+
' \n' +
|
|
86
|
+
" parser.add_option('-t', '--token',\n" +
|
|
87
|
+
" action = 'store',\n" +
|
|
88
|
+
" type = 'string',\n" +
|
|
89
|
+
" dest = 'API_TOKEN',\n" +
|
|
90
|
+
" help = 'Pure API Token')\n" +
|
|
91
|
+
'\n' +
|
|
92
|
+
" parser.add_option('-S', '--suffix',\n" +
|
|
93
|
+
" action = 'store',\n" +
|
|
94
|
+
" type = 'string',\n" +
|
|
95
|
+
" dest = 'suffix',\n" +
|
|
96
|
+
" help = 'File system snapshot suffix')\n" +
|
|
97
|
+
'\n' +
|
|
98
|
+
" parser.add_option('-v', '--verbose',\n" +
|
|
99
|
+
" action = 'store_true',\n" +
|
|
100
|
+
" dest = 'VERBOSE_FLAG',\n" +
|
|
101
|
+
' default = False,\n' +
|
|
102
|
+
" help = 'Verbose [default: %default]')\n" +
|
|
103
|
+
'\n' +
|
|
104
|
+
' (options, args) = parser.parse_args()\n' +
|
|
105
|
+
'\n' +
|
|
106
|
+
" '''\n" +
|
|
107
|
+
' print("Options:", options)\n' +
|
|
108
|
+
' print("Args:", args)\n' +
|
|
109
|
+
" '''\n" +
|
|
110
|
+
' \n' +
|
|
111
|
+
' return(options)\n' +
|
|
112
|
+
'\n' +
|
|
113
|
+
'def main():\n' +
|
|
114
|
+
' # Setup variables\n' +
|
|
115
|
+
' global DEBUG_FLAG\n' +
|
|
116
|
+
' exit_code = 0\n' +
|
|
117
|
+
'\n' +
|
|
118
|
+
' # Check for command line parameters\n' +
|
|
119
|
+
' options = parsecl()\n' +
|
|
120
|
+
' API_TOKEN = options.API_TOKEN\n' +
|
|
121
|
+
' flashBlade = options.flashBlade\n' +
|
|
122
|
+
' flashBladeRep = options.flashBladeRep\n' +
|
|
123
|
+
' fs = options.fs\n' +
|
|
124
|
+
' suffix = options.suffix\n' +
|
|
125
|
+
' DEBUG_FLAG = options.DEBUG_FLAG\n' +
|
|
126
|
+
' VERBOSE_FLAG = options.VERBOSE_FLAG\n' +
|
|
127
|
+
' \n' +
|
|
128
|
+
' if DEBUG_FLAG:\n' +
|
|
129
|
+
" print('API Token:', API_TOKEN)\n" +
|
|
130
|
+
" print('FlashBlade:', flashBlade)\n" +
|
|
131
|
+
" print('Relplicant:', flashBladeRep)\n" +
|
|
132
|
+
" print('File System:', fs)\n" +
|
|
133
|
+
" print('Suffix:', suffix)\n" +
|
|
134
|
+
" print('Debug Flag:', DEBUG_FLAG)\n" +
|
|
135
|
+
" print('Verbose Flag:', VERBOSE_FLAG)\n" +
|
|
136
|
+
'\n' +
|
|
137
|
+
' if flashBlade == None:\n' +
|
|
138
|
+
" sys.exit('Exiting: You must provide FlashBlade details')\n" +
|
|
139
|
+
' \n' +
|
|
140
|
+
' if API_TOKEN == None:\n' +
|
|
141
|
+
" sys.exit('Exiting: You must provide FlashBlade API Token details')\n" +
|
|
142
|
+
'\n' +
|
|
143
|
+
' if fs == None:\n' +
|
|
144
|
+
" sys.exit('Exiting: You must provide FlashBlade file system')\n" +
|
|
145
|
+
'\n' +
|
|
146
|
+
' print(BANNER)\n' +
|
|
147
|
+
" print(HEADER + ' - ' + flashBlade)\n" +
|
|
148
|
+
" print(strftime('%d/%m/%Y %H:%M:%S %Z', gmtime()))\n" +
|
|
149
|
+
' print(BANNER)\n' +
|
|
150
|
+
'\n' +
|
|
151
|
+
' # create PurityFb object for a certain array\n' +
|
|
152
|
+
' fb = PurityFb(flashBlade)\n' +
|
|
153
|
+
' # this is required for versions before Purity//FB 2.1.3 because they only supports self-signed\n' +
|
|
154
|
+
' # certificates. in later versions, this may be unnecessary if you have imported a certificate.\n' +
|
|
155
|
+
' fb.disable_verify_ssl()\n' +
|
|
156
|
+
' \n' +
|
|
157
|
+
' try:\n' +
|
|
158
|
+
' res= fb.login(API_TOKEN)\n' +
|
|
159
|
+
' except rest.ApiException as e:\n' +
|
|
160
|
+
' print("Exception when logging in to the array: %s\\n" % e)\n' +
|
|
161
|
+
'\n' +
|
|
162
|
+
' if res:\n' +
|
|
163
|
+
' try:\n' +
|
|
164
|
+
' if flashBladeRep:\n' +
|
|
165
|
+
' if suffix:\n' +
|
|
166
|
+
' # create a snapshot with suffix and replicate to target array\n' +
|
|
167
|
+
' res = fb.file_system_snapshots.create_file_system_snapshots(sources=[fs],\n' +
|
|
168
|
+
' suffix=SnapshotSuffix(suffix),\n' +
|
|
169
|
+
' send=True,\n' +
|
|
170
|
+
' targets=[flashBladeRep])\n' +
|
|
171
|
+
' else:\n' +
|
|
172
|
+
' # create a snapshot without suffix and replicate to target array\n' +
|
|
173
|
+
' res = fb.file_system_snapshots.create_file_system_snapshots(sources=[fs],\n' +
|
|
174
|
+
' send=True,\n' +
|
|
175
|
+
' targets=[flashBladeRep])\n' +
|
|
176
|
+
' else:\n' +
|
|
177
|
+
' if suffix:\n' +
|
|
178
|
+
' # create a snapshot with suffix for the file system\n' +
|
|
179
|
+
' res = fb.file_system_snapshots.create_file_system_snapshots(sources=[fs],\n' +
|
|
180
|
+
' suffix=SnapshotSuffix(suffix))\n' +
|
|
181
|
+
' else:\n' +
|
|
182
|
+
' # create a snapshot without suffix for the file system\n' +
|
|
183
|
+
' res = fb.file_system_snapshots.create_file_system_snapshots(sources=[fs])\n' +
|
|
184
|
+
' \n' +
|
|
185
|
+
' if VERBOSE_FLAG:\n' +
|
|
186
|
+
' print(res)\n' +
|
|
187
|
+
' \n' +
|
|
188
|
+
" print('Snapshot created for', fs, 'suffix', res.items[0].suffix) \n" +
|
|
189
|
+
'\n' +
|
|
190
|
+
' except rest.ApiException as e:\n' +
|
|
191
|
+
' print("Exception when creating file system snapshots: %s\\n" % e) \n' +
|
|
192
|
+
'\n' +
|
|
193
|
+
' fb.logout()\n' +
|
|
194
|
+
' print(BANNER)\n' +
|
|
195
|
+
" print(strftime('%d/%m/%Y %H:%M:%S %Z', gmtime()))\n" +
|
|
196
|
+
' print(BANNER)\n' +
|
|
197
|
+
' sys.exit(exit_code)\n' +
|
|
198
|
+
'\n' +
|
|
199
|
+
'main()'
|
|
200
|
+
)
|
|
201
|
+
const language = ref('python')
|
|
202
|
+
|
|
203
|
+
const theme = computed(() => {
|
|
204
|
+
if (
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
window.DlComponents.isDark.value
|
|
207
|
+
) {
|
|
208
|
+
return DlCodeEditorTheme.Dark
|
|
209
|
+
}
|
|
210
|
+
return DlCodeEditorTheme.Light
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
codeEditorValue,
|
|
215
|
+
language,
|
|
216
|
+
theme
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
</script>
|
|
221
|
+
|
|
222
|
+
<style scoped lang="scss">
|
|
223
|
+
.layout-empty-state {
|
|
224
|
+
display: grid;
|
|
225
|
+
width: 100%;
|
|
226
|
+
}
|
|
227
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="dl-layout-upload-data">
|
|
3
|
+
<dl-empty-state
|
|
4
|
+
icon-size="100px"
|
|
5
|
+
class="dl-layout-upload-data__empty-state"
|
|
6
|
+
icon=""
|
|
7
|
+
title=""
|
|
8
|
+
>
|
|
9
|
+
<template #cta="">
|
|
10
|
+
<div
|
|
11
|
+
style="
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 10px;
|
|
15
|
+
padding-bottom: 20px;
|
|
16
|
+
"
|
|
17
|
+
>
|
|
18
|
+
<dl-icon
|
|
19
|
+
icon="icon-dl-upload"
|
|
20
|
+
size="20px"
|
|
21
|
+
color="dl-color-darker"
|
|
22
|
+
/>
|
|
23
|
+
<dl-typography
|
|
24
|
+
size="20px"
|
|
25
|
+
color="dl-color-darker"
|
|
26
|
+
>
|
|
27
|
+
Upload data (files, folders & annotations)
|
|
28
|
+
</dl-typography>
|
|
29
|
+
</div>
|
|
30
|
+
<dl-typography
|
|
31
|
+
size="12px"
|
|
32
|
+
color="dl-color-medium"
|
|
33
|
+
>
|
|
34
|
+
Models can be trained, evaluated with data (and if there's
|
|
35
|
+
ground-truth, you'll have precision-recall and confusion
|
|
36
|
+
matrix), and deployed as a service in the Dataloop platform,
|
|
37
|
+
with an endpoint for use from outside.
|
|
38
|
+
</dl-typography>
|
|
39
|
+
<div style="padding-top: 20px">
|
|
40
|
+
<dl-button label="Upload Data" />
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<template #links>
|
|
45
|
+
<div style="display: flex; gap: 15px">
|
|
46
|
+
<dl-button
|
|
47
|
+
padding="0px"
|
|
48
|
+
icon="icon-dl-sdk-documentation"
|
|
49
|
+
flat
|
|
50
|
+
uppercase
|
|
51
|
+
label="SDK"
|
|
52
|
+
size="s"
|
|
53
|
+
color="secondary"
|
|
54
|
+
/>
|
|
55
|
+
<dl-button
|
|
56
|
+
padding="0px"
|
|
57
|
+
icon="icon-dl-file"
|
|
58
|
+
flat
|
|
59
|
+
label="Documentation"
|
|
60
|
+
size="s"
|
|
61
|
+
color="secondary"
|
|
62
|
+
/>
|
|
63
|
+
<dl-button
|
|
64
|
+
padding="0px"
|
|
65
|
+
icon="icon-dl-youtube"
|
|
66
|
+
flat
|
|
67
|
+
label="Video"
|
|
68
|
+
size="s"
|
|
69
|
+
color="secondary"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
</dl-empty-state>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<script lang="ts">
|
|
78
|
+
import { defineComponent } from 'vue-demi'
|
|
79
|
+
import {
|
|
80
|
+
DlEmptyState,
|
|
81
|
+
DlButton,
|
|
82
|
+
DlTypography,
|
|
83
|
+
DlIcon
|
|
84
|
+
} from '../../../../../components'
|
|
85
|
+
|
|
86
|
+
export default defineComponent({
|
|
87
|
+
name: 'UploadData',
|
|
88
|
+
components: {
|
|
89
|
+
DlEmptyState,
|
|
90
|
+
DlButton,
|
|
91
|
+
DlTypography,
|
|
92
|
+
DlIcon
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style scoped lang="scss">
|
|
98
|
+
.dl-layout-upload-data {
|
|
99
|
+
&__empty-state {
|
|
100
|
+
min-width: 400px;
|
|
101
|
+
min-height: 300px;
|
|
102
|
+
max-width: 400px;
|
|
103
|
+
padding-top: 100px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|