@devtable/dashboard 2.4.0 → 2.5.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 (131) hide show
  1. package/dist/dashboard.es.js +8251 -14258
  2. package/dist/dashboard.umd.js +38 -19
  3. package/package.json +18 -4
  4. package/dist/api-caller/index.d.ts +0 -20
  5. package/dist/api-caller/request.d.ts +0 -5
  6. package/dist/api-caller/types.d.ts +0 -11
  7. package/dist/contexts/context-info-context.d.ts +0 -5
  8. package/dist/contexts/dashboard-action-context.d.ts +0 -9
  9. package/dist/contexts/definition-context.d.ts +0 -7
  10. package/dist/contexts/filter-values-context.d.ts +0 -4
  11. package/dist/contexts/index.d.ts +0 -5
  12. package/dist/contexts/layout-state-context.d.ts +0 -11
  13. package/dist/contexts/panel-context.d.ts +0 -17
  14. package/dist/definition-editor/data-editor-modal.d.ts +0 -7
  15. package/dist/definition-editor/global-variables-guide.d.ts +0 -8
  16. package/dist/definition-editor/index.d.ts +0 -1
  17. package/dist/definition-editor/query-editor/data-preview.d.ts +0 -4
  18. package/dist/definition-editor/query-editor/editor.d.ts +0 -7
  19. package/dist/definition-editor/query-editor/form.d.ts +0 -8
  20. package/dist/definition-editor/query-editor/index.d.ts +0 -5
  21. package/dist/definition-editor/query-editor/preview-sql.d.ts +0 -6
  22. package/dist/definition-editor/query-editor/select-or-add-query.d.ts +0 -7
  23. package/dist/definition-editor/sql-snippet-editor/editor.d.ts +0 -5
  24. package/dist/definition-editor/sql-snippet-editor/index.d.ts +0 -5
  25. package/dist/definition-editor/sql-snippet-editor/preview-snippet.d.ts +0 -6
  26. package/dist/filter/filter-checkbox/editor.d.ts +0 -8
  27. package/dist/filter/filter-checkbox/render.d.ts +0 -10
  28. package/dist/filter/filter-date-range/editor.d.ts +0 -7
  29. package/dist/filter/filter-date-range/render.d.ts +0 -10
  30. package/dist/filter/filter-multi-select/editor.d.ts +0 -7
  31. package/dist/filter/filter-multi-select/render.d.ts +0 -10
  32. package/dist/filter/filter-query-field/index.d.ts +0 -8
  33. package/dist/filter/filter-query-field/select-data-source.d.ts +0 -8
  34. package/dist/filter/filter-query-field/test-query.d.ts +0 -7
  35. package/dist/filter/filter-select/editor.d.ts +0 -7
  36. package/dist/filter/filter-select/render.d.ts +0 -10
  37. package/dist/filter/filter-settings/filter-setting.d.ts +0 -8
  38. package/dist/filter/filter-settings/filter-settings.d.ts +0 -7
  39. package/dist/filter/filter-settings/index.d.ts +0 -9
  40. package/dist/filter/filter-settings/preview-filter.d.ts +0 -7
  41. package/dist/filter/filter-text-input/editor.d.ts +0 -7
  42. package/dist/filter/filter-text-input/render.d.ts +0 -10
  43. package/dist/filter/filter.d.ts +0 -9
  44. package/dist/filter/index.d.ts +0 -9
  45. package/dist/index.d.ts +0 -5
  46. package/dist/layout/index.d.ts +0 -12
  47. package/dist/layout/read-only.d.ts +0 -9
  48. package/dist/main/actions.d.ts +0 -14
  49. package/dist/main/full-screen-panel.d.ts +0 -6
  50. package/dist/main/index.d.ts +0 -2
  51. package/dist/main/main.d.ts +0 -12
  52. package/dist/main/read-only.d.ts +0 -11
  53. package/dist/main/toggle-mode.d.ts +0 -8
  54. package/dist/main/use-filters.d.ts +0 -2128
  55. package/dist/main/use-panel-full-screen.d.ts +0 -7
  56. package/dist/main/view-schema-modal.d.ts +0 -8
  57. package/dist/model/dashboard.d.ts +0 -8103
  58. package/dist/model/filter/checkbox.d.ts +0 -16
  59. package/dist/model/filter/common.d.ts +0 -14
  60. package/dist/model/filter/date-range.d.ts +0 -28
  61. package/dist/model/filter/index.d.ts +0 -172
  62. package/dist/model/filter/multi-select.d.ts +0 -81
  63. package/dist/model/filter/select.d.ts +0 -95
  64. package/dist/model/filter/text-input.d.ts +0 -22
  65. package/dist/model/index.d.ts +0 -2
  66. package/dist/panel/error-boundary.d.ts +0 -13
  67. package/dist/panel/index.d.ts +0 -7
  68. package/dist/panel/panel-description.d.ts +0 -5
  69. package/dist/panel/settings/common/aggregation-selector.d.ts +0 -9
  70. package/dist/panel/settings/common/color-array-input.d.ts +0 -8
  71. package/dist/panel/settings/common/data-field-selector.d.ts +0 -12
  72. package/dist/panel/settings/common/mantine-color.d.ts +0 -7
  73. package/dist/panel/settings/common/mantine-font-weight.d.ts +0 -8
  74. package/dist/panel/settings/common/numbro-format-selector.d.ts +0 -13
  75. package/dist/panel/settings/common/text-array-input.d.ts +0 -8
  76. package/dist/panel/settings/index.d.ts +0 -7
  77. package/dist/panel/settings/panel-config/description.d.ts +0 -2
  78. package/dist/panel/settings/panel-config/index.d.ts +0 -5
  79. package/dist/panel/settings/panel-config/preview-panel.d.ts +0 -2
  80. package/dist/panel/settings/panel-config/title.d.ts +0 -2
  81. package/dist/panel/settings/pick-query/index.d.ts +0 -5
  82. package/dist/panel/settings/viz-config/index.d.ts +0 -5
  83. package/dist/panel/settings/viz-config/preview-viz.d.ts +0 -5
  84. package/dist/panel/settings/viz-config/viz-conf.d.ts +0 -2
  85. package/dist/panel/title-bar.d.ts +0 -5
  86. package/dist/panel/viz/bar-3d/index.d.ts +0 -9
  87. package/dist/panel/viz/bar-3d/panel.d.ts +0 -3
  88. package/dist/panel/viz/cartesian/index.d.ts +0 -10
  89. package/dist/panel/viz/cartesian/option/regression.d.ts +0 -20
  90. package/dist/panel/viz/cartesian/panel/index.d.ts +0 -3
  91. package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +0 -11
  92. package/dist/panel/viz/cartesian/panel/regressions/regression-item.d.ts +0 -16
  93. package/dist/panel/viz/cartesian/panel/series/fields.bar.d.ts +0 -9
  94. package/dist/panel/viz/cartesian/panel/series/fields.line.d.ts +0 -9
  95. package/dist/panel/viz/cartesian/panel/series/fields.scatter.d.ts +0 -9
  96. package/dist/panel/viz/cartesian/panel/series/index.d.ts +0 -11
  97. package/dist/panel/viz/cartesian/panel/series/series-item.d.ts +0 -16
  98. package/dist/panel/viz/cartesian/panel/stats/index.d.ts +0 -10
  99. package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +0 -11
  100. package/dist/panel/viz/cartesian/panel/y-axes.d.ts +0 -9
  101. package/dist/panel/viz/cartesian/type.d.ts +0 -58
  102. package/dist/panel/viz/index.d.ts +0 -9
  103. package/dist/panel/viz/pie/index.d.ts +0 -9
  104. package/dist/panel/viz/pie/panel.d.ts +0 -3
  105. package/dist/panel/viz/rich-text/index.d.ts +0 -10
  106. package/dist/panel/viz/rich-text/panel.d.ts +0 -3
  107. package/dist/panel/viz/rich-text/type.d.ts +0 -8
  108. package/dist/panel/viz/stats/index.d.ts +0 -10
  109. package/dist/panel/viz/stats/panel/index.d.ts +0 -10
  110. package/dist/panel/viz/stats/panel/variable.d.ts +0 -11
  111. package/dist/panel/viz/stats/panel/variables.d.ts +0 -10
  112. package/dist/panel/viz/stats/types.d.ts +0 -6
  113. package/dist/panel/viz/stats/update/index.d.ts +0 -15
  114. package/dist/panel/viz/sunburst/index.d.ts +0 -9
  115. package/dist/panel/viz/sunburst/panel.d.ts +0 -3
  116. package/dist/panel/viz/table/index.d.ts +0 -10
  117. package/dist/panel/viz/table/panel.d.ts +0 -3
  118. package/dist/panel/viz/table/type.d.ts +0 -21
  119. package/dist/panel/viz/table/value-type-selector.d.ts +0 -10
  120. package/dist/panel/viz/table/value.d.ts +0 -8
  121. package/dist/types/dashboard.d.ts +0 -49
  122. package/dist/types/filter.d.ts +0 -7
  123. package/dist/types/index.d.ts +0 -3
  124. package/dist/types/viz-panel.d.ts +0 -6
  125. package/dist/utils/aggregation.d.ts +0 -2
  126. package/dist/utils/color-mapping.d.ts +0 -9
  127. package/dist/utils/sql.d.ts +0 -8
  128. package/dist/utils/template/editor.d.ts +0 -16
  129. package/dist/utils/template/render.d.ts +0 -3
  130. package/dist/utils/template/types.d.ts +0 -21
  131. package/dist/vite-env.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,9 +24,15 @@
