@statisticsfinland/pxvisualizer 1.0.3 → 1.0.4-d.1

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.
@@ -1,6 +1 @@
1
- export declare enum BlobDataType {
2
- Csv = 0,
3
- Excel = 1
4
- }
5
- export declare const generateBlob: (data: string, type: BlobDataType) => Blob;
6
1
  export declare const generateFilename: (tableReference: string) => string;
@@ -1,5 +1,5 @@
1
1
  export { renderHtmlTable } from "./htmlTable";
2
2
  export { generateCsv } from "./csvTable";
3
3
  export { viewToDownloadCSVOption } from "./csvTable";
4
- export { generateExcel } from "./xlsxTable";
5
- export { viewToDownloadXLSOption } from "./xlsxTable";
4
+ export { buildMinimalXlsxBlobAsync } from "./xlsx/xlsxBuilder";
5
+ export { viewToDownloadXLSOption } from "./xlsx/xlsxBuilder";
@@ -0,0 +1,6 @@
1
+ import { View } from '../../types/view';
2
+ export declare const viewToDownloadXLSOption: (view: View, locale: string) => {
3
+ onClick: () => Promise<void>;
4
+ text: string;
5
+ };
6
+ export declare function buildMinimalXlsxBlobAsync(view: View, locale: string): Promise<Blob>;
@@ -0,0 +1,3 @@
1
+ import { View } from "../../types/view";
2
+ import { TCell } from "./xlsxTypes";
3
+ export declare const buildCellRows: (view: View, locale: string) => TCell[][];
@@ -0,0 +1,2 @@
1
+ export declare const workbookProperties: string[];
2
+ export declare const worksheetProperties: string[];
@@ -0,0 +1,4 @@
1
+ export declare const workbookTemplate: string;
2
+ export declare const relationsTemplate = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships\nxmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"\n>\n <Relationship\n Id=\"rId1\"\n Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\"\n Target=\"xl/workbook.xml\"\n />\n</Relationships>";
3
+ export declare const workbookRelationsTemplate = "<?xml version=\"1.0\" ?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship\n Id=\"rId3\"\n Target=\"worksheets/sheet1.xml\" \n Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\"\n />\n</Relationships>";
4
+ export declare const contentTypesTemplate = "<?xml version=\"1.0\" ?>\n<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n <Default ContentType=\"application/xml\" Extension=\"xml\"/>\n <Default ContentType=\"application/vnd.openxmlformats-package.relationships+xml\" Extension=\"rels\"/>\n <Override ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\" PartName=\"/xl/worksheets/sheet1.xml\"/>\n <Override ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\" PartName=\"/xl/workbook.xml\"/>\n</Types>";
@@ -0,0 +1,2 @@
1
+ import { TCell } from "./xlsxTypes";
2
+ export declare const buildXMLSheet: (rows: TCell[][]) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statisticsfinland/pxvisualizer",
3
- "version": "1.0.3",
3
+ "version": "1.0.4-d.1",
4
4
  "description": "Component library for visualizing PxGraf data",
5
5
  "main": "./dist/pxv.cjs",
6
6
  "jestSonar": {
@@ -32,9 +32,9 @@
32
32
  "test:watch": "jest --watchAll=true",
33
33
  "build": "microbundle --globals highcharts/modules/accessibility.js=highchartsAccessibility,highcharts/modules/exporting.js=highchartsExporting,highcharts/modules/export-data.js=highchartsExportData,highcharts/modules/offline-exporting.js=highchartsOfflineExporting",
34
34
  "dev": "microbundle watch",
35
- "storybook": "set NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
36
- "storybook_legacy": "start-storybook -p 6006",
37
- "build-storybook": "set NODE_OPTIONS=--openssl-legacy-provider && build-storybook",
35
+ "storybook": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
36
+ "storybook_legacy": "storybook dev -p 6006",
37
+ "build-storybook": "set NODE_OPTIONS=--openssl-legacy-provider && storybook build",
38
38
  "prepublishOnly": "npm run build",
39
39
  "version-helper": "node .github/scripts/version-helper.js"
40
40
  },
@@ -46,18 +46,19 @@
46
46
  "license": "Apache-2.0",
47
47
  "devDependencies": {
48
48
  "@babel/core": "^7.24.5",
49
- "@storybook/addon-a11y": "^6.5.16",
50
- "@storybook/addon-actions": "^6.5.16",
51
- "@storybook/addon-essentials": "^6.5.16",
52
- "@storybook/addon-interactions": "^6.5.16",
53
- "@storybook/addon-links": "^6.5.16",
54
- "@storybook/builder-webpack4": "^6.5.16",
55
- "@storybook/core": "^6.5.16",
56
- "@storybook/manager-webpack4": "^6.5.16",
57
- "@storybook/react": "^6.5.16",
58
- "@storybook/testing-library": "^0.0.13",
49
+ "@storybook/addon-a11y": "^8.1.3",
50
+ "@storybook/addon-actions": "^8.1.3",
51
+ "@storybook/addon-essentials": "^8.1.3",
52
+ "@storybook/addon-interactions": "^8.1.3",
53
+ "@storybook/addon-links": "^8.1.3",
54
+ "@storybook/addon-webpack5-compiler-swc": "^1.0.2",
55
+ "@storybook/blocks": "^8.1.3",
56
+ "@storybook/react": "^8.1.3",
57
+ "@storybook/react-webpack5": "^8.1.3",
58
+ "@storybook/test": "^8.1.3",
59
59
  "@testing-library/dom": "^9.3.4",
60
60
  "@testing-library/react": "^14.3.1",
61
+ "@types/file-saver": "^2.0.7",
61
62
  "@types/jest": "^29.5.12",
62
63
  "@types/papaparse": "^5.3.14",
63
64
  "@types/react": "^18.3.2",
@@ -78,19 +79,19 @@
78
79
  "react": "^18.3.1",
79
80
  "react-dom": "^18.3.1",
80
81
  "semver": "^7.6.2",
82
+ "storybook": "^8.1.3",
81
83
  "styled-components": "^5.3.11",
82
84
  "ts-jest": "^29.1.2",
83
85
  "ts-node": "^10.9.2",
84
86
  "typescript": "^4.9.5",
85
- "uuid": "^9.0.1",
86
- "xlsx": "^0.18.5"
87
+ "uuid": "^9.0.1"
87
88
  },
88
89
  "dependencies": {
89
90
  "decimal.js": "^10.4.3",
91
+ "fflate": "^0.8.2",
90
92
  "highcharts": "^10.3.3",
91
93
  "highcharts-react-official": "^3.2.1",
92
- "uuid": "^9.0.1",
93
- "xlsx": "^0.18.5"
94
+ "uuid": "^9.0.1"
94
95
  },
95
96
  "peerDependencies": {
96
97
  "react": "^18.2.0",
@@ -1,7 +0,0 @@
1
- import { View } from "../types/view";
2
- export declare const generateExcel: (view: View, locale: string) => any;
3
- export declare const buildStringTableForExcel: (view: View, locale: string) => (string | null)[][];
4
- export declare const viewToDownloadXLSOption: (view: View, locale: string) => {
5
- onClick: () => void;
6
- text: string;
7
- };