@windward/games 0.17.1 → 0.19.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 +5 -13
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +11 -2
- package/components/content/blocks/dragDrop/BucketGame.vue +7 -1
- package/components/content/blocks/dragDrop/SortingGame.vue +10 -1
- package/components/content/blocks/flashcards/CardFace.vue +15 -11
- package/components/content/blocks/flashcards/Flashcard.vue +0 -3
- package/components/content/blocks/flashcards/FlashcardSlides.vue +54 -6
- package/components/content/blocks/matchingGame/MatchingGame.vue +7 -1
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +34 -19
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +335 -112
- package/components/content/blocks/quizshowGame/QuizShow.vue +7 -0
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +9 -1
- package/components/content/blocks/slideshow/SlideShow.vue +7 -2
- package/components/content/blocks/wordJumble/WordJumble.vue +9 -1
- package/components/settings/BucketGameSettingsManager.vue +151 -28
- package/components/settings/CrosswordPuzzleSettingsManager.vue +8 -29
- package/components/settings/FlashCardSlidesManager.vue +8 -27
- package/components/settings/MatchingGameManager.vue +12 -29
- package/components/settings/MultipleChoiceSettingsManager.vue +37 -30
- package/components/settings/QuizShowSettingsManager.vue +11 -28
- package/components/settings/SevenStrikesSettingsManager.vue +13 -29
- package/components/settings/SlideShowManager.vue +8 -26
- package/components/settings/SortingGameSettingsManager.vue +8 -29
- package/components/settings/WordJumbleSettingsManager.vue +8 -28
- package/i18n/en-US/components/content/blocks/flashcard.ts +1 -0
- package/i18n/en-US/components/settings/bucket_game.ts +5 -0
- package/i18n/en-US/components/settings/multiple_choice.ts +4 -3
- package/i18n/es-ES/components/settings/bucket_game.ts +5 -0
- package/i18n/es-ES/components/settings/multiple_choice.ts +2 -3
- package/i18n/sv-SE/components/settings/bucket_game.ts +5 -0
- package/i18n/sv-SE/components/settings/multiple_choice.ts +2 -2
- package/package.json +1 -1
- package/test/blocks/crossword/CrosswordPuzzle.spec.js +0 -21
- package/test/blocks/dragDrop/SortingGame.spec.js +0 -21
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
id="block-settings-title"
|
|
7
|
-
v-model="block.metadata.config.title"
|
|
8
|
-
:rules="$Validation.getRule('block.title')"
|
|
9
|
-
:counter="$Validation.getLimit('block.title')"
|
|
10
|
-
outlined
|
|
11
|
-
:autofocus="true"
|
|
12
|
-
:label="
|
|
13
|
-
$t(
|
|
14
|
-
'windward.games.components.settings.bucket_game.form.title'
|
|
15
|
-
)
|
|
16
|
-
"
|
|
4
|
+
<BaseContentBlockSettings
|
|
5
|
+
v-model="block.metadata.config"
|
|
17
6
|
:disabled="render"
|
|
18
|
-
></
|
|
19
|
-
<v-textarea
|
|
20
|
-
id="block-settings-instructions"
|
|
21
|
-
v-model="block.metadata.config.instructions"
|
|
22
|
-
:rules="$Validation.getRule('block.instructions')"
|
|
23
|
-
:counter="$Validation.getLimit('block.instructions')"
|
|
24
|
-
outlined
|
|
25
|
-
auto-grow
|
|
26
|
-
:label="
|
|
27
|
-
$t(
|
|
28
|
-
'windward.games.components.settings.bucket_game.form.instructions'
|
|
29
|
-
)
|
|
30
|
-
"
|
|
31
|
-
:disabled="render"
|
|
32
|
-
></v-textarea>
|
|
7
|
+
></BaseContentBlockSettings>
|
|
33
8
|
</v-container>
|
|
34
9
|
<v-divider class="my-4 primary"></v-divider>
|
|
35
10
|
<v-container class="pa-0">
|
|
@@ -146,12 +121,18 @@ import draggable from 'vuedraggable'
|
|
|
146
121
|
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
147
122
|
import CrudTable from '../content/CrudTable.vue'
|
|
148
123
|
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
124
|
+
import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
|
|
149
125
|
import Uuid from '~/helpers/Uuid'
|
|
150
126
|
|
|
151
127
|
export default {
|
|
152
128
|
name: 'SevenStrikesSettingsManager',
|
|
153
129
|
extends: BaseContentSettings,
|
|
154
|
-
components: {
|
|
130
|
+
components: {
|
|
131
|
+
CrudTable,
|
|
132
|
+
draggable,
|
|
133
|
+
SortableExpansionPanel,
|
|
134
|
+
BaseContentBlockSettings,
|
|
135
|
+
},
|
|
155
136
|
beforeMount() {
|
|
156
137
|
if (_.isEmpty(this.block)) {
|
|
157
138
|
this.block = {}
|
|
@@ -170,6 +151,9 @@ export default {
|
|
|
170
151
|
'windward.games.components.settings.seven_strikes.title'
|
|
171
152
|
)
|
|
172
153
|
}
|
|
154
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
155
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
156
|
+
}
|
|
173
157
|
if (
|
|
174
158
|
_.isEmpty(this.block.metadata.config.instructions) &&
|
|
175
159
|
this.block.id &&
|
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
v-model="block.metadata.config.title"
|
|
7
|
-
outlined
|
|
8
|
-
:rules="$Validation.getRule('block.title')"
|
|
9
|
-
:counter="$Validation.getLimit('block.title')"
|
|
10
|
-
:label="
|
|
11
|
-
$t(
|
|
12
|
-
'windward.games.components.settings.slideshow.form.title'
|
|
13
|
-
)
|
|
14
|
-
"
|
|
15
|
-
:disabled="render"
|
|
16
|
-
></v-text-field>
|
|
17
|
-
<v-textarea
|
|
18
|
-
id="block-settings-instructions"
|
|
19
|
-
v-model="block.metadata.config.instructions"
|
|
20
|
-
outlined
|
|
21
|
-
auto-grow
|
|
22
|
-
:rules="$Validation.getRule('block.instructions')"
|
|
23
|
-
:counter="$Validation.getLimit('block.instructions')"
|
|
24
|
-
:label="
|
|
25
|
-
$t(
|
|
26
|
-
'windward.games.components.settings.slideshow.form.instructions'
|
|
27
|
-
)
|
|
28
|
-
"
|
|
4
|
+
<BaseContentBlockSettings
|
|
5
|
+
v-model="block.metadata.config"
|
|
29
6
|
:disabled="render"
|
|
30
|
-
></
|
|
7
|
+
></BaseContentBlockSettings>
|
|
31
8
|
</v-container>
|
|
32
9
|
<v-divider class="my-4 primary"></v-divider>
|
|
33
10
|
<v-container class="pa-0">
|
|
@@ -128,6 +105,7 @@
|
|
|
128
105
|
<script>
|
|
129
106
|
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
130
107
|
import _ from 'lodash'
|
|
108
|
+
import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
|
|
131
109
|
import ImageAssetSettings from '~/components/Content/Settings/ImageAssetSettings.vue'
|
|
132
110
|
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
133
111
|
import Uuid from '~/helpers/Uuid'
|
|
@@ -138,6 +116,7 @@ export default {
|
|
|
138
116
|
components: {
|
|
139
117
|
ImageAssetSettings,
|
|
140
118
|
SortableExpansionPanel,
|
|
119
|
+
BaseContentBlockSettings,
|
|
141
120
|
},
|
|
142
121
|
beforeMount() {
|
|
143
122
|
if (_.isEmpty(this.block)) {
|
|
@@ -152,6 +131,9 @@ export default {
|
|
|
152
131
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
153
132
|
this.block.metadata.config = {}
|
|
154
133
|
}
|
|
134
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
135
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
136
|
+
}
|
|
155
137
|
if (_.isEmpty(this.block.metadata.config.currentSlide)) {
|
|
156
138
|
this.block.metadata.config.currentSlide = 0
|
|
157
139
|
}
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
id="block-settings-title"
|
|
7
|
-
v-model="block.metadata.config.title"
|
|
8
|
-
outlined
|
|
9
|
-
:autofocus="true"
|
|
10
|
-
:rules="$Validation.getRule('block.title')"
|
|
11
|
-
:counter="$Validation.getLimit('block.title')"
|
|
12
|
-
:label="
|
|
13
|
-
$t(
|
|
14
|
-
'windward.games.components.settings.bucket_game.form.title'
|
|
15
|
-
)
|
|
16
|
-
"
|
|
4
|
+
<BaseContentBlockSettings
|
|
5
|
+
v-model="block.metadata.config"
|
|
17
6
|
:disabled="render"
|
|
18
|
-
></
|
|
19
|
-
<v-textarea
|
|
20
|
-
id="block-settings-instructions"
|
|
21
|
-
v-model="block.metadata.config.instructions"
|
|
22
|
-
outlined
|
|
23
|
-
auto-grow
|
|
24
|
-
:rules="$Validation.getRule('block.instructions')"
|
|
25
|
-
:counter="$Validation.getLimit('block.instructions')"
|
|
26
|
-
:label="
|
|
27
|
-
$t(
|
|
28
|
-
'windward.games.components.settings.bucket_game.form.instructions'
|
|
29
|
-
)
|
|
30
|
-
"
|
|
31
|
-
:disabled="render"
|
|
32
|
-
></v-textarea>
|
|
7
|
+
></BaseContentBlockSettings>
|
|
33
8
|
</v-container>
|
|
34
9
|
<v-divider class="my-4 primary"></v-divider>
|
|
35
10
|
<v-container class="pa-0">
|
|
@@ -118,13 +93,14 @@
|
|
|
118
93
|
<script>
|
|
119
94
|
import _ from 'lodash'
|
|
120
95
|
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
96
|
+
import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
|
|
121
97
|
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
122
98
|
import Uuid from '~/helpers/Uuid'
|
|
123
99
|
|
|
124
100
|
export default {
|
|
125
101
|
name: 'SortingGameSettingsManager',
|
|
126
102
|
extends: BaseContentSettings,
|
|
127
|
-
components: { SortableExpansionPanel },
|
|
103
|
+
components: { SortableExpansionPanel, BaseContentBlockSettings },
|
|
128
104
|
beforeMount() {
|
|
129
105
|
if (_.isEmpty(this.block)) {
|
|
130
106
|
this.block = {}
|
|
@@ -140,6 +116,9 @@ export default {
|
|
|
140
116
|
'windward.games.components.settings.sorting_game.sortable_game'
|
|
141
117
|
)
|
|
142
118
|
}
|
|
119
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
120
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
121
|
+
}
|
|
143
122
|
if (
|
|
144
123
|
_.isEmpty(this.block.metadata.config.instructions) &&
|
|
145
124
|
this.block.id &&
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
id="block-settings-title"
|
|
7
|
-
v-model="block.metadata.config.title"
|
|
8
|
-
:rules="$Validation.getRule('block.title')"
|
|
9
|
-
:counter="$Validation.getLimit('block.title')"
|
|
10
|
-
outlined
|
|
11
|
-
:autofocus="true"
|
|
12
|
-
:label="
|
|
13
|
-
$t(
|
|
14
|
-
'windward.games.components.settings.word_jumble.title_input'
|
|
15
|
-
)
|
|
16
|
-
"
|
|
17
|
-
:disabled="render"
|
|
18
|
-
></v-text-field>
|
|
19
|
-
<v-textarea
|
|
20
|
-
id="block-settings-instructions"
|
|
21
|
-
v-model="block.metadata.config.instructions"
|
|
22
|
-
:rules="$Validation.getRule('block.instructions')"
|
|
23
|
-
:counter="$Validation.getLimit('block.instructions')"
|
|
24
|
-
outlined
|
|
25
|
-
auto-grow
|
|
26
|
-
:label="
|
|
27
|
-
$t(
|
|
28
|
-
'windward.games.components.settings.word_jumble.instructions'
|
|
29
|
-
)
|
|
30
|
-
"
|
|
4
|
+
<BaseContentBlockSettings
|
|
5
|
+
v-model="block.metadata.config"
|
|
31
6
|
:disabled="render"
|
|
32
|
-
></
|
|
7
|
+
></BaseContentBlockSettings>
|
|
33
8
|
</v-container>
|
|
34
9
|
<v-divider class="my-4 primary"></v-divider>
|
|
35
10
|
<v-container class="pa-0">
|
|
@@ -150,12 +125,14 @@
|
|
|
150
125
|
import _ from 'lodash'
|
|
151
126
|
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
152
127
|
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
128
|
+
import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
|
|
153
129
|
|
|
154
130
|
export default {
|
|
155
131
|
name: 'WordJumbleSettings',
|
|
156
132
|
extends: BaseContentSettings,
|
|
157
133
|
components: {
|
|
158
134
|
SortableExpansionPanel,
|
|
135
|
+
BaseContentBlockSettings,
|
|
159
136
|
},
|
|
160
137
|
beforeMount() {
|
|
161
138
|
if (_.isEmpty(this.block)) {
|
|
@@ -175,6 +152,9 @@ export default {
|
|
|
175
152
|
'windward.games.components.settings.word_jumble.title'
|
|
176
153
|
)
|
|
177
154
|
}
|
|
155
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
156
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
157
|
+
}
|
|
178
158
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
179
159
|
this.block.metadata.config.instructions = ''
|
|
180
160
|
}
|
|
@@ -36,5 +36,10 @@ export default {
|
|
|
36
36
|
click_here: 'Click here to enter text',
|
|
37
37
|
add_answer: 'Add Answer',
|
|
38
38
|
color: 'Bucket Color',
|
|
39
|
+
replace_existing: 'Replace existing buckets',
|
|
40
|
+
replaced_successfully: 'Buckets replaced successfully',
|
|
41
|
+
added_successfully: 'New buckets added successfully',
|
|
42
|
+
invalid_response: 'Invalid response from bucket game generation',
|
|
43
|
+
failed_to_process: 'Failed to process generated buckets'
|
|
39
44
|
},
|
|
40
45
|
}
|
|
@@ -2,7 +2,8 @@ export default {
|
|
|
2
2
|
game_title: 'Multiple Choice Game',
|
|
3
3
|
title_placeholder: 'Title',
|
|
4
4
|
instructions: 'Instructions',
|
|
5
|
-
default_instructions:
|
|
5
|
+
default_instructions:
|
|
6
|
+
'Read the question and click the correct answer below. Use the arrows to move between questions.',
|
|
6
7
|
questions: 'Questions',
|
|
7
8
|
modal_title: 'Multiple Choice Question',
|
|
8
9
|
question_hint: 'Question Hint',
|
|
@@ -11,7 +12,7 @@ export default {
|
|
|
11
12
|
answer_options: 'Answer Options',
|
|
12
13
|
answer_option: 'Answer Option',
|
|
13
14
|
correct: 'Correct',
|
|
14
|
-
|
|
15
|
-
add_answer: 'Add Answer',
|
|
15
|
+
add_answer: 'Add Answer Option',
|
|
16
16
|
add_question: 'Add Question',
|
|
17
|
+
answer: 'Answers',
|
|
17
18
|
}
|
|
@@ -37,5 +37,10 @@ export default {
|
|
|
37
37
|
click_here: 'Haga clic aquí para ingresar texto',
|
|
38
38
|
add_answer: 'Agregar respuesta',
|
|
39
39
|
color: 'Color del cubo',
|
|
40
|
+
replace_existing: 'Reemplazar cubos existentes',
|
|
41
|
+
replaced_successfully: 'Cubos reemplazados exitosamente',
|
|
42
|
+
added_successfully: 'Nuevos cubos añadidos exitosamente',
|
|
43
|
+
invalid_response: 'Respuesta inválida de la generación del juego de cubos',
|
|
44
|
+
failed_to_process: 'Error al procesar los cubos generados'
|
|
40
45
|
},
|
|
41
46
|
}
|
|
@@ -12,8 +12,7 @@ export default {
|
|
|
12
12
|
answer_options: 'Opciones de respuesta',
|
|
13
13
|
answer_option: 'Opción de respuesta',
|
|
14
14
|
correct: 'Correcto',
|
|
15
|
-
|
|
16
|
-
'Haga clic en una respuesta para establecerla como la respuesta correcta',
|
|
17
|
-
add_answer: 'Agregar respuesta',
|
|
15
|
+
add_answer: 'Agregar opción de respuesta',
|
|
18
16
|
add_question: 'Agregar pregunta',
|
|
17
|
+
answer: 'Respuestas',
|
|
19
18
|
}
|
|
@@ -36,5 +36,10 @@ export default {
|
|
|
36
36
|
click_here: 'Klicka här för att skriva in text',
|
|
37
37
|
add_answer: 'Lägg till svar',
|
|
38
38
|
color: 'Bucket Color',
|
|
39
|
+
replace_existing: 'Ersätt befintliga hinkar',
|
|
40
|
+
replaced_successfully: 'Hinkar ersatta',
|
|
41
|
+
added_successfully: 'Nya hinkar tillagda',
|
|
42
|
+
invalid_response: 'Ogiltig svar från hinkspel',
|
|
43
|
+
failed_to_process: 'Misslyckades att bearbeta hinkar'
|
|
39
44
|
},
|
|
40
45
|
}
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
answer_options: 'Svarsalternativ',
|
|
12
12
|
answer_option: 'Svarsalternativ',
|
|
13
13
|
correct: 'Korrekt',
|
|
14
|
-
|
|
15
|
-
add_answer: 'Lägg till svar',
|
|
14
|
+
add_answer: 'Lägg till svarsalternativ',
|
|
16
15
|
add_question: 'Lägg till fråga',
|
|
16
|
+
answer: 'Svar',
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -6,27 +6,6 @@ import Vuetify from 'vuetify'
|
|
|
6
6
|
import Vue from 'vue'
|
|
7
7
|
Vue.use(Vuetify)
|
|
8
8
|
|
|
9
|
-
//override default mock
|
|
10
|
-
jest.mock(
|
|
11
|
-
'lodash',
|
|
12
|
-
() => {
|
|
13
|
-
return {
|
|
14
|
-
cloneDeep: () => {
|
|
15
|
-
return []
|
|
16
|
-
},
|
|
17
|
-
isEmpty: () => {
|
|
18
|
-
return jest.fn()
|
|
19
|
-
},
|
|
20
|
-
flatten: () => {
|
|
21
|
-
return jest.fn()
|
|
22
|
-
},
|
|
23
|
-
get: () => {
|
|
24
|
-
return jest.fn()
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
{ virtual: true }
|
|
29
|
-
)
|
|
30
9
|
describe('CrosswordPuzzle', () => {
|
|
31
10
|
test('is a Vue instance', () => {
|
|
32
11
|
const wrapper = shallowMount(CrosswordPuzzle, {
|
|
@@ -6,27 +6,6 @@ import Vuetify from 'vuetify'
|
|
|
6
6
|
import Vue from 'vue'
|
|
7
7
|
Vue.use(Vuetify)
|
|
8
8
|
|
|
9
|
-
//override default mock
|
|
10
|
-
jest.mock(
|
|
11
|
-
'lodash',
|
|
12
|
-
() => {
|
|
13
|
-
return {
|
|
14
|
-
cloneDeep: () => {
|
|
15
|
-
return []
|
|
16
|
-
},
|
|
17
|
-
isEmpty: () => {
|
|
18
|
-
return jest.fn()
|
|
19
|
-
},
|
|
20
|
-
flatten: () => {
|
|
21
|
-
return jest.fn()
|
|
22
|
-
},
|
|
23
|
-
get: () => {
|
|
24
|
-
return jest.fn()
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
{ virtual: true }
|
|
29
|
-
)
|
|
30
9
|
describe('SortingGame', () => {
|
|
31
10
|
test('is a Vue instance', () => {
|
|
32
11
|
const wrapper = shallowMount(SortingGame, {
|