Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
4e1b315
chore: update to react 19
samuelreichert Sep 22, 2025
f63030b
chore(widget-plugin-platform): update dependencies for React 19
samuelreichert Sep 22, 2025
1407022
chore(widget-plugin-component-kit): update dependencies for React 19
samuelreichert Sep 22, 2025
bb35764
chore(accessibility-helper-web): update to react 19
samuelreichert Sep 22, 2025
2fec74d
chore(accordion-web): update Accordion components to be compatible wi…
samuelreichert Sep 22, 2025
f42dd97
chore(area-chart-web): update component to react 19
samuelreichert Sep 22, 2025
f8b28fa
chore(badge-button-web): update ESLint config and TypeScript settings…
samuelreichert Sep 22, 2025
7a701d7
chore(badge-web): update ESLint config and TypeScript settings for Re…
samuelreichert Sep 22, 2025
f1aaa36
chore(bar-chart-web): update ESLint config and TypeScript settings fo…
samuelreichert Sep 22, 2025
657c1c9
chore(barcode-scanner-web): update ESLint config and TypeScript setti…
samuelreichert Sep 22, 2025
943d190
chore(bubble-chart-web): update ESLint config and TypeScript settings…
samuelreichert Sep 22, 2025
cf9f006
chore(widget-plugin-hooks): add TypeScript types and update useOnScre…
samuelreichert Sep 22, 2025
b08f524
chore(calendar-web): update ESLint config and TypeScript settings for…
samuelreichert Sep 22, 2025
d20e32b
chore(carousel-web): update ESLint config and TypeScript settings for…
samuelreichert Sep 22, 2025
087a48f
chore(chart-playground-web): remove unused imports and update JSX set…
samuelreichert Sep 22, 2025
15e79f1
chore(pluggable-widgets): simplify ESLint config by removing unnecess…
samuelreichert Sep 22, 2025
b692dc0
chore(checkbox-radio-selection-web): remove unused imports and update…
samuelreichert Sep 23, 2025
99b1682
chore(color-picker-web): update imports to use ReactElement and adjus…
samuelreichert Sep 23, 2025
d752f9c
chore(accordion-web): update JSX syntax for header and content render…
samuelreichert Sep 23, 2025
09f0415
chore(barcode-scanner-web): update videoRef type to allow null for be…
samuelreichert Sep 23, 2025
aab8db6
chore(widget-plugin-component-kit): clean up imports and update tscon…
samuelreichert Sep 23, 2025
578b69e
chore(widget-plugin-grid): update type definitions and clean up impor…
samuelreichert Sep 23, 2025
196866c
chore(widget-plugin-hooks): remove unused type definitions for JSX el…
samuelreichert Sep 23, 2025
8dfaba7
chore(widget-plugin-mobx-kit): update Jest configuration and dependen…
samuelreichert Sep 23, 2025
fe34d01
chore(widget-plugin-platform): remove unused type definitions for JSX…
samuelreichert Sep 23, 2025
a3c6462
chore: update pnpm-lock file
samuelreichert Sep 23, 2025
ceb62fa
chore(shared-charts): remove unused imports and update TypeScript con…
samuelreichert Sep 23, 2025
8d2dfb3
chore(column-chart-web): remove unused imports and update TypeScript …
samuelreichert Sep 23, 2025
db1025b
chore(combobox-web): remove unused imports and update TypeScript conf…
samuelreichert Sep 23, 2025
ae8cfbe
chore(widget-plugin-dropdown-filter): update import to use React type…
samuelreichert Sep 23, 2025
9a0943c
chore: update imports to use React types for improved type safety
samuelreichert Sep 24, 2025
393a264
chore(custom-chart-web): update imports and TypeScript configuration …
samuelreichert Sep 24, 2025
27845d3
chore(datagrid-date-filter-web): update imports and update TypeScript…
samuelreichert Sep 24, 2025
4351a0f
chore(datagrid-dropdown-filter-web): update imports and improve TypeS…
samuelreichert Sep 24, 2025
f4a3947
chore(datagrid-number-filter-web): update imports to improve TypeScri…
samuelreichert Sep 24, 2025
8adf0a5
chore(widget-plugin-filtering): update imports for improved type safe…
samuelreichert Sep 24, 2025
f22ed85
chore(widget-plugin-hooks): update refs type to allow null values for…
samuelreichert Sep 24, 2025
f9d249a
chore(datagrid-text-filter-web): refactor imports to improve type saf…
samuelreichert Sep 24, 2025
a8eb1c0
chore(datagrid-web): update imports for better React 19 compatibility
samuelreichert Sep 24, 2025
73817ad
chore(document-viewer-web): refactor imports for improved consistency…
samuelreichert Sep 24, 2025
4fb018e
chore(dropdown-sort-web): refactor imports for improved consistency a…
samuelreichert Sep 24, 2025
b70f964
chore(events-web): refactor imports for improved consistency and remo…
samuelreichert Sep 24, 2025
ccb0b50
chore(fieldset-web): refactor imports for improved consistency and re…
samuelreichert Sep 24, 2025
5be20f8
chore(file-uploader-web): refactor imports for improved consistency a…
samuelreichert Sep 24, 2025
7858564
chore(gallery-web): refactor imports for improved consistency and rem…
samuelreichert Sep 24, 2025
ca5d874
chore(google-tag-web): refactor JSX settings for improved compatibili…
samuelreichert Sep 24, 2025
8157283
chore(heatmap-chart-web): refactor imports for improved consistency a…
samuelreichert Sep 24, 2025
1c9cf89
chore(video-player-web): remove unused createElement imports and upda…
samuelreichert Sep 24, 2025
fd9f5d8
chore(html-element-web): remove unused imports and update tsConfig fo…
samuelreichert Sep 24, 2025
7a83c39
chore(image-web): remove unused imports and update tsConfig for React 19
samuelreichert Sep 24, 2025
01a3b73
chore(language-selector-web): remove unused imports and update tsConf…
samuelreichert Sep 24, 2025
cc3c8bf
chore(tree-node-web): remove unused imports and update tsConfig for R…
samuelreichert Sep 25, 2025
2efcca3
chore: refactor React imports for better type safety
samuelreichert Sep 25, 2025
3331b0c
chore(maps-web): remove unused imports and update tsConfig for React 19
samuelreichert Sep 25, 2025
470da1a
chore(eslint-config-web): add new rule error no React namespace
samuelreichert Sep 25, 2025
2d30b51
fix(image-web): remove react namespace on lightbox
samuelreichert Sep 25, 2025
d1abcb8
chore(line-chart-web): remove unused imports and update tsConfig for …
samuelreichert Sep 25, 2025
b1a8793
chore(markdown-web): remove unused imports and update tsConfig for Re…
samuelreichert Sep 25, 2025
f13db26
chore(pie-doughnut-chart-web): remove unused imports and update tsCon…
samuelreichert Sep 25, 2025
2ee8514
chore(popup-menu-web): remove unused imports and update tsConfig for …
samuelreichert Sep 25, 2025
002c42c
chore(progress-bar-web): remove unused imports and update tsConfig fo…
samuelreichert Sep 25, 2025
7380c96
chore(progress-circle-web): remove unused imports and update tsConfig…
samuelreichert Sep 25, 2025
6c6494f
chore(range-slider-web): remove unused imports and update tsConfig fo…
samuelreichert Sep 25, 2025
f1b9f68
fix(tree-node-web): fix lint error
samuelreichert Sep 25, 2025
27fc5be
chore(rating-web): remove unused imports and update tsConfig for Reac…
samuelreichert Sep 25, 2025
7291308
chore(tooltip-web): remove unused imports and update tsConfig for Rea…
samuelreichert Sep 25, 2025
aa2b678
chore(rich-text-web): remove unused imports and update tsConfig for R…
samuelreichert Sep 25, 2025
aeb74cd
chore(selection-helper-web): remove unused imports and update tsConfi…
samuelreichert Sep 25, 2025
ddf8120
chore(switch-web): remove unused imports and update tsConfig for Reac…
samuelreichert Sep 25, 2025
8cb99a1
chore(time-series-web): remove unused imports and update tsConfig for…
samuelreichert Sep 25, 2025
c7af7df
chore(timeline-web): remove unused imports and update tsConfig for Re…
samuelreichert Sep 25, 2025
f4c7104
chore(slider-web): update rc-slider to latest version to be compatibl…
samuelreichert Sep 26, 2025
ac5d4ce
fix(shared): fix eslint errors
samuelreichert Sep 26, 2025
b6f116e
chore: remove react 19 from package.json
samuelreichert Sep 29, 2025
8c8a059
fix(calendar-custom-web): update react imports
samuelreichert Oct 2, 2025
48d8cb2
fix(signature-web): update react imports and fix eslint warnings
samuelreichert Oct 2, 2025
f7f6353
chore: add rollup override
samuelreichert Oct 2, 2025
d8b6df5
test(color-picker-web): update snapshot
samuelreichert Oct 2, 2025
bd11d3a
chore: use rollup version from pnpm workspace
samuelreichert Oct 2, 2025
949213f
test: update snapshots
samuelreichert Oct 2, 2025
ddc73b9
test(badge-web): update e2e screenshor
samuelreichert Oct 2, 2025
9dcbb49
test: update e2e screenshots
samuelreichert Oct 2, 2025
d063689
test: update e2e screenshots
samuelreichert Oct 2, 2025
c239dde
test(datagrid-date-filter-web): update failing e2e tests
samuelreichert Oct 2, 2025
c386bf8
test(slider-web): update failing e2e tests
samuelreichert Oct 2, 2025
e2f88a6
chore(widget-plugin-hooks): fix useRef without arguments
samuelreichert Oct 2, 2025
3c6170c
test(rich-text-web): update rich text snapshots
samuelreichert Oct 2, 2025
14cf5a3
test: update failing e2e screenshots
samuelreichert Oct 2, 2025
8410d98
test: update failing e2e screenshots
samuelreichert Oct 2, 2025
d0f2e6f
chore: ensure react version is not v19
samuelreichert Oct 3, 2025
d2d1314
test: update failing e2e screenshots
samuelreichert Oct 3, 2025
2cb1fda
test: update failing e2e screenshots for combobox and markdown
samuelreichert Oct 3, 2025
9959f40
test(datagrid-web): add bigger delay on clicks
samuelreichert Oct 3, 2025
f7e5331
test(rich-text-web): update failing e2e screenshots
samuelreichert Oct 3, 2025
cdda769
test: update failing e2e screenshots for column-chart and combobox
samuelreichert Oct 3, 2025
445e201
test(datagrid-dropdown-filter-web): update click delays on e2e tests
samuelreichert Oct 3, 2025
9daf74d
test(rich-text): update failing e2e tests
samuelreichert Oct 3, 2025
89d4c8e
test(datagrid-web): update failing e2e screenshots
samuelreichert Oct 6, 2025
cd97e61
test(datagrid-web): update click delay on e2e tests
samuelreichert Oct 6, 2025
6aaaa62
test(datagrid-web): increase delay for better e2e test handling
samuelreichert Oct 6, 2025
7f6cca4
test(datagrid-web): fix failing e2e screenshots and add better delay …
samuelreichert Oct 6, 2025
b7de02a
test: update failing e2e screenshots
samuelreichert Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 34 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
{
"name": "web-widgets",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/mendix/web-widgets.git"
},
"license": "Apache-2.0",
"scripts": {
"prepare": "husky install",
"lint": "turbo run lint --continue --concurrency 1",
"test": "turbo run test --continue --concurrency 1",
"verify": "turbo run verify --continue --concurrency 1",
"build": "turbo run build",
"release": "turbo run release",
"changelog": "pnpm --filter @mendix/automation-utils run changelog",
"create-gh-release": "turbo run create-gh-release --concurrency 1",
"create-translation": "turbo run create-translation",
"publish-marketplace": "turbo run publish-marketplace",
"version": "pnpm --filter @mendix/automation-utils run version",
"changelog": "pnpm --filter @mendix/automation-utils run changelog",
"postinstall": "turbo run agent-rules",
"lint": "turbo run lint --continue --concurrency 1",
"prepare": "husky install",
"prepare-release": "pnpm --filter @mendix/automation-utils run prepare-release",
"postinstall": "turbo run agent-rules"
"publish-marketplace": "turbo run publish-marketplace",
"release": "turbo run release",
"test": "turbo run test --continue --concurrency 1",
"verify": "turbo run verify --continue --concurrency 1",
"version": "pnpm --filter @mendix/automation-utils run version"
},
"devDependencies": {
"husky": "^8.0.3",
"turbo": "^2.5.4"
},
"prettier": "@mendix/prettier-config-web-widgets",
"packageManager": "[email protected]+sha512.fce8a3dd29a4ed2ec566fb53efbb04d8c44a0f05bc6f24a73046910fb9c3ce7afa35a0980500668fa3573345bd644644fa98338fa168235c80f4aa17aa17fbef",
"engines": {
"node": ">=22",
"pnpm": "10.17.0"
},
"packageManager": "[email protected]+sha512.fce8a3dd29a4ed2ec566fb53efbb04d8c44a0f05bc6f24a73046910fb9c3ce7afa35a0980500668fa3573345bd644644fa98338fa168235c80f4aa17aa17fbef",
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": ">=18.0.0 <19.0.0",
"react-dom": ">=18.0.0 <19.0.0"
},
"ignoreMissing": [
"react-native"
]
},
"onlyBuiltDependencies": [
"@swc/core",
"canvas"
],
"overrides": {
"@codemirror/state": "^6.5.2",
"@codemirror/view": "^6.38.1",
"@mendix/pluggable-widgets-tools": "10.21.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"prettier": "3.5.3",
"@types/big.js": "^6.2.2",
"@types/node": "~22.14.0",
"@types/react": ">=18.2.36",
"@types/big.js": "^6.2.2",
"d3-color@<3.1.0": ">=3.1.0",
"loader-utils@1": "^1.4.2",
"loader-utils@3": "^3.2.1",
"decode-uri-component@<0.2.1": ">=0.2.1",
"enzyme>cheerio": "1.0.0-rc.10",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"[email protected]": ">=1.0.2",
"[email protected]": ">=1.0.2",
"@codemirror/view": "^6.38.1",
"@codemirror/state": "^6.5.2",
"enzyme>cheerio": "1.0.0-rc.10",
"ts-node": "10.9.2",
"[email protected]": ">=1.0.2",
"loader-utils@1": "^1.4.2",
"loader-utils@3": "^3.2.1",
"prettier": "3.5.3",
"react": ">=18.0.0 <19.0.0",
"react-big-calendar@1>clsx": "2.1.1",
"react-dom": ">=18.0.0 <19.0.0",
"rollup": "catalog:",
"ts-node": "10.9.2",
"typescript": ">5.8.0"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"mime-types": "patches/mime-types.patch",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"rc-trigger": "patches/rc-trigger.patch",
"[email protected]": "patches/[email protected]",
"react-dropzone": "patches/react-dropzone.patch"
},
"onlyBuiltDependencies": [
"@swc/core",
"canvas"
],
"ignoredBuiltDependencies": [
"@parcel/watcher",
"core-js",
"es5-ext"
]
},
"prettier": "@mendix/prettier-config-web-widgets"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, createElement, CSSProperties, ReactChild, ReactNode } from "react";
import { Component, createElement, CSSProperties, ReactNode } from "react";

