Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
options: {
sassLoaderOptions: {
implementation: sass,
sassOptions: {...sassRenderSyncConfig, silenceDeprecations},
sassOptions: { ...sassRenderSyncConfig, silenceDeprecations },
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const parameters = {
const preview = {
// Enables auto-generated documentation for all stories
// @see https://storybook.js.org/docs/writing-docs/autodocs
tags: ['autodocs'],
tags: ["autodocs"],
parameters,
};

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- `<Switch />`
- `noDrag` parameter: Add the `nodrag` class to the Switch element. Default: `true`

### Changed

- Upgrading base libraries
- Carbon, Codemirror, React-Flow

### Fixed

- `<PropertyValuePair />`
- fix description and story to point out that `PropertyValueList` need always to be used as wrapper
- BOM issue on compressed stylesheet
- first rule `selector` becomes `BOM:selector` that is valid but will never apply
- we fixed this problem by adding a dummy rule as first rule

### Deprecated

Expand Down
7 changes: 1 addition & 6 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript", "@babel/preset-flow"],
"plugins": [
["@babel/plugin-transform-private-methods", { "loose": true }],
["@babel/plugin-transform-private-property-in-object", { "loose": true }],
["@babel/plugin-transform-class-properties", { "loose": true }]
]
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
}
80 changes: 33 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@
"@blueprintjs/colors": "^5.1.16",
"@blueprintjs/core": "6.8.1",
"@blueprintjs/select": "6.1.1",
"@carbon/icons": "^11.80.0",
"@carbon/react": "^1.107.1",
"@codemirror/lang-html": "^6.4.11",
"@carbon/icons": "^11.87.0",
"@carbon/react": "^1.115.0",
"@codemirror/lang-html": "^6.4.12",
"@codemirror/lang-javascript": "^6.2.5",
"@codemirror/lang-json": "^6.0.2",
"@codemirror/lang-markdown": "^6.5.0",
"@codemirror/lang-markdown": "^6.5.2",
"@codemirror/lang-sql": "^6.10.0",
"@codemirror/lang-xml": "^6.1.0",
"@codemirror/lang-yaml": "^6.1.3",
"@codemirror/legacy-modes": "^6.5.2",
"@codemirror/legacy-modes": "^6.5.3",
"@mavrin/remark-typograf": "^2.2.0",
"@xyflow/react": "^12.9.3",
"@xyflow/react": "^12.11.5",
"classnames": "^2.5.1",
"codemirror": "^6.0.2",
"color": "^5.0.3",
Expand All @@ -95,7 +95,7 @@
"react": "^18.2.0",
"react-dom": "^18.3.1",
"react-flow-renderer": "9.7.4",
"react-inlinesvg": "^4.4.1",
"react-inlinesvg": "^4.5.0",
"react-is": "^18.3.1",
"react-markdown": "^10.1.0",
"react-syntax-highlighter": "^16.1.1",
Expand All @@ -109,44 +109,40 @@
"wicg-inert": "^3.1.3"
},
"devDependencies": {
"@babel/core": "^7.29.0",
"@babel/plugin-transform-class-properties": "^7.28.6",
"@babel/plugin-transform-private-methods": "^7.28.6",
"@babel/plugin-transform-private-property-in-object": "^7.28.6",
"@babel/preset-env": "^7.29.5",
"@babel/preset-flow": "^7.27.1",
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@babel/core": "^7.29.7",
"@babel/preset-env": "^7.29.7",
"@babel/preset-react": "^7.29.7",
"@babel/preset-typescript": "^7.29.7",
"@eslint/compat": "^2.1.0",
"@eslint/eslintrc": "^3.3.5",
"@eslint/eslintrc": "^3.3.6",
"@eslint/js": "^10.0.1",
"@storybook/addon-a11y": "^10.4.0",
"@storybook/addon-docs": "^10.4.0",
"@storybook/addon-links": "^10.4.0",
"@storybook/addon-a11y": "^10.5.10",
"@storybook/addon-docs": "^10.5.10",
"@storybook/addon-links": "^10.5.10",
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
"@storybook/cli": "^10.4.0",
"@storybook/cli": "^10.5.10",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react": "^10.4.0",
"@storybook/react-webpack5": "^10.4.0",
"@storybook/react": "^10.5.10",
"@storybook/react-webpack5": "^10.5.10",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.2",
"@types/he": "^1.2.3",
"@types/jest": "^30.0.0",
"@types/jshint": "^2.12.4",
"@types/lodash": "^4.17.24",
"@types/lodash": "^4.17.25",
"@types/n3": "^1.26.1",
"@types/react-dom": "^18.3.7",
"@types/react-is": "^19.2.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@typescript-eslint/eslint-plugin": "^8.59.3",
"@typescript-eslint/parser": "^8.59.3",
"@typescript-eslint/eslint-plugin": "^8.68.0",
"@typescript-eslint/parser": "^8.68.0",
"babel-jest": "^30.4.1",
"chromatic": "^16.10.1",
"eslint": "^10.3.0",
"chromatic": "^18.6.1",
"eslint": "^10.9.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-simple-import-sort": "^13.0.0",
"eslint-plugin-simple-import-sort": "^14.0.0",
"husky": "^4.3.8",
"identity-obj-proxy": "^3.0.0",
"jest": "^30.4.2",
Expand All @@ -156,45 +152,35 @@
"lint-staged": "^15.5.2",
"node-sass-package-importer": "^5.3.3",
"path": "^0.12.7",
"prettier": "^3.8.3",
"prettier": "^3.9.6",
"react-app-polyfill": "^3.0.0",
"react-lorem-ipsum": "^1.4.9",
"regenerator-runtime": "^0.14.1",
"rimraf": "^6.1.3",
"sass": "^1.99.0",
"sass": "^1.103.1",
"sass-loader": "^16.0.8",
"storybook": "^10.4.0",
"stylelint": "^17.11.0",
"stylelint-config-recess-order": "^7.7.0",
"storybook": "^10.5.10",
"stylelint": "^17.14.1",
"stylelint-config-recess-order": "^7.8.0",
"stylelint-config-standard-scss": "^17.0.0",
"stylelint-order": "^8.1.1",
"ts-node": "^10.9.2",
"tsc-esm-fix": "^3.1.2",
"typescript": "^5.9.3",
"url-loader": "^4.1.1",
"yargs": "^18.0.0"
"yargs": "^18.1.0"
},
"peerDependencies": {
"@blueprintjs/core": ">=6",
"react": ">=18"
},
"resolutions": {
"**/@blueprintjs/core": "6.8.1",
"node-sass-package-importer/**/postcss": "^8.5.18",
"stylelint-order/**/postcss": "^8.5.12",
"stylelint/**/postcss": "^8.5.18",
"hast-util-from-parse5": "8.0.0",
"**/lodash": "^4.18.1",
"**/minimatch": "^3.1.4",
"**/serialize-javascript": "^7.0.5",
"**/ws": "^8.21.0",
"babel-jest/**/js-yaml": "^3.15.1",
"stylelint/**/js-yaml": "^4.3.1",
"@eslint/eslintrc/**/js-yaml": "^4.3.1",
"**/nanoid": "^3.3.18",
"**/fast-uri": "^3.1.3",
"sass/**/immutable": "^5.1.8",
"**/brace-expansion": "^1.1.18"
"**/postcss": "^8.5.18",
"**/serialize-javascript": "^7.0.5"
},
"husky": {
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/compile-sass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as sass from "sass";
import yargs from "yargs";

import sassRenderSyncConfig from "./sassConfig";
import { silenceDeprecations } from "./sassDeprecationConfig"
import { silenceDeprecations } from "./sassDeprecationConfig";

const args = yargs(process.argv.slice(2)).argv as any;

Expand Down
2 changes: 1 addition & 1 deletion scripts/sassDeprecationConfig.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
silenceDeprecations: ["import", "legacy-js-api"],
}
};
28 changes: 28 additions & 0 deletions src/_bom-workaround.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.bom-problem-workaround-dummy-rule {
/**
* This is a workaround to prevent the loss of the first rule of our compressed CSS.
*
* Sass emits a BOM instead of a `@charset` rule when it creates a compressed
* stylesheet that contains non-ASCII characters.
* Postcss preserves that BOM since v8.5.24, before that it silently dropped it.
* Css-loader does not remove it, although it inlines the CSS into a JS string that
* style-loader writes into a `<style>` element -- there the BOM is not a byte order
* mark anymore, just a stray character. Upstream considers this a css-loader issue,
*
* `U+FEFF` is a valid ident code point in CSS, so the browser reads it as a type
* selector and prepends it to the first selector: `:root` becomes `<U+FEFF>:root`.
* That selector is valid but matches no element, so the first rule never applies.
*
* Alternatively sass-loader could be configured with `charset: false`, but we prefer
* to keep the charset information in the stylesheets we ship, and is also not
* recommended to do so.
*
* @see https://github.com/postcss/postcss/pull/2119
* @see https://github.com/postcss/postcss/issues/2133
*
* IMPORTANT: this only works as long as it is the FIRST import in `src/index.scss`,
* so that this dummy rule is the first rule of the compiled output and absorbs the BOM.
*/

--dummy-property: "none";
}
8 changes: 1 addition & 7 deletions src/cmem/ActivityControl/ActivityControlTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,4 @@ export interface SilkActivityStatusProps {
}

