@actionexec/dashboards 0.1.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,8 @@
1
+ import type { PaletteConfig } from '../types';
2
+ interface Props {
3
+ config: PaletteConfig;
4
+ palette: string[];
5
+ onChange: (colors: string[]) => void;
6
+ }
7
+ export declare function ColorPaletteWidget({ config, palette, onChange }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { FilterConfig } from '../types';
2
+ interface Props {
3
+ config: FilterConfig;
4
+ value: string;
5
+ options?: string[];
6
+ dateBounds?: {
7
+ min: string | null;
8
+ max: string | null;
9
+ } | null;
10
+ onChange: (value: string) => void;
11
+ }
12
+ export declare function FilterWidget({ config, value, options, dateBounds, onChange }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ data: Record<string, unknown>;
3
+ palette: string[];
4
+ label?: string;
5
+ }
6
+ export declare function GaugeWidget({ data, palette, label: propLabel }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ data: Record<string, unknown>;
3
+ label?: string;
4
+ }
5
+ export declare function KPIWidget({ data, label }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { VariableConfig } from '../types';
2
+ interface Props {
3
+ config: VariableConfig;
4
+ value: number;
5
+ onChange: (value: number) => void;
6
+ }
7
+ export declare function VariableWidget({ config, value, onChange }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { WidgetType, AnyWidgetConfig } from '../types';
2
+ interface Props {
3
+ type: WidgetType;
4
+ computed: Record<string, unknown>;
5
+ palette: string[];
6
+ config?: AnyWidgetConfig;
7
+ filterValue?: string;
8
+ filterOptions?: string[];
9
+ dateBounds?: {
10
+ min: string;
11
+ max: string;
12
+ } | null;
13
+ onFilterChange?: (value: string) => void;
14
+ variableValue?: number;
15
+ onVariableChange?: (value: number) => void;
16
+ onPaletteChange?: (colors: string[]) => void;
17
+ }
18
+ export declare function WidgetRenderer({ type, computed, palette, config, filterValue, filterOptions, dateBounds, onFilterChange, variableValue, onVariableChange, onPaletteChange, }: Props): import("react/jsx-runtime").JSX.Element | null;
19
+ export {};
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@actionexec/dashboards",
3
+ "version": "0.1.0",
4
+ "description": "Biblioteca de renderizacao de dashboards da plataforma Action — componentes React, tipos e utilitarios para consumir a API /external/dashboards.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./styles.css": "./dist/styles.css"
18
+ },
19
+ "sideEffects": [
20
+ "**/*.css"
21
+ ],
22
+ "scripts": {
23
+ "build": "vite build && tsc -p tsconfig.build.json",
24
+ "dev": "vite build --watch",
25
+ "typecheck": "tsc --noEmit"
26
+ },
27
+ "peerDependencies": {
28
+ "react": "^18.2.0",
29
+ "react-dom": "^18.2.0",
30
+ "react-datepicker": "^9.0.0",
31
+ "recharts": "^2.12.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/react": "^18.2.55",
35
+ "@types/react-datepicker": "^6.2.0",
36
+ "@types/react-dom": "^18.2.19",
37
+ "@vitejs/plugin-react": "^4.2.1",
38
+ "react": "^18.2.0",
39
+ "react-datepicker": "^9.1.0",
40
+ "react-dom": "^18.2.0",
41
+ "recharts": "^2.12.0",
42
+ "typescript": "^5.2.2",
43
+ "vite": "^5.1.0"
44
+ }
45
+ }