mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Bump supabase grid to 2.3.7 (#4120)
* Bump supabase grid to 2.3.7 * Add some small fixes and bump grid to 2.3.8
This commit is contained in:
1 parent
eb29d36cd7
commit
2abe7302cc
5 files changed
+14
-23
No files matched your search
+2
-10
@@ -6,7 +6,7 @@ import JsonEditor from './JsonCodeEditor'
|
||||
import TwoOptionToggle from './TwoOptionToggle'
|
||||
import DrilldownViewer from './DrilldownViewer'
|
||||
import ActionBar from '../../ActionBar'
|
||||
import { minifyJSON, prettifyJSON } from 'lib/helpers'
|
||||
import { minifyJSON, prettifyJSON, tryParseJson } from 'lib/helpers'
|
||||
|
||||
type JsonEditProps = {
|
||||
column: string
|
||||
@@ -104,7 +104,7 @@ type ViewerProps = {
|
||||
}
|
||||
|
||||
const Viewer: FC<ViewerProps> = ({ column, value }) => {
|
||||
const json = parseJSON(value)
|
||||
const json = tryParseJson(value)
|
||||
return (
|
||||
<>
|
||||
<Typography.Title level={4}>Viewing JSON Field: {column}</Typography.Title>
|
||||
@@ -112,11 +112,3 @@ const Viewer: FC<ViewerProps> = ({ column, value }) => {
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const parseJSON = (value: string) => {
|
||||
try {
|
||||
return JSON.parse(value)
|
||||
} catch (err) {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -3,7 +3,7 @@ import { find, isUndefined, compact, includes, isEqual, omitBy, isNull, isString
|
||||
import { Dictionary } from '@supabase/grid'
|
||||
import { PostgresTable } from '@supabase/postgres-meta'
|
||||
|
||||
import { uuidv4, minifyJSON } from 'lib/helpers'
|
||||
import { uuidv4, minifyJSON, tryParseJson } from 'lib/helpers'
|
||||
import { RowField } from './RowEditor.types'
|
||||
import { JSON_TYPES, NUMERICAL_TYPES } from '../SidePanelEditor.constants'
|
||||
|
||||
@@ -232,7 +232,7 @@ export const generateRowObjectFromFields = (
|
||||
rowObject[field.name] = value
|
||||
} else {
|
||||
if (isString(value)) {
|
||||
rowObject[field.name] = JSON.parse(value)
|
||||
rowObject[field.name] = tryParseJson(value)
|
||||
}
|
||||
}
|
||||
} else if (NUMERICAL_TYPES.includes(field.format) && value) {
|
||||
|
||||
Generated
+7
-7
@@ -13,7 +13,7 @@
|
||||
"@radix-ui/react-portal": "^0.1.1",
|
||||
"@sentry/browser": "^6.15.0",
|
||||
"@sentry/nextjs": "^6.15.0",
|
||||
"@supabase/grid": "^2.3.5",
|
||||
"@supabase/grid": "^2.3.8",
|
||||
"@supabase/postgres-meta": "^0.26.1",
|
||||
"@supabase/react-data-grid": "^7.1.0-beta.7",
|
||||
"@supabase/supabase-js": "^1.27.0",
|
||||
@@ -1490,9 +1490,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@supabase/grid": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/grid/-/grid-2.3.5.tgz",
|
||||
"integrity": "sha512-ABh4Hm3m9WJEg7VEB3KG2GRCgnvLnl+qF+GEDEUe41ESSW1CaD4qhpcFDBXp5s4MrCm1Qkunr54fVhuNhtH73g==",
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/grid/-/grid-2.3.8.tgz",
|
||||
"integrity": "sha512-QZltcW761vuwkGeUda21W4KVfZj0c7O6sXKq75Iu4m5GnPJ7mGduklTSibfCXHPriCHg9kWW76GFnYW9oPebSw==",
|
||||
"dependencies": {
|
||||
"@monaco-editor/react": "^4.3.1",
|
||||
"@scaleleap/pg-format": "^1.0.0",
|
||||
@@ -9535,9 +9535,9 @@
|
||||
}
|
||||
},
|
||||
"@supabase/grid": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/grid/-/grid-2.3.5.tgz",
|
||||
"integrity": "sha512-ABh4Hm3m9WJEg7VEB3KG2GRCgnvLnl+qF+GEDEUe41ESSW1CaD4qhpcFDBXp5s4MrCm1Qkunr54fVhuNhtH73g==",
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/grid/-/grid-2.3.8.tgz",
|
||||
"integrity": "sha512-QZltcW761vuwkGeUda21W4KVfZj0c7O6sXKq75Iu4m5GnPJ7mGduklTSibfCXHPriCHg9kWW76GFnYW9oPebSw==",
|
||||
"requires": {
|
||||
"@monaco-editor/react": "^4.3.1",
|
||||
"@scaleleap/pg-format": "^1.0.0",
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
"@radix-ui/react-portal": "^0.1.1",
|
||||
"@sentry/browser": "^6.15.0",
|
||||
"@sentry/nextjs": "^6.15.0",
|
||||
"@supabase/grid": "^2.3.5",
|
||||
"@supabase/grid": "^2.3.8",
|
||||
"@supabase/postgres-meta": "^0.26.1",
|
||||
"@supabase/react-data-grid": "^7.1.0-beta.7",
|
||||
"@supabase/supabase-js": "^1.27.0",
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { NextPage } from 'next'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { isUndefined, isNil } from 'lodash'
|
||||
import { isUndefined } from 'lodash'
|
||||
import { PostgresTable } from '@supabase/postgres-meta'
|
||||
|
||||
import { tryParseJson } from 'lib/helpers'
|
||||
import { useStore, withAuth } from 'hooks'
|
||||
import { TableEditorLayout } from 'components/layouts'
|
||||
import { EmptyState, SidePanelEditor } from 'components/interfaces/TableGridEditor'
|
||||
|
||||
Reference in new issue
Block a user