@datarailsshared/dr_renderer 1.1.41 → 1.2.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/.circleci/config.yml +86 -0
- package/README.md +23 -23
- package/babel.config.js +3 -0
- package/jest.config.js +27 -0
- package/package.json +50 -28
- package/src/charts/dr_gauge_chart.js +566 -0
- package/src/dataformatter.d.ts +13 -0
- package/src/dataformatter.js +1076 -1023
- package/src/dr-renderer-helpers.js +58 -0
- package/src/dr_chart_tooltip.js +277 -0
- package/src/dr_pivottable.js +2639 -2178
- package/src/graph-table-renderer.js +147 -0
- package/src/highcharts_renderer.js +10020 -6262
- package/src/index.js +27 -21
- package/src/novix_renderer.js +906 -829
- package/src/pivot.css +426 -301
- package/src/pivottable.js +1901 -1824
- package/src/published_items_renderer.js +365 -0
- package/src/seriesPointStyles-helper.js +43 -0
- package/start_run.sh +3 -3
- package/tests/dr-renderer-helpers.test.js +150 -0
- package/tests/dr_chart_tooltip.test.js +739 -0
- package/tests/dr_gauge_chart.test.js +1931 -0
- package/tests/highcharts_renderer.test.js +9358 -0
- package/tests/mock/add-in-dynamic-ranges.json +127 -0
- package/tests/mock/add-in-functions.json +410 -0
- package/tests/mock/add-in-tables.json +347 -0
- package/tests/mock/tables.json +2258 -0
- package/tests/mock/widgets.json +403 -0
- package/tests/seriesPointStyles-helper.test.js +114 -0
- package/tsconfig.json +15 -0
- package/types/graph-table-renderer.d.ts +79 -0
- package/types/index.d.ts +1 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
orbs:
|
|
4
|
+
datarails-cicd-orb: datarails-ns/datarails-cicd-orb@dev:primary
|
|
5
|
+
|
|
6
|
+
defaults: &defaults
|
|
7
|
+
working_directory: ~/repo
|
|
8
|
+
docker:
|
|
9
|
+
- image: circleci/node:14.16.1
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
deploy:
|
|
13
|
+
<<: *defaults
|
|
14
|
+
steps:
|
|
15
|
+
- checkout
|
|
16
|
+
|
|
17
|
+
- attach_workspace:
|
|
18
|
+
at: ~/repo
|
|
19
|
+
- run:
|
|
20
|
+
name: Prepare publish version
|
|
21
|
+
command: |
|
|
22
|
+
postfix=""
|
|
23
|
+
if [[ "${CIRCLE_BRANCH}" != master ]] ; then
|
|
24
|
+
postfix="-$CIRCLE_BRANCH"
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
VERSION="1.2.$CIRCLE_BUILD_NUM$postfix"
|
|
28
|
+
sed -i s/{{cicd_version}}/$VERSION/g ./package.json
|
|
29
|
+
cat ./package.json
|
|
30
|
+
- run:
|
|
31
|
+
name: Authenticate with registry
|
|
32
|
+
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
|
|
33
|
+
- run:
|
|
34
|
+
name: Install dependencies
|
|
35
|
+
command: npm install
|
|
36
|
+
- run:
|
|
37
|
+
name: Run npm test
|
|
38
|
+
command: npm test
|
|
39
|
+
- run:
|
|
40
|
+
name: Publish package
|
|
41
|
+
command: npm publish . --access=public
|
|
42
|
+
- datarails-cicd-orb/add-ssh-id:
|
|
43
|
+
private_key_env_var: github_deploy_private_encoded
|
|
44
|
+
public_key_env_var: github_deploy_pub_encoded
|
|
45
|
+
is_public_key_encoded: true
|
|
46
|
+
is_private_key_encoded: true
|
|
47
|
+
- run:
|
|
48
|
+
name: prepare git tag
|
|
49
|
+
command: |
|
|
50
|
+
postfix=""
|
|
51
|
+
if [[ "${CIRCLE_BRANCH}" != prod ]] ; then
|
|
52
|
+
postfix="-$CIRCLE_BRANCH"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
VERSION="1.2.$CIRCLE_BUILD_NUM$postfix"
|
|
56
|
+
git config --global user.email noreplay@circleci.com
|
|
57
|
+
git config --global user.name circleci
|
|
58
|
+
git config --global -l
|
|
59
|
+
git tag -a "$CIRCLE_BRANCH/$VERSION" -m "circleci build"
|
|
60
|
+
# Test SSH connection to GitHub
|
|
61
|
+
output=$(ssh -o "StrictHostKeyChecking no" -T git@github.com 2>&1 || true)
|
|
62
|
+
echo "$output"
|
|
63
|
+
if ! echo "$output" | grep -q "Hi.*You've successfully authenticated"; then
|
|
64
|
+
echo "Failed to authenticate with GitHub"
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
67
|
+
# Push the tag after successful authentication
|
|
68
|
+
git push origin "$CIRCLE_BRANCH/$VERSION"
|
|
69
|
+
|
|
70
|
+
workflows:
|
|
71
|
+
version: 2
|
|
72
|
+
npm-publish:
|
|
73
|
+
jobs:
|
|
74
|
+
- deploy:
|
|
75
|
+
context:
|
|
76
|
+
- metadata
|
|
77
|
+
filters:
|
|
78
|
+
branches:
|
|
79
|
+
only:
|
|
80
|
+
- /master/
|
|
81
|
+
- /tigers/
|
|
82
|
+
- /bratans/
|
|
83
|
+
- /dragons/
|
|
84
|
+
- /tigers/
|
|
85
|
+
- /wizards/
|
|
86
|
+
- /rocket/
|
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# Datarails renderer
|
|
2
|
-
|
|
3
|
-
This project was generated by amazing Datarails R&D team
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
npm i @datarailsshared/dr_renderer
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
const dr_renderer = require( "@datarailsshared/dr_renderer");
|
|
12
|
-
dr_renderer.init($, window, window.document);
|
|
13
|
-
let default_colors = ["#106bd0", "#00cee8", "#95c8d8", "#89cff0", "#FE746D", "#6ADC4C", "#9B9AD9", "#ff8000", "#C11B12", "#5a41f9"];
|
|
14
|
-
let hr = dr_renderer.getInitHighchartsRenderer($, document, default_colors, Highcharts);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# Datarails renderer
|
|
2
|
+
|
|
3
|
+
This project was generated by amazing Datarails R&D team
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
npm i @datarailsshared/dr_renderer
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
const dr_renderer = require( "@datarailsshared/dr_renderer");
|
|
12
|
+
dr_renderer.init($, window, window.document);
|
|
13
|
+
let default_colors = ["#106bd0", "#00cee8", "#95c8d8", "#89cff0", "#FE746D", "#6ADC4C", "#9B9AD9", "#ff8000", "#C11B12", "#5a41f9"];
|
|
14
|
+
let hr = dr_renderer.getInitHighchartsRenderer($, document, default_colors, Highcharts);
|
|
15
|
+
|
|
16
|
+
## Development
|
|
17
|
+
### Types
|
|
18
|
+
To be able to compile types with `npm run build:types` you need to install typescript globally:
|
|
19
|
+
|
|
20
|
+
```npm i -g typescript```
|
|
21
|
+
|
|
22
|
+
## Publish to npm
|
|
23
|
+
Just merge to prod branch
|
package/babel.config.js
ADDED
package/jest.config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
clearMocks: true,
|
|
3
|
+
setupFilesAfterEnv: ['regenerator-runtime/runtime'],
|
|
4
|
+
testPathIgnorePatterns: [
|
|
5
|
+
"/node_modules/",
|
|
6
|
+
],
|
|
7
|
+
transformIgnorePatterns: [
|
|
8
|
+
"<rootDir>/node_modules/(?!jquery|lodash|moment/)",
|
|
9
|
+
],
|
|
10
|
+
collectCoverage: true,
|
|
11
|
+
collectCoverageFrom: [
|
|
12
|
+
'**/*.js',
|
|
13
|
+
'!**/*.config.js',
|
|
14
|
+
'!**/build/**',
|
|
15
|
+
'!**/coverage/**',
|
|
16
|
+
'!**/node_modules/**',
|
|
17
|
+
'!**/vendor/**'
|
|
18
|
+
],
|
|
19
|
+
// coverageThreshold: {
|
|
20
|
+
// "global": {
|
|
21
|
+
// "branches": 100,
|
|
22
|
+
// "functions": 100,
|
|
23
|
+
// "lines": 100,
|
|
24
|
+
// "statements": 100
|
|
25
|
+
// }
|
|
26
|
+
// },
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,28 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@datarailsshared/dr_renderer",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "DataRails charts and tables renderer",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"datarails",
|
|
7
|
-
"components",
|
|
8
|
-
"charts",
|
|
9
|
-
"tables"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"login": "npm login"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@datarailsshared/dr_renderer",
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"description": "DataRails charts and tables renderer",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"datarails",
|
|
7
|
+
"components",
|
|
8
|
+
"charts",
|
|
9
|
+
"tables"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"login": "npm login",
|
|
13
|
+
"test": "jest --coverage",
|
|
14
|
+
"build:types": "tsc --build --verbose"
|
|
15
|
+
},
|
|
16
|
+
"author": "Sergey Spivakov",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://bitbucket.org/datarails/dr_renderer.git"
|
|
20
|
+
},
|
|
21
|
+
"license": "",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"jquery": "^3.6.0",
|
|
24
|
+
"lodash": "^4.17.20",
|
|
25
|
+
"regenerator-runtime": "^0.13.5"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@babel/core": "^7.20.12",
|
|
29
|
+
"@babel/preset-env": "^7.20.2",
|
|
30
|
+
"@testing-library/dom": "^7.2.1",
|
|
31
|
+
"@testing-library/jest-dom": "^5.5.0",
|
|
32
|
+
"babel-jest": "^25.5.1",
|
|
33
|
+
"jest": "^25.3.0",
|
|
34
|
+
"moment": "^2.29.1",
|
|
35
|
+
"serve": "^11.3.0"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": ""
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://bitbucket.org/datarails/dr_renderer/src/master/",
|
|
41
|
+
"whitelistedNonPeerDependencies": [],
|
|
42
|
+
"main": "src/index.js",
|
|
43
|
+
"module": "src/index.js",
|
|
44
|
+
"sideEffects": false,
|
|
45
|
+
"jest": {
|
|
46
|
+
"setupFiles": [
|
|
47
|
+
"./setup-jest.js"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|