@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
|
@@ -83,25 +83,118 @@ export class Stepper {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @param options { step?: number; preventNext?: boolean }
|
|
89
|
+
* @param options.step The steps to complete
|
|
90
|
+
* @param options.preventNext Prevents the stepper from moving to the next step
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
public completeStep(options: { step?: Step; preventNext?: boolean } = {}) {
|
|
94
|
+
const { step, preventNext } = options
|
|
95
|
+
const stepToComplete = step ?? this.currentStep
|
|
96
|
+
|
|
97
|
+
if (!stepToComplete) {
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
stepToComplete.completed = true
|
|
91
102
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
103
|
+
if (!preventNext) {
|
|
104
|
+
this.moveToNextStep()
|
|
105
|
+
}
|
|
95
106
|
}
|
|
96
107
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
108
|
+
/**
|
|
109
|
+
* @param message The error message
|
|
110
|
+
* @param options { step?: number; preventNext?: boolean }
|
|
111
|
+
* @param options.step The steps to Fail
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
public failStep(message?: string, options: { step?: Step } = {}) {
|
|
115
|
+
const { step } = options
|
|
116
|
+
const stepToFail = step ?? this.currentStep
|
|
117
|
+
|
|
118
|
+
if (!stepToFail) {
|
|
119
|
+
return
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
stepToFail.error = message ?? ''
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @param message The warning message
|
|
127
|
+
* @param options { step?: number; preventNext?: boolean }
|
|
128
|
+
* @param options.step The steps to Warn
|
|
129
|
+
* @param options.preventNext Prevents the stepper from moving to the next step
|
|
130
|
+
* @returns
|
|
131
|
+
*/
|
|
132
|
+
public setStepWarning(
|
|
133
|
+
message?: string,
|
|
134
|
+
options: { step?: Step; preventNext?: boolean } = {}
|
|
135
|
+
) {
|
|
136
|
+
const { step, preventNext } = options
|
|
137
|
+
const stepToWarn = step ?? this.currentStep
|
|
138
|
+
|
|
139
|
+
if (!stepToWarn) {
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
stepToWarn.warning = message ?? ''
|
|
144
|
+
|
|
145
|
+
if (!preventNext) {
|
|
146
|
+
this.moveToNextStep()
|
|
147
|
+
}
|
|
101
148
|
}
|
|
102
149
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @param options { step?: number; preventNext?: boolean }
|
|
153
|
+
* @param options.step The steps to reset
|
|
154
|
+
* @returns
|
|
155
|
+
*/
|
|
156
|
+
public resetStep(options: { step?: Step } = {}) {
|
|
157
|
+
const { step } = options
|
|
158
|
+
const stepToReset = step ?? this.currentStep
|
|
159
|
+
|
|
160
|
+
if (!stepToReset) {
|
|
161
|
+
return
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
stepToReset.reset()
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @param options { step?: number; error?: boolean, warning?: boolean, completed?: boolean }
|
|
170
|
+
* @param options.step The step to clear its state
|
|
171
|
+
* @returns
|
|
172
|
+
*/
|
|
173
|
+
public clearStepState(
|
|
174
|
+
options: {
|
|
175
|
+
step?: Step
|
|
176
|
+
error?: boolean
|
|
177
|
+
warning?: boolean
|
|
178
|
+
completed?: boolean
|
|
179
|
+
} = {}
|
|
180
|
+
) {
|
|
181
|
+
const { step, error, warning, completed } = options
|
|
182
|
+
const stepToClear = step ?? this.currentStep
|
|
183
|
+
|
|
184
|
+
if (!stepToClear) {
|
|
185
|
+
return
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (error) {
|
|
189
|
+
stepToClear.clearError()
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (warning) {
|
|
193
|
+
stepToClear.clearWarning()
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (completed) {
|
|
197
|
+
stepToClear.clearCompleted()
|
|
198
|
+
}
|
|
106
199
|
}
|
|
107
200
|
}
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
:table-colspan="computedColspan"
|
|
64
64
|
:scroll-target="virtualScrollTarget"
|
|
65
65
|
:items="computedRows"
|
|
66
|
+
:scroll-debounce="scrollDebounce"
|
|
66
67
|
v-bind="virtProps"
|
|
67
68
|
@virtual-scroll="onVScroll"
|
|
68
69
|
>
|
|
@@ -152,13 +153,18 @@
|
|
|
152
153
|
: ''
|
|
153
154
|
"
|
|
154
155
|
:no-hover="noHover"
|
|
155
|
-
@click="onTrClick($event, props.item, pageIndex)"
|
|
156
|
-
@dblclick="
|
|
156
|
+
@click="onTrClick($event, props.item, props.pageIndex)"
|
|
157
|
+
@dblclick="
|
|
158
|
+
onTrDblClick($event, props.item, props.pageIndex)
|
|
159
|
+
"
|
|
157
160
|
@contextmenu="
|
|
158
|
-
onTrContextMenu($event, props.item, pageIndex)
|
|
161
|
+
onTrContextMenu($event, props.item, props.pageIndex)
|
|
159
162
|
"
|
|
160
163
|
>
|
|
161
|
-
<td
|
|
164
|
+
<td
|
|
165
|
+
v-if="hasDraggableRows"
|
|
166
|
+
class="dl-table__drag-icon"
|
|
167
|
+
>
|
|
162
168
|
<dl-icon
|
|
163
169
|
class="draggable-icon"
|
|
164
170
|
icon="icon-dl-drag"
|
|
@@ -325,6 +331,7 @@
|
|
|
325
331
|
name="body"
|
|
326
332
|
>
|
|
327
333
|
<DlTr
|
|
334
|
+
v-if="!isEmpty"
|
|
328
335
|
:key="getRowKey(row)"
|
|
329
336
|
:class="
|
|
330
337
|
isRowSelected(getRowKey(row))
|
|
@@ -340,7 +347,10 @@
|
|
|
340
347
|
onTrContextMenu($event, row, pageIndex)
|
|
341
348
|
"
|
|
342
349
|
>
|
|
343
|
-
<td
|
|
350
|
+
<td
|
|
351
|
+
v-if="hasDraggableRows"
|
|
352
|
+
class="dl-table__drag-icon"
|
|
353
|
+
>
|
|
344
354
|
<dl-icon
|
|
345
355
|
class="draggable-icon"
|
|
346
356
|
icon="icon-dl-drag"
|
|
@@ -403,6 +413,23 @@
|
|
|
403
413
|
</slot>
|
|
404
414
|
</DlTr>
|
|
405
415
|
</slot>
|
|
416
|
+
<DlTr v-if="isEmpty">
|
|
417
|
+
<DlTd colspan="100%">
|
|
418
|
+
<div class="flex justify-center">
|
|
419
|
+
<dl-empty-state v-bind="emptyStateProps">
|
|
420
|
+
<template
|
|
421
|
+
v-for="(_, slot) in $slots"
|
|
422
|
+
#[slot]="props"
|
|
423
|
+
>
|
|
424
|
+
<slot
|
|
425
|
+
:name="slot"
|
|
426
|
+
v-bind="props"
|
|
427
|
+
/>
|
|
428
|
+
</template>
|
|
429
|
+
</dl-empty-state>
|
|
430
|
+
</div>
|
|
431
|
+
</DlTd>
|
|
432
|
+
</DlTr>
|
|
406
433
|
<slot
|
|
407
434
|
name="bottom-row"
|
|
408
435
|
:cols="computedCols"
|
|
@@ -447,7 +474,7 @@
|
|
|
447
474
|
<dl-pagination
|
|
448
475
|
v-if="displayPagination"
|
|
449
476
|
v-bind="marginalsScope.pagination"
|
|
450
|
-
total-items="rows.length"
|
|
477
|
+
:total-items="rows.length"
|
|
451
478
|
@update:rowsPerPage="
|
|
452
479
|
(v) => setPagination({ rowsPerPage: v })
|
|
453
480
|
"
|
|
@@ -519,6 +546,8 @@ import { DlTableRow, DlTableProps, DlTableColumn } from './types'
|
|
|
519
546
|
import { DlPagination } from '../DlPagination'
|
|
520
547
|
import { DlIcon, DlCheckbox, DlProgressBar } from '../../essential'
|
|
521
548
|
import { ResizableManager } from './utils'
|
|
549
|
+
import DlEmptyState from '../../basic/DlEmptyState/DlEmptyState.vue'
|
|
550
|
+
import { DlEmptyStateProps } from '../../basic/DlEmptyState/types'
|
|
522
551
|
import { v4 } from 'uuid'
|
|
523
552
|
|
|
524
553
|
const commonVirtPropsObj = {} as Record<string, any>
|
|
@@ -536,7 +565,8 @@ export default defineComponent({
|
|
|
536
565
|
DlPagination,
|
|
537
566
|
DlProgressBar,
|
|
538
567
|
DlIcon,
|
|
539
|
-
DlCheckbox
|
|
568
|
+
DlCheckbox,
|
|
569
|
+
DlEmptyState
|
|
540
570
|
},
|
|
541
571
|
props: {
|
|
542
572
|
columns: { type: Array, default: () => [] as Record<string, any>[] },
|
|
@@ -593,7 +623,7 @@ export default defineComponent({
|
|
|
593
623
|
},
|
|
594
624
|
virtualScrollTarget: {
|
|
595
625
|
type: Object as PropType<HTMLElement>,
|
|
596
|
-
default:
|
|
626
|
+
default: null
|
|
597
627
|
},
|
|
598
628
|
titleClass: {
|
|
599
629
|
type: [String, Array, Object],
|
|
@@ -616,6 +646,15 @@ export default defineComponent({
|
|
|
616
646
|
default: null
|
|
617
647
|
},
|
|
618
648
|
noHover: Boolean,
|
|
649
|
+
isEmpty: Boolean,
|
|
650
|
+
emptyStateProps: {
|
|
651
|
+
type: Object as PropType<DlEmptyStateProps>,
|
|
652
|
+
default: null
|
|
653
|
+
},
|
|
654
|
+
scrollDebounce: {
|
|
655
|
+
type: Number,
|
|
656
|
+
default: 100
|
|
657
|
+
},
|
|
619
658
|
...useTableActionsProps,
|
|
620
659
|
...commonVirtScrollProps,
|
|
621
660
|
...useTableRowExpandProps,
|
|
@@ -1063,10 +1102,6 @@ export default defineComponent({
|
|
|
1063
1102
|
acc[p] = (props as Record<string, any>)[p]
|
|
1064
1103
|
})
|
|
1065
1104
|
|
|
1066
|
-
if (!acc.virtualScrollItemSize) {
|
|
1067
|
-
acc.virtualScrollItemSize = props.dense === true ? 30 : 40
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
1105
|
return acc
|
|
1071
1106
|
})
|
|
1072
1107
|
|
|
@@ -1089,7 +1124,7 @@ export default defineComponent({
|
|
|
1089
1124
|
typeof col.field === 'function'
|
|
1090
1125
|
? col.field(row)
|
|
1091
1126
|
: row[col.field]
|
|
1092
|
-
return col.format
|
|
1127
|
+
return col.format ? col.format(val, row) : val
|
|
1093
1128
|
}
|
|
1094
1129
|
|
|
1095
1130
|
function resetVirtualScroll() {
|
|
@@ -1221,7 +1256,7 @@ export default defineComponent({
|
|
|
1221
1256
|
return data
|
|
1222
1257
|
}
|
|
1223
1258
|
|
|
1224
|
-
const hasLoadingSlot = computed(() => slots['loading']
|
|
1259
|
+
const hasLoadingSlot = computed(() => slots['loading'])
|
|
1225
1260
|
|
|
1226
1261
|
const paginationState = computed(() => {
|
|
1227
1262
|
return {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<script lang="ts">
|
|
19
19
|
import { defineComponent, getCurrentInstance, computed, ref } from 'vue-demi'
|
|
20
20
|
import { getColor } from '../../../../utils'
|
|
21
|
-
import { DlTooltip } from '../../../
|
|
21
|
+
import { DlTooltip } from '../../../shared'
|
|
22
22
|
import { useSizeObserver } from '../../../../hooks/use-size-observer'
|
|
23
23
|
|
|
24
24
|
export default defineComponent({
|
|
@@ -27,7 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
DlTooltip
|
|
28
28
|
},
|
|
29
29
|
props: {
|
|
30
|
-
props: { type: Object, default:
|
|
30
|
+
props: { type: Object, default: null },
|
|
31
31
|
autoWidth: Boolean,
|
|
32
32
|
noHover: Boolean,
|
|
33
33
|
bgColor: {
|
|
@@ -43,7 +43,7 @@ export default defineComponent({
|
|
|
43
43
|
const { hasEllipsis } = useSizeObserver(tableTd)
|
|
44
44
|
|
|
45
45
|
const hasOptionalProps = computed(() => {
|
|
46
|
-
return props.props
|
|
46
|
+
return !!props.props
|
|
47
47
|
})
|
|
48
48
|
|
|
49
49
|
const tdClasses = computed(() => {
|
|
@@ -74,11 +74,11 @@ export default defineComponent({
|
|
|
74
74
|
const column = computed(() => {
|
|
75
75
|
const name = vm.vnode.key as string
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
const colmap = props.props?.colsMap
|
|
78
|
+
? props.props.colsMap[name]
|
|
79
|
+
: null
|
|
80
|
+
|
|
81
|
+
return colmap ?? props.props?.col
|
|
82
82
|
})
|
|
83
83
|
|
|
84
84
|
if (!hasOptionalProps.value) {
|
|
@@ -90,7 +90,7 @@ export default defineComponent({
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
if (column.value
|
|
93
|
+
if (!column.value) {
|
|
94
94
|
return
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
<script lang="ts">
|
|
30
30
|
import { defineComponent, getCurrentInstance, computed, ref } from 'vue-demi'
|
|
31
31
|
import { useSizeObserver } from '../../../../hooks/use-size-observer'
|
|
32
|
-
import { DlIcon
|
|
32
|
+
import { DlIcon } from '../../../essential'
|
|
33
|
+
import { DlTooltip } from '../../../shared'
|
|
33
34
|
|
|
34
35
|
export default defineComponent({
|
|
35
36
|
name: 'DlTh',
|
|
@@ -38,7 +39,7 @@ export default defineComponent({
|
|
|
38
39
|
DlTooltip
|
|
39
40
|
},
|
|
40
41
|
props: {
|
|
41
|
-
props: { type: Object, default:
|
|
42
|
+
props: { type: Object, default: null },
|
|
42
43
|
autoWidth: Boolean
|
|
43
44
|
},
|
|
44
45
|
emits: ['click'],
|
|
@@ -15,41 +15,42 @@ export function useTableColumnSelection(
|
|
|
15
15
|
hasDraggableRows: ComputedRef<boolean>
|
|
16
16
|
) {
|
|
17
17
|
const colList = computed(() => {
|
|
18
|
-
if (props.columns
|
|
18
|
+
if (props.columns) {
|
|
19
19
|
return props.columns
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// we infer columns from first row
|
|
23
23
|
const row = props.rows[0]
|
|
24
|
+
const list: DlTableColumn[] = []
|
|
25
|
+
if (row) {
|
|
26
|
+
for (const key of Object.keys(row)) {
|
|
27
|
+
list.push({
|
|
28
|
+
name: key,
|
|
29
|
+
label: key.toUpperCase(),
|
|
30
|
+
field: key,
|
|
31
|
+
align: isNumber(row[key]) ? 'right' : 'left',
|
|
32
|
+
sortable: true
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
}
|
|
24
36
|
|
|
25
|
-
return
|
|
26
|
-
row !== void 0
|
|
27
|
-
? Object.keys(row).map((name) => ({
|
|
28
|
-
name,
|
|
29
|
-
label: name.toUpperCase(),
|
|
30
|
-
field: name,
|
|
31
|
-
align: isNumber(row[name]) ? 'right' : 'left',
|
|
32
|
-
sortable: true
|
|
33
|
-
}))
|
|
34
|
-
: []
|
|
35
|
-
) as DlTableColumn[]
|
|
37
|
+
return list
|
|
36
38
|
})
|
|
37
39
|
|
|
38
40
|
const computedCols = computed(() => {
|
|
39
41
|
const { sortBy, descending } = computedPagination.value
|
|
40
42
|
|
|
41
|
-
const cols =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
: colList.value
|
|
43
|
+
const cols = props.visibleColumns
|
|
44
|
+
? colList.value.filter(
|
|
45
|
+
(col) =>
|
|
46
|
+
col.required === true ||
|
|
47
|
+
props.visibleColumns.includes(col.name) === true
|
|
48
|
+
)
|
|
49
|
+
: colList.value
|
|
49
50
|
|
|
50
51
|
const updatedCols = cols.map((col) => {
|
|
51
52
|
const align = col.align || 'right'
|
|
52
|
-
const alignClass = `text-${align}`
|
|
53
|
+
const alignClass = ` text-${align}`
|
|
53
54
|
|
|
54
55
|
return {
|
|
55
56
|
...col,
|
|
@@ -57,30 +58,24 @@ export function useTableColumnSelection(
|
|
|
57
58
|
iconClass: `dl-table__sort-icon dl-table__sort-icon--${align}`,
|
|
58
59
|
thClass:
|
|
59
60
|
alignClass +
|
|
60
|
-
(col.headerClasses
|
|
61
|
-
? ' ' + col.headerClasses
|
|
62
|
-
: '') +
|
|
61
|
+
(col.headerClasses ? ' ' + col.headerClasses : '') +
|
|
63
62
|
(col.sortable === true ? ' sortable' : '') +
|
|
64
63
|
(col.name === sortBy
|
|
65
64
|
? ` sorted ${descending === true ? 'sort-desc' : ''}`
|
|
66
65
|
: ''),
|
|
67
66
|
|
|
68
|
-
tdStyle:
|
|
69
|
-
col.style !==
|
|
70
|
-
?
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
: () => '',
|
|
67
|
+
tdStyle: col.style
|
|
68
|
+
? typeof col.style !== 'function'
|
|
69
|
+
? () => col.style
|
|
70
|
+
: col.style
|
|
71
|
+
: () => '',
|
|
74
72
|
|
|
75
|
-
tdClass:
|
|
76
|
-
col.classes !==
|
|
77
|
-
?
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
' ' +
|
|
82
|
-
(col.classes as Function)(row)
|
|
83
|
-
: () => alignClass
|
|
73
|
+
tdClass: col.classes
|
|
74
|
+
? typeof col.classes !== 'function'
|
|
75
|
+
? () => alignClass + ' ' + col.classes
|
|
76
|
+
: (row: DlTableRow) =>
|
|
77
|
+
alignClass + ' ' + (col.classes as Function)(row)
|
|
78
|
+
: () => alignClass
|
|
84
79
|
}
|
|
85
80
|
})
|
|
86
81
|
|
|
@@ -96,7 +91,7 @@ export function useTableColumnSelection(
|
|
|
96
91
|
})
|
|
97
92
|
|
|
98
93
|
const computedColspan = computed(() => {
|
|
99
|
-
return props.tableColspan
|
|
94
|
+
return props.tableColspan
|
|
100
95
|
? props.tableColspan
|
|
101
96
|
: computedCols.value.length +
|
|
102
97
|
(hasSelectionMode.value === true ? 1 : 0) +
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { computed, watch, nextTick } from 'vue-demi'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
DlTableProps,
|
|
4
|
+
DlTableFilterMethod,
|
|
5
|
+
DlTableRow,
|
|
6
|
+
DlTableFilter,
|
|
7
|
+
DlTableColumn
|
|
8
|
+
} from '../types'
|
|
3
9
|
|
|
4
10
|
export const useTableFilterProps = {
|
|
5
11
|
filter: [String, Object],
|
|
@@ -7,26 +13,32 @@ export const useTableFilterProps = {
|
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
export function useTableFilter(props: any, setPagination: Function) {
|
|
10
|
-
const computedFilterMethod = computed(
|
|
11
|
-
()
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
const computedFilterMethod = computed(() => {
|
|
17
|
+
if (props.filterMethod) {
|
|
18
|
+
return props.filterMethod
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const tableFilter: DlTableFilterMethod = (
|
|
22
|
+
rows: DlTableRow[],
|
|
23
|
+
filterTerms: DlTableFilter,
|
|
24
|
+
cols: DlTableColumn[],
|
|
25
|
+
cellValue: (col: DlTableColumn, row: DlTableRow) => any
|
|
26
|
+
) => {
|
|
27
|
+
const lowerTerms = filterTerms ? filterTerms.toLowerCase() : ''
|
|
28
|
+
return rows.filter((row) =>
|
|
29
|
+
cols.some((col) => {
|
|
30
|
+
const val = cellValue(col, row) + ''
|
|
31
|
+
const haystack =
|
|
32
|
+
val === 'undefined' || val === 'null'
|
|
33
|
+
? ''
|
|
34
|
+
: val.toLowerCase()
|
|
35
|
+
return haystack.indexOf(lowerTerms) !== -1
|
|
36
|
+
})
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return tableFilter
|
|
41
|
+
})
|
|
30
42
|
|
|
31
43
|
watch(
|
|
32
44
|
() => props.filter,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNumber } from 'lodash'
|
|
1
2
|
import {
|
|
2
3
|
ref,
|
|
3
4
|
computed,
|
|
@@ -33,7 +34,7 @@ function fixPagination(p: TablePagination) {
|
|
|
33
34
|
if (p.page < 1) {
|
|
34
35
|
p.page = 1
|
|
35
36
|
}
|
|
36
|
-
if (p.rowsPerPage
|
|
37
|
+
if (isNumber(p.rowsPerPage) && p.rowsPerPage < 1) {
|
|
37
38
|
p.rowsPerPage = 0
|
|
38
39
|
}
|
|
39
40
|
return p
|
|
@@ -61,10 +62,11 @@ export function useTablePaginationState(
|
|
|
61
62
|
sortBy: null,
|
|
62
63
|
descending: false,
|
|
63
64
|
page: 1,
|
|
64
|
-
rowsPerPage:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
rowsPerPage: props.virtualScroll
|
|
66
|
+
? 0
|
|
67
|
+
: props.rowsPerPageOptions.length > 0
|
|
68
|
+
? props.rowsPerPageOptions[0]
|
|
69
|
+
: 5,
|
|
68
70
|
min: 1,
|
|
69
71
|
maxPages: 0,
|
|
70
72
|
boundaryNumbers: true,
|
|
@@ -74,7 +76,9 @@ export function useTablePaginationState(
|
|
|
74
76
|
itemsName: 'Rows',
|
|
75
77
|
withLegend: true,
|
|
76
78
|
withRowsPerPage: true,
|
|
77
|
-
rowsPerPageOptions: props.
|
|
79
|
+
rowsPerPageOptions: props.virtualScroll
|
|
80
|
+
? [0]
|
|
81
|
+
: props.rowsPerPageOptions
|
|
78
82
|
},
|
|
79
83
|
props.pagination
|
|
80
84
|
)
|
|
@@ -89,13 +93,12 @@ export function useTablePaginationState(
|
|
|
89
93
|
)
|
|
90
94
|
|
|
91
95
|
const computedPagination = computed(() => {
|
|
92
|
-
const pag =
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
: innerPagination.value
|
|
96
|
+
const pag = props['onUpdate:pagination']
|
|
97
|
+
? {
|
|
98
|
+
...innerPagination.value,
|
|
99
|
+
...props.pagination
|
|
100
|
+
}
|
|
101
|
+
: innerPagination.value
|
|
99
102
|
|
|
100
103
|
return fixPagination(pag)
|
|
101
104
|
})
|
|
@@ -120,10 +123,7 @@ export function useTablePaginationState(
|
|
|
120
123
|
return
|
|
121
124
|
}
|
|
122
125
|
|
|
123
|
-
if (
|
|
124
|
-
props.pagination !== void 0 &&
|
|
125
|
-
props['onUpdate:pagination'] !== void 0
|
|
126
|
-
) {
|
|
126
|
+
if (props.pagination && props['onUpdate:pagination']) {
|
|
127
127
|
emit('update:pagination', newPagination)
|
|
128
128
|
} else {
|
|
129
129
|
innerPagination.value = newPagination
|
|
@@ -221,7 +221,7 @@ export function useTablePagination(
|
|
|
221
221
|
}
|
|
222
222
|
})
|
|
223
223
|
|
|
224
|
-
if (props['onUpdate:pagination']
|
|
224
|
+
if (props['onUpdate:pagination']) {
|
|
225
225
|
emit('update:pagination', { ...computedPagination.value })
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isUndefined } from 'lodash'
|
|
1
2
|
import { ref, watch } from 'vue-demi'
|
|
2
3
|
|
|
3
4
|
function getVal(val: string[]) {
|
|
@@ -25,7 +26,7 @@ export function useTableRowExpand(props: any, emit: Function) {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
function setExpanded(val: string[]) {
|
|
28
|
-
if (props.expanded !==
|
|
29
|
+
if (props.expanded !== null && !isUndefined(props.expanded)) {
|
|
29
30
|
emit('update:expanded', val)
|
|
30
31
|
} else {
|
|
31
32
|
innerExpanded.value = val
|