@vizzly/dashboard 0.15.0-dev-e4e46cdb5d41c2a0c5b2637632228c4a6a4654e0 → 0.15.0-dev-d2bab4f67568f04c6c8cdd5854027babfdc4a1a0

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 (24) hide show
  1. package/dist/charts/src/v2/components/WaterfallChart/WaterfallChart.d.ts +4 -2
  2. package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
  3. package/dist/dashboard.cjs.development.js +5835 -5418
  4. package/dist/dashboard.cjs.production.min.js +1 -1
  5. package/dist/dashboard.esm.js +5836 -5419
  6. package/dist/results-driver/src/driver/VizzlyQuery/WaterfallChart/toQueries.d.ts +9 -3
  7. package/dist/shared-logic/src/Component/types.d.ts +2 -0
  8. package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +16 -15
  9. package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
  10. package/dist/shared-logic/src/Result/Result.d.ts +2 -2
  11. package/dist/shared-logic/src/WaterfallChart/buildWaterfallChartRepresentation.d.ts +7 -3
  12. package/dist/shared-logic/src/WaterfallChart/getRepresentationData.d.ts +5 -2
  13. package/dist/shared-logic/src/WaterfallChart/getYTicks.d.ts +1 -1
  14. package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +26 -24
  15. package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/Rules/RulesModal.d.ts +1 -1
  16. package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/types.d.ts +4 -4
  17. package/dist/shared-ui/src/library/DataPanel/CustomMetricsInput.d.ts +1 -1
  18. package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/DateComparisonModal.d.ts +12 -0
  19. package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/Rules.d.ts +11 -0
  20. package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/types.d.ts +13 -0
  21. package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/useCustomMetric.d.ts +17 -0
  22. package/dist/shared-ui/src/library/DataPanel/sections/DateComparisonSection.d.ts +8 -0
  23. package/dist/shared-ui/src/library/DataPanel/sections/index.d.ts +1 -0
  24. package/package.json +1 -1
@@ -1,4 +1,10 @@
1
- export declare const toQueries: (attributes: import("../../../../../shared-logic/src/Component/types").Component.AreaChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.BarChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.BasicTableAttributes | import("../../../../../shared-logic/src/Component/types").Component.BubbleChartV2Attributes | import("../../../../../shared-logic/src/Component/types").Component.DataTableAttributes | import("../../../../../shared-logic/src/Component/types").Component.FunnelChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.HorizontalBarChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.LineChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.LineChartV2Attributes | import("../../../../../shared-logic/src/Component/types").Component.BarChartV2Attributes | import("../../../../../shared-logic/src/Component/types").Component.AreaChartV2Attributes | import("../../../../../shared-logic/src/Component/types").Component.PieChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.SunburstChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.RichTextAttributes | import("../../../../../shared-logic/src/Component/types").Component.WaterfallChartAttributes | import("../../../../../shared-logic/src/Component/types").Component.RadarChartAttributes, dataSet: import("../../../../../shared-logic/src/DataSet/types").DataSet<import("../../../../../shared-logic/src/DataSet/types").DataSet.Field>, queryEngineConfig: import("@vizzly/semantic-layer-public/dist/types").QueryEngineConfig, params: import("../../../types").Params) => {
2
- queries: import("../../../../../shared-logic/src/Query/types").Query[];
3
- resultFields: import("../../../../../shared-logic/src/Result/types").Result.Field[][];
1
+ import { Component } from '../../../../../shared-logic/src/Component/types';
2
+ import { DataSet } from '../../../../../shared-logic/src/DataSet/types';
3
+ import { Query as QueryType } from '../../../../../shared-logic/src/Query/types';
4
+ import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
5
+ import { Result } from '../../../../../shared-logic/src/Result/types';
6
+ import { Params } from '../../../types';
7
+ export declare const toQueries: (attributes: Component.WaterfallChartAttributes, dataSet: DataSet, queryEngineConfig: QueryEngineConfig, params: Params) => {
8
+ queries: QueryType[];
9
+ resultFields: Result.Field[][];
4
10
  };
@@ -8,6 +8,7 @@ import { TableFieldsV2 } from '../DataTable/types';
8
8
  import { Dictionary } from 'lodash';
9
9
  import { MovingAverage, TrendType } from '../Trends/types';
10
10
  import { DataSet } from '../DataSet/types';
11
+ import { RulesField } from '../CustomField/types';
11
12
  export declare type getNumberFormatter = (formatterId: string | undefined | null) => (number: number) => string;
12
13
  export declare type FormatType = string | null;
13
14
  export declare type ApproxAxisLabelCount = 'auto' | number;
@@ -475,6 +476,7 @@ export declare namespace Component {
475
476
  headline?: Headline;
476
477
  increaseColor: string;
477
478
  decreaseColor: string;
479
+ comparison: RulesField | null;
478
480
  };
479
481
  export type ViewType = 'areaChart' | 'barChart' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'lineChartV2' | 'areaChartV2' | 'barChartV2' | 'mercatorMap' | 'pieChart' | 'sunburstChart' | 'progress' | 'richText' | 'scatterChart' | 'singleStat' | 'waterfallChart' | 'radarChart';
480
482
  export type Attributes = AreaChartAttributes | BarChartAttributes | BasicTableAttributes | BubbleChartAttributes | BubbleChartV2Attributes | ComboChartAttributes | CustomViewAttributes | DataTableAttributes | FunnelChartAttributes | HorizontalBarChartAttributes | LineChartAttributes | LineChartV2Attributes | BarChartV2Attributes | AreaChartV2Attributes | MercatorMapAttributes | PieChartAttributes | SunburstChartAttributes | ProgressAttributes | RichTextAttributes | ScatterChartAttributes | SingleStatAttributes | WaterfallChartAttributes | RadarChartAttributes | ComboChartV2Attributes;
@@ -25,29 +25,30 @@ export declare type Pagination = {
25
25
  options: number[];
26
26
  };
27
27
  export interface DataPanelNamespaces {
28
+ combo_chart_dimension?: Section<'comboChartDimension'>;
29
+ comparison?: Section<'comparison'>;
30
+ custom_metrics?: Section<'customMetrics'>;
28
31
  data_set: Section<'dataSet'>;
29
- views: Section<'views'>;
30
- fields?: Section<'fields'>;
31
- field_y_axis?: Section<'fieldCollector'>;
32
- field_z_axis?: Section<'fieldCollector'>;
33
- field_rows?: Section<'fieldCollector'>;
32
+ dateComparison?: Section<'dateComparison'>;
33
+ drilldown?: Section<'drilldown'>;
34
34
  field_columns?: Section<'fieldCollector'>;
35
- field_metrics?: Section<'fieldCollector'>;
35
+ field_country?: Section<'fieldCollector'>;
36
36
  field_grouping?: Section<'fieldCollector'>;
37
- progress_goals?: Section<'progressGoals'>;
38
- drilldown?: Section<'drilldown'>;
37
+ field_metrics?: Section<'fieldCollector'>;
38
+ field_rows?: Section<'fieldCollector'>;
39
39
  field_x_axis?: Section<'fieldCollector'>;
40
- field_country?: Section<'fieldCollector'>;
41
- sort?: Section<'sort'>;
40
+ field_y_axis?: Section<'fieldCollector'>;
41
+ field_z_axis?: Section<'fieldCollector'>;
42
+ fields?: Section<'fields'>;
42
43
  filter?: Section<'filter'>;
43
- custom_metrics?: Section<'customMetrics'>;
44
- limit?: Section<'limit'>;
45
- pagination?: Section<'pagination'>;
46
- combo_chart_dimension?: Section<'comboChartDimension'>;
47
- comparison?: Section<'comparison'>;
48
44
  labelled_metrics?: Section<'labelledMetrics'> & {
49
45
  subSectionDefinition: SubSectionDef;
50
46
  };
47
+ limit?: Section<'limit'>;
48
+ pagination?: Section<'pagination'>;
49
+ progress_goals?: Section<'progressGoals'>;
50
+ sort?: Section<'sort'>;
51
+ views: Section<'views'>;
51
52
  }
52
53
  export declare type Namespace = keyof FormatPanelNamespaces | keyof DataPanelNamespaces;
53
54
  export interface FormatPanelNamespaces {
@@ -40,6 +40,6 @@ export interface ProgressGoalSection<T> extends Omit<Section<T>, 'type'> {
40
40
  }
41
41
  export declare type ProgressGoalsSection = Section<'progressGoals'> & ProgressGoalSection<'progressGoals'>;
42
42
  export declare type PaginationSection = Section<'pagination'> & Pagination;
43
- export declare type DataPanelSection = Section<'dataSet'> | MetricsSection | FieldCollectorSection | LabelledMetricSection | Section<'customMetrics'> | DimensionSection | Section<'drilldown'> | Section<'comparison'> | Section<'comboChartDimension'> | Section<'timeDimension'> | Section<'xAxis'> | Section<'views'> | Section<'sort'> | Section<'filter'> | Section<'limit'> | PaginationSection | Section<'fields'> | Section<'country'> | ProgressGoalsSection;
43
+ export declare type DataPanelSection = DimensionSection | FieldCollectorSection | LabelledMetricSection | MetricsSection | PaginationSection | ProgressGoalsSection | Section<'comboChartDimension'> | Section<'comparison'> | Section<'country'> | Section<'customMetrics'> | Section<'dataSet'> | Section<'dateComparison'> | Section<'drilldown'> | Section<'fields'> | Section<'filter'> | Section<'limit'> | Section<'sort'> | Section<'timeDimension'> | Section<'views'> | Section<'xAxis'>;
44
44
  export declare type DataPanelConfig = Array<DataPanelSection>;
45
45
  export {};
@@ -1,9 +1,9 @@
1
1
  import * as Measure from '../Measure';
2
- import { DataType } from '../Field/types';
3
- import { Result } from './types';
4
2
  import { SupportedAggregates } from '../Aggregate';
3
+ import { DataType } from '../Field/types';
5
4
  import { PivotConfig } from '../PivotConfig/types';
6
5
  import { QueryAttributes as QueryAttributesType } from '../QueryAttributes/types';
6
+ import { Result } from './types';
7
7
  export declare type RawResult = {
8
8
  content: any[][];
9
9
  fields: {
@@ -3,15 +3,19 @@ import { PivotConfig } from '../PivotConfig/types';
3
3
  import { Result } from '../Result/types';
4
4
  import { ValueAlias } from '../ValueAlias/types';
5
5
  import { DateTimeFormatter, NumberFormatter, Step, WaterfallChartRepresentation } from './types';
6
+ import { RulesField } from '../CustomField/types';
7
+ import { QueryAttributes } from '../QueryAttributes/types';
6
8
  export declare type WaterfallChartRepresentationArgs = {
7
9
  approxYAxisLabelCount: number;
8
10
  axisTitles?: Component.AxisTitles;
11
+ comparison: RulesField | null;
9
12
  dateTimeFormatOptions: {
10
13
  [id: string]: DateTimeFormatter;
11
14
  };
12
15
  defaultFormats: () => {
13
16
  [functionId: string]: string;
14
17
  };
18
+ measure: QueryAttributes.Measure[];
15
19
  nullValue?: string;
16
20
  numberFormatOptions: {
17
21
  [id: string]: NumberFormatter;
@@ -21,14 +25,14 @@ export declare type WaterfallChartRepresentationArgs = {
21
25
  showTotalBar: boolean;
22
26
  valueAlias?: ValueAlias;
23
27
  xAxisFormat: FormatType;
24
- xAxisPrefix: string;
25
28
  xAxisPostfix: string;
29
+ xAxisPrefix: string;
26
30
  yAxisFormat: FormatType;
27
- yAxisPrefix: string;
28
31
  yAxisPostfix: string;
32
+ yAxisPrefix: string;
29
33
  };
30
34
  export declare type WaterfallChartRepresentationResult = {
31
35
  waterfallChartRepresentation: WaterfallChartRepresentation;
32
36
  waterfallChartSteps: Step[];
33
37
  };
34
- export declare const buildWaterfallChartRepresentation: ({ approxYAxisLabelCount, axisTitles, dateTimeFormatOptions, defaultFormats, nullValue, numberFormatOptions, pivotConfig, result, showTotalBar, valueAlias, xAxisFormat, xAxisPrefix, xAxisPostfix, yAxisFormat, yAxisPrefix, yAxisPostfix, }: WaterfallChartRepresentationArgs) => WaterfallChartRepresentationResult;
38
+ export declare const buildWaterfallChartRepresentation: ({ approxYAxisLabelCount, axisTitles, comparison, dateTimeFormatOptions, defaultFormats, measure, nullValue, numberFormatOptions, pivotConfig, result, showTotalBar, valueAlias, xAxisFormat, xAxisPostfix, xAxisPrefix, yAxisFormat, yAxisPostfix, yAxisPrefix, }: WaterfallChartRepresentationArgs) => WaterfallChartRepresentationResult;
@@ -1,5 +1,6 @@
1
1
  import { Tick } from '../ChartsV2/types';
2
- import { FormattedChartData } from '../Result/types';
2
+ import { RulesField } from '../CustomField/types';
3
+ import { FormattedChartData, Result } from '../Result/types';
3
4
  import { Data, Step } from './types';
4
5
  export declare type GetRepresentationDataArgs = {
5
6
  content: FormattedChartData[][];
@@ -8,8 +9,10 @@ export declare type GetRepresentationDataArgs = {
8
9
  approxYAxisLabelCount: number;
9
10
  showTotalBar: boolean;
10
11
  formattingFunctionY: (value: any) => string;
12
+ comparison: RulesField | null;
13
+ metricField: Result.Field | undefined;
11
14
  };
12
- export declare const getRepresentationData: ({ content, xKey, yKey, approxYAxisLabelCount, showTotalBar, formattingFunctionY, }: GetRepresentationDataArgs) => {
15
+ export declare const getRepresentationData: (args: GetRepresentationDataArgs) => {
13
16
  data: Data[];
14
17
  steps: Step[];
15
18
  xTicks: Tick<string>[];
@@ -5,4 +5,4 @@ export declare type GetYTicksArgs = {
5
5
  approxYAxisLabelCount: number;
6
6
  formattingFunctionY: (value: any) => string;
7
7
  };
8
- export declare const getYTicks: ({ yMinValue, yMaxValue, approxYAxisLabelCount, formattingFunctionY }: GetYTicksArgs) => Tick<number>[];
8
+ export declare const getYTicks: ({ yMinValue, yMaxValue, approxYAxisLabelCount, formattingFunctionY, }: GetYTicksArgs) => Tick<number>[];
@@ -1,27 +1,27 @@
1
1
  import { Dispatch } from 'react';
2
- import { Component } from '../../../../shared-logic/src/Component/types';
3
- import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
4
- import { SetDataSetsAction } from './logic/types';
5
- import { VizzlyComponents, trackEventCallback } from '../../types';
6
- import { StoredTheme } from '../../../../shared-logic/src/Theme/types';
7
- import { DataSet } from '../../../../shared-logic/src/DataSet/types';
8
- import { Report } from '../../../../shared-logic/src/Report/types';
9
2
  import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
10
- import { DashboardBehaviour } from '../DashboardBehaviour/types';
3
+ import { CustomField } from '../../../../shared-logic/src/CustomField/types';
4
+ import { DataSet } from '../../../../shared-logic/src/DataSet/types';
11
5
  import { HeaderComponent } from '../../../../shared-logic/src/Header/types';
6
+ import { Report } from '../../../../shared-logic/src/Report/types';
7
+ import { StoredTheme } from '../../../../shared-logic/src/Theme/types';
12
8
  import { SavingState } from '../../../../shared-logic/src/VizzlyState';
13
- import { CustomField } from '../../../../shared-logic/src/CustomField/types';
9
+ import { Component } from '../../../../shared-logic/src/Component/types';
10
+ import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
11
+ import { ItemPickerProps } from '../../components/ItemPicker/ItemPicker';
14
12
  import { DeleteModalProps } from '../../components/Modals/DeleteModal';
15
13
  import { PrefixModalProps } from '../../components/Table/PrefixModal';
14
+ import { AdvancedFilterModalProps } from '../../library/DataPanel/AdvancedFilter/types';
16
15
  import { BaseCustomMetricModals } from '../../library/DataPanel/CustomFieldInput/types';
17
16
  import { DrilldownModalProps } from '../../library/DataPanel/DrilldownInput/DrilldownModal';
18
17
  import { TableDrilldownModalProps } from '../../library/DataPanel/DrilldownInput/TableDrilldownModal';
19
- import { AdvancedFilterModalProps } from '../../library/DataPanel/AdvancedFilter/types';
20
18
  import { ProgressModalProps } from '../../library/DataPanel/Progress/types';
21
- import { ConditionalFormattingModalProps } from '../../library/StylePanel/ConditionalFormatting/types';
22
19
  import { TrendLinesModalProps } from '../../library/DataPanel/Trends/types';
20
+ import { ConditionalFormattingModalProps } from '../../library/StylePanel/ConditionalFormatting/types';
23
21
  import { GoalLineModalProps } from '../../library/StylePanel/GoalLine/types';
24
- import { ItemPickerProps } from '../../components/ItemPicker/ItemPicker';
22
+ import { VizzlyComponents, trackEventCallback } from '../../types';
23
+ import { DashboardBehaviour } from '../DashboardBehaviour/types';
24
+ import { SetDataSetsAction } from './logic/types';
25
25
  export declare enum ModalType {
26
26
  Drilldown = "drilldown",
27
27
  AdvancedFilter = "advancedFilter",
@@ -39,26 +39,28 @@ export declare enum ModalType {
39
39
  TrendLines = "trendLines",
40
40
  GoalLines = "goalLines",
41
41
  ItemPicker = "itemPicker",
42
- CustomMetricBuilder = "customMetricBuilder"
42
+ CustomMetricBuilder = "customMetricBuilder",
43
+ DateComparison = "dateComparison"
43
44
  }
44
45
  export declare type EditorModalPropsMap = {
45
- [ModalType.Drilldown]: DrilldownModalProps;
46
46
  [ModalType.AdvancedFilter]: AdvancedFilterModalProps;
47
- [ModalType.Prefix]: PrefixModalProps;
48
47
  [ModalType.ConditionalCustomMetric]: BaseCustomMetricModals<CustomField>;
49
- [ModalType.PercentageCustomMetric]: BaseCustomMetricModals<CustomField>;
50
- [ModalType.MathCustomMetric]: BaseCustomMetricModals<CustomField>;
51
- [ModalType.RulesCustomMetric]: BaseCustomMetricModals<CustomField>;
52
- [ModalType.RoundedNumberCustomMetric]: BaseCustomMetricModals<CustomField>;
48
+ [ModalType.ConditionalFormatting]: ConditionalFormattingModalProps;
49
+ [ModalType.CustomMetricBuilder]: BaseCustomMetricModals<CustomField>;
53
50
  [ModalType.DateCalculationCustomMetric]: BaseCustomMetricModals<CustomField>;
51
+ [ModalType.DateComparison]: BaseCustomMetricModals<CustomField>;
54
52
  [ModalType.DeleteCustomMetric]: DeleteModalProps;
55
- [ModalType.TableDrilldown]: TableDrilldownModalProps;
56
- [ModalType.Progress]: ProgressModalProps;
57
- [ModalType.ConditionalFormatting]: ConditionalFormattingModalProps;
58
- [ModalType.TrendLines]: TrendLinesModalProps;
53
+ [ModalType.Drilldown]: DrilldownModalProps;
59
54
  [ModalType.GoalLines]: GoalLineModalProps;
60
55
  [ModalType.ItemPicker]: ItemPickerProps;
61
- [ModalType.CustomMetricBuilder]: BaseCustomMetricModals<CustomField>;
56
+ [ModalType.MathCustomMetric]: BaseCustomMetricModals<CustomField>;
57
+ [ModalType.PercentageCustomMetric]: BaseCustomMetricModals<CustomField>;
58
+ [ModalType.Prefix]: PrefixModalProps;
59
+ [ModalType.Progress]: ProgressModalProps;
60
+ [ModalType.RoundedNumberCustomMetric]: BaseCustomMetricModals<CustomField>;
61
+ [ModalType.RulesCustomMetric]: BaseCustomMetricModals<CustomField>;
62
+ [ModalType.TableDrilldown]: TableDrilldownModalProps;
63
+ [ModalType.TrendLines]: TrendLinesModalProps;
62
64
  };
63
65
  declare type ModalChanges<T extends ModalType> = {
64
66
  modal: T;
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { RulesField } from '../../../../../../shared-logic/src/CustomField/types';
3
2
  import { Rules as RulesType } from '../../../../../../shared-logic/src/CustomField/Rules/types';
3
+ import { RulesField } from '../../../../../../shared-logic/src/CustomField/types';
4
4
  import { BaseCustomMetricModals } from '../types';
5
5
  export declare type RulesModalProps = BaseCustomMetricModals<RulesField | undefined | null>;
6
6
  export declare const RulesModal: FunctionComponent<RulesModalProps>;
@@ -1,7 +1,7 @@
1
- import { ComponentType } from '../../../../../shared-logic/src/Component/types';
2
- import { CustomField } from '../../../../../shared-logic/src/CustomField/types';
3
- import { DataSet } from '../../../../../shared-logic/src/DataSet/types';
4
- import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
1
+ import type { ComponentType } from '../../../../../shared-logic/src/Component/types';
2
+ import type { CustomField } from '../../../../../shared-logic/src/CustomField/types';
3
+ import type { DataSet } from '../../../../../shared-logic/src/DataSet/types';
4
+ import type { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
5
5
  export declare type BaseCustomMetricModals<T> = {
6
6
  show: boolean;
7
7
  onClose: () => void;
@@ -1,7 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
+ import { ComponentType } from '../../../../shared-logic/src/Component/types';
2
3
  import { DataSet } from '../../../../shared-logic/src/DataSet/types';
3
4
  import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
4
- import { ComponentType } from '../../../../shared-logic/src/Component/types';
5
5
  import { ModalType } from '../../contexts/DashboardContext/types';
6
6
  export declare const CustomMetricsInput: FunctionComponent<{
7
7
  dataSetId: string;
@@ -0,0 +1,12 @@
1
+ import { FunctionComponent } from 'react';
2
+ import type { Rules as RulesType } from '../../../../../shared-logic/src/CustomField/Rules/types';
3
+ import type { DateComparisonModalProps } from './types';
4
+ export declare const DateComparisonModal: FunctionComponent<DateComparisonModalProps>;
5
+ export interface RulesForm {
6
+ publicName?: string;
7
+ rules?: RulesType[];
8
+ }
9
+ export declare const useRulesForm: (comparison: RulesForm | null) => {
10
+ draft: RulesForm;
11
+ updateDraftRules: (rules: RulesType, index: number) => void;
12
+ };
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent } from 'react';
2
+ import type { Rules as RulesType } from '../../../../../shared-logic/src/CustomField/Rules/types';
3
+ import { DataSet } from '../../../../../shared-logic/src/DataSet/types';
4
+ import type { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
5
+ export declare const Rules: FunctionComponent<{
6
+ rules: RulesType;
7
+ index: number;
8
+ data: DataSet;
9
+ queryEngineConfig: QueryEngineConfig;
10
+ updateDraft: (completedRule: RulesType) => void;
11
+ }>;
@@ -0,0 +1,13 @@
1
+ import type { ComponentType } from '../../../../../shared-logic/src/Component/types';
2
+ import type { CustomField, RulesField } from '../../../../../shared-logic/src/CustomField/types';
3
+ import type { DataSet } from '../../../../../shared-logic/src/DataSet/types';
4
+ import type { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
5
+ export declare type DateComparisonModalProps = {
6
+ show: boolean;
7
+ onClose: () => void;
8
+ dataSet: DataSet;
9
+ componentType: ComponentType;
10
+ queryEngineConfig: QueryEngineConfig;
11
+ onNewCustomField: (customField: CustomField) => void;
12
+ comparison: RulesField | null;
13
+ };
@@ -0,0 +1,17 @@
1
+ import { Metric as MetricType } from '../../../../../shared-logic/src/CustomField/CustomMetric/types';
2
+ import type { MetricField } from '../../../../../shared-logic/src/CustomField/types';
3
+ import type { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
4
+ declare type WipCustomMetricField = {
5
+ publicName: string;
6
+ metric?: MetricType;
7
+ };
8
+ export declare const useCustomMetric: (queryEngineConfig: QueryEngineConfig, initialField: MetricField | undefined, onNewCustomField: (customMetric: MetricField) => void) => {
9
+ publicName: string;
10
+ onChange: (partial: Partial<WipCustomMetricField>) => void;
11
+ resetState: () => void;
12
+ metric: import("../../../../../shared-logic/src/CustomField/CustomMetric/types").Operator | import("../../../../../shared-logic/src/CustomField/CustomMetric/types").IfLogic | import("../../../../../shared-logic/src/CustomField/CustomMetric/types").Aggregate | import("../../../../../shared-logic/src/CustomField/CustomMetric/types").NumberInput | import("../../../../../shared-logic/src/CustomField/CustomMetric/types").Field | undefined;
13
+ isEditing: boolean;
14
+ disabled: boolean;
15
+ handleUpsert: () => void;
16
+ };
17
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Component } from '../../../../../shared-logic/src/Component/types';
3
+ import type { VizzlyComponents } from '../../../types';
4
+ declare type Props = VizzlyComponents.ComponentOverrides.Props.SectionProps & {
5
+ comparison: Component.WaterfallChartAttributes['comparison'];
6
+ };
7
+ export declare function DateComparisonSection(props: Props): JSX.Element;
8
+ export {};
@@ -11,3 +11,4 @@ export * from './FieldsInputSection';
11
11
  export * from './ViewsSection';
12
12
  export * from './FieldCollectorSection';
13
13
  export * from './TrendsSection';
14
+ export * from './DateComparisonSection';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.15.0-dev-e4e46cdb5d41c2a0c5b2637632228c4a6a4654e0",
4
+ "version": "0.15.0-dev-d2bab4f67568f04c6c8cdd5854027babfdc4a1a0",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",