@ui5/webcomponents-localization 2.20.1 → 2.20.3

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 (165) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/DateFormat.d.ts +23 -0
  4. package/dist/DateFormat.js +9 -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/dates/convertMonthNumbersToMonthNames.d.ts +2 -2
  10. package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -1
  11. package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +36 -24
  12. package/dist/generated/assets/cldr/ar.json +624 -354
  13. package/dist/generated/assets/cldr/ar_EG.json +624 -354
  14. package/dist/generated/assets/cldr/ar_SA.json +625 -355
  15. package/dist/generated/assets/cldr/bg.json +339 -215
  16. package/dist/generated/assets/cldr/ca.json +633 -509
  17. package/dist/generated/assets/cldr/cnr.json +960 -653
  18. package/dist/generated/assets/cldr/cs.json +343 -531
  19. package/dist/generated/assets/cldr/cy.json +684 -1050
  20. package/dist/generated/assets/cldr/da.json +354 -231
  21. package/dist/generated/assets/cldr/de.json +458 -330
  22. package/dist/generated/assets/cldr/de_AT.json +459 -331
  23. package/dist/generated/assets/cldr/de_CH.json +522 -386
  24. package/dist/generated/assets/cldr/el.json +317 -152
  25. package/dist/generated/assets/cldr/el_CY.json +317 -152
  26. package/dist/generated/assets/cldr/en.json +606 -253
  27. package/dist/generated/assets/cldr/en_AU.json +830 -376
  28. package/dist/generated/assets/cldr/en_GB.json +696 -251
  29. package/dist/generated/assets/cldr/en_HK.json +544 -203
  30. package/dist/generated/assets/cldr/en_IE.json +533 -192
  31. package/dist/generated/assets/cldr/en_IN.json +820 -296
  32. package/dist/generated/assets/cldr/en_NZ.json +534 -193
  33. package/dist/generated/assets/cldr/en_PG.json +509 -168
  34. package/dist/generated/assets/cldr/en_SG.json +526 -185
  35. package/dist/generated/assets/cldr/en_ZA.json +529 -186
  36. package/dist/generated/assets/cldr/es.json +355 -230
  37. package/dist/generated/assets/cldr/es_AR.json +444 -288
  38. package/dist/generated/assets/cldr/es_BO.json +419 -264
  39. package/dist/generated/assets/cldr/es_CL.json +455 -300
  40. package/dist/generated/assets/cldr/es_CO.json +412 -257
  41. package/dist/generated/assets/cldr/es_MX.json +515 -352
  42. package/dist/generated/assets/cldr/es_PE.json +397 -234
  43. package/dist/generated/assets/cldr/es_UY.json +424 -269
  44. package/dist/generated/assets/cldr/es_VE.json +398 -243
  45. package/dist/generated/assets/cldr/et.json +390 -233
  46. package/dist/generated/assets/cldr/fa.json +510 -271
  47. package/dist/generated/assets/cldr/fi.json +497 -251
  48. package/dist/generated/assets/cldr/fr.json +339 -106
  49. package/dist/generated/assets/cldr/fr_BE.json +341 -108
  50. package/dist/generated/assets/cldr/fr_CA.json +652 -397
  51. package/dist/generated/assets/cldr/fr_CH.json +342 -109
  52. package/dist/generated/assets/cldr/fr_LU.json +339 -106
  53. package/dist/generated/assets/cldr/he.json +726 -904
  54. package/dist/generated/assets/cldr/hi.json +529 -288
  55. package/dist/generated/assets/cldr/hr.json +392 -383
  56. package/dist/generated/assets/cldr/hu.json +459 -335
  57. package/dist/generated/assets/cldr/id.json +379 -128
  58. package/dist/generated/assets/cldr/it.json +420 -301
  59. package/dist/generated/assets/cldr/it_CH.json +426 -307
  60. package/dist/generated/assets/cldr/ja.json +332 -74
  61. package/dist/generated/assets/cldr/kk.json +540 -240
  62. package/dist/generated/assets/cldr/ko.json +371 -115
  63. package/dist/generated/assets/cldr/lt.json +428 -545
  64. package/dist/generated/assets/cldr/lv.json +415 -413
  65. package/dist/generated/assets/cldr/mk.json +691 -559
  66. package/dist/generated/assets/cldr/ms.json +395 -136
  67. package/dist/generated/assets/cldr/nb.json +355 -234
  68. package/dist/generated/assets/cldr/nl.json +357 -251
  69. package/dist/generated/assets/cldr/nl_BE.json +428 -322
  70. package/dist/generated/assets/cldr/pl.json +333 -459
  71. package/dist/generated/assets/cldr/pt.json +419 -298
  72. package/dist/generated/assets/cldr/pt_PT.json +362 -231
  73. package/dist/generated/assets/cldr/ro.json +369 -397
  74. package/dist/generated/assets/cldr/ru.json +599 -368
  75. package/dist/generated/assets/cldr/ru_UA.json +598 -367
  76. package/dist/generated/assets/cldr/sk.json +343 -517
  77. package/dist/generated/assets/cldr/sl.json +477 -640
  78. package/dist/generated/assets/cldr/sr.json +478 -531
  79. package/dist/generated/assets/cldr/sr_Latn.json +631 -684
  80. package/dist/generated/assets/cldr/sv.json +395 -258
  81. package/dist/generated/assets/cldr/th.json +452 -199
  82. package/dist/generated/assets/cldr/tr.json +391 -238
  83. package/dist/generated/assets/cldr/uk.json +696 -342
  84. package/dist/generated/assets/cldr/vi.json +836 -487
  85. package/dist/generated/assets/cldr/zh_CN.json +358 -104
  86. package/dist/generated/assets/cldr/zh_HK.json +366 -113
  87. package/dist/generated/assets/cldr/zh_SG.json +371 -118
  88. package/dist/generated/assets/cldr/zh_TW.json +480 -238
  89. package/dist/getCachedLocaleDataInstance.js +2 -0
  90. package/dist/getCachedLocaleDataInstance.js.map +1 -1
  91. package/dist/locale/getLocaleData.js +2 -0
  92. package/dist/locale/getLocaleData.js.map +1 -1
  93. package/dist/sap/base/Event.js +2 -2
  94. package/dist/sap/base/Eventing.js +4 -3
  95. package/dist/sap/base/assert.js +1 -1
  96. package/dist/sap/base/config/MemoryConfigurationProvider.js +1 -1
  97. package/dist/sap/base/future.js +12 -0
  98. package/dist/sap/base/i18n/Formatting.d.ts +5 -0
  99. package/dist/sap/base/i18n/Formatting.js +7 -0
  100. package/dist/sap/base/i18n/Formatting.js.map +1 -1
  101. package/dist/sap/base/i18n/LanguageTag.js +18 -12
  102. package/dist/sap/base/i18n/Localization.d.ts +3 -0
  103. package/dist/sap/base/i18n/Localization.js +5 -0
  104. package/dist/sap/base/i18n/Localization.js.map +1 -1
  105. package/dist/sap/base/i18n/ResourceBundle.js +20 -0
  106. package/dist/sap/base/i18n/date/CalendarType.js +9 -8
  107. package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +9 -8
  108. package/dist/sap/base/i18n/date/TimezoneUtils.js +170 -18
  109. package/dist/sap/base/i18n/date/_EnumHelper.js +37 -0
  110. package/dist/sap/base/strings/camelize.js +1 -1
  111. package/dist/sap/base/strings/formatMessage.js +6 -1
  112. package/dist/sap/base/util/Properties.js +12 -0
  113. package/dist/sap/base/util/Version.js +19 -13
  114. package/dist/sap/base/util/_merge.js +1 -1
  115. package/dist/sap/base/util/array/uniqueSort.js +1 -1
  116. package/dist/sap/base/util/deepClone.js +2 -2
  117. package/dist/sap/base/util/deepEqual.js +1 -1
  118. package/dist/sap/base/util/deepExtend.js +60 -0
  119. package/dist/sap/base/util/extend.js +1 -1
  120. package/dist/sap/base/util/fetch.js +8 -0
  121. package/dist/sap/base/util/isEmptyObject.js +1 -1
  122. package/dist/sap/base/util/isPlainObject.js +1 -1
  123. package/dist/sap/base/util/merge.js +57 -0
  124. package/dist/sap/base/util/mixedFetch.js +3 -0
  125. package/dist/sap/base/util/now.js +7 -13
  126. package/dist/sap/base/util/uid.js +1 -1
  127. package/dist/sap/ui/Device.js +27 -0
  128. package/dist/sap/ui/Global.js +1 -0
  129. package/dist/sap/ui/VersionInfo.js +14 -0
  130. package/dist/sap/ui/base/DataType.js +63 -12
  131. package/dist/sap/ui/base/DesignTime.js +11 -0
  132. package/dist/sap/ui/base/EventProvider.js +21 -0
  133. package/dist/sap/ui/base/Metadata.js +45 -10
  134. package/dist/sap/ui/base/Object.js +2 -2
  135. package/dist/sap/ui/base/OwnStatics.js +6 -0
  136. package/dist/sap/ui/base/SyncPromise.js +98 -0
  137. package/dist/sap/ui/core/AnimationMode.js +42 -0
  138. package/dist/sap/ui/core/CalendarType.js +2 -2
  139. package/dist/sap/ui/core/ControlBehavior.js +11 -0
  140. package/dist/sap/ui/core/Lib.js +41 -0
  141. package/dist/sap/ui/core/Locale.js +9 -9
  142. package/dist/sap/ui/core/LocaleData.js +498 -333
  143. package/dist/sap/ui/core/Theming.js +25 -525
  144. package/dist/sap/ui/core/_UrlResolver.js +11 -0
  145. package/dist/sap/ui/core/date/Buddhist.js +2 -2
  146. package/dist/sap/ui/core/date/CalendarUtils.js +14 -12
  147. package/dist/sap/ui/core/date/CalendarWeekNumbering.js +2 -2
  148. package/dist/sap/ui/core/date/Gregorian.js +2 -2
  149. package/dist/sap/ui/core/date/Islamic.js +2 -2
  150. package/dist/sap/ui/core/date/Japanese.js +2 -2
  151. package/dist/sap/ui/core/date/Persian.js +2 -2
  152. package/dist/sap/ui/core/date/UI5Date.js +80 -32
  153. package/dist/sap/ui/core/date/UniversalDate.js +83 -101
  154. package/dist/sap/ui/core/format/DateFormat.js +70 -73
  155. package/dist/sap/ui/core/format/FormatUtils.js +30 -0
  156. package/dist/sap/ui/core/format/NumberFormat.js +917 -588
  157. package/dist/sap/ui/core/format/TimezoneUtil.js +80 -11
  158. package/dist/sap/ui/core/getCompatibilityVersion.js +7 -0
  159. package/dist/sap/ui/core/theming/ThemeHelper.js +14 -0
  160. package/dist/sap/ui/security/Security.js +12 -0
  161. package/dist/sap/ui/util/XMLHelper.js +11 -0
  162. package/dist/sap/ui/util/_URL.js +1 -0
  163. package/dist/ui5loader-autoconfig.js +1 -0
  164. package/package.json +6 -6
  165. package/used-modules.txt +5 -0
@@ -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,16 @@
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;
4
6
  class DateFormat extends DateFormatWrapped {
7
+ static getDateInstance(oFormatOptionsOrLocale, oLocale) {
8
+ if (oFormatOptionsOrLocale instanceof LocaleWrapped) {
9
+ return DateFormatWrapped.getDateInstance(undefined, oFormatOptionsOrLocale);
10
+ }
11
+ const nativeLocale = oLocale ?? new LocaleWrapped(getLocale().toString());
12
+ return DateFormatWrapped.getDateInstance(oFormatOptionsOrLocale, nativeLocale);
13
+ }
5
14
  }
6
15
  export default DateFormat;
7
16
  //# 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,UAAW,SAAQ,iBAAiB;IAGzC,MAAM,CAAC,eAAe,CAAC,sBAA0D,EAAE,OAAuB;QACzG,IAAI,sBAAsB,YAAY,aAAa,EAAE,CAAC;YACrD,OAAO,iBAAiB,CAAC,eAAe,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,YAAY,GAAG,OAAO,IAAI,IAAI,aAAa,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1E,OAAO,iBAAiB,CAAC,eAAe,CAAC,sBAAsB,EAAE,YAAY,CAAC,CAAC;IAChF,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\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\tif (oFormatOptionsOrLocale instanceof LocaleWrapped) {\n\t\t\treturn DateFormatWrapped.getDateInstance(undefined, oFormatOptionsOrLocale);\n\t\t}\n\t\tconst nativeLocale = oLocale ?? new LocaleWrapped(getLocale().toString());\n\t\treturn DateFormatWrapped.getDateInstance(oFormatOptionsOrLocale, nativeLocale);\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"]}
@@ -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.