@vizzly/services 0.14.4-dev-3455fe16fbb312a7c23a46cc2f4bcf62b52bb944 → 0.14.4-dev-5d1abd7a6424f860eb93453f0fe71ca68b0e9b0d

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.
@@ -417,6 +417,8 @@ export declare namespace Component {
417
417
  parameters?: Parameters;
418
418
  axisTitles?: AxisTitles;
419
419
  headline?: Headline;
420
+ increaseColor: string;
421
+ decreaseColor: string;
420
422
  };
421
423
  export type ViewType = 'areaChart' | 'barChart' | 'basicTable' | 'bubbleChart' | 'comboChart' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'lineChartV2' | 'areaChartV2' | 'barChartV2' | 'mercatorMap' | 'pieChart' | 'progress' | 'richText' | 'scatterChart' | 'singleStat' | 'waterfallChart' | 'radarChart';
422
424
  export type Attributes = AreaChartAttributes | BarChartAttributes | BasicTableAttributes | BubbleChartAttributes | ComboChartAttributes | CustomViewAttributes | DataTableAttributes | FunnelChartAttributes | HorizontalBarChartAttributes | LineChartAttributes | LineChartV2Attributes | BarChartV2Attributes | AreaChartV2Attributes | MercatorMapAttributes | PieChartAttributes | ProgressAttributes | RichTextAttributes | ScatterChartAttributes | SingleStatAttributes | WaterfallChartAttributes | RadarChartAttributes;
@@ -106,6 +106,7 @@ export interface FormatPanelNamespaces {
106
106
  };
107
107
  goal_line?: Section<'goalLine'>;
108
108
  map_colors?: Section<'mapColors'>;
109
+ waterfall_colors?: Section<'waterfallColors'>;
109
110
  headline?: Section<'headline'>;
110
111
  trends?: Section<'trends'>;
111
112
  prefixes?: Section<'prefixes'>;
@@ -35,6 +35,7 @@ export interface ComponentInterface<Hydrated = any, Dumped = any> extends Dumpab
35
35
  dateCalculations: boolean;
36
36
  conditional: boolean;
37
37
  calculatedField: Array<AcceptedTypes> | false;
38
+ customBuild: Array<AcceptedTypes> | false;
38
39
  };