24
24
  "scripts": {
25
25
  "dev-build": "tsc && vite build --watch",
26
26
  "build": "tsc && vite build",
27
- "preview": "vite preview"
27
+ "preview": "vite preview",
28
+ "test": "vitest",
29
+ "test:ui": "vitest --ui",
30
+ "coverage": "vitest --coverage"
28
31
  },
29
32
  "dependencies": {
33
+ "eventemitter2": "^6.4.6",
34
+ "file-saver": "2.0.5",
35
+ "jszip": "3.10.1",
30
36
  "popmotion": "^11.0.3"
31
37
  },
32
38
  "devDependencies": {
@@ -38,17 +44,24 @@
38
44
  "@mantine/notifications": "^5.0.2",
39
45
  "@mantine/prism": "^5.0.2",
40
46
  "@mantine/rte": "^5.0.2",
47
+ "@testing-library/jest-dom": "^5.16.4",
48
+ "@testing-library/react": "^13.3.0",
49
+ "@testing-library/react-hooks": "^8.0.1",
50
+ "@testing-library/user-event": "^14.3.0",
51
+ "@types/file-saver": "2.0.5",
41
52
  "@types/lodash": "^4.14.182",
42
53
  "@types/react": "^18.0.0",
43
54
  "@types/react-dom": "^18.0.0",
44
55
  "@types/react-grid-layout": "^1.3.2",
45
56
  "@vitejs/plugin-react": "^1.3.0",
57
+ "@vitest/ui": "^0.19.1",
46
58
  "ahooks": "^3.3.11",
47
59
  "axios": "^0.27.2",
48
60
  "echarts": "^5.3.2",
49
61
  "echarts-for-react": "^3.0.2",
50
62
  "echarts-gl": "^2.0.9",
51
63
  "echarts-stat": "1.2.0",
64
+ "jsdom": "^20.0.0",
52
65
  "lodash": "^4.17.21",
53
66
  "numbro": "^2.3.6",
54
67
  "react-grid-layout": "^1.3.4",
@@ -56,8 +69,9 @@
56
69
  "rollup-plugin-visualizer": "5.6.0",
57
70
  "tabler-icons-react": "^1.48.0",
58
71
  "typescript": "^4.6.3",
59
- "vite": "^2.9.9",
60
- "vite-plugin-dts": "^1.1.1"
72
+ "vite": "^3.0.3",
73
+ "vite-plugin-dts": "^1.1.1",
74
+ "vitest": "^0.19.1"
61
75
  },
