Skip to content

Commit ce1830b

Browse files
committed
Merge tag 'v24.1.0' into develop
tag final release v24.1.0
2 parents af98f40 + 6530025 commit ce1830b

29 files changed

Lines changed: 971 additions & 821 deletions

.storybook/helpers.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Icon, TestIcon } from "../src/";
55
import { Definitions as IntentDefinitions } from "../src/common/Intent";
66

77
import canonicalIcons from "./../src/components/Icon/canonicalIconNames";
8+
89
// argTypes helpers
910

1011
const allIcons = new Map([
@@ -20,17 +21,19 @@ export const helpersArgTypes = {
2021
mapping: {
2122
"Not set": undefined,
2223
Handler: () => {
24+
// eslint-disable-next-line no-undef
2325
alert("clicked");
2426
},
2527
},
2628
},
2729
exampleIcon: {
2830
control: "select",
29-
options: ["Not set", "Test icon", ...Object.keys(canonicalIcons)],
31+
options: ["Not set", "Test icon", ...Object.keys(canonicalIcons), "Icon with tooltip"],
3032
mapping: {
3133
"Not set": undefined,
3234
"Test icon": <TestIcon tryout={LogoReact} className="testclass-icon" />,
3335
...Object.fromEntries(allIcons),
36+
"Icon with tooltip": <Icon name={"item-info"} intent="info" tooltipText="Example tooltip" />,
3437
},
3538
},
3639
exampleIntent: {

CHANGELOG.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,41 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
## [24.1.0] - 2025-04-16
10+
911
### Added
1012

13+
- `<CardActions />`
14+
- `noWrap` property to display them without wrapping its children on multiple lines
1115
- `<ContentGroup />` component
1216
- Manage display of a grouped content section.
1317
- Add info, actions and context annotations by using its properties.
1418
- Can be nested into each other.
1519
- `<CodeEditor />`
1620
- implemented support for linting which is enabled via `useLinting` prop
17-
- `turtle` and `javascript` are currently supported languages for linting
21+
- `turtle` and `javascript` are currently supported languages for linting
22+
- `useToolbar` property to display toolbar if the `mode` is supported
23+
- currently `markdown` mode is integrated, including support for headlines `<h1-6>`, `<blockquote>`, `<code>` block and inline, `<b>` bold, `<i>`, italic, `<del>` strike through, `<ul>`, `<ol>` and checkbox lists, `<a>` links and `<img>` images
1824
- editor is focused on load if `autoFocus` prop is set to `true`
1925
- implemented support for `disabled` state in code editor
2026
- implemented support for `intent` states in code editor
2127
- `<Label />`
2228
- `additionalElements` property to display elements at the end of the label
2329
- `inline` property to display the label component as inline block
24-
- `<NodeContent />`
25-
- `resizeDirections` to specifiy the axis that can be used to resize the node
26-
- `resizeMaxDimensions` to add maximum values for resizing height/width
27-
- `<CardActions />`
28-
- `noWrap` property to display them without wrapping its children on multiple lines
29-
- `<SimpleDialog />`
30-
- `actionsProps` property to forward `CardActions` properties, e.g. `noWrap`
3130
- `<MenutItem />`
3231
- `tooltip` property to dislay tooltip on menu item label
3332
- `<NodeContent />`
3433
- `resizeDirections` to specifiy the axis that can be used to resize the node
3534
- `resizeMaxDimensions` to add maximum values for resizing height/width
36-
- `<CodeEditor />`
37-
- `useToolbar` property to display toolbar if the `mode` is supported
38-
- currently `markdown` mode is integrated, including support for headlines `<h1-6>`, `<blockquote>`, `<code>` block and inline, `<b>` bold, `<i>`, italic, `<del>` strike through, `<ul>`, `<ol>` and checkbox lists, `<a>` links and `<img>` images
35+
- `<OverviewItem />`
36+
- `hasCardWrapper` property to use a `Card` component as wrapper around it, simplifies the process to put it in a box, use `cardProps` to forward basic properties to that `Card` wrapper
37+
- `<SimpleDialog />`
38+
- `actionsProps` property to forward `CardActions` properties, e.g. `noWrap`
3939
- New icons:
40-
- `item-magic-edit`: icon for "magic" edit suggestions
41-
- `artefact-task-concatenatetofile`: icon for "Concatenate to file" operator
40+
- `artefact-task-concatenatetofile`
41+
- `artefact-task-pivot`
42+
- `artefact-task-unpivot`
43+
- `item-magic-edit`
4244
- `operation-format-text-code`
4345
- `operation-format-text-bold`
4446
- `operation-format-text-italic`
@@ -51,20 +53,41 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
5153

5254
- `<CodeAutocompleteField />`:
5355
- Code editor resets to initial value on every code editor instance re-init
56+
- `<CodeEditor />`
57+
- re-render the component if the `wrapLines` property is changed after the component's render
58+
- only fire `onChange` event when the document has actually changed
59+
- `<OverviewItem />`
60+
- whitespace after `Depiction` element when the `OverviewItem` ist used with `densityHigh` and `hasSpacing`
5461
- `<OverviewItemActions />`
5562
- `hiddenInteractions` stay visible if they contain focused elements or opened overlays (e.g. context menus)
5663
- `<TagList />`
5764
- do not create empty list items
65+
- `<SearchField />`
66+
- allow to use `onClearanceHandler` and `rightElement` together
67+
- fix display of `Icon` with `tooltipText` as direct child in `rightElement`
5868

5969
### Changed
6070

71+
- `<ActivityControlWidget />`
72+
- display running time after label if there is an status info to prevent a third line
6173
- `<ReactFlow />`
6274
- property color for `graph` configuration was adjusted
75+
- `<SearchField />`
76+
- internally forced to be managed controlled to keep `onClearanceHandler` independent from outer `value` property
6377
- `<Switch />`
6478
- use always `<Label/>` component for `label` value
6579
- `<StickyNoteNode />`
6680
- Refactored data structure position and dimension (breaking change)
6781

82+
### Deprecated
83+
84+
- `<CodeEditor />`
85+
- fallback of static test id is removed, need then always to be set if necessary
86+
- `<OverflowText />`
87+
- component won't accept properties of any name in future, only data attributes for test IDs and basic HTML element properties
88+
- `<OverviewItemList />`
89+
- `densityHigh` property will be removed, use it directly on `OverviewItem` children
90+
6891
## [24.0.1] - 2025-02-06
6992

7093
### Changed

babel.config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript", "@babel/preset-flow"],
33
"plugins": [
4-
["@babel/plugin-proposal-private-methods", { "loose": true }],
5-
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
6-
["@babel/plugin-proposal-class-properties", { "loose": true }]
4+
["@babel/plugin-transform-private-methods", { "loose": true }],
5+
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
6+
["@babel/plugin-transform-class-properties", { "loose": true }]
77
]
88
}

package.json

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@eccenca/gui-elements",
33
"description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
4-
"version": "24.0.1",
4+
"version": "24.1.0",
55
"license": "Apache-2.0",
66
"homepage": "https://github.com/eccenca/gui-elements",
77
"bugs": "https://github.com/eccenca/gui-elements/issues",
@@ -106,27 +106,27 @@
106106
"xml-formatter": "^3.6.3"
107107
},
108108
"devDependencies": {
109-
"@babel/core": "^7.26.0",
110-
"@babel/plugin-proposal-class-properties": "^7.18.6",
111-
"@babel/plugin-proposal-private-methods": "^7.18.6",
112-
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
113-
"@babel/preset-env": "^7.26.0",
109+
"@babel/core": "^7.26.10",
110+
"@babel/plugin-transform-class-properties": "^7.25.9",
111+
"@babel/plugin-transform-private-methods": "^7.25.9",
112+
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
113+
"@babel/preset-env": "^7.26.9",
114114
"@babel/preset-flow": "^7.25.9",
115115
"@babel/preset-react": "^7.26.3",
116-
"@babel/preset-typescript": "^7.26.0",
116+
"@babel/preset-typescript": "^7.27.0",
117117
"@eslint/compat": "^1.2.4",
118118
"@eslint/eslintrc": "^3.2.0",
119119
"@eslint/js": "^9.17.0",
120-
"@storybook/addon-actions": "^8.4.7",
121-
"@storybook/addon-essentials": "^8.4.7",
122-
"@storybook/addon-jest": "^8.4.7",
123-
"@storybook/addon-links": "^8.4.7",
124-
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
125-
"@storybook/cli": "^8.4.7",
120+
"@storybook/addon-actions": "^8.6.9",
121+
"@storybook/addon-essentials": "^8.6.9",
122+
"@storybook/addon-jest": "^8.6.9",
123+
"@storybook/addon-links": "^8.6.9",
124+
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
125+
"@storybook/cli": "^8.6.9",
126126
"@storybook/preset-scss": "^1.0.3",
127-
"@storybook/react": "^8.4.7",
128-
"@storybook/react-webpack5": "^8.4.7",
129-
"@storybook/test": "^8.4.7",
127+
"@storybook/react": "^8.6.9",
128+
"@storybook/react-webpack5": "^8.6.9",
129+
"@storybook/test": "^8.6.9",
130130
"@testing-library/jest-dom": "^6.6.3",
131131
"@testing-library/react": "^12.1.2",
132132
"@types/codemirror": "^5.60.15",
@@ -139,7 +139,7 @@
139139
"@typescript-eslint/eslint-plugin": "^8.18.1",
140140
"@typescript-eslint/parser": "^8.18.1",
141141
"babel-jest": "^29.7.0",
142-
"chromatic": "^11.20.2",
142+
"chromatic": "^11.27.0",
143143
"eslint": "^9.17.0",
144144
"eslint-plugin-react": "^7.37.2",
145145
"eslint-plugin-react-hooks": "^5.1.0",
@@ -159,7 +159,7 @@
159159
"rimraf": "^5.0.10",
160160
"sass": "1.62.1",
161161
"sass-loader": "10.3.1",
162-
"storybook": "^8.4.7",
162+
"storybook": "^8.6.9",
163163
"stylelint": "^15.11.0",
164164
"stylelint-config-recess-order": "^4.6.0",
165165
"stylelint-config-standard-scss": "^9.0.0",
@@ -178,7 +178,9 @@
178178
"**/@types/react": "^17.0.83",
179179
"node-sass-package-importer/**/postcss": "^8.4.49",
180180
"**/cross-spawn": "^7.0.5 ",
181-
"**/micromatch": "^4.0.8"
181+
"**/micromatch": "^4.0.8",
182+
"**/@babel/runtime": "^7.26.10",
183+
"**/@babel/helpers": "^7.26.10"
182184
},
183185
"husky": {
184186
"hooks": {

src/cmem/ActivityControl/ActivityControlWidget.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ interface IActivityContextMenu extends TestableComponent {
9292

9393
export interface ActivityControlWidgetAction extends TestableComponent {
9494
// The action that should be triggered
95-
action: () => any;
95+
action: () => void;
9696
// The tooltip that should be shown over the action icon
9797
tooltip?: string;
9898
// The icon of the action button
@@ -147,6 +147,7 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
147147
{props.label && (
148148
<OverviewItemLine small={small}>
149149
{React.cloneElement(labelWrapper, {}, props.label)}
150+
{timerExecutionMsg && (props.statusMessage || tags) && <>&nbsp;({timerExecutionMsg})</>}
150151
</OverviewItemLine>
151152
)}
152153
{(props.statusMessage || tags) && (
@@ -170,7 +171,9 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
170171
)}
171172
</OverviewItemLine>
172173
)}
173-
{timerExecutionMsg && <OverviewItemLine small>{timerExecutionMsg}</OverviewItemLine>}
174+
{timerExecutionMsg && !(props.statusMessage || tags) && (
175+
<OverviewItemLine small>{timerExecutionMsg}</OverviewItemLine>
176+
)}
174177
</OverviewItemDescription>
175178
<OverviewItemActions>
176179
{activityActions &&

src/components/AutoSuggestion/AutoSuggestion.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,18 @@ const AutoSuggestion = ({
241241
dispatch({
242242
changes: { from: 0, to: currentCm.current.state?.doc.length, insert: initialValue },
243243
});
244+
// Validate initial value change
245+
checkValuePathValidity(initialValue)
244246
}
245247
}, [initialValue, reInitOnInitialValueChange]);
246248

249+
React.useEffect(() => {
250+
if(currentCm.current) {
251+
// Validate initial value
252+
checkValuePathValidity(initialValue)
253+
}
254+
}, [currentCm.current!!])
255+
247256
const setCurrentIndex = (newIndex: number) => {
248257
editorState.index = newIndex;
249258
setFocusedIndex(newIndex);

src/components/CodeAutocompleteField/CodeAutocompleteField.stories.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ export default {
1515
},
1616
} as Meta<typeof CodeAutocompleteField>;
1717

18+
let forcedUpdateKey = 0; // @see https://github.com/storybookjs/storybook/issues/13375#issuecomment-1291011856
1819
const Template: StoryFn<typeof CodeAutocompleteField> = (args) => (
1920
<OverlaysProvider>
20-
<CodeAutocompleteField {...args} />
21+
<CodeAutocompleteField {...args} key={++forcedUpdateKey} />
2122
</OverlaysProvider>
2223
);
2324

@@ -63,7 +64,7 @@ const defaultProps: CodeAutocompleteFieldProps = {
6364
},
6465
placeholder:
6566
"The word before the cursor will be auto-completed. At the beginning or after a space, all results are shown.",
66-
onChange(): any {
67+
onChange(): void {
6768
// Do nothing
6869
},
6970
};

src/components/ContextOverlay/ContextOverlay.stories.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,40 @@ import { PopoverInteractionKind, PopperModifierOverrides } from "@blueprintjs/co
44
import { PopperPlacements } from "@blueprintjs/core";
55
import { OverlaysProvider } from "@blueprintjs/core";
66
import { Meta, StoryFn } from "@storybook/react";
7+
import { fn } from "@storybook/test";
78

89
import { Button, ContextOverlay, HtmlContentBlock } from "../../index";
910

11+
const interactionKindOptions = { UNDEFINED: undefined, ...PopoverInteractionKind };
12+
const rootBoundaryOptions = { UNDEFINED: undefined, VIEWPORT: "viewport", DOCUMENT: "document" };
13+
const positioningStrategyOptions = { UNDEFINED: undefined, ABSOLUTE: "absolute", FIXED: "fixed" };
14+
1015
export default {
1116
title: "Components/ContextOverlay",
1217
component: ContextOverlay,
1318
argTypes: {
1419
interactionKind: {
15-
options: { UNDEFINED: undefined, ...PopoverInteractionKind },
20+
options: Object.keys(interactionKindOptions),
21+
mapping: interactionKindOptions,
1622
},
1723
placement: {
1824
options: PopperPlacements,
1925
},
2026
rootBoundary: {
21-
options: { UNDEFINED: undefined, VIEWPORT: "viewport", DOCUMENT: "document" },
27+
options: Object.keys(rootBoundaryOptions),
28+
mapping: rootBoundaryOptions,
2229
},
2330
positioningStrategy: {
24-
options: { UNDEFINED: undefined, ABSOLUTE: "absolute", FIXED: "fixed" },
31+
options: Object.keys(positioningStrategyOptions),
32+
mapping: positioningStrategyOptions,
2533
},
2634
},
2735
} as Meta<typeof ContextOverlay>;
2836

37+
let forcedUpdateKey = 0;
2938
const Template: StoryFn<typeof ContextOverlay> = (args) => (
3039
<OverlaysProvider>
31-
<ContextOverlay {...args} />
40+
<ContextOverlay {...args} key={++forcedUpdateKey} />
3241
</OverlaysProvider>
3342
);
3443

@@ -55,4 +64,6 @@ Default.args = {
5564
} as PopperModifierOverrides,
5665
rootBoundary: "viewport",
5766
hasBackdrop: false,
67+
onOpening: fn(),
68+
onInteraction: fn(),
5869
};

src/components/Depiction/depiction.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ $eccgui-size-depiction-border-radius: $pt-border-radius !default;
7272
.#{$eccgui}-overviewitem__list--highdensity > li > .#{$eccgui}-overviewitem__item & {
7373
height: $button-height;
7474
}
75+
.#{$eccgui}-overviewitem__item--highdensity.#{$eccgui}-overviewitem__item--hasspacing > .#{$eccgui}-depiction &,
76+
.#{$eccgui}-overviewitem__list--highdensity
77+
> li
78+
> .#{$eccgui}-overviewitem__item.#{$eccgui}-overviewitem__item--hasspacing
79+
& {
80+
height: calc(#{$button-height} - #{$eccgui-size-typo-base * 0.5});
81+
}
7582
}
7683

7784
.#{$eccgui}-depiction__image--disabled {

src/components/Dialog/stories/AlertDialog.stories.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import React from "react";
22
import { OverlaysProvider } from "@blueprintjs/core";
33
import { Meta, StoryFn } from "@storybook/react";
4+
import { fn } from "@storybook/test";
45

56
import { AlertDialog } from "./../../../../index";
6-
import { Default as SimpleDialogExample } from "./SimpleDialog.stories";
7+
import simpleDialogStory, { Default as SimpleDialogExample } from "./SimpleDialog.stories";
78

89
export default {
910
title: "Components/Dialog/AlertDialog",
1011
component: AlertDialog,
1112
argTypes: {
13+
...simpleDialogStory.argTypes,
1214
headerOptions: { table: { disable: true } },
1315
children: { table: { disable: true } },
1416
actions: { table: { disable: true } },
@@ -42,4 +44,6 @@ Default.args = {
4244
success: false,
4345
warning: true,
4446
danger: false,
47+
onOpening: fn(),
48+
onClosing: fn(),
4549
};

0 commit comments

Comments
 (0)