@enact/webos 4.9.2 → 5.0.0-alpha.2
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 +18 -0
- package/LS2Request/LS2Request.js +5 -6
- package/LS2Request/tests/LS2Request-specs.js +1 -1
- package/deviceinfo/deviceinfo.js +1 -1
- package/lastInputType/lastInputType.js +1 -1
- package/package.json +2 -2
- package/platform/platform.js +12 -44
- package/platform/tests/platform-specs.js +0 -16
- package/signLang/SignLangDecorator.js +21 -23
- package/signLang/index.js +1 -1
- package/signLang/signLang.js +3 -3
- package/speech/VoiceControlDecorator.js +21 -23
- package/speech/index.js +1 -1
- package/speech/readAlert.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
The following is a curated list of changes in the Enact webos module, newest changes on the top.
|
|
4
4
|
|
|
5
|
+
## [5.0.0-alpha.2] - 2024-10-08
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `webos/signLang` module with `startSignLang()`, `stopSignLang()` functions and `SignLangDecorator` Higher-order Component
|
|
10
|
+
|
|
5
11
|
## [4.9.2] - 2024-09-26
|
|
6
12
|
|
|
7
13
|
No significant changes.
|
|
@@ -12,12 +18,24 @@ No significant changes.
|
|
|
12
18
|
|
|
13
19
|
- `webos/signLang` module with `startSignLang()`, `stopSignLang()` functions and `SignLangDecorator` Higher-order Component
|
|
14
20
|
|
|
21
|
+
## [4.7.12] - 2024-09-05
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- `webos/signLang` module with `startSignLang()`, `stopSignLang()` functions and `SignLangDecorator` Higher-order Component
|
|
26
|
+
|
|
15
27
|
## [4.9.0] - 2024-07-17
|
|
16
28
|
|
|
17
29
|
### Fixed
|
|
18
30
|
|
|
19
31
|
- `webos/speech.VoiceControlDecorator` to not remount its children when it rerenders
|
|
20
32
|
|
|
33
|
+
## [5.0.0-alpha.1] - 2024-07-11
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
|
|
37
|
+
- `webos/platform` member `watch` and `legacy`
|
|
38
|
+
|
|
21
39
|
## [4.9.0-beta.1] - 2024-06-17
|
|
22
40
|
|
|
23
41
|
No significant changes.
|
package/LS2Request/LS2Request.js
CHANGED
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _util = require("@enact/core/util");
|
|
8
|
-
function _classCallCheck(
|
|
9
|
-
function _defineProperties(
|
|
10
|
-
function _createClass(
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable no-console */ /**
|
|
13
13
|
* Provides a class for making LS2 service requests on webOS platforms.
|
|
14
14
|
*
|
|
@@ -83,7 +83,7 @@ var LS2Request = exports["default"] = /*#__PURE__*/function () {
|
|
|
83
83
|
* @returns {webos/LS2Request}
|
|
84
84
|
* @public
|
|
85
85
|
*/
|
|
86
|
-
_createClass(LS2Request, [{
|
|
86
|
+
return _createClass(LS2Request, [{
|
|
87
87
|
key: "send",
|
|
88
88
|
value: function send(_ref4) {
|
|
89
89
|
var _window$WebOSServiceB;
|
|
@@ -214,5 +214,4 @@ var LS2Request = exports["default"] = /*#__PURE__*/function () {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
}]);
|
|
217
|
-
return LS2Request;
|
|
218
217
|
}();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _LS2Request = _interopRequireDefault(require("../LS2Request"));
|
|
4
|
-
function _interopRequireDefault(
|
|
4
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
5
5
|
describe('LS2Request', function () {
|
|
6
6
|
var nop = function nop() {};
|
|
7
7
|
describe('callback', function () {
|
package/deviceinfo/deviceinfo.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.deviceinfo = exports["default"] = void 0;
|
|
7
7
|
var _LS2Request = _interopRequireDefault(require("../LS2Request"));
|
|
8
8
|
var _platform = require("../platform");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
/**
|
|
11
11
|
* Provides a function to get the device-specific information.
|
|
12
12
|
*
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.requestLastInputType = exports["default"] = void 0;
|
|
7
7
|
var _LS2Request = _interopRequireDefault(require("../LS2Request"));
|
|
8
8
|
var _platform = _interopRequireDefault(require("../platform"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
/**
|
|
11
11
|
* Exports a method for calling `surfacemanager` service through LS2Request and returns `lastInputType`
|
|
12
12
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/webos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.2",
|
|
4
4
|
"description": "webOS support library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@enact/core": "^
|
|
35
|
+
"@enact/core": "^5.0.0-alpha.2",
|
|
36
36
|
"prop-types": "^15.8.1",
|
|
37
37
|
"react": "^18.3.1",
|
|
38
38
|
"react-dom": "^18.3.1"
|
package/platform/platform.js
CHANGED
|
@@ -6,20 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
exports.detect = detect;
|
|
8
8
|
exports.platform = exports.parseUserAgent = void 0;
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
12
10
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(
|
|
14
|
-
function _iterableToArray(
|
|
15
|
-
function _arrayWithoutHoles(
|
|
16
|
-
function _arrayLikeToArray(
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
13
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
/**
|
|
17
16
|
* Utilities for webOS platform detection.
|
|
18
17
|
*
|
|
19
18
|
* @module webos/platform
|
|
20
19
|
* @exports detect
|
|
21
20
|
* @exports platform
|
|
22
21
|
*/
|
|
22
|
+
|
|
23
23
|
var webOSVersion = [
|
|
24
24
|
// Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.2.1 Chrome/38.0.2125.122 Safari/537.36 WebAppManager
|
|
25
25
|
{
|
|
@@ -51,17 +51,7 @@ var webOSVersion = [
|
|
|
51
51
|
chrome: 94,
|
|
52
52
|
version: 23
|
|
53
53
|
}];
|
|
54
|
-
var platforms = [
|
|
55
|
-
// LG webOS before adapting Chrome
|
|
56
|
-
{
|
|
57
|
-
regex: /Web0S;.*Safari\/537.41/,
|
|
58
|
-
version: 1
|
|
59
|
-
},
|
|
60
|
-
// using WebKit 537.41 for WebAppManager, using Chrome 26 for the browser app
|
|
61
|
-
{
|
|
62
|
-
regex: /Web0S;.*Safari\/538.2/,
|
|
63
|
-
version: 2
|
|
64
|
-
}].concat(_toConsumableArray(webOSVersion.map(function (_ref) {
|
|
54
|
+
var platforms = [].concat(_toConsumableArray(webOSVersion.map(function (_ref) {
|
|
65
55
|
var chrome = _ref.chrome,
|
|
66
56
|
version = _ref.version;
|
|
67
57
|
return {
|
|
@@ -81,29 +71,15 @@ var parseUserAgent = exports.parseUserAgent = function parseUserAgent(userAgent)
|
|
|
81
71
|
var platformInfo = {
|
|
82
72
|
webos: false
|
|
83
73
|
};
|
|
84
|
-
if (userAgent.indexOf('
|
|
85
|
-
platformInfo.watch = true;
|
|
86
|
-
} else if (userAgent.indexOf('SmartTV') > -1) {
|
|
87
|
-
platformInfo.tv = true;
|
|
88
|
-
} else if (userAgent.indexOf('Large Screen') > -1) {
|
|
89
|
-
(0, _deprecate["default"])({
|
|
90
|
-
name: 'Detecting webOS TV by "Large Screen" from the user agent string',
|
|
91
|
-
until: '5.0.0'
|
|
92
|
-
});
|
|
74
|
+
if (userAgent.indexOf('SmartTV') > -1) {
|
|
93
75
|
platformInfo.tv = true;
|
|
94
76
|
} else {
|
|
95
77
|
var _window$webOSSystem, _webOSSystem$stageRea;
|
|
96
78
|
var webOSSystem = (_window$webOSSystem = window.webOSSystem) !== null && _window$webOSSystem !== void 0 ? _window$webOSSystem : window.PalmSystem;
|
|
97
79
|
try {
|
|
98
80
|
var legacyInfo = JSON.parse(webOSSystem.deviceInfo || '{}');
|
|
99
|
-
if (legacyInfo.platformVersionMajor && legacyInfo.platformVersionMinor) {
|
|
100
|
-
|
|
101
|
-
var minor = parseInt(legacyInfo.platformVersionMinor);
|
|
102
|
-
if (major < 3 || major === 3 && minor <= 0) {
|
|
103
|
-
platformInfo.legacy = true;
|
|
104
|
-
} else {
|
|
105
|
-
platformInfo.open = true;
|
|
106
|
-
}
|
|
81
|
+
if (typeof legacyInfo.platformVersionMajor !== 'undefined' && typeof legacyInfo.platformVersionMinor !== 'undefined') {
|
|
82
|
+
platformInfo.open = true;
|
|
107
83
|
} else {
|
|
108
84
|
platformInfo.unknown = true;
|
|
109
85
|
}
|
|
@@ -161,9 +137,7 @@ function detect() {
|
|
|
161
137
|
* @type {Object}
|
|
162
138
|
* @property {Boolean} webos `true` for webOS
|
|
163
139
|
* @property {Boolean} [tv] `true` for LG webOS SmartTV
|
|
164
|
-
* @property {Boolean} [watch] `true` for LG webOS SmartWatch. Deprecated: will be removed in 5.0.0.
|
|
165
140
|
* @property {Boolean} [open] `true` for Open webOS
|
|
166
|
-
* @property {Boolean} [legacy] `true` for legacy webOS (Palm and HP hardware). Deprecated: will be removed in 5.0.0.
|
|
167
141
|
* @property {Boolean} [unknown] `true` for any unknown system
|
|
168
142
|
* @property {Number} [version] The version of the platform if detected
|
|
169
143
|
* @property {Number} [chrome] The version of Chrome if detected
|
|
@@ -171,16 +145,10 @@ function detect() {
|
|
|
171
145
|
* @public
|
|
172
146
|
*/
|
|
173
147
|
var platform = exports.platform = {};
|
|
174
|
-
['tv', '
|
|
148
|
+
['tv', 'open', 'unknown', 'version', 'chrome'].forEach(function (name) {
|
|
175
149
|
Object.defineProperty(platform, name, {
|
|
176
150
|
enumerable: true,
|
|
177
151
|
get: function get() {
|
|
178
|
-
if (name === 'watch' || name === 'legacy') {
|
|
179
|
-
(0, _deprecate["default"])({
|
|
180
|
-
name: name,
|
|
181
|
-
until: '5.0.0'
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
152
|
var p = detect();
|
|
185
153
|
return p[name];
|
|
186
154
|
}
|
|
@@ -4,8 +4,6 @@ var _platform = require("../platform");
|
|
|
4
4
|
describe('platform', function () {
|
|
5
5
|
describe('parseUserAgent for webOS', function () {
|
|
6
6
|
// From http://webostv.developer.lge.com/discover/specifications/web-engine/
|
|
7
|
-
var webOSTV1 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.41 (KHTML, like Gecko) Large Screen WebAppManager Safari/537.41';
|
|
8
|
-
var webOSTV2 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/538.2 (KHTML, like Gecko) Large Screen WebAppManager Safari/538.2';
|
|
9
7
|
var webOSTV3 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.2.1 Chrome/38.0.2125.122 Safari/537.36 WebAppManager';
|
|
10
8
|
var webOSTV4 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.34 Safari/537.36 WebAppManager';
|
|
11
9
|
var webOSTV5 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 WebAppManager';
|
|
@@ -14,20 +12,6 @@ describe('platform', function () {
|
|
|
14
12
|
var webOSTV23 = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.128 Safari/537.36 WebAppManager';
|
|
15
13
|
var webOSTVChrome = 'Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 WebAppManager';
|
|
16
14
|
var webOSOther = 'Mozilla/5.0 (Web0S; Linux) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36 WebAppManager';
|
|
17
|
-
test('should detect webOS 1', function () {
|
|
18
|
-
var expected = {
|
|
19
|
-
version: 1
|
|
20
|
-
};
|
|
21
|
-
var actual = (0, _platform.parseUserAgent)(webOSTV1);
|
|
22
|
-
expect(actual).toMatchObject(expected);
|
|
23
|
-
});
|
|
24
|
-
test('should detect webOS 2', function () {
|
|
25
|
-
var expected = {
|
|
26
|
-
version: 2
|
|
27
|
-
};
|
|
28
|
-
var actual = (0, _platform.parseUserAgent)(webOSTV2);
|
|
29
|
-
expect(actual).toMatchObject(expected);
|
|
30
|
-
});
|
|
31
15
|
test('should detect webOS 3', function () {
|
|
32
16
|
var expected = {
|
|
33
17
|
version: 3
|
|
@@ -10,22 +10,22 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _signLang = require("./signLang");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
-
function _defineProperty(
|
|
17
|
-
function _classCallCheck(
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
function _createClass(
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
21
21
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
26
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
23
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
24
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
27
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
-
function _getPrototypeOf(
|
|
26
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
27
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
28
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
29
29
|
* Default config for {@link webos/signLang.SignLangDecorator}
|
|
30
30
|
*
|
|
31
31
|
* @type {Object}
|
|
@@ -73,17 +73,15 @@ var defaultConfig = {
|
|
|
73
73
|
* @public
|
|
74
74
|
*/
|
|
75
75
|
var SignLangDecorator = exports.SignLangDecorator = (0, _hoc["default"])(defaultConfig, function (config, Wrapped) {
|
|
76
|
-
var
|
|
76
|
+
var _Class;
|
|
77
77
|
var signLangDelay = config.signLangDelay;
|
|
78
78
|
var forwardBlur = (0, _handle.forward)('onBlur');
|
|
79
79
|
var forwardFocus = (0, _handle.forward)('onFocus');
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
var _super = _createSuper(_class);
|
|
83
|
-
function _class(props) {
|
|
80
|
+
return _Class = /*#__PURE__*/function (_Component) {
|
|
81
|
+
function _Class(props) {
|
|
84
82
|
var _this;
|
|
85
|
-
_classCallCheck(this,
|
|
86
|
-
_this =
|
|
83
|
+
_classCallCheck(this, _Class);
|
|
84
|
+
_this = _callSuper(this, _Class, [props]);
|
|
87
85
|
_this.requestSignLang = function (active) {
|
|
88
86
|
var _this$props = _this.props,
|
|
89
87
|
_this$props$signLangI = _this$props.signLangId,
|
|
@@ -117,7 +115,8 @@ var SignLangDecorator = exports.SignLangDecorator = (0, _hoc["default"])(default
|
|
|
117
115
|
_this.signLangDelayId = null;
|
|
118
116
|
return _this;
|
|
119
117
|
}
|
|
120
|
-
|
|
118
|
+
_inherits(_Class, _Component);
|
|
119
|
+
return _createClass(_Class, [{
|
|
121
120
|
key: "render",
|
|
122
121
|
value: function render() {
|
|
123
122
|
var props = Object.assign({}, this.props);
|
|
@@ -131,8 +130,7 @@ var SignLangDecorator = exports.SignLangDecorator = (0, _hoc["default"])(default
|
|
|
131
130
|
}));
|
|
132
131
|
}
|
|
133
132
|
}]);
|
|
134
|
-
|
|
135
|
-
}(_react.Component), _class.displayName = 'SignLangDecorator', _class.propTypes = /** @lends webos/signLang.SignLangDecorator.prototype */{
|
|
133
|
+
}(_react.Component), _Class.displayName = 'SignLangDecorator', _Class.propTypes = /** @lends webos/signLang.SignLangDecorator.prototype */{
|
|
136
134
|
/**
|
|
137
135
|
* Unique ID for sign language.
|
|
138
136
|
*
|
|
@@ -147,6 +145,6 @@ var SignLangDecorator = exports.SignLangDecorator = (0, _hoc["default"])(default
|
|
|
147
145
|
* @public
|
|
148
146
|
*/
|
|
149
147
|
signLangOption: _propTypes["default"].object
|
|
150
|
-
},
|
|
148
|
+
}, _Class;
|
|
151
149
|
});
|
|
152
150
|
var _default = exports["default"] = SignLangDecorator;
|
package/signLang/index.js
CHANGED
|
@@ -23,4 +23,4 @@ Object.defineProperty(exports, "stopSignLang", {
|
|
|
23
23
|
});
|
|
24
24
|
var _signLang = require("./signLang");
|
|
25
25
|
var _SignLangDecorator = _interopRequireDefault(require("./SignLangDecorator"));
|
|
26
|
-
function _interopRequireDefault(
|
|
26
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
package/signLang/signLang.js
CHANGED
|
@@ -7,11 +7,11 @@ exports.stopSignLang = exports.startSignLang = void 0;
|
|
|
7
7
|
var _pmloglib = require("@enact/webos/pmloglib");
|
|
8
8
|
var _LS2Request = _interopRequireDefault(require("../LS2Request"));
|
|
9
9
|
var _platform = require("../platform");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
function _defineProperty(
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable no-console */
|
|
16
16
|
var signLangEnabled = null;
|
|
17
17
|
var appId = '';
|
|
@@ -9,22 +9,22 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _hoc = _interopRequireDefault(require("@enact/core/hoc"));
|
|
10
10
|
var _WithRef = require("@enact/core/internal/WithRef");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
function _defineProperty(
|
|
16
|
-
function _classCallCheck(
|
|
17
|
-
function _defineProperties(
|
|
18
|
-
function _createClass(
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
15
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
22
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
23
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
26
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
|
-
function _getPrototypeOf(
|
|
25
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
26
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
27
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
28
28
|
* VoiceControlDecorator is a higher-order component that adds a callback for voice event
|
|
29
29
|
* to its wrapped component.
|
|
30
30
|
*
|
|
@@ -76,20 +76,19 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
76
76
|
* @public
|
|
77
77
|
*/
|
|
78
78
|
var VoiceControlDecorator = exports.VoiceControlDecorator = (0, _hoc["default"])(function (config, Wrapped) {
|
|
79
|
-
var
|
|
79
|
+
var _Class;
|
|
80
80
|
var WithRefComponent = (0, _WithRef.WithRef)(Wrapped);
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
var _super = _createSuper(_class);
|
|
84
|
-
function _class(props) {
|
|
81
|
+
return _Class = /*#__PURE__*/function (_Component) {
|
|
82
|
+
function _Class(props) {
|
|
85
83
|
var _this;
|
|
86
|
-
_classCallCheck(this,
|
|
87
|
-
_this =
|
|
84
|
+
_classCallCheck(this, _Class);
|
|
85
|
+
_this = _callSuper(this, _Class, [props]);
|
|
88
86
|
_this.node = null;
|
|
89
87
|
_this.nodeRef = /*#__PURE__*/(0, _react.createRef)();
|
|
90
88
|
return _this;
|
|
91
89
|
}
|
|
92
|
-
|
|
90
|
+
_inherits(_Class, _Component);
|
|
91
|
+
return _createClass(_Class, [{
|
|
93
92
|
key: "componentDidMount",
|
|
94
93
|
value: function componentDidMount() {
|
|
95
94
|
this.node = this.nodeRef.current;
|
|
@@ -114,8 +113,7 @@ var VoiceControlDecorator = exports.VoiceControlDecorator = (0, _hoc["default"])
|
|
|
114
113
|
}));
|
|
115
114
|
}
|
|
116
115
|
}]);
|
|
117
|
-
|
|
118
|
-
}(_react.Component), _class.displayName = 'VoiceControlDecorator', _class.propTypes = /** @lends webos/speech.VoiceControlDecorator.prototype */{
|
|
116
|
+
}(_react.Component), _Class.displayName = 'VoiceControlDecorator', _Class.propTypes = /** @lends webos/speech.VoiceControlDecorator.prototype */{
|
|
119
117
|
/**
|
|
120
118
|
* Callback to be executed when a wrapped element's `data-webos-voice-intent` is activated.
|
|
121
119
|
*
|
|
@@ -124,6 +122,6 @@ var VoiceControlDecorator = exports.VoiceControlDecorator = (0, _hoc["default"])
|
|
|
124
122
|
* @public
|
|
125
123
|
*/
|
|
126
124
|
onVoice: _propTypes["default"].func.isRequired
|
|
127
|
-
},
|
|
125
|
+
}, _Class;
|
|
128
126
|
});
|
|
129
127
|
var _default = exports["default"] = VoiceControlDecorator;
|
package/speech/index.js
CHANGED
|
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "readAlert", {
|
|
|
17
17
|
});
|
|
18
18
|
var _readAlert = _interopRequireDefault(require("./readAlert"));
|
|
19
19
|
var _VoiceControlDecorator = _interopRequireDefault(require("./VoiceControlDecorator"));
|
|
20
|
-
function _interopRequireDefault(
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
package/speech/readAlert.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.readAlert = exports["default"] = void 0;
|
|
7
7
|
var _LS2Request = _interopRequireDefault(require("../LS2Request"));
|
|
8
8
|
var _platform = require("../platform");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
/* eslint-disable no-console */
|
|
11
11
|
|
|
12
12
|
var audioGuidanceEnabled = null;
|