mirror of https://github.com/buster-so/buster.git
create layouts namespace
This commit is contained in:
parent
71f4eea5f3
commit
093860cbe1
|
@ -1,4 +1,4 @@
|
|||
import { AppAssetCheckLayout } from '@appLayouts/AppAssetCheckLayout';
|
||||
import { AppAssetCheckLayout } from '@layouts/AppAssetCheckLayout';
|
||||
|
||||
export default function DashboardPage({
|
||||
params: { dashboardId }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MetricController } from '@appControllers/MetricController';
|
||||
import { AppAssetCheckLayout } from '@appLayouts/AppAssetCheckLayout';
|
||||
import { AppAssetCheckLayout } from '@layouts/AppAssetCheckLayout';
|
||||
|
||||
export default function Page({
|
||||
params: { chatId, metricId }
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { DashboardController } from '@appControllers/DashboardController';
|
||||
import { AppAssetCheckLayout } from '@/app/app/_layouts/AppAssetCheckLayout';
|
||||
import { AppAssetCheckLayout } from '@layouts/AppAssetCheckLayout';
|
||||
|
||||
export default function Page({ params: { dashboardId } }: { params: { dashboardId: string } }) {
|
||||
return (
|
||||
// <AppAssetCheckLayout dashboardId={dashboardId} type="dashboard">
|
||||
<DashboardController dashboardId={dashboardId} />
|
||||
// </AppAssetCheckLayout>
|
||||
<AppAssetCheckLayout dashboardId={dashboardId} type="dashboard">
|
||||
<DashboardController dashboardId={dashboardId} />
|
||||
</AppAssetCheckLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MetricController } from '@appControllers/MetricController';
|
||||
import { AppAssetCheckLayout } from '@appLayouts/AppAssetCheckLayout';
|
||||
import { AppAssetCheckLayout } from '@layouts/AppAssetCheckLayout';
|
||||
|
||||
export default function MetricPage({
|
||||
params: { metricId },
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import React, { useState } from 'react';
|
||||
import { useBusterDashboardIndividual } from '@/context/Dashboards';
|
||||
import { FileIndeterminateLoader } from '@appComponents/FileIndeterminateLoader';
|
||||
import { DashboardFileView, useChatLayoutContextSelector } from '@appLayouts/ChatLayout';
|
||||
import { DashboardFileView, useChatLayoutContextSelector } from '@layouts/ChatLayout';
|
||||
import { DashboardViewComponents } from './config';
|
||||
import { AddTypeModal } from '../../_components/AddTypeModal';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { DashboardFileView } from '../../_layouts/ChatLayout';
|
||||
import type { DashboardFileView } from '@chatLayout/ChatLayoutContext';
|
||||
import { DashboardViewDashboardController } from './DashboardViewDashboardController';
|
||||
import { DashboardViewFileController } from './DashboardViewFileController';
|
||||
import React from 'react';
|
||||
|
|
|
@ -4,7 +4,7 @@ import React from 'react';
|
|||
import {
|
||||
MetricFileView,
|
||||
useChatLayoutContextSelector
|
||||
} from '@appLayouts/ChatLayout/ChatLayoutContext';
|
||||
} from '@layouts/ChatLayout/ChatLayoutContext';
|
||||
import { MetricViewComponents } from './config';
|
||||
import { useMetricIndividual } from '@/context/Metrics';
|
||||
import { FileIndeterminateLoader } from '@appComponents/FileIndeterminateLoader';
|
||||
|
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import { Text } from '@/components/text';
|
||||
import { Button } from 'antd';
|
||||
import { AppMaterialIcons } from '@/components/icons';
|
||||
import { useChatLayoutContextSelector } from '@/app/app/_layouts/ChatLayout';
|
||||
import { useChatLayoutContextSelector } from '@chatLayout/ChatLayoutContext';
|
||||
|
||||
export const MetricEditControllerHeader: React.FC = React.memo(() => {
|
||||
const { styles, cx } = useStyles();
|
||||
|
|
|
@ -4,7 +4,7 @@ import { AppSplitter, AppSplitterRef } from '@/components/layout';
|
|||
import { MetricViewChart } from './MetricViewChart';
|
||||
import { MetricEditController } from './MetricEditController';
|
||||
import { useMetricLayout } from '../useMetricLayout';
|
||||
import { useChatLayoutContextSelector } from '@appLayouts/ChatLayout';
|
||||
import { useChatLayoutContextSelector } from '@layouts/ChatLayout';
|
||||
|
||||
const autoSaveId = 'metric-edit-chart';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useMemoizedFn, useUnmount } from 'ahooks';
|
|||
import { IDataResult } from '@/api/asset_interfaces';
|
||||
import { useMetricLayout } from '../useMetricLayout';
|
||||
import { AppSplitterRef } from '@/components';
|
||||
import { useChatLayoutContextSelector } from '@/app/app/_layouts/ChatLayout';
|
||||
import { useChatLayoutContextSelector } from '@chatLayout/ChatLayoutContext';
|
||||
import { useSQLContextSelector } from '@/context/SQL';
|
||||
|
||||
const autoSaveId = 'metric-view-results';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import type { MetricFileView } from '@/app/app/_layouts/ChatLayout';
|
||||
import type { MetricFileView } from '@chatLayout/ChatLayoutContext';
|
||||
import { MetricViewChartController } from './MetricViewChart';
|
||||
import { MetricViewFile } from './MetricViewFile';
|
||||
import { MetricViewResults } from './MetricViewResults';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
import React from 'react';
|
||||
import { useChatIndividualContextSelector } from '../../_layouts/ChatLayout/ChatContext';
|
||||
import { useChatIndividualContextSelector } from '@chatLayout/ChatContext';
|
||||
import { ReasoningMessageContainer } from './ReasoningMessageContainer';
|
||||
import { useMessageIndividual } from '@/context/Chats';
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { FileType } from '@/api/asset_interfaces';
|
||||
import { createChatAssetRoute } from '@appLayouts/ChatLayout/ChatLayoutContext/helpers';
|
||||
import { createChatAssetRoute } from '@layouts/ChatLayout/ChatLayoutContext/helpers';
|
||||
import { AppTooltip } from '@/components/tooltip';
|
||||
import { AppMaterialIcons } from '@/components/icons';
|
||||
import { Button } from 'antd';
|
||||
import React from 'react';
|
||||
import { useChatLayoutContextSelector } from '@/app/app/_layouts/ChatLayout';
|
||||
import { useChatLayoutContextSelector } from '@chatLayout/ChatLayoutContext';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
|
||||
export const ReasoningFileButtons = React.memo(
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
import { useBusterStylesContext } from '@/context/BusterStyles';
|
||||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { itemAnimationConfig } from '../animationConfig';
|
||||
import { LoaderDot } from './LoaderDot';
|
||||
import { ReasoningFileButtons } from './ReasoningFileButtons';
|
||||
import { ReasoningFileTitle } from './ReasoningFileTitle';
|
||||
|
|
|
@ -5,7 +5,7 @@ import { AnimatePresence, motion } from 'framer-motion';
|
|||
import { useMemoizedFn } from 'ahooks';
|
||||
import { AppPopover } from '@/components';
|
||||
import { PopoverProps } from 'antd';
|
||||
import { isOpenableFile, SelectedFile, useChatLayoutContextSelector } from '@appLayouts/ChatLayout';
|
||||
import { isOpenableFile, SelectedFile, useChatLayoutContextSelector } from '@layouts/ChatLayout';
|
||||
|
||||
const duration = 0.25;
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import React from 'react';
|
||||
import { getAssetCheck } from '@/api/buster_rest/assets/requests';
|
||||
import { useSupabaseServerContext } from '@/context/Supabase/useSupabaseContext';
|
||||
import { AppPasswordAccess } from '../_controllers/AppPasswordAccess';
|
||||
import { AppNoPageAccess } from '../_controllers/AppNoPageAccess';
|
||||
import { ShareAssetType } from '@/api/asset_interfaces';
|
||||
import { useBusterSupabaseAuthMethods } from '@/hooks/useBusterSupabaseAuthMethods';
|
||||
import { ClientSideAnonCheck } from './ClientSideAnonCheck';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { BusterRoutes, createBusterRoute } from '@/routes';
|
||||
import { AppPasswordAccess } from '@/app/app/_controllers/AppPasswordAccess';
|
||||
import { AppNoPageAccess } from '@/app/app/_controllers/AppNoPageAccess';
|
||||
|
||||
export type AppAssetCheckLayoutProps = {
|
||||
metricId?: string;
|
|
@ -1,4 +1,4 @@
|
|||
import { SelectedFile } from '@appLayouts/ChatLayout';
|
||||
import { SelectedFile } from '@layouts/ChatLayout';
|
||||
import { useBusterDashboardContextSelector } from '@/context/Dashboards';
|
||||
import { useBusterMetricsIndividualContextSelector, useMetricIndividual } from '@/context/Metrics';
|
||||
import { useEffect, useMemo } from 'react';
|
|
@ -20,6 +20,5 @@ export type ValueFileView = 'file';
|
|||
export type DatasetFileView = 'file';
|
||||
export type CollectionFileView = 'file' | 'results';
|
||||
export type ReasoningFileView = 'reasoning';
|
||||
|
||||
export type FileViewSecondary = null | MetricFileViewSecondary;
|
||||
export type MetricFileViewSecondary = 'chart-edit' | 'sql-edit';
|
|
@ -22,9 +22,9 @@
|
|||
"@/*": ["./src/*"],
|
||||
"@utils/*": ["./src/utils/*"],
|
||||
"@appComponents/*": ["./src/app/app/_components/*"],
|
||||
"@appLayouts/*": ["./src/app/app/_layouts/*"],
|
||||
"@layouts/*": ["./src/layouts/*"],
|
||||
"@appControllers/*": ["./src/app/app/_controllers/*"],
|
||||
"@chatLayout/*": ["./src/app/app/_layouts/ChatLayout/*"]
|
||||
"@chatLayout/*": ["./src/layouts/ChatLayout/*"]
|
||||
},
|
||||
"target": "ES2017"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue