@@ -19,16 +19,132 @@ t.declareModule("sap/ui/core/Configuration", [
1919 moduleName : "sap/base/i18n/Localization" ,
2020 mustNotUseReturnValue : true ,
2121 } ) ) ,
22+ t . method ( "getAccessibility" , accessExpressionFix ( {
23+ moduleName : "sap/ui/core/ControlBehavior" ,
24+ propertyAccess : "isAccessibilityEnabled" ,
25+ } ) ) ,
26+ t . method ( "getActiveTerminologies" , accessExpressionFix ( {
27+ moduleName : "sap/base/i18n/Localization" ,
28+ propertyAccess : "getActiveTerminologies" ,
29+ } ) ) ,
30+ t . method ( "getAllowlistService" , accessExpressionFix ( {
31+ moduleName : "sap/ui/security/Security" ,
32+ propertyAccess : "getAllowlistService" ,
33+ } ) ) ,
34+ t . method ( "getAnimation" , callExpressionFix ( {
35+ moduleName : "sap/ui/core/ControlBehavior" ,
36+ propertyAccess : "getAnimationMode" ,
37+ // Note: The new API returns an enum value instead of a boolean, therefore
38+ // migration is currently not possible if the return value is used
39+ // This could be optimized with an advanced migration that detects how the return
40+ // value is used and e.g. migrates to something like
41+ // (getAnimationMode() !== sap.ui.core.Configuration.AnimationMode.none)
42+ // Right now this migration probably wont apply for most cases
43+ mustNotUseReturnValue : true ,
44+ } ) ) ,
45+ t . method ( "getAnimationMode" , accessExpressionFix ( {
46+ scope : FixScope . FirstChild ,
47+ moduleName : "sap/ui/core/ControlBehavior" ,
48+ } ) ) ,
49+ t . method ( "getCalendarType" , accessExpressionFix ( {
50+ moduleName : "sap/base/i18n/Formatting" ,
51+ scope : FixScope . FirstChild ,
52+ } ) ) ,
53+ t . method ( "getCalendarWeekNumbering" , accessExpressionFix ( {
54+ moduleName : "sap/base/i18n/Formatting" ,
55+ scope : FixScope . FirstChild ,
56+ } ) ) ,
57+ t . method ( "getFrameOptions" , accessExpressionFix ( {
58+ moduleName : "sap/ui/security/Security" ,
59+ scope : FixScope . FirstChild ,
60+ } ) ) ,
61+ t . method ( "getFormatLocale" , callExpressionGeneratorFix ( {
62+ moduleName : "sap/base/i18n/Formatting" ,
63+ generator : ( ctx , [ moduleIdentifier ] ) => {
64+ return `${ moduleIdentifier } .getLanguageTag().toString()` ;
65+ } ,
66+ } ) ) ,
67+ t . method ( "getLanguage" , accessExpressionFix ( {
68+ moduleName : "sap/base/i18n/Localization" ,
69+ scope : FixScope . FirstChild ,
70+ } ) ) ,
71+ t . method ( "getLanguageTag" , callExpressionGeneratorFix ( {
72+ moduleName : "sap/base/i18n/Localization" ,
73+ generator : ( ctx , [ localizationIdentifier ] ) => {
74+ return `${ localizationIdentifier } .getLanguageTag().toString()` ;
75+ } ,
76+ } ) ) ,
2277 t . method ( "getLocale" , callExpressionGeneratorFix ( {
2378 moduleImports : [ {
2479 moduleName : "sap/ui/core/Locale" ,
2580 } , {
2681 moduleName : "sap/base/i18n/Localization" ,
2782 } ] ,
28- generator ( ctx , identifierNames ) {
29- return `new ${ identifierNames [ 0 ] } (${ identifierNames [ 1 ] } .getLanguageTag())` ;
83+ generator ( ctx , [ localeIdentifier , localizationIdentifier ] ) {
84+ return `new ${ localeIdentifier } (${ localizationIdentifier } .getLanguageTag())` ;
3085 } ,
3186 } ) ) ,
87+ t . method ( "getRTL" , accessExpressionFix ( {
88+ moduleName : "sap/base/i18n/Localization" ,
89+ propertyAccess : "getRTL" ,
90+ } ) ) ,
91+ t . method ( "getSAPLogonLanguage" , accessExpressionFix ( {
92+ moduleName : "sap/base/i18n/Localization" ,
93+ scope : FixScope . FirstChild ,
94+ } ) ) ,
95+ t . method ( "getSecurityTokenHandlers" , accessExpressionFix ( {
96+ moduleName : "sap/ui/security/Security" ,
97+ scope : FixScope . FirstChild ,
98+ } ) ) ,
99+ t . method ( "getTheme" , accessExpressionFix ( {
100+ moduleName : "sap/ui/core/Theming" ,
101+ scope : FixScope . FirstChild ,
102+ } ) ) ,
103+ t . method ( "getTimezone" , accessExpressionFix ( {
104+ moduleName : "sap/base/i18n/Localization" ,
105+ scope : FixScope . FirstChild ,
106+ } ) ) ,
107+ t . method ( "getUIDPrefix" , accessExpressionFix ( {
108+ moduleName : "sap/ui/base/ManagedObjectMetadata" ,
109+ scope : FixScope . FirstChild ,
110+ } ) ) ,
111+ t . method ( "getWhitelistService" , accessExpressionFix ( {
112+ moduleName : "sap/ui/security/Security" ,
113+ propertyAccess : "getAllowlistService" ,
114+ } ) ) ,
115+ t . method ( "setAnimationMode" , accessExpressionFix ( {
116+ moduleName : "sap/ui/core/ControlBehavior" ,
117+ scope : FixScope . FirstChild ,
118+ } ) ) ,
119+ t . method ( "setCalendarType" , callExpressionFix ( {
120+ moduleName : "sap/base/i18n/Formatting" ,
121+ propertyAccess : "setCalendarType" ,
122+ mustNotUseReturnValue : true ,
123+ } ) ) ,
124+ t . method ( "setCalendarWeekNumbering" , callExpressionFix ( {
125+ moduleName : "sap/base/i18n/Formatting" ,
126+ propertyAccess : "setCalendarWeekNumbering" ,
127+ mustNotUseReturnValue : true ,
128+ } ) ) ,
129+ t . method ( "setFormatLocale" , callExpressionFix ( {
130+ moduleName : "sap/base/i18n/Formatting" ,
131+ propertyAccess : "setLanguageTag" ,
132+ mustNotUseReturnValue : true ,
133+ } ) ) ,
134+ t . method ( "setSecurityTokenHandlers" , accessExpressionFix ( {
135+ moduleName : "sap/ui/security/Security" ,
136+ scope : FixScope . FirstChild ,
137+ } ) ) ,
138+ t . method ( "setTheme" , callExpressionFix ( {
139+ moduleName : "sap/ui/core/Theming" ,
140+ propertyAccess : "setTheme" ,
141+ mustNotUseReturnValue : true ,
142+ } ) ) ,
143+ t . method ( "setTimezone" , callExpressionFix ( {
144+ moduleName : "sap/base/i18n/Localization" ,
145+ propertyAccess : "setTimezone" ,
146+ mustNotUseReturnValue : true ,
147+ } ) ) ,
32148 ] ) ,
33149] ) ;
34150
0 commit comments