@ui5/webcomponents-localization 0.0.0-0f0e49a22 → 0.0.0-10f3c0dc7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/.eslintignore +2 -1
  2. package/CHANGELOG.md +1935 -0
  3. package/LICENSE.txt +201 -0
  4. package/README.md +7 -9
  5. package/dist/.tsbuildinfo +1 -0
  6. package/dist/Assets-fetch.d.ts +1 -0
  7. package/dist/Assets-fetch.js +3 -0
  8. package/dist/Assets-fetch.js.map +1 -0
  9. package/dist/Assets-node.d.ts +11 -0
  10. package/dist/Assets-node.js +12 -0
  11. package/dist/Assets-node.js.map +1 -0
  12. package/dist/CalendarUtils.d.ts +3 -0
  13. package/dist/CalendarUtils.js +6 -0
  14. package/dist/CalendarUtils.js.map +1 -0
  15. package/dist/DateFormat.d.ts +23 -1
  16. package/dist/DateFormat.js +16 -0
  17. package/dist/DateFormat.js.map +1 -1
  18. package/dist/Locale.d.ts +5 -0
  19. package/dist/Locale.js +7 -0
  20. package/dist/Locale.js.map +1 -0
  21. package/dist/LocaleData.d.ts +0 -1
  22. package/dist/NumberFormat.d.ts +5 -0
  23. package/dist/NumberFormat.js +7 -0
  24. package/dist/NumberFormat.js.map +1 -0
  25. package/dist/dates/CalendarDate.d.ts +0 -1
  26. package/dist/dates/CalendarDate.js.map +1 -1
  27. package/dist/dates/ExtremeDates.d.ts +1 -1
  28. package/dist/dates/ExtremeDates.js.map +1 -1
  29. package/dist/dates/UI5Date.d.ts +0 -1
  30. package/dist/dates/convertMonthNumbersToMonthNames.d.ts +2 -2
  31. package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -1
  32. package/dist/dates/getRoundedTimestamp.js.map +1 -1
  33. package/dist/dates/modifyDateBy.d.ts +2 -1
  34. package/dist/dates/modifyDateBy.js +34 -19
  35. package/dist/dates/modifyDateBy.js.map +1 -1
  36. package/dist/dates/transformDateToSecondaryType.js.map +1 -1
  37. package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +39 -0
  38. package/dist/generated/assets/cldr/ar.json +7355 -5531
  39. package/dist/generated/assets/cldr/ar_EG.json +7355 -5531
  40. package/dist/generated/assets/cldr/ar_SA.json +7354 -5530
  41. package/dist/generated/assets/cldr/bg.json +6103 -4452
  42. package/dist/generated/assets/cldr/ca.json +6205 -4440
  43. package/dist/generated/assets/cldr/cnr.json +6476 -0
  44. package/dist/generated/assets/cldr/cs.json +6519 -4960
  45. package/dist/generated/assets/cldr/cy.json +6564 -5211
  46. package/dist/generated/assets/cldr/da.json +6048 -4308
  47. package/dist/generated/assets/cldr/de.json +6174 -4313
  48. package/dist/generated/assets/cldr/de_AT.json +6175 -4314
  49. package/dist/generated/assets/cldr/de_CH.json +6181 -4312
  50. package/dist/generated/assets/cldr/el.json +5995 -4281
  51. package/dist/generated/assets/cldr/el_CY.json +5995 -4281
  52. package/dist/generated/assets/cldr/en.json +6395 -4316
  53. package/dist/generated/assets/cldr/en_AU.json +6536 -4319
  54. package/dist/generated/assets/cldr/en_GB.json +6518 -4329
  55. package/dist/generated/assets/cldr/en_HK.json +6423 -4337
  56. package/dist/generated/assets/cldr/en_IE.json +6414 -4328
  57. package/dist/generated/assets/cldr/en_IN.json +6602 -4333
  58. package/dist/generated/assets/cldr/en_NZ.json +6414 -4328
  59. package/dist/generated/assets/cldr/en_PG.json +6415 -4329
  60. package/dist/generated/assets/cldr/en_SG.json +6419 -4333
  61. package/dist/generated/assets/cldr/en_ZA.json +6417 -4329
  62. package/dist/generated/assets/cldr/es.json +6226 -4331
  63. package/dist/generated/assets/cldr/es_AR.json +6260 -4334
  64. package/dist/generated/assets/cldr/es_BO.json +6258 -4333
  65. package/dist/generated/assets/cldr/es_CL.json +6151 -4334
  66. package/dist/generated/assets/cldr/es_CO.json +6151 -4333
  67. package/dist/generated/assets/cldr/es_MX.json +6268 -4335
  68. package/dist/generated/assets/cldr/es_PE.json +6050 -4333
  69. package/dist/generated/assets/cldr/es_UY.json +6044 -4335
  70. package/dist/generated/assets/cldr/es_VE.json +6043 -4334
  71. package/dist/generated/assets/cldr/et.json +6182 -4340
  72. package/dist/generated/assets/cldr/fa.json +6187 -4367
  73. package/dist/generated/assets/cldr/fi.json +6439 -4463
  74. package/dist/generated/assets/cldr/fr.json +6228 -4357
  75. package/dist/generated/assets/cldr/fr_BE.json +6228 -4357
  76. package/dist/generated/assets/cldr/fr_CA.json +6244 -4351
  77. package/dist/generated/assets/cldr/fr_CH.json +6246 -4375
  78. package/dist/generated/assets/cldr/fr_LU.json +6228 -4357
  79. package/dist/generated/assets/cldr/he.json +6361 -4869
  80. package/dist/generated/assets/cldr/hi.json +6098 -4295
  81. package/dist/generated/assets/cldr/hr.json +6203 -4583
  82. package/dist/generated/assets/cldr/hu.json +6067 -4364
  83. package/dist/generated/assets/cldr/id.json +5979 -4060
  84. package/dist/generated/assets/cldr/it.json +6103 -4299
  85. package/dist/generated/assets/cldr/it_CH.json +6103 -4299
  86. package/dist/generated/assets/cldr/ja.json +6145 -4211
  87. package/dist/generated/assets/cldr/kk.json +6237 -4339
  88. package/dist/generated/assets/cldr/ko.json +6024 -4189
  89. package/dist/generated/assets/cldr/lt.json +6459 -4850
  90. package/dist/generated/assets/cldr/lv.json +6114 -4587
  91. package/dist/generated/assets/cldr/mk.json +6177 -0
  92. package/dist/generated/assets/cldr/ms.json +5821 -4021
  93. package/dist/generated/assets/cldr/nb.json +6154 -4335
  94. package/dist/generated/assets/cldr/nl.json +6306 -4294
  95. package/dist/generated/assets/cldr/nl_BE.json +6306 -4294
  96. package/dist/generated/assets/cldr/pl.json +6461 -4667
  97. package/dist/generated/assets/cldr/pt.json +6234 -4235
  98. package/dist/generated/assets/cldr/pt_PT.json +6309 -4372
  99. package/dist/generated/assets/cldr/ro.json +6170 -4563
  100. package/dist/generated/assets/cldr/ru.json +6732 -4909
  101. package/dist/generated/assets/cldr/ru_UA.json +6732 -4909
  102. package/dist/generated/assets/cldr/sk.json +6256 -4939
  103. package/dist/generated/assets/cldr/sl.json +6279 -4910
  104. package/dist/generated/assets/cldr/sr.json +6186 -4585
  105. package/dist/generated/assets/cldr/sr_Latn.json +6171 -4574
  106. package/dist/generated/assets/cldr/sv.json +6211 -4362
  107. package/dist/generated/assets/cldr/th.json +6126 -4214
  108. package/dist/generated/assets/cldr/tr.json +6245 -4400
  109. package/dist/generated/assets/cldr/uk.json +6806 -4858
  110. package/dist/generated/assets/cldr/vi.json +6016 -4070
  111. package/dist/generated/assets/cldr/zh_CN.json +5969 -4100
  112. package/dist/generated/assets/cldr/zh_HK.json +5977 -4108
  113. package/dist/generated/assets/cldr/zh_SG.json +5977 -4108
  114. package/dist/generated/assets/cldr/zh_TW.json +6033 -4131
  115. package/dist/generated/json-imports/LocaleData-fetch.d.ts +1 -0
  116. package/dist/generated/json-imports/LocaleData-fetch.js +93 -0
  117. package/dist/generated/json-imports/LocaleData-fetch.js.map +1 -0
  118. package/dist/generated/json-imports/LocaleData-node.d.ts +1 -0
  119. package/dist/generated/json-imports/LocaleData-node.js +93 -0
  120. package/dist/generated/json-imports/LocaleData-node.js.map +1 -0
  121. package/dist/generated/json-imports/LocaleData.d.ts +1 -0
  122. package/dist/generated/json-imports/LocaleData.js +89 -89
  123. package/dist/generated/json-imports/LocaleData.js.map +1 -0
  124. package/dist/getCachedLocaleDataInstance.js +2 -0
  125. package/dist/getCachedLocaleDataInstance.js.map +1 -1
  126. package/dist/locale/getLocaleData.js +2 -0
  127. package/dist/locale/getLocaleData.js.map +1 -1
  128. package/dist/sap/base/Event.js +59 -0
  129. package/dist/sap/base/Eventing.js +147 -0
  130. package/dist/sap/base/Log.js +2 -239
  131. package/dist/sap/base/assert.js +28 -1
  132. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  133. package/dist/sap/base/config.js +17 -0
  134. package/dist/sap/base/future.js +12 -0
  135. package/dist/sap/base/i18n/Formatting.d.ts +13 -0
  136. package/dist/sap/base/i18n/Formatting.js +18 -0
  137. package/dist/sap/base/i18n/Formatting.js.map +1 -0
  138. package/dist/sap/base/i18n/LanguageTag.js +179 -0
  139. package/dist/sap/base/i18n/Localization.d.ts +7 -0
  140. package/dist/sap/base/i18n/Localization.js +17 -0
  141. package/dist/sap/base/i18n/Localization.js.map +1 -0
  142. package/dist/sap/base/i18n/ResourceBundle.js +20 -0
  143. package/dist/sap/base/i18n/date/CalendarType.js +44 -0
  144. package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +106 -0
  145. package/dist/sap/base/i18n/date/TimezoneUtils.js +471 -0
  146. package/dist/sap/base/i18n/date/_EnumHelper.js +37 -0
  147. package/dist/sap/base/strings/camelize.js +30 -0
  148. package/dist/sap/base/strings/formatMessage.js +93 -15
  149. package/dist/sap/base/util/LoaderExtensions.js.map +1 -1
  150. package/dist/sap/base/util/ObjectPath.d.ts +4 -0
  151. package/dist/sap/base/util/ObjectPath.js +4 -33
  152. package/dist/sap/base/util/ObjectPath.js.map +1 -0
  153. package/dist/sap/base/util/Properties.js +12 -0
  154. package/dist/sap/base/util/Version.js +163 -0
  155. package/dist/sap/base/util/_merge.js +83 -26
  156. package/dist/sap/base/util/array/uniqueSort.js +37 -15
  157. package/dist/sap/base/util/deepClone.js +102 -0
  158. package/dist/sap/base/util/deepEqual.js +75 -51
  159. package/dist/sap/base/util/deepExtend.js +60 -0
  160. package/dist/sap/base/util/extend.js +58 -7
  161. package/dist/sap/base/util/fetch.js +8 -0
  162. package/dist/sap/base/util/isEmptyObject.js +34 -0
  163. package/dist/sap/base/util/isPlainObject.js +35 -1
  164. package/dist/sap/base/util/merge.js +57 -0
  165. package/dist/sap/base/util/mixedFetch.js +3 -0
  166. package/dist/sap/base/util/now.js +22 -7
  167. package/dist/sap/base/util/resolveReference.js +3 -0
  168. package/dist/sap/base/util/uid.js +27 -0
  169. package/dist/sap/ui/Device.js +25 -3
  170. package/dist/sap/ui/Global.js +1 -0
  171. package/dist/sap/ui/VersionInfo.js +14 -0
  172. package/dist/sap/ui/base/DataType.js +708 -0
  173. package/dist/sap/ui/base/DesignTime.js +11 -0
  174. package/dist/sap/ui/base/EventProvider.js +21 -0
  175. package/dist/sap/ui/base/Interface.js +47 -1
  176. package/dist/sap/ui/base/Metadata.js +470 -171
  177. package/dist/sap/ui/base/Object.js +284 -48
  178. package/dist/sap/ui/base/OwnStatics.js +6 -0
  179. package/dist/sap/ui/base/SyncPromise.js +98 -0
  180. package/dist/sap/ui/core/AnimationMode.js +42 -0
  181. package/dist/sap/ui/core/CalendarType.js +24 -8
  182. package/dist/sap/ui/core/Configuration.d.ts +2 -2
  183. package/dist/sap/ui/core/Configuration.js +2 -0
  184. package/dist/sap/ui/core/Configuration.js.map +1 -1
  185. package/dist/sap/ui/core/ControlBehavior.js +11 -0
  186. package/dist/sap/ui/core/Core.d.ts +3 -4
  187. package/dist/sap/ui/core/FormatSettings.d.ts +1 -2
  188. package/dist/sap/ui/core/FormatSettings.js +0 -2
  189. package/dist/sap/ui/core/FormatSettings.js.map +1 -1
  190. package/dist/sap/ui/core/Lib.js +41 -0
  191. package/dist/sap/ui/core/Locale.js +190 -155
  192. package/dist/sap/ui/core/LocaleData.js +2824 -1351
  193. package/dist/sap/ui/core/Supportability.js +5 -0
  194. package/dist/sap/ui/core/Theming.js +39 -0
  195. package/dist/sap/ui/core/_UrlResolver.js +11 -0
  196. package/dist/sap/ui/core/date/Buddhist.js +162 -87
  197. package/dist/sap/ui/core/date/CalendarUtils.js +63 -32
  198. package/dist/sap/ui/core/date/CalendarWeekNumbering.js +30 -7
  199. package/dist/sap/ui/core/date/Gregorian.js +25 -10
  200. package/dist/sap/ui/core/date/Islamic.js +298 -185
  201. package/dist/sap/ui/core/date/Japanese.js +210 -115
  202. package/dist/sap/ui/core/date/Persian.js +324 -195
  203. package/dist/sap/ui/core/date/UI5Date.js +970 -236
  204. package/dist/sap/ui/core/date/UniversalDate.js +1228 -264
  205. package/dist/sap/ui/core/date/_Calendars.js +10 -1
  206. package/dist/sap/ui/core/format/DateFormat.js +3168 -2111
  207. package/dist/sap/ui/core/format/FormatUtils.js +30 -0
  208. package/dist/sap/ui/core/format/NumberFormat.js +3164 -0
  209. package/dist/sap/ui/core/format/TimezoneUtil.js +93 -89
  210. package/dist/sap/ui/core/getCompatibilityVersion.js +7 -0
  211. package/dist/sap/ui/core/theming/ThemeHelper.js +14 -0
  212. package/dist/sap/ui/security/Security.js +12 -0
  213. package/dist/sap/ui/util/XMLHelper.js +11 -0
  214. package/dist/sap/ui/util/_URL.js +1 -0
  215. package/dist/ui5loader-autoconfig.js +1 -0
  216. package/package-scripts.cjs +22 -24
  217. package/package.json +20 -15
  218. package/tsconfig.json +20 -10
  219. package/used-modules.txt +30 -2
  220. package/dist/Assets-static.d.ts +0 -1
  221. package/dist/Assets-static.js +0 -3
  222. package/dist/Assets-static.js.map +0 -1
  223. package/dist/dates/calculateWeekNumber.d.ts +0 -5
  224. package/dist/dates/calculateWeekNumber.js +0 -45
  225. package/dist/dates/calculateWeekNumber.js.map +0 -1
  226. package/dist/generated/json-imports/LocaleData-static.js +0 -90