62
76
  "peerDependencies": {
63
77
  "@emotion/react": "11.10.0",
@@ -1,20 +0,0 @@
1
- import { ContextInfoContextType, FilterValuesContextType } from '../contexts';
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>;
10
- interface IQueryBySQL {
11
- context: ContextInfoContextType;
12
- definitions: IDashboardDefinition;
13
- title: string;
14
- query?: IQuery;
15
- filterValues: FilterValuesContextType;
16
- }
17
- export declare const queryBySQL: ({ context, definitions, title, query, filterValues }: IQueryBySQL) => () => Promise<any>;
18
- export declare type TQuerySources = Record<string, string[]>;
19
- export declare function listDataSources(): Promise<IDataSource[]>;
20
- export {};
@@ -1,5 +0,0 @@
1
- import { Method } from 'axios';
2
- export declare const APIClient: {
3
- baseURL: string;
4
- getRequest(method: Method): (url: string, data: any, options?: any) => Promise<any>;
5
- };
@@ -1,11 +0,0 @@
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
- }
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare type TimeRangeType = [Date | null, Date | null];
3
- export declare type ContextInfoContextType = Record<string, TimeRangeType | any | any[]>;
4
- export declare const initialContextInfoContext: {};
5
- export declare const ContextInfoContext: React.Context<ContextInfoContextType>;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export interface IDashboardActionContext {
3
- addPanel: () => void;
4
- duplidatePanel: (id: string) => void;
5
- removePanelByID: (id: string) => void;
6
- viewPanelInFullScreen: (id: string) => void;
7
- inFullScreen: boolean;
8
- }
9
- export declare const DashboardActionContext: React.Context<IDashboardActionContext>;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { IDashboardDefinition, IQuery, ISQLSnippet } from '../types';
3
- export interface IDefinitionContext extends IDashboardDefinition {
4
- setSQLSnippets: React.Dispatch<React.SetStateAction<ISQLSnippet[]>>;
5
- setQueries: React.Dispatch<React.SetStateAction<IQuery[]>>;
6
- }
7
- export declare const DefinitionContext: React.Context<IDefinitionContext>;
@@ -1,4 +0,0 @@
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,5 +0,0 @@
1
- export * from './definition-context';
2
- export * from './context-info-context';
3
- export * from './filter-values-context';
4
- export * from './layout-state-context';
5
- export * from './panel-context';
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { DashboardMode } from '../types/dashboard';
3
- export interface ILayoutStateContext {
4
- layoutFrozen: boolean;
5
- freezeLayout: React.Dispatch<React.SetStateAction<boolean>>;
6
- mode: DashboardMode;
7
- inEditMode: boolean;
8
- inLayoutMode: boolean;
9
- inUseMode: boolean;
10
- }
11
- export declare const LayoutStateContext: React.Context<ILayoutStateContext>;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { IVizConfig } from '../types/dashboard';
3
- export interface IPanelContext {
4
- id: string;
5
- data: any[];
6
- loading: boolean;
7
- title: string;
8
- setTitle: React.Dispatch<React.SetStateAction<string>>;
9
- description: string;
10
- setDescription: React.Dispatch<React.SetStateAction<string>>;
11
- queryID: string;
12
- setQueryID: React.Dispatch<React.SetStateAction<string>>;
13
- viz: IVizConfig;
14
- setViz: React.Dispatch<React.SetStateAction<IVizConfig>>;
15
- refreshData: () => void;
16
- }
17
- export declare const PanelContext: React.Context<IPanelContext>;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface IDataEditorModal {
3
- opened: boolean;
4
- close: () => void;
5
- }
6
- export declare function DataEditorModal({ opened, close }: IDataEditorModal): JSX.Element;
7
- export {};
@@ -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 function GlobalVariablesGuide({ showSQLSnippets, sx }: IGlobalVariablesGuide): JSX.Element;
8
- export {};
@@ -1 +0,0 @@
1
- export * from './data-editor-modal';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function DataPreview({ id }: {
3
- id: string;
4
- }): JSX.Element;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface IQueryEditor {
3
- id: string;
4
- setID: React.Dispatch<React.SetStateAction<string>>;
5
- }
6
- export declare function QueryEditor({ id, setID }: IQueryEditor): JSX.Element | null;
7
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { IQuery } from '../../types';
3
- interface IQueryForm {
4
- value: IQuery;
5
- onChange: any;
6
- }
7
- export declare function QueryForm({ value, onChange }: IQueryForm): JSX.Element;
8
- export {};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- interface IEditQueries {
3
- }
4
- export declare function EditQueries({}: IEditQueries): JSX.Element;
5
- export {};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface IPreviewSQL {
3
- value: string;
4
- }
5
- export declare function PreviewSQL({ value }: IPreviewSQL): JSX.Element;
6
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface ISelectOrAddQuery {
3
- id: string;
4
- setID: React.Dispatch<React.SetStateAction<string>>;
5
- }
6
- export declare function SelectOrAddQuery({ id, setID }: ISelectOrAddQuery): JSX.Element;
7
- export {};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- interface ISQLSnippetsEditor {
3
- }
4
- export declare function SQLSnippetsEditor({}: ISQLSnippetsEditor): JSX.Element;
5
- export {};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- interface IEditSQLSnippets {
3
- }
4
- export declare function EditSQLSnippets({}: IEditSQLSnippets): JSX.Element;
5
- export {};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface IPreviewSnippet {
3
- value: string;
4
- }
5
- export declare function PreviewSnippet({ value }: IPreviewSnippet): JSX.Element;
6
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFilterConfig_Checkbox } from '../../model/filter/checkbox';
3
- interface IFilterEditorCheckbox {
4
- config: IFilterConfig_Checkbox;
5
- index: number;
6
- }
7
- export declare const FilterEditorCheckbox: import("react").FunctionComponent<IFilterEditorCheckbox>;
8
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterModelInstance } from '../../model';
3
- import { IFilterConfig_Checkbox } from '../../model/filter/checkbox';
4
- interface IFilterCheckbox extends Omit<FilterModelInstance, 'key' | 'type' | 'config'> {
5
- config: IFilterConfig_Checkbox;
6
- value: any;
7
- onChange: (v: any) => void;
8
- }
9
- export declare function FilterCheckbox({ label, config: { default_value, ...rest }, value, onChange }: IFilterCheckbox): JSX.Element;
10
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFilterConfig_DateRange } from '../../model/filter/date-range';
3
- interface IFilterEditorDateRange {
4
- config: IFilterConfig_DateRange;
5
- }
6
- export declare const FilterEditorDateRange: import("react").FunctionComponent<IFilterEditorDateRange>;
7
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterModelInstance } from '../../model';
3
- import { IFilterConfig_DateRange } from '../../model/filter/date-range';
4
- interface IFilterDateRange extends Omit<FilterModelInstance, 'key' | 'type' | 'config'> {
5
- config: IFilterConfig_DateRange;
6
- value: any;
7
- onChange: (v: any) => void;
8
- }
9
- export declare function FilterDateRange({ label, config, value, onChange }: IFilterDateRange): JSX.Element;
10
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFilterConfig_MultiSelect } from '../../model/filter/multi-select';
3
- interface IFilterEditorMultiSelect {
4
- config: IFilterConfig_MultiSelect;
5
- }
6
- export declare const FilterEditorMultiSelect: import("react").FunctionComponent<IFilterEditorMultiSelect>;
7
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterModelInstance } from '../../model';
3
- import { IFilterConfig_MultiSelect } from '../../model/filter/multi-select';
4
- interface IFilterMultiSelect extends Omit<FilterModelInstance, 'key' | 'type' | 'config'> {
5
- config: IFilterConfig_MultiSelect;
6
- value: any;
7
- onChange: (v: any) => void;
8
- }
9
- export declare function FilterMultiSelect({ label, config, value, onChange }: IFilterMultiSelect): JSX.Element;
10
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { IFilterOptionQuery } from '../../model/filter/common';
3
- interface IFilterQueryField {
4
- value: IFilterOptionQuery;
5
- onChange: (v: IFilterOptionQuery) => void;
6
- }
7
- export declare const FilterQueryField: React.FunctionComponent<IFilterQueryField>;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { IFilterOptionQuery } from '../../model/filter/common';
3
- interface ISelectDataSource {
4
- value: IFilterOptionQuery;
5
- onChange: (v: IFilterOptionQuery) => void;
6
- }
7
- export declare const SelectDataSource: React.FunctionComponent<ISelectDataSource>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { IFilterOptionQuery } from '../../model/filter/common';
3
- interface ITestQuery {
4
- query: IFilterOptionQuery;
5
- }
6
- export declare const TestQuery: React.FunctionComponent<ITestQuery>;
7
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFilterConfig_Select } from '../../model/filter/select';
3
- interface IFilterEditorSelect {
4
- config: IFilterConfig_Select;
5
- }
6
- export declare const FilterEditorSelect: import("react").FunctionComponent<IFilterEditorSelect>;
7
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterModelInstance } from '../../model';
3
- import { IFilterConfig_Select } from '../../model/filter/select';
4
- interface IFilterSelect extends Omit<FilterModelInstance, 'key' | 'type' | 'config'> {
5
- config: IFilterConfig_Select;
6
- value: any;
7
- onChange: (v: any) => void;
8
- }
9
- export declare function FilterSelect({ label, config, value, onChange }: IFilterSelect): JSX.Element;
10
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { FilterModelInstance } from '../../model';
3
- interface IFilterSetting {
4
- filter: FilterModelInstance;
5
- index: number;
6
- }
7
- export declare const FilterSetting: React.FunctionComponent<IFilterSetting>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { DashboardModelInstance } from '../../model';
3
- interface FilterSettings {
4
- model: DashboardModelInstance;
5
- }
6
- export declare const FilterSettings: React.FunctionComponent<FilterSettings>;
7
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { DashboardModelInstance } from '../../model';
3
- interface FilterSettingsModal {
4
- opened: boolean;
5
- close: () => void;
6
- model: DashboardModelInstance;
7
- }
8
- export declare function FilterSettingsModal({ opened, close, model }: FilterSettingsModal): JSX.Element;
9
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { FilterModelInstance } from '../../model';
3
- interface IPreviewFilter {
4
- filter: FilterModelInstance;
5
- }
6
- export declare const PreviewFilter: React.FunctionComponent<IPreviewFilter>;
7
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFilterConfig_TextInput } from '../../model/filter/text-input';
3
- interface IFilterEditorTextInput {
4
- config: IFilterConfig_TextInput;
5
- }
6
- export declare const FilterEditorTextInput: import("react").FunctionComponent<IFilterEditorTextInput>;
7
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterModelInstance } from '../../model';
3
- import { IFilterConfig_TextInput } from '../../model/filter/text-input';
4
- interface IFilterTextInput extends Omit<FilterModelInstance, 'key' | 'type' | 'config'> {
5
- config: IFilterConfig_TextInput;
6
- value: any;
7
- onChange: (v: any) => void;
8
- }
9
- export declare function FilterTextInput({ label, config, value, onChange }: IFilterTextInput): JSX.Element;
10
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { FilterModelInstance } from '../model';
3
- interface IFilter {
4
- filter: FilterModelInstance;
5
- value: any;
6
- onChange: (v: any) => void;
7
- }
8
- export declare const Filter: React.ForwardRefExoticComponent<IFilter & React.RefAttributes<unknown>>;
9
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { FilterModelInstance } from '../model';
3
- interface IFilters {
4
- filters: FilterModelInstance[];
5
- filterValues: Record<string, any>;
6
- setFilterValues: (v: Record<string, any>) => void;
7
- }
8
- export declare function Filters({ filters, filterValues, setFilterValues }: IFilters): JSX.Element | null;
9
- export {};
package/dist/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from './main';
2
- export * from './layout';
3
- export * from './panel';
4
- export * from './contexts';
5
- export * from './types';
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { IDashboardPanel } from '../types/dashboard';
3
- interface IDashboardLayout {
4
- panels: IDashboardPanel[];
5
- setPanels: React.Dispatch<React.SetStateAction<IDashboardPanel[]>>;
6
- className?: string;
7
- rowHeight?: number;
8
- isDraggable: boolean;
9
- isResizable: boolean;
10
- }
11
- export declare function DashboardLayout({ panels, setPanels, className, rowHeight, isDraggable, isResizable, }: IDashboardLayout): JSX.Element;
12
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { IDashboardPanel } from '../types/dashboard';
3
- interface IReadOnlyDashboardLayout {
4
- panels: IDashboardPanel[];
5
- className?: string;
6
- rowHeight?: number;
7
- }
8
- export declare function ReadOnlyDashboardLayout({ panels, className, rowHeight }: IReadOnlyDashboardLayout): JSX.Element;
9
- export {};
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { DashboardMode } from '../types';
3
- import { DashboardModelInstance } from '../model';
4
- interface IDashboardActions {
5
- mode: DashboardMode;
6
- setMode: React.Dispatch<React.SetStateAction<DashboardMode>>;
7
- hasChanges: boolean;
8
- saveChanges: () => void;
9
- revertChanges: () => void;
10
- getCurrentSchema: () => any;
11
- model: DashboardModelInstance;
12
- }
13
- export declare function DashboardActions({ mode, setMode, hasChanges, saveChanges, revertChanges, getCurrentSchema, model, }: IDashboardActions): JSX.Element;
14
- export {};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { IDashboardPanel } from '../types';
3
- export declare function FullScreenPanel({ panel, exitFullScreen }: {
4
- panel: IDashboardPanel;
5
- exitFullScreen: () => void;
6
- }): JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './main';
2
- export * from './read-only';
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { IDashboard, IDashboardConfig } from '../types/dashboard';
3
- import { ContextInfoContextType } from '../contexts';
4
- interface IDashboardProps {
5
- context: ContextInfoContextType;
6
- dashboard: IDashboard;
7
- className?: string;
8
- update: (dashboard: IDashboard) => Promise<void>;
9
- config: IDashboardConfig;
10
- }
11
- export declare const Dashboard: React.FunctionComponent<IDashboardProps>;
12
- export {};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { IDashboard, IDashboardConfig } from '../types/dashboard';
3
- import { ContextInfoContextType } from '../contexts';
4
- interface IReadOnlyDashboard {
5
- context: ContextInfoContextType;
6
- dashboard: IDashboard;
7
- className?: string;
8
- config: IDashboardConfig;
9
- }
10
- export declare function ReadOnlyDashboard({ context, dashboard, className, config }: IReadOnlyDashboard): JSX.Element;
11
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { DashboardMode } from '../types/dashboard';
3
- interface IModeToggler {
4
- mode: DashboardMode;
5
- setMode: React.Dispatch<React.SetStateAction<DashboardMode>>;
6
- }
7
- export declare function ModeToggler({ mode, setMode }: IModeToggler): JSX.Element;
8
- export {};