bento-charts 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,9 +1,46 @@
1
+ # Bento Charts
1
2
 
3
+ [![Build Status](https://travis-ci.org/bento-platform/Bento-Charts.svg?branch=master)](https://travis-ci.org/bento-platform/Bento-Charts)
4
+ [![Coverage Status](https://coveralls.io/repos/github/bento-platform/Bento-Charts/badge.svg?branch=master)](https://coveralls.io/github/bento-platform/Bento-Charts?branch=master)
5
+ [![npm version](https://badge.fury.io/js/bento-charts.svg)](https://badge.fury.io/js/bento-charts)
2
6
 
3
- // TODO: Add comments telling how can you translate
4
- // TODO: Add a way for default translation
5
- // TODO: Add theme selection for chart
6
- // TODO: Add comment on how to remove missing
7
+ Bento charts offers Bar and Pie charts for Bento project UI.
7
8
 
8
- There are two charts supported: Bar and Pie
9
- Refer
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install bento-charts
13
+ ```
14
+
15
+ ## Usage
16
+ Wrap your app in the ChartConfigProvider and pass in the Language of your site.
17
+
18
+ ```jsx
19
+ import { ChartConfigProvider } from 'bento-charts';
20
+ ```
21
+
22
+ ```jsx
23
+ <ChartConfigProvider Lng={language}>
24
+ <App />
25
+ </ChartConfigProvider>
26
+ ```
27
+ Language can be either `'en'` or `'fr'`.
28
+
29
+ You also can provide your own theme and translation dictionary.
30
+
31
+ ```jsx
32
+ <ChartConfigProvider
33
+ Lng={language}
34
+ theme={theme}
35
+ translations={translations}
36
+ >
37
+ <App />
38
+ </ChartConfigProvider>
39
+ ```
40
+ refer to [theme](https://github.com/bento-platform/Bento-Charts/blob/eee46541eec68e2dd7f62f8d786148480ce5105f/src/types/chartTypes.ts#L20) and [translations](https://github.com/bento-platform/Bento-Charts/blob/eee46541eec68e2dd7f62f8d786148480ce5105f/src/types/chartTypes.ts#L47) for more information.
41
+ ## Using a Chart
42
+
43
+ ```jsx
44
+ import { BarChart, PieChart } from 'bento-charts';
45
+ ```
46
+ Refer to [Props](https://github.com/bento-platform/Bento-Charts/blob/eee46541eec68e2dd7f62f8d786148480ce5105f/src/types/chartTypes.ts#L51) for information on their props.
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { default as BarChart } from './Charts/BentoBarChart';
2
+ export { default as PieChart } from './Charts/BentoPie';
3
+ export { default as ChartConfigProvider } from './ChartConfigProvider';
4
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "bento-charts",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Charts library for Bento-platform",
5
- "main": "./src/index.js",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "scripts": {
7
- "build": "webpack --mode=production",
8
- "watch": "webpack --mode=development --watch"
8
+ "build": "npx tsc",
9
+ "prepublishOnly": "npm run build"
9
10
  },
10
11
  "repository": {
11
12
  "type": "git",
@@ -31,8 +32,6 @@
31
32
  },
32
33
  "devDependencies": {
33
34
  "prettier": "2.7.1",
34
- "typescript": "^4.9.5",
35
- "webpack": "^5.76.0",
36
- "webpack-cli": "^4.9.2"
35
+ "typescript": "^4.9.5"
37
36
  }
38
37
  }
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "outDir": "./dist/",
3
+ "outDir": "dist",
4
4
  "sourceMap": true,
5
5
  "strictNullChecks": true,
6
6
  "module": "es6",
@@ -9,16 +9,18 @@
9
9
  "skipLibCheck": true,
10
10
  "esModuleInterop": true,
11
11
  "allowSyntheticDefaultImports": true,
12
- "strict": true,
13
12
  "forceConsistentCasingInFileNames": true,
14
13
  "noFallthroughCasesInSwitch": true,
15
14
  "moduleResolution": "node",
16
15
  "resolveJsonModule": true,
17
16
  "isolatedModules": true,
18
- "noEmit": false,
19
- "jsx": "react-jsx"
17
+ "jsx": "react-jsx",
18
+ "declaration": true,
20
19
  },
21
20
  "include": [
22
- "./src/"
23
- ]
21
+ "src/**/*"
22
+ ],
23
+ "exclude": [
24
+ "node_modules"
25
+ ],
24
26
  }
package/.git-ignore DELETED
@@ -1,6 +0,0 @@
1
- build/*
2
- node_modules/*
3
- dist/*
4
- .DS_Store
5
- .idea/
6
- .vscode/
package/webpack.config.js DELETED
@@ -1,18 +0,0 @@
1
- module.exports = {
2
- mode: 'production',
3
- entry: './src/index.js',
4
- output: {
5
- filename: 'BentoCharts.js',
6
- library: 'bento-charts',
7
- libraryTarget: 'umd',
8
- globalObject: 'this',
9
- },
10
- module: {
11
- rules: [
12
- { test: /\.[tj](sx|s)?$/, use: { loader: 'ts-loader' }, exclude: /node_modules/ }
13
- ],
14
- },
15
- resolve: {
16
- extensions: ['.tsx', '.ts', '.js'],
17
- },
18
- };
File without changes