@windward/games 0.5.0 → 0.6.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/CHANGELOG.md +4 -0
- package/bitbucket-pipelines.yml +14 -0
- package/components/content/blocks/flashcards/FlashcardSlides.vue +35 -2
- package/components/content/blocks/matchingGame/MatchingGame.vue +31 -32
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +30 -1
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +33 -1
- package/components/content/blocks/slideshow/SlideShow.vue +41 -3
- package/components/content/blocks/wordJumble/WordJumble.vue +32 -0
- package/components/settings/BucketGameSettingsManager.vue +246 -233
- package/components/settings/CrosswordPuzzleSettingsManager.vue +139 -109
- package/components/settings/FlashCardSlidesManager.vue +319 -332
- package/components/settings/MatchingGameManager.vue +326 -321
- package/components/settings/MultipleChoiceSettingsManager.vue +83 -67
- package/components/settings/QuizShowSettingsManager.vue +215 -203
- package/components/settings/SevenStrikesSettingsManager.vue +171 -141
- package/components/settings/SlideShowManager.vue +153 -132
- package/components/settings/SortingGameSettingsManager.vue +137 -108
- package/components/settings/WordJumbleSettingsManager.vue +175 -145
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/shared/settings.ts +3 -0
- package/package.json +1 -1
|
@@ -1,251 +1,247 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-
|
|
4
|
-
<v-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
3
|
+
<v-container class="pa-0">
|
|
4
|
+
<v-text-field
|
|
5
|
+
ref="title"
|
|
6
|
+
v-model="block.metadata.config.title"
|
|
7
|
+
:rules="validation.titleRule"
|
|
8
|
+
outlined
|
|
9
|
+
:counter="50"
|
|
10
|
+
:autofocus="true"
|
|
11
|
+
:label="
|
|
12
|
+
$t(
|
|
13
|
+
'windward.games.components.settings.bucket_game.form.title'
|
|
14
|
+
)
|
|
15
|
+
"
|
|
16
|
+
:disabled="render"
|
|
17
|
+
></v-text-field>
|
|
18
|
+
<v-textarea
|
|
19
|
+
v-model="block.metadata.config.instructions"
|
|
20
|
+
outlined
|
|
21
|
+
auto-grow
|
|
22
|
+
:rules="validation.instructionsRule"
|
|
23
|
+
:counter="255"
|
|
24
|
+
:label="
|
|
25
|
+
$t(
|
|
26
|
+
'windward.games.components.settings.bucket_game.form.instructions'
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
:disabled="render"
|
|
30
|
+
></v-textarea>
|
|
31
|
+
</v-container>
|
|
32
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
33
|
+
<v-container class="pa-0">
|
|
34
|
+
<p>
|
|
35
|
+
{{
|
|
36
|
+
$t(
|
|
37
|
+
'windward.games.components.settings.bucket_game.form.buckets'
|
|
38
|
+
)
|
|
39
|
+
}}
|
|
40
|
+
</p>
|
|
41
|
+
<SortableExpansionPanel
|
|
42
|
+
v-model="block.metadata.config.bucket_titles"
|
|
43
|
+
@change="onDragged"
|
|
44
|
+
@click:close="onConfirmDeleteBucket($event)"
|
|
45
|
+
:copy="false"
|
|
46
|
+
:disabled="render"
|
|
47
|
+
>
|
|
48
|
+
<template #header="{ item }">
|
|
34
49
|
{{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
50
|
+
stripHtml(item.title)
|
|
51
|
+
? stripHtml(item.title)
|
|
52
|
+
: $t(
|
|
53
|
+
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
54
|
+
)
|
|
38
55
|
}}
|
|
39
|
-
</
|
|
40
|
-
<
|
|
41
|
-
v-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
: $t(
|
|
52
|
-
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
53
|
-
)
|
|
54
|
-
}}
|
|
55
|
-
</template>
|
|
56
|
-
<template #body="{ index }">
|
|
57
|
-
<v-container :key="expansionPanelKey">
|
|
58
|
-
<v-flex xs12>
|
|
59
|
-
<p class="p-label">
|
|
60
|
-
{{
|
|
61
|
-
$t(
|
|
62
|
-
'windward.games.components.content.blocks.bucket_game.name'
|
|
63
|
-
)
|
|
64
|
-
}}
|
|
65
|
-
</p>
|
|
66
|
-
<TextEditor
|
|
67
|
-
v-model="
|
|
68
|
-
block.metadata.config.bucket_titles[
|
|
69
|
-
index
|
|
70
|
-
].title
|
|
71
|
-
"
|
|
72
|
-
:disabled="render"
|
|
73
|
-
></TextEditor>
|
|
74
|
-
</v-flex>
|
|
75
|
-
<v-flex xs12>
|
|
76
|
-
<p class="p-label">
|
|
77
|
-
{{
|
|
78
|
-
$t(
|
|
79
|
-
'windward.games.components.settings.bucket_game.form.color'
|
|
80
|
-
)
|
|
81
|
-
}}
|
|
82
|
-
</p>
|
|
83
|
-
<v-color-picker
|
|
84
|
-
v-model="
|
|
85
|
-
block.metadata.config.bucket_titles[
|
|
86
|
-
index
|
|
87
|
-
].color
|
|
88
|
-
"
|
|
89
|
-
hide-canvas
|
|
90
|
-
hide-inputs
|
|
91
|
-
hide-sliders
|
|
92
|
-
show-swatches
|
|
93
|
-
:swatches="swatches"
|
|
94
|
-
swatches-max-height="130"
|
|
95
|
-
:disabled="render"
|
|
96
|
-
></v-color-picker>
|
|
97
|
-
</v-flex>
|
|
98
|
-
<v-flex xs12>
|
|
99
|
-
<p class="p-label">
|
|
100
|
-
{{
|
|
101
|
-
$t(
|
|
102
|
-
'windward.games.components.content.blocks.bucket_game.answers'
|
|
103
|
-
)
|
|
104
|
-
}}
|
|
105
|
-
</p>
|
|
106
|
-
</v-flex>
|
|
107
|
-
</v-container>
|
|
108
|
-
<v-container
|
|
109
|
-
v-if="
|
|
110
|
-
block.metadata.config.bucket_answers.length > 0
|
|
111
|
-
"
|
|
112
|
-
>
|
|
113
|
-
<SortableExpansionPanel
|
|
56
|
+
</template>
|
|
57
|
+
<template #body="{ index }">
|
|
58
|
+
<v-container :key="expansionPanelKey">
|
|
59
|
+
<v-flex xs12>
|
|
60
|
+
<p class="p-label">
|
|
61
|
+
{{
|
|
62
|
+
$t(
|
|
63
|
+
'windward.games.components.content.blocks.bucket_game.name'
|
|
64
|
+
)
|
|
65
|
+
}}
|
|
66
|
+
</p>
|
|
67
|
+
<TextEditor
|
|
114
68
|
v-model="
|
|
115
|
-
block.metadata.config.
|
|
69
|
+
block.metadata.config.bucket_titles[index]
|
|
70
|
+
.title
|
|
116
71
|
"
|
|
117
|
-
@click:close="onConfirmDelete($event, index)"
|
|
118
|
-
:copy="false"
|
|
119
72
|
:disabled="render"
|
|
120
|
-
>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
v-model="
|
|
142
|
-
block.metadata.config
|
|
143
|
-
.bucket_answers[index][
|
|
144
|
-
answerIndex
|
|
145
|
-
].display
|
|
146
|
-
"
|
|
147
|
-
:disabled="render"
|
|
148
|
-
></TextEditor>
|
|
149
|
-
<p class="p-label mb-0">
|
|
150
|
-
{{
|
|
151
|
-
$t(
|
|
152
|
-
'windward.games.components.content.blocks.bucket_game.form.value'
|
|
153
|
-
)
|
|
154
|
-
}}
|
|
155
|
-
</p>
|
|
156
|
-
<v-text-field
|
|
157
|
-
v-model="
|
|
158
|
-
block.metadata.config
|
|
159
|
-
.bucket_answers[index][
|
|
160
|
-
answerIndex
|
|
161
|
-
].display_value
|
|
162
|
-
"
|
|
163
|
-
outlined
|
|
164
|
-
:disabled="render"
|
|
165
|
-
></v-text-field>
|
|
166
|
-
<p class="p-label mb-0">
|
|
167
|
-
{{
|
|
168
|
-
$t(
|
|
169
|
-
'windward.games.components.content.blocks.bucket_game.form.feedback.feedback'
|
|
170
|
-
)
|
|
171
|
-
}}
|
|
172
|
-
</p>
|
|
173
|
-
<v-text-field
|
|
174
|
-
v-model="
|
|
175
|
-
block.metadata.config
|
|
176
|
-
.bucket_answers[index][
|
|
177
|
-
answerIndex
|
|
178
|
-
].feedback
|
|
179
|
-
"
|
|
180
|
-
outlined
|
|
181
|
-
:disabled="render"
|
|
182
|
-
></v-text-field>
|
|
183
|
-
</v-flex>
|
|
184
|
-
</v-container>
|
|
185
|
-
</template>
|
|
186
|
-
</SortableExpansionPanel>
|
|
187
|
-
</v-container>
|
|
188
|
-
<v-row justify="center" class="my-4">
|
|
189
|
-
<v-btn
|
|
190
|
-
color="primary"
|
|
191
|
-
elevation="0"
|
|
73
|
+
></TextEditor>
|
|
74
|
+
</v-flex>
|
|
75
|
+
<v-flex xs12>
|
|
76
|
+
<p class="p-label">
|
|
77
|
+
{{
|
|
78
|
+
$t(
|
|
79
|
+
'windward.games.components.settings.bucket_game.form.color'
|
|
80
|
+
)
|
|
81
|
+
}}
|
|
82
|
+
</p>
|
|
83
|
+
<v-color-picker
|
|
84
|
+
v-model="
|
|
85
|
+
block.metadata.config.bucket_titles[index]
|
|
86
|
+
.color
|
|
87
|
+
"
|
|
88
|
+
hide-canvas
|
|
89
|
+
hide-inputs
|
|
90
|
+
hide-sliders
|
|
91
|
+
show-swatches
|
|
92
|
+
:swatches="swatches"
|
|
93
|
+
swatches-max-height="130"
|
|
192
94
|
:disabled="render"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
95
|
+
></v-color-picker>
|
|
96
|
+
</v-flex>
|
|
97
|
+
<v-flex xs12>
|
|
98
|
+
<p class="p-label">
|
|
196
99
|
{{
|
|
197
100
|
$t(
|
|
198
|
-
'windward.games.components.
|
|
101
|
+
'windward.games.components.content.blocks.bucket_game.answers'
|
|
199
102
|
)
|
|
200
103
|
}}
|
|
201
|
-
</
|
|
202
|
-
</v-
|
|
203
|
-
</
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<v-container class="pa-0">
|
|
207
|
-
<v-row justify="center" class="my-4">
|
|
208
|
-
<v-btn
|
|
209
|
-
color="primary"
|
|
210
|
-
elevation="0"
|
|
211
|
-
:disabled="render"
|
|
212
|
-
@click="onAddBucket"
|
|
104
|
+
</p>
|
|
105
|
+
</v-flex>
|
|
106
|
+
</v-container>
|
|
107
|
+
<v-container
|
|
108
|
+
v-if="block.metadata.config.bucket_answers.length > 0"
|
|
213
109
|
>
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
)
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
110
|
+
<SortableExpansionPanel
|
|
111
|
+
v-model="
|
|
112
|
+
block.metadata.config.bucket_answers[index]
|
|
113
|
+
"
|
|
114
|
+
@click:close="onConfirmDelete($event, index)"
|
|
115
|
+
:copy="false"
|
|
116
|
+
:disabled="render"
|
|
117
|
+
>
|
|
118
|
+
<template #header="{ item }">
|
|
119
|
+
{{
|
|
120
|
+
stripHtml(item.display)
|
|
121
|
+
? stripHtml(item.display)
|
|
122
|
+
: $t(
|
|
123
|
+
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
124
|
+
)
|
|
125
|
+
}}
|
|
126
|
+
</template>
|
|
127
|
+
<template #body="{ index: answerIndex }">
|
|
128
|
+
<v-container :key="expansionPanelKey">
|
|
129
|
+
<v-flex xs12>
|
|
130
|
+
<p class="p-label mb-0">
|
|
131
|
+
{{
|
|
132
|
+
$t(
|
|
133
|
+
'windward.games.components.content.blocks.bucket_game.form.answer'
|
|
134
|
+
)
|
|
135
|
+
}}
|
|
136
|
+
</p>
|
|
137
|
+
<TextEditor
|
|
138
|
+
v-model="
|
|
139
|
+
block.metadata.config
|
|
140
|
+
.bucket_answers[index][
|
|
141
|
+
answerIndex
|
|
142
|
+
].display
|
|
143
|
+
"
|
|
144
|
+
:disabled="render"
|
|
145
|
+
></TextEditor>
|
|
146
|
+
<p class="p-label mb-0">
|
|
147
|
+
{{
|
|
148
|
+
$t(
|
|
149
|
+
'windward.games.components.content.blocks.bucket_game.form.value'
|
|
150
|
+
)
|
|
151
|
+
}}
|
|
152
|
+
</p>
|
|
153
|
+
<v-text-field
|
|
154
|
+
v-model="
|
|
155
|
+
block.metadata.config
|
|
156
|
+
.bucket_answers[index][
|
|
157
|
+
answerIndex
|
|
158
|
+
].display_value
|
|
159
|
+
"
|
|
160
|
+
outlined
|
|
161
|
+
:disabled="render"
|
|
162
|
+
></v-text-field>
|
|
163
|
+
<p class="p-label mb-0">
|
|
164
|
+
{{
|
|
165
|
+
$t(
|
|
166
|
+
'windward.games.components.content.blocks.bucket_game.form.feedback.feedback'
|
|
167
|
+
)
|
|
168
|
+
}}
|
|
169
|
+
</p>
|
|
170
|
+
<v-text-field
|
|
171
|
+
v-model="
|
|
172
|
+
block.metadata.config
|
|
173
|
+
.bucket_answers[index][
|
|
174
|
+
answerIndex
|
|
175
|
+
].feedback
|
|
176
|
+
"
|
|
177
|
+
outlined
|
|
178
|
+
:disabled="render"
|
|
179
|
+
></v-text-field>
|
|
180
|
+
</v-flex>
|
|
181
|
+
</v-container>
|
|
182
|
+
</template>
|
|
183
|
+
</SortableExpansionPanel>
|
|
184
|
+
</v-container>
|
|
185
|
+
<v-row justify="center" class="my-4">
|
|
186
|
+
<v-btn
|
|
187
|
+
color="primary"
|
|
188
|
+
elevation="0"
|
|
189
|
+
:disabled="render"
|
|
190
|
+
@click="onAddBucketAnswer(index)"
|
|
191
|
+
>
|
|
192
|
+
<v-icon>mdi-plus</v-icon>
|
|
193
|
+
{{
|
|
194
|
+
$t(
|
|
195
|
+
'windward.games.components.settings.bucket_game.form.add_answer'
|
|
196
|
+
)
|
|
197
|
+
}}
|
|
198
|
+
</v-btn>
|
|
199
|
+
</v-row>
|
|
200
|
+
</template>
|
|
201
|
+
</SortableExpansionPanel>
|
|
202
|
+
</v-container>
|
|
203
|
+
<v-container class="pa-0">
|
|
204
|
+
<v-row justify="center" class="my-4">
|
|
205
|
+
<v-btn
|
|
206
|
+
color="primary"
|
|
207
|
+
elevation="0"
|
|
233
208
|
:disabled="render"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
v-
|
|
237
|
-
|
|
238
|
-
auto-grow
|
|
239
|
-
:counter="255"
|
|
240
|
-
:label="
|
|
209
|
+
@click="onAddBucket"
|
|
210
|
+
>
|
|
211
|
+
<v-icon>mdi-plus</v-icon>
|
|
212
|
+
{{
|
|
241
213
|
$t(
|
|
242
|
-
'windward.games.components.settings.bucket_game.form.
|
|
214
|
+
'windward.games.components.settings.bucket_game.form.add_bucket'
|
|
243
215
|
)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
216
|
+
}}
|
|
217
|
+
</v-btn>
|
|
218
|
+
</v-row>
|
|
219
|
+
<v-textarea
|
|
220
|
+
v-model="block.metadata.config.feedback_correct"
|
|
221
|
+
class="pt-4"
|
|
222
|
+
outlined
|
|
223
|
+
auto-grow
|
|
224
|
+
:counter="255"
|
|
225
|
+
:label="
|
|
226
|
+
$t(
|
|
227
|
+
'windward.games.components.settings.bucket_game.form.feedback.correct'
|
|
228
|
+
)
|
|
229
|
+
"
|
|
230
|
+
:disabled="render"
|
|
231
|
+
></v-textarea>
|
|
232
|
+
<v-textarea
|
|
233
|
+
v-model="block.metadata.config.feedback_incorrect"
|
|
234
|
+
outlined
|
|
235
|
+
auto-grow
|
|
236
|
+
:counter="255"
|
|
237
|
+
:label="
|
|
238
|
+
$t(
|
|
239
|
+
'windward.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
240
|
+
)
|
|
241
|
+
"
|
|
242
|
+
:disabled="render"
|
|
243
|
+
></v-textarea>
|
|
244
|
+
</v-container>
|
|
249
245
|
<div v-if="loading" class="text-center">
|
|
250
246
|
<v-progress-circular
|
|
251
247
|
:size="70"
|
|
@@ -323,7 +319,6 @@ export default {
|
|
|
323
319
|
},
|
|
324
320
|
data() {
|
|
325
321
|
return {
|
|
326
|
-
valid: true,
|
|
327
322
|
loading: false,
|
|
328
323
|
panel: 0,
|
|
329
324
|
expansionPanelKey: '0',
|
|
@@ -334,6 +329,24 @@ export default {
|
|
|
334
329
|
[colors.lightGreen.lighten4, colors.teal.lighten4],
|
|
335
330
|
[colors.lightBlue.lighten4, colors.deepPurple.lighten3],
|
|
336
331
|
],
|
|
332
|
+
validation: {
|
|
333
|
+
titleRule: [
|
|
334
|
+
(v) =>
|
|
335
|
+
v.length <= 50 ||
|
|
336
|
+
this.$t(
|
|
337
|
+
'windward.games.shared.settings.errors.input_limitations',
|
|
338
|
+
[50]
|
|
339
|
+
),
|
|
340
|
+
],
|
|
341
|
+
instructionsRule: [
|
|
342
|
+
(v) =>
|
|
343
|
+
v.length <= 255 ||
|
|
344
|
+
this.$t(
|
|
345
|
+
'windward.games.shared.settings.errors.input_limitations',
|
|
346
|
+
[255]
|
|
347
|
+
),
|
|
348
|
+
],
|
|
349
|
+
},
|
|
337
350
|
}
|
|
338
351
|
},
|
|
339
352
|
methods: {
|