@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container>
|
|
3
3
|
<v-col class="pa-0">
|
|
4
|
-
<
|
|
4
|
+
<h2>
|
|
5
5
|
{{
|
|
6
6
|
block.metadata.config.title
|
|
7
7
|
? block.metadata.config.title
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
'windward.games.components.content.blocks.word_jumble.title'
|
|
10
10
|
)
|
|
11
11
|
}}
|
|
12
|
-
</
|
|
12
|
+
</h2>
|
|
13
13
|
<p>{{ block.metadata.config.instructions }}</p>
|
|
14
14
|
</v-col>
|
|
15
15
|
<v-col class="pa-0">
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<v-btn
|
|
23
23
|
variant="elevated"
|
|
24
24
|
color="primary"
|
|
25
|
+
elevation="0"
|
|
25
26
|
outlined
|
|
26
27
|
fab
|
|
27
28
|
small
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
<v-btn
|
|
35
36
|
variant="elevated"
|
|
36
37
|
color="primary"
|
|
38
|
+
elevation="0"
|
|
37
39
|
outlined
|
|
38
40
|
fab
|
|
39
41
|
small
|
|
@@ -90,6 +92,7 @@
|
|
|
90
92
|
'container-feedback-success'
|
|
91
93
|
"
|
|
92
94
|
class="mr-5"
|
|
95
|
+
elevation="0"
|
|
93
96
|
color="success"
|
|
94
97
|
@click="onSlideChanged(true)"
|
|
95
98
|
>{{ $t('shared.forms.continue') }}
|
|
@@ -125,6 +128,7 @@
|
|
|
125
128
|
<v-btn
|
|
126
129
|
:disabled="disableButtons"
|
|
127
130
|
color="primary"
|
|
131
|
+
elevation="0"
|
|
128
132
|
@click="onCheckAnswer(word)"
|
|
129
133
|
>{{
|
|
130
134
|
$t(
|
|
@@ -137,6 +141,8 @@
|
|
|
137
141
|
<v-btn
|
|
138
142
|
:disabled="disableButtons"
|
|
139
143
|
color="primary"
|
|
144
|
+
elevation="0"
|
|
145
|
+
outlined
|
|
140
146
|
@click="onRevealAnswer"
|
|
141
147
|
>{{
|
|
142
148
|
$t(
|
|
@@ -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
|
outlined
|
|
8
9
|
:counter="50"
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
'windward.games.components.settings.bucket_game.form.title'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
18
19
|
v-model="block.metadata.config.instructions"
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
'windward.games.components.settings.bucket_game.form.instructions'
|
|
25
26
|
)
|
|
26
27
|
"
|
|
28
|
+
:disabled="render"
|
|
27
29
|
></v-textarea>
|
|
28
30
|
</v-container>
|
|
29
31
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
@change="onDragged"
|
|
41
43
|
@click:close="onConfirmDeleteBucket($event)"
|
|
42
44
|
:copy="false"
|
|
45
|
+
:disabled="render"
|
|
43
46
|
>
|
|
44
47
|
<template #header="{ item }">
|
|
45
48
|
{{
|
|
@@ -66,6 +69,7 @@
|
|
|
66
69
|
index
|
|
67
70
|
].title
|
|
68
71
|
"
|
|
72
|
+
:disabled="render"
|
|
69
73
|
></TextEditor>
|
|
70
74
|
</v-flex>
|
|
71
75
|
<v-flex xs12>
|
|
@@ -88,6 +92,7 @@
|
|
|
88
92
|
show-swatches
|
|
89
93
|
:swatches="swatches"
|
|
90
94
|
swatches-max-height="130"
|
|
95
|
+
:disabled="render"
|
|
91
96
|
></v-color-picker>
|
|
92
97
|
</v-flex>
|
|
93
98
|
<v-flex xs12>
|
|
@@ -111,6 +116,7 @@
|
|
|
111
116
|
"
|
|
112
117
|
@click:close="onConfirmDelete($event, index)"
|
|
113
118
|
:copy="false"
|
|
119
|
+
:disabled="render"
|
|
114
120
|
>
|
|
115
121
|
<template #header="{ item }">
|
|
116
122
|
{{
|
|
@@ -138,6 +144,7 @@
|
|
|
138
144
|
answerIndex
|
|
139
145
|
].display
|
|
140
146
|
"
|
|
147
|
+
:disabled="render"
|
|
141
148
|
></TextEditor>
|
|
142
149
|
<p class="p-label mb-0">
|
|
143
150
|
{{
|
|
@@ -154,6 +161,7 @@
|
|
|
154
161
|
].display_value
|
|
155
162
|
"
|
|
156
163
|
outlined
|
|
164
|
+
:disabled="render"
|
|
157
165
|
></v-text-field>
|
|
158
166
|
<p class="p-label mb-0">
|
|
159
167
|
{{
|
|
@@ -170,6 +178,7 @@
|
|
|
170
178
|
].feedback
|
|
171
179
|
"
|
|
172
180
|
outlined
|
|
181
|
+
:disabled="render"
|
|
173
182
|
></v-text-field>
|
|
174
183
|
</v-flex>
|
|
175
184
|
</v-container>
|
|
@@ -179,6 +188,8 @@
|
|
|
179
188
|
<v-row justify="center" class="my-4">
|
|
180
189
|
<v-btn
|
|
181
190
|
color="primary"
|
|
191
|
+
elevation="0"
|
|
192
|
+
:disabled="render"
|
|
182
193
|
@click="onAddBucketAnswer(index)"
|
|
183
194
|
>
|
|
184
195
|
<v-icon>mdi-plus</v-icon>
|
|
@@ -194,7 +205,12 @@
|
|
|
194
205
|
</v-container>
|
|
195
206
|
<v-container class="pa-0">
|
|
196
207
|
<v-row justify="center" class="my-4">
|
|
197
|
-
<v-btn
|
|
208
|
+
<v-btn
|
|
209
|
+
color="primary"
|
|
210
|
+
elevation="0"
|
|
211
|
+
:disabled="render"
|
|
212
|
+
@click="onAddBucket"
|
|
213
|
+
>
|
|
198
214
|
<v-icon>mdi-plus</v-icon>
|
|
199
215
|
{{
|
|
200
216
|
$t(
|
|
@@ -214,6 +230,7 @@
|
|
|
214
230
|
'windward.games.components.settings.bucket_game.form.feedback.correct'
|
|
215
231
|
)
|
|
216
232
|
"
|
|
233
|
+
:disabled="render"
|
|
217
234
|
></v-textarea>
|
|
218
235
|
<v-textarea
|
|
219
236
|
v-model="block.metadata.config.feedback_incorrect"
|
|
@@ -225,6 +242,7 @@
|
|
|
225
242
|
'windward.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
226
243
|
)
|
|
227
244
|
"
|
|
245
|
+
:disabled="render"
|
|
228
246
|
></v-textarea>
|
|
229
247
|
</v-container>
|
|
230
248
|
</v-form>
|
|
@@ -249,8 +267,8 @@ import {
|
|
|
249
267
|
import colors from 'vuetify/lib/util/colors'
|
|
250
268
|
import TextEditor from '~/components/Text/TextEditor'
|
|
251
269
|
import Crypto from '~/helpers/Crypto'
|
|
252
|
-
import BaseContentSettings from '~/components/Content/
|
|
253
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
270
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
271
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
254
272
|
|
|
255
273
|
export default {
|
|
256
274
|
name: 'BucketGameSettingsManager',
|
|
@@ -434,7 +452,9 @@ export default {
|
|
|
434
452
|
})
|
|
435
453
|
},
|
|
436
454
|
stripHtml(htmlString) {
|
|
437
|
-
|
|
455
|
+
if (htmlString) {
|
|
456
|
+
return htmlString.replace(/(<([^>]+)>)/gi, '')
|
|
457
|
+
}
|
|
438
458
|
},
|
|
439
459
|
},
|
|
440
460
|
}
|
|
@@ -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,7 +13,7 @@
|
|
|
12
13
|
'windward.games.components.settings.bucket_game.form.title'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
18
19
|
outlined
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
'windward.games.components.settings.bucket_game.form.instructions'
|
|
25
26
|
)
|
|
26
27
|
"
|
|
28
|
+
:disabled="render"
|
|
27
29
|
></v-textarea>
|
|
28
30
|
</v-container>
|
|
29
31
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
</p>
|
|
45
47
|
<SortableExpansionPanel
|
|
46
48
|
v-model="block.metadata.config.words"
|
|
49
|
+
:disabled="render"
|
|
47
50
|
@click:close="onDelete($event)"
|
|
48
51
|
>
|
|
49
52
|
<template #header="{ item, index }">
|
|
@@ -65,14 +68,15 @@
|
|
|
65
68
|
}}
|
|
66
69
|
</p>
|
|
67
70
|
<v-textarea
|
|
71
|
+
v-model="
|
|
72
|
+
block.metadata.config.words[index].word
|
|
73
|
+
"
|
|
68
74
|
outlined
|
|
69
75
|
:counter="20"
|
|
70
76
|
maxlength="20"
|
|
71
77
|
:autofocus="true"
|
|
72
78
|
class="pt-4"
|
|
73
|
-
|
|
74
|
-
block.metadata.config.words[index].word
|
|
75
|
-
"
|
|
79
|
+
:disabled="render"
|
|
76
80
|
></v-textarea>
|
|
77
81
|
<p class="p-label mb-0">
|
|
78
82
|
{{
|
|
@@ -82,20 +86,26 @@
|
|
|
82
86
|
}}
|
|
83
87
|
</p>
|
|
84
88
|
<v-textarea
|
|
89
|
+
v-model="
|
|
90
|
+
block.metadata.config.words[index].clue
|
|
91
|
+
"
|
|
85
92
|
outlined
|
|
86
93
|
:counter="155"
|
|
87
94
|
maxlength="155"
|
|
88
95
|
class="pt-4"
|
|
89
|
-
|
|
90
|
-
block.metadata.config.words[index].clue
|
|
91
|
-
"
|
|
96
|
+
:disabled="render"
|
|
92
97
|
></v-textarea>
|
|
93
98
|
</v-container>
|
|
94
99
|
</template>
|
|
95
100
|
</SortableExpansionPanel>
|
|
96
101
|
<v-container class="pa-0">
|
|
97
102
|
<v-row justify="center" class="my-4">
|
|
98
|
-
<v-btn
|
|
103
|
+
<v-btn
|
|
104
|
+
color="primary"
|
|
105
|
+
elevation="0"
|
|
106
|
+
:disabled="render"
|
|
107
|
+
@click="onAddElement"
|
|
108
|
+
>
|
|
99
109
|
<v-icon>mdi-plus</v-icon>
|
|
100
110
|
{{
|
|
101
111
|
$t(
|
|
@@ -120,8 +130,8 @@
|
|
|
120
130
|
|
|
121
131
|
<script>
|
|
122
132
|
import _ from 'lodash'
|
|
123
|
-
import BaseContentSettings from '~/components/Content/
|
|
124
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
133
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
134
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
125
135
|
|
|
126
136
|
export default {
|
|
127
137
|
name: 'CrosswordPuzzleSettingsManager',
|