@devtable/dashboard 2.0.0 → 2.3.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.
Files changed (41) hide show
  1. package/dist/api-caller/index.d.ts +11 -3
  2. package/dist/api-caller/types.d.ts +11 -0
  3. package/dist/contexts/filter-values-context.d.ts +4 -0
  4. package/dist/contexts/index.d.ts +1 -0
  5. package/dist/dashboard.es.js +1521 -850
  6. package/dist/dashboard.umd.js +12 -23
  7. package/dist/definition-editor/global-variables-guide.d.ts +8 -0
  8. package/dist/filter/filter-checkbox/editor.d.ts +10 -0
  9. package/dist/filter/filter-checkbox/render.d.ts +9 -0
  10. package/dist/filter/filter-date-range/editor.d.ts +10 -0
  11. package/dist/filter/filter-date-range/render.d.ts +9 -0
  12. package/dist/filter/filter-multi-select/editor.d.ts +11 -0
  13. package/dist/filter/filter-multi-select/render.d.ts +9 -0
  14. package/dist/filter/filter-query-field/index.d.ts +8 -0
  15. package/dist/filter/filter-query-field/select-data-source.d.ts +8 -0
  16. package/dist/filter/filter-select/editor.d.ts +11 -0
  17. package/dist/filter/filter-select/render.d.ts +9 -0
  18. package/dist/filter/filter-settings/filter-setting.d.ts +11 -0
  19. package/dist/filter/filter-settings/filter-settings.d.ts +8 -0
  20. package/dist/filter/filter-settings/index.d.ts +10 -0
  21. package/dist/filter/filter-settings/preview-filter.d.ts +11 -0
  22. package/dist/filter/filter-settings/types.d.ts +4 -0
  23. package/dist/filter/filter-text-input/editor.d.ts +10 -0
  24. package/dist/filter/filter-text-input/render.d.ts +9 -0
  25. package/dist/filter/filter.d.ts +9 -0
  26. package/dist/filter/index.d.ts +9 -0
  27. package/dist/main/actions.d.ts +4 -2
  28. package/dist/main/use-filters.d.ts +8 -0
  29. package/dist/panel/panel-description.d.ts +1 -3
  30. package/dist/style.css +1 -1
  31. package/dist/types/dashboard.d.ts +2 -0
  32. package/dist/types/filter.d.ts +39 -0
  33. package/dist/types/index.d.ts +1 -0
  34. package/dist/utils/sql.d.ts +5 -3
  35. package/dist/utils/template/editor.d.ts +1 -1
  36. package/package.json +19 -18
  37. package/dist/definition-editor/query-editor/context-and-snippets.d.ts +0 -5
  38. package/dist/definition-editor/sql-snippet-editor/context-info.d.ts +0 -5
  39. package/dist/definition-editor/sql-snippet-editor/guide.d.ts +0 -2
  40. package/dist/panel/viz/text/index.d.ts +0 -9
  41. package/dist/panel/viz/text/panel.d.ts +0 -3
@@ -1,12 +1,20 @@
1
- import { ContextInfoContextType } from "../contexts";
1
+ import { ContextInfoContextType, FilterValuesContextType } from "../contexts";
2
2
  import { IDashboardDefinition, IQuery } from "../types";
3
+ import { IDataSource } from "./types";
4
+ interface IQueryByStaticSQL {
5
+ type: 'postgresql';
6
+ key: string;
7
+ sql: string;
8
+ }
9
+ export declare const queryByStaticSQL: ({ type, key, sql }: IQueryByStaticSQL) => () => Promise<any>;
3
10
  interface IQueryBySQL {
4
11
  context: ContextInfoContextType;
5
12
  definitions: IDashboardDefinition;
6
13
  title: string;
7
14
  query?: IQuery;
15
+ filterValues: FilterValuesContextType;
8
16
  }
9
- export declare const queryBySQL: ({ context, definitions, title, query }: IQueryBySQL) => () => Promise<any>;
17
+ export declare const queryBySQL: ({ context, definitions, title, query, filterValues }: IQueryBySQL) => () => Promise<any>;
10
18
  export declare type TQuerySources = Record<string, string[]>;
11
- export declare function listDataSources(): Promise<TQuerySources>;
19
+ export declare function listDataSources(): Promise<IDataSource[]>;
12
20
  export {};
@@ -0,0 +1,11 @@
1
+ export declare type PaginationResponse<T> = {
2
+ total: number;
3
+ offset: number;
4
+ data: T[];
5
+ };
6
+ export declare type DataSourceType = 'postgresql' | 'mysql' | 'http';
7
+ export interface IDataSource {
8
+ id: string;
9
+ type: DataSourceType;
10
+ key: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare type FilterValuesContextType = Record<string, any>;
3
+ export declare const initialFilterValuesContext: {};
4
+ export declare const FilterValuesContext: React.Context<FilterValuesContextType>;
@@ -1,4 +1,5 @@
1
1
  export * from './definition-context';
2
2
  export * from './context-info-context';
3
+ export * from './filter-values-context';
3
4
  export * from './layout-state-context';
4
5
  export * from './panel-context';