add package-lock.json

This commit is contained in:
KarimTamani
2025-08-19 20:25:52 +01:00
parent cff1cce906
commit ed19a5dc9b
5 changed files with 18937 additions and 14 deletions
+1 -2
View File
@@ -25,8 +25,7 @@ dist-ssr
pnpm-lock.yaml
yarn.lock
package-lock.json
yarn.lock
bun.lockb
vite.config.ts.timestamp-*
+18922
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -10,7 +10,7 @@ import "./index.css";
import "./i18/index.ts";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<React.StrictMode>
<BrowserRouter>
<Provider>
<App />
+4 -3
View File
@@ -83,7 +83,7 @@ const Table: React.FC<NodeProps<TableProps>> = (props) => {
return (
<Card className={cn(
"w-full h-full bg-background rounded-md overflow-visible dark:bg-background-50 dark:ring-divider",
"w-full h-full bg-background rounded-md ring-1 ring-default-600 overflow-visible dark:bg-background-50 dark:ring-divider",
selected
? 'ring-2 ring-primary dark:ring-primary'
: '',
@@ -97,8 +97,9 @@ const Table: React.FC<NodeProps<TableProps>> = (props) => {
? 'scale-110'
: '',
)}
shadow="sm"
>
shadow="none"
>
<div className="px-[1px] ">
<div
className=" border-t-[4px] rounded-t-[6px] border-primary"
@@ -24,7 +24,7 @@ import DatabaseHotkeysProvider from "../database-hotkeys/database-hotkeys-provid
interface Props { children: React.ReactNode }
const DatabaseProvider: React.FC<Props> = ({ children }) => {
const [currentDatabaseId, setCurrentDatabaseId] = useState<string | undefined>(localStorage.getItem("database_id") as string | undefined);
// Fetch all databases
const { data: databases, isLoading: loadingDatabases } = useQuery(toCompilableQuery(
@@ -34,7 +34,7 @@ const DatabaseProvider: React.FC<Props> = ({ children }) => {
));
// Fetch the current database with nested tables, fields, and relationships
let { data: database, isLoading: loadingCurrentDatabase } = useQuery(
let { data: database, isLoading: loadingCurrentDatabase } = useQuery(
toCompilableQuery(
db.query.databases.findMany({
where: (databases, { eq }) => eq(databases.id, currentDatabaseId as string),
@@ -88,7 +88,8 @@ const DatabaseProvider: React.FC<Props> = ({ children }) => {
database = undefined as any;
// Fetch all data types
let { data: data_types, isLoading: loadingDataTypes } = useQuery(toCompilableQuery(
// Fetch all data types
let { data: data_types, isLoading: loadingDataTypes, isFetching: fetchingDatatypes } = useQuery(toCompilableQuery(
db.query.data_types.findMany({
where: (data_types, { eq }) => eq(data_types.dialect, (database as any)?.dialect)
})
@@ -99,7 +100,7 @@ const DatabaseProvider: React.FC<Props> = ({ children }) => {
}, [data_types]);
const isLoading: boolean = loadingDataTypes || loadingDatabases || loadingCurrentDatabase;
const isSwitchingDatabase: boolean = useMemo(() => {
return isLoading && currentDatabaseId != (database as any)?.id
}, [currentDatabaseId, database, isLoading]);
@@ -315,7 +316,7 @@ const DatabaseProvider: React.FC<Props> = ({ children }) => {
tx.insert(fields).values(Object.values(operation.table.fields))
);
}
if (operation.table.indices && Object.values(operation.table.indices).length > 0) {
if (operation.table.indices && Object.values(operation.table.indices).length > 0) {
const indexes = Object.values(operation.table.indices);
for (const index of indexes) {
operations.push(tx.insert(indices).values(index));
@@ -377,7 +378,7 @@ const DatabaseProvider: React.FC<Props> = ({ children }) => {
}
else if (operation.type == "DELETE_INDEX") {
operations.push(
deleteIndicesWithCascade([operation.indexId ] , tx)
deleteIndicesWithCascade([operation.indexId], tx)
);
}
else if (operation.type == "UPDATE_INDEX") {
@@ -520,9 +521,9 @@ const DatabaseProvider: React.FC<Props> = ({ children }) => {
databases: databases as DatabaseType[],
isLoading,
isSwitchingDatabase,
getField,
}}>
<DatabaseOperationsContext.Provider value={databaseOpsValue}>
<DatabaseHistoryProvider>