@ui5/webcomponents-localization 0.0.0-0fcda382e → 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.
- package/.eslintignore +2 -0
- package/.npsrc.json +3 -0
- package/CHANGELOG.md +2427 -0
- package/LICENSE.txt +201 -0
- package/README.md +38 -10
- package/dist/.tsbuildinfo +1 -0
- package/dist/Assets-fetch.d.ts +1 -0
- package/dist/Assets-fetch.js +3 -0
- package/dist/Assets-fetch.js.map +1 -0
- package/dist/Assets-node.d.ts +11 -0
- package/dist/Assets-node.js +12 -0
- package/dist/Assets-node.js.map +1 -0
- package/dist/Assets.d.ts +1 -0
- package/dist/Assets.js +1 -0
- package/dist/Assets.js.map +1 -0
- package/dist/CalendarUtils.d.ts +3 -0
- package/dist/CalendarUtils.js +6 -0
- package/dist/CalendarUtils.js.map +1 -0
- package/dist/DateFormat.d.ts +28 -0
- package/dist/DateFormat.js +22 -2
- package/dist/DateFormat.js.map +1 -0
- package/dist/Locale.d.ts +5 -0
- package/dist/Locale.js +7 -0
- package/dist/Locale.js.map +1 -0
- package/dist/LocaleData.d.ts +5 -0
- package/dist/LocaleData.js +6 -2
- package/dist/LocaleData.js.map +1 -0
- package/dist/NumberFormat.d.ts +5 -0
- package/dist/NumberFormat.js +7 -0
- package/dist/NumberFormat.js.map +1 -0
- package/dist/dates/CalendarDate.d.ts +42 -0
- package/dist/dates/CalendarDate.js +171 -181
- package/dist/dates/CalendarDate.js.map +1 -0
- package/dist/dates/ExtremeDates.d.ts +5 -0
- package/dist/dates/ExtremeDates.js +29 -0
- package/dist/dates/ExtremeDates.js.map +1 -0
- package/dist/dates/UI5Date.d.ts +5 -0
- package/dist/dates/UI5Date.js +7 -0
- package/dist/dates/UI5Date.js.map +1 -0
- package/dist/dates/UniversalDate.d.ts +47 -0
- package/dist/dates/UniversalDate.js +5 -0
- package/dist/dates/UniversalDate.js.map +1 -0
- package/dist/dates/convertMonthNumbersToMonthNames.d.ts +16 -0
- package/dist/dates/convertMonthNumbersToMonthNames.js +30 -0
- package/dist/dates/convertMonthNumbersToMonthNames.js.map +1 -0
- package/dist/dates/getDaysInMonth.d.ts +3 -0
- package/dist/dates/getDaysInMonth.js +10 -0
- package/dist/dates/getDaysInMonth.js.map +1 -0
- package/dist/dates/getRoundedTimestamp.d.ts +7 -0
- package/dist/dates/getRoundedTimestamp.js +15 -0
- package/dist/dates/getRoundedTimestamp.js.map +1 -0
- package/dist/dates/getTodayUTCTimestamp.d.ts +7 -0
- package/dist/dates/getTodayUTCTimestamp.js +9 -0
- package/dist/dates/getTodayUTCTimestamp.js.map +1 -0
- package/dist/dates/modifyDateBy.d.ts +14 -0
- package/dist/dates/modifyDateBy.js +55 -0
- package/dist/dates/modifyDateBy.js.map +1 -0
- package/dist/dates/transformDateToSecondaryType.d.ts +7 -0
- package/dist/dates/transformDateToSecondaryType.js +18 -0
- package/dist/dates/transformDateToSecondaryType.js.map +1 -0
- package/dist/features/calendar/Buddhist.js +1 -0
- package/dist/features/calendar/Buddhist.js.map +1 -0
- package/dist/features/calendar/Gregorian.js +1 -0
- package/dist/features/calendar/Gregorian.js.map +1 -0
- package/dist/features/calendar/Islamic.js +1 -0
- package/dist/features/calendar/Islamic.js.map +1 -0
- package/dist/features/calendar/Japanese.js +1 -0
- package/dist/features/calendar/Japanese.js.map +1 -0
- package/dist/features/calendar/Persian.js +1 -0
- package/dist/features/calendar/Persian.js.map +1 -0
- package/dist/generated/assets/cldr/Unicode-Data-Files-LICENSE.txt +39 -0
- package/dist/generated/assets/cldr/ar.json +2179 -728
- package/dist/generated/assets/cldr/ar_EG.json +2179 -728
- package/dist/generated/assets/cldr/ar_SA.json +2275 -825
- package/dist/generated/assets/cldr/bg.json +1924 -798
- package/dist/generated/assets/cldr/ca.json +2027 -816
- package/dist/generated/assets/cldr/cnr.json +6476 -0
- package/dist/generated/assets/cldr/cs.json +1865 -842
- package/dist/generated/assets/cldr/cy.json +6566 -0
- package/dist/generated/assets/cldr/da.json +1844 -682
- package/dist/generated/assets/cldr/de.json +1806 -546
- package/dist/generated/assets/cldr/de_AT.json +1797 -537
- package/dist/generated/assets/cldr/de_CH.json +1879 -611
- package/dist/generated/assets/cldr/el.json +1497 -383
- package/dist/generated/assets/cldr/el_CY.json +1497 -383
- package/dist/generated/assets/cldr/en.json +1990 -563
- package/dist/generated/assets/cldr/en_AU.json +2339 -763
- package/dist/generated/assets/cldr/en_GB.json +2170 -621
- package/dist/generated/assets/cldr/en_HK.json +2076 -628
- package/dist/generated/assets/cldr/en_IE.json +2038 -593
- package/dist/generated/assets/cldr/en_IN.json +2336 -704
- package/dist/generated/assets/cldr/en_NZ.json +2056 -611
- package/dist/generated/assets/cldr/en_PG.json +2049 -604
- package/dist/generated/assets/cldr/en_SG.json +2041 -593
- package/dist/generated/assets/cldr/en_ZA.json +2046 -599
- package/dist/generated/assets/cldr/es.json +2197 -881
- package/dist/generated/assets/cldr/es_AR.json +2167 -819
- package/dist/generated/assets/cldr/es_BO.json +2210 -863
- package/dist/generated/assets/cldr/es_CL.json +2087 -848
- package/dist/generated/assets/cldr/es_CO.json +1947 -707
- package/dist/generated/assets/cldr/es_MX.json +2446 -1091
- package/dist/generated/assets/cldr/es_PE.json +1912 -773
- package/dist/generated/assets/cldr/es_UY.json +1926 -795
- package/dist/generated/assets/cldr/es_VE.json +1920 -789
- package/dist/generated/assets/cldr/et.json +1761 -544
- package/dist/generated/assets/cldr/fa.json +1872 -566
- package/dist/generated/assets/cldr/fi.json +1959 -526
- package/dist/generated/assets/cldr/fr.json +1711 -460
- package/dist/generated/assets/cldr/fr_BE.json +1710 -459
- package/dist/generated/assets/cldr/fr_CA.json +2087 -814
- package/dist/generated/assets/cldr/fr_CH.json +1669 -418
- package/dist/generated/assets/cldr/fr_LU.json +1711 -460
- package/dist/generated/assets/cldr/he.json +2018 -1033
- package/dist/generated/assets/cldr/hi.json +1619 -348
- package/dist/generated/assets/cldr/hr.json +1855 -569
- package/dist/generated/assets/cldr/hu.json +1764 -551
- package/dist/generated/assets/cldr/id.json +1924 -601
- package/dist/generated/assets/cldr/it.json +1821 -666
- package/dist/generated/assets/cldr/it_CH.json +1827 -672
- package/dist/generated/assets/cldr/ja.json +1426 -109
- package/dist/generated/assets/cldr/kk.json +2251 -737
- package/dist/generated/assets/cldr/ko.json +1484 -196
- package/dist/generated/assets/cldr/lt.json +1714 -734
- package/dist/generated/assets/cldr/lv.json +1686 -682
- package/dist/generated/assets/cldr/mk.json +6177 -0
- package/dist/generated/assets/cldr/ms.json +1903 -595
- package/dist/generated/assets/cldr/nb.json +1548 -369
- package/dist/generated/assets/cldr/nl.json +1935 -511
- package/dist/generated/assets/cldr/nl_BE.json +1955 -531
- package/dist/generated/assets/cldr/pl.json +1873 -586
- package/dist/generated/assets/cldr/pt.json +2184 -753
- package/dist/generated/assets/cldr/pt_PT.json +2149 -778
- package/dist/generated/assets/cldr/ro.json +1847 -765
- package/dist/generated/assets/cldr/ru.json +2082 -755
- package/dist/generated/assets/cldr/ru_UA.json +2076 -749
- package/dist/generated/assets/cldr/sk.json +1860 -972
- package/dist/generated/assets/cldr/sl.json +1861 -920
- package/dist/generated/assets/cldr/sr.json +1829 -767
- package/dist/generated/assets/cldr/sr_Latn.json +6173 -0
- package/dist/generated/assets/cldr/sv.json +1789 -587
- package/dist/generated/assets/cldr/th.json +1704 -373
- package/dist/generated/assets/cldr/tr.json +1855 -587
- package/dist/generated/assets/cldr/uk.json +2166 -711
- package/dist/generated/assets/cldr/vi.json +2054 -709
- package/dist/generated/assets/cldr/zh_CN.json +1736 -397
- package/dist/generated/assets/cldr/zh_HK.json +1713 -374
- package/dist/generated/assets/cldr/zh_SG.json +1723 -384
- package/dist/generated/assets/cldr/zh_TW.json +1678 -371
- package/dist/generated/json-imports/LocaleData-fetch.d.ts +1 -0
- package/dist/generated/json-imports/LocaleData-fetch.js +93 -0
- package/dist/generated/json-imports/LocaleData-fetch.js.map +1 -0
- package/dist/generated/json-imports/LocaleData-node.d.ts +1 -0
- package/dist/generated/json-imports/LocaleData-node.js +93 -0
- package/dist/generated/json-imports/LocaleData-node.js.map +1 -0
- package/dist/generated/json-imports/LocaleData.d.ts +1 -0
- package/dist/generated/json-imports/LocaleData.js +92 -95
- package/dist/generated/json-imports/LocaleData.js.map +1 -0
- package/dist/getCachedLocaleDataInstance.d.ts +4 -0
- package/dist/getCachedLocaleDataInstance.js +12 -0
- package/dist/getCachedLocaleDataInstance.js.map +1 -0
- package/dist/locale/getLocaleData.d.ts +11 -0
- package/dist/locale/getLocaleData.js +15 -17
- package/dist/locale/getLocaleData.js.map +1 -0
- package/dist/sap/base/Event.js +59 -0
- package/dist/sap/base/Eventing.js +147 -0
- package/dist/sap/base/Log.js +2 -248
- package/dist/sap/base/assert.js +31 -9
- package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
- package/dist/sap/base/config.js +17 -0
- package/dist/sap/base/future.js +12 -0
- package/dist/sap/base/i18n/Formatting.d.ts +13 -0
- package/dist/sap/base/i18n/Formatting.js +18 -0
- package/dist/sap/base/i18n/Formatting.js.map +1 -0
- package/dist/sap/base/i18n/LanguageTag.js +179 -0
- package/dist/sap/base/i18n/Localization.d.ts +7 -0
- package/dist/sap/base/i18n/Localization.js +17 -0
- package/dist/sap/base/i18n/Localization.js.map +1 -0
- package/dist/sap/base/i18n/ResourceBundle.js +20 -0
- package/dist/sap/base/i18n/date/CalendarType.js +44 -0
- package/dist/sap/base/i18n/date/CalendarWeekNumbering.js +106 -0
- package/dist/sap/base/i18n/date/TimezoneUtils.js +471 -0
- package/dist/sap/base/i18n/date/_EnumHelper.js +37 -0
- package/dist/sap/base/strings/camelize.js +30 -0
- package/dist/sap/base/strings/formatMessage.js +93 -15
- package/dist/sap/base/util/LoaderExtensions.d.ts +4 -0
- package/dist/sap/base/util/LoaderExtensions.js +11 -4
- package/dist/sap/base/util/LoaderExtensions.js.map +1 -0
- package/dist/sap/base/util/ObjectPath.d.ts +4 -0
- package/dist/sap/base/util/ObjectPath.js +4 -33
- package/dist/sap/base/util/ObjectPath.js.map +1 -0
- package/dist/sap/base/util/Properties.js +12 -0
- package/dist/sap/base/util/Version.js +163 -0
- package/dist/sap/base/util/_merge.js +83 -26
- package/dist/sap/base/util/array/uniqueSort.js +37 -15
- package/dist/sap/base/util/deepClone.js +102 -0
- package/dist/sap/base/util/deepEqual.js +75 -55
- package/dist/sap/base/util/deepExtend.js +60 -0
- package/dist/sap/base/util/extend.js +58 -7
- package/dist/sap/base/util/fetch.js +8 -0
- package/dist/sap/base/util/isEmptyObject.js +34 -0
- package/dist/sap/base/util/isPlainObject.js +35 -1
- package/dist/sap/base/util/merge.js +57 -0
- package/dist/sap/base/util/mixedFetch.js +3 -0
- package/dist/sap/base/util/now.js +22 -7
- package/dist/sap/base/util/resolveReference.js +3 -0
- package/dist/sap/base/util/uid.js +27 -0
- package/dist/sap/ui/Device.js +25 -3
- package/dist/sap/ui/Global.js +1 -0
- package/dist/sap/ui/VersionInfo.js +14 -0
- package/dist/sap/ui/base/DataType.js +708 -0
- package/dist/sap/ui/base/DesignTime.js +11 -0
- package/dist/sap/ui/base/EventProvider.js +21 -0
- package/dist/sap/ui/base/Interface.js +50 -6
- package/dist/sap/ui/base/Metadata.js +470 -173
- package/dist/sap/ui/base/Object.js +287 -27
- package/dist/sap/ui/base/OwnStatics.js +6 -0
- package/dist/sap/ui/base/SyncPromise.js +98 -0
- package/dist/sap/ui/core/AnimationMode.js +42 -0
- package/dist/sap/ui/core/CalendarType.js +24 -8
- package/dist/sap/ui/core/Configuration.d.ts +17 -0
- package/dist/sap/ui/core/Configuration.js +23 -0
- package/dist/sap/ui/core/Configuration.js.map +1 -0
- package/dist/sap/ui/core/ControlBehavior.js +11 -0
- package/dist/sap/ui/core/Core.d.ts +25 -0
- package/dist/sap/ui/core/Core.js +7 -32
- package/dist/sap/ui/core/Core.js.map +1 -0
- package/dist/sap/ui/core/FormatSettings.d.ts +9 -0
- package/dist/sap/ui/core/FormatSettings.js +12 -0
- package/dist/sap/ui/core/FormatSettings.js.map +1 -0
- package/dist/sap/ui/core/Lib.js +41 -0
- package/dist/sap/ui/core/Locale.js +190 -116
- package/dist/sap/ui/core/LocaleData.js +2837 -2683
- package/dist/sap/ui/core/Supportability.js +5 -0
- package/dist/sap/ui/core/Theming.js +39 -0
- package/dist/sap/ui/core/_UrlResolver.js +11 -0
- package/dist/sap/ui/core/date/Buddhist.js +162 -93
- package/dist/sap/ui/core/date/CalendarUtils.js +67 -0
- package/dist/sap/ui/core/date/CalendarWeekNumbering.js +30 -0
- package/dist/sap/ui/core/date/Gregorian.js +25 -10
- package/dist/sap/ui/core/date/Islamic.js +298 -185
- package/dist/sap/ui/core/date/Japanese.js +212 -117
- package/dist/sap/ui/core/date/Persian.js +324 -195
- package/dist/sap/ui/core/date/UI5Date.js +1039 -0
- package/dist/sap/ui/core/date/UniversalDate.js +1241 -217
- package/dist/sap/ui/core/date/_Calendars.js +10 -1
- package/dist/sap/ui/core/format/DateFormat.js +3160 -1781
- package/dist/sap/ui/core/format/FormatUtils.js +30 -0
- package/dist/sap/ui/core/format/NumberFormat.js +3164 -0
- package/dist/sap/ui/core/format/TimezoneUtil.js +93 -0
- package/dist/sap/ui/core/getCompatibilityVersion.js +7 -0
- package/dist/sap/ui/core/theming/ThemeHelper.js +14 -0
- package/dist/sap/ui/security/Security.js +12 -0
- package/dist/sap/ui/util/XMLHelper.js +11 -0
- package/dist/sap/ui/util/_URL.js +1 -0
- package/dist/ui5loader-autoconfig.js +1 -0
- package/package-scripts.cjs +35 -0
- package/package.json +27 -21
- package/tsconfig.json +24 -0
- package/used-modules.txt +33 -1
- package/dist/dates/calculateWeekNumber.js +0 -51
- package/package-scripts.js +0 -31
- package/src/Assets.js +0 -2
- package/src/DateFormat.js +0 -3
- package/src/LocaleData.js +0 -3
- package/src/dates/CalendarDate.js +0 -203
- package/src/dates/calculateWeekNumber.js +0 -51
- package/src/locale/getLocaleData.js +0 -27
- package/src/sap/base/util/LoaderExtensions.js +0 -7
- package/src/sap/ui/core/Core.js +0 -38
- /package/{config/.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/{src/features/calendar/Buddhist.js → dist/features/calendar/Buddhist.d.ts} +0 -0
- /package/{src/features/calendar/Gregorian.js → dist/features/calendar/Gregorian.d.ts} +0 -0
- /package/{src/features/calendar/Islamic.js → dist/features/calendar/Islamic.d.ts} +0 -0
- /package/{src/features/calendar/Japanese.js → dist/features/calendar/Japanese.d.ts} +0 -0
- /package/{src/features/calendar/Persian.js → dist/features/calendar/Persian.d.ts} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
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 _merge from "./_merge.js";
|
|
7
|
+
/**
|
|
8
|
+
* Performs object extension by merging source objects into a target object. Copies are always deep.
|
|
9
|
+
*
|
|
10
|
+
* If during merging a key in the target object exists it is overwritten with the source object's value.
|
|
11
|
+
* Usage is the same as <code>jQuery.extend(true, ...)</code>.
|
|
12
|
+
* Values that are <code>undefined</code> are ignored.
|
|
13
|
+
*
|
|
14
|
+
* For shallow copies, you may use {@link module:sap/base/util/extend sap/base/util/extend} or
|
|
15
|
+
* <code>Object.assign</code>, but note that <code>Object.assign</code> only copies enumerable and own
|
|
16
|
+
* properties and doesn't copy properties on the prototype and non-enumerable properties.
|
|
17
|
+
* Also, values that are <code>undefined</code> are NOT ignored.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* var oResult = deepExtend({}, {
|
|
21
|
+
* prop1: {
|
|
22
|
+
* prop1a: "1a"
|
|
23
|
+
* }
|
|
24
|
+
* }, {
|
|
25
|
+
* prop2: {
|
|
26
|
+
* prop2a: "2a"
|
|
27
|
+
* }
|
|
28
|
+
* }, {
|
|
29
|
+
* prop1: {
|
|
30
|
+
* prop1b: "1b"
|
|
31
|
+
* }
|
|
32
|
+
* }, {
|
|
33
|
+
* prop2: undefined
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* console.log(oResult);
|
|
37
|
+
* {
|
|
38
|
+
* "prop1": {
|
|
39
|
+
* "prop1a": "1a",
|
|
40
|
+
* "prop1b": "1b"
|
|
41
|
+
* },
|
|
42
|
+
* "prop2": {
|
|
43
|
+
* "prop2a": "2a"
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* @function
|
|
48
|
+
* @alias module:sap/base/util/deepExtend
|
|
49
|
+
* @param {object} target The object that will receive new properties
|
|
50
|
+
* @param {...object} [source] One or more objects which get merged into the target object
|
|
51
|
+
* @return {object} the target object which is the result of the merge
|
|
52
|
+
* @public
|
|
53
|
+
* @since 1.71
|
|
54
|
+
*/
|
|
55
|
+
var fnDeepExtend = function () {
|
|
56
|
+
var args = [true, true];
|
|
57
|
+
args.push.apply(args, arguments);
|
|
58
|
+
return _merge.apply(null, args);
|
|
59
|
+
};
|
|
60
|
+
export default fnDeepExtend;
|
|
@@ -1,10 +1,61 @@
|
|
|
1
|
-
|
|
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 _merge from "./_merge.js";
|
|
7
|
+
/**
|
|
8
|
+
* Performs object extension by merging source objects into a target object. Generates a shallow copy.
|
|
9
|
+
*
|
|
10
|
+
* If during merging a key in the target object exists it is overwritten with the source object's value.
|
|
11
|
+
* Usage is the same as <code>jQuery.extend(...)</code>.
|
|
12
|
+
* Values that are <code>undefined</code> are ignored.
|
|
13
|
+
*
|
|
14
|
+
* As alternative you may also use <code>Object.assign</code>, but note that <code>Object.assign</code>
|
|
15
|
+
* only copies enumerable and own properties and doesn't copy properties on the prototype and non-enumerable
|
|
16
|
+
* properties. Also, values that are <code>undefined</code> are NOT ignored.
|
|
17
|
+
*
|
|
18
|
+
* For deep copies, you may use {@link module:sap/base/util/deepExtend sap/base/util/deepExtend}.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* var oResult = extend({}, {
|
|
22
|
+
* prop1: {
|
|
23
|
+
* prop1a: "1a"
|
|
24
|
+
* }
|
|
25
|
+
* }, {
|
|
26
|
+
* prop2: {
|
|
27
|
+
* prop2a: "2a"
|
|
28
|
+
* }
|
|
29
|
+
* }, {
|
|
30
|
+
* prop1: {
|
|
31
|
+
* prop1b: "1b"
|
|
32
|
+
* }
|
|
33
|
+
* }, {
|
|
34
|
+
* prop2: undefined
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
* console.log(oResult);
|
|
39
|
+
* {
|
|
40
|
+
* "prop1": {
|
|
41
|
+
* "prop1b": "1b"
|
|
42
|
+
* },
|
|
43
|
+
* "prop2": {
|
|
44
|
+
* "prop2a": "2a"
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
48
|
+
* @function
|
|
49
|
+
* @alias module:sap/base/util/extend
|
|
50
|
+
* @param {object} target The object that will receive new properties
|
|
51
|
+
* @param {...object} [source] One or more objects which get merged into the target object
|
|
52
|
+
* @return {object} the target object which is the result of the merge
|
|
53
|
+
* @public
|
|
54
|
+
* @since 1.71
|
|
55
|
+
*/
|
|
2
56
|
var fnExtend = function () {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
];
|
|
7
|
-
args.push.apply(args, arguments);
|
|
8
|
-
return _merge.apply(null, args);
|
|
57
|
+
var args = [false, true];
|
|
58
|
+
args.push.apply(args, arguments);
|
|
59
|
+
return _merge.apply(null, args);
|
|
9
60
|
};
|
|
10
61
|
export default fnExtend;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates if the given object is empty, that is that it has no enumerable properties.
|
|
3
|
+
*
|
|
4
|
+
* Note that <code>null</code> and <code>undefined</code> comply with this definition of 'empty'.
|
|
5
|
+
* The behavior for non-object values is undefined and might change in future.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* sap.ui.require(["sap/base/util/isEmptyObject"], function(isEmptyObject){
|
|
9
|
+
* isEmptyObject({}); // true
|
|
10
|
+
* isEmptyObject({test: '123'}); // false
|
|
11
|
+
* isEmptyObject(null); // true
|
|
12
|
+
* isEmptyObject(undefined); // true
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* @function
|
|
16
|
+
* @since 1.65
|
|
17
|
+
* @public
|
|
18
|
+
* @name module:sap/base/util/isEmptyObject
|
|
19
|
+
* @param {Object} obj the object which is checked
|
|
20
|
+
* @returns {boolean} whether or not the given object is empty
|
|
21
|
+
*/ /*!
|
|
22
|
+
* OpenUI5
|
|
23
|
+
* (c) Copyright 2026 SAP SE or an SAP affiliate company.
|
|
24
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
var fnIsEmptyObject = function isEmptyObject(obj) {
|
|
28
|
+
// eslint-disable-next-line no-unreachable-loop
|
|
29
|
+
for (var sName in obj) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
};
|
|
34
|
+
export default fnIsEmptyObject;
|
|
@@ -1,18 +1,52 @@
|
|
|
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
|
+
|
|
1
7
|
var class2type = {};
|
|
2
8
|
var hasOwn = class2type.hasOwnProperty;
|
|
3
9
|
var toString = class2type.toString;
|
|
4
10
|
var fnToString = hasOwn.toString;
|
|
5
11
|
var ObjectFunctionString = fnToString.call(Object);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether the object is a plain object (created using "{}" or "new Object").
|
|
15
|
+
*
|
|
16
|
+
* @function
|
|
17
|
+
* @since 1.58
|
|
18
|
+
* @public
|
|
19
|
+
* @alias module:sap/base/util/isPlainObject
|
|
20
|
+
* @param {Object} obj the object which is checked
|
|
21
|
+
* @returns {boolean} whether or not the object is a plain object (created using "{}" or "new Object").
|
|
22
|
+
*/
|
|
6
23
|
var fnIsPlainObject = function (obj) {
|
|
24
|
+
/*
|
|
25
|
+
* The code in this function is taken from jQuery 3.6.0 "jQuery.isPlainObject" and got modified.
|
|
26
|
+
*
|
|
27
|
+
* jQuery JavaScript Library v3.6.0
|
|
28
|
+
* http://jquery.com/
|
|
29
|
+
*
|
|
30
|
+
* Copyright OpenJS Foundation and other contributors
|
|
31
|
+
* Released under the MIT license
|
|
32
|
+
* http://jquery.org/license
|
|
33
|
+
*/
|
|
7
34
|
var proto, Ctor;
|
|
35
|
+
|
|
36
|
+
// Detect obvious negatives
|
|
37
|
+
// Use toString instead of jQuery.type to catch host objects
|
|
8
38
|
if (!obj || toString.call(obj) !== "[object Object]") {
|
|
9
39
|
return false;
|
|
10
40
|
}
|
|
11
41
|
proto = Object.getPrototypeOf(obj);
|
|
42
|
+
|
|
43
|
+
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
|
12
44
|
if (!proto) {
|
|
13
45
|
return true;
|
|
14
46
|
}
|
|
47
|
+
|
|
48
|
+
// Objects with a prototype are considered plain only if they were constructed by a global Object function
|
|
15
49
|
Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
|
|
16
50
|
return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
|
|
17
51
|
};
|
|
18
|
-
export default fnIsPlainObject;
|
|
52
|
+
export default fnIsPlainObject;
|
|
@@ -0,0 +1,57 @@
|
|
|
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 _merge from "./_merge.js";
|
|
7
|
+
/**
|
|
8
|
+
* Performs object extension by merging source objects into a target object. Copies are always deep.
|
|
9
|
+
*
|
|
10
|
+
* If during merging a key in the target object exists it is overwritten with the source object's value.
|
|
11
|
+
* Usage is the same as <code>jQuery.extend(true, ...)</code>, but values that are <code>undefined</code>
|
|
12
|
+
* are NOT ignored.
|
|
13
|
+
*
|
|
14
|
+
* For shallow copies, you may use <code>Object.assign</code>, but note that <code>Object.assign</code> only
|
|
15
|
+
* copies enumerable and own properties and doesn't copy properties on the prototype and non-enumerable properties.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* var oResult = merge({}, {
|
|
19
|
+
* prop1: {
|
|
20
|
+
* prop1a: "1a"
|
|
21
|
+
* }
|
|
22
|
+
* }, {
|
|
23
|
+
* prop2: {
|
|
24
|
+
* prop2a: "2a"
|
|
25
|
+
* }
|
|
26
|
+
* }, {
|
|
27
|
+
* prop1: {
|
|
28
|
+
* prop1b: "1b"
|
|
29
|
+
* }
|
|
30
|
+
* }, {
|
|
31
|
+
* prop2: undefined
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* console.log(oResult);
|
|
35
|
+
* {
|
|
36
|
+
* "prop1": {
|
|
37
|
+
* "prop1a": "1a",
|
|
38
|
+
* "prop1b": "1b"
|
|
39
|
+
* },
|
|
40
|
+
* "prop2": undefined
|
|
41
|
+
* }
|
|
42
|
+
*
|
|
43
|
+
* @function
|
|
44
|
+
* @since 1.58
|
|
45
|
+
* @public
|
|
46
|
+
* @alias module:sap/base/util/merge
|
|
47
|
+
* @param {object} target The object that will receive new properties
|
|
48
|
+
* @param {...object} [source] One or more objects which get merged into the target object
|
|
49
|
+
* @return {object} the target object which is the result of the merge
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
var fnMerge = function () {
|
|
53
|
+
var args = [true, false];
|
|
54
|
+
args.push.apply(args, arguments);
|
|
55
|
+
return _merge.apply(null, args);
|
|
56
|
+
};
|
|
57
|
+
export default fnMerge;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Returns a high resolution timestamp in microseconds.
|
|
3
|
+
* The timestamp is based on 01/01/1970 00:00:00 (UNIX epoch) as float with microsecond precision.
|
|
4
|
+
* The fractional part of the timestamp represents fractions of a millisecond.
|
|
5
|
+
* Converting to a <code>Date</code> is possible by using <code>require(["sap/base/util/now"], function(now){new Date(now());}</code>
|
|
6
|
+
*
|
|
7
|
+
* @function
|
|
8
|
+
* @since 1.58
|
|
9
|
+
* @public
|
|
10
|
+
* @alias module:sap/base/util/now
|
|
11
|
+
* @returns {float} timestamp in microseconds
|
|
12
|
+
*/ /*!
|
|
13
|
+
* OpenUI5
|
|
14
|
+
* (c) Copyright 2026 SAP SE or an SAP affiliate company.
|
|
15
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
16
|
+
*/
|
|
17
|
+
/*global performance */
|
|
18
|
+
|
|
19
|
+
var fnNow = function now() {
|
|
20
|
+
return performance.timeOrigin + performance.now();
|
|
21
|
+
};
|
|
22
|
+
export default fnNow;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Some private variable used for creation of (pseudo-)unique IDs.
|
|
3
|
+
* @type int
|
|
4
|
+
* @private
|
|
5
|
+
*/ /*!
|
|
6
|
+
* OpenUI5
|
|
7
|
+
* (c) Copyright 2026 SAP SE or an SAP affiliate company.
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var iIdCounter = 0;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates and returns a pseudo-unique ID.
|
|
15
|
+
*
|
|
16
|
+
* No means for detection of overlap with already present or future UIDs.
|
|
17
|
+
*
|
|
18
|
+
* @function
|
|
19
|
+
* @since 1.58
|
|
20
|
+
* @alias module:sap/base/util/uid
|
|
21
|
+
* @return {string} A pseudo-unique id.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
var fnUid = function uid() {
|
|
25
|
+
return "id-" + new Date().valueOf() + "-" + iIdCounter++;
|
|
26
|
+
};
|
|
27
|
+
export default fnUid;
|
package/dist/sap/ui/Device.js
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
browser: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
firefox: false,
|
|
4
|
+
webkit: false,
|
|
5
|
+
chrome: false,
|
|
6
|
+
name: "",
|
|
7
|
+
version: -1
|
|
8
|
+
},
|
|
9
|
+
os: {
|
|
10
|
+
windows: false,
|
|
11
|
+
macintosh: false,
|
|
12
|
+
linux: false,
|
|
13
|
+
android: false,
|
|
14
|
+
ios: false
|
|
15
|
+
},
|
|
16
|
+
system: {
|
|
17
|
+
desktop: true,
|
|
18
|
+
phone: false,
|
|
19
|
+
tablet: false
|
|
20
|
+
},
|
|
21
|
+
support: {
|
|
22
|
+
touch: false
|
|
23
|
+
},
|
|
24
|
+
media: {},
|
|
25
|
+
orientation: {},
|
|
26
|
+
resize: {}
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
load: function () {
|
|
3
|
+
return Promise.resolve({});
|
|
4
|
+
},
|
|
5
|
+
_load: function () {
|
|
6
|
+
return Promise.resolve({});
|
|
7
|
+
},
|
|
8
|
+
_getTransitiveDependencyForLibraries: function () {
|
|
9
|
+
return [];
|
|
10
|
+
},
|
|
11
|
+
_getTransitiveDependencyForComponent: function () {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
};
|