@dashboard-designer/ui 0.2.4 → 0.2.5

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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  import { Dashboard, VariableValue, Widget, DashboardVariable, DashboardPrintHeader, AuthConfig, User, EmbedTokenRequest, EmbedTokenResponse, ConnectionConfig, ExecuteQueryRequest, QueryResult, ProcedureParameter, DashboardAclEntry, DashboardPermission, DashboardVersionMeta, DashboardVersion, FilterDef, WidgetType } from '@dashboard-designer/core';
2
2
  export { AuthConfig, ConnectionConfig, DASHBOARD_FILE_FORMAT, DASHBOARD_FILE_VERSION, Dashboard, DashboardPrintHeader, DashboardPrintSettings, DashboardVariable, FilterDef, VariableValue, Widget, buildDashboardExportFile, cloneDashboardForImport, parseDashboardImport } from '@dashboard-designer/core';
3
- import * as React from 'react';
4
- import React__default, { ReactNode } from 'react';
3
+ import React, { ReactNode } from 'react';
5
4
  import * as i18next from 'i18next';
6
5
  export { default as i18n } from 'i18next';
7
- import * as lucide_react from 'lucide-react';
8
6
  import { LucideIcon } from 'lucide-react';
9
7
 
10
8
  interface DashboardToolbarContext {
@@ -45,7 +43,7 @@ interface ChartDataRowActionContext {
45
43
  interface ChartDataRowAction {
46
44
  id: string;
47
45
  label: string;
48
- icon: React__default.ReactNode;
46
+ icon: React.ReactNode;
49
47
  onClick: (context: ChartDataRowActionContext) => void | Promise<void>;
50
48
  isVisible?: (context: ChartDataRowActionContext) => boolean;
51
49
  }
@@ -74,7 +72,7 @@ interface DashboardDesignerProps extends DashboardVariableProps, ChartDataAction
74
72
  /** When set, shows Edit / Done in the dashboard toolbar. */
75
73
  onToggleEdit?: () => void;
76
74
  }
77
- declare function DashboardDesigner({ dashboard: initial, printHeader, apiBaseUrl, auth, locale, onChange, onSave, readOnly, onToggleEdit, predefinedVariables, variableValues, variablesReady, resolveVariables, chartDataRowActions, toolbarButtons, hideToolbar, toolbarVisibility, }: DashboardDesignerProps): React__default.JSX.Element;
75
+ declare function DashboardDesigner({ dashboard: initial, printHeader, apiBaseUrl, auth, locale, onChange, onSave, readOnly, onToggleEdit, predefinedVariables, variableValues, variablesReady, resolveVariables, chartDataRowActions, toolbarButtons, hideToolbar, toolbarVisibility, }: DashboardDesignerProps): React.JSX.Element;
78
76
 
79
77
  interface DashboardViewerProps extends DashboardVariableProps, ChartDataActionProps, DashboardToolbarProps {
80
78
  dashboard: Dashboard;
@@ -84,7 +82,7 @@ interface DashboardViewerProps extends DashboardVariableProps, ChartDataActionPr
84
82
  locale?: string;
85
83
  }
86
84
  /** Read-only dashboard renderer for embeds / published views. */
87
- declare function DashboardViewer({ dashboard, apiBaseUrl, auth, locale, ...variables }: DashboardViewerProps): React__default.JSX.Element;
85
+ declare function DashboardViewer({ dashboard, apiBaseUrl, auth, locale, ...variables }: DashboardViewerProps): React.JSX.Element;
88
86
 
89
87
  declare class DashboardApiClient {
90
88
  apiBaseUrl: string;
@@ -226,7 +224,7 @@ interface ChartRendererProps {
226
224
  listboxSelection?: Array<string | number>;
227
225
  onListboxSelectionChange?: (values: Array<string | number>) => void;
228
226
  }
229
- declare function ChartRenderer({ widget, data, locale, currency, loading, onDrillDown, onDataClick, listboxSelection, onListboxSelectionChange, chartColors, }: ChartRendererProps): React__default.JSX.Element;
227
+ declare function ChartRenderer({ widget, data, locale, currency, loading, onDrillDown, onDataClick, listboxSelection, onListboxSelectionChange, chartColors, }: ChartRendererProps): React.JSX.Element;
230
228
 
231
229
  interface FilterBarProps {
232
230
  clearable?: boolean;
@@ -246,7 +244,7 @@ interface FilterBarProps {
246
244
  /** Applied to newly added filters (where = row-level, having = aggregated). */
247
245
  defaultClause?: 'where' | 'having';
248
246
  }
249
- declare function FilterBar({ filters, suggestionRows, clearable, onChange, title, hint, editable, fieldOptions, fieldPlaceholder, fieldEmptyLabel, fieldDisabled, hideHeader, defaultClause, }: FilterBarProps): React__default.JSX.Element;
247
+ declare function FilterBar({ filters, suggestionRows, clearable, onChange, title, hint, editable, fieldOptions, fieldPlaceholder, fieldEmptyLabel, fieldDisabled, hideHeader, defaultClause, }: FilterBarProps): React.JSX.Element;
250
248
 
251
249
  declare function ensureI18n(locale?: string): i18next.i18n;
252
250
 
@@ -260,7 +258,7 @@ interface SearchableSelectProps {
260
258
  disabled?: boolean;
261
259
  emptyLabel?: string;
262
260
  }
263
- declare function SearchableSelect({ id, options, value, onChange, placeholder, multiple, disabled, emptyLabel, }: SearchableSelectProps): React__default.JSX.Element;
261
+ declare function SearchableSelect({ id, options, value, onChange, placeholder, multiple, disabled, emptyLabel, }: SearchableSelectProps): React.JSX.Element;
264
262
 
265
263
  interface FieldHelpProps {
266
264
  /** Help text shown in the tooltip. */
@@ -269,25 +267,25 @@ interface FieldHelpProps {
269
267
  label?: string;
270
268
  }
271
269
  /** Compact help icon with a portal tooltip that stays fully on-screen. */
272
- declare function FieldHelp({ text, label }: FieldHelpProps): React__default.JSX.Element | null;
270
+ declare function FieldHelp({ text, label }: FieldHelpProps): React.JSX.Element | null;
273
271
  interface FieldLabelProps {
274
272
  htmlFor?: string;
275
- children: React__default.ReactNode;
273
+ children: React.ReactNode;
276
274
  /** Help / usage description for this field. */
277
275
  help?: string;
278
276
  className?: string;
279
277
  }
280
278
  /** Field label with an optional inline help icon. */
281
- declare function FieldLabel({ htmlFor, children, help, className }: FieldLabelProps): React__default.JSX.Element;
279
+ declare function FieldLabel({ htmlFor, children, help, className }: FieldLabelProps): React.JSX.Element;
282
280
 
283
281
  declare const ICON_SIZE = 16;
284
282
  declare const chartTypeIcon: Record<WidgetType, LucideIcon>;
285
283
  declare const navIcon: {
286
- readonly dashboards: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
287
- readonly designer: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
288
- readonly viewer: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
289
- readonly connections: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
290
- readonly users: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
284
+ readonly dashboards: LucideIcon;
285
+ readonly designer: LucideIcon;
286
+ readonly viewer: LucideIcon;
287
+ readonly connections: LucideIcon;
288
+ readonly users: LucideIcon;
291
289
  };
292
290
 
293
291
  /** Download the dashboard definition as a JSON file. */