@gamelearn/arcade-components 1.3.2 → 1.3.4
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/dist/components/conversational-pro-component/components/ConversationalProComponent.js +8 -4
- package/dist/components/dialog-component/components/DialogComponent.js +8 -4
- package/dist/components/writer-puzzle-component/components/FeedbackComponent.js +1 -6
- package/dist/components/writer-puzzle-component/components/WriterPuzzleComponent.js +0 -37
- package/dist/components/writer-puzzle-component/mocks/mockForStory.js +5 -5
- package/package.json +1 -1
package/dist/components/conversational-pro-component/components/ConversationalProComponent.js
CHANGED
|
@@ -123,13 +123,13 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
123
123
|
return !decision ? getCurrentMessage() : {};
|
|
124
124
|
}, [getCurrentMessage, decision]);
|
|
125
125
|
var playSpeech = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
126
|
-
var payload;
|
|
126
|
+
var payload, url;
|
|
127
127
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
128
128
|
while (1) {
|
|
129
129
|
switch (_context.prev = _context.next) {
|
|
130
130
|
case 0:
|
|
131
131
|
if (!(currentLineData.voice.id && currentMessage)) {
|
|
132
|
-
_context.next =
|
|
132
|
+
_context.next = 7;
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -139,7 +139,7 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
if (!(payload.voiceId && payload.text)) {
|
|
142
|
-
_context.next =
|
|
142
|
+
_context.next = 7;
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -150,12 +150,16 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
case 5:
|
|
153
|
+
url = _context.sent;
|
|
154
|
+
playSound(url);
|
|
155
|
+
|
|
156
|
+
case 7:
|
|
153
157
|
case "end":
|
|
154
158
|
return _context.stop();
|
|
155
159
|
}
|
|
156
160
|
}
|
|
157
161
|
}, _callee);
|
|
158
|
-
})), [currentLineData.voice, currentMessage, getVoice]); // Recupera la antigua linea de la conversacion para conservar los personajes en voice-over
|
|
162
|
+
})), [currentLineData.voice, currentMessage, getVoice, playSound]); // Recupera la antigua linea de la conversacion para conservar los personajes en voice-over
|
|
159
163
|
|
|
160
164
|
var leftWithSlots = lines.slice(0, currentLine + 1).reverse().find(function (line) {
|
|
161
165
|
return line.slots;
|
|
@@ -150,13 +150,13 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
150
150
|
return null;
|
|
151
151
|
}, [translate]);
|
|
152
152
|
var playSpeech = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
153
|
-
var payload;
|
|
153
|
+
var payload, url;
|
|
154
154
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
155
155
|
while (1) {
|
|
156
156
|
switch (_context.prev = _context.next) {
|
|
157
157
|
case 0:
|
|
158
158
|
if (!currentLine.voice.id) {
|
|
159
|
-
_context.next =
|
|
159
|
+
_context.next = 7;
|
|
160
160
|
break;
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -166,7 +166,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
if (!(payload.voiceId && payload.text)) {
|
|
169
|
-
_context.next =
|
|
169
|
+
_context.next = 7;
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -177,12 +177,16 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
177
177
|
});
|
|
178
178
|
|
|
179
179
|
case 5:
|
|
180
|
+
url = _context.sent;
|
|
181
|
+
playSound(url);
|
|
182
|
+
|
|
183
|
+
case 7:
|
|
180
184
|
case "end":
|
|
181
185
|
return _context.stop();
|
|
182
186
|
}
|
|
183
187
|
}
|
|
184
188
|
}, _callee);
|
|
185
|
-
})), [currentLine === null || currentLine === void 0 ? void 0 : currentLine.voice, getVoice, currentMessage.text]);
|
|
189
|
+
})), [currentLine === null || currentLine === void 0 ? void 0 : currentLine.voice, getVoice, currentMessage.text, playSound]);
|
|
186
190
|
var getCurrentVisible = (0, _react.useCallback)(function (uid) {
|
|
187
191
|
var object;
|
|
188
192
|
scene.traverseVisible(function (node) {
|
|
@@ -63,11 +63,6 @@ var FeedbackComponent = function FeedbackComponent(_ref) {
|
|
|
63
63
|
return null;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
var retryDecisions = function retryDecisions() {
|
|
67
|
-
closingAction();
|
|
68
|
-
retryAction();
|
|
69
|
-
};
|
|
70
|
-
|
|
71
66
|
var close = function close() {
|
|
72
67
|
playSound('click-ui');
|
|
73
68
|
closingAction();
|
|
@@ -107,7 +102,7 @@ var FeedbackComponent = function FeedbackComponent(_ref) {
|
|
|
107
102
|
close();
|
|
108
103
|
} else {
|
|
109
104
|
playSound('click-ui');
|
|
110
|
-
|
|
105
|
+
retryAction();
|
|
111
106
|
}
|
|
112
107
|
}
|
|
113
108
|
}, translate(checkCorrect() ? 'puzzles.continue' : 'puzzles.retry')), !retry && /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -9,8 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
12
|
var _FixedComponent = _interopRequireDefault(require("./FixedComponent"));
|
|
15
13
|
|
|
16
14
|
var _ElectionComponent = _interopRequireDefault(require("./ElectionComponent"));
|
|
@@ -500,40 +498,5 @@ WriterPuzzleComponent.defaultProps = {
|
|
|
500
498
|
documentTitle: '',
|
|
501
499
|
texts: []
|
|
502
500
|
};
|
|
503
|
-
WriterPuzzleComponent.propTypes = {
|
|
504
|
-
emitEvent: _propTypes.default.func,
|
|
505
|
-
info: _propTypes.default.shape({
|
|
506
|
-
description: _propTypes.default.string,
|
|
507
|
-
instructions: _propTypes.default.string,
|
|
508
|
-
resolve: _propTypes.default.shape({}),
|
|
509
|
-
solution: _propTypes.default.shape({
|
|
510
|
-
right: _propTypes.default.shape({
|
|
511
|
-
rewards: _propTypes.default.arrayOf(_propTypes.default.shape({}))
|
|
512
|
-
}),
|
|
513
|
-
wrong: _propTypes.default.shape({
|
|
514
|
-
rewards: _propTypes.default.arrayOf(_propTypes.default.shape({}))
|
|
515
|
-
})
|
|
516
|
-
}),
|
|
517
|
-
hint: _propTypes.default.shape({})
|
|
518
|
-
}),
|
|
519
|
-
styles: _propTypes.default.string,
|
|
520
|
-
nodeId: _propTypes.default.string,
|
|
521
|
-
retry: _propTypes.default.bool,
|
|
522
|
-
skip: _propTypes.default.bool,
|
|
523
|
-
type: _propTypes.default.string,
|
|
524
|
-
documentTitle: _propTypes.default.string,
|
|
525
|
-
texts: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
526
|
-
type: _propTypes.default.string,
|
|
527
|
-
fullText: _propTypes.default.string,
|
|
528
|
-
electionTexts: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
529
|
-
previewText: _propTypes.default.string,
|
|
530
|
-
correct: _propTypes.default.bool,
|
|
531
|
-
fullText: _propTypes.default.string,
|
|
532
|
-
feedback: _propTypes.default.shape({
|
|
533
|
-
rewards: _propTypes.default.arrayOf(_propTypes.default.shape({}))
|
|
534
|
-
})
|
|
535
|
-
}))
|
|
536
|
-
}))
|
|
537
|
-
};
|
|
538
501
|
var _default = WriterPuzzleComponent;
|
|
539
502
|
exports.default = _default;
|
|
@@ -33,13 +33,13 @@ var messages = {
|
|
|
33
33
|
fullText12: ' <p>Mucho Texto aqui a desglosar bla bla bla bla</p>',
|
|
34
34
|
fullText13: ' <p>Mucho Texto aqui a desglosar bla bla bla bla</p>',
|
|
35
35
|
previewText1: 'Preview Text 1',
|
|
36
|
-
previewText2: '
|
|
37
|
-
previewText3: '
|
|
36
|
+
previewText2: 'este pinta bien ;)',
|
|
37
|
+
previewText3: 'correcto este',
|
|
38
38
|
previewText4: 'Preview Text 4',
|
|
39
39
|
previewText5: 'Preview Text 5',
|
|
40
40
|
previewText6: 'Preview Text 6',
|
|
41
|
-
previewText7: '
|
|
42
|
-
previewText8: 'Preview Text
|
|
41
|
+
previewText7: '👍🏻 here!',
|
|
42
|
+
previewText8: 'Preview Text 8',
|
|
43
43
|
feedbackTitle1: 'Has fallado!',
|
|
44
44
|
feedbackTitle2: 'Has Acertado!',
|
|
45
45
|
feedbackTitle3: 'Has fallado!',
|
|
@@ -64,7 +64,7 @@ var mock = {
|
|
|
64
64
|
type: 'election',
|
|
65
65
|
electionTexts: [{
|
|
66
66
|
previewText: messages.previewText3,
|
|
67
|
-
correct:
|
|
67
|
+
correct: true,
|
|
68
68
|
fullText: messages.fullText6,
|
|
69
69
|
feedback: {
|
|
70
70
|
title: null,
|