-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## What's Changed * fix(vis-type: bar): grouping with zero values by @dvdanielamoitzi in #598 * fix(vis-type: bar): add tooltip to clipped axis labels by @dv-usama-ansari in #599 * fix(vis-type: bar): selection is lost when bar plot is sorted by @dv-usama-ansari in #604 * feat: use `FastTextMeasure` to get the truncated labels by @dv-usama-ansari in #606 * fix(vis-type: bar): axis labels when sort state is null by @dv-usama-ansari in #607 * fix: capturing a screenshot is broken for several visualizations by @oltionchampari in #608 * feat(icon): Option for descending sort first + no unsorted state by @dvdanielamoitzi in #609 * feat: Add `onClick` to `usePan` by @dvmoritzschoefl in #619 * feat: add `get_default_redis_url()` by @dvviktordelev in #610 * feat(vis-type: scatter): Add log scale option for axes by @dvmoritzschoefl in #602 * fix: exports in general vis by @dvdanielamoitzi in #621 * Added `useAnimatedTransform` hook by @dvmoritzschoefl in #620 * Pinned @swc/core to 1.7.42 by @dvmoritzschoefl in #622 **Full Changelog**: v14.1.0...14.2.0
- Loading branch information
Showing
31 changed files
with
466 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "visyn_core", | ||
"description": "Core repository for datavisyn applications.", | ||
"version": "14.1.1", | ||
"version": "14.2.0", | ||
"author": { | ||
"name": "datavisyn GmbH", | ||
"email": "[email protected]", | ||
|
@@ -145,6 +145,9 @@ | |
"storybook": "^7.6.20", | ||
"storybook-addon-swc": "^1.2.0" | ||
}, | ||
"resolutions": { | ||
"@swc/core": "1.7.42" | ||
}, | ||
"visyn": { | ||
"entries": { | ||
"app": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/vis/bar/interfaces/internal/helpers/get-data-for-aggregate-type.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
src/vis/bar/interfaces/internal/helpers/get-truncated-text-map.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import React from 'react'; | ||
import { ComponentStory } from '@storybook/react'; | ||
import { Stack, Text, Group } from '@mantine/core'; | ||
import { ESortStates, SortIcon, ISortIconProps } from './SortIcon'; | ||
|
||
function Wrapper({ props, initialState }: { props?: Omit<ISortIconProps, 'sortState' | 'setSortState'>; initialState?: ESortStates }) { | ||
const [sortState, setSortState] = React.useState<ESortStates>(initialState || ESortStates.NONE); | ||
|
||
return ( | ||
<Stack gap="xs"> | ||
<Group> | ||
<SortIcon {...props} sortState={sortState} setSortState={setSortState} /> | ||
|
||
{[2, 1, 5, 3, 4] | ||
.sort((a, b) => { | ||
switch (sortState) { | ||
case ESortStates.ASC: | ||
return a - b; | ||
case ESortStates.DESC: | ||
return b - a; | ||
default: | ||
return 0; | ||
} | ||
}) | ||
.map((i) => ( | ||
<Text key={i}>{i}</Text> | ||
))} | ||
</Group> | ||
</Stack> | ||
); | ||
} | ||
|
||
function Docs() { | ||
return ( | ||
<Stack p="xl" gap="xl"> | ||
<Stack gap="xs"> | ||
<Text fz="xl" fw={500}> | ||
Basic example | ||
</Text> | ||
<Wrapper /> | ||
</Stack> | ||
<Stack gap="xs"> | ||
<Text fz="xl" fw={500}> | ||
Compact icon | ||
</Text> | ||
<Wrapper props={{ compact: true }} /> | ||
</Stack> | ||
<Stack gap="xs"> | ||
<Text fz="xl" fw={500}> | ||
With priority | ||
</Text> | ||
<Wrapper props={{ priority: 1 }} /> | ||
</Stack> | ||
<Stack gap="xs"> | ||
<Text fz="xl" fw={500}> | ||
Has no unsorted state | ||
</Text> | ||
<Wrapper props={{ hasUnsortedState: false }} initialState={ESortStates.ASC} /> | ||
</Stack> | ||
<Stack gap="xs"> | ||
<Stack gap={0}> | ||
<Text fz="xl" fw={500}> | ||
Sort descending on first click | ||
</Text> | ||
<Text c="dimmed">Only for specific use cases - the default is ascending</Text> | ||
</Stack> | ||
<Wrapper props={{ sortStateOnFirstClick: ESortStates.DESC }} /> | ||
</Stack> | ||
</Stack> | ||
); | ||
} | ||
|
||
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export | ||
export default { | ||
title: 'Components/SortIcon', | ||
component: Docs, | ||
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes | ||
}; | ||
|
||
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args | ||
// eslint-disable-next-line react/function-component-definition | ||
const Template: ComponentStory<typeof Docs> = (args) => { | ||
return <Docs />; | ||
}; | ||
|
||
export const Default: typeof Template = Template.bind({}); |
Oops, something went wrong.