export type SilkActivityStatusConcrete =
| "Cancelled"
| "Failed"
| "Successful"
| "Not executed"
| "Running"
| "Waiting"
| "Canceling";
"Cancelled" | "Failed" | "Successful" | "Not executed" | "Running" | "Waiting" | "Canceling";
6 changes: 1 addition & 5 deletions src/cmem/ActivityControl/SilkActivityControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ interface IStacktrace {
}

export type SilkActivityControlTranslationKeys =
| "startActivity"
| "stopActivity"
| "reloadActivity"
| "showErrorReport"
| "startPrioritized";
"startActivity" | "stopActivity" | "reloadActivity" | "showErrorReport" | "startPrioritized";
export type SilkActivityControlAction = "start" | "cancel" | "restart";

/** Silk activity control. */
Expand Down
9 changes: 1 addition & 8 deletions src/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ import React, { useEffect, useState } from "react";
import { TestableComponent } from "../../components/interfaces";

export type ElapsedDateTimeDisplayUnits =
| "second"
| "seconds"
| "minute"
| "minutes"
| "hour"
| "hours"
| "day"
| "days";
"second" | "seconds" | "minute" | "minutes" | "hour" | "hours" | "day" | "days";

export interface ElapsedDateTimeDisplayProps extends TestableComponent {
// The date time given as string (parseable by Date) or number (ms since 1970-01-01 00:00:00 UTC)
Expand Down
2 changes: 1 addition & 1 deletion src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Position,
} from "react-flow-renderer";
import { Meta, StoryFn } from "@storybook/react";
import { fn } from "storybook/test";
import {
Background as BackgroundV12,
BackgroundVariant as BackgroundVariantV12,
Expand All @@ -16,6 +15,7 @@ import {
useEdgesState as useEdgesState12,
useNodesState as useNodesState12,
} from "@xyflow/react";
import { fn } from "storybook/test";

import {
ApplicationContainer,
Expand Down
17 changes: 5 additions & 12 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from "@blueprintjs/core";
import classNames from "classnames";

import { CLASSPREFIX as eccgui } from "../../configuration/constants";
import { IntentBlueprint } from "../../common/Intent";
import { CLASSPREFIX as eccgui } from "../../configuration/constants";

import { Markdown, MarkdownProps } from "./../../cmem/markdown/Markdown";

Expand Down Expand Up @@ -204,17 +204,10 @@ export const Tooltip = ({
{...otherTooltipProps}
content={tooltipContent}
className={targetClassName}
popoverClassName={
classNames(
`${eccgui}-tooltip__content`,
`${eccgui}-tooltip--${size}`,
popoverClassName,
{
[`${className}__content`]: className,
[`${eccgui}-intent--${intent}`]: intent === "accent",
}
)
}
popoverClassName={classNames(`${eccgui}-tooltip__content`, `${eccgui}-tooltip--${size}`, popoverClassName, {
[`${className}__content`]: className,
[`${eccgui}-intent--${intent}`]: intent === "accent",
})}
ref={refocus}
targetProps={
{
Expand Down
9 changes: 8 additions & 1 deletion src/extensions/codemirror/CodeMirror.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,14 @@ export const CodeEditor = ({

React.useEffect(() => {
updateExtension(keymap?.of(createKeyMapConfigs()), keyMapConfigsCompartment.current);
}, [supportCodeFolding, mode, tabIntentStyle, (tabForceSpaceForModes ?? []).join(", "), enableTab, shouldHaveMinimalSetup]);
}, [
supportCodeFolding,
mode,
tabIntentStyle,
(tabForceSpaceForModes ?? []).join(", "),
enableTab,
shouldHaveMinimalSetup,
]);

React.useEffect(() => {
updateExtension(EditorState?.tabSize.of(tabIntentSize ?? 2), tabIntentSizeCompartment.current);
Expand Down
5 changes: 4 additions & 1 deletion src/extensions/react-flow/handles/HandleContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export const HandleContent = memo(
{children}
</div>
) : extendedTooltip ? (
<div className={`${eccgui}-graphviz__handle__content ${eccgui}-graphviz__handle__content--extendedTooltip`} {...otherDivProps} />
<div
className={`${eccgui}-graphviz__handle__content ${eccgui}-graphviz__handle__content--extendedTooltip`}
{...otherDivProps}
/>
) : (
<></>
);
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/react-flow/handles/_handles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ div.react-flow__handle {
inset: unset;
top: 50%;
left: 50%;
height: 0;
width: 0;
height: 0;
}

div.react-flow__handle-right {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { fireEvent, render, screen } from "@testing-library/react";
import { OverlaysProvider } from "@blueprintjs/core";
import { fireEvent, render, screen } from "@testing-library/react";

import "@testing-library/jest-dom";

import { HandleDefault } from "../HandleDefault";
Expand Down
3 changes: 1 addition & 2 deletions src/extensions/react-flow/minimap/MiniMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ interface MiniMapV9Props extends MiniMapBasicProps, ReactFlowMiniMapV9Props {
}

export type MiniMapProps =
| (ReacFlowVersionSupportProps & MiniMapV9Props)
| (ReacFlowVersionSupportProps & MiniMapV12Props);
(ReacFlowVersionSupportProps & MiniMapV9Props) | (ReacFlowVersionSupportProps & MiniMapV12Props);

interface configParams {
// Key has been pressed down over the mini-map and navigation mode has thus started
Expand Down
4 changes: 1 addition & 3 deletions src/extensions/react-flow/nodes/NodeContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export type NodeDimensions = {
};

type ResizeDirections =
| { right: true; bottom?: false }
| { right?: false; bottom: true }
| { right: true; bottom: true };
{ right: true; bottom?: false } | { right?: false; bottom: true } | { right: true; bottom: true };

type IntroductionTime = {
/**
Expand Down
Loading
Loading