@enact/webos 4.7.9 → 4.7.11
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 +16 -0
- package/LS2Request/LS2Request.js +7 -7
- package/README.md +1 -1
- package/package.json +2 -2
- package/speech/VoiceControlDecorator.js +52 -52
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,26 @@
|
|
|
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
|
+
## [4.7.11] - 2024-05-13
|
|
6
|
+
|
|
7
|
+
No significant changes.
|
|
8
|
+
|
|
9
|
+
## [4.7.10] - 2024-03-05
|
|
10
|
+
|
|
11
|
+
No significant changes.
|
|
12
|
+
|
|
5
13
|
## [4.7.9] - 2023-12-08
|
|
6
14
|
|
|
7
15
|
No significant changes.
|
|
8
16
|
|
|
17
|
+
## [4.5.6] - 2023-11-30
|
|
18
|
+
|
|
19
|
+
No significant changes.
|
|
20
|
+
|
|
21
|
+
## [4.0.13] - 2022-11-29
|
|
22
|
+
|
|
23
|
+
No significant changes.
|
|
24
|
+
|
|
9
25
|
## [4.7.8] - 2023-11-17
|
|
10
26
|
|
|
11
27
|
No significant changes.
|
package/LS2Request/LS2Request.js
CHANGED
|
@@ -8,13 +8,13 @@ var _util = require("@enact/core/util");
|
|
|
8
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
9
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
10
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
-
function _toPropertyKey(
|
|
12
|
-
function _toPrimitive(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
|
+
* Provides a class for making LS2 service requests on webOS platforms.
|
|
14
|
+
*
|
|
15
|
+
* @module webos/LS2Request
|
|
16
|
+
* @exports LS2Request
|
|
17
|
+
*/
|
|
18
18
|
var refs = {};
|
|
19
19
|
var adjustPath = function adjustPath(path) {
|
|
20
20
|
if (!/^(luna|palm):\/\//.test(path)) path = 'luna://' + path;
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ npm install --save @enact/webos
|
|
|
12
12
|
|
|
13
13
|
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
|
|
14
14
|
|
|
15
|
-
Copyright (c) 2012-
|
|
15
|
+
Copyright (c) 2012-2024 LG Electronics
|
|
16
16
|
|
|
17
17
|
Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/webos",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.11",
|
|
4
4
|
"description": "webOS support library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@enact/core": "^4.7.
|
|
34
|
+
"@enact/core": "^4.7.11",
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react": "^18.2.0",
|
|
37
37
|
"react-dom": "^18.2.0"
|
|
@@ -16,8 +16,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
16
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
17
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
18
18
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
-
function _toPropertyKey(
|
|
20
|
-
function _toPrimitive(
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
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
21
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
22
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
23
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -25,56 +25,56 @@ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "
|
|
|
25
25
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
27
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
28
|
+
* VoiceControlDecorator is a higher-order component that adds a callback for voice event
|
|
29
|
+
* to its wrapped component.
|
|
30
|
+
*
|
|
31
|
+
* By default, `onVoice` handler will be added to the node where `data-webos-voice-intent` attribute is declared.
|
|
32
|
+
* In addition, if you need to specify a target node, `data-webos-voice-event-target` attribute can be used.
|
|
33
|
+
*
|
|
34
|
+
* Usage:
|
|
35
|
+
* ```
|
|
36
|
+
* import {Component} from 'react';
|
|
37
|
+
* import Item from '@enact/moonstone/Item';
|
|
38
|
+
* import {VoiceControlDecorator} from '@enact/webos/speech';
|
|
39
|
+
*
|
|
40
|
+
* const VoiceDiv = VoiceControlDecorator('div');
|
|
41
|
+
* const VoiceItem = VoiceControlDecorator(Item);
|
|
42
|
+
*
|
|
43
|
+
* class Sample extends Component {
|
|
44
|
+
* handlePlayListControl = (e) => {
|
|
45
|
+
* const {intent, control} = e.detail;
|
|
46
|
+
* // Change the app status refer to the `control` value.
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* handlePlayContent = (e) => {
|
|
50
|
+
* const {intent, value} = e.detail;
|
|
51
|
+
* // Play content
|
|
52
|
+
* }
|
|
53
|
+
*
|
|
54
|
+
* render () {
|
|
55
|
+
* return(
|
|
56
|
+
* <div>
|
|
57
|
+
* <VoiceDiv
|
|
58
|
+
* data-webos-voice-intent='PlayListControl'
|
|
59
|
+
* onVoice={this.handlePlayListControl}
|
|
60
|
+
* />
|
|
61
|
+
* <VoiceItem
|
|
62
|
+
* data-webos-voice-intent='Select PlayContent'
|
|
63
|
+
* onVoice={this.handlePlayContent}
|
|
64
|
+
* >
|
|
65
|
+
* The Dark Knight
|
|
66
|
+
* </VoiceItem>
|
|
67
|
+
* </div>
|
|
68
|
+
* );
|
|
69
|
+
* }
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @class VoiceControlDecorator
|
|
74
|
+
* @memberof webos/speech
|
|
75
|
+
* @hoc
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
78
|
var VoiceControlDecorator = exports.VoiceControlDecorator = (0, _hoc["default"])(function (config, Wrapped) {
|
|
79
79
|
var _class;
|
|
80
80
|
return _class = /*#__PURE__*/function (_Component) {
|