@sentio/ui-dashboard 0.3.11 → 0.3.12

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
@@ -5,6 +5,7 @@ import react__default, { ReactNode, CSSProperties } from 'react';
5
5
  import { ComposeOption, SetOptionOpts, ECharts } from 'echarts/core';
6
6
  import { BarSeriesOption, LineSeriesOption, SankeySeriesOption } from 'echarts/charts';
7
7
  import { TitleComponentOption, GridComponentOption } from 'echarts/components';
8
+ import { BeforeMount } from '@monaco-editor/react';
8
9
 
9
10
  /** Dashboard chart type. */
10
11
  type ChartTypeLike = 'LINE' | 'AREA' | 'BAR' | 'BAR_GAUGE' | 'TABLE' | 'QUERY_VALUE' | 'PIE' | 'NOTE' | 'SCATTER' | 'GROUP';
@@ -465,12 +466,12 @@ interface SeriesLike<T = Date> {
465
466
  smooth?: boolean;
466
467
  }
467
468
 
468
- interface Props$B {
469
+ interface Props$C {
469
470
  metric?: MetricInfoLike;
470
471
  value: QueryLike;
471
472
  onChange: (value: QueryLike) => void;
472
473
  }
473
- declare function AggregateInput({ metric, value, onChange }: Props$B): react_jsx_runtime.JSX.Element;
474
+ declare function AggregateInput({ metric, value, onChange }: Props$C): react_jsx_runtime.JSX.Element;
474
475
 
475
476
  declare enum ArgumentType {
476
477
  String = 0,
@@ -505,28 +506,28 @@ declare const EventsFunctionMap: {
505
506
  [name: string]: FunctionDef;
506
507
  };
507
508
 
508
- interface Props$A {
509
+ interface Props$B {
509
510
  argument: ArgumentDef;
510
511
  value?: ArgumentLike;
511
512
  onChange?: (value: ArgumentLike) => void;
512
513
  className?: string;
513
514
  }
514
- declare function ArgumentInput({ className, argument, value, onChange }: Props$A): react_jsx_runtime.JSX.Element;
515
+ declare function ArgumentInput({ className, argument, value, onChange }: Props$B): react_jsx_runtime.JSX.Element;
515
516
 
516
- interface Props$z {
517
+ interface Props$A {
517
518
  value: QueryLike;
518
519
  onChange: (value: QueryLike) => void;
519
520
  }
520
- declare function FunctionInput({ value, onChange }: Props$z): react_jsx_runtime.JSX.Element;
521
+ declare function FunctionInput({ value, onChange }: Props$A): react_jsx_runtime.JSX.Element;
521
522
 
522
- interface Props$y {
523
+ interface Props$z {
523
524
  onClick: (func: FunctionDef) => void;
524
525
  functionCategories?: typeof FunctionsCategories;
525
526
  defaultFunc?: string;
526
527
  }
527
- declare function FunctionsPanel({ onClick, functionCategories, defaultFunc }: Props$y): react_jsx_runtime.JSX.Element;
528
+ declare function FunctionsPanel({ onClick, functionCategories, defaultFunc }: Props$z): react_jsx_runtime.JSX.Element;
528
529
 
529
- interface Props$x {
530
+ interface Props$y {
530
531
  metric?: MetricInfoLike;
531
532
  value: QueryLike;
532
533
  onChange: (value: QueryLike) => void;
@@ -536,7 +537,7 @@ interface Props$x {
536
537
  small?: boolean;
537
538
  useRegex?: boolean;
538
539
  }
539
- declare function LabelsInput({ value, metric, variables, onChange, small, useRegex }: Props$x): react_jsx_runtime.JSX.Element;
540
+ declare function LabelsInput({ value, metric, variables, onChange, small, useRegex }: Props$y): react_jsx_runtime.JSX.Element;
540
541
 
541
542
  declare const SystemLabels: {
542
543
  field: string;
@@ -599,7 +600,7 @@ type SeriesFinder = {
599
600
  };
600
601
  declare const ReactEChartsBase: react__default.ForwardRefExoticComponent<ReactEChartsProps & react__default.RefAttributes<EChartsHandle>>;
601
602
 
602
- interface Props$w {
603
+ interface Props$x {
603
604
  legend: string[];
604
605
  legendSelected: Record<string, boolean>;
605
606
  returnedSeries?: number;
@@ -607,7 +608,7 @@ interface Props$w {
607
608
  onRendered: (v: boolean) => void;
608
609
  chartHandle?: EChartsHandle;
609
610
  }
610
- declare const ChartLegend: ({ legend, legendSelected, returnedSeries, totalSeries, onRendered, chartHandle }: Props$w) => react_jsx_runtime.JSX.Element;
611
+ declare const ChartLegend: ({ legend, legendSelected, returnedSeries, totalSeries, onRendered, chartHandle }: Props$x) => react_jsx_runtime.JSX.Element;
611
612
 
612
613
  declare const RefreshContext: react.Context<{
613
614
  refresh?: () => void;
@@ -615,14 +616,14 @@ declare const RefreshContext: react.Context<{
615
616
  }>;
616
617
  declare const RefreshButton: (props: Partial<ButtonProps>) => react_jsx_runtime.JSX.Element | null;
617
618
 
618
- type Props$v = {
619
+ type Props$w = {
619
620
  value: ChartTypeLike;
620
621
  onChange: (value: ChartTypeLike) => void;
621
622
  small?: boolean;
622
623
  };
623
- declare const ChartTypeButtonGroup: ({ value, onChange, small }: Props$v) => react_jsx_runtime.JSX.Element;
624
+ declare const ChartTypeButtonGroup: ({ value, onChange, small }: Props$w) => react_jsx_runtime.JSX.Element;
624
625
 
625
- interface Props$u {
626
+ interface Props$v {
626
627
  data: any;
627
628
  compareTimeDuration?: DurationLike;
628
629
  numberFormatter: (value: number, seriesId?: string) => string;
@@ -635,9 +636,9 @@ interface Props$u {
635
636
  viewUsersDisabled?: (seriesId: string, seriesIndex: number) => boolean;
636
637
  isFixed?: boolean;
637
638
  }
638
- declare function ChartTooltip({ data, numberFormatter, compareTimeDuration, highlightSeriesId, title, showTotal, onViewLogs, viewLogDisabled, onViewUsers, viewUsersDisabled, isFixed }: Props$u): react_jsx_runtime.JSX.Element;
639
+ declare function ChartTooltip({ data, numberFormatter, compareTimeDuration, highlightSeriesId, title, showTotal, onViewLogs, viewLogDisabled, onViewUsers, viewUsersDisabled, isFixed }: Props$v): react_jsx_runtime.JSX.Element;
639
640
 
640
- interface Props$t {
641
+ interface Props$u {
641
642
  data: any;
642
643
  compareTimeDuration?: DurationLike;
643
644
  numberFormatter: (value: number) => string;
@@ -650,7 +651,7 @@ interface Props$t {
650
651
  isFixed?: boolean;
651
652
  sizeTitle?: string;
652
653
  }
653
- declare function ScatterChartTooltip({ data, numberFormatter, highlightSeriesId, title, onViewLogs, viewLogDisabled, onViewUsers, viewUsersDisabled, isFixed, sizeTitle }: Props$t): react_jsx_runtime.JSX.Element;
654
+ declare function ScatterChartTooltip({ data, numberFormatter, highlightSeriesId, title, onViewLogs, viewLogDisabled, onViewUsers, viewUsersDisabled, isFixed, sizeTitle }: Props$u): react_jsx_runtime.JSX.Element;
654
655
 
655
656
  /** Minimal shape consumed from a computed series — only name + first data point. */
656
657
  interface PieSeriesInput {
@@ -803,42 +804,42 @@ interface TimeSeriesChartProps {
803
804
  }
804
805
  declare const TimeSeriesChart: react.ForwardRefExoticComponent<TimeSeriesChartProps & react.RefAttributes<EChartsHandle>>;
805
806
 
806
- interface Props$s {
807
+ interface Props$t {
807
808
  config?: LineConfigLike;
808
809
  defaultOpen?: boolean;
809
810
  onChange: (config: LineConfigLike) => void;
810
811
  }
811
- declare const LineControls: ({ config, defaultOpen, onChange }: Props$s) => react_jsx_runtime.JSX.Element;
812
+ declare const LineControls: ({ config, defaultOpen, onChange }: Props$t) => react_jsx_runtime.JSX.Element;
812
813
 
813
- interface Props$r {
814
+ interface Props$s {
814
815
  config?: LabelConfigLike;
815
816
  setConfig: (value: LabelConfigLike) => void;
816
817
  defaultOpen?: boolean;
817
818
  }
818
- declare const LabelControls: ({ config, setConfig, defaultOpen }: Props$r) => react_jsx_runtime.JSX.Element;
819
+ declare const LabelControls: ({ config, setConfig, defaultOpen }: Props$s) => react_jsx_runtime.JSX.Element;
819
820
 
820
- interface Props$q {
821
+ interface Props$r {
821
822
  config?: PieConfigLike;
822
823
  defaultOpen?: boolean;
823
824
  onChange: (config: PieConfigLike) => void;
824
825
  }
825
826
  declare const defaultConfig$8: PieConfigLike;
826
- declare function PieChartControls({ config, defaultOpen, onChange }: Props$q): react_jsx_runtime.JSX.Element;
827
+ declare function PieChartControls({ config, defaultOpen, onChange }: Props$r): react_jsx_runtime.JSX.Element;
827
828
 
828
- interface Props$p {
829
+ interface Props$q {
829
830
  config?: BarGaugeConfigLike;
830
831
  defaultOpen?: boolean;
831
832
  onChange: (config: BarGaugeConfigLike) => void;
832
833
  }
833
834
  declare const defaultConfig$7: BarGaugeConfigLike;
834
- declare function BarGaugeControls({ config, defaultOpen, onChange }: Props$p): react_jsx_runtime.JSX.Element;
835
+ declare function BarGaugeControls({ config, defaultOpen, onChange }: Props$q): react_jsx_runtime.JSX.Element;
835
836
 
836
837
  interface ValueFormatter {
837
838
  label: string;
838
839
  value: ValueFormatterLike;
839
840
  }
840
841
  declare const ValueFormatters: ValueFormatter[];
841
- interface Props$o {
842
+ interface Props$p {
842
843
  config: ValueConfigLike;
843
844
  defaultOpen?: boolean;
844
845
  onChange: (config: ValueConfigLike) => void;
@@ -847,9 +848,9 @@ interface Props$o {
847
848
  showSuffix?: boolean;
848
849
  }
849
850
  declare const defaultConfig$6: ValueConfigLike;
850
- declare const ValueOptions: ({ config, onChange, formatters, showPrefix, showSuffix }: Props$o) => react_jsx_runtime.JSX.Element;
851
+ declare const ValueOptions: ({ config, onChange, formatters, showPrefix, showSuffix }: Props$p) => react_jsx_runtime.JSX.Element;
851
852
 
852
- interface Props$n {
853
+ interface Props$o {
853
854
  config?: ValueConfigLike;
854
855
  defaultOpen?: boolean;
855
856
  onChange: (config: ValueConfigLike) => void;
@@ -858,15 +859,15 @@ interface Props$n {
858
859
  showSuffix?: boolean;
859
860
  }
860
861
  declare const defaultConfig$5: ValueConfigLike;
861
- declare const ValueControls: ({ config, defaultOpen, onChange, formatters, showPrefix, showSuffix }: Props$n) => react_jsx_runtime.JSX.Element;
862
+ declare const ValueControls: ({ config, defaultOpen, onChange, formatters, showPrefix, showSuffix }: Props$o) => react_jsx_runtime.JSX.Element;
862
863
 
863
- interface Props$m {
864
+ interface Props$n {
864
865
  rules: MappingRuleLike[];
865
866
  onChange: (rules: MappingRuleLike[]) => void;
866
867
  }
867
- declare function ValueStringMapping({ rules, onChange }: Props$m): react_jsx_runtime.JSX.Element;
868
+ declare function ValueStringMapping({ rules, onChange }: Props$n): react_jsx_runtime.JSX.Element;
868
869
 
869
- interface Props$l {
870
+ interface Props$m {
870
871
  yAxis?: YAxisConfigLike;
871
872
  setYAxis: (yAxis: YAxisConfigLike) => void;
872
873
  defaultOpen?: boolean;
@@ -879,9 +880,9 @@ interface Props$l {
879
880
  supportReset?: boolean;
880
881
  panelTitle?: string;
881
882
  }
882
- declare function YaxisControls({ yAxis, setYAxis, defaultOpen, columnSelect, supportSetName, supportSetMinMax, supportStackSeries, supportAlwaysShowZero, supportReset, panelTitle }: Props$l): react_jsx_runtime.JSX.Element;
883
+ declare function YaxisControls({ yAxis, setYAxis, defaultOpen, columnSelect, supportSetName, supportSetMinMax, supportStackSeries, supportAlwaysShowZero, supportReset, panelTitle }: Props$m): react_jsx_runtime.JSX.Element;
883
884
 
884
- interface Props$k {
885
+ interface Props$l {
885
886
  xAxis?: XAxisConfigLike;
886
887
  setXAxis: (val?: XAxisConfigLike) => void;
887
888
  defaultOpen?: boolean;
@@ -894,15 +895,15 @@ interface Props$k {
894
895
  supportSort?: boolean;
895
896
  supportSetType?: boolean;
896
897
  }
897
- declare const XAxisControls: ({ xAxis, setXAxis, defaultOpen, columnSelect, columnIsNonTime, panelTitle, supportName, supportSort, supportSetType }: Props$k) => react_jsx_runtime.JSX.Element;
898
+ declare const XAxisControls: ({ xAxis, setXAxis, defaultOpen, columnSelect, columnIsNonTime, panelTitle, supportName, supportSort, supportSetType }: Props$l) => react_jsx_runtime.JSX.Element;
898
899
 
899
- interface Props$j {
900
+ interface Props$k {
900
901
  markers?: MarkerLike[];
901
902
  onChange: (v: MarkerLike[]) => void;
902
903
  }
903
- declare function MarkerControls({ markers, onChange }: Props$j): react_jsx_runtime.JSX.Element;
904
+ declare function MarkerControls({ markers, onChange }: Props$k): react_jsx_runtime.JSX.Element;
904
905
 
905
- interface Props$i {
906
+ interface Props$j {
906
907
  defaultOpen?: boolean;
907
908
  onChange: (config: DataConfigLike) => void;
908
909
  chartConfig?: ChartConfigLike;
@@ -910,9 +911,9 @@ interface Props$i {
910
911
  defaultSeriesLimit?: number;
911
912
  }
912
913
  declare const defaultConfig$4: DataConfigLike;
913
- declare function DataControls({ defaultOpen, onChange, chartConfig, defaultSeriesLimit }: Props$i): react_jsx_runtime.JSX.Element;
914
+ declare function DataControls({ defaultOpen, onChange, chartConfig, defaultSeriesLimit }: Props$j): react_jsx_runtime.JSX.Element;
914
915
 
915
- interface Props$h {
916
+ interface Props$i {
916
917
  config?: ScatterConfigLike;
917
918
  defaultOpen?: boolean;
918
919
  onChange: (config: ScatterConfigLike) => void;
@@ -928,9 +929,9 @@ interface Props$h {
928
929
  }) => ReactNode;
929
930
  }
930
931
  declare const defaultConfig$3: ScatterConfigLike;
931
- declare function ScatterControls({ config, defaultOpen, onChange, columnSelect, colorPicker }: Props$h): react_jsx_runtime.JSX.Element;
932
+ declare function ScatterControls({ config, defaultOpen, onChange, columnSelect, colorPicker }: Props$i): react_jsx_runtime.JSX.Element;
932
933
 
933
- interface Props$g {
934
+ interface Props$h {
934
935
  config?: TableConfigLike;
935
936
  defaultOpen?: boolean;
936
937
  onChange: (config: TableConfigLike) => void;
@@ -938,7 +939,7 @@ interface Props$g {
938
939
  }
939
940
  declare const defaultConfig$2: TableConfigLike;
940
941
  declare function getDefaultValueConfig(type?: ColumnTypeLike): ValueConfigLike;
941
- declare function TableControls({ config, defaultOpen, onChange, data }: Props$g): react_jsx_runtime.JSX.Element;
942
+ declare function TableControls({ config, defaultOpen, onChange, data }: Props$h): react_jsx_runtime.JSX.Element;
942
943
 
943
944
  declare const sentioColors: {
944
945
  light: {
@@ -1690,62 +1691,62 @@ declare const sentioThemeDark: {
1690
1691
  };
1691
1692
  };
1692
1693
 
1694
+ interface Props$g {
1695
+ className?: string;
1696
+ }
1697
+ declare const SvgIcon$7: ({ className }: Props$g) => react_jsx_runtime.JSX.Element;
1698
+
1693
1699
  interface Props$f {
1694
1700
  className?: string;
1695
1701
  }
1696
- declare const SvgIcon$7: ({ className }: Props$f) => react_jsx_runtime.JSX.Element;
1702
+ declare const SvgIcon$6: ({ className }: Props$f) => react_jsx_runtime.JSX.Element;
1697
1703
 
1698
1704
  interface Props$e {
1699
1705
  className?: string;
1700
1706
  }
1701
- declare const SvgIcon$6: ({ className }: Props$e) => react_jsx_runtime.JSX.Element;
1707
+ declare const SvgIcon$5: ({ className }: Props$e) => react_jsx_runtime.JSX.Element;
1702
1708
 
1703
1709
  interface Props$d {
1704
1710
  className?: string;
1705
1711
  }
1706
- declare const SvgIcon$5: ({ className }: Props$d) => react_jsx_runtime.JSX.Element;
1712
+ declare const SvgIcon$4: ({ className }: Props$d) => react_jsx_runtime.JSX.Element;
1707
1713
 
1708
1714
  interface Props$c {
1709
1715
  className?: string;
1710
1716
  }
1711
- declare const SvgIcon$4: ({ className }: Props$c) => react_jsx_runtime.JSX.Element;
1717
+ declare const SvgIcon$3: ({ className }: Props$c) => react_jsx_runtime.JSX.Element;
1712
1718
 
1713
1719
  interface Props$b {
1714
1720
  className?: string;
1715
1721
  }
1716
- declare const SvgIcon$3: ({ className }: Props$b) => react_jsx_runtime.JSX.Element;
1722
+ declare const SvgIcon$2: ({ className }: Props$b) => react_jsx_runtime.JSX.Element;
1717
1723
 
1718
1724
  interface Props$a {
1719
1725
  className?: string;
1720
1726
  }
1721
- declare const SvgIcon$2: ({ className }: Props$a) => react_jsx_runtime.JSX.Element;
1727
+ declare const SvgIcon$1: ({ className }: Props$a) => react_jsx_runtime.JSX.Element;
1722
1728
 
1723
1729
  interface Props$9 {
1724
1730
  className?: string;
1725
1731
  }
1726
- declare const SvgIcon$1: ({ className }: Props$9) => react_jsx_runtime.JSX.Element;
1732
+ declare const SvgIcon: ({ className }: Props$9) => react_jsx_runtime.JSX.Element;
1727
1733
 
1728
1734
  interface Props$8 {
1729
- className?: string;
1730
- }
1731
- declare const SvgIcon: ({ className }: Props$8) => react_jsx_runtime.JSX.Element;
1732
-
1733
- interface Props$7 {
1734
1735
  dashboard?: DashboardLike;
1735
1736
  open: boolean;
1736
1737
  onClose: () => void;
1737
1738
  onUpdate: (data: DashboardLike) => Promise<void>;
1738
1739
  }
1739
- declare const EditDashboardDialog: ({ dashboard, open, onClose, onUpdate }: Props$7) => react_jsx_runtime.JSX.Element;
1740
+ declare const EditDashboardDialog: ({ dashboard, open, onClose, onUpdate }: Props$8) => react_jsx_runtime.JSX.Element;
1740
1741
 
1741
- interface Props$6 {
1742
+ interface Props$7 {
1742
1743
  data?: any;
1743
1744
  logoSrc?: string;
1744
1745
  onNavigateToDatasource?: () => void;
1745
1746
  }
1746
- declare const ErrorChart: react__default.MemoExoticComponent<({ data, logoSrc, onNavigateToDatasource }: Props$6) => react_jsx_runtime.JSX.Element>;
1747
+ declare const ErrorChart: react__default.MemoExoticComponent<({ data, logoSrc, onNavigateToDatasource }: Props$7) => react_jsx_runtime.JSX.Element>;
1747
1748
 
1748
- interface Props$5 {
1749
+ interface Props$6 {
1749
1750
  open: boolean;
1750
1751
  onClose: () => void;
1751
1752
  title: string;
@@ -1757,15 +1758,15 @@ interface Props$5 {
1757
1758
  highlightColor: string;
1758
1759
  }) => void;
1759
1760
  }
1760
- declare function EditGroupDialog({ open, onClose, title, style, highlightColor, onSave }: Props$5): react_jsx_runtime.JSX.Element;
1761
+ declare function EditGroupDialog({ open, onClose, title, style, highlightColor, onSave }: Props$6): react_jsx_runtime.JSX.Element;
1761
1762
 
1762
- interface Props$4 {
1763
+ interface Props$5 {
1763
1764
  stats?: ComputeStatsLike;
1764
1765
  onRefresh: () => Promise<void>;
1765
1766
  }
1766
- declare const DashboardRefresh: ({ stats, onRefresh }: Props$4) => react_jsx_runtime.JSX.Element;
1767
+ declare const DashboardRefresh: ({ stats, onRefresh }: Props$5) => react_jsx_runtime.JSX.Element;
1767
1768
 
1768
- interface Props$3 {
1769
+ interface Props$4 {
1769
1770
  open: boolean;
1770
1771
  initData?: DashboardSharingLike;
1771
1772
  onUnshare?: () => void;
@@ -1775,9 +1776,9 @@ interface Props$3 {
1775
1776
  endTime?: DateTimeValue;
1776
1777
  tz?: string;
1777
1778
  }
1778
- declare const ShareDashboardDialog: ({ open, initData, onUnshare, onClose, onConfigChange, startTime, endTime, tz }: Props$3) => react_jsx_runtime.JSX.Element;
1779
+ declare const ShareDashboardDialog: ({ open, initData, onUnshare, onClose, onConfigChange, startTime, endTime, tz }: Props$4) => react_jsx_runtime.JSX.Element;
1779
1780
 
1780
- interface Props$2 {
1781
+ interface Props$3 {
1781
1782
  config?: TimeRangeOverrideLike;
1782
1783
  onChange: (config: TimeRangeOverrideLike) => void;
1783
1784
  globalStartTime?: DateTimeValue;
@@ -1786,18 +1787,18 @@ interface Props$2 {
1786
1787
  onSetGlobalTimeRange: (start?: DateTimeValue, end?: DateTimeValue, tz?: string) => void;
1787
1788
  }
1788
1789
  declare const defaultConfig$1: TimeRangeOverrideLike;
1789
- declare function TimeRangeOverride({ config, onChange, globalStartTime, globalEndTime, globalTz, onSetGlobalTimeRange }: Props$2): react_jsx_runtime.JSX.Element;
1790
+ declare function TimeRangeOverride({ config, onChange, globalStartTime, globalEndTime, globalTz, onSetGlobalTimeRange }: Props$3): react_jsx_runtime.JSX.Element;
1790
1791
 
1791
- interface Props$1 {
1792
+ interface Props$2 {
1792
1793
  config?: ChartConfigLike;
1793
1794
  chartType?: ChartTypeLike;
1794
1795
  setSeriesConfig: (seriesConfig: SeriesConfigLike) => void;
1795
1796
  series: string[];
1796
1797
  enabled?: boolean;
1797
1798
  }
1798
- declare const SeriesControls: ({ config, setSeriesConfig, series, enabled }: Props$1) => react_jsx_runtime.JSX.Element | null;
1799
+ declare const SeriesControls: ({ config, setSeriesConfig, series, enabled }: Props$2) => react_jsx_runtime.JSX.Element | null;
1799
1800
 
1800
- interface Props {
1801
+ interface Props$1 {
1801
1802
  config?: QueryValueConfigLike;
1802
1803
  defaultOpen?: boolean;
1803
1804
  onChange: (config: QueryValueConfigLike) => void;
@@ -1806,7 +1807,7 @@ interface Props {
1806
1807
  }) => void) => ReactNode;
1807
1808
  }
1808
1809
  declare const defaultConfig: QueryValueConfigLike;
1809
- declare function QueryValueControls({ config, defaultOpen, onChange, renderColorSelect }: Props): react_jsx_runtime.JSX.Element;
1810
+ declare function QueryValueControls({ config, defaultOpen, onChange, renderColorSelect }: Props$1): react_jsx_runtime.JSX.Element;
1810
1811
 
1811
1812
  type HighlightColorKey = '' | 'blue' | 'cyan' | 'pink' | 'yellow' | 'green' | 'lightblue' | 'purple' | 'red' | 'orange';
1812
1813
  interface HighlightColorMeta {
@@ -1829,4 +1830,13 @@ declare const ImportPanelDialog: ({ show, onClose: _onClose, onSubmit }: {
1829
1830
  onSubmit: (p: PanelLike) => Promise<void>;
1830
1831
  }) => react_jsx_runtime.JSX.Element;
1831
1832
 
1832
- export { AggregateInput, SvgIcon$6 as AreaIcon, type ArgumentDef, ArgumentInput, ArgumentType, BarGaugeChart, type BarGaugeChartProps, BarGaugeControls, SvgIcon$4 as BarGuageIcon, SvgIcon$5 as BarIcon, type ChartConfigLike, ChartLegend, type ChartLike, ChartTooltip, ChartTypeButtonGroup, type ChartTypeLike, type ComputeStatsLike, DEFAULT_HIGHLIGHT_KEY, type DashboardExtraLike, type DashboardLike, DashboardRefresh, type DashboardSharingLike, type DashboardVisibilityLike, DataControls, type DataSourceTypeLike, type EChartsHandle, type EChartsOption, EditDashboardDialog, EditGroupDialog, ErrorChart, EventsFunctionCategories, EventsFunctionMap, type FunctionDef, FunctionInput, FunctionMap, FunctionsCategories, FunctionsPanel, type GroupLike, type GroupStyleLike, HIGHLIGHT_COLORS, type HighlightColorKey, type HighlightColorMeta, ImportPanelDialog, LabelControls, LabelSearchProvider, LabelsInput, type LayoutItemLike, type LayoutsLike, LineControls, SvgIcon$7 as LineIcon, type MarkArea, type MarkLine, MarkerControls, type NoteAlignmentLike, type NoteFontSizeLike, type NoteLike, type NoteVerticalAlignmentLike, type OverlayGraphLike, type PanelLike, PieChart, PieChartControls, type PieChartProps, SvgIcon$3 as PieIcon, type PieSeriesInput, QueryValueChart, type QueryValueChartProps, type QueryValueConfigLike, QueryValueControls, SvgIcon$2 as QueryValueIcon, ReactEChartsBase, type ReactEChartsProps, RefreshButton, RefreshContext, type ResolvedHighlight, type ResponsiveLayoutsLike, ScatterChartTooltip, ScatterControls, SvgIcon$1 as ScatterIcon, type SeriesConfigLike, SeriesControls, ShareDashboardDialog, type SharingConfigLike, SystemLabels, TableControls, SvgIcon as TableIcon, type TemplateVariableLike, type TemplateViewLike, type TimeLike, type TimeRangeLike, TimeRangeOverride, type TimeRangeOverrideLike, TimeSeriesChart, type TimeSeriesChartProps, ValueControls, type ValueFormatter, ValueFormatters, ValueOptions, ValueStringMapping, type ViewActionContext, XAxisControls, type YAxisConfigLike, YaxisControls, defaultConfig$7 as defaultBarGaugeConfig, defaultConfig$4 as defaultDataConfig, defaultConfig$8 as defaultPieConfig, defaultConfig as defaultQueryValueConfig, defaultConfig$3 as defaultScatterConfig, defaultConfig$2 as defaultTableConfig, defaultConfig$1 as defaultTimeRangeOverrideConfig, defaultConfig$6 as defaultValueConfig, defaultConfig$5 as defaultValueControlsConfig, getDefaultValueConfig, getHighlightHex, isAggrOrRollupFunction, resolveHeaderStyle, resolveHighlight, sentioColors, sentioTheme, sentioThemeDark, sortMetricByName, useLabelSearch, useLabelSearchContext };
1833
+ interface Props {
1834
+ open: boolean;
1835
+ onClose: () => void;
1836
+ dashboardId?: string;
1837
+ json: string;
1838
+ onBeforeMount?: BeforeMount;
1839
+ }
1840
+ declare function ExportDashboardDialog({ open, onClose, dashboardId, json, onBeforeMount }: Props): react_jsx_runtime.JSX.Element;
1841
+
1842
+ export { AggregateInput, SvgIcon$6 as AreaIcon, type ArgumentDef, ArgumentInput, ArgumentType, BarGaugeChart, type BarGaugeChartProps, BarGaugeControls, SvgIcon$4 as BarGuageIcon, SvgIcon$5 as BarIcon, type ChartConfigLike, ChartLegend, type ChartLike, ChartTooltip, ChartTypeButtonGroup, type ChartTypeLike, type ComputeStatsLike, DEFAULT_HIGHLIGHT_KEY, type DashboardExtraLike, type DashboardLike, DashboardRefresh, type DashboardSharingLike, type DashboardVisibilityLike, DataControls, type DataSourceTypeLike, type EChartsHandle, type EChartsOption, EditDashboardDialog, EditGroupDialog, ErrorChart, EventsFunctionCategories, EventsFunctionMap, ExportDashboardDialog, type FunctionDef, FunctionInput, FunctionMap, FunctionsCategories, FunctionsPanel, type GroupLike, type GroupStyleLike, HIGHLIGHT_COLORS, type HighlightColorKey, type HighlightColorMeta, ImportPanelDialog, LabelControls, LabelSearchProvider, LabelsInput, type LayoutItemLike, type LayoutsLike, LineControls, SvgIcon$7 as LineIcon, type MarkArea, type MarkLine, MarkerControls, type NoteAlignmentLike, type NoteFontSizeLike, type NoteLike, type NoteVerticalAlignmentLike, type OverlayGraphLike, type PanelLike, PieChart, PieChartControls, type PieChartProps, SvgIcon$3 as PieIcon, type PieSeriesInput, QueryValueChart, type QueryValueChartProps, type QueryValueConfigLike, QueryValueControls, SvgIcon$2 as QueryValueIcon, ReactEChartsBase, type ReactEChartsProps, RefreshButton, RefreshContext, type ResolvedHighlight, type ResponsiveLayoutsLike, ScatterChartTooltip, ScatterControls, SvgIcon$1 as ScatterIcon, type SeriesConfigLike, SeriesControls, ShareDashboardDialog, type SharingConfigLike, SystemLabels, TableControls, SvgIcon as TableIcon, type TemplateVariableLike, type TemplateViewLike, type TimeLike, type TimeRangeLike, TimeRangeOverride, type TimeRangeOverrideLike, TimeSeriesChart, type TimeSeriesChartProps, ValueControls, type ValueFormatter, ValueFormatters, ValueOptions, ValueStringMapping, type ViewActionContext, XAxisControls, type YAxisConfigLike, YaxisControls, defaultConfig$7 as defaultBarGaugeConfig, defaultConfig$4 as defaultDataConfig, defaultConfig$8 as defaultPieConfig, defaultConfig as defaultQueryValueConfig, defaultConfig$3 as defaultScatterConfig, defaultConfig$2 as defaultTableConfig, defaultConfig$1 as defaultTimeRangeOverrideConfig, defaultConfig$6 as defaultValueConfig, defaultConfig$5 as defaultValueControlsConfig, getDefaultValueConfig, getHighlightHex, isAggrOrRollupFunction, resolveHeaderStyle, resolveHighlight, sentioColors, sentioTheme, sentioThemeDark, sortMetricByName, useLabelSearch, useLabelSearchContext };
package/dist/index.js CHANGED
@@ -49,6 +49,7 @@ __export(index_exports, {
49
49
  ErrorChart: () => ErrorChart,
50
50
  EventsFunctionCategories: () => EventsFunctionCategories,
51
51
  EventsFunctionMap: () => EventsFunctionMap,
52
+ ExportDashboardDialog: () => ExportDashboardDialog,
52
53
  FunctionInput: () => FunctionInput,
53
54
  FunctionMap: () => FunctionMap,
54
55
  FunctionsCategories: () => FunctionsCategories,
@@ -7968,6 +7969,64 @@ var ImportPanelDialog = ({
7968
7969
  }
7969
7970
  );
7970
7971
  };
7972
+
7973
+ // src/dashboard/ExportDashboardDialog.tsx
7974
+ var import_ui_core37 = require("@sentio/ui-core");
7975
+ var import_react33 = __toESM(require("@monaco-editor/react"));
7976
+ var import_lu11 = require("react-icons/lu");
7977
+ var import_jsx_runtime49 = require("react/jsx-runtime");
7978
+ function ExportDashboardDialog({
7979
+ open,
7980
+ onClose,
7981
+ dashboardId,
7982
+ json,
7983
+ onBeforeMount
7984
+ }) {
7985
+ const isDarkMode = (0, import_ui_core37.useDarkMode)();
7986
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7987
+ import_ui_core37.BaseDialog,
7988
+ {
7989
+ title: "Export dashboard JSON",
7990
+ open,
7991
+ onClose,
7992
+ onCancel: onClose,
7993
+ cancelText: "Close",
7994
+ footerBorder: false,
7995
+ extraButtons: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "absolute left-4 inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7996
+ "a",
7997
+ {
7998
+ download: dashboardId ? `dashboard-${dashboardId}.json` : "dashboard.json",
7999
+ href: "data:text/json;charset=utf-8," + encodeURIComponent(json),
8000
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_ui_core37.Button, { role: "text", icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lu11.LuDownload, {}), children: "Save to a file" })
8001
+ }
8002
+ ) }),
8003
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("form", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-[18px] py-4", children: [
8004
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8005
+ "div",
8006
+ {
8007
+ className: "absolute right-10 top-8 z-10",
8008
+ onClick: (evt) => evt.preventDefault(),
8009
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_ui_core37.CopyButton, { text: json, size: 16 })
8010
+ }
8011
+ ),
8012
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "focus-within:border-primary-300 h-[324px] overflow-hidden rounded-sm border", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8013
+ import_react33.default,
8014
+ {
8015
+ value: json,
8016
+ theme: isDarkMode ? "sentio-dark" : "sentio",
8017
+ language: "json",
8018
+ beforeMount: onBeforeMount,
8019
+ options: {
8020
+ readOnly: true,
8021
+ minimap: { enabled: false },
8022
+ lineNumbers: "off"
8023
+ }
8024
+ }
8025
+ ) })
8026
+ ] }) })
8027
+ }
8028
+ );
8029
+ }
7971
8030
  // Annotate the CommonJS export names for ESM import in node:
7972
8031
  0 && (module.exports = {
7973
8032
  AggregateInput,
@@ -7989,6 +8048,7 @@ var ImportPanelDialog = ({
7989
8048
  ErrorChart,
7990
8049
  EventsFunctionCategories,
7991
8050
  EventsFunctionMap,
8051
+ ExportDashboardDialog,
7992
8052
  FunctionInput,
7993
8053
  FunctionMap,
7994
8054
  FunctionsCategories,