@windward/games 0.2.2 → 0.4.0
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/components/content/CrudTable.vue +8 -4
- package/components/content/DatableEditor.vue +1 -0
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +2 -1
- package/components/content/blocks/dragDrop/BucketGame.vue +4 -3
- package/components/content/blocks/dragDrop/SortingGame.vue +37 -28
- package/components/content/blocks/flashcards/CardFace.vue +48 -9
- package/components/content/blocks/flashcards/Flashcard.vue +26 -17
- package/components/content/blocks/flashcards/FlashcardSlides.vue +10 -5
- package/components/content/blocks/matchingGame/MatchingGame.vue +76 -50
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +13 -9
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +27 -13
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +2 -1
- package/components/content/blocks/quizshowGame/Gridview.vue +2 -1
- package/components/content/blocks/quizshowGame/QuizShow.vue +5 -2
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +8 -2
- package/components/content/blocks/slideshow/SlideShow.vue +31 -22
- package/components/content/blocks/wordJumble/WordJumble.vue +8 -2
- package/components/settings/BucketGameSettingsManager.vue +25 -5
- package/components/settings/CrosswordPuzzleSettingsManager.vue +20 -10
- package/components/settings/FlashCardSlidesManager.vue +194 -115
- package/components/settings/MatchingGameManager.vue +57 -8
- package/components/settings/MultipleChoiceSettingsManager.vue +33 -77
- package/components/settings/QuizShowSettingsManager.vue +22 -11
- package/components/settings/SevenStrikesSettingsManager.vue +17 -5
- package/components/settings/SlideShowManager.vue +46 -15
- package/components/settings/SortingGameSettingsManager.vue +19 -8
- package/components/settings/WordJumbleSettingsManager.vue +22 -10
- package/i18n/en-US/components/content/blocks/slideshow.ts +1 -3
- package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
- package/i18n/es-ES/components/content/blocks/slideshow.ts +0 -2
- package/i18n/es-ES/components/settings/seven_strikes.ts +1 -1
- package/i18n/sv-SE/components/content/blocks/slideshow.ts +0 -2
- package/i18n/sv-SE/components/settings/seven_strikes.ts +1 -1
- package/jest.config.js +0 -1
- package/package.json +2 -2
- package/test/__mocks__/componentsMock.js +3 -1
- package/test/__mocks__/modelMock.js +13 -84
- package/test/blocks/flashcards/CardFace.spec.js +2 -0
- package/test/blocks/flashcards/Flashcard.spec.js +1 -0
- package/test/blocks/multipleChoice/MultipleChoice.spec.js +1 -1
- package/test/settings/WordJumbleManager.spec.js +3 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
:counter="50"
|
|
8
9
|
outlined
|
|
@@ -12,17 +13,18 @@
|
|
|
12
13
|
'windward.games.components.settings.word_jumble.title_input'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
19
|
+
v-model="block.metadata.config.instructions"
|
|
18
20
|
outlined
|
|
19
21
|
auto-grow
|
|
20
|
-
v-model="block.metadata.config.instructions"
|
|
21
22
|
:label="
|
|
22
23
|
$t(
|
|
23
24
|
'windward.games.components.settings.word_jumble.instructions'
|
|
24
25
|
)
|
|
25
26
|
"
|
|
27
|
+
:disabled="render"
|
|
26
28
|
></v-textarea>
|
|
27
29
|
</v-container>
|
|
28
30
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
<SortableExpansionPanel
|
|
38
40
|
v-model="block.metadata.config.words"
|
|
39
41
|
v-bind:currentPanel.sync="block.metadata.config.currentWord"
|
|
42
|
+
:disabled="render"
|
|
40
43
|
@click:close="onDelete($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -59,11 +62,12 @@
|
|
|
59
62
|
}}
|
|
60
63
|
</p>
|
|
61
64
|
<v-textarea
|
|
62
|
-
outlined
|
|
63
|
-
:autofocus="true"
|
|
64
65
|
v-model="
|
|
65
66
|
block.metadata.config.words[index].value
|
|
66
67
|
"
|
|
68
|
+
outlined
|
|
69
|
+
:autofocus="true"
|
|
70
|
+
:disabled="render"
|
|
67
71
|
></v-textarea>
|
|
68
72
|
</v-flex>
|
|
69
73
|
<v-flex xs12>
|
|
@@ -75,10 +79,11 @@
|
|
|
75
79
|
}}
|
|
76
80
|
</p>
|
|
77
81
|
<v-textarea
|
|
78
|
-
outlined
|
|
79
82
|
v-model="
|
|
80
83
|
block.metadata.config.words[index].hint
|
|
81
84
|
"
|
|
85
|
+
outlined
|
|
86
|
+
:disabled="render"
|
|
82
87
|
></v-textarea>
|
|
83
88
|
</v-flex>
|
|
84
89
|
</v-container>
|
|
@@ -87,7 +92,12 @@
|
|
|
87
92
|
</v-container>
|
|
88
93
|
<v-container class="pa-0">
|
|
89
94
|
<v-row justify="center" class="my-4">
|
|
90
|
-
<v-btn
|
|
95
|
+
<v-btn
|
|
96
|
+
color="primary"
|
|
97
|
+
elevation="0"
|
|
98
|
+
:disabled="render"
|
|
99
|
+
@click="onAddWord"
|
|
100
|
+
>
|
|
91
101
|
<v-icon>mdi-plus</v-icon>
|
|
92
102
|
{{
|
|
93
103
|
$t(
|
|
@@ -97,6 +107,7 @@
|
|
|
97
107
|
</v-btn>
|
|
98
108
|
</v-row>
|
|
99
109
|
<v-textarea
|
|
110
|
+
ref="title"
|
|
100
111
|
v-model="block.metadata.config.feedback_correct"
|
|
101
112
|
outlined
|
|
102
113
|
auto-grow
|
|
@@ -106,17 +117,18 @@
|
|
|
106
117
|
'windward.games.components.settings.word_jumble.feedback_correct'
|
|
107
118
|
)
|
|
108
119
|
"
|
|
109
|
-
|
|
120
|
+
:disabled="render"
|
|
110
121
|
></v-textarea>
|
|
111
122
|
<v-textarea
|
|
123
|
+
v-model="block.metadata.config.feedback_incorrect"
|
|
112
124
|
outlined
|
|
113
125
|
auto-grow
|
|
114
|
-
v-model="block.metadata.config.feedback_incorrect"
|
|
115
126
|
:label="
|
|
116
127
|
$t(
|
|
117
128
|
'windward.games.components.settings.word_jumble.feedback_incorrect'
|
|
118
129
|
)
|
|
119
130
|
"
|
|
131
|
+
:disabled="render"
|
|
120
132
|
></v-textarea>
|
|
121
133
|
</v-container>
|
|
122
134
|
</v-form>
|
|
@@ -132,8 +144,8 @@
|
|
|
132
144
|
</template>
|
|
133
145
|
<script>
|
|
134
146
|
import _ from 'lodash'
|
|
135
|
-
import BaseContentSettings from '~/components/Content/
|
|
136
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
147
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
148
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
137
149
|
|
|
138
150
|
export default {
|
|
139
151
|
name: 'WordJumbleSettings',
|
|
@@ -3,11 +3,9 @@ export default {
|
|
|
3
3
|
slide: 'Slide {0}: {1}',
|
|
4
4
|
slide_header: 'Slide header',
|
|
5
5
|
slide_description: 'Slide description',
|
|
6
|
-
image_alt: '
|
|
6
|
+
image_alt: 'Image Alt Text',
|
|
7
7
|
},
|
|
8
8
|
add_slide: 'Add Slide',
|
|
9
9
|
amount_of_slides: 'Amount of slides',
|
|
10
10
|
slideshow_title: 'Slideshow title',
|
|
11
|
-
basic_instructions:
|
|
12
|
-
"Click on the 'next' and 'previous' buttons to move through the slideshow.",
|
|
13
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
title: 'Seven Strikes',
|
|
3
3
|
instructions:
|
|
4
|
-
'Read the clue below, and click on the letters to spell out the word the clue refers to. If you choose a letter that isnt in the word, an X will be illuminated. When you choose an incorrect letter 7 times, the game is over.
|
|
4
|
+
'Read the clue below, and click on the letters to spell out the word the clue refers to. If you choose a letter that isnt in the word, an X will be illuminated. When you choose an incorrect letter 7 times, the game is over.',
|
|
5
5
|
word: 'Word or Phrase',
|
|
6
6
|
hint: 'Clue',
|
|
7
7
|
items: 'Seven Strikes Items',
|
|
@@ -8,6 +8,4 @@ export default {
|
|
|
8
8
|
add_slide: 'Agregar diapositiva',
|
|
9
9
|
amount_of_slides: 'Cantidad de diapositivas',
|
|
10
10
|
slideshow_title: 'Título de la presentación de diapositivas',
|
|
11
|
-
basic_instructions:
|
|
12
|
-
"Haga clic en los botones 'siguiente' y 'anterior' para moverse por la presentación de diapositivas.",
|
|
13
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
title: 'Siete golpes',
|
|
3
3
|
instructions:
|
|
4
|
-
'Lea las pistas y haga clic en las letras para deletrear la palabra a la que se refiere. Si elige una letra que no está en la palabra, se iluminará una X. El juego se acaba si elijes una letra incorrecta 7 veces.
|
|
4
|
+
'Lea las pistas y haga clic en las letras para deletrear la palabra a la que se refiere. Si elige una letra que no está en la palabra, se iluminará una X. El juego se acaba si elijes una letra incorrecta 7 veces.',
|
|
5
5
|
word: 'Palabra o frase',
|
|
6
6
|
hint: 'Pista',
|
|
7
7
|
items: 'Elementos del juego',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
title: 'Sju slag',
|
|
3
3
|
instructions:
|
|
4
|
-
'Läs ledtråden nedan och klicka på bokstäverna för att stava ordet ledtråden refererar till. Om du väljer en bokstav som inte finns i ordet kommer ett X att lysa. När du väljer en felaktig bokstav 7 gånger är spelet över
|
|
4
|
+
'Läs ledtråden nedan och klicka på bokstäverna för att stava ordet ledtråden refererar till. Om du väljer en bokstav som inte finns i ordet kommer ett X att lysa. När du väljer en felaktig bokstav 7 gånger är spelet över.',
|
|
5
5
|
word: 'Ord eller fras',
|
|
6
6
|
hint: 'Clue',
|
|
7
7
|
items: 'Sju Strejker Artiklar',
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windward/games",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Windward UI Plugin Games",
|
|
5
5
|
"main": "plugin.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-games#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@windward/core": "^0.0
|
|
24
|
+
"@windward/core": "^0.3.0",
|
|
25
25
|
"eslint": "^8.11.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"prettier": "^2.6.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// TODO find better way for jest to recognize utils imports
|
|
2
|
+
/*
|
|
2
3
|
jest.mock(
|
|
3
|
-
'~/components/
|
|
4
|
+
'~/components/SomeComponent.vue',
|
|
4
5
|
() => {
|
|
5
6
|
return {
|
|
6
7
|
data() {
|
|
@@ -10,3 +11,4 @@ jest.mock(
|
|
|
10
11
|
},
|
|
11
12
|
{ virtual: true }
|
|
12
13
|
)
|
|
14
|
+
*/
|
|
@@ -1,88 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import axios from 'axios'
|
|
4
|
-
jest.mock('axios')
|
|
5
|
-
mockModel.$http = axios
|
|
6
|
-
|
|
7
|
-
jest.mock('axios')
|
|
1
|
+
//import { registerVirtualModels, registerModels } from '@windward/core/test/__mocks__/modelMock.js'
|
|
8
2
|
|
|
9
3
|
// Define any new model mocks here. The imports / mocks will be auto-generated below
|
|
10
|
-
|
|
4
|
+
/*
|
|
5
|
+
registerVirtualModels([
|
|
11
6
|
{
|
|
12
|
-
path: '~/models/
|
|
13
|
-
resource: '
|
|
7
|
+
path: '~/models/MyNewModel',
|
|
8
|
+
resource: 'my-new-model',
|
|
14
9
|
},
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
default: class Model {},
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
class mockBaseModel extends mockModel {
|
|
27
|
-
baseURL() {
|
|
28
|
-
return 'http://windwardapi.local'
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
request(_config) {
|
|
32
|
-
return new Promise((resolve) => {
|
|
33
|
-
resolve({ data: {} })
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
jest.mock(
|
|
39
|
-
'~/models/Model',
|
|
40
|
-
() => {
|
|
41
|
-
return {
|
|
42
|
-
__esModule: true,
|
|
43
|
-
default: class Model extends mockBaseModel {},
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{ virtual: true }
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
for (let mockI = 0; mockI < mockVirtualModels.length; mockI++) {
|
|
50
|
-
jest.mock(
|
|
51
|
-
mockVirtualModels[mockI].path,
|
|
52
|
-
() => {
|
|
53
|
-
return {
|
|
54
|
-
__esModule: true,
|
|
55
|
-
default: class Model extends mockBaseModel {
|
|
56
|
-
resource() {
|
|
57
|
-
return (
|
|
58
|
-
mockVirtualModels[mockI].resource ||
|
|
59
|
-
this.constructor.name
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{ virtual: true }
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
for (let mockJ = 0; mockJ < mockModels.length; mockJ++) {
|
|
70
|
-
jest.mock(mockModels[mockJ].path, () => {
|
|
71
|
-
return {
|
|
72
|
-
__esModule: true,
|
|
73
|
-
default: class Model extends mockBaseModel {
|
|
74
|
-
resource() {
|
|
75
|
-
return mockModels[mockJ].resource || this.constructor.name
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
integrations() {
|
|
79
|
-
return this
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
get() {
|
|
83
|
-
return []
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
}
|
|
10
|
+
])
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
registerModels([
|
|
15
|
+
{ path: '../../models/UserFileAsset', resource: 'user-files' },
|
|
16
|
+
])
|
|
17
|
+
*/
|
|
@@ -49,11 +49,13 @@ describe('WordJumble manager', () => {
|
|
|
49
49
|
id: 1,
|
|
50
50
|
value: '',
|
|
51
51
|
hint: '',
|
|
52
|
+
shuffledWord: '',
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
55
|
id: 2,
|
|
55
56
|
value: '',
|
|
56
57
|
hint: '',
|
|
58
|
+
shuffledWord: '',
|
|
57
59
|
},
|
|
58
60
|
])
|
|
59
61
|
})
|
|
@@ -78,6 +80,7 @@ describe('WordJumble manager', () => {
|
|
|
78
80
|
id: 1,
|
|
79
81
|
value: '',
|
|
80
82
|
hint: '',
|
|
83
|
+
shuffledWord: '',
|
|
81
84
|
},
|
|
82
85
|
])
|
|
83
86
|
})
|