@ui5/webcomponents-localization 0.0.0-47cc17a26 → 0.0.0-49bade48d

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 (169) hide show
  1. package/CHANGELOG.md +293 -1
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/DateFormat.d.ts +23 -0
  4. package/dist/DateFormat.js +16 -0
  5. package/dist/DateFormat.js.map +1 -1
  6. package/dist/Locale.d.ts +5 -0
  7. package/dist/Locale.js +7 -0
  8. package/dist/Locale.js.map +1 -0
  9. package/dist/NumberFormat.d.ts +5 -0
  10. package/dist/NumberFormat.js +7 -0
  11. package/dist/NumberFormat.js.map +1 -0
  12. package/dist/dates/convertMonthNumbersToMonthNames.d.ts +2 -2
  13. package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -1
  14. package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +36 -24
  15. package/dist/generated/assets/cldr/ar.json +624 -354
  16. package/dist/generated/assets/cldr/ar_EG.json +624 -354
  17. package/dist/generated/assets/cldr/ar_SA.json +625 -355
  18. package/dist/generated/assets/cldr/bg.json +339 -215
  19. package/dist/generated/assets/cldr/ca.json +633 -509
  20. package/dist/generated/assets/cldr/cnr.json +960 -653
  21. package/dist/generated/assets/cldr/cs.json +343 -531
  22. package/dist/generated/assets/cldr/cy.json +684 -1050
  23. package/dist/generated/assets/cldr/da.json +354 -231
  24. package/dist/generated/assets/cldr/de.json +458 -330
  25. package/dist/generated/assets/cldr/de_AT.json +459 -331
  26. package/dist/generated/assets/cldr/de_CH.json +522 -386
  27. package/dist/generated/assets/cldr/el.json +317 -152
  28. package/dist/generated/assets/cldr/el_CY.json +317 -152
  29. package/dist/generated/assets/cldr/en.json +606 -253
  30. package/dist/generated/assets/cldr/en_AU.json +830 -376
  31. package/dist/generated/assets/cldr/en_GB.json +696 -251
  32. package/dist/generated/assets/cldr/en_HK.json +544 -203
  33. package/dist/generated/assets/cldr/en_IE.json +533 -192
  34. package/dist/generated/assets/cldr/en_IN.json +820 -296
  35. package/dist/generated/assets/cldr/en_NZ.json +534 -193
  36. package/dist/generated/assets/cldr/en_PG.json +509 -168
  37. package/dist/generated/assets/cldr/en_SG.json +526 -185
  38. package/dist/generated/assets/cldr/en_ZA.json +529 -186
  39. package/dist/generated/assets/cldr/es.json +355 -230
  40. package/dist/generated/assets/cldr/es_AR.json +444 -288
  41. package/dist/generated/assets/cldr/es_BO.json +419 -264
  42. package/dist/generated/assets/cldr/es_CL.json +455 -300
  43. package/dist/generated/assets/cldr/es_CO.json +412 -257
  44. package/dist/generated/assets/cldr/es_MX.json +515 -352
  45. package/dist/generated/assets/cldr/es_PE.json +397 -234
  46. package/dist/generated/assets/cldr/es_UY.json +424 -269
  47. package/dist/generated/assets/cldr/es_VE.json +398 -243
  48. package/dist/generated/assets/cldr/et.json +390 -233
  49. package/dist/generated/assets/cldr/fa.json +510 -271
  50. package/dist/generated/assets/cldr/fi.json +497 -251
  51. package/dist/generated/assets/cldr/fr.json +339 -106
  52. package/dist/generated/assets/cldr/fr_BE.json +341 -108
  53. package/dist/generated/assets/cldr/fr_CA.json +652 -397
  54. package/dist/generated/assets/cldr/fr_CH.json +342 -109
  55. package/dist/generated/assets/cldr/fr_LU.json +339 -106
  56. package/dist/generated/assets/cldr/he.json +726 -904
  57. package/dist/generated/assets/cldr/hi.json +529 -288
  58. package/dist/generated/assets/cldr/hr.json +392 -383
  59. package/dist/generated/assets/cldr/hu.json +459 -335
  60. package/dist/generated/assets/cldr/id.json +379 -128
  61. package/dist/generated/assets/cldr/it.json +420 -301
  62. package/dist/generated/assets/cldr/it_CH.json +426 -307
  63. package/dist/generated/assets/cldr/ja.json +332 -74
  64. package/dist/generated/assets/cldr/kk.json +540 -240
  65. package/dist/generated/assets/cldr/ko.json +371 -115
  66. package/dist/generated/assets/cldr/lt.json +428 -545
  67. package/dist/generated/assets/cldr/lv.json +415 -413
  68. package/dist/generated/assets/cldr/mk.json +691 -559
  69. package/dist/generated/assets/cldr/ms.json +395 -136
  70. package/dist/generated/assets/cldr/nb.json +355 -234
  71. package/dist/generated/assets/cldr/nl.json +357 -251
  72. package/dist/generated/assets/cldr/nl_BE.json +428 -322
  73. package/dist/generated/assets/cldr/pl.json +333 -459
  74. package/dist/generated/assets/cldr/pt.json +419 -298
  75. package/dist/generated/assets/cldr/pt_PT.json +362 -231
  76. package/dist/generated/assets/cldr/ro.json +369 -397
  77. package/dist/generated/assets/cldr/ru.json +599 -368
  78. package/dist/generated/assets/cldr/ru_UA.json +598 -367
  79. package/dist/generated/assets/cldr/sk.json +343 -517
  80. package/dist/generated/assets/cldr/sl.json +477 -640
  81. package/dist/generated/assets/cldr/sr.json +478 -531
  82. package/dist/generated/assets/cldr/sr_Latn.json +631 -684
  83. package/dist/generated/assets/cldr/sv.json +395 -258
  84. package/dist/generated/assets/cldr/th.json +452 -199
  85. package/dist/generated/assets/cldr/tr.json +391 -238
  86. package/dist/generated/assets/cldr/uk.json +696 -342
  87. package/dist/generated/assets/cldr/vi.json +836 -487
  88. package/dist/generated/assets/cldr/zh_CN.json +358 -104
  89. package/dist/generated/assets/cldr/zh_HK.json +366 -113
  90. package/dist/generated/assets/cldr/zh_SG.json +371 -118
  91. package/dist/generated/assets/cldr/zh_TW.json +480 -238
  92. package/dist/getCachedLocaleDataInstance.js +2 -0
  93. package/dist/getCachedLocaleDataInstance.js.map +1 -1
  94. package/dist/locale/getLocaleData.js +2 -0
  95. package/dist/locale/getLocaleData.js.map +1 -1
  96. package/dist/sap/base/Event.js +2 -2
  97. package/dist/sap/base/Eventing.js +4 -3
  98. package/dist/sap/base/assert.js +1 -1
  99. package/dist/sap/base/config/MemoryConfigurationProvider.js +1 -1
  100. package/dist/sap/base/future.js +12 -0
  101. package/dist/sap/base/i18n/Formatting.d.ts +5 -0
  102. package/dist/sap/base/i18n/Formatting.js +7 -0
  103. package/dist/sap/base/i18n/Formatting.js.map +1 -1
  104. package/dist/sap/base/i18n/LanguageTag.js +18 -12
  105. package/dist/sap/base/i18n/Localization.d.ts +3 -0
  106. package/dist/sap/base/i18n/Localization.js +5 -0
  107. package/dist/sap/base/i18n/Localization.js.map +1 -1
  108. package/dist/sap/base/i18n/ResourceBundle.js +20 -0
  109. package/dist/sap/base/i18n/date/CalendarType.js +9 -8
  110. package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +9 -8
  111. package/dist/sap/base/i18n/date/TimezoneUtils.js +170 -18
  112. package/dist/sap/base/i18n/date/_EnumHelper.js +37 -0
  113. package/dist/sap/base/strings/camelize.js +1 -1
  114. package/dist/sap/base/strings/formatMessage.js +6 -1
  115. package/dist/sap/base/util/Properties.js +12 -0
  116. package/dist/sap/base/util/Version.js +19 -13
  117. package/dist/sap/base/util/_merge.js +1 -1
  118. package/dist/sap/base/util/array/uniqueSort.js +1 -1
  119. package/dist/sap/base/util/deepClone.js +2 -2
  120. package/dist/sap/base/util/deepEqual.js +1 -1
  121. package/dist/sap/base/util/deepExtend.js +60 -0
  122. package/dist/sap/base/util/extend.js +1 -1
  123. package/dist/sap/base/util/fetch.js +8 -0
  124. package/dist/sap/base/util/isEmptyObject.js +1 -1
  125. package/dist/sap/base/util/isPlainObject.js +1 -1
  126. package/dist/sap/base/util/merge.js +57 -0
  127. package/dist/sap/base/util/mixedFetch.js +3 -0
  128. package/dist/sap/base/util/now.js +7 -13
  129. package/dist/sap/base/util/uid.js +1 -1
  130. package/dist/sap/ui/Device.js +27 -0
  131. package/dist/sap/ui/Global.js +1 -0
  132. package/dist/sap/ui/VersionInfo.js +14 -0
  133. package/dist/sap/ui/base/DataType.js +63 -12
  134. package/dist/sap/ui/base/DesignTime.js +11 -0
  135. package/dist/sap/ui/base/EventProvider.js +21 -0
  136. package/dist/sap/ui/base/Metadata.js +45 -10
  137. package/dist/sap/ui/base/Object.js +2 -2
  138. package/dist/sap/ui/base/OwnStatics.js +6 -0
  139. package/dist/sap/ui/base/SyncPromise.js +98 -0
  140. package/dist/sap/ui/core/AnimationMode.js +42 -0
  141. package/dist/sap/ui/core/CalendarType.js +2 -2
  142. package/dist/sap/ui/core/ControlBehavior.js +11 -0
  143. package/dist/sap/ui/core/Lib.js +41 -0
  144. package/dist/sap/ui/core/Locale.js +9 -9
  145. package/dist/sap/ui/core/LocaleData.js +498 -333
  146. package/dist/sap/ui/core/Theming.js +25 -525
  147. package/dist/sap/ui/core/_UrlResolver.js +11 -0
  148. package/dist/sap/ui/core/date/Buddhist.js +2 -2
  149. package/dist/sap/ui/core/date/CalendarUtils.js +14 -12
  150. package/dist/sap/ui/core/date/CalendarWeekNumbering.js +2 -2
  151. package/dist/sap/ui/core/date/Gregorian.js +2 -2
  152. package/dist/sap/ui/core/date/Islamic.js +2 -2
  153. package/dist/sap/ui/core/date/Japanese.js +2 -2
  154. package/dist/sap/ui/core/date/Persian.js +2 -2
  155. package/dist/sap/ui/core/date/UI5Date.js +80 -32
  156. package/dist/sap/ui/core/date/UniversalDate.js +83 -101
  157. package/dist/sap/ui/core/format/DateFormat.js +70 -73
  158. package/dist/sap/ui/core/format/FormatUtils.js +30 -0
  159. package/dist/sap/ui/core/format/NumberFormat.js +3164 -0
  160. package/dist/sap/ui/core/format/TimezoneUtil.js +80 -11
  161. package/dist/sap/ui/core/getCompatibilityVersion.js +7 -0
  162. package/dist/sap/ui/core/theming/ThemeHelper.js +14 -0
  163. package/dist/sap/ui/security/Security.js +12 -0
  164. package/dist/sap/ui/util/XMLHelper.js +11 -0
  165. package/dist/sap/ui/util/_URL.js +1 -0
  166. package/dist/ui5loader-autoconfig.js +1 -0
  167. package/package-scripts.cjs +1 -1
  168. package/package.json +9 -11
  169. package/used-modules.txt +7 -1
