From 78b915b7bdb72c70272b77f72ffa927b418ab09b Mon Sep 17 00:00:00 2001 From: Leto Date: Thu, 12 Dec 2024 18:29:45 +0800 Subject: [PATCH 01/13] refactor(dashboard): misc --- .../viz-components/pie-chart/index.tsx | 43 +++---------------- .../pie-chart/migrators/index.ts | 37 ++++++++++++++++ 2 files changed, 42 insertions(+), 38 deletions(-) create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx index 566cec407..a7bd582fc 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx @@ -6,44 +6,11 @@ import { DEFAULT_CONFIG, IPieChartConf } from './type'; import { cloneDeep } from 'lodash'; import { ClickPieChart } from './triggers'; import { translation } from './translation'; - -function v2(legacyConf: $TSFixMe): IPieChartConf { - const { color_field = '', ...rest } = legacyConf; - return { - ...rest, - color_field, - }; -} - -function v3(legacyConf: any, { panelModel }: IMigrationEnv): IPieChartConf { - try { - const queryID = panelModel.queryIDs[0]; - if (!queryID) { - throw new Error('cannot migrate when queryID is empty'); - } - const changeKey = (key: string) => (key ? `${queryID}.${key}` : key); - const { label_field, value_field, color_field } = legacyConf; - return { - label_field: changeKey(label_field), - value_field: changeKey(value_field), - color_field: changeKey(color_field), - } as any; - } catch (error) { - console.error('[Migration failed]', error); - throw error; - } -} -function v4(legacyConf: any): IPieChartConf { - const { radius = ['50%', '80%'], ...rest } = legacyConf; - return { - ...rest, - radius, - }; -} +import * as Migrators from './migrators'; class VizPieChartMigrator extends VersionBasedMigrator { configVersions(): void { - this.version(1, (data: $TSFixMe) => { + this.version(1, (data) => { return { version: 1, config: data, @@ -53,21 +20,21 @@ class VizPieChartMigrator extends VersionBasedMigrator { return { ...data, version: 2, - config: v2(data.config), + config: Migrators.v2(data.config), }; }); this.version(3, (data, env) => { return { ...data, version: 3, - config: v3(data.config, env), + config: Migrators.v3(data.config, env), }; }); this.version(4, (data) => { return { ...data, version: 4, - config: v4(data.config), + config: Migrators.v4(data.config), }; }); } diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts b/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts new file mode 100644 index 000000000..91061daa3 --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts @@ -0,0 +1,37 @@ +import { IMigrationEnv } from '~/components/plugins/plugin-data-migrator'; +import { IPieChartConf } from '../type'; + +export function v2(legacyConf: $TSFixMe): IPieChartConf { + const { color_field = '', ...rest } = legacyConf; + return { + ...rest, + color_field, + }; +} + +export function v3(legacyConf: any, { panelModel }: IMigrationEnv): IPieChartConf { + try { + const queryID = panelModel.queryIDs[0]; + if (!queryID) { + throw new Error('cannot migrate when queryID is empty'); + } + const changeKey = (key: string) => (key ? `${queryID}.${key}` : key); + const { label_field, value_field, color_field } = legacyConf; + return { + label_field: changeKey(label_field), + value_field: changeKey(value_field), + color_field: changeKey(color_field), + } as any; + } catch (error) { + console.error('[Migration failed]', error); + throw error; + } +} + +export function v4(legacyConf: any): IPieChartConf { + const { radius = ['50%', '80%'], ...rest } = legacyConf; + return { + ...rest, + radius, + }; +} From 78ab679a1bccdc43845ca4db79365288bdccfb40 Mon Sep 17 00:00:00 2001 From: Leto Date: Thu, 12 Dec 2024 18:31:25 +0800 Subject: [PATCH 02/13] =?UTF-8?q?feat(dashboard):=20add=20color.map=20to?= =?UTF-8?q?=20piechart=E2=80=99s=20conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/viz-components/pie-chart/index.tsx | 11 +++++++++-- .../viz-components/pie-chart/migrators/index.ts | 11 +++++++++++ .../plugins/viz-components/pie-chart/type.ts | 6 ++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx index a7bd582fc..d500ca0dc 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/index.tsx @@ -37,8 +37,15 @@ class VizPieChartMigrator extends VersionBasedMigrator { config: Migrators.v4(data.config), }; }); + this.version(5, (data) => { + return { + ...data, + version: 5, + config: Migrators.v5(data.config), + }; + }); } - readonly VERSION = 4; + readonly VERSION = 5; } export const PieChartVizComponent: VizComponent = { @@ -50,7 +57,7 @@ export const PieChartVizComponent: VizComponent = { configRender: VizPieChartEditor, createConfig() { return { - version: 4, + version: 5, config: cloneDeep(DEFAULT_CONFIG) as IPieChartConf, }; }, diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts b/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts index 91061daa3..b7f37a253 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts @@ -35,3 +35,14 @@ export function v4(legacyConf: any): IPieChartConf { radius, }; } + +export function v5(legacyConf: any): IPieChartConf { + const { color, ...rest } = legacyConf; + return { + ...rest, + color: { + ...color, + map: color.map ?? [], + }, + }; +} diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/type.ts b/dashboard/src/components/plugins/viz-components/pie-chart/type.ts index a9075847e..aa5888008 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/type.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/type.ts @@ -3,6 +3,9 @@ export interface IPieChartConf { value_field: TDataKey; color_field: TDataKey; radius: [string, string]; + color: { + map: { name: string; color: string }[]; + }; } export const DEFAULT_CONFIG: IPieChartConf = { @@ -10,4 +13,7 @@ export const DEFAULT_CONFIG: IPieChartConf = { value_field: '', color_field: '', radius: ['50%', '80%'], + color: { + map: [], + }, }; From 214995f5cd76b1eec6d15006345afc8dfd418c53 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 13:28:29 +0800 Subject: [PATCH 03/13] fix(dashboard): migrator error of piechart --- .../plugins/viz-components/pie-chart/migrators/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts b/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts index b7f37a253..8d57685c0 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/migrators/index.ts @@ -37,7 +37,7 @@ export function v4(legacyConf: any): IPieChartConf { } export function v5(legacyConf: any): IPieChartConf { - const { color, ...rest } = legacyConf; + const { color = { map: [] }, ...rest } = legacyConf; return { ...rest, color: { From 2f5392450b347bc9f8972ac16ee2b26c1dfea0d7 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 13:29:21 +0800 Subject: [PATCH 04/13] =?UTF-8?q?feat(dashboard):=20editor=20for=20piechar?= =?UTF-8?q?t=E2=80=99s=20color=20map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pie-chart/editors/pie-color-map.tsx | 191 ++++++++++++++++++ .../plugins/viz-components/pie-chart/type.ts | 6 +- .../pie-chart/viz-pie-chart-editor.tsx | 21 +- 3 files changed, 210 insertions(+), 8 deletions(-) create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx new file mode 100644 index 000000000..82709cc7b --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx @@ -0,0 +1,191 @@ +import { move } from '@dnd-kit/helpers'; +import { DragDropProvider } from '@dnd-kit/react'; +import { useSortable } from '@dnd-kit/react/sortable'; +import { ActionIcon, Badge, Center, CloseButton, ColorInput, Flex, Group, Stack, TextInput } from '@mantine/core'; +import { IconGripVertical } from '@tabler/icons-react'; +import { useBoolean } from 'ahooks'; +import { Ref, forwardRef, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { v4 as uuidv4 } from 'uuid'; +import { NameColorMapRow } from '../type'; +import _ from 'lodash'; +import { useDisclosure } from '@mantine/hooks'; + +type RowFieldItem = { + id: string; +} & NameColorMapRow; + +type NameColorMapRowProps = { + row: RowFieldItem; + handleChange: (v: RowFieldItem) => void; + handleRemove: () => void; + index: number; +}; +const RowEditor = ({ row, index, handleChange, handleRemove }: NameColorMapRowProps) => { + const [touched, { setTrue: setTouched }] = useBoolean(false); + const [hovering, { setTrue, setFalse }] = useBoolean(false); + const { ref, handleRef } = useSortable({ + id: row.id, + index, + }); + + const changeName = (name: string) => { + handleChange({ + ...row, + name, + }); + }; + + const changeColor = (color: string) => { + handleChange({ + ...row, + color, + }); + }; + + return ( + +
+ {hovering ? ( + + + + ) : ( + + {index + 1} + + )} +
+ + changeName(e.currentTarget.value)} + onClick={setTouched} + error={touched && !row.name} + /> + + +
+ +
+
+ ); +}; + +type Props = { + value: NameColorMapRow[]; + onChange: (v: NameColorMapRow[]) => void; + zIndex?: number; +}; + +export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340 }: Props, ref: Ref) => { + const { t } = useTranslation(); + const rows = useMemo(() => { + return value.map((r) => ({ + id: uuidv4(), + ...r, + })); + }, [value]); + + const append = (v: NameColorMapRow) => { + onChange([...value, v]); + }; + const remove = (index: number) => { + const newValue = [...value]; + newValue.splice(index, 1); + onChange(newValue); + }; + const replace = (values: NameColorMapRow[]) => { + onChange([...values]); + }; + const getChangeHandler = (index: number) => (v: NameColorMapRow) => { + const newValue = [...value]; + newValue[index] = v; + onChange(newValue); + }; + + const [newName, setNewName] = useState(''); + const [newColor, setNewColor] = useState(''); + const addNewColor = () => { + if (newColor) { + append({ name: '', color: newColor }); + setNewColor(''); + } + }; + const addNewName = () => { + if (newName) { + append({ name: newName, color: '' }); + setNewName(''); + } + }; + const onDragEnd = (event: any) => { + const { source, target } = event.operation; + const newRows = move(rows, source, target); + onChange(newRows.map((v) => _.omit(v, 'id'))); + }; + + return ( + + + {rows.map((r, index) => ( + remove(index)} + index={index} + /> + ))} + + +
+ + setNewName(e.currentTarget.value)} + onBlur={addNewName} + placeholder={t('viz.pie_chart.color.map.add_by_name')} + /> + + +
+ + + ); +}); diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/type.ts b/dashboard/src/components/plugins/viz-components/pie-chart/type.ts index aa5888008..b52684e81 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/type.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/type.ts @@ -1,10 +1,14 @@ +export type NameColorMapRow = { + name: string; + color: string; +}; export interface IPieChartConf { label_field: TDataKey; value_field: TDataKey; color_field: TDataKey; radius: [string, string]; color: { - map: { name: string; color: string }[]; + map: NameColorMapRow[]; }; } diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx index e33831a93..92431c197 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@mantine/core'; +import { Divider, Stack, Text } from '@mantine/core'; import { defaults } from 'lodash'; import { useEffect, useMemo } from 'react'; import { Controller, useForm } from 'react-hook-form'; @@ -6,9 +6,10 @@ import { useTranslation } from 'react-i18next'; import { DataFieldSelector } from '~/components/panel/settings/common/data-field-selector'; import { useStorageData } from '~/components/plugins/hooks'; import { VizConfigProps } from '~/types/plugin'; -import { VizConfigBanner } from '../../editor-components'; +import { FieldArrayTabs, VizConfigBanner } from '../../editor-components'; import { RadiusSlider } from './editors'; import { IPieChartConf } from './type'; +import { PieColorMapEditor } from './editors/pie-color-map'; type StorageData = ReturnType>; @@ -26,7 +27,7 @@ function Editor({ conf, setConf, context }: EditorProps) { reset(defaultValues); }, [defaultValues]); - watch(['label_field', 'value_field', 'color_field']); + watch(['label_field', 'value_field', 'color_field', 'color']); return ( @@ -45,14 +46,20 @@ function Editor({ conf, setConf, context }: EditorProps) { /> } + name="radius" + render={({ field }) => } /> + } + name="color_field" + render={({ field }) => } /> + + + {t('viz.pie_chart.color.map.label')} + } /> + From bedc4aea0ab49c700fe402ea2335230d4b58c2c9 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 13:51:26 +0800 Subject: [PATCH 05/13] feat(dashboard): render pie chart with color map --- .../viz-components/pie-chart/option/series.ts | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts b/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts index 89f3af866..bf9a6a4d8 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts @@ -1,7 +1,6 @@ import { set } from 'lodash'; +import { getColorFeed, parseDataKey } from '~/utils'; import { IPieChartConf } from '../type'; -import { getColorFeed } from '~/utils'; -import { parseDataKey } from '~/utils'; type TDataItem = { name: string; @@ -9,20 +8,37 @@ type TDataItem = { color?: string; }; +type NameColorMap = Record; + +function getColor(row: Record, colorColumnKey: string, name: string, colorMap: NameColorMap) { + const mappedColor = colorMap[name]; + if (mappedColor) { + return mappedColor; + } + return colorColumnKey ? row[colorColumnKey] : undefined; +} + export function getSeries(conf: IPieChartConf, data: TPanelData, width: number) { - const { label_field, value_field, color_field } = conf; + const { label_field, value_field, color_field, color } = conf; if (!label_field || !value_field) { return {}; } const label = parseDataKey(label_field); const value = parseDataKey(value_field); - const color = parseDataKey(color_field); + const colorDataKey = parseDataKey(color_field); + const colorMap = color.map.reduce((acc, curr) => { + acc[curr.name] = curr.color; + return acc; + }, {} as NameColorMap); - const chartData: TDataItem[] = data[label.queryID].map((d) => ({ - name: d[label.columnKey], - value: Number(d[value.columnKey]), - color: color.columnKey ? d[color.columnKey] : undefined, - })); + const chartData: TDataItem[] = data[label.queryID].map((d) => { + const name = d[label.columnKey]; + return { + name, + value: Number(d[value.columnKey]), + color: getColor(d, colorDataKey.columnKey, name, colorMap), + }; + }); const colorFeed = getColorFeed('multiple'); return { From c1c7275fd3d8e6a0be9aefeb913c2338c2cb5adb Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 13:52:08 +0800 Subject: [PATCH 06/13] feat(dashboard): should skip incomplete color map row --- .../plugins/viz-components/pie-chart/option/series.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts b/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts index bf9a6a4d8..58295efb2 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/option/series.ts @@ -27,7 +27,11 @@ export function getSeries(conf: IPieChartConf, data: TPanelData, width: number) const value = parseDataKey(value_field); const colorDataKey = parseDataKey(color_field); const colorMap = color.map.reduce((acc, curr) => { - acc[curr.name] = curr.color; + const { name, color } = curr; + if (!name || !color) { + return acc; + } + acc[name] = color; return acc; }, {} as NameColorMap); From 474f363a595cb908cb95e9b726f0b5276986856f Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 15:42:55 +0800 Subject: [PATCH 07/13] feat(dashboard): simpler way to add a color mapping row --- .../pie-chart/editors/pie-color-map.tsx | 97 ++++++++++--------- .../viz-components/pie-chart/translation.ts | 14 +++ .../pie-chart/viz-pie-chart-editor.tsx | 28 +++++- 3 files changed, 86 insertions(+), 53 deletions(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx index 82709cc7b..d416f0559 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx @@ -1,15 +1,25 @@ import { move } from '@dnd-kit/helpers'; import { DragDropProvider } from '@dnd-kit/react'; import { useSortable } from '@dnd-kit/react/sortable'; -import { ActionIcon, Badge, Center, CloseButton, ColorInput, Flex, Group, Stack, TextInput } from '@mantine/core'; -import { IconGripVertical } from '@tabler/icons-react'; +import { + ActionIcon, + Autocomplete, + Badge, + Button, + Center, + CloseButton, + ColorInput, + Flex, + Group, + Stack, +} from '@mantine/core'; +import { IconGripVertical, IconPlus } from '@tabler/icons-react'; import { useBoolean } from 'ahooks'; -import { Ref, forwardRef, useMemo, useState } from 'react'; +import _ from 'lodash'; +import { forwardRef, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { v4 as uuidv4 } from 'uuid'; import { NameColorMapRow } from '../type'; -import _ from 'lodash'; -import { useDisclosure } from '@mantine/hooks'; type RowFieldItem = { id: string; @@ -20,8 +30,10 @@ type NameColorMapRowProps = { handleChange: (v: RowFieldItem) => void; handleRemove: () => void; index: number; + names: string[]; }; -const RowEditor = ({ row, index, handleChange, handleRemove }: NameColorMapRowProps) => { +const RowEditor = ({ row, index, handleChange, handleRemove, names }: NameColorMapRowProps) => { + const { t } = useTranslation(); const [touched, { setTrue: setTouched }] = useBoolean(false); const [hovering, { setTrue, setFalse }] = useBoolean(false); const { ref, handleRef } = useSortable({ @@ -66,12 +78,15 @@ const RowEditor = ({ row, index, handleChange, handleRemove }: NameColorMapRowPr )} - changeName(e.currentTarget.value)} + placeholder={t('viz.pie_chart.color.map.name')} + onChange={changeName} onClick={setTouched} error={touched && !row.name} + data={names} + maxDropdownHeight={500} /> void; +}; +const AddARow = ({ append }: AddARowProps) => { + const { t } = useTranslation(); + + const add = () => { + append({ name: '', color: '' }); + }; + return ( + +
+ + + +
+ + ); +}; + type Props = { value: NameColorMapRow[]; onChange: (v: NameColorMapRow[]) => void; zIndex?: number; + names: string[]; }; -export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340 }: Props, ref: Ref) => { - const { t } = useTranslation(); +export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340, names }, ref) => { const rows = useMemo(() => { return value.map((r) => ({ id: uuidv4(), @@ -129,20 +166,6 @@ export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340 }: onChange(newValue); }; - const [newName, setNewName] = useState(''); - const [newColor, setNewColor] = useState(''); - const addNewColor = () => { - if (newColor) { - append({ name: '', color: newColor }); - setNewColor(''); - } - }; - const addNewName = () => { - if (newName) { - append({ name: newName, color: '' }); - setNewName(''); - } - }; const onDragEnd = (event: any) => { const { source, target } = event.operation; const newRows = move(rows, source, target); @@ -159,33 +182,11 @@ export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340 }: handleChange={getChangeHandler(index)} handleRemove={() => remove(index)} index={index} + names={names} /> ))} - -
- - setNewName(e.currentTarget.value)} - onBlur={addNewName} - placeholder={t('viz.pie_chart.color.map.add_by_name')} - /> - - -
- + ); }); diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts b/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts index 17edef87b..60521cdd8 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts @@ -11,6 +11,13 @@ const en = { inner: 'Inner', outer: 'Outer', }, + color: { + map: { + label: 'Color Map', + name: 'Record name', + add_a_row: 'Add a mapping rule', + }, + }, }, }; @@ -25,6 +32,13 @@ const zh = { inner: '内', outer: '外', }, + color: { + map: { + label: '颜色映射表', + name: '数据名称', + add_a_row: '增加一条映射规则', + }, + }, }, }; diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx index 92431c197..dcf93bf04 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx @@ -10,6 +10,9 @@ import { FieldArrayTabs, VizConfigBanner } from '../../editor-components'; import { RadiusSlider } from './editors'; import { IPieChartConf } from './type'; import { PieColorMapEditor } from './editors/pie-color-map'; +import { useEditPanelContext } from '~/contexts'; +import { extractData } from '~/utils'; +import _ from 'lodash'; type StorageData = ReturnType>; @@ -27,7 +30,16 @@ function Editor({ conf, setConf, context }: EditorProps) { reset(defaultValues); }, [defaultValues]); - watch(['label_field', 'value_field', 'color_field', 'color']); + const [label_field] = watch(['label_field', 'value_field', 'color_field', 'color']); + + const { panel } = useEditPanelContext(); + const names = useMemo(() => { + if (!label_field) { + return []; + } + const data = extractData(panel.data, label_field); + return _.uniq(data); + }, [label_field, panel.data]); return ( @@ -49,16 +61,22 @@ function Editor({ conf, setConf, context }: EditorProps) { name="radius" render={({ field }) => } /> - + } /> - - {t('viz.pie_chart.color.map.label')} - } /> + + + {t('viz.pie_chart.color.map.label')} + + } + /> From 04066325e26a97caf2595e563de80b92dd8f7723 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 15:45:25 +0800 Subject: [PATCH 08/13] refactor(dashboard): misc --- .../pie-chart/editors/pie-color-map.tsx | 10 +++++++++- .../pie-chart/viz-pie-chart-editor.tsx | 15 +++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx index d416f0559..daa5670ce 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx @@ -12,6 +12,7 @@ import { Flex, Group, Stack, + Text, } from '@mantine/core'; import { IconGripVertical, IconPlus } from '@tabler/icons-react'; import { useBoolean } from 'ahooks'; @@ -142,6 +143,7 @@ type Props = { }; export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340, names }, ref) => { + const { t } = useTranslation(); const rows = useMemo(() => { return value.map((r) => ({ id: uuidv4(), @@ -173,7 +175,13 @@ export const PieColorMapEditor = forwardRef(({ value, onC }; return ( - + + + + {t('viz.pie_chart.color.map.label')} + + {/* */} + {rows.map((r, index) => ( } /> - - - {t('viz.pie_chart.color.map.label')} - - } - /> - + } + /> From 7b6ecdedbd058ba97cadd453bd82fcd9552fa05a Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 15:47:30 +0800 Subject: [PATCH 09/13] refactor(dashboard): folderize pie-color-map-editor --- .../pie-color-map-editor/add-a-row.tsx | 27 +++ .../editors/pie-color-map-editor/index.ts | 1 + .../pie-color-map-editor.tsx | 74 +++++++ .../pie-color-map-editor/row-editor.tsx | 97 +++++++++ .../pie-chart/editors/pie-color-map.tsx | 200 ------------------ .../pie-chart/viz-pie-chart-editor.tsx | 2 +- 6 files changed, 200 insertions(+), 201 deletions(-) create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/add-a-row.tsx create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/index.ts create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/row-editor.tsx delete mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/add-a-row.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/add-a-row.tsx new file mode 100644 index 000000000..8f43585a7 --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/add-a-row.tsx @@ -0,0 +1,27 @@ +import { Button, Flex, Group } from '@mantine/core'; +import { IconPlus } from '@tabler/icons-react'; +import { useTranslation } from 'react-i18next'; +import { NameColorMapRow } from '../../type'; + +type AddARowProps = { + append: (v: NameColorMapRow) => void; +}; + +export const AddARow = ({ append }: AddARowProps) => { + const { t } = useTranslation(); + + const add = () => { + append({ name: '', color: '' }); + }; + return ( + +
+ + + +
+ + ); +}; diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/index.ts b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/index.ts new file mode 100644 index 000000000..0edfa7d8e --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/index.ts @@ -0,0 +1 @@ +export * from './pie-color-map-editor'; diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx new file mode 100644 index 000000000..6871664e3 --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx @@ -0,0 +1,74 @@ +import { move } from '@dnd-kit/helpers'; +import { DragDropProvider } from '@dnd-kit/react'; +import { Group, Stack, Text } from '@mantine/core'; +import _ from 'lodash'; +import { forwardRef, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; +import { v4 as uuidv4 } from 'uuid'; +import { NameColorMapRow } from '../../type'; +import { RowEditor } from './row-editor'; +import { AddARow } from './add-a-row'; + +type Props = { + value: NameColorMapRow[]; + onChange: (v: NameColorMapRow[]) => void; + zIndex?: number; + names: string[]; +}; + +export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340, names }, ref) => { + const { t } = useTranslation(); + const rows = useMemo(() => { + return value.map((r) => ({ + id: uuidv4(), + ...r, + })); + }, [value]); + + const append = (v: NameColorMapRow) => { + onChange([...value, v]); + }; + const remove = (index: number) => { + const newValue = [...value]; + newValue.splice(index, 1); + onChange(newValue); + }; + const replace = (values: NameColorMapRow[]) => { + onChange([...values]); + }; + const getChangeHandler = (index: number) => (v: NameColorMapRow) => { + const newValue = [...value]; + newValue[index] = v; + onChange(newValue); + }; + + const onDragEnd = (event: any) => { + const { source, target } = event.operation; + const newRows = move(rows, source, target); + onChange(newRows.map((v) => _.omit(v, 'id'))); + }; + + return ( + + + + {t('viz.pie_chart.color.map.label')} + + {/* */} + + + {rows.map((r, index) => ( + remove(index)} + index={index} + names={names} + /> + ))} + + + + ); +}); diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/row-editor.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/row-editor.tsx new file mode 100644 index 000000000..f4ccd993a --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/row-editor.tsx @@ -0,0 +1,97 @@ +import { useSortable } from '@dnd-kit/react/sortable'; +import { ActionIcon, Autocomplete, Badge, Center, CloseButton, ColorInput, Flex, Group } from '@mantine/core'; +import { IconGripVertical } from '@tabler/icons-react'; +import { useBoolean } from 'ahooks'; +import { useTranslation } from 'react-i18next'; +import { NameColorMapRow } from '../../type'; + +type RowFieldItem = { + id: string; +} & NameColorMapRow; + +type NameColorMapRowProps = { + row: RowFieldItem; + handleChange: (v: RowFieldItem) => void; + handleRemove: () => void; + index: number; + names: string[]; +}; +export const RowEditor = ({ row, index, handleChange, handleRemove, names }: NameColorMapRowProps) => { + const { t } = useTranslation(); + const [touched, { setTrue: setTouched }] = useBoolean(false); + const [hovering, { setTrue, setFalse }] = useBoolean(false); + const { ref, handleRef } = useSortable({ + id: row.id, + index, + }); + + const changeName = (name: string) => { + handleChange({ + ...row, + name, + }); + }; + + const changeColor = (color: string) => { + handleChange({ + ...row, + color, + }); + }; + + return ( + +
+ {hovering ? ( + + + + ) : ( + + {index + 1} + + )} +
+ + + + +
+ +
+
+ ); +}; diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx deleted file mode 100644 index daa5670ce..000000000 --- a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import { move } from '@dnd-kit/helpers'; -import { DragDropProvider } from '@dnd-kit/react'; -import { useSortable } from '@dnd-kit/react/sortable'; -import { - ActionIcon, - Autocomplete, - Badge, - Button, - Center, - CloseButton, - ColorInput, - Flex, - Group, - Stack, - Text, -} from '@mantine/core'; -import { IconGripVertical, IconPlus } from '@tabler/icons-react'; -import { useBoolean } from 'ahooks'; -import _ from 'lodash'; -import { forwardRef, useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; -import { v4 as uuidv4 } from 'uuid'; -import { NameColorMapRow } from '../type'; - -type RowFieldItem = { - id: string; -} & NameColorMapRow; - -type NameColorMapRowProps = { - row: RowFieldItem; - handleChange: (v: RowFieldItem) => void; - handleRemove: () => void; - index: number; - names: string[]; -}; -const RowEditor = ({ row, index, handleChange, handleRemove, names }: NameColorMapRowProps) => { - const { t } = useTranslation(); - const [touched, { setTrue: setTouched }] = useBoolean(false); - const [hovering, { setTrue, setFalse }] = useBoolean(false); - const { ref, handleRef } = useSortable({ - id: row.id, - index, - }); - - const changeName = (name: string) => { - handleChange({ - ...row, - name, - }); - }; - - const changeColor = (color: string) => { - handleChange({ - ...row, - color, - }); - }; - - return ( - -
- {hovering ? ( - - - - ) : ( - - {index + 1} - - )} -
- - - - -
- -
-
- ); -}; - -type AddARowProps = { - append: (v: NameColorMapRow) => void; -}; -const AddARow = ({ append }: AddARowProps) => { - const { t } = useTranslation(); - - const add = () => { - append({ name: '', color: '' }); - }; - return ( - -
- - - -
- - ); -}; - -type Props = { - value: NameColorMapRow[]; - onChange: (v: NameColorMapRow[]) => void; - zIndex?: number; - names: string[]; -}; - -export const PieColorMapEditor = forwardRef(({ value, onChange, zIndex = 340, names }, ref) => { - const { t } = useTranslation(); - const rows = useMemo(() => { - return value.map((r) => ({ - id: uuidv4(), - ...r, - })); - }, [value]); - - const append = (v: NameColorMapRow) => { - onChange([...value, v]); - }; - const remove = (index: number) => { - const newValue = [...value]; - newValue.splice(index, 1); - onChange(newValue); - }; - const replace = (values: NameColorMapRow[]) => { - onChange([...values]); - }; - const getChangeHandler = (index: number) => (v: NameColorMapRow) => { - const newValue = [...value]; - newValue[index] = v; - onChange(newValue); - }; - - const onDragEnd = (event: any) => { - const { source, target } = event.operation; - const newRows = move(rows, source, target); - onChange(newRows.map((v) => _.omit(v, 'id'))); - }; - - return ( - - - - {t('viz.pie_chart.color.map.label')} - - {/* */} - - - {rows.map((r, index) => ( - remove(index)} - index={index} - names={names} - /> - ))} - - - - ); -}); diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx index c458c33cd..1f78cea98 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/viz-pie-chart-editor.tsx @@ -9,7 +9,7 @@ import { VizConfigProps } from '~/types/plugin'; import { FieldArrayTabs, VizConfigBanner } from '../../editor-components'; import { RadiusSlider } from './editors'; import { IPieChartConf } from './type'; -import { PieColorMapEditor } from './editors/pie-color-map'; +import { PieColorMapEditor } from './editors/pie-color-map-editor'; import { useEditPanelContext } from '~/contexts'; import { extractData } from '~/utils'; import _ from 'lodash'; From 45514b42420c880b7fb0bd988d4bf2d534916ee4 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 17:12:32 +0800 Subject: [PATCH 10/13] =?UTF-8?q?feat(dashboard):=20select=20palette=20for?= =?UTF-8?q?=20pie-chart=E2=80=99s=20color=20mapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editors/pie-color-map-editor/palette.ts | 15 ++++ .../pie-color-map-editor.tsx | 3 +- .../pie-color-map-editor/select-palette.tsx | 76 +++++++++++++++++++ .../viz-components/pie-chart/translation.ts | 4 + 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/palette.ts create mode 100644 dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/palette.ts b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/palette.ts new file mode 100644 index 000000000..0425c022d --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/palette.ts @@ -0,0 +1,15 @@ +import _ from 'lodash'; +import { ChartTheme } from '~/styles/register-themes'; + +export type PieChartPaletteOption = { + name: string; + colors: string[]; +}; +export const PieChartPalettes = Object.entries( + _.pick(ChartTheme.graphics, ['compared', 'level', 'depth', 'multiple']), +).map(([name, record]) => { + return { + name, + colors: Object.values(record), + } as PieChartPaletteOption; +}); diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx index 6871664e3..313c63431 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/pie-color-map-editor.tsx @@ -8,6 +8,7 @@ import { v4 as uuidv4 } from 'uuid'; import { NameColorMapRow } from '../../type'; import { RowEditor } from './row-editor'; import { AddARow } from './add-a-row'; +import { SelectPalette } from './select-palette'; type Props = { value: NameColorMapRow[]; @@ -54,7 +55,7 @@ export const PieColorMapEditor = forwardRef(({ value, onC {t('viz.pie_chart.color.map.label')} - {/* */} + {rows.map((r, index) => ( diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx new file mode 100644 index 000000000..8d5d9c8ce --- /dev/null +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx @@ -0,0 +1,76 @@ +import { Box, Button, Combobox, Menu } from '@mantine/core'; +import _ from 'lodash'; +import numbro from 'numbro'; +import { useTranslation } from 'react-i18next'; +import { NameColorMapRow } from '../../type'; +import { PieChartPalettes } from './palette'; + +function getBackgroundImage(colors: string[]) { + const len = colors.length; + if (len === 0) { + return ''; + } + const format: numbro.Format = { output: 'percent', mantissa: 4, trimMantissa: true }; + const step = _.divide(1, len); + const stops: string[] = []; + colors.forEach((c, i) => { + stops.push(`${c} ${numbro(i * step).format(format)}`); + stops.push(`${c} ${numbro((i + 1) * step).format(format)}`); + }); + const ret = `linear-gradient(90deg, ${stops.join(',')})`; + console.log(ret); + return ret; +} + +type Props = { + value: NameColorMapRow[]; + onChange: (v: NameColorMapRow[]) => void; +}; + +export const SelectPalette = ({ value, onChange }: Props) => { + const { t, i18n } = useTranslation(); + + const applyPalette = (colors: string[]) => { + const newValue = value.map((v, i) => ({ + name: v.name, + color: colors[i], + })); + for (let j = newValue.length - 1; j < colors.length; j++) { + newValue.push({ + name: '', + color: colors[j], + }); + } + onChange(newValue); + }; + + return ( + + + + + + + {t('viz.pie_chart.color.map.click_to_apply_palette')} + + {PieChartPalettes.map((p) => ( + applyPalette(p.colors)}> + + + ))} + + + ); +}; diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts b/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts index 60521cdd8..9d5043deb 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts +++ b/dashboard/src/components/plugins/viz-components/pie-chart/translation.ts @@ -16,6 +16,8 @@ const en = { label: 'Color Map', name: 'Record name', add_a_row: 'Add a mapping rule', + use_a_palette: 'Use a palette', + click_to_apply_palette: 'Click to apply palette', }, }, }, @@ -37,6 +39,8 @@ const zh = { label: '颜色映射表', name: '数据名称', add_a_row: '增加一条映射规则', + use_a_palette: '使用预设配色方案', + click_to_apply_palette: '点击应用配色方案', }, }, }, From 9ffefa19e7ccbb2393192985fdee28ffcf2f8ec8 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 17:12:51 +0800 Subject: [PATCH 11/13] chore: publish v14.3.0 --- api/package.json | 2 +- dashboard/package.json | 2 +- package.json | 2 +- settings-form/package.json | 2 +- website/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/package.json b/api/package.json index 9adb763a2..325c76fa3 100644 --- a/api/package.json +++ b/api/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/api", - "version": "14.2.0", + "version": "14.3.0", "description": "", "main": "index.js", "scripts": { diff --git a/dashboard/package.json b/dashboard/package.json index 014462d90..e9ec31be8 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/dashboard", - "version": "14.2.0", + "version": "14.3.0", "license": "Apache-2.0", "publishConfig": { "access": "public", diff --git a/package.json b/package.json index 7e0da084b..4c0fbd287 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/root", - "version": "14.2.0", + "version": "14.3.0", "private": true, "workspaces": [ "api", diff --git a/settings-form/package.json b/settings-form/package.json index dc4f53361..aec73712b 100644 --- a/settings-form/package.json +++ b/settings-form/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/settings-form", - "version": "14.2.0", + "version": "14.3.0", "license": "Apache-2.0", "publishConfig": { "access": "public", diff --git a/website/package.json b/website/package.json index a63e4dff5..a578c2b06 100644 --- a/website/package.json +++ b/website/package.json @@ -2,7 +2,7 @@ "name": "@devtable/website", "private": true, "license": "Apache-2.0", - "version": "14.2.0", + "version": "14.3.0", "scripts": { "dev": "vite", "preview": "vite preview" From 025544cbcb3a449ee175f7d3f5c6c7940b7fa4e1 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 17:19:31 +0800 Subject: [PATCH 12/13] fix(dashboard): misc --- .../pie-chart/editors/pie-color-map-editor/select-palette.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx index 8d5d9c8ce..5370bb767 100644 --- a/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx +++ b/dashboard/src/components/plugins/viz-components/pie-chart/editors/pie-color-map-editor/select-palette.tsx @@ -49,7 +49,6 @@ export const SelectPalette = ({ value, onChange }: Props) => { withArrow shadow="md" width={400} - defaultOpened styles={{ item: { overflowX: 'hidden', From 561e9bf47cb360bf72810405f2d4623a503a2912 Mon Sep 17 00:00:00 2001 From: Leto Date: Fri, 13 Dec 2024 17:34:56 +0800 Subject: [PATCH 13/13] chore: publish v14.3.1 --- api/package.json | 2 +- dashboard/package.json | 2 +- package.json | 2 +- settings-form/package.json | 2 +- website/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/package.json b/api/package.json index 325c76fa3..5fc15a819 100644 --- a/api/package.json +++ b/api/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/api", - "version": "14.3.0", + "version": "14.3.1", "description": "", "main": "index.js", "scripts": { diff --git a/dashboard/package.json b/dashboard/package.json index e9ec31be8..d6b301265 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/dashboard", - "version": "14.3.0", + "version": "14.3.1", "license": "Apache-2.0", "publishConfig": { "access": "public", diff --git a/package.json b/package.json index 4c0fbd287..2e84988a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/root", - "version": "14.3.0", + "version": "14.3.1", "private": true, "workspaces": [ "api", diff --git a/settings-form/package.json b/settings-form/package.json index aec73712b..c22de5e1e 100644 --- a/settings-form/package.json +++ b/settings-form/package.json @@ -1,6 +1,6 @@ { "name": "@devtable/settings-form", - "version": "14.3.0", + "version": "14.3.1", "license": "Apache-2.0", "publishConfig": { "access": "public", diff --git a/website/package.json b/website/package.json index a578c2b06..b343cff04 100644 --- a/website/package.json +++ b/website/package.json @@ -2,7 +2,7 @@ "name": "@devtable/website", "private": true, "license": "Apache-2.0", - "version": "14.3.0", + "version": "14.3.1", "scripts": { "dev": "vite", "preview": "vite preview"