@vizzly/services 0.15.0-dev-f2511344439820bfaf5d22b5a86b918e9edca528 → 0.15.0-dev-f4e541a9c6ae5df27cff1952ddd6dc5dc1e128d9

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.
@@ -16,7 +16,7 @@ export declare class View<T extends Component.Attributes> {
16
16
  static setQueryEngineConfig(queryEngineConfigOrClient: QueryEngineConfig | Client | null): void;
17
17
  updateAttributes(newAttributes: Partial<T>): void;
18
18
  }
19
- export type AnyView = AreaChart | AreaChartV2 | LineChart | LineChartV2 | BarChart | BarChartV2 | PieChart | BubbleChart | BubbleChartV2 | ScatterChart | ComboChart | ComboChartV2 | PivotTable | BasicTable | HorizontalBarChart | HorizontalBarChartV2 | MercatorMap | SingleStat | Progress | RichText | WaterfallChart | FunnelChart | SunburstChart | RadarChart;
19
+ export type AnyView = AreaChart | AreaChartV2 | LineChart | LineChartV2 | BarChart | BarChartV2 | PieChart | BubbleChart | BubbleChartV2 | ScatterChart | ScatterChartV2 | ComboChart | ComboChartV2 | PivotTable | BasicTable | HorizontalBarChart | HorizontalBarChartV2 | MercatorMap | SingleStat | Progress | RichText | WaterfallChart | FunnelChart | SunburstChart | RadarChart;
20
20
  export declare class AreaChart extends View<Component.AreaChartAttributes> {
21
21
  constructor(attributes: Partial<Component.AreaChartAttributes> & RequiredAttributes<Component.AreaChartAttributes>);
22
22
  static type(): Component.AreaChartAttributes['type'];
@@ -61,6 +61,10 @@ export declare class ScatterChart extends View<Component.ScatterChartAttributes>
61
61
  constructor(attributes: Partial<Component.ScatterChartAttributes> & RequiredAttributes<Component.ScatterChartAttributes>);
62
62
  static type(): Component.ScatterChartAttributes['type'];
63
63
  }
