@statisticsfinland/pxvisualizer 1.0.8 → 1.0.9-d.0

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.
@@ -0,0 +1,31 @@
1
+ import { IQueryVisualizationResponse } from "../types";
2
+ import { IVariableMeta, IVariableValueMeta, TMultiLanguageString } from "../types/queryVisualizationResponse";
3
+ import { TVariableSelections } from "../types/variableSelections";
4
+ import { IDataCell, IDataSeries } from "../types/view";
5
+ export declare class SeriesBuilder {
6
+ dataIndex: number;
7
+ dataLength: number;
8
+ private readonly responseObj;
9
+ private readonly coordinates;
10
+ private readonly lastIndices;
11
+ private readonly indices;
12
+ private readonly variableOrder;
13
+ private readonly lastCoordinateIndex;
14
+ private readonly reverseCumulativeProducts;
15
+ private readonly selectedViewContentVariableIndex;
16
+ private readonly selectedViewTimeVariableIndex;
17
+ private readonly selectedViewMeta;
18
+ private rowLength;
19
+ private rowAmount;
20
+ constructor(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections);
21
+ private initializeCoordinates;
22
+ getViewSeries(): IDataSeries[];
23
+ generateRowNameGroup(): TMultiLanguageString[];
24
+ next(): boolean;
25
+ createDataCell(): IDataCell;
26
+ getSelectedView(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections): IVariableMeta[];
27
+ getVariableOrder(): number[];
28
+ generateRCP(variableSizes: number[]): number[];
29
+ setCurrentIndex(): void;
30
+ getCurrentTimeValue(): IVariableValueMeta | undefined;
31
+ }
@@ -0,0 +1,4 @@
1
+ import { IVariableMeta, IVariableValueMeta } from "../types/queryVisualizationResponse";
2
+ import { TVariableSelections } from "../types/variableSelections";
3
+ export declare function getValuesForVariableInView(variable: IVariableMeta, selectedValueCodes: TVariableSelections): IVariableValueMeta[];
4
+ export declare function sortVariables(variables: IVariableMeta[], codes: string[]): IVariableMeta[];
@@ -1,10 +1,10 @@
1
1
  import { IQueryVisualizationResponse } from "../types";
2
2
  import { TMultiLanguageString } from "../types/queryVisualizationResponse";
3
- import { IDataSeries, TSingleSelections, View } from "../types/view";
3
+ import { IDataSeries, View } from "../types/view";
4
4
  import { TVariableSelections } from "../types/variableSelections";
5
5
  export declare function convertPxGrafResponseToView(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections): View;
6
6
  export declare function convertToRelative(input: View): View;
7
- export declare function buildSeries(responseObj: IQueryVisualizationResponse, selectedValueCodes: TSingleSelections): {
7
+ export declare function buildSeries(responseObj: IQueryVisualizationResponse, selectedValueCodes: TVariableSelections): {
8
8
  columnNameGroups: TMultiLanguageString[][];
9
9
  series: IDataSeries[];
10
10
  };
@@ -32,9 +32,6 @@ export interface IDataSeries {
32
32
  rowNameGroup: TMultiLanguageString[];
33
33
  series: IDataCell[];
34
34
  }
35
- export type TSingleSelections = {
36
- [key: string]: string;
37
- };
38
35
  export type TValueSelectionAmounts = {
39
36
  [key: string]: number;
40
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statisticsfinland/pxvisualizer",
3
- "version": "1.0.8",
3
+ "version": "1.0.9-d.0",
4
4
  "description": "Component library for visualizing PxGraf data",
5
5
  "main": "./dist/pxv.cjs",
6
6
  "jestSonar": {