@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
|
@@ -1,69 +1,67 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
-
:is="
|
|
3
|
+
:is="type"
|
|
4
4
|
:id="uuid"
|
|
5
5
|
class="list-item-wrapper"
|
|
6
6
|
>
|
|
7
|
-
<hr
|
|
8
|
-
class="separator"
|
|
9
|
-
:class="{ 'separator--visible': bordered }"
|
|
10
|
-
>
|
|
11
7
|
<div
|
|
12
8
|
v-wave="!disabled && withWave"
|
|
13
9
|
:class="[
|
|
14
10
|
{
|
|
15
11
|
'dl-list-item': true,
|
|
16
|
-
'dl-list-item-disabled': disabled
|
|
17
|
-
'dl-list-spaced': bordered
|
|
12
|
+
'dl-list-item-disabled': disabled
|
|
18
13
|
},
|
|
19
14
|
'row'
|
|
20
15
|
]"
|
|
21
16
|
:style="cssItemVars"
|
|
22
17
|
@click="onClick"
|
|
23
18
|
>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
<slot name="prefix">
|
|
20
|
+
<dl-item-section
|
|
21
|
+
v-if="startIcon"
|
|
22
|
+
side
|
|
23
|
+
style="display: flex"
|
|
24
|
+
>
|
|
25
|
+
<dl-icon
|
|
26
|
+
:icon="startIconData.icon"
|
|
27
|
+
:color="startIconData.color"
|
|
28
|
+
:size="startIconData.size"
|
|
29
|
+
/>
|
|
30
|
+
</dl-item-section>
|
|
31
|
+
</slot>
|
|
34
32
|
<slot />
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
<slot name="suffix">
|
|
34
|
+
<dl-item-section
|
|
35
|
+
v-if="endIcon"
|
|
36
|
+
side
|
|
37
|
+
style="display: flex"
|
|
38
|
+
>
|
|
39
|
+
<dl-icon
|
|
40
|
+
:icon="endIconData.icon"
|
|
41
|
+
:color="endIconData.color"
|
|
42
|
+
:size="endIconData.size"
|
|
43
|
+
/>
|
|
44
|
+
</dl-item-section>
|
|
45
|
+
</slot>
|
|
45
46
|
</div>
|
|
47
|
+
<dl-separator v-if="separator" />
|
|
46
48
|
</component>
|
|
47
49
|
</template>
|
|
48
50
|
|
|
49
51
|
<script lang="ts">
|
|
50
|
-
import { defineComponent } from 'vue-demi'
|
|
52
|
+
import { PropType, defineComponent } from 'vue-demi'
|
|
51
53
|
import { DlItemSection } from '../../shared'
|
|
52
|
-
import { DlIcon } from '../../essential'
|
|
53
|
-
import {
|
|
54
|
-
itemHoverColor,
|
|
55
|
-
itemActiveColor,
|
|
56
|
-
itemCursor,
|
|
57
|
-
itemBorder,
|
|
58
|
-
itemColor
|
|
59
|
-
} from './utils'
|
|
54
|
+
import { DlIcon, DlSeparator } from '../../essential'
|
|
55
|
+
import { itemHoverColor, itemActiveColor, itemCursor, itemColor } from './utils'
|
|
60
56
|
import { wave, waveTrigger } from '../../../utils'
|
|
61
57
|
import { v4 } from 'uuid'
|
|
58
|
+
import { isObject } from 'lodash'
|
|
62
59
|
|
|
63
60
|
export default defineComponent({
|
|
64
61
|
name: 'DlListItem',
|
|
65
62
|
components: {
|
|
66
63
|
DlItemSection,
|
|
64
|
+
DlSeparator,
|
|
67
65
|
DlIcon
|
|
68
66
|
},
|
|
69
67
|
directives: {
|
|
@@ -73,36 +71,58 @@ export default defineComponent({
|
|
|
73
71
|
props: {
|
|
74
72
|
disabled: Boolean,
|
|
75
73
|
clickable: Boolean,
|
|
76
|
-
|
|
74
|
+
separator: Boolean,
|
|
77
75
|
withWave: Boolean,
|
|
78
|
-
|
|
79
|
-
endIcon: { type: String, required: false, default: '' },
|
|
80
|
-
as: {
|
|
76
|
+
type: {
|
|
81
77
|
type: String,
|
|
82
78
|
default: 'div'
|
|
83
79
|
},
|
|
84
|
-
startIconColor: {
|
|
85
|
-
type: String,
|
|
86
|
-
required: false,
|
|
87
|
-
default: 'dl-color-darker'
|
|
88
|
-
},
|
|
89
|
-
endIconColor: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: false,
|
|
92
|
-
default: 'dl-color-darker'
|
|
93
|
-
},
|
|
94
|
-
startIconSize: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: '16px'
|
|
97
|
-
},
|
|
98
|
-
endIconSize: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: '16px'
|
|
101
|
-
},
|
|
102
80
|
height: { type: String, default: null, required: false },
|
|
103
81
|
padding: { type: String, default: null, required: false },
|
|
104
|
-
|
|
82
|
+
highlighted: {
|
|
105
83
|
type: Boolean
|
|
84
|
+
},
|
|
85
|
+
startIcon: {
|
|
86
|
+
type: [Object, String] as PropType<
|
|
87
|
+
| {
|
|
88
|
+
icon: string
|
|
89
|
+
color?: string
|
|
90
|
+
size?: string
|
|
91
|
+
}
|
|
92
|
+
| string
|
|
93
|
+
>,
|
|
94
|
+
default: null,
|
|
95
|
+
validator: (value: any) => {
|
|
96
|
+
if (value) {
|
|
97
|
+
if (isObject(value) as any) {
|
|
98
|
+
return value.icon && typeof value.icon === 'string'
|
|
99
|
+
} else {
|
|
100
|
+
return typeof value === 'string'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
endIcon: {
|
|
107
|
+
type: [Object, String] as PropType<
|
|
108
|
+
| {
|
|
109
|
+
icon: string
|
|
110
|
+
color?: string
|
|
111
|
+
size?: string
|
|
112
|
+
}
|
|
113
|
+
| string
|
|
114
|
+
>,
|
|
115
|
+
default: null,
|
|
116
|
+
validator: (value: any) => {
|
|
117
|
+
if (value) {
|
|
118
|
+
if (isObject(value) as any) {
|
|
119
|
+
return value.icon && typeof value.icon === 'string'
|
|
120
|
+
} else {
|
|
121
|
+
return typeof value === 'string'
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return true
|
|
125
|
+
}
|
|
106
126
|
}
|
|
107
127
|
},
|
|
108
128
|
emits: ['click'],
|
|
@@ -123,14 +143,27 @@ export default defineComponent({
|
|
|
123
143
|
this.isClickable,
|
|
124
144
|
this.disabled
|
|
125
145
|
),
|
|
126
|
-
'--dl-list-item-border': itemBorder(this.bordered),
|
|
127
146
|
'--dl-list-item-color': itemColor(this.disabled),
|
|
128
147
|
'--dl-list-item-height': this.height ?? '28px',
|
|
129
148
|
'--dl-list-item-padding': this.padding ?? '0px 10px',
|
|
130
|
-
'--dl-list-item-bg-color': this.
|
|
149
|
+
'--dl-list-item-bg-color': this.highlighted
|
|
131
150
|
? 'var(--dl-color-fill-hover)'
|
|
132
151
|
: 'transparent'
|
|
133
152
|
}
|
|
153
|
+
},
|
|
154
|
+
startIconData(): { icon: string; color: string; size: string } {
|
|
155
|
+
return Object.assign(
|
|
156
|
+
{ color: 'dl-color-darker', size: '16px' },
|
|
157
|
+
isObject(this.startIcon)
|
|
158
|
+
? this.startIcon
|
|
159
|
+
: { icon: this.startIcon }
|
|
160
|
+
)
|
|
161
|
+
},
|
|
162
|
+
endIconData(): { icon: string; color: string; size: string } {
|
|
163
|
+
return Object.assign(
|
|
164
|
+
{ color: 'dl-color-darker', size: '16px' },
|
|
165
|
+
isObject(this.endIcon) ? this.endIcon : { icon: this.endIcon }
|
|
166
|
+
)
|
|
134
167
|
}
|
|
135
168
|
},
|
|
136
169
|
methods: {
|
|
@@ -146,6 +179,8 @@ export default defineComponent({
|
|
|
146
179
|
<style scoped lang="scss">
|
|
147
180
|
.list-item-wrapper {
|
|
148
181
|
width: 100%;
|
|
182
|
+
border-left: var(--dl-list-item-border-left);
|
|
183
|
+
margin-bottom: 4px;
|
|
149
184
|
}
|
|
150
185
|
|
|
151
186
|
.dl-list-item {
|
|
@@ -194,14 +229,9 @@ export default defineComponent({
|
|
|
194
229
|
display: none;
|
|
195
230
|
&--visible {
|
|
196
231
|
display: block;
|
|
197
|
-
margin: 5px 0;
|
|
198
232
|
}
|
|
199
233
|
}
|
|
200
234
|
|
|
201
|
-
.dl-list-spaced {
|
|
202
|
-
margin: 5px 0;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
235
|
.dl-list-item-disabled {
|
|
206
236
|
color: var(--dl-color-disabled) !important;
|
|
207
237
|
& > div > i::before {
|
|
@@ -7,8 +7,5 @@ export const itemActiveColor = (isActionable: boolean) =>
|
|
|
7
7
|
export const itemCursor = (actionable: boolean, disabled: boolean) =>
|
|
8
8
|
actionable ? 'pointer' : disabled ? 'not-allowed' : 'cursor'
|
|
9
9
|
|
|
10
|
-
export const itemBorder = (bordered: boolean) =>
|
|
11
|
-
bordered ? `1px solid var(--dl-color-separator)` : '0px'
|
|
12
|
-
|
|
13
10
|
export const itemColor = (disabled: boolean) =>
|
|
14
11
|
disabled ? 'var(--dl-color-disabled)' : 'var(--dl-color-darker)'
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
:style="glutterStyles"
|
|
80
80
|
/>
|
|
81
81
|
</div>
|
|
82
|
-
<div
|
|
83
|
-
v-if="hasHeader === true"
|
|
84
|
-
class="header"
|
|
85
|
-
:style="headerStyles"
|
|
82
|
+
<div
|
|
83
|
+
v-if="hasHeader === true && !isEmpty"
|
|
84
|
+
class="header"
|
|
85
|
+
:style="headerStyles"
|
|
86
86
|
>
|
|
87
87
|
<div class="overflow-hidden">
|
|
88
88
|
<slot name="header" />
|
|
@@ -93,12 +93,26 @@
|
|
|
93
93
|
:style="contentStyle"
|
|
94
94
|
>
|
|
95
95
|
<div class="column" />
|
|
96
|
-
<
|
|
96
|
+
<dl-empty-state
|
|
97
|
+
v-if="isEmpty"
|
|
98
|
+
v-bind="emptyStateProps"
|
|
99
|
+
>
|
|
100
|
+
<template
|
|
101
|
+
v-for="(_, slot) in $slots"
|
|
102
|
+
#[slot]="props"
|
|
103
|
+
>
|
|
104
|
+
<slot
|
|
105
|
+
:name="slot"
|
|
106
|
+
v-bind="props"
|
|
107
|
+
/>
|
|
108
|
+
</template>
|
|
109
|
+
</dl-empty-state>
|
|
110
|
+
<slot v-if="!isEmpty" />
|
|
97
111
|
</div>
|
|
98
|
-
<div
|
|
99
|
-
v-if="hasFooter === true"
|
|
100
|
-
class="footer"
|
|
101
|
-
:style="footerStyles"
|
|
112
|
+
<div
|
|
113
|
+
v-if="hasFooter === true && !isEmpty"
|
|
114
|
+
class="footer"
|
|
115
|
+
:style="footerStyles"
|
|
102
116
|
>
|
|
103
117
|
<div class="overflow-hidden">
|
|
104
118
|
<slot name="footer" />
|
|
@@ -110,14 +124,19 @@
|
|
|
110
124
|
|
|
111
125
|
<script lang="ts">
|
|
112
126
|
import { v4 } from 'uuid'
|
|
113
|
-
import { defineComponent } from 'vue-demi'
|
|
114
|
-
import { DlIcon
|
|
127
|
+
import { defineComponent, PropType } from 'vue-demi'
|
|
128
|
+
import { DlIcon } from '../../essential'
|
|
129
|
+
import { DlTooltip } from '../../shared'
|
|
130
|
+
import { DlEmptyStateProps } from '../DlEmptyState/types'
|
|
131
|
+
// todo: this will cause issues
|
|
132
|
+
import DlEmptyState from '../DlEmptyState/DlEmptyState.vue'
|
|
115
133
|
|
|
116
134
|
export default defineComponent({
|
|
117
135
|
name: 'DlPanelContainer',
|
|
118
136
|
components: {
|
|
119
137
|
DlIcon,
|
|
120
|
-
DlTooltip
|
|
138
|
+
DlTooltip,
|
|
139
|
+
DlEmptyState
|
|
121
140
|
},
|
|
122
141
|
model: {
|
|
123
142
|
prop: 'modelValue',
|
|
@@ -158,7 +177,12 @@ export default defineComponent({
|
|
|
158
177
|
type: String,
|
|
159
178
|
default: '70px'
|
|
160
179
|
},
|
|
161
|
-
modelValue: { type: Boolean, required: false, default: false }
|
|
180
|
+
modelValue: { type: Boolean, required: false, default: false },
|
|
181
|
+
isEmpty: Boolean,
|
|
182
|
+
emptyStateProps: {
|
|
183
|
+
type: Object as PropType<DlEmptyStateProps>,
|
|
184
|
+
default: null
|
|
185
|
+
}
|
|
162
186
|
},
|
|
163
187
|
emits: ['update:model-value'],
|
|
164
188
|
data() {
|
|
@@ -43,7 +43,21 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
</popup-header>
|
|
45
45
|
<div class="popup-content">
|
|
46
|
-
<slot />
|
|
46
|
+
<slot v-if="!isEmpty" />
|
|
47
|
+
<dl-empty-state
|
|
48
|
+
v-if="isEmpty"
|
|
49
|
+
v-bind="emptyStateProps"
|
|
50
|
+
>
|
|
51
|
+
<template
|
|
52
|
+
v-for="(_, slot) in $slots"
|
|
53
|
+
#[slot]="props"
|
|
54
|
+
>
|
|
55
|
+
<slot
|
|
56
|
+
:name="slot"
|
|
57
|
+
v-bind="props"
|
|
58
|
+
/>
|
|
59
|
+
</template>
|
|
60
|
+
</dl-empty-state>
|
|
47
61
|
</div>
|
|
48
62
|
<div
|
|
49
63
|
v-if="hasFooterSlot"
|
|
@@ -115,14 +129,17 @@ import DraggableUpper from './components/DraggableUpper.vue'
|
|
|
115
129
|
import PopupHeader from './components/PopupHeader.vue'
|
|
116
130
|
import { v4 } from 'uuid'
|
|
117
131
|
import { isString } from 'lodash'
|
|
132
|
+
import { DlEmptyStateProps } from '../DlEmptyState/types'
|
|
118
133
|
import { stringStyleToRecord } from '../../../utils'
|
|
134
|
+
import DlEmptyState from '../DlEmptyState/DlEmptyState.vue'
|
|
119
135
|
|
|
120
136
|
export default defineComponent({
|
|
121
137
|
name: 'DlPopup',
|
|
122
138
|
components: {
|
|
123
139
|
DlTeleport,
|
|
124
140
|
PopupHeader,
|
|
125
|
-
DraggableUpper
|
|
141
|
+
DraggableUpper,
|
|
142
|
+
DlEmptyState
|
|
126
143
|
},
|
|
127
144
|
model: {
|
|
128
145
|
prop: 'modelValue',
|
|
@@ -160,14 +177,23 @@ export default defineComponent({
|
|
|
160
177
|
},
|
|
161
178
|
scrollTarget: {
|
|
162
179
|
type: String as PropType<Element | string>,
|
|
163
|
-
default:
|
|
180
|
+
default: null
|
|
164
181
|
},
|
|
165
182
|
touchPosition: Boolean,
|
|
166
183
|
maxHeight: { type: String, default: 'auto' },
|
|
167
184
|
maxWidth: { type: String, default: 'auto' },
|
|
168
185
|
height: { type: String, default: 'auto' },
|
|
169
186
|
width: { type: String, default: 'auto' },
|
|
170
|
-
draggable: Boolean
|
|
187
|
+
draggable: Boolean,
|
|
188
|
+
isEmpty: Boolean,
|
|
189
|
+
emptyStateProps: {
|
|
190
|
+
type: Object as PropType<DlEmptyStateProps>,
|
|
191
|
+
default: () => ({} as DlEmptyStateProps)
|
|
192
|
+
},
|
|
193
|
+
zIndex: {
|
|
194
|
+
type: [Number, String],
|
|
195
|
+
default: 'var(--dl-z-index-popup)'
|
|
196
|
+
}
|
|
171
197
|
},
|
|
172
198
|
emits: [
|
|
173
199
|
'close-button-click',
|
|
@@ -254,7 +280,8 @@ export default defineComponent({
|
|
|
254
280
|
'--popup-max-width': props.maxWidth,
|
|
255
281
|
'--popup-max-height': props.maxHeight,
|
|
256
282
|
'--popup-width': props.width,
|
|
257
|
-
'--popup-height': props.height
|
|
283
|
+
'--popup-height': props.height,
|
|
284
|
+
'--popup-z-index': props.zIndex ?? 'var(--dl-z-index-popup)'
|
|
258
285
|
}
|
|
259
286
|
})
|
|
260
287
|
|
|
@@ -286,7 +313,7 @@ export default defineComponent({
|
|
|
286
313
|
|
|
287
314
|
showPortal()
|
|
288
315
|
|
|
289
|
-
absoluteOffset =
|
|
316
|
+
absoluteOffset = null
|
|
290
317
|
|
|
291
318
|
const offsetOnShow = setOffsetOnShow(evt as TouchEvent, {
|
|
292
319
|
contextMenu: props.contextMenu,
|
|
@@ -297,7 +324,7 @@ export default defineComponent({
|
|
|
297
324
|
|
|
298
325
|
absoluteOffset = offsetOnShow as Record<any, any> | undefined
|
|
299
326
|
|
|
300
|
-
if (unwatchPosition
|
|
327
|
+
if (!unwatchPosition) {
|
|
301
328
|
unwatchPosition = watch(() => screen, updatePosition, {
|
|
302
329
|
deep: true
|
|
303
330
|
})
|
|
@@ -332,7 +359,7 @@ export default defineComponent({
|
|
|
332
359
|
}
|
|
333
360
|
|
|
334
361
|
function anchorCleanup(hiding: boolean) {
|
|
335
|
-
absoluteOffset =
|
|
362
|
+
absoluteOffset = null
|
|
336
363
|
|
|
337
364
|
unwatchPosition = updateUnwatchPosition(unwatchPosition)
|
|
338
365
|
|
|
@@ -348,7 +375,7 @@ export default defineComponent({
|
|
|
348
375
|
}
|
|
349
376
|
|
|
350
377
|
function configureScrollTarget() {
|
|
351
|
-
if (anchorEl.value !== null || props.scrollTarget
|
|
378
|
+
if (anchorEl.value !== null || props.scrollTarget) {
|
|
352
379
|
(localScrollTarget as Ref<any>).value = getScrollTarget(
|
|
353
380
|
anchorEl.value as HTMLElement,
|
|
354
381
|
props.scrollTarget
|
|
@@ -462,9 +489,9 @@ export default defineComponent({
|
|
|
462
489
|
|
|
463
490
|
<style lang="scss" scoped>
|
|
464
491
|
.dl-popup {
|
|
465
|
-
z-index:
|
|
492
|
+
z-index: var(--popup-z-index);
|
|
466
493
|
position: fixed !important;
|
|
467
|
-
padding:
|
|
494
|
+
padding: var(--dl-popup-padding, 10px 0 16px 0);
|
|
468
495
|
border: 1px solid var(--dl-color-separator);
|
|
469
496
|
display: flex;
|
|
470
497
|
background-color: var(--dl-color-panel-background);
|
|
@@ -481,9 +508,29 @@ export default defineComponent({
|
|
|
481
508
|
.popup-content {
|
|
482
509
|
max-width: 100%;
|
|
483
510
|
padding: 0 16px;
|
|
511
|
+
height: 100%;
|
|
484
512
|
}
|
|
485
513
|
|
|
486
514
|
.popup-footer {
|
|
487
515
|
padding: 20px 16px 0px;
|
|
488
516
|
}
|
|
517
|
+
|
|
518
|
+
// Fade Related transition
|
|
519
|
+
.fade-enter,
|
|
520
|
+
.fade-enter-active {
|
|
521
|
+
animation: fade-in var(--dl-transition-duration);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.fade-leave-active,
|
|
525
|
+
.fade-leave-to {
|
|
526
|
+
animation: fade-in var(--dl-transition-duration) reverse;
|
|
527
|
+
}
|
|
528
|
+
@keyframes fade-in {
|
|
529
|
+
0% {
|
|
530
|
+
opacity: 0;
|
|
531
|
+
}
|
|
532
|
+
100% {
|
|
533
|
+
opacity: 1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
489
536
|
</style>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
class="header-content"
|
|
13
13
|
>
|
|
14
14
|
<span class="title">
|
|
15
|
-
|
|
15
|
+
<dl-ellipsis :text="title" />
|
|
16
16
|
<span class="info-icon">
|
|
17
17
|
<dl-icon
|
|
18
18
|
v-if="hasAdditionalInfo"
|
|
@@ -38,22 +38,26 @@
|
|
|
38
38
|
v-else
|
|
39
39
|
color="dl-color-darker"
|
|
40
40
|
icon="icon-dl-close"
|
|
41
|
-
size="
|
|
41
|
+
size="12px"
|
|
42
42
|
/>
|
|
43
43
|
</span>
|
|
44
|
-
<span class="subtitle">
|
|
44
|
+
<span class="subtitle">
|
|
45
|
+
<dl-ellipsis :text="subtitle" />
|
|
46
|
+
</span>
|
|
45
47
|
</div>
|
|
46
48
|
</div>
|
|
47
49
|
</template>
|
|
48
50
|
|
|
49
51
|
<script lang="ts">
|
|
50
52
|
import { defineComponent } from 'vue-demi'
|
|
51
|
-
import {
|
|
53
|
+
import { DlIcon, DlEllipsis } from '../../../essential'
|
|
54
|
+
import { DlTooltip } from '../../../shared'
|
|
52
55
|
|
|
53
56
|
export default defineComponent({
|
|
54
57
|
components: {
|
|
55
58
|
DlIcon,
|
|
56
|
-
DlTooltip
|
|
59
|
+
DlTooltip,
|
|
60
|
+
DlEllipsis
|
|
57
61
|
},
|
|
58
62
|
props: {
|
|
59
63
|
title: { type: String, default: '' },
|
|
@@ -91,7 +95,7 @@ export default defineComponent({
|
|
|
91
95
|
<style scoped lang="scss">
|
|
92
96
|
.popup-header {
|
|
93
97
|
max-width: 100%;
|
|
94
|
-
padding:
|
|
98
|
+
padding: 16px 10px 20px 16px;
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
.header-content {
|
|
@@ -111,6 +115,7 @@ export default defineComponent({
|
|
|
111
115
|
display: flex;
|
|
112
116
|
justify-content: center;
|
|
113
117
|
align-items: center;
|
|
118
|
+
margin-top: 4px;
|
|
114
119
|
cursor: pointer;
|
|
115
120
|
transition: color 200ms;
|
|
116
121
|
&:hover {
|
|
@@ -78,7 +78,8 @@ import { v4 } from 'uuid'
|
|
|
78
78
|
import { defineComponent, isVue2 } from 'vue-demi'
|
|
79
79
|
import { getColor } from '../../../utils'
|
|
80
80
|
import { isEllipsisActive } from '../../../utils/is-ellipsis-active'
|
|
81
|
-
import {
|
|
81
|
+
import { DlLink } from '../../essential'
|
|
82
|
+
import { DlTooltip } from '../../shared'
|
|
82
83
|
|
|
83
84
|
type ProgressChartOption = {
|
|
84
85
|
name: string
|