Skip to content

Commit e1d14e9

Browse files
committed
updated react to version 19.*
1 parent fa7eba5 commit e1d14e9

32 files changed

Lines changed: 442 additions & 425 deletions

package-lock.json

Lines changed: 355 additions & 365 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
},
2828
"dependencies": {
2929
"@fortawesome/fontawesome-free": "^6.7.2",
30-
"@react-leaflet/core": "^2.1.0",
31-
"@sibvisions/reactui-designer": "^1.4.0",
30+
"@react-leaflet/core": "^3.0.0",
31+
"@sibvisions/reactui-designer": "^2.0.0",
3232
"@types/googlemaps": "^3.40.3",
3333
"buffer": "^6.0.3",
3434
"chart.js": "3.5.1",
@@ -48,9 +48,9 @@
4848
"primereact": "^10.9.4",
4949
"query-string": "^9.1.1",
5050
"quill": "^2.0.3",
51-
"react-error-boundary": "^5.0.0",
51+
"react-error-boundary": "^6.0.0",
5252
"react-helmet": "^6.1.0",
53-
"react-leaflet": "^4.2.1",
53+
"react-leaflet": "^5.0.0",
5454
"react-rnd": "^10.3.5",
5555
"react-router-dom": "^5.2.0",
5656
"react-signature-canvas": "^1.0.5",
@@ -65,18 +65,18 @@
6565
"underscore": "^1.13.1"
6666
},
6767
"peerDependencies": {
68-
"react": "^18.2.0",
69-
"react-dom": "^18.2.0"
68+
"react": "^19.1.0",
69+
"react-dom": "^19.1.0"
7070
},
7171
"devDependencies": {
7272
"vite": "^7.0.0",
7373
"vite-plugin-dts": "^4.5.4",
7474
"typescript": "^5.8.3",
7575
"@types/leaflet": "^1.9.8",
76-
"@types/node": "^22.14.1",
76+
"@types/node": "^24.0.4",
7777
"@types/quill": "^2.0.14",
78-
"@types/react": "^18.2.48",
79-
"@types/react-dom": "^18.0.0",
78+
"@types/react": "^19.1.8",
79+
"@types/react-dom": "^19.1.6",
8080
"@types/react-helmet": "^6.1.0",
8181
"@types/react-router": "^5.1.8",
8282
"@types/react-router-dom": "^5.1.6",

src/application-frame/login/MFAURL.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const MFAURL: FC<ILoginForm> = (props) => {
3636
const context = useContext(appContext);
3737

3838
/** Reference for the gauge component */
39-
const gaugeRef = useRef<any>();
39+
const gaugeRef = useRef<HTMLDivElement>(null);
4040

4141
/** State of the link object */
4242
const [link, setLink] = useState<MFAURLType | string>({ width: 500, height: 300, url: "", target: "_self" });

src/application-frame/login/MFAWait.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const MFAWait:FC<ILoginForm> = (props) => {
3535
const context = useContext(appContext);
3636

3737
/** Reference for the gauge component */
38-
const gaugeRef = useRef<any>();
38+
const gaugeRef = useRef<HTMLDivElement>(null);
3939

4040
/** State of the code field */
4141
const [code, setCode] = useState<string>("");

src/main/API.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import CustomMenuItem from "./util/types/custom-types/CustomMenuItem";
3131
import { ServerMenuButtons } from "./response/data/MenuResponse";
3232
import EditableMenuItem from "./util/types/custom-types/EditableMenuItem";
3333
import CustomToolbarItem from "./util/types/custom-types/CustomToolbarItem";
34+
import CustomProps from "./util/types/custom-types/CustomProps";
3435
import CustomStartupProps from "./util/types/custom-types/CustomStartupProps";
3536
import UserData from "./model/UserData";
3637
import COMPONENT_CLASSNAMES from "./components/COMPONENT_CLASSNAMES";
@@ -48,7 +49,7 @@ export interface IAPI {
4849
deleteRecord: (id:string, dataProvider:string) => void,
4950
addCustomScreen: (id:string, screen:ReactElement) => void,
5051
addReplaceScreen: (id:string, screen:ReactElement) => void,
51-
addScreenWrapper: (id:string, wrapper:ReactElement, pOptions?:ScreenWrapperOptions) => void
52+
addScreenWrapper: (id:string, wrapper:ReactElement<CustomProps>, pOptions?:ScreenWrapperOptions) => void
5253
addMenuItem: (menuItem: CustomMenuItem) => void,
5354
editMenuItem: (editItem: EditableMenuItem) => void,
5455
removeMenuItem: (id:string) => void,
@@ -62,7 +63,7 @@ export interface IAPI {
6263
addGlobalComponent: (name:string, comp:ReactElement) => void,
6364
addCSSToHeadBefore: (path:string) => void,
6465
addCSSToHeadAfter: (path:string) => void,
65-
extendComponent: (name: string, component: ReactElement) => void,
66+
extendComponent: (name: string, component: ReactElement<CustomProps>) => void,
6667
addCustomLogin: (defaultView:(props: ICustomDefaultLogin) => ReactElement, resetView?: (props: ICustomResetLogin) => ReactElement, mfaTextView?: (props: ICustomMFAText) => ReactElement, mfaWaitView?: (props: ICustomMFAWait) => ReactElement, mfaUrlView?: (props: ICustomMFAUrl) => ReactElement) => void
6768
getApplicationParameter: (key:string) => any
6869
}
@@ -245,7 +246,7 @@ class API implements IAPI {
245246
* @param wrapper - the screen-wrapper which will be added
246247
* @param pOptions - options of the screen-wrapper currently global:boolean
247248
*/
248-
addScreenWrapper(screenName:string, wrapper:ReactElement, pOptions?:ScreenWrapperOptions) {
249+
addScreenWrapper(screenName:string, wrapper:ReactElement<CustomProps>, pOptions?:ScreenWrapperOptions) {
249250
this.#contentStore.screenWrappers.set(screenName, {wrapper: wrapper, options: pOptions ? pOptions : { global: true }});
250251
}
251252

@@ -536,7 +537,7 @@ class API implements IAPI {
536537
* @param name - the name of the component
537538
* @param component - the component with the functions to be extended
538539
*/
539-
extendComponent(name: string, component: ReactElement) {
540+
extendComponent(name: string, component: ReactElement<CustomProps>) {
540541
const existingComp = this.#contentStore.getComponentByName(name);
541542
if (existingComp) {
542543
for (let newPropName in component.props) {

src/main/components/buttons/switch/UISwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { RenderButtonHTML, getButtonText } from "../button/UIButton";
3232
/** This component displays a switch, used when the CheckboxCellEditor style 'ui-switch' is used */
3333
const UISwitch: FC<IEditorCheckBox & IComponentConstants> = (props) => {
3434
/** Reference for the switch component */
35-
const switchRef = useRef<any>();
35+
const switchRef = useRef<InputSwitch>(null);
3636

3737
/** Current state of whether the CheckBox is currently checked or not */
3838
const [checked, setChecked] = useState(props.selectedRow ? getBooleanValueFromValue(props.selectedRow.data[props.columnName], props.cellEditor.selectedValue) : false);

src/main/components/editors/linked/UIEditorLinked.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ const UIEditorLinked: FC<IEditorLinked & IExtendableLinkedEditor & IComponentCon
957957

958958
return Object.entries(suggestionObj).map(([key, value], i:number) => {
959959
const cellStyle: CSSProperties = {}
960-
let icon: JSX.Element | null = null;
960+
let icon: React.JSX.Element | null = null;
961961
let colIndex = metaDataReferenced?.columns.findIndex((c) => c.name == key);
962962
let column = metaDataReferenced?.columns[colIndex];
963963

src/main/components/editors/text/UIEditorText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ const UIEditorText: FC<IEditorText & IExtendableTextEditor & IComponentConstants
247247
/** The popup-menu of the ImageViewer */
248248
const popupMenu = usePopupMenu(props);
249249

250-
const HTMLEditorRef = useRef<any>();
250+
const HTMLEditorRef = useRef<any>(null);
251251

252252
/** Handles the requestFocus property */
253253
useRequestFocus(id, props.requestFocus, props.forwardedRef.current, props.context)

src/main/components/layouts/FormLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { quickSort } from "../../util/other-util/QuickSort";
4040
const FormLayout: FC<ILayout> = (baseProps) => {
4141

4242
/** Current state of the calculatedStyle by the FormLayout */
43-
const calculatedStyle = useRef<{ style?: CSSProperties, componentSizes?: Map<string, CSSProperties> }>();
43+
const calculatedStyle = useRef<{ style?: CSSProperties, componentSizes?: Map<string, CSSProperties> }>(null);
4444

4545
/** Use context to gain access for contentstore and server methods */
4646
const context = useContext(appContext);

src/main/components/layouts/Layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import FlowLayout from "./FlowLayout";
2121
import FormLayout from "./FormLayout";
2222
import GridLayout from "./GridLayout";
2323
import NullLayout from "./NullLayout";
24+
import CustomProps from "../../util/types/custom-types/CustomProps";
2425
import { LayoutAssistant } from "../../util/types/designer/LayoutAssistant";
2526
import { FormLayoutInformation, LAYOUTS } from "../../util/types/designer/LayoutInformation";
2627

@@ -42,7 +43,7 @@ export interface ILayout {
4243
popupSize?: Dimension,
4344
minimumSize?: Dimension,
4445
maximumSize?: Dimension,
45-
components: Array<ReactElement>
46+
components: Array<ReactElement<CustomProps>>
4647
compSizes: Map<string, ComponentSizes> | undefined
4748
style: CSSProperties,
4849
reportSize: Function,

0 commit comments

Comments
 (0)