@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,21 @@
|
|
|
1
|
+
export enum DlCodeEditorTheme {
|
|
2
|
+
Dark = 'atom-one-dark',
|
|
3
|
+
Light = 'atom-one-light',
|
|
4
|
+
ATOM_ONE_DARK = 'atom-one-dark',
|
|
5
|
+
ATOM_ONE_LIGHT = 'atom-one-light',
|
|
6
|
+
DRACULA = 'dracula',
|
|
7
|
+
GITHUB = 'github',
|
|
8
|
+
GITHUB_DARK = 'github-dark',
|
|
9
|
+
VS = 'vs',
|
|
10
|
+
VS_DARK = 'vs2015'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface DlCodeEditorOptions {
|
|
14
|
+
fontSize?: number
|
|
15
|
+
tabSpaces?: number
|
|
16
|
+
textWrapping?: boolean
|
|
17
|
+
hideHeader?: boolean
|
|
18
|
+
hideCopyButton?: boolean
|
|
19
|
+
lineNumbers?: boolean
|
|
20
|
+
hideLanguage?: boolean
|
|
21
|
+
}
|
|
@@ -103,6 +103,10 @@ export default defineComponent({
|
|
|
103
103
|
type: Object as PropType<Partial<DateInterval> | null>,
|
|
104
104
|
default: null
|
|
105
105
|
},
|
|
106
|
+
singleSelection: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false
|
|
109
|
+
},
|
|
106
110
|
normalizeCalendars: Boolean,
|
|
107
111
|
disabled: Boolean
|
|
108
112
|
},
|
|
@@ -245,7 +249,11 @@ export default defineComponent({
|
|
|
245
249
|
|
|
246
250
|
this.dateInterval = { from: date, to: date }
|
|
247
251
|
|
|
248
|
-
this.
|
|
252
|
+
if (this.singleSelection) {
|
|
253
|
+
this.isSelectionMode = true
|
|
254
|
+
} else {
|
|
255
|
+
this.updateModelValue(this.dateInterval)
|
|
256
|
+
}
|
|
249
257
|
},
|
|
250
258
|
|
|
251
259
|
handleMouseenter(date: Date) {
|
|
@@ -190,6 +190,7 @@ export default defineComponent({
|
|
|
190
190
|
new CustomDate(value.toString())
|
|
191
191
|
)
|
|
192
192
|
) {
|
|
193
|
+
style.cursor = 'not-allowed'
|
|
193
194
|
if (isToday && this.disabled) {
|
|
194
195
|
style.color = 'var(--dl-color-secondary)'
|
|
195
196
|
style.opacity = disabledOpacity
|
|
@@ -200,7 +201,7 @@ export default defineComponent({
|
|
|
200
201
|
}
|
|
201
202
|
} else if (this.modelValue !== null) {
|
|
202
203
|
const selectedStyle = {
|
|
203
|
-
backgroundColor: 'var(--dl-
|
|
204
|
+
backgroundColor: 'var(--dl-color-secondary)',
|
|
204
205
|
color: 'var(--dl-color-text-buttons)',
|
|
205
206
|
borderRadius: '11px'
|
|
206
207
|
}
|
|
@@ -215,7 +216,8 @@ export default defineComponent({
|
|
|
215
216
|
style = {
|
|
216
217
|
...style,
|
|
217
218
|
...selectedStyle,
|
|
218
|
-
opacity: disabledOpacity
|
|
219
|
+
opacity: disabledOpacity,
|
|
220
|
+
backgroundColor: 'var(--dl-date-picker-selected-date)'
|
|
219
221
|
}
|
|
220
222
|
} else if (isIntervalBoundary) {
|
|
221
223
|
style = {
|
|
@@ -152,7 +152,8 @@ export default defineComponent({
|
|
|
152
152
|
if (!isInRange(this.availableRange, d)) {
|
|
153
153
|
style = {
|
|
154
154
|
'border-color': 'var(--dl-color-disabled)',
|
|
155
|
-
color: 'var(--dl-color-disabled)'
|
|
155
|
+
color: 'var(--dl-color-disabled)',
|
|
156
|
+
cursor: 'not-allowed'
|
|
156
157
|
}
|
|
157
158
|
} else if (this.modelValue !== null) {
|
|
158
159
|
const from = new CalendarDate(this.modelValue.from)
|
package/src/components/compound/DlDateTime/DlDateTimeRange/{DlCardSidebar.vue → CardSidebar.vue}
RENAMED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<div class="
|
|
2
|
+
<div class="card-sidebar">
|
|
3
|
+
<div class="card-sidebar--header">
|
|
4
4
|
<span>Select by</span>
|
|
5
5
|
</div>
|
|
6
|
-
<div class="
|
|
6
|
+
<div class="card-sidebar--content">
|
|
7
7
|
<div
|
|
8
8
|
v-for="option in options"
|
|
9
9
|
:key="option.key"
|
|
10
|
-
class="
|
|
10
|
+
class="card-sidebar--item"
|
|
11
11
|
:class="{
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
'dl-card-sidebar--item-disabled': option.disabled
|
|
12
|
+
'card-sidebar--item-active': option.key === currentOption,
|
|
13
|
+
'card-sidebar--item-disabled': option.disabled
|
|
15
14
|
}"
|
|
16
15
|
@click="handleClick(option)"
|
|
17
16
|
>
|
|
18
|
-
<div class="
|
|
17
|
+
<div class="card-sidebar--focus_helper" />
|
|
19
18
|
{{ capitalizeFirstLetter(option.title) }}
|
|
20
19
|
</div>
|
|
21
20
|
</div>
|
|
@@ -49,7 +48,7 @@ export default defineComponent({
|
|
|
49
48
|
})
|
|
50
49
|
</script>
|
|
51
50
|
<style lang="scss" scoped>
|
|
52
|
-
.
|
|
51
|
+
.card-sidebar {
|
|
53
52
|
display: flex;
|
|
54
53
|
flex-direction: column;
|
|
55
54
|
text-align: left;
|
|
@@ -101,8 +100,8 @@ export default defineComponent({
|
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
|
|
104
|
-
.
|
|
105
|
-
.
|
|
103
|
+
.card-sidebar--item:not(.card-sidebar--item-disabled):hover {
|
|
104
|
+
.card-sidebar--focus_helper {
|
|
106
105
|
opacity: 0.15;
|
|
107
106
|
}
|
|
108
107
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:id="uuid"
|
|
4
4
|
class="dl-date-time-range"
|
|
5
5
|
>
|
|
6
|
-
<
|
|
6
|
+
<date-input
|
|
7
7
|
:text="dateInputText"
|
|
8
8
|
:input-style="dateInputStyle"
|
|
9
9
|
:disabled="disabled"
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
v-if="mode === 'multi'"
|
|
21
21
|
class="dl-date-time-range--card_sidebar"
|
|
22
22
|
>
|
|
23
|
-
<
|
|
23
|
+
<card-sidebar
|
|
24
24
|
v-if="typeState === 'day'"
|
|
25
25
|
:options="sidebarDayOptions"
|
|
26
26
|
:current-option="currentSidebarOption"
|
|
27
27
|
@click="handleDayTypeOptionClick"
|
|
28
28
|
/>
|
|
29
|
-
<
|
|
29
|
+
<card-sidebar
|
|
30
30
|
v-else
|
|
31
31
|
:options="sidebarMonthOptions"
|
|
32
32
|
:current-option="currentSidebarOption"
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
</dl-menu>
|
|
57
|
-
</
|
|
57
|
+
</date-input>
|
|
58
58
|
</div>
|
|
59
59
|
</template>
|
|
60
60
|
<script lang="ts">
|
|
61
61
|
import { DlTimePicker } from '../DlTimePicker'
|
|
62
62
|
import { DateInterval } from '../types'
|
|
63
|
-
import
|
|
63
|
+
import CardSidebar from './CardSidebar.vue'
|
|
64
64
|
import {
|
|
65
65
|
DayTypeOption,
|
|
66
66
|
DAY_SIDEBAR_OPTION,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
import { CustomDate } from '../DlDatePicker/models/CustomDate'
|
|
71
71
|
import DlDatePicker from '../DlDatePicker/DlDatePicker.vue'
|
|
72
72
|
import { CalendarDate } from '../DlDatePicker/models/CalendarDate'
|
|
73
|
-
import
|
|
73
|
+
import DateInput from './DateInput.vue'
|
|
74
74
|
import { DlMenu } from '../../../essential'
|
|
75
75
|
import { defineComponent, PropType } from 'vue-demi'
|
|
76
76
|
import { isInRange } from '../DlDatePicker/utils'
|
|
@@ -78,10 +78,10 @@ import { v4 } from 'uuid'
|
|
|
78
78
|
|
|
79
79
|
export default defineComponent({
|
|
80
80
|
components: {
|
|
81
|
-
|
|
81
|
+
CardSidebar,
|
|
82
82
|
DlDatePicker,
|
|
83
83
|
DlTimePicker,
|
|
84
|
-
|
|
84
|
+
DateInput,
|
|
85
85
|
DlMenu
|
|
86
86
|
},
|
|
87
87
|
model: {
|
|
@@ -416,7 +416,16 @@ export default defineComponent({
|
|
|
416
416
|
this.$emit('set-type', value)
|
|
417
417
|
},
|
|
418
418
|
updateDateInterval(value: DateInterval | null) {
|
|
419
|
-
this.dateInterval =
|
|
419
|
+
this.dateInterval = {
|
|
420
|
+
from: value.from,
|
|
421
|
+
to: new Date(
|
|
422
|
+
value.from.getFullYear(),
|
|
423
|
+
value.from.getMonth(),
|
|
424
|
+
value.from.getDate(),
|
|
425
|
+
23,
|
|
426
|
+
59
|
|
427
|
+
)
|
|
428
|
+
}
|
|
420
429
|
this.$emit('update:modelValue', value)
|
|
421
430
|
this.$emit('change', value)
|
|
422
431
|
},
|
|
@@ -128,7 +128,7 @@ export default defineComponent({
|
|
|
128
128
|
<style lang="scss" scoped>
|
|
129
129
|
.dl-time-picker {
|
|
130
130
|
display: flex;
|
|
131
|
-
justify-content:
|
|
131
|
+
justify-content: flex-start;
|
|
132
132
|
align-items: center;
|
|
133
133
|
border-top: 1px solid var(--dl-color-separator);
|
|
134
134
|
padding: 15px 30px;
|
|
@@ -138,7 +138,7 @@ export default defineComponent({
|
|
|
138
138
|
display: flex;
|
|
139
139
|
justify-content: center;
|
|
140
140
|
align-items: center;
|
|
141
|
-
min-width:
|
|
141
|
+
min-width: 130px;
|
|
142
142
|
|
|
143
143
|
span {
|
|
144
144
|
font-size: 12px;
|
|
@@ -24,14 +24,16 @@
|
|
|
24
24
|
'dialog-wrapper--right': position === 'right',
|
|
25
25
|
'dialog-wrapper--left': position === 'left'
|
|
26
26
|
}"
|
|
27
|
+
@mouseenter="visibleDragIcon = true"
|
|
28
|
+
@mouseleave="visibleDragIcon = false"
|
|
27
29
|
>
|
|
28
30
|
<dl-icon
|
|
29
31
|
v-if="draggable"
|
|
30
|
-
:style="
|
|
32
|
+
:style="iconStyles"
|
|
31
33
|
class="dialog-wrapper--draggable-icon"
|
|
32
34
|
color="dl-color-medium"
|
|
33
35
|
icon="icon-dl-drag"
|
|
34
|
-
size="
|
|
36
|
+
size="12px"
|
|
35
37
|
@mousedown="startDragElement"
|
|
36
38
|
/>
|
|
37
39
|
<div
|
|
@@ -47,7 +49,24 @@
|
|
|
47
49
|
'content--fullheight': fullHeight
|
|
48
50
|
}"
|
|
49
51
|
>
|
|
50
|
-
<slot
|
|
52
|
+
<slot
|
|
53
|
+
v-if="!isEmpty"
|
|
54
|
+
name="body"
|
|
55
|
+
/>
|
|
56
|
+
<dl-empty-state
|
|
57
|
+
v-if="isEmpty"
|
|
58
|
+
v-bind="emptyStateProps"
|
|
59
|
+
>
|
|
60
|
+
<template
|
|
61
|
+
v-for="(_, slot) in $slots"
|
|
62
|
+
#[slot]="props"
|
|
63
|
+
>
|
|
64
|
+
<slot
|
|
65
|
+
:name="slot"
|
|
66
|
+
v-bind="props"
|
|
67
|
+
/>
|
|
68
|
+
</template>
|
|
69
|
+
</dl-empty-state>
|
|
51
70
|
</div>
|
|
52
71
|
<div
|
|
53
72
|
v-if="hasFooter"
|
|
@@ -64,11 +83,13 @@
|
|
|
64
83
|
import { v4 } from 'uuid'
|
|
65
84
|
import { defineComponent, PropType } from 'vue-demi'
|
|
66
85
|
import DlIcon from '../../essential/DlIcon/DlIcon.vue'
|
|
86
|
+
import { DlEmptyStateProps } from '../../basic/DlEmptyState/types'
|
|
87
|
+
import DlEmptyState from '../../basic/DlEmptyState/DlEmptyState.vue'
|
|
67
88
|
import { throttle } from 'lodash'
|
|
68
89
|
|
|
69
90
|
export default defineComponent({
|
|
70
91
|
name: 'DlDialogBox',
|
|
71
|
-
components: { DlIcon },
|
|
92
|
+
components: { DlIcon, DlEmptyState },
|
|
72
93
|
model: {
|
|
73
94
|
prop: 'modelValue',
|
|
74
95
|
event: 'update:modelValue'
|
|
@@ -88,10 +109,30 @@ export default defineComponent({
|
|
|
88
109
|
draggable: {
|
|
89
110
|
type: Boolean,
|
|
90
111
|
default: false
|
|
112
|
+
},
|
|
113
|
+
isEmpty: Boolean,
|
|
114
|
+
emptyStateProps: {
|
|
115
|
+
type: Object as PropType<DlEmptyStateProps>,
|
|
116
|
+
default: () => ({} as DlEmptyStateProps)
|
|
117
|
+
},
|
|
118
|
+
zIndex: {
|
|
119
|
+
type: [Number, String],
|
|
120
|
+
default: 'var(--dl-z-index-dialog)'
|
|
91
121
|
}
|
|
92
122
|
},
|
|
93
123
|
emits: ['update:modelValue', 'hide', 'show'],
|
|
94
|
-
data() {
|
|
124
|
+
data(): {
|
|
125
|
+
uuid: string
|
|
126
|
+
show: boolean
|
|
127
|
+
draggableOptions: {
|
|
128
|
+
draggableX: number
|
|
129
|
+
draggableY: number
|
|
130
|
+
originalX: number
|
|
131
|
+
originalY: number
|
|
132
|
+
draggableCursor: string
|
|
133
|
+
}
|
|
134
|
+
visibleDragIcon: boolean
|
|
135
|
+
} {
|
|
95
136
|
return {
|
|
96
137
|
uuid: `dl-dialog-box-${v4()}`,
|
|
97
138
|
show: this.modelValue,
|
|
@@ -101,7 +142,8 @@ export default defineComponent({
|
|
|
101
142
|
originalX: 0,
|
|
102
143
|
originalY: 0,
|
|
103
144
|
draggableCursor: 'pointer'
|
|
104
|
-
}
|
|
145
|
+
},
|
|
146
|
+
visibleDragIcon: false
|
|
105
147
|
}
|
|
106
148
|
},
|
|
107
149
|
computed: {
|
|
@@ -112,7 +154,20 @@ export default defineComponent({
|
|
|
112
154
|
: 'rgba(0, 0, 0, 0.4)',
|
|
113
155
|
'--dl-dialog-separator': this.separators
|
|
114
156
|
? '1px solid var(--dl-color-separator)'
|
|
115
|
-
: 'none'
|
|
157
|
+
: 'none',
|
|
158
|
+
'--dl-dialog-box-drag-icon-left': `${
|
|
159
|
+
typeof this.width === 'string'
|
|
160
|
+
? parseInt(this.width)
|
|
161
|
+
: this.width / 2
|
|
162
|
+
}px`,
|
|
163
|
+
'--dialog-z-index':
|
|
164
|
+
`${this.zIndex}` ?? 'var(--dl-z-index-dialog)'
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
iconStyles(): Record<string, string> {
|
|
168
|
+
return {
|
|
169
|
+
cursor: this.draggableOptions.draggableCursor,
|
|
170
|
+
visibility: this.visibleDragIcon ? 'visible' : 'hidden'
|
|
116
171
|
}
|
|
117
172
|
},
|
|
118
173
|
hasParent(): boolean {
|
|
@@ -198,7 +253,7 @@ export default defineComponent({
|
|
|
198
253
|
right: 0;
|
|
199
254
|
bottom: 0;
|
|
200
255
|
left: 0;
|
|
201
|
-
z-index: var(--
|
|
256
|
+
z-index: var(--dialog-z-index);
|
|
202
257
|
overflow-x: hidden;
|
|
203
258
|
overflow-y: hidden;
|
|
204
259
|
text-align: start;
|
|
@@ -214,7 +269,9 @@ export default defineComponent({
|
|
|
214
269
|
bottom: 0;
|
|
215
270
|
left: 0;
|
|
216
271
|
background-color: var(--dl-backdrop-color);
|
|
217
|
-
z-index: var(
|
|
272
|
+
z-index: var(
|
|
273
|
+
--dialog-z-index
|
|
274
|
+
); // todo: check if this should be overlay instead.
|
|
218
275
|
}
|
|
219
276
|
|
|
220
277
|
.dialog-wrapper {
|
|
@@ -226,7 +283,7 @@ export default defineComponent({
|
|
|
226
283
|
border-radius: 2px;
|
|
227
284
|
display: flex;
|
|
228
285
|
flex-direction: column;
|
|
229
|
-
z-index: var(--
|
|
286
|
+
z-index: var(--dialog-z-index);
|
|
230
287
|
|
|
231
288
|
&--fullscreen {
|
|
232
289
|
margin: 0;
|
|
@@ -243,8 +300,8 @@ export default defineComponent({
|
|
|
243
300
|
|
|
244
301
|
&--draggable-icon {
|
|
245
302
|
position: absolute;
|
|
246
|
-
top:
|
|
247
|
-
left:
|
|
303
|
+
top: 2px;
|
|
304
|
+
left: var(--dl-dialog-box-drag-icon-left);
|
|
248
305
|
cursor: pointer;
|
|
249
306
|
transform: rotate(90deg);
|
|
250
307
|
}
|
|
@@ -262,12 +319,13 @@ export default defineComponent({
|
|
|
262
319
|
|
|
263
320
|
.header {
|
|
264
321
|
display: flex;
|
|
265
|
-
padding: 16px;
|
|
322
|
+
padding: var(--dl-dialog-box-header-padding, 16px);
|
|
266
323
|
border-bottom: var(--dl-dialog-separator);
|
|
324
|
+
height: var(--dl-dialog-box-header-height, 60px);
|
|
267
325
|
}
|
|
268
326
|
|
|
269
327
|
.content {
|
|
270
|
-
padding: var(--dl-dialog-box-content-padding,
|
|
328
|
+
padding: var(--dl-dialog-box-content-padding, 20px 16px 30px 16px);
|
|
271
329
|
overflow: auto;
|
|
272
330
|
height: 100%;
|
|
273
331
|
|
|
@@ -281,7 +339,8 @@ export default defineComponent({
|
|
|
281
339
|
|
|
282
340
|
.footer {
|
|
283
341
|
display: flex;
|
|
284
|
-
padding: 16px;
|
|
342
|
+
padding: var(--dl-dialog-box-footer-padding, 20px 16px);
|
|
343
|
+
height: var(--dl-dialog-box-footer-height, 35px);
|
|
285
344
|
border-top: var(--dl-dialog-separator);
|
|
286
345
|
}
|
|
287
346
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="root-container">
|
|
3
|
-
<div>
|
|
3
|
+
<div style="width: 95%; height: 100%">
|
|
4
4
|
<dl-button
|
|
5
5
|
v-if="hasBackButton"
|
|
6
6
|
dense
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="title"
|
|
17
17
|
>
|
|
18
18
|
<slot name="title">
|
|
19
|
-
|
|
19
|
+
<dl-ellipsis :text="title" />
|
|
20
20
|
</slot>
|
|
21
21
|
</h2>
|
|
22
22
|
<p
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
class="subtitle"
|
|
25
25
|
>
|
|
26
26
|
<slot name="subtitle">
|
|
27
|
-
|
|
27
|
+
<dl-ellipsis :text="subtitle" />
|
|
28
28
|
</slot>
|
|
29
29
|
</p>
|
|
30
30
|
</div>
|
|
31
31
|
<dl-button
|
|
32
32
|
v-if="closeButton"
|
|
33
|
+
style="height: 100%; display: flex; align-items: start"
|
|
33
34
|
class="close-button"
|
|
34
35
|
icon="icon-dl-close"
|
|
35
36
|
size="s"
|
|
@@ -43,11 +44,13 @@
|
|
|
43
44
|
<script lang="ts">
|
|
44
45
|
import { computed, defineComponent } from 'vue-demi'
|
|
45
46
|
import { DlButton } from '../../../basic'
|
|
47
|
+
import { DlEllipsis } from '../../../essential'
|
|
46
48
|
|
|
47
49
|
export default defineComponent({
|
|
48
50
|
name: 'DlDialogBoxHeader',
|
|
49
51
|
components: {
|
|
50
|
-
DlButton
|
|
52
|
+
DlButton,
|
|
53
|
+
DlEllipsis
|
|
51
54
|
},
|
|
52
55
|
props: {
|
|
53
56
|
title: { type: String, default: '' },
|
|
@@ -81,12 +84,11 @@ export default defineComponent({
|
|
|
81
84
|
|
|
82
85
|
.subtitle {
|
|
83
86
|
font-size: var(--dl-font-size-body);
|
|
84
|
-
margin: 3px 0 0 0;
|
|
85
87
|
color: var(--dl-color-medium);
|
|
88
|
+
margin: 0;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
.close-button {
|
|
89
|
-
margin-
|
|
90
|
-
margin-top: -6px;
|
|
92
|
+
margin-top: 5px;
|
|
91
93
|
}
|
|
92
94
|
</style>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
disableDropdown === true
|
|
116
116
|
"
|
|
117
117
|
:disabled="disabled === true || disableMainButton === true"
|
|
118
|
-
:style="mainButtonStyle"
|
|
118
|
+
:style="[mainButtonStyle, cssVars]"
|
|
119
119
|
:no-wrap="props.noWrap"
|
|
120
120
|
:tooltip="tooltip"
|
|
121
121
|
:max-width="maxWidth"
|
|
@@ -316,6 +316,14 @@ export default defineComponent({
|
|
|
316
316
|
}
|
|
317
317
|
})
|
|
318
318
|
|
|
319
|
+
const cssVars = computed(() => {
|
|
320
|
+
return {
|
|
321
|
+
'--justify-content': props.fluid
|
|
322
|
+
? 'space-between'
|
|
323
|
+
: 'space-around'
|
|
324
|
+
}
|
|
325
|
+
})
|
|
326
|
+
|
|
319
327
|
watch(
|
|
320
328
|
() => props.modelValue,
|
|
321
329
|
(val) => {
|
|
@@ -416,7 +424,8 @@ export default defineComponent({
|
|
|
416
424
|
menuModel,
|
|
417
425
|
props,
|
|
418
426
|
setHighlightedIndex,
|
|
419
|
-
handleSelectedItem
|
|
427
|
+
handleSelectedItem,
|
|
428
|
+
cssVars
|
|
420
429
|
}
|
|
421
430
|
}
|
|
422
431
|
})
|
|
@@ -456,7 +465,7 @@ export default defineComponent({
|
|
|
456
465
|
&--separator {
|
|
457
466
|
position: absolute;
|
|
458
467
|
left: 0;
|
|
459
|
-
width:
|
|
468
|
+
width: 0.7px;
|
|
460
469
|
height: 60%;
|
|
461
470
|
}
|
|
462
471
|
|
|
@@ -467,7 +476,7 @@ export default defineComponent({
|
|
|
467
476
|
&__title {
|
|
468
477
|
display: flex;
|
|
469
478
|
align-items: center;
|
|
470
|
-
justify-content:
|
|
479
|
+
justify-content: var(--justify-content);
|
|
471
480
|
text-align: center;
|
|
472
481
|
padding: 0;
|
|
473
482
|
flex: 10000 1 0%;
|