@ui5/webcomponents-localization 0.32.0 → 1.0.0-rc.16
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/CHANGELOG.md +23 -0
- package/README.md +32 -1
- package/dist/generated/assets/cldr/en.json +1 -0
- package/dist/sap/base/Log.js +2 -10
- package/dist/sap/base/assert.js +1 -5
- package/dist/sap/base/util/deepEqual.js +1 -5
- package/dist/sap/ui/base/Interface.js +1 -3
- package/dist/sap/ui/base/Object.js +26 -2
- package/dist/sap/ui/core/Locale.js +2 -0
- package/dist/sap/ui/core/LocaleData.js +4 -1499
- package/dist/sap/ui/core/date/UniversalDate.js +4 -4
- package/dist/sap/ui/core/format/DateFormat.js +7 -3
- package/hash.txt +1 -1
- package/package-scripts.js +7 -4
- package/package.json +10 -13
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,29 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [1.0.0-rc.16](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.15...v1.0.0-rc.16) (2021-11-09)
|
7
|
+
|
8
|
+
|
9
|
+
**Note:** Version bump only for package @ui5/webcomponents-localization
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
# [1.0.0-rc.15](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.14...v1.0.0-rc.15) (2021-07-23)
|
16
|
+
|
17
|
+
|
18
|
+
**Note:** Version bump only for package @ui5/webcomponents-icons-tnt
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
# [1.0.0-rc.14](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.13...v1.0.0-rc.14) (2021-04-01)
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
6
29
|
# [1.0.0-rc.13](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.12...v1.0.0-rc.13) (2021-03-26)
|
7
30
|
|
8
31
|
|
package/README.md
CHANGED
@@ -7,6 +7,37 @@
|
|
7
7
|
|
8
8
|
Provides date/time and CLDR functionality for the purposes of building UI5 Web Components.
|
9
9
|
|
10
|
+
## Provided assets
|
11
|
+
|
12
|
+
The assets, provided by this package, are CLDR data:
|
13
|
+
|
14
|
+
`import "@ui5/webcomponents-localization/dist/Assets.js";`
|
15
|
+
|
16
|
+
*Note:* These assets are already imported by the UI5 Web Components packages that need them.
|
17
|
+
|
18
|
+
## Provided features
|
19
|
+
|
20
|
+
| Feature Import | Description |
|
21
|
+
|----------------------------------------------------------------------|---------------------------|
|
22
|
+
| `@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js` | Buddhist calendar support |
|
23
|
+
| `@ui5/webcomponents-localization/dist/features/calendar/Islamic.js` | Islamic calendar support |
|
24
|
+
| `@ui5/webcomponents-localization/dist/features/calendar/Japanese.js` | Japanese calendar support |
|
25
|
+
| `@ui5/webcomponents-localization/dist/features/calendar/Persian.js` | Persian calendar support |
|
26
|
+
|
27
|
+
### Advanced Calendar Types Feature
|
28
|
+
|
29
|
+
```js
|
30
|
+
import "@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js";
|
31
|
+
import "@ui5/webcomponents-localization/dist/features/calendar/Islamic.js";
|
32
|
+
import "@ui5/webcomponents-localization/dist/features/calendar/Japanese.js";
|
33
|
+
import "@ui5/webcomponents-localization/dist/features/calendar/Persian.js";
|
34
|
+
```
|
35
|
+
|
36
|
+
The `ui5-date-picker` and `ui5-datetime-picker` components supports Gregorian Calendar by default.
|
37
|
+
|
38
|
+
In order to be able to use Buddhist, Islamic, Japanese, or Persian calendar with these components
|
39
|
+
(by setting its `primaryCalendarType` property), you must import one or more of the modules above.
|
40
|
+
|
10
41
|
## Resources
|
11
42
|
- [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/master/README.md)
|
12
43
|
- [UI5 Web Components - Home Page](https://sap.github.io/ui5-webcomponents)
|
@@ -16,7 +47,7 @@ Provides date/time and CLDR functionality for the purposes of building UI5 Web C
|
|
16
47
|
We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
|
17
48
|
|
18
49
|
## Contribute
|
19
|
-
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/
|
50
|
+
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/docs/6-contributing/02-conventions-and-guidelines.md).
|
20
51
|
|
21
52
|
## License
|
22
53
|
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
|
package/dist/sap/base/Log.js
CHANGED
@@ -162,18 +162,10 @@ function log(iLevel, sMessage, sDetails, sComponent, fnSupportInfo) {
|
|
162
162
|
}
|
163
163
|
break;
|
164
164
|
case Log.Level.DEBUG:
|
165
|
-
|
166
|
-
isDetailsError ? console.debug(logText, '\n', sDetails) : console.debug(logText);
|
167
|
-
} else {
|
168
|
-
isDetailsError ? console.log(logText, '\n', sDetails) : console.log(logText);
|
169
|
-
}
|
165
|
+
isDetailsError ? console.debug(logText, '\n', sDetails) : console.debug(logText);
|
170
166
|
break;
|
171
167
|
case Log.Level.TRACE:
|
172
|
-
|
173
|
-
isDetailsError ? console.trace(logText, '\n', sDetails) : console.trace(logText);
|
174
|
-
} else {
|
175
|
-
isDetailsError ? console.log(logText, '\n', sDetails) : console.log(logText);
|
176
|
-
}
|
168
|
+
isDetailsError ? console.trace(logText, '\n', sDetails) : console.trace(logText);
|
177
169
|
break;
|
178
170
|
}
|
179
171
|
if (console.info && oLogEntry.supportInfo) {
|
package/dist/sap/base/assert.js
CHANGED
@@ -2,11 +2,7 @@ import Log from './Log.js';
|
|
2
2
|
var fnAssert = function (bResult, vMessage) {
|
3
3
|
if (!bResult) {
|
4
4
|
var sMessage = typeof vMessage === 'function' ? vMessage() : vMessage;
|
5
|
-
|
6
|
-
console.assert(bResult, sMessage);
|
7
|
-
} else {
|
8
|
-
Log.debug('[Assertions] ' + sMessage);
|
9
|
-
}
|
5
|
+
console.assert(bResult, sMessage);
|
10
6
|
}
|
11
7
|
};
|
12
8
|
export default fnAssert;
|
@@ -14,11 +14,7 @@ var fnEqual = function (a, b, maxDepth, contains, depth) {
|
|
14
14
|
Log.warning('deepEqual comparison exceeded maximum recursion depth of ' + maxDepth + '. Treating values as unequal');
|
15
15
|
return false;
|
16
16
|
}
|
17
|
-
if (a === b) {
|
18
|
-
return true;
|
19
|
-
}
|
20
|
-
var bIsReallyNaN = typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
|
21
|
-
if (bIsReallyNaN) {
|
17
|
+
if (a === b || Number.isNaN(a) && Number.isNaN(b)) {
|
22
18
|
return true;
|
23
19
|
}
|
24
20
|
if (Array.isArray(a) && Array.isArray(b)) {
|
@@ -1,16 +1,14 @@
|
|
1
|
-
var BaseObject;
|
2
1
|
var Interface = function (oObject, aMethods, _bReturnFacade) {
|
3
2
|
if (!oObject) {
|
4
3
|
return oObject;
|
5
4
|
}
|
6
|
-
BaseObject = BaseObject || sap.ui.requireSync("sap/ui/base/Object");
|
7
5
|
function fCreateDelegator(oObject, sMethodName) {
|
8
6
|
return function () {
|
9
7
|
var tmp = oObject[sMethodName].apply(oObject, arguments);
|
10
8
|
if (_bReturnFacade) {
|
11
9
|
return this;
|
12
10
|
} else {
|
13
|
-
return tmp
|
11
|
+
return typeof tmp.getInterface === "function" ? tmp.getInterface() : tmp;
|
14
12
|
}
|
15
13
|
};
|
16
14
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import Interface from './Interface.js';
|
2
1
|
import Metadata from './Metadata.js';
|
3
2
|
import Log from '../../base/Log.js';
|
4
3
|
var BaseObject = Metadata.createClass('sap.ui.base.Object', {
|
@@ -11,7 +10,7 @@ var BaseObject = Metadata.createClass('sap.ui.base.Object', {
|
|
11
10
|
BaseObject.prototype.destroy = function () {
|
12
11
|
};
|
13
12
|
BaseObject.prototype.getInterface = function () {
|
14
|
-
var oInterface = new
|
13
|
+
var oInterface = new BaseObject._Interface(this, this.getMetadata().getAllPublicMethods());
|
15
14
|
this.getInterface = function () {
|
16
15
|
return oInterface;
|
17
16
|
};
|
@@ -37,4 +36,29 @@ BaseObject.prototype.isA = function (vTypeName) {
|
|
37
36
|
BaseObject.isA = function (oObject, vTypeName) {
|
38
37
|
return oObject instanceof BaseObject && oObject.isA(vTypeName);
|
39
38
|
};
|
39
|
+
BaseObject._Interface = function (oObject, aMethods, _bReturnFacade) {
|
40
|
+
if (!oObject) {
|
41
|
+
return oObject;
|
42
|
+
}
|
43
|
+
function fCreateDelegator(oObject, sMethodName) {
|
44
|
+
return function () {
|
45
|
+
var tmp = oObject[sMethodName].apply(oObject, arguments);
|
46
|
+
if (_bReturnFacade) {
|
47
|
+
return this;
|
48
|
+
} else {
|
49
|
+
return tmp instanceof BaseObject ? tmp.getInterface() : tmp;
|
50
|
+
}
|
51
|
+
};
|
52
|
+
}
|
53
|
+
if (!aMethods) {
|
54
|
+
return {};
|
55
|
+
}
|
56
|
+
var sMethodName;
|
57
|
+
for (var i = 0, ml = aMethods.length; i < ml; i++) {
|
58
|
+
sMethodName = aMethods[i];
|
59
|
+
if (!oObject[sMethodName] || typeof oObject[sMethodName] === 'function') {
|
60
|
+
this[sMethodName] = fCreateDelegator(oObject, sMethodName);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
};
|
40
64
|
export default BaseObject;
|