@@ -0,0 +1,471 @@
1
+ /**
2
+ * Static collection of utility functions to handle time zone related conversions
3
+ *
4
+ * @author SAP SE
5
+ * @version 1.146.0
6
+ * @namespace
7
+ * @alias module:sap/base/i18n/date/TimezoneUtils
8
+ * @private
9
+ */ /*!
10
+ * OpenUI5
11
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
12
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
13
+ */
14
+
15
+ var TimezoneUtils = {};
16
+
17
+ /**
18
+ * Cache for the (browser's) local IANA timezone ID
19
+ *
20
+ * @type {string}
21
+ */
22
+ var sLocalTimezone = "";
23
+
24
+ /**
25
+ * Cache for valid time zones provided by <code>Intl.supportedValuesOf("timeZone")</code>
26
+ *
27
+ * @type {Array}
28
+ */
29
+ var aSupportedTimezoneIDs;
30
+
31
+ /**
32
+ * Cache for Intl.DateTimeFormat instances
33
+ */
34
+ var oIntlDateTimeFormatCache = {
35
+ _oCache: new Map(),
36
+ /**
37
+ * When cache limit is reached, it gets cleared
38
+ */
39
+ _iCacheLimit: 10,
40
+ /**
41
+ * Creates or gets an instance of Intl.DateTimeFormat.
42
+ *
43
+ * @param {string} sTimezone IANA timezone ID
44
+ * @returns {Intl.DateTimeFormat} Intl.DateTimeFormat instance
45
+ */
46
+ get: function (sTimezone) {
47
+ var cacheEntry = this._oCache.get(sTimezone);
48
+ if (cacheEntry) {
49
+ return cacheEntry;
50
+ }
51
+ var oOptions = {
52
+ hourCycle: "h23",
53
+ hour: "2-digit",
54
+ minute: "2-digit",
55
+ second: "2-digit",
56
+ fractionalSecondDigits: 3,
57
+ day: "2-digit",
58
+ month: "2-digit",
59
+ year: "numeric",
60
+ timeZone: sTimezone,
61
+ timeZoneName: 'short',
62
+ era: 'narrow',
63
+ weekday: "short"
64
+ };
65
+ var oInstance = new Intl.DateTimeFormat("en-US", oOptions);
66
+
67
+ // only store a limited number of entries in the cache
68
+ if (this._oCache.size === this._iCacheLimit) {
69
+ this._oCache = new Map();
70
+ }
71
+ this._oCache.set(sTimezone, oInstance);
72
+ return oInstance;
73
+ }
74
+ };
75
+
76
+ /**
77
+ * Uses the <code>Intl.supportedValuesOf('timeZone')</code> and <code>Intl.DateTimeFormat</code>
78
+ * API to check if the browser can handle the given IANA timezone ID.
79
+ * <code>Intl.supportedValuesOf('timeZone')</code> offers direct access to the list of supported
80
+ * time zones. It is not yet supported by all browsers but if it is supported and the given time
81
+ * zone is in the list it is faster than probing.
82
+ *
83
+ * <code>Intl.supportedValuesOf('timeZone')</code> does not return all IANA timezone IDs which
84
+ * the <code>Intl.DateTimeFormat</code> can handle, e.g. "Japan", "Etc/UTC".
85
+ *
86
+ * @param {string} sTimezone The IANA timezone ID which is checked, e.g <code>"Europe/Berlin"</code>
87
+ * @returns {boolean} Whether the time zone is a valid IANA timezone ID
88
+ * @private
89
+ * @ui5-restricted sap.ui.comp.util.DateTimeUtil, sap.ui.core.format.DateFormat, sap.viz,
90
+ * sap/base/i18n/Localization, sap/ui/core/format/TimezoneUtil
91
+ */
92
+ TimezoneUtils.isValidTimezone = function (sTimezone) {
93
+ if (!sTimezone) {
94
+ return false;
95
+ }
96
+ if (Intl.supportedValuesOf) {
97
+ try {
98
+ aSupportedTimezoneIDs = aSupportedTimezoneIDs || Intl.supportedValuesOf('timeZone');
99
+ if (aSupportedTimezoneIDs.includes(sTimezone)) {
100
+ return true;
101
+ }
102
+ // although not contained in the supportedValues it still can be valid, therefore continue
103
+ } catch (oError) {
104
+ // ignore error
105
+ aSupportedTimezoneIDs = [];
106
+ }
107
+ }
108
+ try {
109
+ oIntlDateTimeFormatCache.get(sTimezone);
110
+ return true;
111
+ } catch (oError) {
112
+ return false;
113
+ }
114
+ };
115
+
116
+ /**
117
+ * Converts a date to a specific time zone.
118
+ * The resulting date reflects the given time zone such that the "UTC" Date methods
119
+ * can be used, e.g. Date#getUTCHours() to display the hours in the given time zone.
120
+ *
121
+ * @example
122
+ * var oDate = new Date("2021-10-13T15:22:33Z"); // UTC
123
+ * // time zone difference UTC-4 (DST)
124
+ * TimezoneUtils.convertToTimezone(oDate, "America/New_York");
125
+ * // result is:
126
+ * // 2021-10-13 11:22:33 in America/New_York
127
+ * // same as new Date("2021-10-13T11:22:33Z"); // UTC
128
+ *
129
+ * @param {Date} oDate The date which should be converted.
130
+ * @param {string} sTargetTimezone The target IANA timezone ID, e.g <code>"Europe/Berlin"</code>
131
+ * @returns {Date} The new date in the target time zone.
132
+ * @private
133
+ * @ui5-restricted sap.ui.core.format.DateFormat, sap.ui.comp.util.DateTimeUtil, sap.viz,
134
+ * sap/ui/core/format/TimezoneUtil
135
+ */
136
+ TimezoneUtils.convertToTimezone = function (oDate, sTargetTimezone) {
137
+ var oFormatParts = this._getParts(oDate, sTargetTimezone);
138
+ return TimezoneUtils._getDateFromParts(oFormatParts);
139
+ };
140
+
141
+ /**
142
+ * Uses the <code>Intl.DateTimeFormat</code> API to convert a date to a specific time zone.
143
+ *
144
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts
145
+ * @param {Date} oDate The date which should be converted.
146
+ * @param {string} sTargetTimezone The target IANA timezone ID, e.g <code>"Europe/Berlin"</code>
147
+ * @returns {{
148
+ * day: string,
149
+ * era: string,
150
+ * fractionalSecond: string,
151
+ * hour: string,
152
+ * minute: string,
153
+ * month: string,
154
+ * second: string,
155
+ * timeZoneName: string,
156
+ * weekday: string,
157
+ * year: string
158
+ * }} An object containing the date and time fields considering the target time zone.
159
+ * @private
160
+ * @ui5-restricted sap.viz, sap/ui/core/date/UI5Date, sap/ui/core/format/TimezoneUtil
161
+ */
162
+ TimezoneUtils._getParts = function (oDate, sTargetTimezone) {
163
+ var sKey,
164
+ oPart,
165
+ oDateParts = Object.create(null),
166
+ oIntlDate = oIntlDateTimeFormatCache.get(sTargetTimezone),
167
+ // clone the date object before passing it to the Intl API, to ensure that no
168
+ // UniversalDate gets passed to it;
169
+ // no need to use UI5Date.getInstance as only the UTC timestamp is used
170
+ oParts = oIntlDate.formatToParts(new Date(oDate.getTime()));
171
+ for (sKey in oParts) {
172
+ oPart = oParts[sKey];
173
+ if (oPart.type !== "literal") {
174
+ oDateParts[oPart.type] = oPart.value;
175
+ }
176
+ }
177
+ return oDateParts;
178
+ };
179
+
180
+ /**
181
+ * Creates a Date from the provided date parts.
182
+ *
183
+ * @param {object} oParts Separated date and time fields as object, see {@link #_getParts}.
184
+ * @returns {Date} Returns the date object created from the provided parts.
185
+ * @private
186
+ * @ui5-restricted sap.viz, sap/ui/core/date/UI5Date, sap/ui/core/format/TimezoneUtil
187
+ */
188
+ TimezoneUtils._getDateFromParts = function (oParts) {
189
+ // no need to use UI5Date.getInstance as only the UTC timestamp is used
190
+ var oDate = new Date(0),
191
+ iUTCYear = parseInt(oParts.year);
192
+ if (oParts.era === "B") {
193
+ // The JS Date uses astronomical year numbering which supports year zero and negative
194
+ // year numbers.
195
+ // The Intl.DateTimeFormat API uses eras (no year zero and no negative year numbers).
196
+ // years around zero overview:
197
+ // | Astronomical | In Era
198
+ // | 2 | 2 Anno Domini (era: "A")
199
+ // | 1 | 1 Anno Domini (era: "A")
200
+ // | 0 | 1 Before Christ (era: "B")
201
+ // | -1 | 2 Before Christ (era: "B")
202
+ // | -2 | 3 Before Christ (era: "B")
203
+ // For the conversion to the JS Date the parts returned by the Intl.DateTimeFormat API
204
+ // need to be adapted.
205
+ iUTCYear = iUTCYear * -1 + 1;
206
+ }
207
+
208
+ // Date.UTC cannot be used here to be able to support dates before the UNIX epoch
209
+ oDate.setUTCFullYear(iUTCYear, parseInt(oParts.month) - 1, parseInt(oParts.day));
210
+ oDate.setUTCHours(parseInt(oParts.hour), parseInt(oParts.minute), parseInt(oParts.second), parseInt(oParts.fractionalSecond || 0)); // some older browsers don't support fractionalSecond, e.g. Safari < 14.1 */
211
+
212
+ return oDate;
213
+ };
214
+
215
+ /**
216
+ * Gets the offset to UTC in seconds for a given date in the time zone specified.
217
+ *
218
+ * For non-unique points in time, the daylight saving time takes precedence over the standard
219
+ * time shortly after the switch back (e.g. clock gets set back 1 hour, duplicate hour).
220
+ *
221
+ * @example
222
+ * var oDate = new Date("2021-10-13T13:22:33Z");
223
+ * TimezoneUtils.calculateOffset(oDate, "America/New_York");
224
+ * // => +14400 seconds (4 * 60 * 60 seconds)
225
+ *
226
+ * TimezoneUtils.calculateOffset(oDate, "Europe/Berlin");
227
+ * // => -7200 seconds (-2 * 60 * 60 seconds)
228
+ *
229
+ * // daylight saving time (2018 Sun, 25 Mar, 02:00 CET → CEST +1 hour (DST start) UTC+2h)
230
+ * // the given date is taken as it is in the time zone
231
+ * TimezoneUtils.calculateOffset(new Date("2018-03-25T00:00:00Z"), "Europe/Berlin");
232
+ * // => -3600 seconds (-1 * 60 * 60 seconds), interpreted as: 2018-03-25 00:00:00 (CET)
233
+ *
234
+ * TimezoneUtils.calculateOffset(new Date("2018-03-25T03:00:00Z"), "Europe/Berlin");
235
+ * // => -7200 seconds (-2 * 60 * 60 seconds)
236
+ *
237
+ * var oHistoricalDate = new Date("1800-10-13T13:22:33Z");
238
+ * TimezoneUtils.calculateOffset(oHistoricalDate, "Europe/Berlin");
239
+ * // => -3208 seconds (-3208 seconds)
240
+ *
241
+ * @param {Date} oDate The date in the time zone used to calculate the offset to UTC.
242
+ * @param {string} sTimezoneSource The source IANA timezone ID, e.g <code>"Europe/Berlin"</code>
243
+ * @returns {number} The difference to UTC between the date in the time zone.
244
+ * @private
245
+ * @ui5-restricted sap.ui.core.format.DateFormat, sap.viz, sap/ui/core/date/UI5Date,
246
+ * sap/ui/core/format/TimezoneUtil
247
+ */
248
+ TimezoneUtils.calculateOffset = function (oDate, sTimezoneSource) {
249
+ const oDateInTimezone = TimezoneUtils.convertToTimezone(oDate, sTimezoneSource);
250
+ const iGivenTimestamp = oDate.getTime();
251
+ const iInitialOffset = iGivenTimestamp - oDateInTimezone.getTime();
252
+ // no need to use UI5Date.getInstance as only the UTC timestamp is used
253
+ const oFirstGuess = new Date(iGivenTimestamp + iInitialOffset);
254
+ const oFirstGuessInTimezone = TimezoneUtils.convertToTimezone(oFirstGuess, sTimezoneSource);
255
+ const iFirstGuessInTimezoneTimestamp = oFirstGuessInTimezone.getTime();
256
+ const iSecondOffset = oFirstGuess.getTime() - iFirstGuessInTimezoneTimestamp;
257
+ let iTimezoneOffset = iSecondOffset;
258
+ if (iInitialOffset !== iSecondOffset) {
259
+ const oSecondGuess = new Date(iGivenTimestamp + iSecondOffset);
260
+ const oSecondGuessInTimezone = TimezoneUtils.convertToTimezone(oSecondGuess, sTimezoneSource);
261
+ const iSecondGuessInTimezoneTimestamp = oSecondGuessInTimezone.getTime();
262
+ // if time is different, the given date/time does not exist in the target time zone (switch to Daylight
263
+ // Saving Time) -> take the offset for the greater date
264
+ if (iSecondGuessInTimezoneTimestamp !== iGivenTimestamp && iFirstGuessInTimezoneTimestamp > iSecondGuessInTimezoneTimestamp) {
265
+ iTimezoneOffset = iInitialOffset;
266
+ }
267
+ }
268
+ return iTimezoneOffset / 1000;
269
+ };
270
+
271
+ /**
272
+ * Map outdated IANA timezone IDs used in CLDR to correct and IANA IDs as maintained in ABAP systems.
273
+ *
274
+ * @private
275
+ */
276
+ TimezoneUtils.mTimezoneAliases2ABAPTimezones = {
277
+ "Africa/Asmera": "Africa/Asmara",
278
+ "Africa/Timbuktu": "Africa/Bamako",
279
+ "America/Argentina/ComodRivadavia": "America/Argentina/Catamarca",
280
+ "America/Atka": "America/Adak",
281
+ "America/Buenos_Aires": "America/Argentina/Buenos_Aires",
282
+ "America/Catamarca": "America/Argentina/Catamarca",
283
+ "America/Coral_Harbour": "America/Atikokan",
284
+ "America/Cordoba": "America/Argentina/Cordoba",
285
+ "America/Ensenada": "America/Tijuana",
286
+ "America/Fort_Wayne": "America/Indiana/Indianapolis",
287
+ "America/Godthab": "America/Nuuk",
288
+ "America/Indianapolis": "America/Indiana/Indianapolis",
289
+ "America/Jujuy": "America/Argentina/Jujuy",
290
+ "America/Knox_IN": "America/Indiana/Knox",
291
+ "America/Louisville": "America/Kentucky/Louisville",
292
+ "America/Mendoza": "America/Argentina/Mendoza",
293
+ "America/Montreal": "America/Toronto",
294
+ "America/Nipigon": "America/Toronto",
295
+ "America/Pangnirtung": "America/Iqaluit",
296
+ "America/Porto_Acre": "America/Rio_Branco",
297
+ "America/Rainy_River": "America/Winnipeg",
298
+ "America/Rosario": "America/Argentina/Cordoba",
299
+ "America/Santa_Isabel": "America/Tijuana",
300
+ "America/Shiprock": "America/Denver",
301
+ "America/Thunder_Bay": "America/Toronto",
302
+ "America/Virgin": "America/St_Thomas",
303
+ "America/Yellowknife": "America/Edmonton",
304
+ "Antarctica/South_Pole": "Antarctica/McMurdo",
305
+ "Asia/Ashkhabad": "Asia/Ashgabat",
306
+ "Asia/Calcutta": "Asia/Kolkata",
307
+ "Asia/Choibalsan": "Asia/Ulaanbaatar",
308
+ "Asia/Chongqing": "Asia/Shanghai",
309
+ "Asia/Chungking": "Asia/Shanghai",
310
+ "Asia/Dacca": "Asia/Dhaka",
311
+ "Asia/Harbin": "Asia/Shanghai",
312
+ "Asia/Istanbul": "Europe/Istanbul",
313
+ "Asia/Kashgar": "Asia/Urumqi",
314
+ "Asia/Katmandu": "Asia/Kathmandu",
315
+ "Asia/Macao": "Asia/Macau",
316
+ "Asia/Rangoon": "Asia/Yangon",
317
+ "Asia/Saigon": "Asia/Ho_Chi_Minh",
318
+ "Asia/Tel_Aviv": "Asia/Jerusalem",
319
+ "Asia/Thimbu": "Asia/Thimphu",
320
+ "Asia/Ujung_Pandang": "Asia/Makassar",
321
+ "Asia/Ulan_Bator": "Asia/Ulaanbaatar",
322
+ "Atlantic/Faeroe": "Atlantic/Faroe",
323
+ "Atlantic/Jan_Mayen": "Arctic/Longyearbyen",
324
+ "Australia/ACT": "Australia/Sydney",
325
+ "Australia/Canberra": "Australia/Sydney",
326
+ "Australia/Currie": "Australia/Hobart",
327
+ "Australia/LHI": "Australia/Lord_Howe",
328
+ "Australia/NSW": "Australia/Sydney",
329
+ "Australia/North": "Australia/Darwin",
330
+ "Australia/Queensland": "Australia/Brisbane",
331
+ "Australia/South": "Australia/Adelaide",
332
+ "Australia/Tasmania": "Australia/Hobart",
333
+ "Australia/Victoria": "Australia/Melbourne",
334
+ "Australia/West": "Australia/Perth",
335
+ "Australia/Yancowinna": "Australia/Broken_Hill",
336
+ "Brazil/Acre": "America/Rio_Branco",
337
+ "Brazil/DeNoronha": "America/Noronha",
338
+ "Brazil/East": "America/Sao_Paulo",
339
+ "Brazil/West": "America/Manaus",
340
+ "CET": "Europe/Brussels",
341
+ "CST6CDT": "America/Chicago",
342
+ "Canada/Atlantic": "America/Halifax",
343
+ "Canada/Central": "America/Winnipeg",
344
+ "Canada/East-Saskatchewan": "America/Regina",
345
+ "Canada/Eastern": "America/Toronto",
346
+ "Canada/Mountain": "America/Edmonton",
347
+ "Canada/Newfoundland": "America/St_Johns",
348
+ "Canada/Pacific": "America/Vancouver",
349
+ "Canada/Saskatchewan": "America/Regina",
350
+ "Canada/Yukon": "America/Whitehorse",
351
+ "Chile/Continental": "America/Santiago",
352
+ "Chile/EasterIsland": "Pacific/Easter",
353
+ "Cuba": "America/Havana",
354
+ "EET": "Europe/Athens",
355
+ "EST": "America/Panama",
356
+ "EST5EDT": "America/New_York",
357
+ "Egypt": "Africa/Cairo",
358
+ "Eire": "Europe/Dublin",
359
+ "Etc/GMT+0": "Etc/GMT",
360
+ "Etc/GMT-0": "Etc/GMT",
361
+ "Etc/GMT0": "Etc/GMT",
362
+ "Etc/Greenwich": "Etc/GMT",
363
+ "Etc/UCT": "Etc/UTC",
364
+ "Etc/Zulu": "Etc/UTC",
365
+ "Europe/Belfast": "Europe/London",
366
+ "Europe/Kyiv": "Europe/Kiev",
367
+ "Europe/Nicosia": "Asia/Nicosia",
368
+ "Europe/Tiraspol": "Europe/Chisinau",
369
+ "Europe/Uzhgorod": "Europe/Kiev",
370
+ "Europe/Zaporozhye": "Europe/Kiev",
371
+ "GB": "Europe/London",
372
+ "GB-Eire": "Europe/London",
373
+ "GMT": "Etc/GMT",
374
+ "GMT+0": "Etc/GMT",
375
+ "GMT-0": "Etc/GMT",
376
+ "GMT0": "Etc/GMT",
377
+ "Greenwich": "Etc/GMT",
378
+ "HST": "Pacific/Honolulu",
379
+ "Hongkong": "Asia/Hong_Kong",
380
+ "Iceland": "Atlantic/Reykjavik",
381
+ "Iran": "Asia/Tehran",
382
+ "Israel": "Asia/Jerusalem",
383
+ "Jamaica": "America/Jamaica",
384
+ "Japan": "Asia/Tokyo",
385
+ "Kwajalein": "Pacific/Kwajalein",
386
+ "Libya": "Africa/Tripoli",
387
+ "MET": "Europe/Brussels",
388
+ "MST": "America/Phoenix",
389
+ "MST7MDT": "America/Denver",
390
+ "Mexico/BajaNorte": "America/Tijuana",
391
+ "Mexico/BajaSur": "America/Mazatlan",
392
+ "Mexico/General": "America/Mexico_City",
393
+ "NZ": "Pacific/Auckland",
394
+ "NZ-CHAT": "Pacific/Chatham",
395
+ "Navajo": "America/Denver",
396
+ "PRC": "Asia/Shanghai",
397
+ "PST8PDT": "America/Los_Angeles",
398
+ "Pacific/Enderbury": "Pacific/Kanton",
399
+ "Pacific/Johnston": "Pacific/Honolulu",
400
+ "Pacific/Ponape": "Pacific/Pohnpei",
401
+ "Pacific/Samoa": "Pacific/Pago_Pago",
402
+ "Pacific/Truk": "Pacific/Chuuk",
403
+ "Pacific/Yap": "Pacific/Chuuk",
404
+ "Poland": "Europe/Warsaw",
405
+ "Portugal": "Europe/Lisbon",
406
+ "ROC": "Asia/Taipei",
407
+ "ROK": "Asia/Seoul",
408
+ "Singapore": "Asia/Singapore",
409
+ "Turkey": "Europe/Istanbul",
410
+ "UCT": "Etc/UTC",
411
+ "US/Alaska": "America/Anchorage",
412
+ "US/Aleutian": "America/Adak",
413
+ "US/Arizona": "America/Phoenix",
414
+ "US/Central": "America/Chicago",
415
+ "US/East-Indiana": "America/Indiana/Indianapolis",
416
+ "US/Eastern": "America/New_York",
417
+ "US/Hawaii": "Pacific/Honolulu",
418
+ "US/Indiana-Starke": "America/Indiana/Knox",
419
+ "US/Michigan": "America/Detroit",
420
+ "US/Mountain": "America/Denver",
421
+ "US/Pacific": "America/Los_Angeles",
422
+ "US/Pacific-New": "America/Los_Angeles",
423
+ "US/Samoa": "Pacific/Pago_Pago",
424
+ "UTC": "Etc/UTC",
425
+ "Universal": "Etc/UTC",
426
+ "W-SU": "Europe/Moscow",
427
+ "WET": "Europe/Lisbon",
428
+ "Zulu": "Etc/UTC"
429
+ };
430
+
431
+ /**
432
+ * Retrieves the browser's local IANA timezone ID; if the browser's timezone ID is not the up-to-date IANA
433
+ * timezone ID, the corresponding IANA timezone ID is returned.
434
+ *
435
+ * @returns {string} The local IANA timezone ID of the browser as up-to-date IANA timezone ID,
436
+ * e.g. <code>"Europe/Berlin"</code> or <code>"Asia/Kolkata"</code>
437
+ *
438
+ * @private
439
+ * @ui5-restricted sap.gantt, sap.gantt, sap.viz, lib/cldr-openui5/lib/Generator,
440
+ * sap/base/i18n/Localization, sap/ui/core/date/UI5Date, sap/ui/core/format/TimezoneUtil
441
+ */
442
+ TimezoneUtils.getLocalTimezone = function () {
443
+ if (sLocalTimezone === "") {
444
+ // timezone may be undefined, only value "" means empty cache
445
+ sLocalTimezone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
446
+ sLocalTimezone = TimezoneUtils.getABAPTimezone(sLocalTimezone);
447
+ }
448
+ return sLocalTimezone;
449
+ };
450
+
451
+ /**
452
+ * Returns the ABAP time zone ID for the given IANA time zone ID.
453
+ *
454
+ * @param {string} sTimezone The IANA time zone ID
455
+ *
456
+ * @returns {string} The ABAP time zone ID
457
+ * @private
458
+ */
459
+ TimezoneUtils.getABAPTimezone = function (sTimezone) {
460
+ return TimezoneUtils.mTimezoneAliases2ABAPTimezones[sTimezone] || sTimezone;
461
+ };
462
+
463
+ /**
464
+ * Clears the cache for the browser's local IANA timezone ID.
465
+ *
466
+ * @private
467
+ */
468
+ TimezoneUtils._clearLocalTimezoneCache = function () {
469
+ sLocalTimezone = "";
470
+ };
471
+ export default TimezoneUtils;
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ let _fnRegisterEnum;
8
+ const mEarlyRegistrations = new Map();
9
+ export default {
10
+ /**
11
+ * The final registerEnum function is injected from the DataType class.
12
+ * @param {function} registerEnum the final registerEnum function of the DataType class
13
+ */
14
+ inject: function (registerEnum) {
15
+ if (!_fnRegisterEnum) {
16
+ _fnRegisterEnum = registerEnum;
17
+ mEarlyRegistrations.forEach((mEnumContent, sName) => {
18
+ _fnRegisterEnum(sName, mEnumContent);
19
+ });
20
+ }
21
+ },
22
+ /**
23
+ * Registers an enum.
24
+ * While the final registerEnum() function is not injected yet,
25
+ * the enums are collected and will be correctly registered once the DataType class injects
26
+ * its registerEnum() function.
27
+ * @param {*} sName the name of the enum in dot-syntax
28
+ * @param {*} mEnumContent the enum content
29
+ */
30
+ register: function (sName, mEnumContent) {
31
+ if (_fnRegisterEnum) {
32
+ _fnRegisterEnum(sName, mEnumContent);
33
+ } else {
34
+ mEarlyRegistrations.set(sName, mEnumContent);
35
+ }
36
+ }
37
+ };
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ var rCamelCase = /-(.)/ig;
8
+
9
+ /**
10
+ * Transforms a hyphen separated string to a camel case string.
11
+ *
12
+ * @example
13
+ * sap.ui.require(["sap/base/strings/camelize"], function(camelize){
14
+ * camelize("foo-bar"); // "fooBar"
15
+ * });
16
+ *
17
+ * @function
18
+ * @since 1.58
19
+ * @alias module:sap/base/strings/camelize
20
+ * @param {string} sString Hyphen separated string
21
+ * @returns {string} The transformed string
22
+ * @public
23
+ * @SecPassthrough {0|return}
24
+ */
25
+ var fnCamelize = function (sString) {
26
+ return sString.replace(rCamelCase, function (sMatch, sChar) {
27
+ return sChar.toUpperCase();
28
+ });
29
+ };
30
+ export default fnCamelize;
@@ -1,20 +1,98 @@
1
- import assert from '../assert.js';
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ import assert from "../assert.js";
7
+ /**
8
+ * Pattern to analyze MessageFormat strings.
9
+ *
10
+ * Group 1: captures doubled single quotes within the string
11
+ * Group 2: captures quoted fragments within the string.
12
+ * Note that java.util.MessageFormat silently forgives a missing single quote at
13
+ * the end of a pattern. This special case is handled by the RegEx as well.
14
+ * Group 3: captures placeholders
15
+ * Checks only for numerical argument index, any remainder is ignored up to the next
16
+ * closing curly brace. Nested placeholders are not accepted!
17
+ * Group 4: captures any remaining curly braces and indicates syntax errors
18
+ *
19
+ * [-1] [----- quoted string -----] [------ placeholder ------] [--]
20
+ * @private
21
+ */
2
22
  var rMessageFormat = /('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g;
23
+
24
+ /**
25
+ * Creates a string from a pattern by replacing placeholders with concrete values.
26
+ *
27
+ * The syntax of the pattern is inspired by (but not fully equivalent to) the
28
+ * java.util.MessageFormat.
29
+ *
30
+ * Placeholders have the form <code>{ integer }</code>, where any occurrence of
31
+ * <code>{0}</code> is replaced by the value with index 0 in <code>aValues</code>,
32
+ * <code>{1}</code> by the value with index 1 in <code>aValues</code> etc.
33
+ *
34
+ * To avoid interpretation of curly braces as placeholders, any non-placeholder fragment
35
+ * of the pattern can be enclosed in single quotes. The surrounding single quotes will be
36
+ * omitted from the result. Single quotes that are not meant to escape a fragment and
37
+ * that should appear in the result, need to be doubled. In the result, only a single
38
+ * single quote will occur.
39
+ *
40
+ * Example: Pattern Strings
41
+ * <pre>
42
+ * formatMessage("Say {0}", ["Hello"]) -> "Say Hello" // normal use case
43
+ * formatMessage("Say '{0}'", ["Hello"]) -> "Say {0}" // escaped placeholder
44
+ * formatMessage("Say ''{0}''", ["Hello"]) -> "Say 'Hello'" // doubled single quote
45
+ * formatMessage("Say '{0}'''", ["Hello"]) -> "Say {0}'" // doubled single quote in quoted fragment
46
+ * </pre>
47
+ * In contrast to java.util.MessageFormat, format types or format styles are not supported.
48
+ * Everything after the argument index and up to the first closing curly brace is ignored.
49
+ * Nested placeholders (as supported by java.lang.MessageFormat for the format type choice)
50
+ * are not ignored but reported as a parse error.
51
+ *
52
+ * This method throws an Error when the pattern syntax is not fulfilled (e.g. unbalanced curly
53
+ * braces, nested placeholders or a non-numerical argument index).
54
+ *
55
+ * This method can also be used as a formatter within a binding. The first part of a composite binding
56
+ * will be used as pattern, the following parts as aValues. If there is only one value and this
57
+ * value is an array it will be handled like the default described above.
58
+ *
59
+ * @function
60
+ * @since 1.58
61
+ * @alias module:sap/base/strings/formatMessage
62
+ * @param {string} sPattern A pattern string in the described syntax
63
+ * @param {any[]} [aValues=[]] The values to be used instead of the placeholders.
64
+ * @returns {string} The formatted result string
65
+ * @SecPassthrough {*|return}
66
+ * @public
67
+ */
3
68
  var fnFormatMessage = function (sPattern, aValues) {
4
- assert(typeof sPattern === 'string' || sPattern instanceof String, 'pattern must be string');
5
- if (arguments.length > 2 || aValues != null && !Array.isArray(aValues)) {
6
- aValues = Array.prototype.slice.call(arguments, 1);
69
+ if (sPattern == null) {
70
+ // Binding formatter case: arguments might be nullish while data is still being populated
71
+ // Return an empty string in those cases
72
+ return "";
73
+ }
74
+ assert(typeof sPattern === "string" || sPattern instanceof String, "pattern must be string");
75
+ if (arguments.length > 2 || aValues != null && !Array.isArray(aValues)) {
76
+ aValues = Array.prototype.slice.call(arguments, 1);
77
+ }
78
+ aValues = aValues || [];
79
+ return sPattern.replace(rMessageFormat, function ($0, $1, $2, $3, offset) {
80
+ if ($1) {
81
+ // a doubled single quote in a normal string fragment
82
+ // --> emit a single quote
83
+ return "'";
84
+ } else if ($2) {
85
+ // a quoted sequence of chars, potentially containing doubled single quotes again
86
+ // --> emit with doubled single quotes replaced by a single quote
87
+ return $2.replace(/''/g, "'");
88
+ } else if ($3) {
89
+ // a welformed curly brace
90
+ // --> emit the argument but ignore other parameters
91
+ return String(aValues[parseInt($3)]);
7
92
  }
8
- aValues = aValues || [];
9
- return sPattern.replace(rMessageFormat, function ($0, $1, $2, $3, offset) {
10
- if ($1) {
11
- return '\'';
12
- } else if ($2) {
13
- return $2.replace(/''/g, '\'');
14
- } else if ($3) {
15
- return String(aValues[parseInt($3)]);
16
- }
17
- throw new Error('formatMessage: pattern syntax error at pos. ' + offset);
18
- });
93
+ // e.g. malformed curly braces
94
+ // --> throw Error
95
+ throw new Error("formatMessage: pattern syntax error at pos. " + offset);
96
+ });
19
97
  };
20
98
  export default fnFormatMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"LoaderExtensions.js","sourceRoot":"","sources":["../../../../src/sap/base/util/LoaderExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAE5F,MAAM,YAAY,GAAG,CAAC,UAAkB,EAAE,EAAE;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC1E,IAAI,CAAC,YAAY,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,GAAG,CAAC,CAAC;KAClD;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IACjC,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACxB,YAAY;CACZ,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { getLocaleData } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\n\nconst loadResource = (moduleName: string) => {\n\tconst moduleFormat = moduleName.match(/sap\\/ui\\/core\\/cldr\\/(\\w+)\\.json/);\n\tif (!moduleFormat) {\n\t\tthrow new Error(`Unknown module \"${moduleName}\"`);\n\t}\n\n\tconst localeId = moduleFormat[1];\n\treturn getLocaleData(localeId);\n};\n\nconst LoaderExtensions = {\n\tloadResource,\n};\n\nexport default LoaderExtensions;\n"]}
1
+ {"version":3,"file":"LoaderExtensions.js","sourceRoot":"","sources":["../../../../src/sap/base/util/LoaderExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAE5F,MAAM,YAAY,GAAG,CAAC,UAAkB,EAAE,EAAE;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC1E,IAAI,CAAC,YAAY,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,GAAG,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IACjC,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACxB,YAAY;CACZ,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { getLocaleData } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\n\nconst loadResource = (moduleName: string) => {\n\tconst moduleFormat = moduleName.match(/sap\\/ui\\/core\\/cldr\\/(\\w+)\\.json/);\n\tif (!moduleFormat) {\n\t\tthrow new Error(`Unknown module \"${moduleName}\"`);\n\t}\n\n\tconst localeId = moduleFormat[1];\n\treturn getLocaleData(localeId);\n};\n\nconst LoaderExtensions = {\n\tloadResource,\n};\n\nexport default LoaderExtensions;\n"]}
@@ -0,0 +1,4 @@
1
+ declare const ObjectPath: {
2
+ set(): void;
3
+ };
4
+ export default ObjectPath;