64
+ export declare class ScatterChartV2 extends View<Component.ScatterChartV2Attributes> {
65
+ constructor(attributes: Partial<Component.ScatterChartV2Attributes> & RequiredAttributes<Component.ScatterChartV2Attributes>);
66
+ static type(): Component.ScatterChartV2Attributes['type'];
67
+ }
64
68
  export declare class ComboChart extends View<Component.ComboChartAttributes> {
65
69
  constructor(attributes: Partial<Component.ComboChartAttributes> & RequiredAttributes<Component.ComboChartAttributes>);
66
70
  static type(): Component.ComboChartAttributes['type'];
@@ -1,2 +1,2 @@
1
1
  import * as Field from '../Field';
2
- export declare function upcast<T>(raw: any, functionsToCheck: Field.DecodingFunctionsToCheck): T;
2
+ export declare function upcast<T>(raw: any, functionsToCheck: Field.DecodingFunctionsToCheck, upcastApproxXAxisLabelCountWithAllOptions: boolean): T;
@@ -20,6 +20,7 @@ export declare const baseAttributesSchema: (attributeSchemaOptions: ComponentInt
20
20
  protectedByOrganisation: Joi.BooleanSchema<boolean>;
21
21
  };
22
22
  export declare const approxAxisLabelCountSchema: Joi.AnySchema<any>;
23
+ export declare const approxAxisLabelCountSchemaWithExtraOptions: (extraOptions?: Array<number | string>) => Joi.AnySchema<any>;
23
24
  export declare const querySchema: (queryEngineConfig: QueryEngineConfig, attributeSchemaOptions: ComponentInterfaceConfig["attributesSchemaOptions"]) => {
24
25
  measure: Joi.ArraySchema<any[]>;
25
26
  dimension: Joi.ArraySchema<any[]>;
@@ -27,7 +28,7 @@ export declare const querySchema: (queryEngineConfig: QueryEngineConfig, attribu
27
28
  limit: Joi.NumberSchema<number>;
28
29
  offset: Joi.NumberSchema<number>;
29
30
  };
30
- export declare const timeDimensionQuerySchema: (queryEngineConfig: QueryEngineConfig, attributeSchemaOptions: ComponentInterfaceConfig["attributesSchemaOptions"]) => {
31
+ export declare const timeDimensionQuerySchema: (queryEngineConfig: QueryEngineConfig, attributeSchemaOptions: ComponentInterfaceConfig["attributesSchemaOptions"], approxXAxisLabelCountExtraOptions?: Array<number | string>) => {
31
32
  filter: Joi.ArraySchema<any[]>;
32
33
  timeDimension: Joi.AlternativesSchema<any>;
33
34
  drilldown: Joi.AlternativesSchema<string | any[]>;
@@ -12,7 +12,8 @@ import { RulesField } from '../CustomField/types';
12
12
  export type getNumberFormatter = (formatterId: string | undefined | null) => (number: number) => string;
13
13
  export type FormatType = string | null;
14
14
  export type ApproxAxisLabelCount = 'auto' | number;
15
- export type ComponentType = 'areaChart' | 'areaChartV2' | 'barChart' | 'barChartV2' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'horizontalBarChartV2' | 'lineChart' | 'lineChartV2' | 'mercatorMap' | 'pieChart' | 'progress' | 'radarChart' | 'richText' | 'scatterChart' | 'singleStat' | 'sunburstChart' | 'waterfallChart';
15
+ export type ApproxAxisLabelCountWithAllOptions = ApproxAxisLabelCount | 'all70' | 'all90';
16
+ export type ComponentType = 'areaChart' | 'areaChartV2' | 'barChart' | 'barChartV2' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'horizontalBarChartV2' | 'lineChart' | 'lineChartV2' | 'mercatorMap' | 'pieChart' | 'progress' | 'radarChart' | 'richText' | 'scatterChart' | 'scatterChartV2' | 'singleStat' | 'sunburstChart' | 'waterfallChart';
16
17
  export declare const componentTypes: string[];
17
18
  export declare namespace Component {
18
19
  export type LineCurve = 'natural' | 'straight' | 'step' | 'stepBefore' | 'stepAfter' | 'dotted';
@@ -162,7 +163,7 @@ export declare namespace Component {
162
163
  yAxisPostfix: string;
163
164
  xAxisFormat: FormatType;
164
165
  yAxisFormat: FormatType;
165
- approxXAxisLabelCount: ApproxAxisLabelCount;
166
+ approxXAxisLabelCount: ApproxAxisLabelCountWithAllOptions;
166
167
  approxYAxisLabelCount: ApproxAxisLabelCount;
167
168
  approxDualYAxisLabelCount?: ApproxAxisLabelCount;
168
169
  legend: boolean;
@@ -202,7 +203,7 @@ export declare namespace Component {
202
203
  export type LineChartV2Attributes = BaseAttributes & BaseQueryAttributes & {
203
204
  type: 'lineChartV2';
204
205
  approxDualYAxisLabelCount?: ApproxAxisLabelCount;
205
- approxXAxisLabelCount: ApproxAxisLabelCount;
206
+ approxXAxisLabelCount: ApproxAxisLabelCountWithAllOptions;
206
207
  approxYAxisLabelCount: ApproxAxisLabelCount;
207
208
  axisTitles?: AxisTitles;
208
209
  conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
@@ -235,7 +236,7 @@ export declare namespace Component {
235
236
  yAxisPostfix: string;
236
237
  xAxisFormat: FormatType;
237
238
  yAxisFormat: FormatType;
238
- approxXAxisLabelCount: ApproxAxisLabelCount;
239
+ approxXAxisLabelCount: ApproxAxisLabelCountWithAllOptions;
239
240
  approxYAxisLabelCount: ApproxAxisLabelCount;
240
241
  conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
241
242
  drilldown: QueryAttributes.Dimension[];
@@ -257,7 +258,7 @@ export declare namespace Component {
257
258
  yAxisPostfix: string;
258
259
  xAxisFormat: FormatType;
259
260
  yAxisFormat: FormatType;
260
- approxXAxisLabelCount: ApproxAxisLabelCount;
261
+ approxXAxisLabelCount: ApproxAxisLabelCountWithAllOptions;
261
262
  approxYAxisLabelCount: ApproxAxisLabelCount;
262
263
  conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
263
264
  legend: boolean;
@@ -500,6 +501,29 @@ export declare namespace Component {
500
501
  trends?: Array<Trends>;
501
502
  quadrants?: Component.Quadrant.Rule;
502
503
  };
504
+ export type ScatterChartV2Attributes = BaseAttributes & BaseQueryAttributes & {
505
+ type: 'scatterChartV2';
506
+ stacked?: boolean | '100%';
507
+ xMeasure: QueryAttributes.Measure[];
508
+ xAxisPrefix: string;
509
+ yAxisPrefix: string;
510
+ xAxisPostfix: string;
511
+ yAxisPostfix: string;
512
+ lineCurve: LineCurve;
513
+ xAxisFormat: FormatType;
514
+ yAxisFormat: FormatType;
515
+ approxXAxisLabelCount: ApproxAxisLabelCount;
516
+ approxYAxisLabelCount: ApproxAxisLabelCount;
517
+ conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
518
+ drilldown: QueryAttributes.Dimension[];
519
+ legend: boolean;
520
+ parameters?: Parameters;
521
+ goalLines?: Array<Component.GoalLine.Rule>;
522
+ axisTitles?: AxisTitles;
523
+ headline?: Headline;
524
+ trends?: Array<Trends>;
525
+ quadrants?: Component.Quadrant.Rule;
526
+ };
503
527
  export type RadarChartAttributes = BaseAttributes & BaseQueryAttributes & {
504
528
  type: 'radarChart';
505
529
  legend: boolean;
@@ -520,7 +544,7 @@ export declare namespace Component {
520
544
  yAxisPostfix: string;
521
545
  xAxisFormat: FormatType;
522
546
  yAxisFormat: FormatType;
523
- approxXAxisLabelCount: ApproxAxisLabelCount;
547
+ approxXAxisLabelCount: ApproxAxisLabelCountWithAllOptions;
524
548
  approxYAxisLabelCount: ApproxAxisLabelCount;
525
549
  legend: boolean;
526
550
  labels?: boolean;
@@ -531,8 +555,8 @@ export declare namespace Component {
531
555
  decreaseColor: string;
532
556
  comparison: RulesField | null;
533
557
  };
534
- 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' | 'horizontalBarChartV2';
535
- 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 | HorizontalBarChartV2Attributes;
558
+ export type ViewType = 'areaChart' | 'barChart' | 'basicTable' | 'bubbleChart' | 'bubbleChartV2' | 'comboChart' | 'comboChartV2' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'lineChartV2' | 'areaChartV2' | 'barChartV2' | 'mercatorMap' | 'pieChart' | 'sunburstChart' | 'progress' | 'richText' | 'scatterChart' | 'scatterChartV2' | 'singleStat' | 'waterfallChart' | 'radarChart' | 'horizontalBarChartV2';
559
+ export type Attributes = AreaChartAttributes | BarChartAttributes | BasicTableAttributes | BubbleChartAttributes | BubbleChartV2Attributes | ComboChartAttributes | CustomViewAttributes | DataTableAttributes | FunnelChartAttributes | HorizontalBarChartAttributes | LineChartAttributes | LineChartV2Attributes | BarChartV2Attributes | AreaChartV2Attributes | MercatorMapAttributes | PieChartAttributes | SunburstChartAttributes | ProgressAttributes | RichTextAttributes | ScatterChartAttributes | ScatterChartV2Attributes | SingleStatAttributes | WaterfallChartAttributes | RadarChartAttributes | ComboChartV2Attributes | HorizontalBarChartV2Attributes;
536
560
  export interface RenderTableCell {
537
561
  viewId: string;
538
562
  type: 'basicTable' | 'dataTable';
@@ -1,7 +1,7 @@
1
1
  import { DataType } from '../Field/types';
2
2
  import { QueryAttributes, SupportedOperators } from './types';
3
3
  import { QueryEngineConfig } from '../QueryEngineConfig/types';
4
- import { ApproxAxisLabelCount, Component } from '../Component/types';
4
+ import { ApproxAxisLabelCount, ApproxAxisLabelCountWithAllOptions, Component } from '../Component/types';
5
5
  import { TextOverride } from '../Translations/types';
6
6
  export declare const validOperatorsForField: (field: {
7
7
  dataType: DataType;
@@ -14,6 +14,7 @@ export declare const upcastFilter: (filter: QueryAttributes["filter"]) => QueryA
14
14
  export declare const upcastOrder: (order: QueryAttributes["order"], timeDimension: QueryAttributes.TimeDimension | null) => QueryAttributes["order"];
15
15
  export declare const upcastMeasure: (measure: QueryAttributes["measure"]) => QueryAttributes["measure"];
16
16
  export declare const upcastAxisLabel: (count: ApproxAxisLabelCount) => ApproxAxisLabelCount;
17
+ export declare const upcastAxisLabelWithAllOptions: (count: ApproxAxisLabelCountWithAllOptions) => ApproxAxisLabelCountWithAllOptions;
17
18
  export declare const getOperatorPublicName: (id: keyof typeof vizzlyManagedOperators) => string;
18
19
  export declare const upcastParameters: (parameters?: Component.Parameters) => {
19
20
  measure?: undefined;
@@ -0,0 +1,3 @@
1
+ import Joi from '@vizzly/joi';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,3 @@
1
+ import { ViewConstants } from '../ComponentInterface/types/namespaces.types';
2
+ declare const CONSTANTS: ViewConstants;
3
+ export default CONSTANTS;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { LoadComponentInterface } from '../ComponentInterface/types';
3
+ declare const ScatterChartV2: LoadComponentInterface<Component.ScatterChartV2Attributes, Component.ScatterChartV2Attributes>;
4
+ export default ScatterChartV2;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ declare const _default: (config: ComponentInterfaceConfig) => (scatterChart: Component.ScatterChartV2Attributes, partial: Partial<Component.ScatterChartV2Attributes>) => Component.ScatterChartV2Attributes;
4
+ export default _default;
@@ -5,6 +5,7 @@ declare function getComponentInterface(type: 'custom', config?: ComponentInterfa
5
5
  declare function getComponentInterface(type: 'pieChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.PieChartAttributes>;
6
6
  declare function getComponentInterface(type: 'bubbleChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.BubbleChartAttributes>;
7
7
  declare function getComponentInterface(type: 'bubbleChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.BubbleChartV2Attributes>;
8
+ declare function getComponentInterface(type: 'scatterChartV2', config?: ComponentInterfaceConfig): ComponentInterface<Component.ScatterChartV2Attributes>;
8
9
  declare function getComponentInterface(type: 'sunburstChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.SunburstChartAttributes>;
9
10
  declare function getComponentInterface(type: 'scatterChart', config?: ComponentInterfaceConfig): ComponentInterface<Component.ScatterChartAttributes>;
10
11
  declare function getComponentInterface(type: 'mercatorMap', config?: ComponentInterfaceConfig): ComponentInterface<Component.MercatorMapAttributes>;
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "fix-type-alias": "tsc-alias -p tsconfig.types.json",
31
31
  "prepare": "yarn build"
32
32
  },
33
- "version": "0.15.0-dev-f2511344439820bfaf5d22b5a86b918e9edca528",
33
+ "version": "0.15.0-dev-f4e541a9c6ae5df27cff1952ddd6dc5dc1e128d9",
34
34
  "dependencies": {
35
35
  "@vizzly/api-client": "0.0.57",
36
36
  "@vizzly/joi": "^17.11.0",