@windward/games 0.5.1 → 0.7.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/bitbucket-pipelines.yml +14 -0
  3. package/components/content/blocks/dragDrop/BucketGame.vue +24 -8
  4. package/components/content/blocks/flashcards/CardFace.vue +3 -3
  5. package/components/content/blocks/matchingGame/MatchingGame.vue +30 -38
  6. package/components/content/blocks/sevenStrikes/SevenStikes.vue +2 -6
  7. package/components/content/blocks/wordJumble/WordJumble.vue +9 -8
  8. package/components/settings/BucketGameSettingsManager.vue +253 -243
  9. package/components/settings/CrosswordPuzzleSettingsManager.vue +164 -111
  10. package/components/settings/FlashCardSlidesManager.vue +337 -336
  11. package/components/settings/MatchingGameManager.vue +347 -323
  12. package/components/settings/MultipleChoiceSettingsManager.vue +100 -69
  13. package/components/settings/QuizShowSettingsManager.vue +223 -203
  14. package/components/settings/SevenStrikesSettingsManager.vue +173 -133
  15. package/components/settings/SlideShowManager.vue +174 -134
  16. package/components/settings/SortingGameSettingsManager.vue +157 -108
  17. package/components/settings/WordJumbleSettingsManager.vue +171 -135
  18. package/i18n/en-US/components/content/blocks/bucket_game.ts +1 -0
  19. package/i18n/en-US/components/content/blocks/flashcard.ts +2 -2
  20. package/i18n/en-US/components/content/blocks/quizshow_game.ts +1 -1
  21. package/i18n/en-US/components/settings/bucket_game.ts +2 -1
  22. package/i18n/en-US/components/settings/crossword.ts +1 -0
  23. package/i18n/en-US/components/settings/flashcard.ts +2 -1
  24. package/i18n/en-US/components/settings/matching_game.ts +1 -0
  25. package/i18n/en-US/components/settings/multiple_choice.ts +1 -0
  26. package/i18n/en-US/components/settings/quizshow_game.ts +1 -1
  27. package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
  28. package/i18n/en-US/components/settings/slideshow.ts +3 -2
  29. package/i18n/en-US/components/settings/sorting_game.ts +1 -0
  30. package/i18n/en-US/components/settings/word_jumble.ts +1 -0
  31. package/i18n/en-US/shared/settings.ts +3 -0
  32. package/i18n/es-ES/components/content/blocks/bucket_game.ts +1 -0
  33. package/i18n/es-ES/components/settings/bucket_game.ts +3 -1
  34. package/i18n/es-ES/components/settings/crossword.ts +2 -0
  35. package/i18n/es-ES/components/settings/flashcard.ts +1 -0
  36. package/i18n/es-ES/components/settings/matching_game.ts +1 -0
  37. package/i18n/es-ES/components/settings/multiple_choice.ts +2 -0
  38. package/i18n/es-ES/components/settings/quizshow_game.ts +1 -1
  39. package/i18n/es-ES/components/settings/slideshow.ts +1 -0
  40. package/i18n/es-ES/components/settings/sorting_game.ts +1 -0
  41. package/i18n/es-ES/components/settings/word_jumble.ts +1 -0
  42. package/i18n/es-ES/shared/settings.ts +3 -0
  43. package/i18n/sv-SE/components/content/blocks/bucket_game.ts +1 -0
  44. package/i18n/sv-SE/components/content/blocks/quizshow_game.ts +1 -1
  45. package/i18n/sv-SE/components/settings/bucket_game.ts +2 -0
  46. package/i18n/sv-SE/components/settings/crossword.ts +1 -0
  47. package/i18n/sv-SE/components/settings/flashcard.ts +1 -0
  48. package/i18n/sv-SE/components/settings/matching_game.ts +1 -0
  49. package/i18n/sv-SE/components/settings/multiple_choice.ts +1 -0
  50. package/i18n/sv-SE/components/settings/quizshow_game.ts +1 -1
  51. package/i18n/sv-SE/components/settings/slideshow.ts +1 -0
  52. package/i18n/sv-SE/components/settings/sorting_game.ts +1 -0
  53. package/i18n/sv-SE/components/settings/word_jumble.ts +2 -1
  54. package/i18n/sv-SE/shared/content_blocks.ts +5 -5
  55. package/i18n/sv-SE/shared/settings.ts +8 -5
  56. package/package.json +1 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## Release [0.7.0] - 2024-08-29
4
+
5
+ * Version bump to 0.7.0
6
+
7
+
8
+ ### Release [0.7.0] created - 2024-08-29
9
+
10
+
11
+ ### Release [0.6.0] created - 2024-07-30
@@ -0,0 +1,14 @@
1
+ image: atlassian/default-image:3
2
+
3
+ pipelines:
4
+ custom:
5
+ create-release:
6
+ import: infrastructure-automation:master:create-release
7
+ publish-release:
8
+ import: infrastructure-automation:master:publish-release
9
+
10
+ branches:
11
+ "release/*":
12
+ import: infrastructure-automation:master:auto-update
13
+ "hotfix/*":
14
+ import: infrastructure-automation:master:auto-update
@@ -253,6 +253,7 @@ import _ from 'lodash'
253
253
  import CrudTable from '../../CrudTable'
