@devtable/dashboard 6.20.0 → 6.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,12 @@ import { MantineNumberSize } from '@mantine/core';
2
2
  export interface TreeSelectWidgetStylesParams {
3
3
  radius?: MantineNumberSize;
4
4
  }
5
- declare const _default: (params: TreeSelectWidgetStylesParams, options?: import("@mantine/core").UseStylesOptions<"label" | "root" | "dropdown"> | undefined) => {
6
- classes: Record<"label" | "root" | "dropdown", string>;
5
+ declare const _default: (params: TreeSelectWidgetStylesParams, options?: import("@mantine/core").UseStylesOptions<string> | undefined) => {
6
+ classes: {
7
+ root: string;
8
+ label: string;
9
+ dropdown: string;
10
+ };
7
11
  cx: (...args: any) => string;
8
12
  theme: import("@mantine/core").MantineTheme;
9
13
  };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { RichTextEditorProps } from '@mantine/tiptap';
3
+ interface ICustomRichTextEditor {
4
+ value: string;
5
+ onChange: (v: string) => void;
6
+ styles?: RichTextEditorProps['styles'];
7
+ }
8
+ export declare const CustomRichTextEditor: import("react").ForwardRefExoticComponent<ICustomRichTextEditor & import("react").RefAttributes<unknown>>;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { RichTextEditorProps } from '@mantine/tiptap';
3
+ interface IReadonlyRichText {
4
+ value: string;
5
+ styles?: RichTextEditorProps['styles'];
6
+ }
7
+ export declare const ReadonlyRichText: ({ value, styles }: IReadonlyRichText) => JSX.Element;
8
+ export {};
@@ -1,5 +1,8 @@
1
- export declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<"config" | "root"> | undefined) => {
2
- classes: Record<"config" | "root", string>;
1
+ export declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<string> | undefined) => {
2
+ classes: {
3
+ root: string;
4
+ config: string;
5
+ };
3
6
  cx: (...args: any) => string;
4
7
  theme: import("@mantine/core").MantineTheme;
5
8
  };
@@ -1,5 +1,8 @@
1
- export declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<"palette" | "paletteItem"> | undefined) => {
2
- classes: Record<"palette" | "paletteItem", string>;
1
+ export declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<string> | undefined) => {
2
+ classes: {
3
+ palette: string;
4
+ paletteItem: string;
5
+ };
3
6
  cx: (...args: any) => string;
4
7
  theme: import("@mantine/core").MantineTheme;
5
8
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, UseFormWatch } from 'react-hook-form';
3
- import { IBoxplotChartConf } from '../type';
3
+ import { IBoxplotChartConf } from '../../type';
4
4
  import { ITemplateVariable } from '~/utils/template';