39
40
  supportedFeatures: {
40
41
  parameters: boolean;
@@ -0,0 +1,7 @@
1
+ import { Query } from '../../Query/types';
2
+ import { QueryEngineConfig } from '../../QueryEngineConfig/types';
3
+ import { CustomBuildMetricField } from '../types';
4
+ import { Metric } from '../CustomMetric/types';
5
+ export * from './validate';
6
+ export declare const init: (publicName: string, metric: Metric, queryEngineConfig: QueryEngineConfig) => CustomBuildMetricField;
7
+ export declare const build: () => Query['measure'][number];
@@ -0,0 +1,5 @@
1
+ import Joi from '@vizzly/joi';
2
+ import { QueryEngineConfig } from '../../QueryEngineConfig/types';
3
+ declare const operatorSchema: Joi.ObjectSchema<any>;
4
+ export declare const ifLogicSchema: (queryEngineConfig: QueryEngineConfig) => Joi.ObjectSchema<any>;
5
+ export { operatorSchema };
@@ -0,0 +1,6 @@
1
+ import { QueryEngineConfig } from '../../QueryEngineConfig/types';
2
+ import { Metric } from '../CustomMetric/types';
3
+ export declare const validate: (queryEngineConfig: QueryEngineConfig, metric?: Metric) => {
4
+ isValid: boolean;
5
+ errors?: string[];
6
+ };
@@ -1,5 +1,5 @@
1
1
  import { DataSet as DataSetType } from '../DataSet/types';
2
- import { AggregateMathField, ConditionalField, CustomField, DateCalculationField, MetricField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
2
+ import { AggregateMathField, ConditionalField, CustomBuildMetricField, CustomField, DateCalculationField, MetricField, PercentageField, RoundedNumberField, RulesField, SimpleMathField } from '../CustomField/types';
3
3
  import { QueryAttributes } from '../QueryAttributes/types';
4
4
  import { QueryEngineConfig } from '../QueryEngineConfig/types';
5
5
  import { Query } from '../Query/types';
@@ -12,6 +12,7 @@ export declare const isPercentageField: (field: DataSetType.Field) => field is P
12
12
  export declare const isRules: (field: DataSetType.Field) => field is RulesField;
13
13
  export declare const isConditional: (field: DataSetType.Field) => field is ConditionalField;
14
14
  export declare const isMetric: (field: DataSetType.Field) => field is MetricField;
15
+ export declare const isCustomBuildMetric: (field: DataSetType.Field) => field is CustomBuildMetricField;
15
16
  export declare const isDateCalculation: (field: DataSetType.Field) => field is DateCalculationField;
16
17
  export declare const getCustomFieldCategory: (field: CustomField) => CustomFieldCategory;
17
18
  export declare const isCustomField: (field: DataSetType.Field) => field is CustomField;
@@ -4,12 +4,13 @@ export declare enum PropertyType {
4
4
  IfLogic = "ifLogic",
5
5
  NumberInput = "number",
6
6
  Variable = "variable",
7
- Field = "field"
7
+ Field = "field",
8
+ Aggregate = "aggregate"
8
9
  }
9
10
  export declare type Operator = {
10
11
  type: PropertyType.Operator;
11
12
  op: OperatorType;
12
- values: Array<Operator | NumberInput | Field | Variable | IfLogic>;
13
+ values: Array<Operator | NumberInput | Field | Variable | IfLogic | Aggregate>;
13
14
  };
14
15
  export declare type NumberInput = {
15
16
  type: PropertyType.NumberInput;
@@ -28,9 +29,14 @@ export declare type IfLogic = {
28
29
  type: PropertyType.IfLogic;
29
30
  cases: Array<{
30
31
  filter: Array<QueryAttributes.Filter[]>;
31
- returns: Operator | NumberInput | Field | Variable | IfLogic | undefined;
32
+ returns: Operator | NumberInput | Field | Variable | IfLogic | Aggregate | undefined;
32
33
  }>;
33
- else: Operator | NumberInput | Field | Variable | IfLogic | undefined;
34
+ else: Operator | NumberInput | Field | Variable | IfLogic | undefined | Aggregate;
35
+ };
36
+ export declare type Aggregate = {
37
+ type: PropertyType.Aggregate;
38
+ fieldId: string;
39
+ function?: string;
34
40
  };
35
41
  export declare type Metric = Operator | IfLogic;
36
42
  export declare enum OperatorType {
@@ -6,4 +6,5 @@ export * as Rules from './Rules';
6
6
  export * as RoundedNumber from './RoundedNumber';
7
7
  export * as DateCalculation from './DateCalculation';
8
8
  export * as Conditional from './Conditional';
9
+ export * as CustomBuild from "./CustomBuild";
9
10
  export * from './upcast';
@@ -18,7 +18,11 @@ export interface RulesField extends BaseField {
18
18
  rules: Rules[];
19
19
  dataType: 'string';
20
20
  }
21
- export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField;
21
+ export interface CustomBuildMetricField extends BaseField {
22
+ metricAtrributes: Metric;
23
+ dataType: 'number';
24
+ }
25
+ export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField | CustomBuildMetricField;
22
26
  export declare type Conditional = {
23
27
  fieldId: string;
24
28
  function: string;
@@ -70,10 +74,11 @@ export declare type DateCalculation = {
70
74
  dateCalculationFunction: 'seconds_between' | 'minutes_between' | 'hours_between' | 'days_between';
71
75
  };
72
76
  export declare type MathOperator = '*' | '-' | '/' | '+';
73
- export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation' | 'conditional' | 'calculatedField';
77
+ export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation' | 'conditional' | 'calculatedField' | 'customBuildMetric';
74
78
  export declare enum AcceptedTypes {
75
79
  Maths = "maths",
76
- IfStatement = "ifStatement"
80
+ IfStatement = "ifStatement",
81
+ Aggregates = "aggregates"
77
82
  }
78
83
  export declare type MaybeOldCustomField = CustomField;
79
84
  export {};
@@ -8,6 +8,7 @@ export declare type FieldFilterOptions = {
8
8
  removeAggregateMaths?: boolean;
9
9
  removeDateCalculations?: boolean;
10
10
  removeConditional?: boolean;
11
+ removeCustomBuildMetric?: boolean;
11
12
  onlyDimensions?: boolean;
12
13
  onlyMeasures?: boolean;
13
14
  forComponent?: ComponentType;
@@ -26,6 +26,7 @@ export declare type AxisLabelsSection = Section<'axisLabels'> & {
26
26
  export declare type LabelsSection = Section<'statsLabels'> & LabelSection<'statsLabels'>;
27
27
  export declare type PrefixSection = Section<'prefixes'>;
28
28
  export declare type MapColorsSection = Section<'mapColors'>;
29
+ export declare type WaterfallColorsSection = Section<'waterfallColors'>;
29
30
  export declare type HeadlineSection = Section<'headline'>;
30
31
  export declare type RichTextFormatSection = Section<'richText'>;
31
32
  export interface ConditionalFormattingSection extends Section<'conditionalFormatting'> {
@@ -41,5 +42,5 @@ export interface ProgressTypeSection<T> extends Omit<Section<T>, 'type'> {
41
42
  progressType?: Omit<Section<T>, 'type'>;
42
43
  }
43
44
  export declare type ProgressTypesSection = Section<'progressType'> & ProgressTypeSection<'progressType'>;
44
- export declare type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | ConditionalFormattingSection | GoalLineSection | ProgressTypesSection | HeadlineSection | RichTextFormatSection | Section<'trends'>;
45
+ export declare type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | WaterfallColorsSection | ConditionalFormattingSection | GoalLineSection | ProgressTypesSection | HeadlineSection | RichTextFormatSection | Section<'trends'>;
45
46
  export declare type FormatPanelConfig = Array<FormatPanelSection>;
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "fix-type-alias": "tsc-alias -p tsconfig.json",
27
27
  "prepare": "yarn build"
28
28
  },
29
- "version": "0.14.4-dev-3455fe16fbb312a7c23a46cc2f4bcf62b52bb944",
29
+ "version": "0.14.4-dev-5d1abd7a6424f860eb93453f0fe71ca68b0e9b0d",
30
30
  "dependencies": {
31
31
  "@vizzly/api-client": "0.0.45",
32
32
  "@vizzly/joi": "^17.11.0",