@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
package/CHANGELOG.md
CHANGED
|
@@ -1,41 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Release [0.19.0] created - 2025-05-30
|
|
4
4
|
|
|
5
|
+
### Release [0.18.0] created - 2025-05-20
|
|
5
6
|
|
|
6
|
-
###
|
|
7
|
+
### Hotfix [0.17.1] created - 2025-05-21
|
|
7
8
|
|
|
9
|
+
### Release [0.17.0] created - 2025-05-13
|
|
8
10
|
|
|
9
11
|
### Release [0.16.0] created - 2025-04-29
|
|
10
12
|
|
|
11
|
-
|
|
12
13
|
### Release [0.15.0] created - 2025-04-09
|
|
13
14
|
|
|
14
|
-
|
|
15
15
|
### Release [0.14.0] created - 2025-03-25
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
### Release [0.13.0] created - 2025-03-11
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
### Hotfix [0.12.1] created - 2025-02-20
|
|
22
20
|
|
|
23
|
-
|
|
24
21
|
### Release [0.12.0] created - 2025-02-18
|
|
25
22
|
|
|
26
|
-
|
|
27
23
|
### Release [0.11.0] created - 2025-02-05
|
|
28
24
|
|
|
29
|
-
|
|
30
25
|
### Release [0.10.0] created - 2025-01-03
|
|
31
26
|
|
|
32
|
-
|
|
33
27
|
## Release [0.7.0] - 2024-08-29
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
- Version bump to 0.7.0
|
|
37
30
|
|
|
38
31
|
### Release [0.7.0] created - 2024-08-29
|
|
39
32
|
|
|
40
|
-
|
|
41
33
|
### Release [0.6.0] created - 2024-07-30
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container class="pa-0">
|
|
3
3
|
<div>
|
|
4
|
-
<h2
|
|
4
|
+
<h2
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title &&
|
|
7
|
+
block.metadata.config.display_title
|
|
8
|
+
"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
>
|
|
5
11
|
{{ block.metadata.config.title }}
|
|
6
12
|
</h2>
|
|
7
13
|
<p
|
|
@@ -117,9 +123,9 @@
|
|
|
117
123
|
</template>
|
|
118
124
|
|
|
119
125
|
<script>
|
|
126
|
+
import _ from 'lodash'
|
|
120
127
|
import { Crossword } from './Crossword'
|
|
121
128
|
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
122
|
-
import _ from 'lodash'
|
|
123
129
|
import Crypto from '~/helpers/Crypto'
|
|
124
130
|
import CrosswordClues from './CrosswordClues.vue'
|
|
125
131
|
|
|
@@ -144,6 +150,9 @@ export default {
|
|
|
144
150
|
'windward.games.components.content.blocks.crossword.crossword'
|
|
145
151
|
)
|
|
146
152
|
}
|
|
153
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
154
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
155
|
+
}
|
|
147
156
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
148
157
|
this.block.metadata.config.instructions = ''
|
|
149
158
|
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div>
|
|
4
4
|
<h2
|
|
5
|
-
v-if="
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title &&
|
|
7
|
+
block.metadata.config.display_title
|
|
8
|
+
"
|
|
6
9
|
:aria-label="
|
|
7
10
|
$t(
|
|
8
11
|
'windward.games.components.content.blocks.bucket_game.aria_title'
|
|
@@ -339,6 +342,9 @@ export default {
|
|
|
339
342
|
'windward.games.components.content.blocks.bucket_game.game_title'
|
|
340
343
|
)
|
|
341
344
|
}
|
|
345
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
346
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
347
|
+
}
|
|
342
348
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
343
349
|
this.block.metadata.config.instructions = ''
|
|
344
350
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<h2
|
|
3
|
+
<h2
|
|
4
|
+
v-if="
|
|
5
|
+
block.metadata.config.title &&
|
|
6
|
+
block.metadata.config.display_title
|
|
7
|
+
"
|
|
8
|
+
tabindex="0"
|
|
9
|
+
>
|
|
4
10
|
{{ block.metadata.config.title }}
|
|
5
11
|
</h2>
|
|
6
12
|
<p v-if="block.metadata.config.instructions" tabindex="0" class="pt-3">
|
|
@@ -149,6 +155,9 @@ export default {
|
|
|
149
155
|
'windward.games.components.settings.sorting_game.sortable_game'
|
|
150
156
|
)
|
|
151
157
|
}
|
|
158
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
159
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
160
|
+
}
|
|
152
161
|
if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
|
|
153
162
|
this.block.metadata.config.feedback_correct = this.$t(
|
|
154
163
|
'windward.games.components.settings.sorting_game.default_feedback_correct'
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
<v-container
|
|
3
3
|
class="fill-height d-flex flex-column align-center justify-center"
|
|
4
4
|
>
|
|
5
|
-
<div class="card-content">
|
|
6
|
-
<v-row
|
|
5
|
+
<div class="card-content d-flex align-center">
|
|
6
|
+
<v-row
|
|
7
|
+
class="d-flex align-center justify-center content-scroll-wrapper"
|
|
8
|
+
>
|
|
7
9
|
<content-viewer :class="textClass" v-model="settings.text" />
|
|
8
10
|
</v-row>
|
|
9
11
|
<v-row
|
|
@@ -22,7 +24,7 @@
|
|
|
22
24
|
</v-col>
|
|
23
25
|
</v-row>
|
|
24
26
|
</div>
|
|
25
|
-
<v-row class="card-footer
|
|
27
|
+
<v-row class="card-footer mt-2">
|
|
26
28
|
{{ settings.footer }}
|
|
27
29
|
<v-icon color="primary">mdi-orbit-variant</v-icon>
|
|
28
30
|
</v-row>
|
|
@@ -95,6 +97,9 @@ export default {
|
|
|
95
97
|
color: var(--v-primary-base);
|
|
96
98
|
font-size: 1rem;
|
|
97
99
|
max-height: 100%;
|
|
100
|
+
min-height: 300px;
|
|
101
|
+
min-width: 100%;
|
|
102
|
+
flex-direction: column;
|
|
98
103
|
}
|
|
99
104
|
.card-content--bold {
|
|
100
105
|
font-weight: bold;
|
|
@@ -106,6 +111,8 @@ p.card-content {
|
|
|
106
111
|
}
|
|
107
112
|
.card-footer {
|
|
108
113
|
font-weight: bold;
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: 90%;
|
|
109
116
|
color: var(--v-primary-base);
|
|
110
117
|
}
|
|
111
118
|
.centered {
|
|
@@ -115,15 +122,12 @@ p.card-content {
|
|
|
115
122
|
left: 50%;
|
|
116
123
|
transform: translate(-50%, -50%);
|
|
117
124
|
}
|
|
118
|
-
.card-footer {
|
|
119
|
-
margin: 0;
|
|
120
|
-
position: absolute;
|
|
121
|
-
top: 90%;
|
|
122
|
-
left: 50%;
|
|
123
|
-
transform: translate(-50%, -50%);
|
|
124
|
-
color: var(--v-primary-base);
|
|
125
|
-
}
|
|
126
125
|
.paragraph {
|
|
127
126
|
margin: 5%;
|
|
128
127
|
}
|
|
128
|
+
.content-scroll-wrapper {
|
|
129
|
+
max-height: 100%;
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
width: 100%;
|
|
132
|
+
}
|
|
129
133
|
</style>
|
|
@@ -65,7 +65,6 @@ export default {
|
|
|
65
65
|
slide: { type: Number, required: true, default: 0 },
|
|
66
66
|
assets: { type: Array, required: true },
|
|
67
67
|
},
|
|
68
|
-
|
|
69
68
|
computed: {
|
|
70
69
|
cardClass() {
|
|
71
70
|
let result = 'animated flashcard'
|
|
@@ -117,7 +116,6 @@ export default {
|
|
|
117
116
|
toggleCard() {
|
|
118
117
|
//only flip card when user click
|
|
119
118
|
this.flip = true
|
|
120
|
-
//this.cardClass = 'animated flipInY flashcard flashcard--size-md'
|
|
121
119
|
this.$emit('input', !this.side)
|
|
122
120
|
this.side = !this.side
|
|
123
121
|
// update container with correct side
|
|
@@ -214,7 +212,6 @@ export default {
|
|
|
214
212
|
|
|
215
213
|
.flashcard:hover {
|
|
216
214
|
box-shadow: 0 0px 12px rgba(0, 0, 0, 0.8);
|
|
217
|
-
background-color: var(--v-background-darken1);
|
|
218
215
|
}
|
|
219
216
|
|
|
220
217
|
.animated {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<h2
|
|
3
|
+
<h2
|
|
4
|
+
v-if="
|
|
5
|
+
block.metadata.config.title &&
|
|
6
|
+
block.metadata.config.display_title
|
|
7
|
+
"
|
|
8
|
+
tabindex="0"
|
|
9
|
+
>
|
|
4
10
|
{{ block.metadata.config.title }}
|
|
5
11
|
</h2>
|
|
6
12
|
|
|
@@ -12,7 +18,7 @@
|
|
|
12
18
|
<template #prev="{ on, attrs }">
|
|
13
19
|
<v-btn
|
|
14
20
|
variant="elevated"
|
|
15
|
-
color="
|
|
21
|
+
:color="styleForText"
|
|
16
22
|
elevation="0"
|
|
17
23
|
outlined
|
|
18
24
|
fab
|
|
@@ -25,7 +31,7 @@
|
|
|
25
31
|
<template #next="{ on, attrs }">
|
|
26
32
|
<v-btn
|
|
27
33
|
variant="elevated"
|
|
28
|
-
color="
|
|
34
|
+
:color="styleForText"
|
|
29
35
|
elevation="0"
|
|
30
36
|
outlined
|
|
31
37
|
fab
|
|
@@ -39,7 +45,11 @@
|
|
|
39
45
|
v-for="(card, index) in block.metadata.config.cards"
|
|
40
46
|
:key="index"
|
|
41
47
|
>
|
|
42
|
-
<v-sheet
|
|
48
|
+
<v-sheet
|
|
49
|
+
height="90%"
|
|
50
|
+
tile
|
|
51
|
+
:style="setBackgroundInCaseHighlight()"
|
|
52
|
+
>
|
|
43
53
|
<Flashcard
|
|
44
54
|
:options="card"
|
|
45
55
|
:slide="currentSlide"
|
|
@@ -47,14 +57,17 @@
|
|
|
47
57
|
:assets="block.assets"
|
|
48
58
|
/>
|
|
49
59
|
</v-sheet>
|
|
50
|
-
<
|
|
60
|
+
<v-container
|
|
61
|
+
class="d-flex justify-end"
|
|
62
|
+
:style="setTextColorInCaseHighlight()"
|
|
63
|
+
>
|
|
51
64
|
{{
|
|
52
65
|
$t('windward.games.shared.content_blocks.out_of', [
|
|
53
66
|
index + 1,
|
|
54
67
|
block.metadata.config.cards.length,
|
|
55
68
|
])
|
|
56
69
|
}}
|
|
57
|
-
</
|
|
70
|
+
</v-container>
|
|
58
71
|
</v-carousel-item>
|
|
59
72
|
</v-carousel>
|
|
60
73
|
</div>
|
|
@@ -94,6 +107,9 @@ export default {
|
|
|
94
107
|
)
|
|
95
108
|
this.block.metadata.config.instructions = ''
|
|
96
109
|
}
|
|
110
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
111
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
112
|
+
}
|
|
97
113
|
if (_.isEmpty(this.block.assets)) {
|
|
98
114
|
this.block.assets = []
|
|
99
115
|
}
|
|
@@ -109,11 +125,43 @@ export default {
|
|
|
109
125
|
}
|
|
110
126
|
return 0
|
|
111
127
|
},
|
|
128
|
+
styleForText() {
|
|
129
|
+
// if highlight is set, use black instead of primary
|
|
130
|
+
if (
|
|
131
|
+
this.block.metadata.display.setHighlight &&
|
|
132
|
+
this.block.metadata.display.highlight
|
|
133
|
+
) {
|
|
134
|
+
return 'black'
|
|
135
|
+
} else {
|
|
136
|
+
return 'primary'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
112
139
|
},
|
|
113
140
|
methods: {
|
|
114
141
|
onActionPanelEdit() {
|
|
115
142
|
this.render = !this.render
|
|
116
143
|
},
|
|
144
|
+
setBackgroundInCaseHighlight() {
|
|
145
|
+
let style = ''
|
|
146
|
+
if (
|
|
147
|
+
!_.isEmpty(this.block.metadata.display) &&
|
|
148
|
+
!_.isEmpty(this.block.metadata.display.highlight)
|
|
149
|
+
) {
|
|
150
|
+
style =
|
|
151
|
+
'background-color: ' + this.block.metadata.display.highlight
|
|
152
|
+
}
|
|
153
|
+
return style
|
|
154
|
+
},
|
|
155
|
+
setTextColorInCaseHighlight() {
|
|
156
|
+
let style = ''
|
|
157
|
+
if (
|
|
158
|
+
!_.isEmpty(this.block.metadata.display) &&
|
|
159
|
+
!_.isEmpty(this.block.metadata.display.highlight)
|
|
160
|
+
) {
|
|
161
|
+
style = 'color: black'
|
|
162
|
+
}
|
|
163
|
+
return style
|
|
164
|
+
},
|
|
117
165
|
},
|
|
118
166
|
}
|
|
119
167
|
</script>
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div>
|
|
4
4
|
<h2
|
|
5
|
-
v-if="
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title &&
|
|
7
|
+
block.metadata.config.display_title
|
|
8
|
+
"
|
|
6
9
|
:aria-label="
|
|
7
10
|
$t(
|
|
8
11
|
'windward.games.components.content.blocks.matching_game.match_game_title'
|
|
@@ -332,6 +335,9 @@ export default {
|
|
|
332
335
|
'windward.games.components.settings.matching_game.form.title'
|
|
333
336
|
)
|
|
334
337
|
}
|
|
338
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
339
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
340
|
+
}
|
|
335
341
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
336
342
|
this.block.metadata.config.instructions = ''
|
|
337
343
|
}
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
<v-container class="pa-0">
|
|
3
3
|
<v-row>
|
|
4
4
|
<v-col>
|
|
5
|
-
<h2
|
|
5
|
+
<h2
|
|
6
|
+
v-if="
|
|
7
|
+
block.metadata.config.title &&
|
|
8
|
+
block.metadata.config.display_title
|
|
9
|
+
"
|
|
10
|
+
tabindex="0"
|
|
11
|
+
>
|
|
6
12
|
{{ block.metadata.config.title }}
|
|
7
13
|
</h2>
|
|
8
14
|
<p
|
|
@@ -46,7 +52,9 @@
|
|
|
46
52
|
:key="question.id"
|
|
47
53
|
>
|
|
48
54
|
<v-col class="d-flex justify-center">
|
|
49
|
-
<p>
|
|
55
|
+
<p>
|
|
56
|
+
<TextViewer v-model="question.body"></TextViewer>
|
|
57
|
+
</p>
|
|
50
58
|
</v-col>
|
|
51
59
|
<v-container :key="updateKey" class="pl-16 pr-16">
|
|
52
60
|
<v-row
|
|
@@ -71,16 +79,20 @@
|
|
|
71
79
|
@keyup.enter="onChooseAnswer(answer, question)"
|
|
72
80
|
>
|
|
73
81
|
<div class="d-flex justify-space-between">
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
<div class="d-flex">
|
|
83
|
+
<p
|
|
84
|
+
class="mb-0"
|
|
85
|
+
:aria-labelledby="answer.value"
|
|
86
|
+
>
|
|
87
|
+
{{
|
|
88
|
+
getCharacter(question, answer) +
|
|
89
|
+
'. '
|
|
90
|
+
}}
|
|
91
|
+
</p>
|
|
92
|
+
<TextViewer
|
|
93
|
+
v-model="answer.value"
|
|
94
|
+
></TextViewer>
|
|
95
|
+
</div>
|
|
84
96
|
<div>
|
|
85
97
|
<v-icon
|
|
86
98
|
v-if="
|
|
@@ -217,12 +229,11 @@
|
|
|
217
229
|
</template>
|
|
218
230
|
<template #form="{ on, attrs }">
|
|
219
231
|
<div v-bind="attrs" v-on="on">
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
</div>
|
|
232
|
+
<TextViewer v-if="hint" v-model="hintText"></TextViewer>
|
|
233
|
+
<TextViewer
|
|
234
|
+
v-if="answerDescriptionModal"
|
|
235
|
+
v-model="answerDescription"
|
|
236
|
+
></TextViewer>
|
|
226
237
|
</div>
|
|
227
238
|
</template>
|
|
228
239
|
</DialogBox>
|
|
@@ -235,11 +246,12 @@ import Crypto from '~/helpers/Crypto'
|
|
|
235
246
|
import { mapGetters } from 'vuex'
|
|
236
247
|
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
237
248
|
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
249
|
+
import TextViewer from '~/components/Text/TextViewer.vue'
|
|
238
250
|
|
|
239
251
|
export default {
|
|
240
252
|
name: 'MultipleChoice',
|
|
241
253
|
extends: BaseContentBlock,
|
|
242
|
-
components: { DialogBox },
|
|
254
|
+
components: { DialogBox, TextViewer },
|
|
243
255
|
beforeMount() {
|
|
244
256
|
if (_.isEmpty(this.block)) {
|
|
245
257
|
this.block = {}
|
|
@@ -255,6 +267,9 @@ export default {
|
|
|
255
267
|
'windward.games.components.content.blocks.multiple_choice.game_title'
|
|
256
268
|
)
|
|
257
269
|
}
|
|
270
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
271
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
272
|
+
}
|
|
258
273
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
259
274
|
this.block.metadata.config.instructions = ''
|
|
260
275
|
}
|