@@ -1,5 +1,28 @@
1
1
  import type DateFormatT from "sap/ui/core/format/DateFormat";
2
+ import LocaleWrapped from "./Locale.js";
3
+ import type CalendarWeekNumbering from "sap/base/i18n/date/CalendarWeekNumbering";
4
+ import type CalendarType from "sap/base/i18n/date/CalendarType";
5
+ type DateFormatOptions = {
6
+ calendarWeekNumbering?: CalendarWeekNumbering | keyof typeof CalendarWeekNumbering;
7
+ firstDayOfWeek?: int;
8
+ minimalDaysInFirstWeek?: int;
9
+ format?: string;
10
+ pattern?: string;
11
+ style?: string;
12
+ strictParsing?: boolean;
13
+ relative?: boolean;
14
+ relativeRange?: int[];
15
+ relativeScale?: string;
16
+ relativeStyle?: string;
17
+ interval?: boolean;
18
+ intervalDelimiter?: string;
19
+ singleIntervalValue?: boolean;
20
+ UTC?: boolean;
21
+ calendarType?: CalendarType | keyof typeof CalendarType;
22
+ };
2
23
  declare const DateFormatWrapped: typeof DateFormatT;
3
24
  declare class DateFormat extends DateFormatWrapped {
25
+ static getDateInstance(oFormatOptions?: DateFormatOptions, oLocale?: LocaleWrapped): DateFormat;
26
+ static getDateInstance(oLocale?: LocaleWrapped): DateFormat;
4
27
  }
