@instructure/ui-i18n 8.12.1-snapshot.7 → 8.13.1-snapshot.9
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 +4 -0
- package/es/ApplyLocale/index.js +4 -5
- package/es/Locale.js +2 -1
- package/lib/ApplyLocale/index.js +4 -5
- package/lib/DateTime.js +1 -1
- package/lib/I18nPropTypes.js +1 -1
- package/lib/Locale.js +3 -2
- package/lib/TextDirectionContext.js +1 -1
- package/lib/bidirectional.js +1 -1
- package/lib/getTextDirection.js +1 -1
- package/lib/index.js +16 -16
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
# [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-i18n
|
|
9
|
+
|
|
6
10
|
# [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
|
|
7
11
|
|
|
8
12
|
### Features
|
package/es/ApplyLocale/index.js
CHANGED
|
@@ -31,11 +31,10 @@ category: components/utilities
|
|
|
31
31
|
---
|
|
32
32
|
@tsProps
|
|
33
33
|
**/
|
|
34
|
-
export const ApplyLocale =
|
|
35
|
-
children,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}) => {
|
|
34
|
+
export const ApplyLocale = _ref => {
|
|
35
|
+
let children = _ref.children,
|
|
36
|
+
locale = _ref.locale,
|
|
37
|
+
timezone = _ref.timezone;
|
|
39
38
|
return /*#__PURE__*/React.createElement(ApplyLocaleContext.Provider, {
|
|
40
39
|
value: {
|
|
41
40
|
locale,
|
package/es/Locale.js
CHANGED
|
@@ -38,7 +38,8 @@ const Locale = {
|
|
|
38
38
|
* Return the locale from the browser
|
|
39
39
|
* @returns {String} locale (defaults to 'en-US' if DOM cannot be accessed)
|
|
40
40
|
*/
|
|
41
|
-
browserLocale(nav
|
|
41
|
+
browserLocale(nav) {
|
|
42
|
+
let hasDOM = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : canUseDOM;
|
|
42
43
|
if (nav) return nav.language;
|
|
43
44
|
if (!hasDOM) return defaultLocale;
|
|
44
45
|
const documentLanguage = window.document.documentElement.lang;
|
package/lib/ApplyLocale/index.js
CHANGED
|
@@ -43,11 +43,10 @@ category: components/utilities
|
|
|
43
43
|
---
|
|
44
44
|
@tsProps
|
|
45
45
|
**/
|
|
46
|
-
const ApplyLocale =
|
|
47
|
-
children,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}) => {
|
|
46
|
+
const ApplyLocale = _ref => {
|
|
47
|
+
let children = _ref.children,
|
|
48
|
+
locale = _ref.locale,
|
|
49
|
+
timezone = _ref.timezone;
|
|
51
50
|
return /*#__PURE__*/_react.default.createElement(_ApplyLocaleContext.ApplyLocaleContext.Provider, {
|
|
52
51
|
value: {
|
|
53
52
|
locale,
|
package/lib/DateTime.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.default = exports.DateTime = void 0;
|
|
9
9
|
|
|
10
10
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
11
11
|
|
package/lib/I18nPropTypes.js
CHANGED
package/lib/Locale.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = exports.Locale = void 0;
|
|
7
7
|
|
|
8
8
|
var _canUseDOM = require("@instructure/ui-dom-utils/lib/canUseDOM.js");
|
|
9
9
|
|
|
@@ -46,7 +46,8 @@ const Locale = {
|
|
|
46
46
|
* Return the locale from the browser
|
|
47
47
|
* @returns {String} locale (defaults to 'en-US' if DOM cannot be accessed)
|
|
48
48
|
*/
|
|
49
|
-
browserLocale(nav
|
|
49
|
+
browserLocale(nav) {
|
|
50
|
+
let hasDOM = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _canUseDOM.canUseDOM;
|
|
50
51
|
if (nav) return nav.language;
|
|
51
52
|
if (!hasDOM) return defaultLocale;
|
|
52
53
|
const documentLanguage = window.document.documentElement.lang;
|
package/lib/bidirectional.js
CHANGED
|
@@ -7,7 +7,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.default = exports.bidirectional = void 0;
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
package/lib/getTextDirection.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getTextDirection = getTextDirection;
|
|
7
6
|
exports.default = void 0;
|
|
7
|
+
exports.getTextDirection = getTextDirection;
|
|
8
8
|
|
|
9
9
|
var _canUseDOM = require("@instructure/ui-dom-utils/lib/canUseDOM.js");
|
|
10
10
|
|
package/lib/index.js
CHANGED
|
@@ -15,16 +15,16 @@ Object.defineProperty(exports, "ApplyLocaleContext", {
|
|
|
15
15
|
return _ApplyLocaleContext.ApplyLocaleContext;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "ApplyTextDirection", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _ApplyTextDirection.ApplyTextDirection;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "DIRECTION", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _TextDirectionContext.DIRECTION;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "DateTime", {
|
|
@@ -33,12 +33,6 @@ Object.defineProperty(exports, "DateTime", {
|
|
|
33
33
|
return _DateTime.DateTime;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports, "getTextDirection", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _getTextDirection.getTextDirection;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
36
|
Object.defineProperty(exports, "I18nPropTypes", {
|
|
43
37
|
enumerable: true,
|
|
44
38
|
get: function () {
|
|
@@ -51,22 +45,28 @@ Object.defineProperty(exports, "Locale", {
|
|
|
51
45
|
return _Locale.Locale;
|
|
52
46
|
}
|
|
53
47
|
});
|
|
54
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "TextDirectionContext", {
|
|
55
49
|
enumerable: true,
|
|
56
50
|
get: function () {
|
|
57
|
-
return _TextDirectionContext.
|
|
51
|
+
return _TextDirectionContext.TextDirectionContext;
|
|
58
52
|
}
|
|
59
53
|
});
|
|
60
|
-
Object.defineProperty(exports, "
|
|
54
|
+
Object.defineProperty(exports, "bidirectional", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function () {
|
|
63
|
-
return
|
|
57
|
+
return _bidirectional.bidirectional;
|
|
64
58
|
}
|
|
65
59
|
});
|
|
66
|
-
Object.defineProperty(exports, "
|
|
60
|
+
Object.defineProperty(exports, "getTextDirection", {
|
|
67
61
|
enumerable: true,
|
|
68
62
|
get: function () {
|
|
69
|
-
return
|
|
63
|
+
return _getTextDirection.getTextDirection;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "textDirectionContextConsumer", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _textDirectionContextConsumer.textDirectionContextConsumer;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-i18n",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.13.1-snapshot.9+f32ba918e",
|
|
4
4
|
"description": "Helper components and utilities for internationalization.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.
|
|
28
|
-
"@instructure/ui-test-utils": "8.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.13.1-snapshot.9+f32ba918e",
|
|
28
|
+
"@instructure/ui-test-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
29
29
|
"@types/hoist-non-react-statics": "^3.3.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/shared-types": "8.
|
|
34
|
-
"@instructure/ui-decorator": "8.
|
|
35
|
-
"@instructure/ui-dom-utils": "8.
|
|
36
|
-
"@instructure/ui-prop-types": "8.
|
|
37
|
-
"@instructure/ui-react-utils": "8.
|
|
38
|
-
"@instructure/ui-utils": "8.
|
|
33
|
+
"@instructure/shared-types": "8.13.1-snapshot.9+f32ba918e",
|
|
34
|
+
"@instructure/ui-decorator": "8.13.1-snapshot.9+f32ba918e",
|
|
35
|
+
"@instructure/ui-dom-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
36
|
+
"@instructure/ui-prop-types": "8.13.1-snapshot.9+f32ba918e",
|
|
37
|
+
"@instructure/ui-react-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
38
|
+
"@instructure/ui-utils": "8.13.1-snapshot.9+f32ba918e",
|
|
39
39
|
"hoist-non-react-statics": "^3.3.2",
|
|
40
40
|
"moment-timezone": "^0.5",
|
|
41
41
|
"prop-types": "^15"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f32ba918e4d3ce76c6ee95c856584d00a9d80958"
|
|
51
51
|
}
|