5
5
  interface IReferenceLinesField {
6
6
  control: Control<IBoxplotChartConf, $TSFixMe>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
- import { IBoxplotChartConf } from '../type';
3
+ import { IBoxplotChartConf } from '../../type';
4
4
  interface IReferenceLineField {
5
5
  control: Control<IBoxplotChartConf, $TSFixMe>;
6
6
  index: number;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { IBoxplotChartConf } from '../type';
5
+ interface IXAxisField {
6
+ control: Control<IBoxplotChartConf, $TSFixMe>;
7
+ data: AnyObject[];
8
+ watch: UseFormWatch<IBoxplotChartConf>;
9
+ }
10
+ export declare const XAxisField: ({ control, data, watch }: IXAxisField) => JSX.Element;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { IBoxplotChartConf } from '../type';
5
+ interface IYAxisField {
6
+ control: Control<IBoxplotChartConf, $TSFixMe>;
7
+ data: AnyObject[];
8
+ watch: UseFormWatch<IBoxplotChartConf>;
9
+ }
10
+ export declare const YAxisField: ({ control, data, watch }: IYAxisField) => JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IBoxplotDataItem } from '../type';
2
+ export declare const BOXPLOT_DATA_ITEM_KEYS: Array<keyof IBoxplotDataItem>;
@@ -0,0 +1,72 @@
1
+ import { AnyObject } from '~/types';
2
+ import { ITemplateVariable } from '~/utils/template';
3
+ import { IBoxplotChartConf, IBoxplotDataItem } from '../type';
4
+ interface IGetOption {
5
+ config: IBoxplotChartConf;
6
+ data: AnyObject[];
7
+ variables: ITemplateVariable[];
8
+ }
9
+ export declare function getOption({ config, data, variables }: IGetOption): {
10
+ dataset: {
11
+ source: IBoxplotDataItem[];
12
+ }[];
13
+ tooltip: {
14
+ trigger: string;
15
+ confine: boolean;
16
+ formatter: (params: import("echarts/types/dist/shared").TopLevelFormatterParams) => string | undefined;
17
+ };
18
+ xAxis: {
19
+ type: string;
20
+ name: string;
21
+ axisTick: {
22
+ show: boolean;
23
+ alignWithLabel: boolean;
24
+ };
25
+ }[];
26
+ yAxis: {
27
+ name: string;
28
+ axisLine: {
29
+ show: boolean;
30
+ };
31
+ axisLabel: {
32
+ formatter: (value: number) => string;
33
+ };
34
+ }[];
35
+ series: ({
36
+ name: string;
37
+ type: string;
38
+ data: never[];
39
+ markLine: {
40
+ data: {
41
+ name: string;
42
+ yAxis: number;
43
+ }[];
44
+ silent: boolean;
45
+ symbol: string[];
46
+ label: {
47
+ formatter: () => string;
48
+ position: string;
49
+ };
50
+ };
51
+ } | {
52
+ name: string;
53
+ type: string;
54
+ itemStyle: {
55
+ color: string;
56
+ borderColor: string;
57
+ borderWidth: number;
58
+ };
59
+ emphasis: {
60
+ disabled: boolean;
61
+ };
62
+ boxWidth: number[];
63
+ datasetIndex: number;
64
+ encode: {
65
+ y: (keyof IBoxplotDataItem)[];
66
+ x: string;
67
+ itemName: string[];
68
+ tooltip: (keyof IBoxplotDataItem)[];
69
+ };
70
+ })[];
71
+ };
72
+ export {};
@@ -0,0 +1,9 @@
1
+ import { TopLevelFormatterParams } from 'echarts/types/dist/shared';
2
+ import { IBoxplotChartConf } from '../type';
3
+ export declare function getTooltip({ config }: {
4
+ config: IBoxplotChartConf;
5
+ }): {
6
+ trigger: string;
7
+ confine: boolean;
8
+ formatter: (params: TopLevelFormatterParams) => string | undefined;
9
+ };
@@ -18,3 +18,11 @@ export interface IBoxplotChartConf {
18
18
  reference_lines: IBoxplotReferenceLine[];
19
19
  }
20
20
  export declare const DEFAULT_CONFIG: IBoxplotChartConf;
21
+ export interface IBoxplotDataItem {
22
+ name: string;
23
+ min: number;
24
+ q1: number;
25
+ median: number;
26
+ q3: number;
27
+ max: number;
28
+ }
@@ -1,5 +1,8 @@
1
- export declare const useTableStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<"root" | "thead"> | undefined) => {
2
- classes: Record<"root" | "thead", string>;
1
+ export declare const useTableStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<string> | undefined) => {
2
+ classes: {
3
+ root: string;
4
+ thead: string;
5
+ };
3
6
  cx: (...args: any) => string;
4
7
  theme: import("@mantine/core").MantineTheme;
5
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "6.20.0",
3
+ "version": "6.22.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -31,28 +31,41 @@
31
31
  "coverage": "vitest --coverage"
32
32
  },
33
33
  "dependencies": {
34
+ "@monaco-editor/react": "4.4.6",
34
35
  "@types/chroma-js": "^2.1.4",
35
36
  "file-saver": "2.0.5",
36
37
  "performant-array-to-tree": "1.11.0",
37
38
  "popmotion": "^11.0.3",
38
- "@monaco-editor/react": "4.4.6",
39
39
  "rc-tree-select": "5.5.5",
40
40
  "stickybits": "3.7.11"
41
41
  },
42
42
  "devDependencies": {
43
- "@mantine/core": "5.5.5",
44
- "@mantine/dates": "5.5.5",
45
- "@mantine/form": "5.5.5",
46
- "@mantine/hooks": "5.5.5",
47
- "@mantine/modals": "5.5.5",
48
- "@mantine/notifications": "5.5.5",
49
- "@mantine/prism": "5.5.5",
50
- "@mantine/rte": "5.5.5",
43
+ "@mantine/core": "5.9.5",
44
+ "@mantine/dates": "5.9.5",
45
+ "@mantine/form": "5.9.5",
46
+ "@mantine/hooks": "5.9.5",
47
+ "@mantine/modals": "5.9.5",
48
+ "@mantine/notifications": "5.9.5",
49
+ "@mantine/prism": "5.9.5",
50
+ "@mantine/tiptap": "5.9.5",
51
+ "@tabler/icons": "^1.118.0",
51
52
  "@testing-library/cypress": "^8.0.3",
52
53
  "@testing-library/jest-dom": "^5.16.4",
53
54
  "@testing-library/react": "^13.3.0",
54
55
  "@testing-library/react-hooks": "^8.0.1",
55
56
  "@testing-library/user-event": "^14.3.0",
57
+ "@tiptap/extension-code-block-lowlight": "^2.0.0-beta.209",
58
+ "@tiptap/extension-color": "^2.0.0-beta.209",
59
+ "@tiptap/extension-highlight": "^2.0.0-beta.209",
60
+ "@tiptap/extension-link": "^2.0.0-beta.209",
61
+ "@tiptap/extension-placeholder": "^2.0.0-beta.209",
62
+ "@tiptap/extension-subscript": "^2.0.0-beta.209",
63
+ "@tiptap/extension-superscript": "^2.0.0-beta.209",
64
+ "@tiptap/extension-text-align": "^2.0.0-beta.209",
65
+ "@tiptap/extension-text-style": "^2.0.0-beta.209",
66
+ "@tiptap/extension-underline": "^2.0.0-beta.209",
67
+ "@tiptap/react": "^2.0.0-beta.209",
68
+ "@tiptap/starter-kit": "^2.0.0-beta.209",
56
69
  "@types/crypto-js": "v4.1.1",
57
70
  "@types/d3-array": "3.0.3",
58
71
  "@types/eventemitter2": "^4.1.0",
@@ -74,7 +87,14 @@
74
87
  "jsdom": "^20.0.0",
75
88
  "jsdom-testing-mocks": "^1.5.0",
76
89
  "lodash": "^4.17.21",
90
+ "lowlight": "^2.8.0",
77
91
  "numbro": "^2.3.6",
92
+ "prosemirror-commands": "^1.5.0",
93
+ "prosemirror-dropcursor": "^1.6.1",
94
+ "prosemirror-gapcursor": "^1.3.1",
95
+ "prosemirror-history": "^1.3.0",
96
+ "prosemirror-keymap": "^1.2.0",
97
+ "prosemirror-schema-list": "^1.2.2",
78
98
  "react-grid-layout": "^1.3.4",
79
99
  "react-hook-form": "^7.31.2",
80
100
  "rollup-plugin-visualizer": "5.6.0",
@@ -83,15 +103,28 @@
83
103
  },
84
104
  "peerDependencies": {
85
105
  "@emotion/react": "11.10.0",
86
- "@mantine/core": "5.5.5",
87
- "@mantine/dates": "5.5.5",
88
- "@mantine/form": "5.5.5",
89
- "@mantine/hooks": "5.5.5",
90
- "@mantine/modals": "5.5.5",
91
- "@mantine/notifications": "5.5.5",
92
- "@mantine/prism": "5.5.5",
93
- "@mantine/rte": "5.5.5",
106
+ "@mantine/core": "5.9.5",
107
+ "@mantine/dates": "5.9.5",
108
+ "@mantine/form": "5.9.5",
109
+ "@mantine/hooks": "5.9.5",
110
+ "@mantine/modals": "5.9.5",
111
+ "@mantine/notifications": "5.9.5",
112
+ "@mantine/prism": "5.9.5",
113
+ "@mantine/tiptap": "5.9.5",
114
+ "@tabler/icons": "^1.118.0",
94
115
  "@tanstack/react-table": "^8.5.13",
116
+ "@tiptap/extension-code-block-lowlight": "^2.0.0-beta.209",
117
+ "@tiptap/extension-color": "^2.0.0-beta.209",
118
+ "@tiptap/extension-highlight": "^2.0.0-beta.209",
119
+ "@tiptap/extension-link": "^2.0.0-beta.209",
120
+ "@tiptap/extension-placeholder": "^2.0.0-beta.209",
121
+ "@tiptap/extension-subscript": "^2.0.0-beta.209",
122
+ "@tiptap/extension-superscript": "^2.0.0-beta.209",
123
+ "@tiptap/extension-text-align": "^2.0.0-beta.209",
124
+ "@tiptap/extension-text-style": "^2.0.0-beta.209",
125
+ "@tiptap/extension-underline": "^2.0.0-beta.209",
126
+ "@tiptap/react": "^2.0.0-beta.209",
127
+ "@tiptap/starter-kit": "^2.0.0-beta.209",
95
128
  "ahooks": "^3.3.11",
96
129
  "axios": "^0.27.2",
97
130
  "chroma-js": "^2.4.2",
@@ -105,10 +138,17 @@
105
138
  "eventemitter2": "^6.4.6",
106
139
  "jszip": "3.10.1",
107
140
  "lodash": "^4.17.21",
141
+ "lowlight": "^2.8.0",
108
142
  "mobx": "^6.6.1",
109
143
  "mobx-react-lite": "^3.4.0",
110
144
  "mobx-state-tree": "^5.1.5",
111
145
  "numbro": "^2.3.6",
146
+ "prosemirror-commands": "^1.5.0",
147
+ "prosemirror-dropcursor": "^1.6.1",
148
+ "prosemirror-gapcursor": "^1.3.1",
149
+ "prosemirror-history": "^1.3.0",
150
+ "prosemirror-keymap": "^1.2.0",
151
+ "prosemirror-schema-list": "^1.2.2",
112
152
  "react": "^16.8.0 || 17.x || 18.x",
113
153
  "react-dom": "^16.8.0 || 17.x || 18.x",
114
154
  "react-grid-layout": "^1.3.4",
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { Editor } from '@mantine/rte';
3
- /**
4
- * Sync external changes to the editor
5
- * see also https://github.com/mantinedev/mantine/issues/1625#issuecomment-1154506482
6
- * @param content
7
- */
8
- export declare function useSyncEditorContent(content?: string): import("react").RefObject<Editor>;