import { Alert } from "./Alert";
import { Container, Style } from "../utils/namespaces";
Expand All @@ -20,18 +20,18 @@
const DragAndDropCalendar = withDragAndDrop(BigCalendar);

export interface CalendarProps {
alertMessage?: ReactChild;
alertMessage?: ReactNode;
className?: string;
events: CalendarEvent[];
color?: string;
formats?: {};
formats?: object;
enableCreate: boolean;
height: number;
heightUnit: Style.HeightUnitType;
defaultView: Style.View;
loading?: boolean;
startPosition?: Date;
messages: {};
messages: object;
editable: string;
titleFormat?: (date: Date) => void;
weekdayFormat?: (date: Date) => void;
Expand Down Expand Up @@ -141,7 +141,7 @@

private renderCalendar(): ReactNode {
const wrapToolbar =
(injectedProps: HOCToolbarProps): Function =>
(injectedProps: HOCToolbarProps): ((toolbarProps: Container.ToolbarProps) => void) =>
(toolbarProps: Container.ToolbarProps) =>
createElement(CustomToolbar as any, { ...injectedProps, ...toolbarProps });

Expand Down Expand Up @@ -199,17 +199,17 @@
return toolbarProps.map(customView => ({ ...customView, onClickToolbarButton: this.onRangeChange }));
}

private allDayAccessor = (event: Container.ViewOptions) => event.allDay;

Check warning on line 202 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function

private eventColor = (events: CalendarEvent) => ({ style: { backgroundColor: events.color } });

Check warning on line 204 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function

private onRangeChange = (date: object) => {

Check warning on line 206 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
if (this.props.onRangeChangeAction && date) {
this.props.onRangeChangeAction(date);
}
};

private onEventDrop = (eventInfo: Container.EventInfo) => {

Check warning on line 212 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
if (
eventInfo.start.getTime() !== eventInfo.event.start.getTime() &&
this.props.editable === "default" &&
Expand All @@ -219,7 +219,7 @@
}
};

private onEventResize = (_resizeType: string, eventInfo: Container.EventInfo) => {

Check warning on line 222 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
if (
(eventInfo.start.getTime() !== eventInfo.event.start.getTime() ||
eventInfo.end.getTime() !== eventInfo.event.end.getTime()) &&
Expand All @@ -231,13 +231,13 @@
}
};

private onSelectEvent = (eventInfo: object) => {

Check warning on line 234 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
if (this.props.onSelectEventAction) {
this.props.onSelectEventAction(eventInfo);
}
};

private onSelectSlot = (slotInfo: object) => {

Check warning on line 240 in packages/customWidgets/calendar-custom-web/src/components/Calendar.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
if (this.props.onSelectSlotAction) {
this.props.onSelectSlotAction(slotInfo);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Container } from "./namespaces";
import { createElement, ReactChild } from "react";
import { createElement, ReactNode } from "react";

export function validateProps(props: Container.CalendarContainerProps): ReactChild {
export function validateProps(props: Container.CalendarContainerProps): ReactNode {
const errorMessages: string[] = [];

if (props.onClickEvent === "callMicroflow" && !props.onClickMicroflow) {
Expand Down Expand Up @@ -53,7 +53,7 @@ export function validateProps(props: Container.CalendarContainerProps): ReactChi
return "";
}

export function validateCustomFormats(props: Container.CalendarContainerProps): ReactChild {
export function validateCustomFormats(props: Container.CalendarContainerProps): ReactNode {
const errorMessages: string[] = [];

try {
Expand All @@ -68,7 +68,7 @@ export function validateCustomFormats(props: Container.CalendarContainerProps):
window.mx.parser.formatValue(date, "datetime", { datePattern: customView.gutterTimeFormat });
});
}
} catch (error) {
} catch (_error) {
errorMessages.push(`${props.friendlyId}: Invalid format value`);
}
if (errorMessages.length) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { createElement, FC, PropsWithChildren } from "react";
import { FC, PropsWithChildren } from "react";
import classNames from "classnames";

export interface AlertProps extends PropsWithChildren {
bootstrapStyle?: "default" | "primary" | "success" | "info" | "warning" | "danger";
className?: string;
}

export const Alert: FC<AlertProps> = ({ bootstrapStyle, className, children }) =>
export const Alert: FC<AlertProps> = ({ bootstrapStyle = "danger", className, children }) =>
children ? <div className={classNames(`alert alert-${bootstrapStyle}`, className)}>{children}</div> : null;

Alert.displayName = "Alert";
Alert.defaultProps = { bootstrapStyle: "danger" };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createElement, FC } from "react";
import { FC } from "react";

export interface GridBackgroundProps {
gridCellWidth: number;
Expand All @@ -12,7 +12,7 @@ export const Grid: FC<GridBackgroundProps> = ({
gridCellHeight,
gridBorderColor,
gridBorderWidth,
showGrid
showGrid = true
}) => {
const id = `grid${Math.floor(Math.random() * 1000000)}`;
return showGrid ? (
Expand Down Expand Up @@ -43,4 +43,3 @@ export const Grid: FC<GridBackgroundProps> = ({
};

Grid.displayName = "Grid";
Grid.defaultProps = { showGrid: true };
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createElement, PureComponent, ReactNode } from "react";
import { PureComponent, ReactNode } from "react";

// @ts-ignore
// @ts-expect-error signature_pad has no types
import SignaturePad, { IOptions } from "signature_pad";
import classNames from "classnames";
import ReactResizeDetector from "react-resize-detector";
Expand Down Expand Up @@ -31,7 +31,7 @@ export type penOptions = "fountain" | "ballpoint" | "marker";

export class Signature extends PureComponent<SignatureProps> {
private canvasNode: HTMLCanvasElement | null = null;
// @ts-expect-error
// @ts-expect-error signature_pad has no types
private signaturePad: SignaturePad;

render(): ReactNode {
Expand All @@ -48,7 +48,9 @@ export class Signature extends PureComponent<SignatureProps> {
<Grid {...this.props} />
<canvas
className="widget-signature-canvas"
ref={(node: HTMLCanvasElement) => (this.canvasNode = node)}
ref={(node: HTMLCanvasElement | null): void => {
this.canvasNode = node;
}}
/>
<ReactResizeDetector handleWidth handleHeight onResize={this.onResize} />
</SizeContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const SizeContainer: FC<SizeProps> = ({
height,
children,
style,
readOnly
readOnly = false
}) => {
const styleWidth = widthUnit === "percentage" ? `${width}%` : `${width}px`;
return createElement(
Expand Down Expand Up @@ -62,7 +62,6 @@ export const SizeContainer: FC<SizeProps> = ({
};

SizeContainer.displayName = "SizeContainer";
SizeContainer.defaultProps = { readOnly: false };

const getHeight = (
heightUnit: HeightUnitType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { shallow, ShallowWrapper } from "enzyme";
import { createElement, ReactChild } from "react";
import { createElement, ReactNode } from "react";

import { Alert, AlertProps } from "../Alert";

describe("Alert", () => {
const renderAlert = (props: AlertProps, message: ReactChild): ShallowWrapper<AlertProps, any> =>
const renderAlert = (props: AlertProps, message: ReactNode): ShallowWrapper<AlertProps, any> =>
shallow(createElement(Alert, props, message));
const alertMessage = "This is an error";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("Signature", () => {
});
const canvasInstance: any = canvas.instance();
canvasInstance.canvasNode = document.createElement("canvas");
const signaturePadOptions = spyOn(canvasInstance, "signaturePadOptions").and.callThrough();
const signaturePadOptions = jest.spyOn(canvasInstance, "signaturePadOptions");
canvasInstance.componentDidMount();
expect(signaturePadOptions).toHaveBeenCalled();
});
Expand Down
3 changes: 1 addition & 2 deletions packages/customWidgets/signature-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"noUnusedParameters": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "react",
"jsxFactory": "createElement"
"jsx": "react-jsx"
},
"files": ["./node_modules/mendix-client/index.d.ts"],
"include": ["./src", "./typings"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createElement, MutableRefObject, ReactElement, useCallback, useEffect, useMemo, useRef } from "react";
import { MutableRefObject, ReactElement, useCallback, useEffect, useMemo, useRef } from "react";

import { DynamicValue, ValueStatus } from "mendix";

Expand Down Expand Up @@ -43,6 +43,7 @@ const AccessibilityHelper = (props: AccessibilityHelperContainerProps): ReactEle
} catch (error) {
console.error(`Accessibility Helper selector ${props.targetSelector} is not valid`, error);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.targetSelector, conditions, contentRef.current]);

useEffect(() => {
Expand Down Expand Up @@ -89,6 +90,7 @@ const AccessibilityHelper = (props: AccessibilityHelperContainerProps): ReactEle
};
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [contentRef.current, props.targetSelector, conditions]);

return <div ref={contentRef}>{props.content}</div>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"jsx": "react",
"jsxFactory": "createElement",
"jsx": "react-jsx",
"jsxImportSource": "react",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"useUnknownInCatchVariables": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parseStyle } from "@mendix/widget-plugin-platform/preview/parse-style";
import { mapPreviewIconToWebIcon } from "@mendix/widget-plugin-platform/preview/map-icon";
import { createElement, ReactElement } from "react";
import { ReactElement } from "react";

import { Accordion } from "./components/Accordion";
import { useIconGenerator } from "./utils/iconGenerator";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createElement, ReactElement, useMemo, useRef } from "react";
import { ReactElement, useMemo, useRef } from "react";
import { ValueStatus } from "mendix";
import { generateUUID } from "@mendix/widget-plugin-platform/framework/generate-uuid";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
import {
createElement,
Dispatch,
MutableRefObject,
ReactElement,
useCallback,
useMemo,
useReducer,
useRef
} from "react";
import { Dispatch, MutableRefObject, ReactElement, useCallback, useMemo, useReducer, useRef } from "react";

import { AccordionGroup, AccordionGroupProps, Target } from "./AccordionGroup";
import { CollapsedAccordionGroupsReducerAction, getCollapsedAccordionGroupsReducer } from "../utils/reducers";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from "classnames";
import { createElement, KeyboardEvent, ReactElement, ReactNode, useCallback, useEffect, useRef, useState } from "react";
import { Key, KeyboardEvent, ReactElement, ReactNode, useCallback, useEffect, useRef, useState } from "react";
import { LoadContentEnum } from "typings/AccordionProps";
import { CallResizeObserver, useDebouncedResizeObserver } from "../utils/resizeObserver";
import "../ui/accordion-main.scss";
Expand Down Expand Up @@ -28,6 +28,7 @@ export interface AccordionGroupProps {
generateHeaderIcon?: (collapsed: boolean) => ReactElement;
showHeaderIcon?: "right" | "left" | "no";
loadContent: LoadContentEnum;
key?: Key;
}

export function AccordionGroup(props: AccordionGroupProps): ReactElement | null {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createElement, JSX, PropsWithChildren, ReactElement } from "react";
import { JSX, PropsWithChildren, ReactElement } from "react";

export interface HeaderProps {
heading: "headingOne" | "headingTwo" | "headingThree" | "headingFour" | "headingFive" | "headingSix";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createElement, ReactElement } from "react";
import { ReactElement } from "react";
import classNames from "classnames";
import { WebIcon } from "mendix";
import { IconInternal } from "@mendix/widget-plugin-component-kit/IconInternal";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "@testing-library/jest-dom";
import { createElement } from "react";
import { act, render, RenderResult } from "@testing-library/react";
import userEvent, { UserEvent } from "@testing-library/user-event";
import { Accordion, AccordionProps } from "../Accordion";
Expand Down
Loading
Loading