Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/shared/schema/bi/types/datasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,20 @@ export type GetDataSetFieldsByIdArgs = WorkbookIdArg & {
};

type CreateDatasetBaseArgs = {
dataset: Dataset['dataset'];
dataset: Partial<Dataset['dataset']>;
name: string;
created_via?: string;
};

type CreateDirDatasetArgs = CreateDatasetBaseArgs & {
export type CreateDirDatasetArgs = CreateDatasetBaseArgs & {
dir_path: string;
};

type CreateWorkbookDatsetArgs = CreateDatasetBaseArgs & {
export type CreateWorkbookDatasetArgs = CreateDatasetBaseArgs & {
workbook_id: string;
};

export type CreateDatasetArgs = CreateDirDatasetArgs | CreateWorkbookDatsetArgs;
export type CreateDatasetArgs = CreateDirDatasetArgs | CreateWorkbookDatasetArgs;

export type CreateDatasetResponse = Id & DatasetWithOptions;

Expand All @@ -222,7 +222,7 @@ export type UpdateDatasetResponse = DatasetWithOptions;
export type UpdateDatasetArgs = {
version: DatasetVersion;
data: {
dataset: Dataset['dataset'];
dataset: Partial<Dataset['dataset']>;
};
} & DatasetId;

Expand Down
2 changes: 1 addition & 1 deletion src/shared/types/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export interface DatasetOptions {
}[];
max: number;
};
source_listing: {
source_listing?: {
supports_source_search: boolean;
supports_source_pagination: boolean;
supports_db_name_listing: boolean;
Expand Down
4 changes: 3 additions & 1 deletion src/ui/store/actions/editHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ interface ResetEditHistoryUnitAction {
unitId: string;
}

export function resetEditHistoryUnit({unitId}: Omit<ResetEditHistoryUnitAction, 'type'>) {
export function resetEditHistoryUnit({
unitId,
}: Omit<ResetEditHistoryUnitAction, 'type'>): ResetEditHistoryUnitAction {
return {
type: RESET_EDIT_HISTORY_UNIT,
unitId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function TabSwitch(props: TabSwitchProps) {
<RadioButton
qa={DatasetPanelQA.TabRadio}
value={tab}
onChange={(e) => switchTab(e.target.value)}
onUpdate={(value) => switchTab(value)}
>
{tabs.map(({value, label, disabled}) => (
<RadioButton.Option
Expand All @@ -57,7 +57,7 @@ type DatasetPanelProps = StateProps & {
isCreationProcess: boolean;
previewEnabled: boolean;
tab: DatasetTab;
switchTab: (tab: string) => void;
switchTab: (tab: DatasetTab) => void;
refreshSources: () => void;
openDialogFieldEditor: () => void;
togglePreview: () => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';

import {I18n} from '../../../../../i18n';
import type {CreateDatasetResponse} from '../../../../../shared/schema/types';
import type {
DialogCreateWorkbookEntryProps,
EntryDialogBaseProps,
Expand All @@ -17,18 +16,19 @@ type DialogCreateDatasetBaseProps = {
visible: boolean;
};

type DialogCreateDatasetInNavigationProps = {
onApply: EntryDialogBaseProps<CreateDatasetResponse>['onApply'];
export type DialogCreateDatasetInNavigationProps = {
onApply: EntryDialogBaseProps<void>['onApply'];
creationScope: 'navigation';
};

type DialogCreateDatasetInWorkbookProps = {
onApply: DialogCreateWorkbookEntryProps<CreateDatasetResponse>['onApply'];
export type DialogCreateDatasetInWorkbookProps = {
onApply: DialogCreateWorkbookEntryProps<void>['onApply'];
creationScope: 'workbook';
};

type DialogCreateDatasetProps = DialogCreateDatasetBaseProps &
(DialogCreateDatasetInNavigationProps | DialogCreateDatasetInWorkbookProps);
export type DialogCreateDatasetProps =
| (DialogCreateDatasetBaseProps & DialogCreateDatasetInNavigationProps)
| (DialogCreateDatasetBaseProps & DialogCreateDatasetInWorkbookProps);

const DialogCreateDataset = (props: DialogCreateDatasetProps) => {
const {visible, onClose} = props;
Expand Down
4 changes: 2 additions & 2 deletions src/ui/units/datasets/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {i18n} from 'i18n';
import type {EntryScope} from 'shared';
import type {EntryScope, WorkbookId} from 'shared';
import {DL} from 'ui';

import {getFakeEntry as genericGetFakeEntry} from '../../../components/ActionPanel';
Expand Down Expand Up @@ -50,7 +50,7 @@ export const getAppMetricGroupNameI18n = (key: string) => _getSelectItemTitle()[

export const getFakeEntry = (
scope: EntryScope.Connection | EntryScope.Dataset,
workbookId?: string,
workbookId?: WorkbookId,
searchCurrentPath?: string,
) => {
let path = searchCurrentPath || DL.USER_FOLDER;
Expand Down
Loading
Loading