@vizzly/dashboard 0.15.0-dev-033795aa7bbea8577ad57ab62911fc28af9f0e67 → 0.15.0-dev-6f309335ad30223a136cf38b60f5e283e6f1dd6a
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/charts/src/v2/components/WaterfallChart/WaterfallChart.d.ts +4 -2
- package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
- package/dist/dashboard.cjs.development.js +5905 -5527
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +5906 -5528
- package/dist/results-driver/src/driver/VizzlyQuery/WaterfallChart/toQueries.d.ts +9 -3
- package/dist/shared-logic/src/Component/types.d.ts +2 -5
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +16 -15
- package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
- package/dist/shared-logic/src/Result/Result.d.ts +2 -2
- package/dist/shared-logic/src/WaterfallChart/buildWaterfallChartRepresentation.d.ts +7 -3
- package/dist/shared-logic/src/WaterfallChart/getRepresentationData.d.ts +5 -2
- package/dist/shared-logic/src/WaterfallChart/getYTicks.d.ts +1 -1
- package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +26 -24
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/Rules/RulesModal.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/types.d.ts +4 -4
- package/dist/shared-ui/src/library/DataPanel/CustomMetricsInput.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/DateComparisonModal.d.ts +12 -0
- package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/Rules.d.ts +11 -0
- package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/types.d.ts +13 -0
- package/dist/shared-ui/src/library/DataPanel/DateComparisonModal/useCustomMetric.d.ts +17 -0
- package/dist/shared-ui/src/library/DataPanel/sections/DateComparisonSection.d.ts +8 -0
- package/dist/shared-ui/src/library/DataPanel/sections/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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;
|
|
@@ -163,7 +164,6 @@ export declare namespace Component {
|
|
|
163
164
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
164
165
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
165
166
|
legend: boolean;
|
|
166
|
-
labels?: boolean;
|
|
167
167
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
168
168
|
conditionalFormattingRules?: {
|
|
169
169
|
bar?: Array<ConditionalFormatting.Rule>;
|
|
@@ -207,7 +207,6 @@ export declare namespace Component {
|
|
|
207
207
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
208
208
|
drilldown: QueryAttributes.Dimension[];
|
|
209
209
|
legend: boolean;
|
|
210
|
-
labels?: boolean;
|
|
211
210
|
parameters?: Parameters;
|
|
212
211
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
213
212
|
axisTitles?: AxisTitles;
|
|
@@ -228,7 +227,6 @@ export declare namespace Component {
|
|
|
228
227
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
229
228
|
drilldown: QueryAttributes.Dimension[];
|
|
230
229
|
legend: boolean;
|
|
231
|
-
labels?: boolean;
|
|
232
230
|
parameters?: Parameters;
|
|
233
231
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
234
232
|
axisTitles?: AxisTitles;
|
|
@@ -250,7 +248,6 @@ export declare namespace Component {
|
|
|
250
248
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
251
249
|
drilldown: QueryAttributes.Dimension[];
|
|
252
250
|
legend: boolean;
|
|
253
|
-
labels?: boolean;
|
|
254
251
|
parameters?: Parameters;
|
|
255
252
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
256
253
|
axisTitles?: AxisTitles;
|
|
@@ -474,12 +471,12 @@ export declare namespace Component {
|
|
|
474
471
|
approxXAxisLabelCount: ApproxAxisLabelCount;
|
|
475
472
|
approxYAxisLabelCount: ApproxAxisLabelCount;
|
|
476
473
|
legend: boolean;
|
|
477
|
-
labels?: boolean;
|
|
478
474
|
parameters?: Parameters;
|
|
479
475
|
axisTitles?: AxisTitles;
|
|
480
476
|
headline?: Headline;
|
|
481
477
|
increaseColor: string;
|
|
482
478
|
decreaseColor: string;
|
|
479
|
+
comparison: RulesField | null;
|
|
483
480
|
};
|
|
484
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';
|
|
485
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
|
-
|
|
30
|
-
|
|
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
|
-
|
|
35
|
+
field_country?: Section<'fieldCollector'>;
|
|
36
36
|
field_grouping?: Section<'fieldCollector'>;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
field_metrics?: Section<'fieldCollector'>;
|
|
38
|
+
field_rows?: Section<'fieldCollector'>;
|
|
39
39
|
field_x_axis?: Section<'fieldCollector'>;
|
|
40
|
-
|
|
41
|
-
|
|
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 =
|
|
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,
|
|
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 {
|
|
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: (
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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.
|
|
50
|
-
[ModalType.
|
|
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.
|
|
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.
|
|
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 {};
|
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-
|
|
4
|
+
"version": "0.15.0-dev-6f309335ad30223a136cf38b60f5e283e6f1dd6a",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"module": "./dist/dashboard.esm.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@react-hook/window-size": "^3.1.1",
|
|
54
54
|
"@react-spring/web": "9.6.1",
|
|
55
55
|
"@visx/visx": "^3.10.2",
|
|
56
|
-
"@vizzly/api-client": "0.0.
|
|
56
|
+
"@vizzly/api-client": "0.0.57",
|
|
57
57
|
"@vizzly/joi": "^17.7.0",
|
|
58
58
|
"@vizzly/semantic-layer-public": "0.0.235",
|
|
59
59
|
"@vizzly/sqlbuilder-public": "0.1.57",
|