@dataloop-ai/components 0.15.7 → 0.16.0
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 +1 -1
- package/src/assets/grid.css +9 -0
- package/src/components/{DlAccordion → basic/DlAccordion}/DlAccordion.vue +1 -1
- package/src/components/{DlAccordion → basic/DlAccordion/components}/AccordionHeader.vue +3 -5
- package/src/components/{DlAlert.vue → basic/DlAlert/DlAlert.vue} +3 -3
- package/src/components/basic/DlAlert/index.ts +2 -0
- package/src/components/{DlAvatar.vue → basic/DlAvatar/DlAvatar.vue} +2 -2
- package/src/components/basic/DlAvatar/index.ts +2 -0
- package/src/components/{DlButton → basic/DlButton}/DlButton.vue +5 -20
- package/src/components/{DlButton → basic/DlButton}/index.ts +0 -1
- package/src/components/basic/DlButton/types.ts +14 -0
- package/src/components/{DlButton → basic/DlButton}/utils.ts +9 -9
- package/src/components/{DlChip → basic/DlChip}/DlChip.vue +3 -4
- package/src/components/basic/DlChip/index.ts +3 -0
- package/src/components/{DlChip → basic/DlChip}/utils.ts +8 -8
- package/src/components/basic/DlKpi/DlKpi.vue +275 -0
- package/src/components/basic/DlKpi/components/KpiInfo.vue +54 -0
- package/src/components/basic/DlKpi/index.ts +2 -0
- package/src/components/basic/DlKpi/types/KpiItem.ts +28 -0
- package/src/components/basic/DlKpi/types.ts +1 -0
- package/src/components/{DlListItem → basic/DlListItem}/DlListItem.vue +3 -3
- package/src/components/{DlPanelContainer → basic/DlPanelContainer}/DlPanelContainer.vue +1 -2
- package/src/components/basic/DlPanelContainer/index.ts +2 -0
- package/src/components/{DlPopup → basic/DlPopup}/DlPopup.vue +23 -20
- package/src/components/{DlPopup → basic/DlPopup/components}/PopupHeader.vue +1 -2
- package/src/components/basic/DlPopup/index.ts +3 -0
- package/src/components/{DlProgressChart.vue → basic/DlProgressChart/DlProgressChart.vue} +3 -4
- package/src/components/basic/DlProgressChart/index.ts +2 -0
- package/src/components/{DlWidget → basic/DlWidget}/DlWidget.vue +2 -2
- package/src/components/basic/DlWidget/index.ts +5 -0
- package/src/components/basic/index.ts +11 -0
- package/src/components/basic/models.ts +1 -0
- package/src/components/basic/types.ts +8 -0
- package/src/components/{DlChart → compound/DlCharts/charts/DlBarChart}/DlBarChart.vue +13 -9
- package/src/components/compound/DlCharts/charts/DlBarChart/index.ts +2 -0
- package/src/components/{DlChart → compound/DlCharts/charts/DlColumnChart}/DlColumnChart.vue +13 -15
- package/src/components/compound/DlCharts/charts/DlColumnChart/index.ts +2 -0
- package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/DlDoughnutChart.vue +5 -5
- package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/DlDoughnutChartWidget.vue +1 -3
- package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart/components}/DlDoughnutChartLegend.vue +2 -4
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/index.ts +3 -0
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/types/index.ts +5 -0
- package/src/components/{DlChart → compound/DlCharts/charts/DlLineChart}/DlLineChart.vue +12 -8
- package/src/components/compound/DlCharts/charts/DlLineChart/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/index.ts +4 -0
- package/src/components/{DlChart → compound/DlCharts/components}/DlBrush.vue +7 -7
- package/src/components/{DlChart → compound/DlCharts/components}/DlChartLabels.vue +2 -3
- package/src/components/{DlChart → compound/DlCharts/components}/DlChartLegend.vue +2 -3
- package/src/components/{DlChart/DlScrollBar.vue → compound/DlCharts/components/DlChartScrollBar.vue} +1 -1
- package/src/components/compound/DlCharts/index.ts +1 -0
- package/src/components/{DlChart → compound/DlCharts/models}/chart.ts +4 -4
- package/src/components/compound/DlCharts/models/index.ts +1 -0
- package/src/components/{DlChart → compound/DlCharts/shared}/BrushThumb.vue +3 -4
- package/src/components/compound/DlCharts/types/index.ts +1 -0
- package/src/components/{DlChart → compound/DlCharts/types}/props.ts +2 -2
- package/src/components/{DlChart → compound/DlCharts/types}/typedCharts.ts +5 -5
- package/src/components/{DlChart → compound/DlCharts/types}/types.ts +4 -4
- package/src/components/compound/DlCharts/types.ts +1 -0
- package/src/components/{DlCounters.vue → compound/DlCounters/DlCounters.vue} +15 -26
- package/src/components/compound/DlCounters/index.ts +2 -0
- package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker}/DlDatePicker.vue +3 -4
- package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker/components}/DlCalendar.vue +10 -12
- package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker/components}/DlMonthCalendar.vue +4 -5
- package/src/components/compound/DlDateTime/DlDatePicker/models/index.ts +3 -0
- package/src/components/{DlDatePicker/isInRange.ts → compound/DlDateTime/DlDatePicker/utils.ts} +40 -1
- package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlDateInput.vue +1 -1
- package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlDateTimeRange.vue +6 -6
- package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker}/DlTimePicker.vue +2 -2
- package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker/components}/DlTimePickerInput.vue +2 -3
- package/src/components/compound/DlDateTime/index.ts +3 -0
- package/src/components/compound/DlDateTime/types.ts +3 -0
- package/src/components/{DlDialogBox → compound/DlDialogBox/components}/DlDialogBoxHeader.vue +1 -1
- package/src/components/compound/DlDialogBox/index.ts +5 -0
- package/src/components/compound/DlDialogBox/types.ts +1 -0
- package/src/components/{DlDropdownButton.vue → compound/DlDropdownButton/DlDropdownButton.vue} +10 -10
- package/src/components/{DlButtonGroup.vue → compound/DlDropdownButton/components/ButtonGroup.vue} +4 -3
- package/src/components/compound/DlDropdownButton/index.ts +2 -0
- package/src/components/{DlTextInput.vue → compound/DlInput/DlInput.vue} +12 -14
- package/src/components/compound/DlInput/index.ts +2 -0
- package/src/components/{DlItem → compound/DlItem}/DlItem.vue +2 -2
- package/src/components/{DlSmartSearch → compound/DlJsonEditor}/DlJsonEditor.vue +5 -6
- package/src/components/compound/DlJsonEditor/index.ts +2 -0
- package/src/components/compound/DlJsonEditor/types.ts +4 -0
- package/src/components/{DlOptionGroup → compound/DlOptionGroup}/DlOptionGroup.vue +9 -10
- package/src/components/{DlOptionGroup → compound/DlOptionGroup/components}/MenuItemWrapper.vue +3 -3
- package/src/components/{DlOptionGroup → compound/DlOptionGroup/components}/SimpleWrapper.vue +1 -1
- package/src/components/{DlOptionGroup → compound/DlOptionGroup}/index.ts +1 -1
- package/src/components/compound/DlOptionGroup/types.ts +40 -0
- package/src/components/compound/DlOptionGroup/utils.ts +46 -0
- package/src/components/{DlPagination → compound/DlPagination}/DlPagination.vue +4 -4
- package/src/components/{DlPagination → compound/DlPagination/components}/PageNavigation.vue +2 -2
- package/src/components/{DlPagination → compound/DlPagination/components}/QuickNavigation.vue +4 -4
- package/src/components/{DlPagination → compound/DlPagination/components}/RowsSelector.vue +2 -2
- package/src/components/{DlRange → compound/DlRange}/DlRange.vue +3 -3
- package/src/components/compound/DlRange/index.ts +2 -0
- package/src/components/{DlRange → compound/DlRange}/utils.ts +4 -4
- package/src/components/{DlSearch.vue → compound/DlSearches/DlSearch/DlSearch.vue} +6 -6
- package/src/components/compound/DlSearches/DlSearch/index.ts +2 -0
- package/src/components/compound/DlSearches/DlSearch/types.ts +1 -0
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch}/DlSmartSearch.vue +15 -11
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch/components}/DlSmartSearchInput.vue +15 -11
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch/components}/DlSuggestionsDropdown.vue +2 -3
- package/src/components/compound/DlSearches/DlSmartSearch/index.ts +3 -0
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch/utils}/highlightSyntax.ts +2 -4
- package/src/components/{DlSmartSearch/utils.ts → compound/DlSearches/DlSmartSearch/utils/index.ts} +4 -2
- package/src/components/compound/DlSearches/index.ts +2 -0
- package/src/components/compound/DlSearches/types.ts +2 -0
- package/src/components/{DlSelect → compound/DlSelect}/DlSelect.vue +14 -18
- package/src/components/{DlSelect/SelectOption.vue → compound/DlSelect/components/DlSelectOption.vue} +5 -6
- package/src/components/compound/DlSelect/index.ts +4 -0
- package/src/components/{DlSelect → compound/DlSelect}/utils.ts +4 -4
- package/src/components/{DlSlider → compound/DlSlider}/DlSlider.vue +3 -2
- package/src/components/{DlSlider → compound/DlSlider}/components/DlSliderBase.vue +2 -2
- package/src/components/{DlSlider → compound/DlSlider}/useSlider.ts +2 -2
- package/src/components/{DlStepper → compound/DlStepper}/DlStepper.vue +8 -8
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperContent.vue +2 -2
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperFooter.vue +2 -2
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperHeader.vue +2 -1
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperSidebar.vue +4 -4
- package/src/components/compound/DlStepper/index.ts +4 -0
- package/src/components/compound/DlStepper/models/index.ts +3 -0
- package/src/components/compound/DlStepper/types.ts +2 -0
- package/src/components/{DlTabPanels → compound/DlTabPanels}/DlTabPanels.vue +1 -1
- package/src/components/{DlTable → compound/DlTable}/DlTable.vue +20 -20
- package/src/components/{DlTable → compound/DlTable/components}/DlTd.vue +4 -4
- package/src/components/{DlTable → compound/DlTable/components}/DlTh.vue +3 -4
- package/src/components/{DlTable → compound/DlTable/components}/DlTr.vue +1 -1
- package/src/components/{DlTable → compound/DlTable}/hooks/tableColumnSelection.ts +6 -6
- package/src/components/{DlTable → compound/DlTable}/hooks/tableFilter.ts +2 -2
- package/src/components/{DlTable → compound/DlTable}/hooks/tableRowSelection.ts +6 -6
- package/src/components/{DlTable → compound/DlTable}/hooks/tableSort.ts +11 -11
- package/src/components/compound/DlTable/index.ts +6 -0
- package/src/components/compound/DlTable/types.ts +96 -0
- package/src/components/compound/DlTable/utils/index.ts +1 -0
- package/src/components/{DlTabs → compound/DlTabs}/DlTabs.vue +5 -5
- package/src/components/{DlTabs → compound/DlTabs/components}/DlTab.vue +2 -3
- package/src/components/{DlTabs → compound/DlTabs/components}/TabsWrapper.vue +2 -2
- package/src/components/{DlTabs → compound/DlTabs}/index.ts +1 -1
- package/src/components/{DlTabs → compound/DlTabs}/types.ts +1 -1
- package/src/components/{DlToastMessage → compound/DlToast}/components/ToastComponent.vue +2 -3
- package/src/components/compound/index.ts +18 -0
- package/src/components/compound/models.ts +1 -0
- package/src/components/compound/types.ts +10 -0
- package/src/components/essential/DlBadge/index.ts +2 -0
- package/src/components/{DlCheckbox.vue → essential/DlCheckbox/DlCheckbox.vue} +2 -2
- package/src/components/essential/DlCheckbox/index.ts +2 -0
- package/src/components/{DlColorPicker → essential/DlColorPicker}/DlColorPicker.vue +6 -6
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlAlpha.vue +1 -1
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlColors.vue +1 -1
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlPreview.vue +1 -1
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlSaturation.vue +1 -1
- package/src/components/essential/DlColorPicker/index.ts +17 -0
- package/src/components/{DlColorPicker → essential/DlColorPicker}/types.ts +3 -0
- package/src/components/{DlIcon.vue → essential/DlIcon/DlIcon.vue} +1 -1
- package/src/components/essential/DlIcon/index.ts +2 -0
- package/src/components/{DlLink → essential/DlLink}/index.ts +0 -1
- package/src/components/essential/DlList/index.ts +2 -0
- package/src/components/{DlMenu → essential/DlMenu}/DlMenu.vue +19 -17
- package/src/components/{DlMenu → essential/DlMenu}/utils.ts +5 -5
- package/src/components/essential/DlPanel/index.ts +2 -0
- package/src/components/{DlProgressBar.vue → essential/DlProgressBar/DlProgressBar.vue} +27 -2
- package/src/components/essential/DlProgressBar/index.ts +2 -0
- package/src/components/{DlRadio.vue → essential/DlRadio/DlRadio.vue} +1 -2
- package/src/components/essential/DlRadio/index.ts +2 -0
- package/src/components/essential/DlSkeleton/index.ts +2 -0
- package/src/components/essential/DlSpinner/index.ts +2 -0
- package/src/components/{DlSwitch.vue → essential/DlSwitch/DlSwitch.vue} +3 -3
- package/src/components/essential/DlSwitch/index.ts +2 -0
- package/src/components/essential/DlTextArea/index.ts +2 -0
- package/src/components/essential/DlTextHolder/index.ts +2 -0
- package/src/components/{DlThemeProvider.vue → essential/DlThemeProvider/DlThemeProvider.vue} +2 -2
- package/src/components/essential/DlThemeProvider/index.ts +2 -0
- package/src/components/{DlTooltip.vue → essential/DlTooltip/DlTooltip.vue} +15 -13
- package/src/components/essential/DlTooltip/index.ts +2 -0
- package/src/components/{DlTrend.vue → essential/DlTrend/DlTrend.vue} +1 -1
- package/src/components/essential/DlTrend/index.ts +2 -0
- package/src/components/{DlTypography.vue → essential/DlTypography/DlTypography.vue} +1 -1
- package/src/components/essential/DlTypography/index.ts +2 -0
- package/src/components/essential/index.ts +19 -0
- package/src/components/essential/models.ts +1 -0
- package/src/components/essential/types.ts +1 -0
- package/src/components/index.ts +4 -123
- package/src/components/models.ts +4 -0
- package/src/components/shared/DlInfoErrorMessage/index.ts +2 -0
- package/src/components/{DlItemSection.vue → shared/DlItemSection/DlItemSection.vue} +1 -1
- package/src/components/shared/DlItemSection/index.ts +2 -0
- package/src/components/{DlVirtualScroll → shared/DlVirtualScroll}/DlVirtualScroll.vue +3 -3
- package/src/components/shared/index.ts +3 -0
- package/src/components/shared/models.ts +1 -0
- package/src/components/shared/types.ts +1 -0
- package/src/components/types.ts +3 -0
- package/src/demo/BarChartDemo.vue +1 -1
- package/src/demo/ColumnChartDemo.vue +1 -2
- package/src/demo/DlAvatarDemo.vue +2 -2
- package/src/demo/DlButtonDemo.vue +1 -1
- package/src/demo/DlChartDoughnutDemo.vue +2 -2
- package/src/demo/DlColorPickerDemo.vue +1 -1
- package/src/demo/DlCounterDemo.vue +1 -1
- package/src/demo/DlDateTimeRangeDemo.vue +1 -1
- package/src/demo/DlDialogBoxDemo.vue +1 -1
- package/src/demo/{DlTextInputDemo.vue → DlInputDemo.vue} +8 -8
- package/src/demo/DlKpiDemo.vue +261 -0
- package/src/demo/DlOptionGroupDemo.vue +2 -2
- package/src/demo/DlPaginationDemo.vue +1 -1
- package/src/demo/DlPopupDemo.vue +2 -3
- package/src/demo/DlSpinnerDemo.vue +1 -1
- package/src/demo/DlStepperDemo/CenteredStepperInDialogBox.vue +3 -10
- package/src/demo/DlStepperDemo/SimpleStepper.vue +3 -9
- package/src/demo/DlStepperDemo/StepperInDialogBox.vue +3 -10
- package/src/demo/DlStepperDemo/steps/DataStep.vue +3 -3
- package/src/demo/DlStepperDemo/steps/GeneralStep.vue +4 -4
- package/src/demo/DlTableDemo.vue +3 -3
- package/src/demo/DlTabsDemo.vue +2 -2
- package/src/demo/{DlToastMessageDemo.vue → DlToastDemo.vue} +5 -11
- package/src/demo/DlTypographyDemo.vue +1 -2
- package/src/demo/DlWidgetDemo.vue +1 -4
- package/src/demo/SmartSearchDemo/DlSmartSearchDemo.vue +1 -1
- package/src/demo/index.ts +8 -6
- package/src/models.ts +1 -3
- package/src/types.ts +1 -6
- package/src/utils/formatNumber.ts +15 -0
- package/src/utils/index.ts +1 -0
- package/src/components/DlChart/index.ts +0 -36
- package/src/components/DlChip/index.ts +0 -4
- package/src/components/DlColorPicker/index.ts +0 -20
- package/src/components/DlDatePicker/utils.ts +0 -39
- package/src/components/DlDialogBox/index.ts +0 -5
- package/src/components/DlOptionGroup/OptionGroup.types.ts +0 -36
- package/src/components/DlOptionGroup/utils.ts +0 -40
- package/src/components/DlPanelContainer/index.ts +0 -4
- package/src/components/DlPopup/index.ts +0 -1
- package/src/components/DlSelect/index.ts +0 -4
- package/src/components/DlSmartSearch/index.ts +0 -4
- package/src/components/DlStepper/index.ts +0 -7
- package/src/components/DlTable/index.ts +0 -6
- package/src/components/DlTable/types.ts +0 -96
- package/src/components/DlWidget/index.ts +0 -4
- /package/src/components/{DlAccordion → basic/DlAccordion}/index.ts +0 -0
- /package/src/components/{DlListItem → basic/DlListItem}/index.ts +0 -0
- /package/src/components/{DlListItem → basic/DlListItem}/utils.ts +0 -0
- /package/src/components/{DlPopup → basic/DlPopup/components}/DraggableUpper.vue +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/DlGrid.vue +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/DlGridRow.vue +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/types.ts +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/utils.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartAnimation.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartData.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartOptions.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartProps.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutWithOriginalColor.ts +0 -0
- /package/src/components/{DlChart → compound/DlCharts}/utils.ts +0 -0
- /package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker}/index.ts +0 -0
- /package/src/components/{DlDatePicker/classes → compound/DlDateTime/DlDatePicker/models}/Calendar.ts +0 -0
- /package/src/components/{DlDatePicker/classes → compound/DlDateTime/DlDatePicker/models}/CalendarDate.ts +0 -0
- /package/src/components/{DlDatePicker/classes → compound/DlDateTime/DlDatePicker/models}/CustomDate.ts +0 -0
- /package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker}/types.ts +0 -0
- /package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlCardSidebar.vue +0 -0
- /package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/index.ts +0 -0
- /package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/types.ts +0 -0
- /package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker/components}/DlTimeCounter.vue +0 -0
- /package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker}/index.ts +0 -0
- /package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker}/types.ts +0 -0
- /package/src/components/{DlDialogBox → compound/DlDialogBox}/DlDialogBox.vue +0 -0
- /package/src/components/{DlDialogBox → compound/DlDialogBox/components}/DlDialogBoxFooter.vue +0 -0
- /package/src/components/{DlItem → compound/DlItem}/index.ts +0 -0
- /package/src/components/{DlPagination → compound/DlPagination/components}/PaginationLegend.vue +0 -0
- /package/src/components/{DlPagination → compound/DlPagination}/index.ts +0 -0
- /package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch}/types.ts +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/components/DlSliderInput.vue +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/components/index.ts +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/index.ts +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/sliderStyles.scss +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/utils.ts +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperContainer.vue +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/models}/Step.ts +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/models}/Stepper.ts +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/models}/interfaces.ts +0 -0
- /package/src/components/{DlTabPanels → compound/DlTabPanels}/DlTabPanel.vue +0 -0
- /package/src/components/{DlTabPanels → compound/DlTabPanels}/index.ts +0 -0
- /package/src/components/{DlTabPanels → compound/DlTabPanels}/utils.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable}/hooks/tableActions.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable}/hooks/tablePagination.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable}/hooks/tableRowExpand.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable/styles}/dl-table-styles.scss +0 -0
- /package/src/components/{DlTable → compound/DlTable/utils}/ResizableManager.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/api/useToast.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/index.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/types.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/utils/config.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/utils/render.ts +0 -0
- /package/src/components/{DlBadge.vue → essential/DlBadge/DlBadge.vue} +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlBox.vue +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlHue.vue +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker}/constants.ts +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker}/utils.ts +0 -0
- /package/src/components/{DlLink → essential/DlLink}/DlLink.vue +0 -0
- /package/src/components/{DlLink → essential/DlLink}/utils.ts +0 -0
- /package/src/components/{DlList.vue → essential/DlList/DlList.vue} +0 -0
- /package/src/components/{DlMenu → essential/DlMenu}/index.ts +0 -0
- /package/src/components/{DlPanelContainer → essential/DlPanel}/DlPanel.vue +0 -0
- /package/src/components/{DlSkeleton.vue → essential/DlSkeleton/DlSkeleton.vue} +0 -0
- /package/src/components/{DlSpinner.vue → essential/DlSpinner/DlSpinner.vue} +0 -0
- /package/src/components/{DlTextArea.vue → essential/DlTextArea/DlTextArea.vue} +0 -0
- /package/src/components/{DlTextHolder.vue → essential/DlTextHolder/DlTextHolder.vue} +0 -0
- /package/src/components/{DlInfoErrorMessage.vue → shared/DlInfoErrorMessage/DlInfoErrorMessage.vue} +0 -0
- /package/src/components/{DlVirtualScroll → shared/DlVirtualScroll}/index.ts +0 -0
- /package/src/components/{DlVirtualScroll → shared/DlVirtualScroll}/useVirtualScroll.ts +0 -0
|
@@ -11,25 +11,17 @@
|
|
|
11
11
|
class="item"
|
|
12
12
|
>
|
|
13
13
|
<div :class="computeClass('item-content')">
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{{ capitalize(item.text) }}
|
|
26
|
-
</p>
|
|
27
|
-
<p
|
|
28
|
-
v-show="item.subtext"
|
|
29
|
-
class="item-subtext"
|
|
30
|
-
>
|
|
31
|
-
{{ item.subtext && capitalize(item.subtext) }}
|
|
32
|
-
</p>
|
|
14
|
+
<dl-kpi
|
|
15
|
+
:counter="item.value"
|
|
16
|
+
counter-font-size="30px"
|
|
17
|
+
:title="capitalize(item.text)"
|
|
18
|
+
title-font-size="16px"
|
|
19
|
+
:subtitle="item.subtext && capitalize(item.subtext)"
|
|
20
|
+
subtitle-font-size="12px"
|
|
21
|
+
:info-message="null"
|
|
22
|
+
:progress="null"
|
|
23
|
+
:is-small="small"
|
|
24
|
+
/>
|
|
33
25
|
</div>
|
|
34
26
|
<div class="divider" />
|
|
35
27
|
</li>
|
|
@@ -40,7 +32,7 @@
|
|
|
40
32
|
<script lang="ts">
|
|
41
33
|
import { v4 } from 'uuid'
|
|
42
34
|
import { defineComponent, PropType } from 'vue-demi'
|
|
43
|
-
import {
|
|
35
|
+
import { DlKpi } from '../../basic'
|
|
44
36
|
|
|
45
37
|
interface CounterItem {
|
|
46
38
|
value?: number
|
|
@@ -50,6 +42,9 @@ interface CounterItem {
|
|
|
50
42
|
|
|
51
43
|
export default defineComponent({
|
|
52
44
|
name: 'DlCounters',
|
|
45
|
+
components: {
|
|
46
|
+
DlKpi
|
|
47
|
+
},
|
|
53
48
|
props: {
|
|
54
49
|
small: {
|
|
55
50
|
type: Boolean,
|
|
@@ -87,12 +82,6 @@ export default defineComponent({
|
|
|
87
82
|
capitalize(value: string): string {
|
|
88
83
|
return value[0].toUpperCase() + value.slice(1)
|
|
89
84
|
},
|
|
90
|
-
abbreviateNumber(nr: number) {
|
|
91
|
-
if (typeof nr === 'number') {
|
|
92
|
-
return abbreviateToString(nr)
|
|
93
|
-
}
|
|
94
|
-
return nr
|
|
95
|
-
},
|
|
96
85
|
computeClass(value: string): (string | boolean)[] {
|
|
97
86
|
return [value, this.small && `${value}--small`]
|
|
98
87
|
}
|
|
@@ -72,10 +72,9 @@
|
|
|
72
72
|
</div>
|
|
73
73
|
</template>
|
|
74
74
|
<script lang="ts">
|
|
75
|
-
import DlCalendar from './DlCalendar.vue'
|
|
76
|
-
import DlMonthCalendar from './DlMonthCalendar.vue'
|
|
77
|
-
import { Calendar } from './
|
|
78
|
-
import { CalendarDate } from './classes/CalendarDate'
|
|
75
|
+
import DlCalendar from './components/DlCalendar.vue'
|
|
76
|
+
import DlMonthCalendar from './components/DlMonthCalendar.vue'
|
|
77
|
+
import { CalendarDate, Calendar } from './models'
|
|
79
78
|
import { defineComponent, PropType } from 'vue-demi'
|
|
80
79
|
import { DateInterval } from './types'
|
|
81
80
|
import { v4 } from 'uuid'
|
package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker/components}/DlCalendar.vue
RENAMED
|
@@ -58,13 +58,11 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
</template>
|
|
60
60
|
<script lang="ts">
|
|
61
|
-
import DlIcon from '
|
|
62
|
-
import { CalendarDate } from '
|
|
61
|
+
import { DlIcon } from '../../../../essential'
|
|
62
|
+
import { CalendarDate, CustomDate } from '../models'
|
|
63
63
|
import { defineComponent, PropType } from 'vue-demi'
|
|
64
|
-
import { getWeekDayNames } from '
|
|
65
|
-
import { DateInterval } from '
|
|
66
|
-
import { CustomDate } from './classes/CustomDate'
|
|
67
|
-
import { isInRange } from './isInRange'
|
|
64
|
+
import { getWeekDayNames, isInRange } from '../utils'
|
|
65
|
+
import { DateInterval } from '../types'
|
|
68
66
|
|
|
69
67
|
const DAYS_IN_WEEK = 7
|
|
70
68
|
|
|
@@ -122,8 +120,8 @@ export default defineComponent({
|
|
|
122
120
|
}
|
|
123
121
|
},
|
|
124
122
|
methods: {
|
|
125
|
-
handleClick(value: CustomDate) {
|
|
126
|
-
if (!isInRange(this.availableRange, value)) return
|
|
123
|
+
handleClick(value: Partial<CustomDate>) {
|
|
124
|
+
if (!isInRange(this.availableRange, value as CustomDate)) return
|
|
127
125
|
const newDate = {
|
|
128
126
|
from: value.toDate(),
|
|
129
127
|
to: value.toDate()
|
|
@@ -251,14 +249,14 @@ export default defineComponent({
|
|
|
251
249
|
return style
|
|
252
250
|
},
|
|
253
251
|
|
|
254
|
-
handleMouseDown(value: CustomDate) {
|
|
255
|
-
if (!isInRange(this.availableRange, value)) return
|
|
252
|
+
handleMouseDown(value: Partial<CustomDate>) {
|
|
253
|
+
if (!isInRange(this.availableRange, value as CustomDate)) return
|
|
256
254
|
this.$emit('mousedown', value.toDate())
|
|
257
255
|
},
|
|
258
256
|
|
|
259
|
-
handleMouseEnter(value: CustomDate) {
|
|
257
|
+
handleMouseEnter(value: Partial<CustomDate>) {
|
|
260
258
|
if (this.modelValue === null) return
|
|
261
|
-
if (!isInRange(this.availableRange, value)) return
|
|
259
|
+
if (!isInRange(this.availableRange, value as CustomDate)) return
|
|
262
260
|
|
|
263
261
|
if (value.isBefore(new CustomDate(this.modelValue.from))) return
|
|
264
262
|
|
|
@@ -43,11 +43,10 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
<script lang="ts">
|
|
45
45
|
import { defineComponent, PropType } from 'vue-demi'
|
|
46
|
-
import DlIcon from '
|
|
47
|
-
import { CalendarDate } from '
|
|
48
|
-
import { DateInterval } from '
|
|
49
|
-
import { Month, getMonths } from '
|
|
50
|
-
import { isInRange } from './isInRange'
|
|
46
|
+
import { DlIcon } from '../../../../essential'
|
|
47
|
+
import { CalendarDate } from '../models'
|
|
48
|
+
import { DateInterval } from '../types'
|
|
49
|
+
import { Month, getMonths, isInRange } from '../utils'
|
|
51
50
|
|
|
52
51
|
export default defineComponent({
|
|
53
52
|
components: {
|
package/src/components/{DlDatePicker/isInRange.ts → compound/DlDateTime/DlDatePicker/utils.ts}
RENAMED
|
@@ -1,6 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CalendarDate } from './models/CalendarDate'
|
|
2
|
+
import { CustomDate } from './models/CustomDate'
|
|
2
3
|
import { DateInterval } from './types'
|
|
3
4
|
|
|
5
|
+
export const getWeekDayNames = (): string[] => {
|
|
6
|
+
const start = new CalendarDate().day(0)
|
|
7
|
+
const end = new CalendarDate().day(6)
|
|
8
|
+
|
|
9
|
+
const weekDayNames = []
|
|
10
|
+
|
|
11
|
+
while (start.isSameOrBefore(end)) {
|
|
12
|
+
weekDayNames.push(start.format('dddd').substring(0, 2))
|
|
13
|
+
|
|
14
|
+
start.add(1, 'day')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return weekDayNames
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type Month = {
|
|
21
|
+
name: string
|
|
22
|
+
value: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const getMonths = (): Month[] => {
|
|
26
|
+
const start = new CalendarDate().month(0)
|
|
27
|
+
const end = new CalendarDate().month(11)
|
|
28
|
+
|
|
29
|
+
const months = []
|
|
30
|
+
|
|
31
|
+
while (start.isSameOrBefore(end)) {
|
|
32
|
+
months.push({
|
|
33
|
+
name: start.format('MMM'),
|
|
34
|
+
value: start.month()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
start.add(1, 'month')
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return months
|
|
41
|
+
}
|
|
42
|
+
|
|
4
43
|
export function isInRange(
|
|
5
44
|
range: Partial<DateInterval> | null,
|
|
6
45
|
value: CustomDate | DateInterval | null
|
package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlDateTimeRange.vue
RENAMED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
<script lang="ts">
|
|
61
61
|
import { DlTimePicker } from '../DlTimePicker'
|
|
62
|
-
import { DateInterval } from '../
|
|
62
|
+
import { DateInterval } from '../types'
|
|
63
63
|
import DlCardSidebar from './DlCardSidebar.vue'
|
|
64
64
|
import {
|
|
65
65
|
DayTypeOption,
|
|
@@ -67,13 +67,13 @@ import {
|
|
|
67
67
|
MonthTypeOption,
|
|
68
68
|
MONTH_SIDEBAR_OPTION
|
|
69
69
|
} from './types'
|
|
70
|
-
import { CustomDate } from '../DlDatePicker/
|
|
71
|
-
import
|
|
72
|
-
import { CalendarDate } from '../DlDatePicker/
|
|
70
|
+
import { CustomDate } from '../DlDatePicker/models/CustomDate'
|
|
71
|
+
import DlDatePicker from '../DlDatePicker/DlDatePicker.vue'
|
|
72
|
+
import { CalendarDate } from '../DlDatePicker/models/CalendarDate'
|
|
73
73
|
import DlDateInput from './DlDateInput.vue'
|
|
74
|
-
import { DlMenu } from '
|
|
74
|
+
import { DlMenu } from '../../../essential'
|
|
75
75
|
import { defineComponent, PropType } from 'vue-demi'
|
|
76
|
-
import { isInRange } from '../DlDatePicker/
|
|
76
|
+
import { isInRange } from '../DlDatePicker/utils'
|
|
77
77
|
import { v4 } from 'uuid'
|
|
78
78
|
|
|
79
79
|
export default defineComponent({
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
<script lang="ts">
|
|
34
34
|
import { defineComponent, PropType } from 'vue-demi'
|
|
35
|
-
import DlTimePickerInput from './DlTimePickerInput.vue'
|
|
36
|
-
import { CustomDate } from '../DlDatePicker/
|
|
35
|
+
import DlTimePickerInput from './components/DlTimePickerInput.vue'
|
|
36
|
+
import { CustomDate } from '../DlDatePicker/models/CustomDate'
|
|
37
37
|
import { Time } from './types'
|
|
38
38
|
import { DateInterval } from '../DlDatePicker/types'
|
|
39
39
|
import { v4 } from 'uuid'
|
|
@@ -69,10 +69,9 @@
|
|
|
69
69
|
</div>
|
|
70
70
|
</template>
|
|
71
71
|
<script lang="ts">
|
|
72
|
-
import { Time } from '
|
|
73
|
-
import DlIcon from '../DlIcon.vue'
|
|
72
|
+
import { Time } from '../types'
|
|
74
73
|
import DlTimeCounter from './DlTimeCounter.vue'
|
|
75
|
-
import { DlMenu } from '
|
|
74
|
+
import { DlMenu, DlIcon } from '../../../../essential'
|
|
76
75
|
import { defineComponent, PropType } from 'vue-demi'
|
|
77
76
|
|
|
78
77
|
const MAX_HOUR = 23
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/src/components/{DlDropdownButton.vue → compound/DlDropdownButton/DlDropdownButton.vue}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<button-group
|
|
3
3
|
v-if="split"
|
|
4
4
|
:id="uuid"
|
|
5
5
|
:class="identifierClass"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
>
|
|
96
96
|
<slot />
|
|
97
97
|
</dl-menu>
|
|
98
|
-
</
|
|
98
|
+
</button-group>
|
|
99
99
|
<dl-button
|
|
100
100
|
v-else
|
|
101
101
|
class="dl-btn-dropdown dl-btn-dropdown--simple"
|
|
@@ -164,18 +164,18 @@
|
|
|
164
164
|
</template>
|
|
165
165
|
|
|
166
166
|
<script lang="ts">
|
|
167
|
-
import
|
|
168
|
-
import
|
|
169
|
-
import
|
|
170
|
-
import {
|
|
171
|
-
import { stop } from '../utils/events'
|
|
167
|
+
import { DlButton } from '../../basic'
|
|
168
|
+
import ButtonGroup from './components/ButtonGroup.vue'
|
|
169
|
+
import { DlMenu, DlIcon } from '../../essential'
|
|
170
|
+
import { stop } from '../../../utils/events'
|
|
172
171
|
import {
|
|
173
172
|
defineComponent,
|
|
174
173
|
ref,
|
|
175
174
|
computed,
|
|
176
175
|
watch,
|
|
177
176
|
onMounted,
|
|
178
|
-
getCurrentInstance
|
|
177
|
+
getCurrentInstance,
|
|
178
|
+
Ref
|
|
179
179
|
} from 'vue-demi'
|
|
180
180
|
import { v4 } from 'uuid'
|
|
181
181
|
|
|
@@ -185,7 +185,7 @@ export default defineComponent({
|
|
|
185
185
|
DlMenu,
|
|
186
186
|
DlIcon,
|
|
187
187
|
DlButton,
|
|
188
|
-
|
|
188
|
+
ButtonGroup
|
|
189
189
|
},
|
|
190
190
|
model: {
|
|
191
191
|
prop: 'modelValue',
|
|
@@ -246,7 +246,7 @@ export default defineComponent({
|
|
|
246
246
|
const vm = getCurrentInstance()
|
|
247
247
|
const proxy = vm!.proxy!
|
|
248
248
|
|
|
249
|
-
const showing = ref<boolean>(!!props.modelValue)
|
|
249
|
+
const showing = ref<boolean>(!!props.modelValue) as Ref<boolean>
|
|
250
250
|
const menuRef = ref(null)
|
|
251
251
|
|
|
252
252
|
const attributes = computed(() => {
|
package/src/components/{DlButtonGroup.vue → compound/DlDropdownButton/components/ButtonGroup.vue}
RENAMED
|
@@ -14,7 +14,7 @@ import { defineComponent } from 'vue-demi'
|
|
|
14
14
|
const classes = ['outlined', 'flat', 'stretch']
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
17
|
-
name: '
|
|
17
|
+
name: 'ButtonGroup',
|
|
18
18
|
props: {
|
|
19
19
|
outlined: Boolean,
|
|
20
20
|
flat: Boolean,
|
|
@@ -23,13 +23,14 @@ export default defineComponent({
|
|
|
23
23
|
},
|
|
24
24
|
data() {
|
|
25
25
|
return {
|
|
26
|
-
uuid: `
|
|
26
|
+
uuid: `button-group-${v4()}`
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
computed: {
|
|
30
30
|
classes(): string {
|
|
31
31
|
const cls = classes
|
|
32
|
-
//
|
|
32
|
+
// todo: wtf is this ?
|
|
33
|
+
// @ts-ignore
|
|
33
34
|
.filter((t) => this[t] === true)
|
|
34
35
|
.map((t) => `dl-btn-group--${t}`)
|
|
35
36
|
.join(' ')
|
|
@@ -195,18 +195,15 @@
|
|
|
195
195
|
<script lang="ts">
|
|
196
196
|
import { debounce } from 'lodash'
|
|
197
197
|
import { defineComponent, PropType } from 'vue-demi'
|
|
198
|
-
import {
|
|
199
|
-
import
|
|
200
|
-
import
|
|
201
|
-
import
|
|
202
|
-
import {
|
|
203
|
-
import { DlMenu } from './DlMenu'
|
|
204
|
-
import DlTooltip from './DlTooltip.vue'
|
|
205
|
-
import { InputSizes, TInputSizes } from '../utils/input-sizes'
|
|
198
|
+
import { DlInfoErrorMessage } from '../../shared'
|
|
199
|
+
import { DlListItem } from '../../basic'
|
|
200
|
+
import { DlMenu, DlIcon, DlList, DlTooltip } from '../../essential'
|
|
201
|
+
import { DlButton } from '../../basic'
|
|
202
|
+
import { InputSizes, TInputSizes } from '../../../utils/input-sizes'
|
|
206
203
|
import { v4 } from 'uuid'
|
|
207
204
|
|
|
208
205
|
export default defineComponent({
|
|
209
|
-
name: '
|
|
206
|
+
name: 'DlInput',
|
|
210
207
|
components: {
|
|
211
208
|
DlButton,
|
|
212
209
|
DlIcon,
|
|
@@ -505,11 +502,12 @@ export default defineComponent({
|
|
|
505
502
|
},
|
|
506
503
|
getSuggestWords(
|
|
507
504
|
item: string,
|
|
508
|
-
keyword: string
|
|
505
|
+
keyword: string | number
|
|
509
506
|
): { value: string; highlighted: boolean }[] {
|
|
510
507
|
const words: { value: string; highlighted: boolean }[] = []
|
|
508
|
+
const key = `${keyword}`
|
|
511
509
|
|
|
512
|
-
if (!
|
|
510
|
+
if (!key.length || !this.highlightMatches) {
|
|
513
511
|
return [
|
|
514
512
|
{
|
|
515
513
|
value: item,
|
|
@@ -518,7 +516,7 @@ export default defineComponent({
|
|
|
518
516
|
]
|
|
519
517
|
}
|
|
520
518
|
|
|
521
|
-
const regex = new RegExp(
|
|
519
|
+
const regex = new RegExp(key, 'g')
|
|
522
520
|
|
|
523
521
|
const matches = [...item.matchAll(regex)]
|
|
524
522
|
|
|
@@ -541,12 +539,12 @@ export default defineComponent({
|
|
|
541
539
|
matches.forEach(
|
|
542
540
|
(match: RegExpMatchArray, iterationIndex: number) => {
|
|
543
541
|
const matchIndex = match.index ?? 0
|
|
544
|
-
const wordEndIndex = matchIndex +
|
|
542
|
+
const wordEndIndex = matchIndex + key.length
|
|
545
543
|
|
|
546
544
|
words.push({
|
|
547
545
|
value: item
|
|
548
546
|
.split('')
|
|
549
|
-
.slice(matchIndex,
|
|
547
|
+
.slice(matchIndex, key.length + matchIndex)
|
|
550
548
|
.join(''),
|
|
551
549
|
highlighted: true
|
|
552
550
|
})
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
import { defineComponent } from 'vue-demi'
|
|
14
|
-
import { DlListItem } from '
|
|
15
|
-
import DlItemSection from '
|
|
14
|
+
import { DlListItem } from '../../basic'
|
|
15
|
+
import { DlItemSection } from '../../shared'
|
|
16
16
|
import { v4 } from 'uuid'
|
|
17
17
|
|
|
18
18
|
export default defineComponent({
|
|
@@ -79,11 +79,10 @@ import { defineComponent, PropType } from 'vue-demi'
|
|
|
79
79
|
import { JSONEditor, JSONValue, Mode } from 'vanilla-jsoneditor'
|
|
80
80
|
import { debounce } from 'lodash'
|
|
81
81
|
import { Query } from './types'
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import DlTypography from '../DlTypography.vue'
|
|
82
|
+
import { DlSelect } from '../DlSelect'
|
|
83
|
+
import { DlButton } from '../../basic'
|
|
84
|
+
import { DlDialogBox, DlDialogBoxHeader } from '../DlDialogBox'
|
|
85
|
+
import { DlTypography } from '../../essential'
|
|
87
86
|
|
|
88
87
|
interface JSONContent {
|
|
89
88
|
json: JSONValue
|
|
@@ -113,7 +112,7 @@ export default defineComponent({
|
|
|
113
112
|
default: () => [] as Query[]
|
|
114
113
|
}
|
|
115
114
|
},
|
|
116
|
-
emits: ['update:modelValue', 'save', 'remove'],
|
|
115
|
+
emits: ['update:modelValue', 'save', 'remove', 'search'],
|
|
117
116
|
data() {
|
|
118
117
|
return {
|
|
119
118
|
preventOnChange: false,
|
|
@@ -54,14 +54,13 @@
|
|
|
54
54
|
import { defineComponent, PropType } from 'vue-demi'
|
|
55
55
|
import { components, typeValidator, optionsValidator, wrappers } from './utils'
|
|
56
56
|
import {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} from './
|
|
61
|
-
import { loggerFactory } from '
|
|
57
|
+
DlOptionGroupOptions,
|
|
58
|
+
DlOptionProps,
|
|
59
|
+
DlSelectedValueType
|
|
60
|
+
} from './types'
|
|
61
|
+
import { loggerFactory } from '../../../utils'
|
|
62
62
|
import { v4 } from 'uuid'
|
|
63
|
-
import DlIcon from '
|
|
64
|
-
import DlTooltip from '../DlTooltip.vue'
|
|
63
|
+
import { DlIcon, DlTooltip } from '../../essential'
|
|
65
64
|
|
|
66
65
|
export default defineComponent({
|
|
67
66
|
name: 'DlOptionGroup',
|
|
@@ -80,7 +79,7 @@ export default defineComponent({
|
|
|
80
79
|
leftLabel: { type: Boolean, default: false },
|
|
81
80
|
maxWidth: { type: String, default: '100%' },
|
|
82
81
|
options: {
|
|
83
|
-
type: Array as PropType<
|
|
82
|
+
type: Array as PropType<DlOptionGroupOptions>,
|
|
84
83
|
required: true,
|
|
85
84
|
validator: optionsValidator
|
|
86
85
|
},
|
|
@@ -97,7 +96,7 @@ export default defineComponent({
|
|
|
97
96
|
}
|
|
98
97
|
},
|
|
99
98
|
computed: {
|
|
100
|
-
individualProps(): (
|
|
99
|
+
individualProps(): (DlOptionProps & { id: string })[] {
|
|
101
100
|
return this.options.map((option) => {
|
|
102
101
|
const { value, label, ...rest } = option
|
|
103
102
|
return {
|
|
@@ -152,7 +151,7 @@ export default defineComponent({
|
|
|
152
151
|
)
|
|
153
152
|
}
|
|
154
153
|
},
|
|
155
|
-
handleUpdate(newValue:
|
|
154
|
+
handleUpdate(newValue: DlSelectedValueType, e: Event) {
|
|
156
155
|
this.$emit('update:model-value', newValue, e)
|
|
157
156
|
}
|
|
158
157
|
},
|
package/src/components/{DlOptionGroup → compound/DlOptionGroup/components}/MenuItemWrapper.vue
RENAMED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
<script lang="ts">
|
|
17
17
|
import { defineComponent } from 'vue-demi'
|
|
18
|
-
import { DlListItem } from '
|
|
19
|
-
import DlItemSection from '
|
|
18
|
+
import { DlListItem } from '../../../basic'
|
|
19
|
+
import { DlItemSection } from '../../../shared'
|
|
20
20
|
|
|
21
21
|
export default defineComponent({
|
|
22
|
-
name: '
|
|
22
|
+
name: 'MenuItemWrapper',
|
|
23
23
|
components: { DlListItem, DlItemSection },
|
|
24
24
|
props: {
|
|
25
25
|
leftLabel: Boolean
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type DlSelectedValueType = number | string | boolean | null
|
|
2
|
+
|
|
3
|
+
interface DlGenericOption {
|
|
4
|
+
label: string
|
|
5
|
+
value: DlSelectedValueType
|
|
6
|
+
disabled?: boolean
|
|
7
|
+
color?: string
|
|
8
|
+
tooltip?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface DlRadioOption extends DlGenericOption {
|
|
12
|
+
tabindex?: number | string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DlCheckboxOption extends DlGenericOption {
|
|
16
|
+
tabindex?: number | string
|
|
17
|
+
'toggle-indeterminate'?: boolean
|
|
18
|
+
'true-value'?: any
|
|
19
|
+
'false-value'?: any
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface DlToggleOption extends DlGenericOption {
|
|
23
|
+
icon?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type DlOptionGroupOptions = (
|
|
27
|
+
| DlRadioOption
|
|
28
|
+
| DlCheckboxOption
|
|
29
|
+
| DlToggleOption
|
|
30
|
+
)[]
|
|
31
|
+
|
|
32
|
+
export interface DlOptionProps
|
|
33
|
+
extends Partial<DlRadioOption>,
|
|
34
|
+
Partial<DlCheckboxOption>,
|
|
35
|
+
Partial<DlToggleOption> {
|
|
36
|
+
value?: DlSelectedValueType
|
|
37
|
+
class?: string
|
|
38
|
+
rightLabel?: string
|
|
39
|
+
leftLabel?: string
|
|
40
|
+
}
|