254
254
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
255
255
  import TextViewer from '~/components/Text/TextViewer.vue'
256
+ import Uuid from '~/helpers/Uuid'
256
257
 
257
258
  export default {
258
259
  name: 'BucketGame',
@@ -268,7 +269,11 @@ export default {
268
269
  if (_.isEmpty(this.block.metadata.config)) {
269
270
  this.block.metadata.config = {}
270
271
  }
271
- if (_.isEmpty(this.block.metadata.config.title)) {
272
+ if (
273
+ _.isEmpty(this.block.metadata.config.title) &&
274
+ this.block.id &&
275
+ !Uuid.test(this.block.id)
276
+ ) {
272
277
  this.block.metadata.config.title = this.$t(
273
278
  'windward.games.components.content.blocks.bucket_game.game_title'
274
279
  )
@@ -277,14 +282,10 @@ export default {
277
282
  this.block.metadata.config.instructions = ''
278
283
  }
279
284
  if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
280
- this.block.metadata.config.feedback_correct = this.$t(
281
- 'windward.games.components.settings.bucket_game.form.feedback.correct_default'
282
- )
285
+ this.block.metadata.config.feedback_correct = ''
283
286
  }
284
287
  if (_.isEmpty(this.block.metadata.config.feedback_incorrect)) {
285
- this.block.metadata.config.feedback_incorrect = this.$t(
286
- 'windward.games.components.settings.bucket_game.form.feedback.incorrect_default'
287
- )
288
+ this.block.metadata.config.feedback_incorrect = ''
288
289
  }
289
290
  if (_.isEmpty(this.block.metadata.config.bucket_titles)) {
290
291
  this.block.metadata.config.bucket_titles = []
@@ -429,7 +430,6 @@ export default {
429
430
  if (
430
431
  element.bucket_index === item.bucket_index &&
431
432
  element.display === item.display &&
432
- element.display_value === item.display_value &&
433
433
  element.feedback === item.feedback &&
434
434
  element.id === item.id
435
435
  ) {
@@ -467,6 +467,17 @@ export default {
467
467
  )
468
468
  } else {
469
469
  this.status = 'successOutline'
470
+ // set correct feedback
471
+ if (evt.added.element.feedback) {
472
+ this.feedback = evt.added.element.feedback
473
+ } else {
474
+ this.feedback = this.block.metadata.config
475
+ .feedback_correct
476
+ ? this.block.metadata.config.feedback_correct
477
+ : this.$t(
478
+ 'windward.games.components.settings.bucket_game.form.feedback.correct_default'
479
+ )
480
+ }
470
481
  }
471
482
  } else {
472
483
  let items = this.items[bucket_index]
@@ -474,7 +485,12 @@ export default {
474
485
  this.items[bucket_index].splice(indexOfAddedElement, 1)
475
486
  // puts item back into mutable array for draggable component
476
487
  this.mainAnswer.push(evt.added.element)
488
+ // set incorrect feedback
477
489
  this.feedback = this.block.metadata.config.feedback_incorrect
490
+ ? this.block.metadata.config.feedback_incorrect
491
+ : this.$t(
492
+ 'windward.games.components.settings.bucket_game.form.feedback.incorrect_default'
493
+ )
478
494
  this.status = 'errorOutline'
479
495
  }
480
496
  },
@@ -2,7 +2,7 @@
2
2
  <v-container>
3
3
  <br />
4
4
  <div class="card-content">
5
- <v-row align="center" justify="center">
5
+ <v-row>
6
6
  <content-viewer :class="textClass" v-model="settings.text" />
7
7
  </v-row>
8
8
  <br />
@@ -51,7 +51,7 @@ export default {
51
51
  this.settings.text.length < 100 &&
52
52
  this.side === 'front'
53
53
  ) {
54
- return 'text-justify centered card-content--bold'
54
+ return 'centered card-content--bold'
55
55
  }
56
56
 
57
57
  if (this.side === 'front') {
@@ -66,7 +66,7 @@ export default {
66
66
  return 'text-justify centered'
67
67
  }
68
68
 
69
- return 'px-6 text-justify'
69
+ return 'px-6 text-left'
70
70
  },
71
71
  imageAsset() {
72
72
  if (!this.settings.imageAsset) {
@@ -12,18 +12,10 @@
12
12
  {{ block.metadata.config.title }}
13
13
  </h2>
14
14
 
15
- <p tabindex="0">
15
+ <p>
16
16
  {{ block.metadata.config.instructions }}
17
17
  </p>
18
- <p tabindex="0">
19
- {{
20
- $t(
21
- 'windward.games.components.content.blocks.matching_game.description'
22
- )
23
- }}
24
- </p>
25
-
26
- <v-container fluid :class="status">
18
+ <v-container :class="status">
27
19
  <v-row class="d-flex justify-center pa-2">{{
28
20
  feedback
29
21
  ? feedback
@@ -47,34 +39,7 @@
47
39
  </v-container>
48
40
  </v-row>
49
41
  </v-container>
50
- <v-container class="pa-0">
51
- <v-row>
52
- <draggable
53
- v-bind="dragOptions"
54
- class="d-flex justify-space-between flex-wrap col-md-12"
55
- :list="block.metadata.config.answerObjects"
56
- :disabled="!allowDrag"
57
- :group="{
58
- name: 'people',
59
- pull: 'clone',
60
- put: false,
61
- }"
62
- @end="onEnd"
63
- >
64
- <v-card
65
- v-for="(answer, aindex) in block.metadata.config
66
- .answerObjects"
67
- :key="aindex"
68
- class="pa-2 ma-2 answerCard container-outline"
69
- outlined
70
- >
71
- <v-icon>mdi-drag-vertical</v-icon>
72
- <span>
73
- {{ answer.display }}
74
- </span>
75
- </v-card>
76
- </draggable>
77
- </v-row>
42
+ <v-container class="pl-0 pr-0 mt-2">
78
43
  <v-row
79
44
  v-if="render"
80
45
  class="d-flex flex-wrap flex-row justify-center flex-fill"
@@ -267,6 +232,33 @@
267
232
  </v-card>
268
233
  </v-row>
269
234
  </v-row>
235
+ <v-row>
236
+ <draggable
237
+ v-bind="dragOptions"
238
+ class="d-flex justify-space-between flex-wrap col-md-12"
239
+ :list="block.metadata.config.answerObjects"
240
+ :disabled="!allowDrag"
241
+ :group="{
242
+ name: 'people',
243
+ pull: 'clone',
244
+ put: false,
245
+ }"
246
+ @end="onEnd"
247
+ >
248
+ <v-card
249
+ v-for="(answer, aindex) in block.metadata.config
250
+ .answerObjects"
251
+ :key="aindex"
252
+ class="pa-2 ma-2 answerCard container-outline"
253
+ outlined
254
+ >
255
+ <v-icon>mdi-drag-vertical</v-icon>
256
+ <span>
257
+ {{ answer.display }}
258
+ </span>
259
+ </v-card>
260
+ </draggable>
261
+ </v-row>
270
262
  <v-container
271
263
  class="d-flex flex-wrap flex-row justify-center flex-fill"
272
264
  align="end"
@@ -234,14 +234,10 @@ export default {
234
234
  )
235
235
  }
236
236
  if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
237
- this.block.metadata.config.feedback_correct = this.$t(
238
- 'windward.games.components.settings.bucket_game.form.feedback.correct_default'
239
- )
237
+ this.block.metadata.config.feedback_correct = ''
240
238
  }
241
239
  if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
242
- this.block.metadata.config.feedback_incorrect = this.$t(
243
- 'windward.games.components.settings.bucket_game.form.feedback.incorrect_default'
244
- )
240
+ this.block.metadata.config.feedback_incorrect = ''
245
241
  }
246
242
  if (_.isEmpty(this.block.metadata.config.words)) {
247
243
  this.block.metadata.config.words = []
@@ -164,6 +164,7 @@ import _ from 'lodash'
164
164
  import Jumble from './Jumble.vue'
165
165
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
166
166
  import Crypto from '~/helpers/Crypto'
167
+ import Uuid from '~/helpers/Uuid'
167
168
 
168
169
  export default {
169
170
  name: 'WordJumble',
@@ -183,23 +184,23 @@ export default {
183
184
  }
184
185
  if (_.isEmpty(this.block.metadata.config.title)) {
185
186
  this.block.metadata.config.title = this.$t(
186
- 'windward.games.components.content.blocks.word_jumble.title'
187
+ 'windward.games.components.settings.word_jumble.title'
187
188
  )
188
189
  }
189
- if (_.isEmpty(this.block.metadata.config.instructions)) {
190
+ if (
191
+ _.isEmpty(this.block.metadata.config.instructions) &&
192
+ this.block.id &&
193
+ !Uuid.test(this.block.id)
194
+ ) {
190
195
  this.block.metadata.config.instructions = this.$t(
191
196
  'windward.games.components.content.blocks.word_jumble.instructions'
192
197
  )
193
198
  }
194
199
  if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
195
- this.block.metadata.config.feedback_correct = this.$t(
196
- 'windward.games.components.settings.bucket_game.form.feedback.correct_default'
197
- )
200
+ this.block.metadata.config.feedback_correct = ''
198
201
  }
199
202
  if (_.isEmpty(this.block.metadata.config.feedback_incorrect)) {
200
- this.block.metadata.config.feedback_incorrect = this.$t(
201
- 'windward.games.components.settings.bucket_game.form.feedback.incorrect_default'
202
- )
203
+ this.block.metadata.config.feedback_incorrect = ''
203
204
  }
204
205
  if (_.isEmpty(this.block.metadata.config.words)) {
205
206
  this.block.metadata.config.words = []