@devtable/dashboard 13.20.0 → 13.21.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.
- package/dist/components/panel/panel-render/full-screen-render/use-panel-full-screen.d.ts +2 -2
- package/dist/components/plugins/plugin-context.d.ts +2 -2
- package/dist/components/widgets/function-editor/function-editor.d.ts +8 -0
- package/dist/components/widgets/function-editor/index.d.ts +2 -6
- package/dist/components/widgets/function-editor/types.d.ts +7 -0
- package/dist/components/widgets/inline-function-input/index.d.ts +2 -0
- package/dist/components/widgets/modal-function-editor/index.d.ts +8 -2
- package/dist/components/widgets/rich-text-editor/dynamic-color-mark/dynamic-color-control.d.ts +4 -0
- package/dist/components/widgets/rich-text-editor/dynamic-color-mark/dynamic-color-mark.d.ts +12 -0
- package/dist/components/widgets/rich-text-editor/dynamic-color-mark/index.d.ts +3 -0
- package/dist/components/widgets/rich-text-editor/dynamic-color-mark/utils.d.ts +9 -0
- package/dist/components/widgets/rich-text-editor/readonly-rich-text-editor.d.ts +4 -1
- package/dist/contexts/panel-context.d.ts +4 -4
- package/dist/dashboard-editor/model/panels/panel.d.ts +1 -1
- package/dist/dashboard.es.js +5709 -5529
- package/dist/dashboard.umd.js +72 -70
- package/dist/i18n/en.d.ts +7 -0
- package/dist/i18n/zh.d.ts +7 -0
- package/dist/model/render-model/dashboard/content/panels/panel.d.ts +2 -1
- package/dist/stats.html +1 -1
- package/dist/utils/dashboard-state.d.ts +1 -0
- package/dist/version.json +2 -2
- package/package.json +2 -1
|
@@ -3449,7 +3449,7 @@ export declare function usePanelFullScreen(view: ViewMetaInstance, panelID: stri
|
|
|
3449
3449
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
3450
3450
|
readonly data: TPanelData;
|
|
3451
3451
|
readonly variableStrings: Record<string, React.ReactNode>;
|
|
3452
|
-
readonly variableValueMap:
|
|
3452
|
+
readonly variableValueMap: import('../../../../model').VariableValueMap;
|
|
3453
3453
|
readonly dataLoading: boolean;
|
|
3454
3454
|
readonly queryStateMessages: string;
|
|
3455
3455
|
readonly queryErrors: any[];
|
|
@@ -6785,7 +6785,7 @@ export declare function usePanelFullScreen(view: ViewMetaInstance, panelID: stri
|
|
|
6785
6785
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
6786
6786
|
readonly data: TPanelData;
|
|
6787
6787
|
readonly variableStrings: Record<string, React.ReactNode>;
|
|
6788
|
-
readonly variableValueMap:
|
|
6788
|
+
readonly variableValueMap: import('../../../../model').VariableValueMap;
|
|
6789
6789
|
readonly dataLoading: boolean;
|
|
6790
6790
|
readonly queryStateMessages: string;
|
|
6791
6791
|
readonly queryErrors: any[];
|
|
@@ -3465,7 +3465,7 @@ export declare const tokens: {
|
|
|
3465
3465
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
3466
3466
|
readonly data: TPanelData;
|
|
3467
3467
|
readonly variableStrings: Record<string, import('./react').ReactNode>;
|
|
3468
|
-
readonly variableValueMap:
|
|
3468
|
+
readonly variableValueMap: import("../..").VariableValueMap;
|
|
3469
3469
|
readonly dataLoading: boolean;
|
|
3470
3470
|
readonly queryStateMessages: string;
|
|
3471
3471
|
readonly queryErrors: any[];
|
|
@@ -6839,7 +6839,7 @@ export declare const tokens: {
|
|
|
6839
6839
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
6840
6840
|
readonly data: TPanelData;
|
|
6841
6841
|
readonly variableStrings: Record<string, import('./react').ReactNode>;
|
|
6842
|
-
readonly variableValueMap:
|
|
6842
|
+
readonly variableValueMap: import("../..").VariableValueMap;
|
|
6843
6843
|
readonly dataLoading: boolean;
|
|
6844
6844
|
readonly queryStateMessages: string;
|
|
6845
6845
|
readonly queryErrors: any[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnMount } from '@monaco-editor/react';
|
|
2
|
+
interface IFunctionEditor {
|
|
3
|
+
value: TFunctionString;
|
|
4
|
+
onChange: (v: TFunctionString) => void;
|
|
5
|
+
onMount?: OnMount;
|
|
6
|
+
}
|
|
7
|
+
export declare const FunctionEditor: ({ value, onChange, onMount }: IFunctionEditor) => import('./react/jsx-runtime').JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
onChange: (v: TFunctionString) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare const FunctionEditor: ({ value, onChange }: IFunctionEditor) => import('./react/jsx-runtime').JSX.Element;
|
|
6
|
-
export {};
|
|
1
|
+
export * from './function-editor';
|
|
2
|
+
export * from './types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type MonacoEditorRestrictionRange = [number, number, number, number];
|
|
2
|
+
export type MonacoEditorRestriction = {
|
|
3
|
+
range: MonacoEditorRestrictionRange;
|
|
4
|
+
label?: string;
|
|
5
|
+
allowMultiline?: boolean;
|
|
6
|
+
validate?: (currentlyTypedValue: any, newRange: any, info: any) => boolean;
|
|
7
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { MonacoEditorRestriction } from '../function-editor';
|
|
2
3
|
interface IInlineFunctionInput {
|
|
3
4
|
value: TFunctionString;
|
|
4
5
|
onChange: (v: TFunctionString) => void;
|
|
5
6
|
defaultValue: TFunctionString;
|
|
6
7
|
label: string;
|
|
8
|
+
restrictions?: MonacoEditorRestriction[];
|
|
7
9
|
}
|
|
8
10
|
export declare const InlineFunctionInput: import('./react').ForwardRefExoticComponent<IInlineFunctionInput & import('./react').RefAttributes<unknown>>;
|
|
9
11
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from './react';
|
|
2
2
|
import { AnyObject } from '../../../types';
|
|
3
|
-
|
|
3
|
+
import { MonacoEditorRestriction } from '../function-editor';
|
|
4
|
+
type Props = {
|
|
4
5
|
title: string;
|
|
5
6
|
value: TFunctionString;
|
|
6
7
|
onChange: (v: TFunctionString) => void;
|
|
@@ -9,6 +10,11 @@ interface Props {
|
|
|
9
10
|
description?: ReactNode;
|
|
10
11
|
triggerLabel?: string;
|
|
11
12
|
triggerButtonProps?: AnyObject;
|
|
12
|
-
}
|
|
13
|
+
renderTriggerButton?: ({ onClick }: {
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}) => ReactNode;
|
|
16
|
+
zIndex?: number;
|
|
17
|
+
restrictions?: MonacoEditorRestriction[];
|
|
18
|
+
};
|
|
13
19
|
export declare const ModalFunctionEditor: import('./react').ForwardRefExoticComponent<Props & import('./react').RefAttributes<unknown>>;
|
|
14
20
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Mark } from '@tiptap/core';
|
|
2
|
+
declare module '@tiptap/core' {
|
|
3
|
+
interface Commands<ReturnType> {
|
|
4
|
+
dynamicColor: {
|
|
5
|
+
setDynamicColor: (fontSize: string) => ReturnType;
|
|
6
|
+
unsetDynamicColor: () => ReturnType;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare const DynamicColorAttrKey = "data-value";
|
|
11
|
+
export declare const DynamicColorName = "dynamicColor";
|
|
12
|
+
export declare const DynamicColorMark: Mark<any, any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TDashboardState, VariableValueMap } from '../../../../model';
|
|
2
|
+
export declare const DefaultDynamicColorFuncLines: string[];
|
|
3
|
+
export declare const DefaultDynamicColorFunc: string;
|
|
4
|
+
export declare const trimDynamicColorFunc: (raw: string) => string;
|
|
5
|
+
export declare const completeDynamicColorFunc: (trimmed: string) => string;
|
|
6
|
+
export declare const hashID: (size: number) => string;
|
|
7
|
+
export declare function getDynamicColorStyles(doc: Document, dashboardState: TDashboardState, variables: VariableValueMap): Record<string, {
|
|
8
|
+
color: string;
|
|
9
|
+
}>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { RichTextEditorProps } from '@mantine/tiptap';
|
|
2
2
|
import { Sx } from '@mantine/core';
|
|
3
|
+
import { TDashboardState, VariableValueMap } from '../../../model';
|
|
3
4
|
interface IReadonlyRichText {
|
|
4
5
|
value: string;
|
|
5
6
|
styles?: RichTextEditorProps['styles'];
|
|
6
7
|
sx?: Sx;
|
|
8
|
+
dashboardState?: TDashboardState;
|
|
9
|
+
varaiables?: VariableValueMap;
|
|
7
10
|
}
|
|
8
|
-
export declare const ReadonlyRichText: ({ value, styles, sx }: IReadonlyRichText) => import('./react/jsx-runtime').JSX.Element;
|
|
11
|
+
export declare const ReadonlyRichText: ({ value, styles, sx, dashboardState, varaiables, }: IReadonlyRichText) => import('./react/jsx-runtime').JSX.Element;
|
|
9
12
|
export {};
|
|
@@ -3454,7 +3454,7 @@ export declare const useRenderPanelContext: () => {
|
|
|
3454
3454
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
3455
3455
|
readonly data: TPanelData;
|
|
3456
3456
|
readonly variableStrings: Record<string, React.ReactNode>;
|
|
3457
|
-
readonly variableValueMap:
|
|
3457
|
+
readonly variableValueMap: import('../model').VariableValueMap;
|
|
3458
3458
|
readonly dataLoading: boolean;
|
|
3459
3459
|
readonly queryStateMessages: string;
|
|
3460
3460
|
readonly queryErrors: any[];
|
|
@@ -6790,7 +6790,7 @@ export declare const useRenderPanelContext: () => {
|
|
|
6790
6790
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
6791
6791
|
readonly data: TPanelData;
|
|
6792
6792
|
readonly variableStrings: Record<string, React.ReactNode>;
|
|
6793
|
-
readonly variableValueMap:
|
|
6793
|
+
readonly variableValueMap: import('../model').VariableValueMap;
|
|
6794
6794
|
readonly dataLoading: boolean;
|
|
6795
6795
|
readonly queryStateMessages: string;
|
|
6796
6796
|
readonly queryErrors: any[];
|
|
@@ -10687,7 +10687,7 @@ export declare const useEditPanelContext: () => {
|
|
|
10687
10687
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
10688
10688
|
readonly data: TPanelData;
|
|
10689
10689
|
readonly variableStrings: Record<string, React.ReactNode>;
|
|
10690
|
-
readonly variableValueMap:
|
|
10690
|
+
readonly variableValueMap: import('../model').VariableValueMap;
|
|
10691
10691
|
readonly dataLoading: boolean;
|
|
10692
10692
|
readonly queryStateMessages: string;
|
|
10693
10693
|
readonly queryErrors: any[];
|
|
@@ -14061,7 +14061,7 @@ export declare const useEditPanelContext: () => {
|
|
|
14061
14061
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
14062
14062
|
readonly data: TPanelData;
|
|
14063
14063
|
readonly variableStrings: Record<string, React.ReactNode>;
|
|
14064
|
-
readonly variableValueMap:
|
|
14064
|
+
readonly variableValueMap: import('../model').VariableValueMap;
|
|
14065
14065
|
readonly dataLoading: boolean;
|
|
14066
14066
|
readonly queryStateMessages: string;
|
|
14067
14067
|
readonly queryErrors: any[];
|
|
@@ -2891,7 +2891,7 @@ export declare const PanelModel: import("mobx-state-tree").IModelType<{
|
|
|
2891
2891
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
2892
2892
|
readonly data: TPanelData;
|
|
2893
2893
|
readonly variableStrings: Record<string, import('./react').ReactNode>;
|
|
2894
|
-
readonly variableValueMap:
|
|
2894
|
+
readonly variableValueMap: import('../../../model').VariableValueMap;
|
|
2895
2895
|
readonly dataLoading: boolean;
|
|
2896
2896
|
readonly queryStateMessages: string;
|
|
2897
2897
|
readonly queryErrors: any[];
|