()
| 119 | } |
| 120 | |
| 121 | static init() { |
| 122 | if (!OpenUI5Support.isOpenUI5Detected()) { |
| 123 | return OpenUI5Support.awaitForOpenUI5(); |
| 124 | } |
| 125 | |
| 126 | if (!OpenUI5Support.initPromise) { |
| 127 | OpenUI5Support.initPromise = new Promise<void>(resolve => { |
| 128 | window.sap.ui.require(["sap/ui/core/Core"], async (Core: OpenUI5Core) => { |
| 129 | const callback = () => { |
| 130 | let deps: Array<string> = ["sap/ui/core/Popup", "sap/m/Dialog", "sap/ui/core/Patcher", "sap/ui/core/LocaleData"]; |
| 131 | if (OpenUI5Support.isAtLeastVersion(116)) { // for versions since 1.116.0 and onward, use the modular core |
| 132 | deps = [ |
| 133 | ...deps, |
| 134 | "sap/base/i18n/Formatting", |
| 135 | "sap/base/i18n/Localization", |
| 136 | "sap/ui/core/ControlBehavior", |
| 137 | "sap/ui/core/Theming", |
| 138 | "sap/ui/core/date/CalendarUtils", |
| 139 | ]; |
| 140 | } |
| 141 | window.sap.ui.require(deps, (Popup: OpenUI5PopupClass, Dialog: OpenUI5DialogClass, Patcher: OpenUI5Patcher) => { |
| 142 | patchPatcher(Patcher); |
| 143 | patchPopup(Popup, Dialog); |
| 144 | resolve(); |
| 145 | }); |
| 146 | }; |
| 147 | if (OpenUI5Support.isAtLeastVersion(116)) { |
| 148 | await Core.ready(); |
| 149 | callback(); |
| 150 | } else { |
| 151 | Core.attachInit(callback); |
| 152 | } |
| 153 | }); |
| 154 | }); |
| 155 | } |
| 156 | |
| 157 | return OpenUI5Support.initPromise; |
| 158 | } |
| 159 | |
| 160 | static getConfigurationSettingsObject() { |
| 161 | if (!OpenUI5Support.isOpenUI5Detected()) { |
no test coverage detected