@gamelearn/arcade-components 0.2.0 → 0.4.1-beta-terminal
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/arcade-render/background/scene-elements/index.js +4 -2
- package/dist/components/arcade-render/element/AnimateElement.js +7 -9
- package/dist/components/arcade-render/element/index.js +7 -5
- package/dist/components/arcade-render/elements-list/index.js +4 -2
- package/dist/components/arcade-render/light/useLight.js +1 -0
- package/dist/components/arcade-render/loading/Loading.js +3 -4
- package/dist/components/arcade-render/loading/LoadingLogic.js +4 -4
- package/dist/components/arcade-render/mocks/index.js +3 -3
- package/dist/components/arcade-render/scene/index.js +8 -8
- package/dist/components/chained-image-click-puzzle-component/components/ChainedImageClickPuzzleComponent.js +73 -0
- package/dist/components/chained-image-click-puzzle-component/components/CurrentImagePuzzle.js +155 -0
- package/dist/components/chained-image-click-puzzle-component/index.js +13 -0
- package/dist/components/chained-image-click-puzzle-component/mocks/mockForStory.js +163 -0
- package/dist/components/comic-component/mocks/mockForStory.js +4 -4
- package/dist/components/conversational-pro-component/components/scene/Panel.js +1 -6
- package/dist/components/conversational-pro-component/mocks/mockForStory.js +20 -20
- package/dist/components/drag-item-puzzle-component/components/DragItemPuzzleComponent.js +329 -0
- package/dist/components/drag-item-puzzle-component/components/Messages.js +55 -0
- package/dist/components/drag-item-puzzle-component/index.js +13 -0
- package/dist/components/drag-item-puzzle-component/mocks/mockForStory.js +79 -0
- package/dist/components/hacker-puzzle-component/components/Area/index.js +150 -0
- package/dist/components/hacker-puzzle-component/components/Feedback/index.js +72 -0
- package/dist/components/hacker-puzzle-component/components/KonvaMapper/index.js +230 -0
- package/dist/components/hanged-puzzle-component/components/HangedPuzzleComponent.js +429 -0
- package/dist/components/{pikachu-component → hanged-puzzle-component}/index.js +2 -2
- package/dist/components/hanged-puzzle-component/mocks/mockForStory.js +54 -0
- package/dist/components/hanged-puzzle-component/utils.js +36 -0
- package/dist/components/image-click-puzzle-component/components/ImageClickPuzzleComponent.js +23 -0
- package/dist/components/image-click-puzzle-component/index.js +13 -0
- package/dist/components/image-click-puzzle-component/mocks/mockForStory.js +423 -0
- package/dist/components/image-click-wrapper-component/components/Area/index.js +150 -0
- package/dist/components/image-click-wrapper-component/components/Feedback/index.js +50 -0
- package/dist/components/image-click-wrapper-component/components/ImageClickWrapperComponent.js +365 -0
- package/dist/components/image-click-wrapper-component/components/KonvaMapper/index.js +230 -0
- package/dist/components/image-click-wrapper-component/index.js +13 -0
- package/dist/components/image-click-wrapper-component/mocks/mockForStory.js +307 -0
- package/dist/components/image-component/mocks/mockForStory.js +3 -3
- package/dist/components/index.js +56 -0
- package/dist/components/inventory-item/components/InventoryItem.js +2 -1
- package/dist/components/keyboard-puzzle-component/mocks/mockForStory.js +1 -1
- package/dist/components/login-puzzle-component/mocks/mockForStory.js +3 -3
- package/dist/components/pdf-component/components/PdfComponent.js +40 -7
- package/dist/components/pdf-component/components/PdfVisor.js +86 -33
- package/dist/components/pdf-component/mocks/mockForProps.js +21 -5
- package/dist/components/terminal-puzzle-component/components/FilesGroup/Item.js +32 -0
- package/dist/components/terminal-puzzle-component/components/FilesGroup/index.js +74 -0
- package/dist/components/terminal-puzzle-component/components/Image/index.js +26 -0
- package/dist/components/terminal-puzzle-component/components/TerminalPuzzleComponent.js +163 -0
- package/dist/components/terminal-puzzle-component/components/Visor/index.js +133 -0
- package/dist/components/terminal-puzzle-component/components/utils/index.js +29 -0
- package/dist/components/terminal-puzzle-component/index.js +13 -0
- package/dist/components/terminal-puzzle-component/mocks/mockForStory.js +190 -0
- package/dist/components/video-component/mocks/mockForStory.js +5 -5
- package/dist/components/video-visor/mocks/mockForStory.js +4 -4
- package/dist/components/web-builder-puzzle-component/Popups/PopupColorComponent/index.js +99 -0
- package/dist/components/web-builder-puzzle-component/Popups/PopupImageComponent/index.js +113 -0
- package/dist/components/web-builder-puzzle-component/Popups/PopupTextComponent/index.js +122 -0
- package/dist/components/web-builder-puzzle-component/Popups/index.js +31 -0
- package/dist/components/web-builder-puzzle-component/Templates/Bank.js +98 -0
- package/dist/components/web-builder-puzzle-component/Templates/Facebook.js +39 -0
- package/dist/components/web-builder-puzzle-component/Templates/resourcePath.js +9 -0
- package/dist/components/web-builder-puzzle-component/components/EditButton/index.js +28 -0
- package/dist/components/web-builder-puzzle-component/components/Feedback/index.js +38 -0
- package/dist/components/web-builder-puzzle-component/components/PublishButton/index.js +29 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderBody/BankBody.js +124 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderBody/FacebookBody.js +154 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderBody/index.js +32 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderFront/index.js +98 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderHeader/BankHeader.js +92 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderHeader/FacebookHeader.js +50 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderHeader/index.js +47 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderPuzzleComponent.js +337 -0
- package/dist/components/web-builder-puzzle-component/components/WebBuilderTopBar/index.js +36 -0
- package/dist/components/web-builder-puzzle-component/index.js +13 -0
- package/dist/components/web-builder-puzzle-component/mocks/mockForStory.js +29 -0
- package/dist/components/writer-puzzle-component/components/ElectionComponent.js +89 -0
- package/dist/components/writer-puzzle-component/components/FeedbackComponent.js +138 -0
- package/dist/components/writer-puzzle-component/components/FeedbackElement.js +40 -0
- package/dist/components/writer-puzzle-component/components/FinishedTextComponent.js +36 -0
- package/dist/components/writer-puzzle-component/components/FixedComponent.js +166 -0
- package/dist/components/writer-puzzle-component/components/Rewards.js +203 -0
- package/dist/components/writer-puzzle-component/components/SingleElection.js +141 -0
- package/dist/components/writer-puzzle-component/components/WriterPuzzleComponent.js +552 -0
- package/dist/components/writer-puzzle-component/index.js +13 -0
- package/dist/components/writer-puzzle-component/mocks/mockForStory.js +861 -0
- package/dist/helpers/drawLOD.js +35 -47
- package/dist/helpers/useGLB.js +2 -1
- package/package.json +9 -4
- package/dist/components/pikachu-component/components/PikachuComponent.js +0 -24
- package/dist/components/pikachu-component/mocks/mockForStory.js +0 -15
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mockProps4 = exports.mockProps3 = exports.mockProps2 = exports.mockProps = void 0;
|
|
7
|
+
|
|
8
|
+
var emitEvent = function emitEvent() {
|
|
9
|
+
console.log('Emit event called');
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
var soundActions = [function (sound) {
|
|
13
|
+
console.log('PlaySound called :', sound);
|
|
14
|
+
}, function () {}];
|
|
15
|
+
var mockProps = {
|
|
16
|
+
emitEvent: emitEvent,
|
|
17
|
+
disableExit: function disableExit() {},
|
|
18
|
+
setResolveAction: function setResolveAction() {},
|
|
19
|
+
soundActions: soundActions,
|
|
20
|
+
transitionEffects: null,
|
|
21
|
+
audioId: '',
|
|
22
|
+
itemOrder: 1,
|
|
23
|
+
info: {
|
|
24
|
+
hint: {
|
|
25
|
+
active: true,
|
|
26
|
+
desc: 'hint',
|
|
27
|
+
rewards: []
|
|
28
|
+
},
|
|
29
|
+
resolve: {
|
|
30
|
+
rewards: []
|
|
31
|
+
},
|
|
32
|
+
solution: {
|
|
33
|
+
right: {
|
|
34
|
+
desc: 'correctSolution',
|
|
35
|
+
desc_labelId: 'alfalfa01',
|
|
36
|
+
rewards: []
|
|
37
|
+
},
|
|
38
|
+
wrong: {
|
|
39
|
+
desc: 'wrongSolution',
|
|
40
|
+
desc_labelId: 'fabada01',
|
|
41
|
+
rewards: [{
|
|
42
|
+
id: 'grade',
|
|
43
|
+
name: 'grade',
|
|
44
|
+
points: -17,
|
|
45
|
+
type: 'grade'
|
|
46
|
+
}]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
instructions: 'instructions'
|
|
50
|
+
},
|
|
51
|
+
image: {
|
|
52
|
+
imgName: 'gato5.jpg',
|
|
53
|
+
img: {
|
|
54
|
+
url: 'https://min.gamelearn.io/css-resources/gamelearn/resources/image-click.jpg',
|
|
55
|
+
imgName: 'gato5.jpg',
|
|
56
|
+
resourceId: '6007f80eac41ad001120f135'
|
|
57
|
+
},
|
|
58
|
+
width: 1280,
|
|
59
|
+
height: 720
|
|
60
|
+
},
|
|
61
|
+
areas: [{
|
|
62
|
+
id: '1601910616179',
|
|
63
|
+
name: 'a',
|
|
64
|
+
x: 0,
|
|
65
|
+
y: 0,
|
|
66
|
+
draggable: true,
|
|
67
|
+
points: [74.1584158415841, 423.99133663366337, 229.20792079207916, 366.96163366336634, 516.1386138613861, 482.8032178217822, 644.4554455445544, 710.9220297029703, 56.33663366336629, 712.7042079207921],
|
|
68
|
+
strokeWidth: 2,
|
|
69
|
+
stroke: '#44d7ab',
|
|
70
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
71
|
+
closed: true
|
|
72
|
+
}, {
|
|
73
|
+
id: '1601910626254',
|
|
74
|
+
name: 'b',
|
|
75
|
+
x: 0,
|
|
76
|
+
y: 0,
|
|
77
|
+
draggable: true,
|
|
78
|
+
points: [607.0297029702971, 343.79331683168317, 783.4653465346535, 388.3477722772277, 865.4455445544554, 539.8329207920792, 1138.118811881188, 593.2982673267327, 1262.871287128713, 358.0507425742574, 1262.871287128713, 46.16955445544554, 1193.3663366336634, 12.308168316831683, 1018.7128712871288, 19.43688118811881, 746.0396039603961, 213.69430693069307, 555.3465346534654, 268.94183168316835],
|
|
79
|
+
strokeWidth: 2,
|
|
80
|
+
stroke: '#44d7ab',
|
|
81
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
82
|
+
closed: true
|
|
83
|
+
}],
|
|
84
|
+
badAreas: [],
|
|
85
|
+
hasClickOrder: true,
|
|
86
|
+
hasHighlights: true
|
|
87
|
+
};
|
|
88
|
+
exports.mockProps = mockProps;
|
|
89
|
+
var mockProps2 = {
|
|
90
|
+
emitEvent: emitEvent,
|
|
91
|
+
disableExit: function disableExit() {},
|
|
92
|
+
setResolveAction: function setResolveAction() {},
|
|
93
|
+
transitionEffects: null,
|
|
94
|
+
audioId: '',
|
|
95
|
+
itemOrder: 1,
|
|
96
|
+
info: {
|
|
97
|
+
hint: {
|
|
98
|
+
active: true,
|
|
99
|
+
desc: 'hint',
|
|
100
|
+
rewards: []
|
|
101
|
+
},
|
|
102
|
+
resolve: {
|
|
103
|
+
rewards: []
|
|
104
|
+
},
|
|
105
|
+
solution: {
|
|
106
|
+
right: {
|
|
107
|
+
desc: 'correctSolution',
|
|
108
|
+
desc_labelId: 'alfalfa01',
|
|
109
|
+
rewards: []
|
|
110
|
+
},
|
|
111
|
+
wrong: {
|
|
112
|
+
desc: 'wrongSolution',
|
|
113
|
+
desc_labelId: 'fabada01',
|
|
114
|
+
rewards: [{
|
|
115
|
+
id: 'grade',
|
|
116
|
+
name: 'grade',
|
|
117
|
+
points: -17,
|
|
118
|
+
type: 'grade'
|
|
119
|
+
}]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
instructions: 'instructions'
|
|
123
|
+
},
|
|
124
|
+
image: {
|
|
125
|
+
imgName: 'gato5.jpg',
|
|
126
|
+
img: {
|
|
127
|
+
url: 'https://min.gamelearn.io/css-resources/gamelearn/resources/image-click.jpg',
|
|
128
|
+
imgName: 'gato5.jpg',
|
|
129
|
+
resourceId: '6007f80eac41ad001120f135'
|
|
130
|
+
},
|
|
131
|
+
width: 1280,
|
|
132
|
+
height: 720
|
|
133
|
+
},
|
|
134
|
+
areas: [{
|
|
135
|
+
id: '1601910616179',
|
|
136
|
+
name: 'a',
|
|
137
|
+
x: 0,
|
|
138
|
+
y: 0,
|
|
139
|
+
draggable: true,
|
|
140
|
+
points: [74.1584158415841, 423.99133663366337, 229.20792079207916, 366.96163366336634, 516.1386138613861, 482.8032178217822, 644.4554455445544, 710.9220297029703, 56.33663366336629, 712.7042079207921],
|
|
141
|
+
strokeWidth: 2,
|
|
142
|
+
stroke: '#44d7ab',
|
|
143
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
144
|
+
closed: true
|
|
145
|
+
}, {
|
|
146
|
+
id: '1601910626254',
|
|
147
|
+
name: 'b',
|
|
148
|
+
x: 0,
|
|
149
|
+
y: 0,
|
|
150
|
+
draggable: true,
|
|
151
|
+
points: [607.0297029702971, 343.79331683168317, 783.4653465346535, 388.3477722772277, 865.4455445544554, 539.8329207920792, 1138.118811881188, 593.2982673267327, 1262.871287128713, 358.0507425742574, 1262.871287128713, 46.16955445544554, 1193.3663366336634, 12.308168316831683, 1018.7128712871288, 19.43688118811881, 746.0396039603961, 213.69430693069307, 555.3465346534654, 268.94183168316835],
|
|
152
|
+
strokeWidth: 2,
|
|
153
|
+
stroke: '#44d7ab',
|
|
154
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
155
|
+
closed: true
|
|
156
|
+
}],
|
|
157
|
+
badAreas: [],
|
|
158
|
+
hasClickOrder: true,
|
|
159
|
+
hasHighlights: false
|
|
160
|
+
};
|
|
161
|
+
exports.mockProps2 = mockProps2;
|
|
162
|
+
var mockProps3 = {
|
|
163
|
+
emitEvent: emitEvent,
|
|
164
|
+
disableExit: function disableExit() {},
|
|
165
|
+
setResolveAction: function setResolveAction() {},
|
|
166
|
+
transitionEffects: null,
|
|
167
|
+
audioId: '',
|
|
168
|
+
itemOrder: 1,
|
|
169
|
+
info: {
|
|
170
|
+
hint: {
|
|
171
|
+
active: true,
|
|
172
|
+
desc: 'hint',
|
|
173
|
+
rewards: []
|
|
174
|
+
},
|
|
175
|
+
resolve: {
|
|
176
|
+
rewards: []
|
|
177
|
+
},
|
|
178
|
+
solution: {
|
|
179
|
+
right: {
|
|
180
|
+
desc: 'correctSolution',
|
|
181
|
+
desc_labelId: 'alfalfa01',
|
|
182
|
+
rewards: []
|
|
183
|
+
},
|
|
184
|
+
wrong: {
|
|
185
|
+
desc: 'wrongSolution',
|
|
186
|
+
desc_labelId: 'fabada01',
|
|
187
|
+
rewards: [{
|
|
188
|
+
id: 'grade',
|
|
189
|
+
name: 'grade',
|
|
190
|
+
points: -17,
|
|
191
|
+
type: 'grade'
|
|
192
|
+
}]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
instructions: 'instructions'
|
|
196
|
+
},
|
|
197
|
+
image: {
|
|
198
|
+
imgName: 'gato5.jpg',
|
|
199
|
+
img: {
|
|
200
|
+
url: 'https://min.gamelearn.io/css-resources/gamelearn/resources/image-click.jpg',
|
|
201
|
+
imgName: 'gato5.jpg',
|
|
202
|
+
resourceId: '6007f80eac41ad001120f135'
|
|
203
|
+
},
|
|
204
|
+
width: 1280,
|
|
205
|
+
height: 720
|
|
206
|
+
},
|
|
207
|
+
areas: [{
|
|
208
|
+
id: '1601910616179',
|
|
209
|
+
name: 'a',
|
|
210
|
+
x: 0,
|
|
211
|
+
y: 0,
|
|
212
|
+
draggable: true,
|
|
213
|
+
points: [74.1584158415841, 423.99133663366337, 229.20792079207916, 366.96163366336634, 516.1386138613861, 482.8032178217822, 644.4554455445544, 710.9220297029703, 56.33663366336629, 712.7042079207921],
|
|
214
|
+
strokeWidth: 2,
|
|
215
|
+
stroke: '#44d7ab',
|
|
216
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
217
|
+
closed: true
|
|
218
|
+
}, {
|
|
219
|
+
id: '1601910626254',
|
|
220
|
+
name: 'b',
|
|
221
|
+
x: 0,
|
|
222
|
+
y: 0,
|
|
223
|
+
draggable: true,
|
|
224
|
+
points: [607.0297029702971, 343.79331683168317, 783.4653465346535, 388.3477722772277, 865.4455445544554, 539.8329207920792, 1138.118811881188, 593.2982673267327, 1262.871287128713, 358.0507425742574, 1262.871287128713, 46.16955445544554, 1193.3663366336634, 12.308168316831683, 1018.7128712871288, 19.43688118811881, 746.0396039603961, 213.69430693069307, 555.3465346534654, 268.94183168316835],
|
|
225
|
+
strokeWidth: 2,
|
|
226
|
+
stroke: '#44d7ab',
|
|
227
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
228
|
+
closed: true
|
|
229
|
+
}],
|
|
230
|
+
badAreas: [],
|
|
231
|
+
hasClickOrder: false,
|
|
232
|
+
hasHighlights: true
|
|
233
|
+
};
|
|
234
|
+
exports.mockProps3 = mockProps3;
|
|
235
|
+
var mockProps4 = {
|
|
236
|
+
emitEvent: emitEvent,
|
|
237
|
+
disableExit: function disableExit() {},
|
|
238
|
+
setResolveAction: function setResolveAction() {},
|
|
239
|
+
transitionEffects: null,
|
|
240
|
+
audioId: '',
|
|
241
|
+
itemOrder: 1,
|
|
242
|
+
info: {
|
|
243
|
+
hint: {
|
|
244
|
+
active: true,
|
|
245
|
+
desc: 'hint',
|
|
246
|
+
rewards: []
|
|
247
|
+
},
|
|
248
|
+
resolve: {
|
|
249
|
+
rewards: []
|
|
250
|
+
},
|
|
251
|
+
solution: {
|
|
252
|
+
right: {
|
|
253
|
+
desc: 'correctSolution',
|
|
254
|
+
desc_labelId: 'alfalfa01',
|
|
255
|
+
rewards: []
|
|
256
|
+
},
|
|
257
|
+
wrong: {
|
|
258
|
+
desc: 'wrongSolution',
|
|
259
|
+
desc_labelId: 'fabada01',
|
|
260
|
+
rewards: [{
|
|
261
|
+
id: 'grade',
|
|
262
|
+
name: 'grade',
|
|
263
|
+
points: -17,
|
|
264
|
+
type: 'grade'
|
|
265
|
+
}]
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
instructions: 'instructions'
|
|
269
|
+
},
|
|
270
|
+
image: {
|
|
271
|
+
imgName: 'gato5.jpg',
|
|
272
|
+
img: {
|
|
273
|
+
url: 'https://min.gamelearn.io/css-resources/gamelearn/resources/image-click.jpg',
|
|
274
|
+
imgName: 'gato5.jpg',
|
|
275
|
+
resourceId: '6007f80eac41ad001120f135'
|
|
276
|
+
},
|
|
277
|
+
width: 1280,
|
|
278
|
+
height: 720
|
|
279
|
+
},
|
|
280
|
+
areas: [{
|
|
281
|
+
id: '1601910616179',
|
|
282
|
+
name: 'a',
|
|
283
|
+
x: 0,
|
|
284
|
+
y: 0,
|
|
285
|
+
draggable: true,
|
|
286
|
+
points: [74.1584158415841, 423.99133663366337, 229.20792079207916, 366.96163366336634, 516.1386138613861, 482.8032178217822, 644.4554455445544, 710.9220297029703, 56.33663366336629, 712.7042079207921],
|
|
287
|
+
strokeWidth: 2,
|
|
288
|
+
stroke: '#44d7ab',
|
|
289
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
290
|
+
closed: true
|
|
291
|
+
}, {
|
|
292
|
+
id: '1601910626254',
|
|
293
|
+
name: 'b',
|
|
294
|
+
x: 0,
|
|
295
|
+
y: 0,
|
|
296
|
+
draggable: true,
|
|
297
|
+
points: [607.0297029702971, 343.79331683168317, 783.4653465346535, 388.3477722772277, 865.4455445544554, 539.8329207920792, 1138.118811881188, 593.2982673267327, 1262.871287128713, 358.0507425742574, 1262.871287128713, 46.16955445544554, 1193.3663366336634, 12.308168316831683, 1018.7128712871288, 19.43688118811881, 746.0396039603961, 213.69430693069307, 555.3465346534654, 268.94183168316835],
|
|
298
|
+
strokeWidth: 2,
|
|
299
|
+
stroke: '#44d7ab',
|
|
300
|
+
fill: 'rgba(68, 215, 171, 0.56)',
|
|
301
|
+
closed: true
|
|
302
|
+
}],
|
|
303
|
+
badAreas: [],
|
|
304
|
+
hasClickOrder: false,
|
|
305
|
+
hasHighlights: false
|
|
306
|
+
};
|
|
307
|
+
exports.mockProps4 = mockProps4;
|
|
@@ -13,7 +13,7 @@ var mockProps = {
|
|
|
13
13
|
emitEvent: emitEvent,
|
|
14
14
|
img: {
|
|
15
15
|
imgId: 'alfalfa',
|
|
16
|
-
url: 'https://
|
|
16
|
+
url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/603fb8b1901f3e001238e297/gif.gif',
|
|
17
17
|
resourceId: '5e79e0c8f5b3a6000fd81472'
|
|
18
18
|
},
|
|
19
19
|
imgName: 'Hand gif',
|
|
@@ -26,7 +26,7 @@ var mockWithNotVisible = {
|
|
|
26
26
|
emitEvent: emitEvent,
|
|
27
27
|
img: {
|
|
28
28
|
imgId: 'alfalfa2',
|
|
29
|
-
url: 'https://
|
|
29
|
+
url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/603fb8b1901f3e001238e297/gif.gif',
|
|
30
30
|
resourceId: '5e79e0c8f5b3a6000fd81472'
|
|
31
31
|
},
|
|
32
32
|
imgName: 'Hand gif',
|
|
@@ -39,7 +39,7 @@ var mockWithImageNotViewed = {
|
|
|
39
39
|
emitEvent: emitEvent,
|
|
40
40
|
img: {
|
|
41
41
|
imgId: 'alfalfa2',
|
|
42
|
-
url: 'https://
|
|
42
|
+
url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/603fb8b1901f3e001238e297/gif.gif',
|
|
43
43
|
resourceId: '5e79e0c8f5b3a6000fd81472'
|
|
44
44
|
},
|
|
45
45
|
imgName: 'Hand gif',
|
package/dist/components/index.js
CHANGED
|
@@ -113,12 +113,54 @@ Object.defineProperty(exports, "KeyboardPuzzleComponent", {
|
|
|
113
113
|
return _keyboardPuzzleComponent.default;
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
|
+
Object.defineProperty(exports, "ImageClickPuzzleComponent", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _imageClickPuzzleComponent.default;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
116
122
|
Object.defineProperty(exports, "CrackerPuzzleComponent", {
|
|
117
123
|
enumerable: true,
|
|
118
124
|
get: function get() {
|
|
119
125
|
return _crackerPuzzleComponent.default;
|
|
120
126
|
}
|
|
121
127
|
});
|
|
128
|
+
Object.defineProperty(exports, "HangedPuzzleComponent", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function get() {
|
|
131
|
+
return _hangedPuzzleComponent.default;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
Object.defineProperty(exports, "ChainedImageClickPuzzleComponent", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function get() {
|
|
137
|
+
return _chainedImageClickPuzzleComponent.default;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "WebBuilderPuzzleComponent", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function get() {
|
|
143
|
+
return _webBuilderPuzzleComponent.default;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, "WriterPuzzleComponent", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function get() {
|
|
149
|
+
return _writerPuzzleComponent.default;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "TerminalPuzzleComponent", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function get() {
|
|
155
|
+
return _terminalPuzzleComponent.default;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(exports, "DragItemPuzzleComponent", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function get() {
|
|
161
|
+
return _dragItemPuzzleComponent.default;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
122
164
|
|
|
123
165
|
var _scene = _interopRequireDefault(require("./arcade-render/scene"));
|
|
124
166
|
|
|
@@ -154,8 +196,22 @@ var _loginPuzzleComponent = _interopRequireDefault(require("./login-puzzle-compo
|
|
|
154
196
|
|
|
155
197
|
var _keyboardPuzzleComponent = _interopRequireDefault(require("./keyboard-puzzle-component"));
|
|
156
198
|
|
|
199
|
+
var _imageClickPuzzleComponent = _interopRequireDefault(require("./image-click-puzzle-component"));
|
|
200
|
+
|
|
157
201
|
var _crackerPuzzleComponent = _interopRequireDefault(require("./cracker-puzzle-component"));
|
|
158
202
|
|
|
203
|
+
var _hangedPuzzleComponent = _interopRequireDefault(require("./hanged-puzzle-component"));
|
|
204
|
+
|
|
205
|
+
var _chainedImageClickPuzzleComponent = _interopRequireDefault(require("./chained-image-click-puzzle-component"));
|
|
206
|
+
|
|
207
|
+
var _webBuilderPuzzleComponent = _interopRequireDefault(require("./web-builder-puzzle-component"));
|
|
208
|
+
|
|
209
|
+
var _writerPuzzleComponent = _interopRequireDefault(require("./writer-puzzle-component"));
|
|
210
|
+
|
|
211
|
+
var _terminalPuzzleComponent = _interopRequireDefault(require("./terminal-puzzle-component"));
|
|
212
|
+
|
|
213
|
+
var _dragItemPuzzleComponent = _interopRequireDefault(require("./drag-item-puzzle-component"));
|
|
214
|
+
|
|
159
215
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
160
216
|
|
|
161
217
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -47,11 +47,12 @@ var InventoryItem = function InventoryItem(_ref) {
|
|
|
47
47
|
var onLoad = function onLoad(model, scene, camera) {
|
|
48
48
|
if (model && orbit.current) {
|
|
49
49
|
model.position.set(0, 0, 0);
|
|
50
|
+
scene.add(camera);
|
|
50
51
|
camera.position.z += 10;
|
|
51
52
|
camera.fov = 35;
|
|
52
53
|
camera.updateProjectionMatrix();
|
|
53
54
|
(0, _helpers.cameraFitAnyObject)(model, camera, null, orbit.current);
|
|
54
|
-
(0, _drawLOD.default)(scene);
|
|
55
|
+
(0, _drawLOD.default)(scene, camera);
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
|
|
@@ -17,7 +17,7 @@ var mockProps = {
|
|
|
17
17
|
keyboard: [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9'], ['*', '0', '#']],
|
|
18
18
|
image: {
|
|
19
19
|
img: {
|
|
20
|
-
url: 'https://
|
|
20
|
+
url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/60508f84901f3e00123a0796/holamundo.jpg'
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
info: {
|
|
@@ -16,8 +16,8 @@ var emitEvent = function emitEvent(_ref) {
|
|
|
16
16
|
|
|
17
17
|
var mockProps = {
|
|
18
18
|
emitEvent: emitEvent,
|
|
19
|
-
user:
|
|
20
|
-
password:
|
|
19
|
+
user: 'pepe',
|
|
20
|
+
password: '1234',
|
|
21
21
|
login: true,
|
|
22
22
|
info: {
|
|
23
23
|
solution: {
|
|
@@ -31,7 +31,7 @@ var mockProps = {
|
|
|
31
31
|
},
|
|
32
32
|
image: {
|
|
33
33
|
img: {
|
|
34
|
-
url: 'https://
|
|
34
|
+
url: 'https://min.int.gamelearn.io/cooked.gl-lms-storage/clients/58dccfba26561500117caf53/image/60508f84901f3e00123a0796/holamundo.jpg'
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|
|
@@ -17,6 +17,18 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
|
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
|
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
27
|
+
|
|
28
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
+
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
|
|
20
32
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
33
|
|
|
22
34
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -25,15 +37,28 @@ var PdfComponent = function PdfComponent(_ref) {
|
|
|
25
37
|
var emitEvent = _ref.emitEvent,
|
|
26
38
|
documentType = _ref.documentType,
|
|
27
39
|
name = _ref.name,
|
|
40
|
+
required = _ref.required,
|
|
28
41
|
viewed = _ref.viewed,
|
|
29
42
|
visible = _ref.visible,
|
|
30
|
-
props = _objectWithoutProperties(_ref, ["emitEvent", "documentType", "name", "viewed", "visible"]);
|
|
43
|
+
props = _objectWithoutProperties(_ref, ["emitEvent", "documentType", "name", "required", "viewed", "visible"]);
|
|
44
|
+
|
|
45
|
+
var translate = function translate(id) {
|
|
46
|
+
return emitEvent({
|
|
47
|
+
type: 'translate',
|
|
48
|
+
payload: id
|
|
49
|
+
});
|
|
50
|
+
};
|
|
31
51
|
|
|
32
52
|
var documentFile = props.document;
|
|
33
53
|
|
|
34
54
|
var _ref2 = documentFile || '',
|
|
35
55
|
url = _ref2.url;
|
|
36
56
|
|
|
57
|
+
var _useState = (0, _react.useState)(false),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
closeVisible = _useState2[0],
|
|
60
|
+
setcloseVisible = _useState2[1];
|
|
61
|
+
|
|
37
62
|
var item = (0, _react.useMemo)(function () {
|
|
38
63
|
return {
|
|
39
64
|
documentType: documentType,
|
|
@@ -52,17 +77,23 @@ var PdfComponent = function PdfComponent(_ref) {
|
|
|
52
77
|
if (!visible) {
|
|
53
78
|
emitFinish();
|
|
54
79
|
}
|
|
80
|
+
|
|
81
|
+
if (!required) {
|
|
82
|
+
setcloseVisible(true);
|
|
83
|
+
}
|
|
55
84
|
}, [visible, emitFinish]);
|
|
56
85
|
|
|
57
86
|
if (!visible) {
|
|
58
87
|
return null;
|
|
59
88
|
}
|
|
60
89
|
|
|
90
|
+
var endPdf = function endPdf() {
|
|
91
|
+
setcloseVisible(true);
|
|
92
|
+
};
|
|
93
|
+
|
|
61
94
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
-
className: "".concat(viewed ? 'notes--results' : '
|
|
63
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
-
className: viewed ? 'notes--results__text' : 'readings pdf--type'
|
|
65
|
-
}, !viewed && /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: "".concat(viewed ? 'notes--results' : '')
|
|
96
|
+
}, !viewed && closeVisible && /*#__PURE__*/_react.default.createElement("div", {
|
|
66
97
|
className: "position--absolute top right z-index1"
|
|
67
98
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
68
99
|
type: "button",
|
|
@@ -71,8 +102,10 @@ var PdfComponent = function PdfComponent(_ref) {
|
|
|
71
102
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
72
103
|
className: "icon-close"
|
|
73
104
|
}))), url && /*#__PURE__*/_react.default.createElement(_PdfVisor.default, {
|
|
74
|
-
url: url
|
|
75
|
-
|
|
105
|
+
url: url,
|
|
106
|
+
endPdf: endPdf,
|
|
107
|
+
translate: translate
|
|
108
|
+
}));
|
|
76
109
|
};
|
|
77
110
|
|
|
78
111
|
var _default = PdfComponent;
|