5
28
  export default DateFormat;
@@ -1,7 +1,23 @@
1
1
  // @ts-ignore
2
2
  import DateFormatNative from "./sap/ui/core/format/DateFormat.js";
3
+ import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js";
4
+ import LocaleWrapped from "./Locale.js";
3
5
  const DateFormatWrapped = DateFormatNative;
6
+ const _dateFormatCache = new Map();
4
7
  class DateFormat extends DateFormatWrapped {
8
+ static getDateInstance(oFormatOptionsOrLocale, oLocale) {
9
+ const locale = oLocale ?? new LocaleWrapped(getLocale().toString());
10
+ if (oFormatOptionsOrLocale instanceof LocaleWrapped) {
11
+ return DateFormatWrapped.getDateInstance(undefined, oFormatOptionsOrLocale);
12
+ }
13
+ const cacheKey = `${JSON.stringify(oFormatOptionsOrLocale ?? {})}__${String(locale)}`;
14
+ let instance = _dateFormatCache.get(cacheKey);
15
+ if (!instance) {
16
+ instance = DateFormatWrapped.getDateInstance(oFormatOptionsOrLocale, locale);
17
+ _dateFormatCache.set(cacheKey, instance);
18
+ }
19
+ return instance;
20
+ }
5
21
  }
6
22
  export default DateFormat;
7
23
  //# sourceMappingURL=DateFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateFormat.js","sourceRoot":"","sources":["../src/DateFormat.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAElE,MAAM,iBAAiB,GAAG,gBAAsC,CAAC;AACjE,MAAM,UAAW,SAAQ,iBAAiB;CAAG;AAE7C,eAAe,UAAU,CAAC","sourcesContent":["import type DateFormatT from \"sap/ui/core/format/DateFormat\";\n// @ts-ignore\nimport DateFormatNative from \"./sap/ui/core/format/DateFormat.js\";\n\nconst DateFormatWrapped = DateFormatNative as typeof DateFormatT;\nclass DateFormat extends DateFormatWrapped {}\n\nexport default DateFormat;\n"]}
1
+ {"version":3,"file":"DateFormat.js","sourceRoot":"","sources":["../src/DateFormat.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAClE,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,aAAa,MAAM,aAAa,CAAC;AAuBxC,MAAM,iBAAiB,GAAG,gBAAsC,CAAC;AAEjE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAsB,CAAC;AAEvD,MAAM,UAAW,SAAQ,iBAAiB;IAGzC,MAAM,CAAC,eAAe,CAAC,sBAA0D,EAAE,OAAuB;QACzG,MAAM,MAAM,GAAG,OAAO,IAAI,IAAI,aAAa,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEpE,IAAI,sBAAsB,YAAY,aAAa,EAAE,CAAC;YACrD,OAAO,iBAAiB,CAAC,eAAe,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;QAC7E,CAAC;QAED,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QACtF,IAAI,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,QAAQ,GAAG,iBAAiB,CAAC,eAAe,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;YAC7E,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AAED,eAAe,UAAU,CAAC","sourcesContent":["import type DateFormatT from \"sap/ui/core/format/DateFormat\";\n// @ts-ignore\nimport DateFormatNative from \"./sap/ui/core/format/DateFormat.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport LocaleWrapped from \"./Locale.js\";\nimport type CalendarWeekNumbering from \"sap/base/i18n/date/CalendarWeekNumbering\";\nimport type CalendarType from \"sap/base/i18n/date/CalendarType\";\n\ntype DateFormatOptions = {\n\tcalendarWeekNumbering?: CalendarWeekNumbering | keyof typeof CalendarWeekNumbering;\n\tfirstDayOfWeek?: int;\n\tminimalDaysInFirstWeek?: int;\n\tformat?: string;\n\tpattern?: string;\n\tstyle?: string;\n\tstrictParsing?: boolean;\n\trelative?: boolean;\n\trelativeRange?: int[];\n\trelativeScale?: string;\n\trelativeStyle?: string;\n\tinterval?: boolean;\n\tintervalDelimiter?: string;\n\tsingleIntervalValue?: boolean;\n\tUTC?: boolean;\n\tcalendarType?: CalendarType | keyof typeof CalendarType;\n};\n\nconst DateFormatWrapped = DateFormatNative as typeof DateFormatT;\n\nconst _dateFormatCache = new Map<string, DateFormat>();\n\nclass DateFormat extends DateFormatWrapped {\n\tstatic getDateInstance(oFormatOptions?: DateFormatOptions, oLocale?: LocaleWrapped): DateFormat;\n\tstatic getDateInstance(oLocale?: LocaleWrapped): DateFormat;\n\tstatic getDateInstance(oFormatOptionsOrLocale?: DateFormatOptions | LocaleWrapped, oLocale?: LocaleWrapped): DateFormat {\n\t\tconst locale = oLocale ?? new LocaleWrapped(getLocale().toString());\n\n\t\tif (oFormatOptionsOrLocale instanceof LocaleWrapped) {\n\t\t\treturn DateFormatWrapped.getDateInstance(undefined, oFormatOptionsOrLocale);\n\t\t}\n\n\t\tconst cacheKey = `${JSON.stringify(oFormatOptionsOrLocale ?? {})}__${String(locale)}`;\n\t\tlet instance = _dateFormatCache.get(cacheKey);\n\t\tif (!instance) {\n\t\t\tinstance = DateFormatWrapped.getDateInstance(oFormatOptionsOrLocale, locale);\n\t\t\t_dateFormatCache.set(cacheKey, instance);\n\t\t}\n\t\treturn instance;\n\t}\n}\n\nexport default DateFormat;\n"]}
@@ -0,0 +1,5 @@
1
+ import type LocaleOpenUI5T from "sap/ui/core/Locale";
2
+ declare const LocaleWrapped: typeof LocaleOpenUI5T;
3
+ declare class Locale extends LocaleWrapped {
4
+ }
5
+ export default Locale;
package/dist/Locale.js ADDED
@@ -0,0 +1,7 @@
1
+ // @ts-ignore
2
+ import LocaleNative from "./sap/ui/core/Locale.js";
3
+ const LocaleWrapped = LocaleNative;
4
+ class Locale extends LocaleWrapped {
5
+ }
6
+ export default Locale;
7
+ //# sourceMappingURL=Locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Locale.js","sourceRoot":"","sources":["../src/Locale.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,YAAY,MAAM,yBAAyB,CAAC;AAEnD,MAAM,aAAa,GAAG,YAAqC,CAAC;AAC5D,MAAM,MAAO,SAAQ,aAAa;CAAI;AAEtC,eAAe,MAAM,CAAC","sourcesContent":["import type LocaleOpenUI5T from \"sap/ui/core/Locale\";\n// @ts-ignore\nimport LocaleNative from \"./sap/ui/core/Locale.js\";\n\nconst LocaleWrapped = LocaleNative as typeof LocaleOpenUI5T;\nclass Locale extends LocaleWrapped { }\n\nexport default Locale;\n"]}
@@ -0,0 +1,5 @@
1
+ import type NumberFormatT from "sap/ui/core/format/NumberFormat";
2
+ declare const NumberFormatWrapped: typeof NumberFormatT;
3
+ declare class NumberFormat extends NumberFormatWrapped {
4
+ }
5
+ export default NumberFormat;
@@ -0,0 +1,7 @@
1
+ // @ts-ignore
2
+ import NumberFormatNative from "./sap/ui/core/format/NumberFormat.js";
3
+ const NumberFormatWrapped = NumberFormatNative;
4
+ class NumberFormat extends NumberFormatWrapped {
5
+ }
6
+ export default NumberFormat;
7
+ //# sourceMappingURL=NumberFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberFormat.js","sourceRoot":"","sources":["../src/NumberFormat.ts"],"names":[],"mappings":"AACA,aAAa;AACb,OAAO,kBAAkB,MAAM,sCAAsC,CAAC;AAEtE,MAAM,mBAAmB,GAAG,kBAA0C,CAAC;AACvE,MAAM,YAAa,SAAQ,mBAAmB;CAAG;AAEjD,eAAe,YAAY,CAAC","sourcesContent":["import type NumberFormatT from \"sap/ui/core/format/NumberFormat\";\n// @ts-ignore\nimport NumberFormatNative from \"./sap/ui/core/format/NumberFormat.js\";\n\nconst NumberFormatWrapped = NumberFormatNative as typeof NumberFormatT;\nclass NumberFormat extends NumberFormatWrapped {}\n\nexport default NumberFormat;\n"]}
@@ -10,7 +10,7 @@ import type CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.j
10
10
  * @returns {String}
11
11
  */
12
12
  declare const convertMonthNumbersToMonthNames: (firstMonth: number, lastMonth: number, calendarType?: `${CalendarType}`) => {
13
- text: any;
14
- textInfo: any;
13
+ text: string;
14
+ textInfo: string;
15
15
  };
16
16
  export default convertMonthNumbersToMonthNames;
@@ -1 +1 @@
1
- {"version":3,"file":"convertMonthNumbersToMonthNames.js","sourceRoot":"","sources":["../../src/dates/convertMonthNumbersToMonthNames.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kDAAkD,CAAC;AAEzE,OAAO,2BAA2B,MAAM,mCAAmC,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,+BAA+B,GAAG,CAAC,UAAkB,EAAE,SAAiB,EAAE,YAAgC,EAAE,EAAE;IACnH,MAAM,UAAU,GAAG,2BAA2B,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,UAAU,CAAC,mBAAmB,CAAC,aAAa,EAAE,YAAY,CAAkB,CAAC;IAC1G,MAAM,wBAAwB,GAAG,UAAU,CAAC,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAkB,CAAC;IAEvG,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;YACN,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,UAAU,CAAC;YACnE,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,UAAU,CAAC;SAChE,CAAC;IACH,CAAC;IAED,OAAO;QACN,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAClH,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;KAC9H,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["import getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getCachedLocaleDataInstance from \"../getCachedLocaleDataInstance.js\";\n\n/**\n * Convert month number to month name (text).\n * If the numbers of the two months are the same you will get the name of the month,\n * otherwise you will get the two names separated by a dash\n *\n * @param firstMonth CalendarDate Month\n * @param lastMonth CalendarDate Month\n * @param calendarType calendar type\n * @returns {String}\n */\nconst convertMonthNumbersToMonthNames = (firstMonth: number, lastMonth: number, calendarType?: `${CalendarType}`) => {\n\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\tconst pattern = localeData.getIntervalPattern(\"\");\n\tconst secondaryMonthsNames = localeData.getMonthsStandAlone(\"abbreviated\", calendarType) as Array<string>;\n\tconst secondaryMonthsNamesWide = localeData.getMonthsStandAlone(\"wide\", calendarType) as Array<string>;\n\n\tif (firstMonth === lastMonth) {\n\t\treturn {\n\t\t\ttext: localeData.getMonths(\"abbreviated\", calendarType)[firstMonth],\n\t\t\ttextInfo: localeData.getMonths(\"wide\", calendarType)[firstMonth],\n\t\t};\n\t}\n\n\treturn {\n\t\ttext: pattern.replace(/\\{0\\}/, secondaryMonthsNames[firstMonth]).replace(/\\{1\\}/, secondaryMonthsNames[lastMonth]),\n\t\ttextInfo: pattern.replace(/\\{0\\}/, secondaryMonthsNamesWide[firstMonth]).replace(/\\{1\\}/, secondaryMonthsNamesWide[lastMonth]),\n\t};\n};\n\nexport default convertMonthNumbersToMonthNames;\n"]}
1
+ {"version":3,"file":"convertMonthNumbersToMonthNames.js","sourceRoot":"","sources":["../../src/dates/convertMonthNumbersToMonthNames.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kDAAkD,CAAC;AAEzE,OAAO,2BAA2B,MAAM,mCAAmC,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,+BAA+B,GAAG,CAAC,UAAkB,EAAE,SAAiB,EAAE,YAAgC,EAAE,EAAE;IACnH,MAAM,UAAU,GAAG,2BAA2B,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,UAAU,CAAC,mBAAmB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IACzF,MAAM,wBAAwB,GAAG,UAAU,CAAC,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEtF,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;YACN,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,UAAU,CAAC;YACnE,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,UAAU,CAAC;SAChE,CAAC;IACH,CAAC;IAED,OAAO;QACN,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAClH,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;KAC9H,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["import getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport type CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getCachedLocaleDataInstance from \"../getCachedLocaleDataInstance.js\";\n\n/**\n * Convert month number to month name (text).\n * If the numbers of the two months are the same you will get the name of the month,\n * otherwise you will get the two names separated by a dash\n *\n * @param firstMonth CalendarDate Month\n * @param lastMonth CalendarDate Month\n * @param calendarType calendar type\n * @returns {String}\n */\nconst convertMonthNumbersToMonthNames = (firstMonth: number, lastMonth: number, calendarType?: `${CalendarType}`) => {\n\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\tconst pattern = localeData.getIntervalPattern(\"\");\n\tconst secondaryMonthsNames = localeData.getMonthsStandAlone(\"abbreviated\", calendarType);\n\tconst secondaryMonthsNamesWide = localeData.getMonthsStandAlone(\"wide\", calendarType);\n\n\tif (firstMonth === lastMonth) {\n\t\treturn {\n\t\t\ttext: localeData.getMonths(\"abbreviated\", calendarType)[firstMonth],\n\t\t\ttextInfo: localeData.getMonths(\"wide\", calendarType)[firstMonth],\n\t\t};\n\t}\n\n\treturn {\n\t\ttext: pattern.replace(/\\{0\\}/, secondaryMonthsNames[firstMonth]).replace(/\\{1\\}/, secondaryMonthsNames[lastMonth]),\n\t\ttextInfo: pattern.replace(/\\{0\\}/, secondaryMonthsNamesWide[firstMonth]).replace(/\\{1\\}/, secondaryMonthsNamesWide[lastMonth]),\n\t};\n};\n\nexport default convertMonthNumbersToMonthNames;\n"]}
@@ -1,27 +1,39 @@
1
- Copyright © 1991-2023 Unicode, Inc. All rights reserved.
2
- Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
1
+ UNICODE LICENSE V3
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of the
5
- Unicode data files and any associated documentation (the "Data Files") or Unicode
6
- software and any associated documentation (the "Software") to deal in the Data Files
7
- or Software without restriction, including without limitation the rights to use, copy,
8
- modify, merge, publish, distribute, and/or sell copies of the Data Files or Software,
9
- and to permit persons to whom the Data Files or Software are furnished to do so,
10
- provided that (a) the above copyright notice(s) and this permission notice appear
11
- with all copies of the Data Files or Software, (b) both the above copyright notice(s)
12
- and this permission notice appear in associated documentation, and (c) there is clear
13
- notice in each modified Data File or in the Software as well as in the documentation
14
- associated with the Data File(s) or Software that the data or software has been modified.
3
+ COPYRIGHT AND PERMISSION NOTICE
15
4
 
16
- THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL
19
- THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM,
20
- OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
21
- FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
23
- OF THE DATA FILES OR SOFTWARE.
5
+ Copyright © 1991-2024 Unicode, Inc.
24
6
 
25
- Except as contained in this notice, the name of a copyright holder shall not be used in
26
- advertising or otherwise to promote the sale, use or other dealings in these Data Files
27
- or Software without prior written authorization of the copyright holder.
7
+ NOTICE TO USER: Carefully read the following legal agreement. BY
8
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
9
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
10
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
11
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a
14
+ copy of data files and any associated documentation (the "Data Files") or
15
+ software and any associated documentation (the "Software") to deal in the
16
+ Data Files or Software without restriction, including without limitation
17
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
18
+ copies of the Data Files or Software, and to permit persons to whom the
19
+ Data Files or Software are furnished to do so, provided that either (a)
20
+ this copyright and permission notice appear with all copies of the Data
21
+ Files or Software, or (b) this copyright and permission notice appear in
22
+ associated Documentation.
23
+
24
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
25
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
27
+ THIRD PARTY RIGHTS.
28
+
29
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
30
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
31
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
32
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
33
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
34
+ FILES OR SOFTWARE.
35
+
36
+ Except as contained in this notice, the name of a copyright holder shall
37
+ not be used in advertising or otherwise to promote the sale, use or other
38
+ dealings in these Data Files or Software without prior written
39
+ authorization of the copyright holder.