@@ -31,6 +31,7 @@ import CustomMenuItem from "./util/types/custom-types/CustomMenuItem";
3131import { ServerMenuButtons } from "./response/data/MenuResponse" ;
3232import EditableMenuItem from "./util/types/custom-types/EditableMenuItem" ;
3333import CustomToolbarItem from "./util/types/custom-types/CustomToolbarItem" ;
34+ import CustomProps from "./util/types/custom-types/CustomProps" ;
3435import CustomStartupProps from "./util/types/custom-types/CustomStartupProps" ;
3536import UserData from "./model/UserData" ;
3637import 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 ) {
0 commit comments