@windward/games 0.0.9 → 0.1.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 +2 -2
- package/components/content/blocks/crosswordPuzzle/CrosswordClues.vue +4 -2
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +14 -12
- package/components/content/blocks/dragDrop/BucketGame.vue +54 -101
- package/components/content/blocks/dragDrop/SortingGame.vue +47 -33
- package/components/content/blocks/flashcards/CardFace.vue +38 -39
- package/components/content/blocks/flashcards/Flashcard.vue +109 -28
- package/components/content/blocks/flashcards/FlashcardSlides.vue +3 -2
- package/components/content/blocks/matchingGame/MatchingGame.vue +105 -61
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +186 -225
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +7 -7
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +31 -24
- package/components/content/blocks/quizshowGame/Gridview.vue +20 -24
- package/components/content/blocks/quizshowGame/QuizShow.vue +22 -9
- package/components/content/blocks/quizshowGame/feedbackIcons.vue +4 -2
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +153 -108
- package/components/content/blocks/sevenStrikes/keyboard.vue +9 -2
- package/components/content/blocks/slideshow/SlideShow.vue +5 -3
- package/components/content/blocks/wordJumble/Jumble.vue +4 -4
- package/components/content/blocks/wordJumble/WordJumble.vue +128 -62
- package/components/settings/BucketGameSettingsManager.vue +185 -359
- package/components/settings/CrosswordPuzzleSettingsManager.vue +114 -181
- package/components/settings/FlashCardSlidesManager.vue +323 -419
- package/components/settings/MatchingGameManager.vue +357 -618
- package/components/settings/MultipleChoiceSettingsManager.vue +130 -140
- package/components/settings/QuizShowSettingsManager.vue +17 -17
- package/components/settings/SevenStrikesSettingsManager.vue +131 -193
- package/components/settings/SlideShowManager.vue +91 -129
- package/components/settings/SortingGameSettingsManager.vue +41 -153
- package/components/settings/WordJumbleSettingsManager.vue +84 -150
- package/i18n/en-US/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/en-US/components/content/blocks/flashcard.ts +3 -0
- package/i18n/en-US/components/content/blocks/word_jumble.ts +2 -0
- package/i18n/en-US/components/settings/bucket_game.ts +3 -2
- package/i18n/en-US/components/settings/flashcard.ts +1 -0
- package/i18n/en-US/components/settings/matching_game.ts +1 -1
- package/i18n/en-US/components/settings/quizshow_game.ts +1 -1
- package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
- package/i18n/en-US/components/settings/slideshow.ts +2 -0
- package/i18n/en-US/index.ts +2 -1
- package/i18n/es-ES/components/content/blocks/bucket_game.ts +40 -0
- package/i18n/es-ES/components/content/blocks/crossword.ts +25 -0
- package/i18n/es-ES/components/content/blocks/flashcard.ts +8 -0
- package/i18n/es-ES/components/content/blocks/index.ts +23 -0
- package/i18n/es-ES/components/content/blocks/matching_game.ts +26 -0
- package/i18n/es-ES/components/content/blocks/multiple_choice.ts +9 -0
- package/i18n/es-ES/components/content/blocks/quizshow_game.ts +35 -0
- package/i18n/es-ES/components/content/blocks/seven_strikes.ts +6 -0
- package/i18n/es-ES/components/content/blocks/slideshow.ts +13 -0
- package/i18n/es-ES/components/content/blocks/sorting_game.ts +5 -0
- package/i18n/es-ES/components/content/blocks/word_jumble.ts +11 -0
- package/i18n/es-ES/components/content/crud_table.ts +6 -0
- package/i18n/es-ES/components/content/index.ts +7 -0
- package/i18n/es-ES/components/index.ts +9 -0
- package/i18n/es-ES/components/navigation/index.ts +5 -0
- package/i18n/es-ES/components/settings/bucket_game.ts +39 -0
- package/i18n/es-ES/components/settings/crossword.ts +7 -0
- package/i18n/es-ES/components/settings/flashcard.ts +29 -0
- package/i18n/es-ES/components/settings/index.ts +23 -0
- package/i18n/es-ES/components/settings/matching_game.ts +15 -0
- package/i18n/es-ES/components/settings/multiple_choice.ts +17 -0
- package/i18n/es-ES/components/settings/quizshow_game.ts +20 -0
- package/i18n/es-ES/components/settings/seven_strikes.ts +8 -0
- package/i18n/es-ES/components/settings/slideshow.ts +13 -0
- package/i18n/es-ES/components/settings/sorting_game.ts +5 -0
- package/i18n/es-ES/components/settings/word_jumble.ts +11 -0
- package/i18n/es-ES/index.ts +16 -0
- package/i18n/es-ES/modules/index.ts +5 -0
- package/i18n/es-ES/pages/index.ts +5 -0
- package/i18n/es-ES/shared/content_blocks.ts +18 -0
- package/i18n/es-ES/shared/index.ts +7 -0
- package/i18n/es-ES/shared/settings.ts +14 -0
- package/i18n/index.ts +11 -0
- package/i18n/sv-SE/components/content/blocks/bucket_game.ts +40 -0
- package/i18n/sv-SE/components/content/blocks/crossword.ts +20 -0
- package/i18n/sv-SE/components/content/blocks/flashcard.ts +8 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +23 -0
- package/i18n/sv-SE/components/content/blocks/matching_game.ts +25 -0
- package/i18n/sv-SE/components/content/blocks/multiple_choice.ts +9 -0
- package/i18n/sv-SE/components/content/blocks/quizshow_game.ts +35 -0
- package/i18n/sv-SE/components/content/blocks/seven_strikes.ts +6 -0
- package/i18n/sv-SE/components/content/blocks/slideshow.ts +13 -0
- package/i18n/sv-SE/components/content/blocks/sorting_game.ts +5 -0
- package/i18n/sv-SE/components/content/blocks/word_jumble.ts +11 -0
- package/i18n/sv-SE/components/content/crud_table.ts +6 -0
- package/i18n/sv-SE/components/content/index.ts +7 -0
- package/i18n/sv-SE/components/index.ts +9 -0
- package/i18n/sv-SE/components/navigation/index.ts +5 -0
- package/i18n/sv-SE/components/settings/bucket_game.ts +38 -0
- package/i18n/sv-SE/components/settings/crossword.ts +7 -0
- package/i18n/sv-SE/components/settings/flashcard.ts +29 -0
- package/i18n/sv-SE/components/settings/index.ts +23 -0
- package/i18n/sv-SE/components/settings/matching_game.ts +15 -0
- package/i18n/sv-SE/components/settings/multiple_choice.ts +16 -0
- package/i18n/sv-SE/components/settings/quizshow_game.ts +20 -0
- package/i18n/sv-SE/components/settings/seven_strikes.ts +8 -0
- package/i18n/sv-SE/components/settings/slideshow.ts +13 -0
- package/i18n/sv-SE/components/settings/sorting_game.ts +5 -0
- package/i18n/sv-SE/components/settings/word_jumble.ts +11 -0
- package/i18n/sv-SE/index.ts +16 -0
- package/i18n/sv-SE/modules/index.ts +5 -0
- package/i18n/sv-SE/pages/index.ts +5 -0
- package/i18n/sv-SE/shared/content_blocks.ts +18 -0
- package/i18n/sv-SE/shared/index.ts +7 -0
- package/i18n/sv-SE/shared/settings.ts +14 -0
- package/package.json +1 -1
- package/plugin.js +33 -34
- package/test/Feature/LocaleKeys.spec.js +11 -0
- package/test/__mocks__/componentsMock.js +12 -0
- package/test/__mocks__/fileMock.js +1 -0
- package/test/__mocks__/modelMock.js +88 -0
- package/test/__mocks__/styleMock.js +1 -0
- package/test/blocks/crossword/CrosswordPuzzle.spec.js +1 -1
- package/test/blocks/dragDrop/BucketGame.spec.js +1 -1
- package/test/blocks/dragDrop/SortingGame.spec.js +1 -1
- package/test/blocks/flashcards/CardFace.spec.js +1 -1
- package/test/blocks/flashcards/FlashCardSlides.spec.js +1 -1
- package/test/blocks/flashcards/Flashcard.spec.js +1 -1
- package/test/blocks/matchingGame/MatchingGame.spec.js +1 -1
- package/test/blocks/multipleChoice/MultipleChoice.spec.js +1 -1
- package/test/blocks/multipleChoice/QuestionDialog.spec.js +1 -1
- package/test/blocks/quizShow/quizShow.spec.js +1 -1
- package/test/blocks/sevenStrikes/sevenStrikes.spec.js +1 -1
- package/test/blocks/slideshow/slideshow.spec.js +1 -1
- package/test/blocks/wordJumble/Jumble.spec.js +1 -1
- package/test/blocks/wordJumble/WordJumble.spec.js +1 -1
- package/test/mocks.js +8 -2
- package/test/settings/BucketGameManager.spec.js +4 -4
- package/test/settings/CrosswordPuzzleManager.spec.js +6 -11
- package/test/settings/FlashCardSlidesManager.spec.js +1 -1
- package/test/settings/MatchingGameManager.spec.js +1 -1
- package/test/settings/MultipleChoiceGameManager.spec.js +1 -1
- package/test/settings/SevenStrikesManager.spec.js +1 -1
- package/test/settings/SlideShowManager.spec.js +1 -1
- package/test/settings/SortingGameManager.spec.js +1 -1
- package/test/settings/WordJumbleManager.spec.js +1 -4
- package/i18n/en-US.ts +0 -5
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:counter="50"
|
|
10
10
|
:label="
|
|
11
11
|
$t(
|
|
12
|
-
'
|
|
12
|
+
'windward.games.components.settings.bucket_game.form.title'
|
|
13
13
|
)
|
|
14
14
|
"
|
|
15
15
|
ref="title"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
:counter="255"
|
|
22
22
|
:label="
|
|
23
23
|
$t(
|
|
24
|
-
'
|
|
24
|
+
'windward.games.components.settings.bucket_game.form.instructions'
|
|
25
25
|
)
|
|
26
26
|
"
|
|
27
27
|
></v-textarea>
|
|
@@ -31,81 +31,42 @@
|
|
|
31
31
|
<p>
|
|
32
32
|
{{
|
|
33
33
|
$t(
|
|
34
|
-
'
|
|
34
|
+
'windward.games.components.settings.sorting_game.sortable_items'
|
|
35
35
|
)
|
|
36
36
|
}}
|
|
37
37
|
</p>
|
|
38
|
-
<
|
|
38
|
+
<SortableExpansionPanel
|
|
39
39
|
v-model="block.metadata.config.answer"
|
|
40
|
-
|
|
41
|
-
@change="onDragged"
|
|
40
|
+
@click:close="onDelete($event)"
|
|
42
41
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
)
|
|
72
|
-
}}
|
|
73
|
-
</span>
|
|
74
|
-
</p>
|
|
75
|
-
</v-flex>
|
|
76
|
-
<v-flex
|
|
77
|
-
xs2
|
|
78
|
-
class="btn-header-delete d-flex justify-center"
|
|
79
|
-
:class="bottomBorder(index)"
|
|
80
|
-
>
|
|
81
|
-
<v-icon
|
|
82
|
-
class="btn-delete-icon"
|
|
83
|
-
@click="onDelete(index)"
|
|
84
|
-
>mdi-delete-outline</v-icon
|
|
85
|
-
>
|
|
86
|
-
</v-flex>
|
|
87
|
-
<v-container v-if="item.expand">
|
|
88
|
-
<v-flex xs12>
|
|
89
|
-
<p class="p-label">
|
|
90
|
-
{{
|
|
91
|
-
$t(
|
|
92
|
-
'plugin.games.components.settings.sorting_game.word'
|
|
93
|
-
)
|
|
94
|
-
}}
|
|
95
|
-
</p>
|
|
96
|
-
<v-textarea
|
|
97
|
-
outlined
|
|
98
|
-
v-model="
|
|
99
|
-
block.metadata.config.answer[index]
|
|
100
|
-
.value
|
|
101
|
-
"
|
|
102
|
-
:autofocus="true"
|
|
103
|
-
></v-textarea>
|
|
104
|
-
</v-flex>
|
|
105
|
-
</v-container>
|
|
106
|
-
</v-layout>
|
|
107
|
-
</v-container>
|
|
108
|
-
</draggable>
|
|
42
|
+
<template #header="{ item, index }">
|
|
43
|
+
{{
|
|
44
|
+
item.value
|
|
45
|
+
? block.metadata.config.answer[index].value
|
|
46
|
+
: $t(
|
|
47
|
+
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
48
|
+
)
|
|
49
|
+
}}
|
|
50
|
+
</template>
|
|
51
|
+
<template #body="{ item, index }">
|
|
52
|
+
<v-container>
|
|
53
|
+
<p class="p-label">
|
|
54
|
+
{{
|
|
55
|
+
$t(
|
|
56
|
+
'windward.games.components.settings.sorting_game.word'
|
|
57
|
+
)
|
|
58
|
+
}}
|
|
59
|
+
</p>
|
|
60
|
+
<v-textarea
|
|
61
|
+
outlined
|
|
62
|
+
v-model="
|
|
63
|
+
block.metadata.config.answer[index].value
|
|
64
|
+
"
|
|
65
|
+
:autofocus="true"
|
|
66
|
+
></v-textarea>
|
|
67
|
+
</v-container>
|
|
68
|
+
</template>
|
|
69
|
+
</SortableExpansionPanel>
|
|
109
70
|
</v-container>
|
|
110
71
|
<v-container class="pa-0">
|
|
111
72
|
<v-row justify="center" class="my-4">
|
|
@@ -113,7 +74,7 @@
|
|
|
113
74
|
<v-icon>mdi-plus</v-icon>
|
|
114
75
|
{{
|
|
115
76
|
$t(
|
|
116
|
-
'
|
|
77
|
+
'windward.games.components.settings.bucket_game.form.add_answer'
|
|
117
78
|
)
|
|
118
79
|
}}
|
|
119
80
|
</v-btn>
|
|
@@ -125,7 +86,7 @@
|
|
|
125
86
|
:counter="255"
|
|
126
87
|
:label="
|
|
127
88
|
$t(
|
|
128
|
-
'
|
|
89
|
+
'windward.games.components.settings.bucket_game.form.feedback.correct'
|
|
129
90
|
)
|
|
130
91
|
"
|
|
131
92
|
></v-textarea>
|
|
@@ -136,7 +97,7 @@
|
|
|
136
97
|
:counter="255"
|
|
137
98
|
:label="
|
|
138
99
|
$t(
|
|
139
|
-
'
|
|
100
|
+
'windward.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
140
101
|
)
|
|
141
102
|
"
|
|
142
103
|
></v-textarea>
|
|
@@ -155,13 +116,12 @@
|
|
|
155
116
|
|
|
156
117
|
<script>
|
|
157
118
|
import _ from 'lodash'
|
|
158
|
-
import draggable from 'vuedraggable'
|
|
159
119
|
import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
|
|
160
|
-
import
|
|
120
|
+
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
161
121
|
export default {
|
|
162
122
|
name: 'SortingGameSettingsManager',
|
|
163
123
|
extends: BaseContentSettings,
|
|
164
|
-
components: {
|
|
124
|
+
components: { SortableExpansionPanel },
|
|
165
125
|
beforeMount() {
|
|
166
126
|
if (_.isEmpty(this.block)) {
|
|
167
127
|
this.block = {}
|
|
@@ -174,17 +134,17 @@ export default {
|
|
|
174
134
|
}
|
|
175
135
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
176
136
|
this.block.metadata.config.title = this.$t(
|
|
177
|
-
'
|
|
137
|
+
'windward.games.components.settings.sorting_game.sortable_game'
|
|
178
138
|
)
|
|
179
139
|
}
|
|
180
140
|
if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
|
|
181
141
|
this.block.metadata.config.feedback_correct = this.$t(
|
|
182
|
-
'
|
|
142
|
+
'windward.games.components.settings.bucket_game.form.feedback.correct_default'
|
|
183
143
|
)
|
|
184
144
|
}
|
|
185
145
|
if (_.isEmpty(this.block.metadata.config.feedback_incorrect)) {
|
|
186
146
|
this.block.metadata.config.feedback_incorrect = this.$t(
|
|
187
|
-
'
|
|
147
|
+
'windward.games.components.settings.bucket_game.form.feedback.incorrect_default'
|
|
188
148
|
)
|
|
189
149
|
}
|
|
190
150
|
if (_.isEmpty(this.block.metadata.config.answer)) {
|
|
@@ -214,13 +174,6 @@ export default {
|
|
|
214
174
|
}
|
|
215
175
|
},
|
|
216
176
|
methods: {
|
|
217
|
-
bottomBorder(index) {
|
|
218
|
-
if (this.block.metadata.config.answer[index].expand === true) {
|
|
219
|
-
return 'container-header-border'
|
|
220
|
-
} else {
|
|
221
|
-
return null
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
177
|
onAddElement() {
|
|
225
178
|
this.block.metadata.config.answer.forEach((element) => {
|
|
226
179
|
element.expand = false
|
|
@@ -240,28 +193,6 @@ export default {
|
|
|
240
193
|
return (element.id = startingIndex)
|
|
241
194
|
})
|
|
242
195
|
},
|
|
243
|
-
onOpenEditor(index) {
|
|
244
|
-
this.block.metadata.config.answer[index].expand =
|
|
245
|
-
!this.block.metadata.config.answer[index].expand
|
|
246
|
-
this.block.metadata.config.answer.forEach((element) => {
|
|
247
|
-
if (index + 1 !== element.id) {
|
|
248
|
-
element.expand = false
|
|
249
|
-
}
|
|
250
|
-
})
|
|
251
|
-
},
|
|
252
|
-
onHover(index) {
|
|
253
|
-
this.cursor = 'change-pointer'
|
|
254
|
-
},
|
|
255
|
-
onHoverLeave() {
|
|
256
|
-
this.cursor = ''
|
|
257
|
-
},
|
|
258
|
-
onDragged() {
|
|
259
|
-
let counter = 1
|
|
260
|
-
this.block.metadata.config.answer.forEach((element) => {
|
|
261
|
-
element.id = counter
|
|
262
|
-
counter = counter + 1
|
|
263
|
-
})
|
|
264
|
-
},
|
|
265
196
|
},
|
|
266
197
|
}
|
|
267
198
|
</script>
|
|
@@ -270,49 +201,6 @@ export default {
|
|
|
270
201
|
.v-progress-circular {
|
|
271
202
|
margin: 1rem;
|
|
272
203
|
}
|
|
273
|
-
.container-card-outline {
|
|
274
|
-
border: solid 1px var(--v-primary-base);
|
|
275
|
-
border-radius: 3px !important;
|
|
276
|
-
margin-bottom: 8px;
|
|
277
|
-
}
|
|
278
|
-
.container-header-border {
|
|
279
|
-
border-bottom: 1px solid var(--v-primary-base);
|
|
280
|
-
}
|
|
281
|
-
.fullWidth {
|
|
282
|
-
display: flex;
|
|
283
|
-
justify-content: center;
|
|
284
|
-
align-items: center;
|
|
285
|
-
font-weight: bold;
|
|
286
|
-
font-size: 16px;
|
|
287
|
-
}
|
|
288
|
-
.change-pointer {
|
|
289
|
-
cursor: pointer !important;
|
|
290
|
-
}
|
|
291
|
-
.p-header {
|
|
292
|
-
height: 45px;
|
|
293
|
-
display: flex;
|
|
294
|
-
align-items: center;
|
|
295
|
-
}
|
|
296
|
-
.p-header:hover {
|
|
297
|
-
background-color: rgb(243, 243, 243);
|
|
298
|
-
}
|
|
299
|
-
.span-text-ellipsis {
|
|
300
|
-
white-space: nowrap;
|
|
301
|
-
overflow: hidden;
|
|
302
|
-
text-overflow: ellipsis;
|
|
303
|
-
}
|
|
304
|
-
.btn-header-delete {
|
|
305
|
-
border-left: 1px solid var(--v-primary-base);
|
|
306
|
-
}
|
|
307
|
-
.btn-header-delete:hover {
|
|
308
|
-
background-color: rgb(243, 243, 243);
|
|
309
|
-
}
|
|
310
|
-
.btn-delete-icon {
|
|
311
|
-
color: var(--v-primary-base);
|
|
312
|
-
}
|
|
313
|
-
.addIcon {
|
|
314
|
-
margin-right: 5px;
|
|
315
|
-
}
|
|
316
204
|
.p-label {
|
|
317
205
|
font-size: 16px;
|
|
318
206
|
font-weight: 500;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:autofocus="true"
|
|
10
10
|
:label="
|
|
11
11
|
$t(
|
|
12
|
-
'
|
|
12
|
+
'windward.games.components.settings.word_jumble.title_input'
|
|
13
13
|
)
|
|
14
14
|
"
|
|
15
15
|
ref="title"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
v-model="block.metadata.config.instructions"
|
|
21
21
|
:label="
|
|
22
22
|
$t(
|
|
23
|
-
'
|
|
23
|
+
'windward.games.components.settings.word_jumble.instructions'
|
|
24
24
|
)
|
|
25
25
|
"
|
|
26
26
|
></v-textarea>
|
|
@@ -30,91 +30,59 @@
|
|
|
30
30
|
<p>
|
|
31
31
|
{{
|
|
32
32
|
$t(
|
|
33
|
-
'
|
|
33
|
+
'windward.games.components.settings.word_jumble.word_jumble'
|
|
34
34
|
)
|
|
35
35
|
}}
|
|
36
36
|
</p>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{{
|
|
60
|
-
word.value
|
|
61
|
-
? word.value
|
|
62
|
-
: $t(
|
|
63
|
-
'plugin.games.components.settings.word_jumble.click'
|
|
64
|
-
)
|
|
65
|
-
}}
|
|
66
|
-
</span>
|
|
37
|
+
<SortableExpansionPanel
|
|
38
|
+
v-model="block.metadata.config.words"
|
|
39
|
+
@click:close="onDelete($event)"
|
|
40
|
+
>
|
|
41
|
+
<template #header="{ item, index }">
|
|
42
|
+
{{
|
|
43
|
+
item.value
|
|
44
|
+
? item.value
|
|
45
|
+
: $t(
|
|
46
|
+
'windward.games.components.settings.word_jumble.click'
|
|
47
|
+
)
|
|
48
|
+
}}
|
|
49
|
+
</template>
|
|
50
|
+
<template #body="{ item, index }">
|
|
51
|
+
<v-container>
|
|
52
|
+
<v-flex xs12>
|
|
53
|
+
<p class="p-label">
|
|
54
|
+
{{
|
|
55
|
+
$t(
|
|
56
|
+
'windward.games.components.settings.word_jumble.word_jumble'
|
|
57
|
+
)
|
|
58
|
+
}}
|
|
67
59
|
</p>
|
|
60
|
+
<v-textarea
|
|
61
|
+
outlined
|
|
62
|
+
:autofocus="true"
|
|
63
|
+
v-model="
|
|
64
|
+
block.metadata.config.words[index].value
|
|
65
|
+
"
|
|
66
|
+
></v-textarea>
|
|
68
67
|
</v-flex>
|
|
69
|
-
<v-flex
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
<v-flex xs12>
|
|
69
|
+
<p class="p-label">
|
|
70
|
+
{{
|
|
71
|
+
$t(
|
|
72
|
+
'windward.games.components.settings.word_jumble.hint'
|
|
73
|
+
)
|
|
74
|
+
}}
|
|
75
|
+
</p>
|
|
76
|
+
<v-textarea
|
|
77
|
+
outlined
|
|
78
|
+
v-model="
|
|
79
|
+
block.metadata.config.words[index].hint
|
|
80
|
+
"
|
|
81
|
+
></v-textarea>
|
|
79
82
|
</v-flex>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{{
|
|
84
|
-
$t(
|
|
85
|
-
'plugin.games.components.settings.word_jumble.word_jumble'
|
|
86
|
-
)
|
|
87
|
-
}}
|
|
88
|
-
</p>
|
|
89
|
-
<v-textarea
|
|
90
|
-
outlined
|
|
91
|
-
:autofocus="true"
|
|
92
|
-
v-model="
|
|
93
|
-
block.metadata.config.words[index]
|
|
94
|
-
.value
|
|
95
|
-
"
|
|
96
|
-
></v-textarea>
|
|
97
|
-
</v-flex>
|
|
98
|
-
<v-flex xs12>
|
|
99
|
-
<p class="p-label">
|
|
100
|
-
{{
|
|
101
|
-
$t(
|
|
102
|
-
'plugin.games.components.settings.word_jumble.hint'
|
|
103
|
-
)
|
|
104
|
-
}}
|
|
105
|
-
</p>
|
|
106
|
-
<v-textarea
|
|
107
|
-
outlined
|
|
108
|
-
v-model="
|
|
109
|
-
block.metadata.config.words[index]
|
|
110
|
-
.hint
|
|
111
|
-
"
|
|
112
|
-
></v-textarea>
|
|
113
|
-
</v-flex>
|
|
114
|
-
</v-container>
|
|
115
|
-
</v-layout>
|
|
116
|
-
</v-container>
|
|
117
|
-
</draggable>
|
|
83
|
+
</v-container>
|
|
84
|
+
</template>
|
|
85
|
+
</SortableExpansionPanel>
|
|
118
86
|
</v-container>
|
|
119
87
|
<v-container class="pa-0">
|
|
120
88
|
<v-row justify="center" class="my-4">
|
|
@@ -122,7 +90,7 @@
|
|
|
122
90
|
<v-icon>mdi-plus</v-icon>
|
|
123
91
|
{{
|
|
124
92
|
$t(
|
|
125
|
-
'
|
|
93
|
+
'windward.games.components.settings.word_jumble.add'
|
|
126
94
|
)
|
|
127
95
|
}}
|
|
128
96
|
</v-btn>
|
|
@@ -134,7 +102,7 @@
|
|
|
134
102
|
:counter="50"
|
|
135
103
|
:label="
|
|
136
104
|
$t(
|
|
137
|
-
'
|
|
105
|
+
'windward.games.components.settings.word_jumble.feedback_correct'
|
|
138
106
|
)
|
|
139
107
|
"
|
|
140
108
|
ref="title"
|
|
@@ -145,7 +113,7 @@
|
|
|
145
113
|
v-model="block.metadata.config.feedback_incorrect"
|
|
146
114
|
:label="
|
|
147
115
|
$t(
|
|
148
|
-
'
|
|
116
|
+
'windward.games.components.settings.word_jumble.feedback_incorrect'
|
|
149
117
|
)
|
|
150
118
|
"
|
|
151
119
|
></v-textarea>
|
|
@@ -164,13 +132,13 @@
|
|
|
164
132
|
<script>
|
|
165
133
|
import _ from 'lodash'
|
|
166
134
|
import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
|
|
167
|
-
import
|
|
135
|
+
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
168
136
|
|
|
169
137
|
export default {
|
|
170
138
|
name: 'WordJumbleSettings',
|
|
171
139
|
extends: BaseContentSettings,
|
|
172
140
|
components: {
|
|
173
|
-
|
|
141
|
+
SortableExpansionPanel,
|
|
174
142
|
},
|
|
175
143
|
beforeMount() {
|
|
176
144
|
if (_.isEmpty(this.block)) {
|
|
@@ -184,7 +152,7 @@ export default {
|
|
|
184
152
|
}
|
|
185
153
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
186
154
|
this.block.metadata.config.title = this.$t(
|
|
187
|
-
'
|
|
155
|
+
'windward.games.components.content.blocks.word_jumble.title'
|
|
188
156
|
)
|
|
189
157
|
}
|
|
190
158
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
@@ -192,12 +160,12 @@ export default {
|
|
|
192
160
|
}
|
|
193
161
|
if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
|
|
194
162
|
this.block.metadata.config.feedback_correct = this.$t(
|
|
195
|
-
'
|
|
163
|
+
'windward.games.components.settings.bucket_game.form.feedback.correct_default'
|
|
196
164
|
)
|
|
197
165
|
}
|
|
198
166
|
if (_.isEmpty(this.block.metadata.config.feedback_incorrect)) {
|
|
199
167
|
this.block.metadata.config.feedback_incorrect = this.$t(
|
|
200
|
-
'
|
|
168
|
+
'windward.games.components.settings.bucket_game.form.feedback.incorrect_default'
|
|
201
169
|
)
|
|
202
170
|
}
|
|
203
171
|
if (_.isEmpty(this.block.metadata.config.words)) {
|
|
@@ -208,28 +176,43 @@ export default {
|
|
|
208
176
|
data() {
|
|
209
177
|
return {
|
|
210
178
|
valid: true,
|
|
211
|
-
debounce: null,
|
|
212
|
-
cursor: null,
|
|
213
179
|
loading: false,
|
|
214
180
|
}
|
|
215
181
|
},
|
|
216
182
|
methods: {
|
|
217
|
-
|
|
218
|
-
if (this.block.metadata.config.words[index].expand === true) {
|
|
219
|
-
return 'container-header-border'
|
|
220
|
-
} else {
|
|
221
|
-
return null
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
onAddWord() {
|
|
183
|
+
onBeforeSave() {
|
|
225
184
|
this.block.metadata.config.words.forEach((element) => {
|
|
226
|
-
element.
|
|
185
|
+
element.shuffledWord = this.shuffle(element.value)
|
|
227
186
|
})
|
|
187
|
+
},
|
|
188
|
+
shuffle(str) {
|
|
189
|
+
var a = str
|
|
190
|
+
var newArr = []
|
|
191
|
+
var neww = ''
|
|
192
|
+
var text = a.replace(/[\r\n]/g, '').split(' ')
|
|
193
|
+
|
|
194
|
+
text.map(function (v) {
|
|
195
|
+
v.split('').map(function () {
|
|
196
|
+
var hash = Math.floor(Math.random() * v.length)
|
|
197
|
+
neww += v[hash]
|
|
198
|
+
v = v.replace(v.charAt(hash), '')
|
|
199
|
+
})
|
|
200
|
+
newArr.push(neww)
|
|
201
|
+
neww = ''
|
|
202
|
+
})
|
|
203
|
+
var x = newArr.map((v) => v.split('').join(' ')).join('\n')
|
|
204
|
+
str = x
|
|
205
|
+
.split('')
|
|
206
|
+
.map((v) => v.toUpperCase())
|
|
207
|
+
.join('')
|
|
208
|
+
return str
|
|
209
|
+
},
|
|
210
|
+
onAddWord() {
|
|
228
211
|
let defaultWord = {
|
|
229
212
|
id: this.block.metadata.config.words.length + 1,
|
|
230
213
|
value: '',
|
|
231
214
|
hint: '',
|
|
232
|
-
|
|
215
|
+
shuffledWord: '',
|
|
233
216
|
}
|
|
234
217
|
this.block.metadata.config.words.push(defaultWord)
|
|
235
218
|
},
|
|
@@ -241,22 +224,6 @@ export default {
|
|
|
241
224
|
return (element.id = startingIndex)
|
|
242
225
|
})
|
|
243
226
|
},
|
|
244
|
-
onOpenEditor(index) {
|
|
245
|
-
// expands editing area of clicked upon word jumble
|
|
246
|
-
this.block.metadata.config.words[index].expand =
|
|
247
|
-
!this.block.metadata.config.words[index].expand
|
|
248
|
-
this.block.metadata.config.words.forEach((element) => {
|
|
249
|
-
if (index + 1 !== element.id) {
|
|
250
|
-
element.expand = false
|
|
251
|
-
}
|
|
252
|
-
})
|
|
253
|
-
},
|
|
254
|
-
onHover(index) {
|
|
255
|
-
this.cursor = 'change-pointer'
|
|
256
|
-
},
|
|
257
|
-
onHoverLeave() {
|
|
258
|
-
this.cursor = ''
|
|
259
|
-
},
|
|
260
227
|
},
|
|
261
228
|
}
|
|
262
229
|
</script>
|
|
@@ -264,39 +231,6 @@ export default {
|
|
|
264
231
|
.v-progress-circular {
|
|
265
232
|
margin: 1rem;
|
|
266
233
|
}
|
|
267
|
-
.container-card-outline {
|
|
268
|
-
border: solid 1px var(--v-primary-base);
|
|
269
|
-
border-radius: 3px !important;
|
|
270
|
-
margin-bottom: 8px;
|
|
271
|
-
}
|
|
272
|
-
.container-header-border {
|
|
273
|
-
border-bottom: 1px solid var(--v-primary-base);
|
|
274
|
-
}
|
|
275
|
-
.change-pointer {
|
|
276
|
-
cursor: pointer !important;
|
|
277
|
-
}
|
|
278
|
-
.p-header {
|
|
279
|
-
height: 45px;
|
|
280
|
-
display: flex;
|
|
281
|
-
align-items: center;
|
|
282
|
-
}
|
|
283
|
-
.p-header:hover {
|
|
284
|
-
background-color: rgb(243, 243, 243);
|
|
285
|
-
}
|
|
286
|
-
.span-text-ellipsis {
|
|
287
|
-
white-space: nowrap;
|
|
288
|
-
overflow: hidden;
|
|
289
|
-
text-overflow: ellipsis;
|
|
290
|
-
}
|
|
291
|
-
.btn-header-delete {
|
|
292
|
-
border-left: 1px solid var(--v-primary-base);
|
|
293
|
-
}
|
|
294
|
-
.btn-header-delete:hover {
|
|
295
|
-
background-color: rgb(243, 243, 243);
|
|
296
|
-
}
|
|
297
|
-
.btn-delete-icon {
|
|
298
|
-
color: var(--v-primary-base);
|
|
299
|
-
}
|
|
300
234
|
.p-label {
|
|
301
235
|
font-size: 16px;
|
|
302
236
|
font-weight: 500;
|
|
@@ -10,8 +10,9 @@ export default {
|
|
|
10
10
|
default: 'Default feedback',
|
|
11
11
|
correct: 'feedback when correct',
|
|
12
12
|
incorrect: 'feedback when incorrect',
|
|
13
|
-
correct_default: '
|
|
14
|
-
incorrect_default:
|
|
13
|
+
correct_default: 'That is correct.',
|
|
14
|
+
incorrect_default:
|
|
15
|
+
'That is incorrect. Try again or select reveal answer.',
|
|
15
16
|
},
|
|
16
17
|
image: {
|
|
17
18
|
title: 'Flash Card Image File',
|