@redsift/dashboard 7.6.1 → 7.7.0-alpha.1

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 (4) hide show
  1. package/index.d.ts +107 -10
  2. package/index.js +2130 -3725
  3. package/index.js.map +1 -1
  4. package/package.json +7 -4
package/index.d.ts CHANGED
@@ -281,7 +281,8 @@ declare enum DashboardReducerActionType {
281
281
  ResetFilter = "reset-filter",
282
282
  ResetFilters = "reset-filters",
283
283
  FilterTable = "filter-table",
284
- FilterTableBatch = "filter-table-batch"
284
+ FilterTableBatch = "filter-table-batch",
285
+ AppendFilterTableBatch = "append-filter-table-batch"
285
286
  }
286
287
  type DashboardReducerAction = {
287
288
  type: DashboardReducerActionType;
@@ -334,7 +335,7 @@ declare const HorizontalBarChartTheme: {
334
335
  readonly monochrome: "monochrome";
335
336
  };
336
337
  type HorizontalBarChartTheme = ValueOf<typeof HorizontalBarChartTheme>;
337
- interface LocaleText$3 {
338
+ interface LocaleText$4 {
338
339
  emptyChartTitle?: string;
339
340
  emptyChartSubtitle?: string;
340
341
  emptyChartResetLabel?: string;
@@ -368,7 +369,7 @@ interface HorizontalBarChartProps extends ComponentProps<'div'> {
368
369
  /** Whether the reset button is hidden or not. */
369
370
  isResetable?: boolean;
370
371
  /** Overriden values for internal labels and texts. */
371
- localeText?: LocaleText$3;
372
+ localeText?: LocaleText$4;
372
373
  /** Method to call when a filter occured on the chart. */
373
374
  onFilter?: (filters?: string[]) => void;
374
375
  /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */
@@ -386,7 +387,7 @@ type StyledHorizontalBarChartProps = Omit<HorizontalBarChartProps, 'columnToFilt
386
387
 
387
388
  declare const HorizontalBarChart: Comp<HorizontalBarChartProps, HTMLDivElement>;
388
389
 
389
- interface LocaleText$2 {
390
+ interface LocaleText$3 {
390
391
  maxSizeDisclaimer?: string;
391
392
  }
392
393
  interface PdfExportButtonProps extends ButtonProps {
@@ -397,7 +398,7 @@ interface PdfExportButtonProps extends ButtonProps {
397
398
  /** Text to display at the beginning of the PDF. */
398
399
  introduction?: string;
399
400
  /** Labels and texts. */
400
- localeText?: LocaleText$2;
401
+ localeText?: LocaleText$3;
401
402
  /** Image to put at the top of the PDF (SVG format not supported). */
402
403
  logo?: string;
403
404
  /** Function to be executed when button is clicked. */
@@ -408,7 +409,7 @@ interface PdfExportButtonProps extends ButtonProps {
408
409
 
409
410
  declare const PdfExportButton: Comp<PdfExportButtonProps, HTMLButtonElement>;
410
411
 
411
- interface LocaleText$1 {
412
+ interface LocaleText$2 {
412
413
  emptyChartTitle?: string;
413
414
  emptyChartSubtitle?: string;
414
415
  emptyChartResetLabel?: string;
@@ -440,7 +441,7 @@ interface PieChartProps extends ComponentProps<'div'> {
440
441
  /** Define whether the labels should be displayed inside or outside the charts and if they should contain raw or percentage values. */
441
442
  labelVariant?: PieChartLabelVariant;
442
443
  /** Overriden values for internal labels and texts. */
443
- localeText?: LocaleText$1;
444
+ localeText?: LocaleText$2;
444
445
  /** Method to call when a filter occured on the chart. */
445
446
  onFilter?: (filters?: string[]) => void;
446
447
  /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */
@@ -492,7 +493,7 @@ declare const TimeSeriesBarChartTheme: {
492
493
  };
493
494
  type TimeSeriesBarChartTheme = ValueOf<typeof TimeSeriesBarChartTheme>;
494
495
  type datetimeEnum = 'hour' | 'day' | 'week' | 'month' | 'year';
495
- interface LocaleText {
496
+ interface LocaleText$1 {
496
497
  emptyChartTitle?: string;
497
498
  emptyChartSubtitle?: string;
498
499
  emptyChartResetLabel?: string;
@@ -521,7 +522,7 @@ interface TimeSeriesBarChartProps extends ComponentProps<'div'> {
521
522
  /** Whether the reset button is hidden or not. */
522
523
  isResetable?: boolean;
523
524
  /** Overriden values for internal labels and texts. */
524
- localeText?: LocaleText;
525
+ localeText?: LocaleText$1;
525
526
  /** Method to call when a filter occured on the chart. */
526
527
  onFilter?: (filters?: string[], allFiltered?: JSONArray) => void;
527
528
  /** TimeSeriesChart size. */
@@ -541,4 +542,100 @@ type StyledTimeSeriesBarChartProps = Omit<TimeSeriesBarChartProps, 'dimension' |
541
542
 
542
543
  declare const TimeSeriesBarChart: Comp<TimeSeriesBarChartProps, HTMLDivElement>;
543
544
 
544
- export { COUNT, ChartDimensions, ChartEmptyState, ChartEmptyStateProps, Dashboard, DashboardContext, DashboardContextProps, DashboardProps, DashboardReducer, DashboardReducerAction, DashboardReducerActionType, DashboardReducerState, DataGrid, DataGridProps, Dimension, DimensionSelector, Group, GroupSelector, HorizontalBarChart, HorizontalBarChartProps, HorizontalBarChartSize, HorizontalBarChartTheme, JSONArray, JSONObject, JSONValue, PdfExportButton, PieChart, PieChartProps, SUM, StyledHorizontalBarChartProps, StyledPieChartProps, StyledTimeSeriesBarChartProps, SuccessDangerColorTheme, TNdx, TimeSeriesBarChart, TimeSeriesBarChartProps, TimeSeriesBarChartSize, TimeSeriesBarChartTheme, datetimeEnum, groupReduceSum, initialState };
545
+ /**
546
+ * Component size.
547
+ */
548
+ declare const ScatterPlotSize: {
549
+ readonly xlarge: "xlarge";
550
+ readonly large: "large";
551
+ readonly medium: "medium";
552
+ readonly small: "small";
553
+ };
554
+ type ScatterPlotSize = ValueOf<typeof ScatterPlotSize>;
555
+ /**
556
+ * Component's labels variant.
557
+ */
558
+ declare const ScatterPlotLabelVariant: {
559
+ readonly none: "none";
560
+ readonly label: "label";
561
+ readonly labelValue: "labelValue";
562
+ readonly labelPercent: "labelPercent";
563
+ };
564
+ type ScatterPlotLabelVariant = ValueOf<typeof ScatterPlotLabelVariant>;
565
+ /**
566
+ * Component theme.
567
+ */
568
+ declare const ScatterPlotTheme: {
569
+ readonly default: "default";
570
+ readonly dark: "dark";
571
+ readonly darker: "darker";
572
+ readonly monochrome: "monochrome";
573
+ };
574
+ type ScatterPlotTheme = ValueOf<typeof ScatterPlotTheme>;
575
+ interface LocaleText {
576
+ emptyChartTitle?: string;
577
+ emptyChartSubtitle?: string;
578
+ emptyChartResetLabel?: string;
579
+ resetLabel?: string;
580
+ }
581
+ /**
582
+ * Component props.
583
+ */
584
+ interface ScatterPlotProps extends ComponentProps<'div'> {
585
+ /** Defines the fields to display on hover. An array of key/value will indicate which field to display and how to name it. An object of selectable fields and default selected fields can be used to make the annotations customizable by the user. */
586
+ annotations?: {
587
+ key: string;
588
+ value: string;
589
+ }[] | {
590
+ /** List of fields selected by default. Should only contain values that are keys in selectableFields prop. */
591
+ defaultSelectedFields?: string[];
592
+ /** List of fields to display inside the tooltip. keys should match the ones in the dataset and values would be the one used to label the checkboxes. */
593
+ selectableFields: {
594
+ key: string;
595
+ value: string;
596
+ }[];
597
+ };
598
+ /** Caption. */
599
+ caption?: string;
600
+ /** Dataset to use to generate the chart, if no context is provided. */
601
+ data?: JSONArray;
602
+ /** Which datagrid column the chart is filtering for x and y but also for category if provided. */
603
+ datagridFilter?: {
604
+ x: string;
605
+ y: string;
606
+ category?: string;
607
+ };
608
+ /** Method that will be used by crossfilter to compute the dimensions of the charts. */
609
+ dimension: OrderedValueSelector<any, [number, number, string]> | OrderedValueSelector<any, [number, number]>;
610
+ /** Reset function that is triggered when reset button is pressed in the empty state chart. */
611
+ emptyChartResetFn?: () => void;
612
+ /** Whether the dimension field is an array or not. */
613
+ isDimensionArray?: boolean;
614
+ /** Whether the reset button is hidden or not. */
615
+ isResetable?: boolean;
616
+ /** Define whether the labels should be displayed inside or outside the charts and if they should contain raw or percentage values. */
617
+ labelVariant?: ScatterPlotLabelVariant;
618
+ /** Overriden values for internal labels and texts. */
619
+ localeText?: LocaleText;
620
+ /** Method to call when a filter occured on the chart. */
621
+ onFilter?: (filters?: string[]) => void;
622
+ /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */
623
+ others?: boolean | string;
624
+ /** Method to override the data labels. */
625
+ setLabels?: (key: string) => string | undefined;
626
+ /** ScatterPlot size. */
627
+ size?: ScatterPlotSize | {
628
+ width: number;
629
+ height: number;
630
+ dotSize: number;
631
+ };
632
+ /** Color palette to use. You can choose among the list of available color palette or also choose to use the success/warning/danger theme for which you have to specify which key corresponds to which status. */
633
+ theme?: ScatterPlotTheme | SuccessDangerColorTheme;
634
+ /** Title. */
635
+ title?: string;
636
+ }
637
+ type StyledScatterPlotProps = Omit<ScatterPlotProps, 'columnToFilter' | 'data' | 'dimension' | 'group' | 'localeText'> & {};
638
+
639
+ declare const ScatterPlot: Comp<ScatterPlotProps, HTMLDivElement>;
640
+
641
+ export { COUNT, ChartDimensions, ChartEmptyState, ChartEmptyStateProps, Dashboard, DashboardContext, DashboardContextProps, DashboardProps, DashboardReducer, DashboardReducerAction, DashboardReducerActionType, DashboardReducerState, DataGrid, DataGridProps, Dimension, DimensionSelector, Group, GroupSelector, HorizontalBarChart, HorizontalBarChartProps, HorizontalBarChartSize, HorizontalBarChartTheme, JSONArray, JSONObject, JSONValue, PdfExportButton, PieChart, PieChartProps, SUM, ScatterPlot, ScatterPlotLabelVariant, ScatterPlotProps, ScatterPlotSize, ScatterPlotTheme, StyledHorizontalBarChartProps, StyledPieChartProps, StyledScatterPlotProps, StyledTimeSeriesBarChartProps, SuccessDangerColorTheme, TNdx, TimeSeriesBarChart, TimeSeriesBarChartProps, TimeSeriesBarChartSize, TimeSeriesBarChartTheme, datetimeEnum, groupReduceSum, initialState };