@gamelearn/arcade-components 0.20.6 → 0.20.7

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.
@@ -18,6 +18,7 @@ var emitEvent = function emitEvent(_ref) {
18
18
 
19
19
  var mockProps = {
20
20
  emitEvent: emitEvent,
21
+ soundActions: [],
21
22
  slug: 'auto-pre-component',
22
23
  description: 'A while back I needed to count the amount of letters that a piece of text in an email template had (to avoid passing any character limits). Unfortunately, I could not think of a quick way to do so on my macbook and I therefore turned to the Internet. Character Count Online is a free online character',
23
24
  questions: [{
@@ -210,12 +210,14 @@ var DecisionComponent = function DecisionComponent(_ref) {
210
210
  var Body = function Body() {
211
211
  return inherited ? /*#__PURE__*/_react.default.createElement(CharactersWrapper, null, selectedView === 'results' ? /*#__PURE__*/_react.default.createElement(_Feedback.default, {
212
212
  question: question,
213
+ soundActions: soundActions,
213
214
  inherited: inherited,
214
215
  choice: resultChoice,
215
216
  rewards: resultChoice.rewards || [],
216
217
  emitEvent: emitEvent
217
218
  }) : null) : /*#__PURE__*/_react.default.createElement(PopupWrapper, null, /*#__PURE__*/_react.default.createElement(_DecisionBody.default, bodyProps, /*#__PURE__*/_react.default.createElement(_Feedback.default, {
218
219
  question: question,
220
+ soundActions: soundActions,
219
221
  inherited: inherited,
220
222
  choice: resultChoice,
221
223
  rewards: resultChoice.rewards || [],
@@ -15,7 +15,8 @@ var FeedBack = function FeedBack(_ref) {
15
15
  var choice = _ref.choice,
16
16
  inherited = _ref.inherited,
17
17
  rewards = _ref.rewards,
18
- emitEvent = _ref.emitEvent;
18
+ emitEvent = _ref.emitEvent,
19
+ soundActions = _ref.soundActions;
19
20
 
20
21
  var Wrapper = function Wrapper(_ref2) {
21
22
  var children = _ref2.children;
@@ -39,6 +40,7 @@ var FeedBack = function FeedBack(_ref) {
39
40
  }) : /*#__PURE__*/_react.default.createElement("span", {
40
41
  className: "icon-error-circle-black color--error"
41
42
  }), /*#__PURE__*/_react.default.createElement("p", null, choice.feedback))) : null, !noRewards ? /*#__PURE__*/_react.default.createElement(_RewardsComponent.default, {
43
+ soundActions: soundActions,
42
44
  rewards: choice.right ? rewards : choice.rewards,
43
45
  emitEvent: emitEvent
44
46
  }) : null);
@@ -52,7 +52,7 @@ var ImageComponent = function ImageComponent(_ref) {
52
52
  type: 'finishMedia',
53
53
  payload: item
54
54
  });
55
- }, [imgId_labelId, imgName, emitEvent, documentType]);
55
+ }, [playSound, imgId_labelId, imgName, documentType, emitEvent]);
56
56
  (0, _react.useEffect)(function () {
57
57
  if (!visible) {
58
58
  close();
@@ -16,6 +16,7 @@ var emitEvent = function emitEvent(_ref) {
16
16
  };
17
17
 
18
18
  var mockProps = {
19
+ soundActions: [],
19
20
  emitEvent: emitEvent,
20
21
  img: {
21
22
  imgId: 'alfalfa',
@@ -29,6 +30,7 @@ var mockProps = {
29
30
  };
30
31
  exports.mockProps = mockProps;
31
32
  var mockWithNotVisible = {
33
+ soundActions: [],
32
34
  emitEvent: emitEvent,
33
35
  img: {
34
36
  imgId: 'alfalfa2',
@@ -42,6 +44,7 @@ var mockWithNotVisible = {
42
44
  };
43
45
  exports.mockWithNotVisible = mockWithNotVisible;
44
46
  var mockWithImageNotViewed = {
47
+ soundActions: [],
45
48
  emitEvent: emitEvent,
46
49
  img: {
47
50
  imgId: 'alfalfa2',
@@ -10,6 +10,7 @@ var emitEvent = function emitEvent() {
10
10
  };
11
11
 
12
12
  var mockProps = {
13
+ soundActions: [],
13
14
  emitEvent: emitEvent,
14
15
  name: 'lecture',
15
16
  required: true,
@@ -10,6 +10,7 @@ var emitEvent = function emitEvent() {
10
10
  };
11
11
 
12
12
  var mockProps = {
13
+ soundActions: [],
13
14
  title: 'title',
14
15
  text: 'text',
15
16
  buttonText: 'click',
@@ -16,6 +16,7 @@ var emitEvent = function emitEvent(action) {
16
16
  var mockProps = {
17
17
  emitEvent: emitEvent,
18
18
  documentType: 'lesson',
19
+ soundActions: [],
19
20
  name: 'pdf',
20
21
  required: true,
21
22
  document: {
@@ -73,6 +73,7 @@ var emitEvent = function emitEvent(_ref) {
73
73
  };
74
74
 
75
75
  var mockProps1 = {
76
+ soundActions: [],
76
77
  emitEvent: emitEvent,
77
78
  rewards: [{
78
79
  id: 'ki4qrkam',
@@ -83,6 +84,7 @@ var mockProps1 = {
83
84
  };
84
85
  exports.mockProps1 = mockProps1;
85
86
  var mockProps2 = {
87
+ soundActions: [],
86
88
  emitEvent: emitEvent,
87
89
  rewards: [{
88
90
  id: 'ki4qrkam',
@@ -98,6 +100,7 @@ var mockProps2 = {
98
100
  };
99
101
  exports.mockProps2 = mockProps2;
100
102
  var mockProps3 = {
103
+ soundActions: [],
101
104
  emitEvent: emitEvent,
102
105
  rewards: [{
103
106
  id: 'ki4qrkam',
@@ -118,6 +121,7 @@ var mockProps3 = {
118
121
  };
119
122
  exports.mockProps3 = mockProps3;
120
123
  var mockProps4 = {
124
+ soundActions: [],
121
125
  emitEvent: emitEvent,
122
126
  rewards: [{
123
127
  id: 'ki4qrkam',
@@ -188,6 +192,7 @@ var mockProps4 = {
188
192
  };
189
193
  exports.mockProps4 = mockProps4;
190
194
  var mockProps5 = {
195
+ soundActions: [],
191
196
  emitEvent: emitEvent,
192
197
  rewards: [{
193
198
  id: 'ki4qrkam',
@@ -17,6 +17,7 @@ var emitEvent = function emitEvent(_ref) {
17
17
  };
18
18
 
19
19
  var mockProps = {
20
- emitEvent: emitEvent
20
+ emitEvent: emitEvent,
21
+ soundActions: []
21
22
  };
22
23
  exports.mockProps = mockProps;
@@ -252,7 +252,8 @@ var TestComponent = function TestComponent(_ref) {
252
252
  questions: questions,
253
253
  updateForm: updateForm,
254
254
  showResults: showResults,
255
- translate: translate
255
+ translate: translate,
256
+ soundActions: soundActions
256
257
  }) : /*#__PURE__*/_react.default.createElement(_Results.default, {
257
258
  reviewTest: function reviewTest() {
258
259
  changeFirst(false);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "license": "Gamelearn",
4
- "version": "0.20.6",
4
+ "version": "0.20.7",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist",