Skip to content

Commit

Permalink
Release 6.0.0 (#126)
Browse files Browse the repository at this point in the history
## What's Changed
* fix: fix storybook by wrapping all Vis in VisProvider by
@dvmartinweigl in #101
* feat: prevent csv injection in xlsx export by @dvmartinweigl in
#108
* deps: Node 20 and no_dist by @puehringer in
#107
* feat: Extended ISingleScoreResult to except column desc directly by
@dvtschachinger in #113
* fix: bar chart crash issue in Various bugs vis components #99 by
@dv-usama-ansari in #119
* refactor: log entire token payload if no email field matched by
@puehringer in #111
* deps: add @emotion/react by @puehringer in
#124
* fix: language strings by @dv-usama-ansari in
#122
* fix: hide filter if no callback is provided by @dv-usama-ansari in
#117
* fix: violin plot x-axis labels misalignment by @dv-usama-ansari in
#123

## New Contributors
* @dvmartinweigl made their first contribution in
#101

**Full Changelog**:
v5.0.0...v6.0.0
  • Loading branch information
thinkh authored Nov 21, 2023
2 parents 7e6d922 + 284e2f7 commit 1efdfa3
Show file tree
Hide file tree
Showing 28 changed files with 397 additions and 187 deletions.
258 changes: 197 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "visyn_core",
"description": "Core repository for datavisyn applications.",
"version": "5.0.0",
"version": "6.0.0",
"author": {
"name": "datavisyn GmbH",
"email": "[email protected]",
Expand All @@ -16,86 +16,227 @@
"type": "git",
"url": "[email protected]:datavisyn/visyn_core.git"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
"types": [
"./dist/index.d.ts",
"./src/index.ts"
],
"import": [
"./dist/index.js",
"./src/index.ts"
],
"default": [
"./dist/index.js",
"./src/index.ts"
]
},
"./app": {
"types": "./dist/app/index.d.ts",
"import": "./dist/app/index.js",
"default": "./dist/app/index.js"
"types": [
"./dist/app/index.d.ts",
"./src/app/index.ts"
],
"import": [
"./dist/app/index.js",
"./src/app/index.ts"
],
"default": [
"./dist/app/index.js",
"./src/app/index.ts"
]
},
"./base": {
"types": "./dist/base/index.d.ts",
"import": "./dist/base/index.js",
"default": "./dist/base/index.js"
"types": [
"./dist/base/index.d.ts",
"./src/base/index.ts"
],
"import": [
"./dist/base/index.js",
"./src/base/index.ts"
],
"default": [
"./dist/base/index.js",
"./src/base/index.ts"
]
},
"./components": {
"types": "./dist/components/index.d.ts",
"import": "./dist/components/index.js",
"default": "./dist/components/index.js"
"types": [
"./dist/components/index.d.ts",
"./src/components/index.ts"
],
"import": [
"./dist/components/index.js",
"./src/components/index.ts"
],
"default": [
"./dist/components/index.js",
"./src/components/index.ts"
]
},
"./hooks": {
"types": "./dist/hooks/index.d.ts",
"import": "./dist/hooks/index.js",
"default": "./dist/hooks/index.js"
"types": [
"./dist/hooks/index.d.ts",
"./src/hooks/index.ts"
],
"import": [
"./dist/hooks/index.js",
"./src/hooks/index.ts"
],
"default": [
"./dist/hooks/index.js",
"./src/hooks/index.ts"
]
},
"./i18n": {
"types": "./dist/i18n/index.d.ts",
"import": "./dist/i18n/index.js",
"default": "./dist/i18n/index.js"
"types": [
"./dist/i18n/index.d.ts",
"./src/i18n/index.ts"
],
"import": [
"./dist/i18n/index.js",
"./src/i18n/index.ts"
],
"default": [
"./dist/i18n/index.js",
"./src/i18n/index.ts"
]
},
"./idtype": {
"types": "./dist/idtype/index.d.ts",
"import": "./dist/idtype/index.js",
"default": "./dist/idtype/index.js"
"types": [
"./dist/idtype/index.d.ts",
"./src/idtype/index.ts"
],
"import": [
"./dist/idtype/index.js",
"./src/idtype/index.ts"
],
"default": [
"./dist/idtype/index.js",
"./src/idtype/index.ts"
]
},
"./plotly/full": {
"types": "./dist/plotly/full/index.d.ts",
"import": "./dist/plotly/full/index.js",
"default": "./dist/plotly/full/index.js"
"types": [
"./dist/plotly/full/index.d.ts",
"./src/plotly/full/index.ts"
],
"import": [
"./dist/plotly/full/index.js",
"./src/plotly/full/index.ts"
],
"default": [
"./dist/plotly/full/index.js",
"./src/plotly/full/index.ts"
]
},
"./plotly": {
"types": "./dist/plotly/index.d.ts",
"import": "./dist/plotly/index.js",
"default": "./dist/plotly/index.js"
"types": [
"./dist/plotly/index.d.ts",
"./src/plotly/index.tsx"
],
"import": [
"./dist/plotly/index.js",
"./src/plotly/index.tsx"
],
"default": [
"./dist/plotly/index.js",
"./src/plotly/index.tsx"
]
},
"./plugin": {
"types": "./dist/plugin/index.d.ts",
"import": "./dist/plugin/index.js",
"default": "./dist/plugin/index.js"
"types": [
"./dist/plugin/index.d.ts",
"./src/plugin/index.ts"
],
"import": [
"./dist/plugin/index.js",
"./src/plugin/index.ts"
],
"default": [
"./dist/plugin/index.js",
"./src/plugin/index.ts"
]
},
"./ranking": {
"types": "./dist/ranking/index.d.ts",
"import": "./dist/ranking/index.js",
"default": "./dist/ranking/index.js"
"types": [
"./dist/ranking/index.d.ts",
"./src/ranking/index.ts"
],
"import": [
"./dist/ranking/index.js",
"./src/ranking/index.ts"
],
"default": [
"./dist/ranking/index.js",
"./src/ranking/index.ts"
]
},
"./security": {
"types": "./dist/security/index.d.ts",
"import": "./dist/security/index.js",
"default": "./dist/security/index.js"
"types": [
"./dist/security/index.d.ts",
"./src/security/index.ts"
],
"import": [
"./dist/security/index.js",
"./src/security/index.ts"
],
"default": [
"./dist/security/index.js",
"./src/security/index.ts"
]
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"import": "./dist/utils/index.js",
"default": "./dist/utils/index.js"
"types": [
"./dist/utils/index.d.ts",
"./src/utils/index.ts"
],
"import": [
"./dist/utils/index.js",
"./src/utils/index.ts"
],
"default": [
"./dist/utils/index.js",
"./src/utils/index.ts"
]
},
"./views": {
"types": "./dist/views/index.d.ts",
"import": "./dist/views/index.js",
"default": "./dist/views/index.js"
"types": [
"./dist/views/index.d.ts",
"./src/views/index.ts"
],
"import": [
"./dist/views/index.js",
"./src/views/index.ts"
],
"default": [
"./dist/views/index.js",
"./src/views/index.ts"
]
},
"./vis": {
"types": "./dist/vis/index.d.ts",
"import": "./dist/vis/index.js",
"default": "./dist/vis/index.js"
"types": [
"./dist/vis/index.d.ts",
"./src/vis/index.ts"
],
"import": [
"./dist/vis/index.js",
"./src/vis/index.ts"
],
"default": [
"./dist/vis/index.js",
"./src/vis/index.ts"
]
},
"./dist/scss/main.scss": "./dist/scss/main.scss",
"./phovea_registry": "./dist/phovea_registry.js",
"./phovea_registry": [
"./dist/phovea_registry.js",
"./src/phovea_registry.ts"
],
"./dist/scss/*": [
"./dist/scss/*",
"./src/scss/*"
],
"./package.json": "./package.json"
},
"files": [
Expand All @@ -121,7 +262,6 @@
"docs": "visyn_scripts docs",
"lint:fix": "visyn_scripts lint --fix",
"lint": "visyn_scripts lint",
"prepack": "yarn run build",
"predist": "yarn run lint && yarn run test && yarn run build",
"start:fast": "visyn_scripts start --env workspace_mode=single fast=true",
"start": "visyn_scripts start --env workspace_mode=single",
Expand All @@ -133,19 +273,21 @@
"chromatic": "npx chromatic --build-script-name storybook:build"
},
"dependencies": {
"@emotion/react": "^11.0.0",
"@emotion/react": "^11.9.3",
"@fortawesome/fontawesome-free": "^6.1.1",
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@mantine/core": "~6.0.19",
"@mantine/dates": "~6.0.19",
"@mantine/dropzone": "~6.0.19",
"@mantine/form": "~6.0.19",
"@mantine/hooks": "~6.0.19",
"@mantine/modals": "~6.0.19",
"@mantine/notifications": "~6.0.19",
"@mantine/styles": "~6.0.19",
"@mantine/tiptap": "~6.0.19",
"@types/d3-hexbin": "^0.2.3",
"@types/d3v7": "npm:@types/d3@^7.4.0",
"@types/plotly.js-dist-min": "^2.3.0",
Expand All @@ -161,13 +303,13 @@
"lineupjs": "4.9.0",
"lodash": "~4.17.20",
"plotly.js-dist-min": "~2.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"react-highlight-words": "^0.17.0",
"react-plotly.js": "^2.5.1",
"react-spring": "^9.7.1",
"use-deep-compare-effect": "^1.8.0",
"visyn_scripts": "^5.1.0"
"visyn_scripts": "^6.0.0"
},
"devDependencies": {
"@babel/core": "^7.17.7",
Expand All @@ -190,12 +332,6 @@
"storybook": "^7.0.12",
"storybook-addon-swc": "^1.1.9"
},
"resolutions": {
"@types/react": "~18.2.0",
"@types/react-dom": "~18.2.0",
"react": "~18.2.0",
"react-dom": "~18.2.0"
},
"visyn": {
"entries": {
"app": {
Expand Down
File renamed without changes.
9 changes: 6 additions & 3 deletions src/ranking/overrides/DatavisynTaggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ export class DatavisynTaggle<T extends DataProvider = LocalDataProvider> extends
throw new Error('No ranking found');
}

return castArray(desc).map(({ data, builder }) => {
const colDesc = builder.build(data.map((d) => ({ [(builder as any).desc.column]: d }))) as IScoreColumnDesc<unknown>;
return castArray(desc).map((score) => {
const colDesc =
'builder' in score
? (score.builder.build(score.data.map((d) => ({ [(score.builder as any).desc.column]: d }))) as IScoreColumnDesc<unknown>)
: (score.desc as IScoreColumnDesc<unknown>);

// Patch the accessor and add the scoreData directly in the column
colDesc.scoreData = score.data;
colDesc.accessor = (row, descRef) => descRef.scoreData[row.i];
colDesc.scoreData = data;

const col = this.data.create(colDesc);

Expand Down
21 changes: 15 additions & 6 deletions src/ranking/score/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@ import { ColumnBuilder, IValueColumnDesc, IDataRow } from 'lineupjs';
/**
* A single score result
*/
export interface ISingleScoreResult {
export type ISingleScoreResult = {
/**
* The data to be used for the score column
*/
data: unknown[];
/**
* The lineup builder object to be used for the score column
*/
builder: ColumnBuilder<IValueColumnDesc<unknown>>;
}
} & (
| {
/**
* The lineup builder object to be used for the score column
*/
builder: ColumnBuilder<IValueColumnDesc<unknown>>;
}
| {
/**
* The lineup column desc to be used for the score column
*/
desc: IValueColumnDesc<unknown>;
}
);

export type IScoreResult = ISingleScoreResult | ISingleScoreResult[];

Expand Down
Loading

0 comments on commit 1efdfa3

Please sign in to comment.