@devtable/dashboard 5.6.1 → 5.7.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.
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const MockContextEditor: import("react").FunctionComponent<object>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function EditMockContext(): JSX.Element;
@@ -0,0 +1,14 @@
1
+ export declare const MockContextModel: import("mobx-state-tree").IModelType<{
2
+ original: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
3
+ current: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
4
+ }, {
5
+ readonly keys: string[];
6
+ readonly entries: [string, unknown][];
7
+ readonly changed: boolean;
8
+ } & {
9
+ replace(record: Record<string, $TSFixMe>): void;
10
+ get(key: string): any;
11
+ set(key: string, value: $TSFixMe): void;
12
+ reset(): void;
13
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
14
+ export declare type MockContextInfoType = Record<string, $TSFixMe>;
@@ -34,6 +34,7 @@ export declare enum DashboardMode {
34
34
  export interface IDashboardDefinition {
35
35
  sqlSnippets: SQLSnippetModelInstance[];
36
36
  queries: QueryModelInstance[];
37
+ mock_context: Record<string, $TSFixMe>;
37
38
  }
38
39
  export declare enum EViewComponentType {
39
40
  Division = "div",
@@ -1,11 +1,13 @@
1
1
  import { FilterValuesType } from '../model';
2
2
  import { ContextInfoType } from '../model/context';
3
3
  import { SQLSnippetModelInstance } from '../model/sql-snippets';
4
- export declare function explainSQLSnippet(snippet: string, context: ContextInfoType, filterValues: FilterValuesType): any;
4
+ export declare function explainSQLSnippet(snippet: string, context: ContextInfoType, mock_context: Record<string, $TSFixMe>, filterValues: FilterValuesType): any;
5
5
  export declare function formatSQL(sql: string, params?: Record<string, $TSFixMe>): any;
6
- export declare function getSQLParams(context: ContextInfoType, sqlSnippets: SQLSnippetModelInstance[], filterValues: FilterValuesType): {
7
- context: ContextInfoType;
6
+ export declare function getSQLParams(real_context: ContextInfoType, mock_context: Record<string, $TSFixMe>, sqlSnippets: SQLSnippetModelInstance[], filterValues: FilterValuesType): {
7
+ context: {
8
+ [x: string]: any;
9
+ };
8
10
  filters: FilterValuesType;
9
11
  sql_snippets: Record<string, any>;
10
12
  };
11
- export declare function explainSQL(sql: string, context: ContextInfoType, sqlSnippets: SQLSnippetModelInstance[], filterValues: FilterValuesType): any;
13
+ export declare function explainSQL(sql: string, context: ContextInfoType, mock_context: Record<string, $TSFixMe>, sqlSnippets: SQLSnippetModelInstance[], filterValues: FilterValuesType): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "5.6.1",
3
+ "version": "5.7.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",