@devtable/dashboard 9.15.0 → 9.16.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.
@@ -1,5 +1,5 @@
1
1
  import { ValidEditorPathType } from '~/model/editor';
2
- export declare function isGlobalVars(path: ValidEditorPathType): boolean;
2
+ export declare function isQueryVars(path: ValidEditorPathType): boolean;
3
3
  export declare function isMockContext(path: ValidEditorPathType): boolean;
4
4
  export declare function isFilter(path: ValidEditorPathType): boolean;
5
5
  export declare function isSQLSnippet(path: ValidEditorPathType): boolean;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const GlobalSQLSnippetsTable: (() => JSX.Element) & {
3
+ displayName: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ViewQueryVars: (() => JSX.Element) & {
3
+ displayName: string;
4
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Sx } from '@mantine/core';
3
+ interface IQueryVariablesGuide {
4
+ showSQLSnippets?: boolean;
5
+ sx?: Sx;
6
+ }
7
+ export declare const QueryVariablesGuide: import('./react').FunctionComponent<IQueryVariablesGuide>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const QueryVariablesModal: (() => JSX.Element) & {
3
+ displayName: string;
4
+ };
@@ -12,13 +12,13 @@ export declare type NavActionType = {
12
12
  export declare type NavLinkType = {
13
13
  label: string;
14
14
  value: string;
15
- _type: 'GROUP' | 'global_variables' | 'mock_context' | 'filter' | 'sql_snippet' | 'query' | 'view' | 'panel';
15
+ _type: 'GROUP' | 'query_variables' | 'mock_context' | 'filter' | 'sql_snippet' | 'query' | 'view' | 'panel';
16
16
  Icon?: TablerIcon;
17
17
  parentID?: string;
18
18
  children?: NavOptionType[];
19
19
  };
20
20
  export declare type NavOptionType = NavLinkType | NavActionType;
21
- export declare type ValidEditorPathType = ['_GLOBAL_VARS_'] | ['_MOCK_CONTEXT_'] | ['_FILTERS_', string] | ['_SQL_SNIPPETS_', string] | ['_QUERIES_', string] | ['_VIEWS_', string] | ['_VIEWS_', string, '_PANELS_', string] | [];
21
+ export declare type ValidEditorPathType = ['_QUERY_VARS_'] | ['_MOCK_CONTEXT_'] | ['_FILTERS_', string] | ['_SQL_SNIPPETS_', string] | ['_QUERIES_', string] | ['_VIEWS_', string] | ['_VIEWS_', string, '_PANELS_', string] | [];
22
22
  export declare const EditorModel: import("mobx-state-tree").IModelType<{
23
23
  path: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<ValidEditorPathType, ValidEditorPathType, ValidEditorPathType>, [undefined]>;
24
24
  settings_open: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
@@ -0,0 +1,7 @@
1
+ export declare const GlobalSQLSnippetModel: import("mobx-state-tree").IModelType<{
2
+ id: import("mobx-state-tree").ISimpleType<string>;
3
+ content: import("mobx-state-tree").ISimpleType<string>;
4
+ create_time: import("mobx-state-tree").ISimpleType<string>;
5
+ update_time: import("mobx-state-tree").ISimpleType<string>;
6
+ is_preset: import("mobx-state-tree").ISimpleType<boolean>;
7
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
@@ -0,0 +1,31 @@
1
+ import { GlobalSQLSnippetDBType } from '~/api-caller';
2
+ export declare const GlobalSQLSnippetsModel: import("mobx-state-tree").IModelType<{
3
+ list: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
4
+ id: import("mobx-state-tree").ISimpleType<string>;
5
+ content: import("mobx-state-tree").ISimpleType<string>;
6
+ create_time: import("mobx-state-tree").ISimpleType<string>;
7
+ update_time: import("mobx-state-tree").ISimpleType<string>;
8
+ is_preset: import("mobx-state-tree").ISimpleType<boolean>;
9
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
10
+ }, {
11
+ find(id: string): ({
12
+ id: string;
13
+ content: string;
14
+ create_time: string;
15
+ update_time: string;
16
+ is_preset: boolean;
17
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
18
+ id: import("mobx-state-tree").ISimpleType<string>;
19
+ content: import("mobx-state-tree").ISimpleType<string>;
20
+ create_time: import("mobx-state-tree").ISimpleType<string>;
21
+ update_time: import("mobx-state-tree").ISimpleType<string>;
22
+ is_preset: import("mobx-state-tree").ISimpleType<boolean>;
23
+ }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
24
+ readonly options: {
25
+ value: string;
26
+ label: string;
27
+ }[];
28
+ } & {
29
+ replace(list: GlobalSQLSnippetDBType[]): void;
30
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
31
+ export declare type GlobalSQLSnippetsModelType = typeof GlobalSQLSnippetsModel;
@@ -5,13 +5,7 @@ export declare function buildHTTPRequest(pre_process: string, params: {
5
5
  context: Record<string, any>;
6
6
  filters: Record<string, any>;
7
7
  }): AxiosRequestConfig<any>;
8
- export declare function getHTTPReqeustBuilderParams(real_context: ContextInfoType, mock_context: Record<string, $TSFixMe>, filterValues: FilterValuesType): {
9
- context: {
10
- [x: string]: any;
11
- };
12
- filters: FilterValuesType;
13
- };
14
- export declare function explainHTTPRequest(pre_process: string, context: ContextInfoType, mock_context: Record<string, $TSFixMe>, filterValues: FilterValuesType): AxiosRequestConfig<any>;
8
+ export declare function explainHTTPRequest(pre_process: string, context: ContextInfoType, filters: FilterValuesType): AxiosRequestConfig<any>;
15
9
  export declare function preProcessWithDataSource(datasource: IDataSource, config: AxiosRequestConfig): any;
16
10
  export declare function postProcessWithDataSource(datasource: IDataSource, res: any): any;
17
11
  export declare function postProcessWithQuery(post_process: TFunctionString, res: any): any;
@@ -1,16 +1,6 @@
1
- import { FilterValuesType } from '../model';
2
- import { ContextInfoType } from '../model/context';
3
- import { SQLSnippetModelInstance } from '../model/sql-snippets';
4
- export declare function explainSQLSnippet(snippet: string, context: ContextInfoType, mock_context: Record<string, $TSFixMe>, filterValues: FilterValuesType): any;
5
- export declare function formatSQL(sql: string, params?: Record<string, $TSFixMe>): any;
6
- export declare function getSQLParams(real_context: ContextInfoType, mock_context: Record<string, $TSFixMe>, sqlSnippets: SQLSnippetModelInstance[], filterValues: FilterValuesType): {
7
- context: {
8
- [x: string]: any;
9
- };
10
- filters: FilterValuesType;
11
- sql_snippets: Record<string, any>;
12
- };
13
- export declare function explainSQL(sql: string, context: ContextInfoType, mock_context: Record<string, $TSFixMe>, sqlSnippets: SQLSnippetModelInstance[], filterValues: FilterValuesType): any;
1
+ import { TPayloadForSQL, TPayloadForSQLSnippet } from '../model';
2
+ export declare function formatSQL(sql: string, payload: TPayloadForSQL | TPayloadForSQLSnippet): any;
3
+ export declare function explainSQL(sql: string, payload: TPayloadForSQL): any;
14
4
  export declare function preProcessSQLQuery({ sql, pre_process }: {
15
5
  sql: string;
16
6
  pre_process: TFunctionString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "9.15.0",
3
+ "version": "9.16.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { Sx } from '@mantine/core';
3
- interface IGlobalVariablesGuide {
4
- showSQLSnippets?: boolean;
5
- sx?: Sx;
6
- }
7
- export declare const GlobalVariablesGuide: import('./react').FunctionComponent<IGlobalVariablesGuide>;
8
- export {};
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const GlobalVariablesModal: (() => JSX.Element) & {
3
- displayName: string;
4
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ViewGlobalVars: (() => JSX.Element) & {
3
- displayName: string;
4
- };