@windward/games 0.3.0 → 0.5.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 (39) hide show
  1. package/components/content/CrudTable.vue +8 -4
  2. package/components/content/DatableEditor.vue +1 -0
  3. package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +3 -2
  4. package/components/content/blocks/dragDrop/BucketGame.vue +9 -4
  5. package/components/content/blocks/dragDrop/SortingGame.vue +2 -1
  6. package/components/content/blocks/flashcards/CardFace.vue +48 -9
  7. package/components/content/blocks/flashcards/Flashcard.vue +26 -17
  8. package/components/content/blocks/flashcards/FlashcardSlides.vue +10 -5
  9. package/components/content/blocks/matchingGame/MatchingGame.vue +327 -304
  10. package/components/content/blocks/multipleChoice/MultipleChoice.vue +6 -2
  11. package/components/content/blocks/multipleChoice/QuestionDialog.vue +2 -0
  12. package/components/content/blocks/quizshowGame/AnswerPanel.vue +3 -1
  13. package/components/content/blocks/quizshowGame/Gridview.vue +1 -0
  14. package/components/content/blocks/quizshowGame/QuizShow.vue +6 -3
  15. package/components/content/blocks/sevenStrikes/SevenStikes.vue +8 -2
  16. package/components/content/blocks/slideshow/SlideShow.vue +31 -22
  17. package/components/content/blocks/wordJumble/WordJumble.vue +8 -3
  18. package/components/settings/BucketGameSettingsManager.vue +5 -1
  19. package/components/settings/CrosswordPuzzleSettingsManager.vue +1 -0
  20. package/components/settings/FlashCardSlidesManager.vue +165 -107
  21. package/components/settings/MatchingGameManager.vue +57 -27
  22. package/components/settings/MultipleChoiceSettingsManager.vue +1 -0
  23. package/components/settings/QuizShowSettingsManager.vue +3 -0
  24. package/components/settings/SevenStrikesSettingsManager.vue +1 -0
  25. package/components/settings/SlideShowManager.vue +32 -12
  26. package/components/settings/SortingGameSettingsManager.vue +1 -0
  27. package/components/settings/WordJumbleSettingsManager.vue +1 -0
  28. package/i18n/en-US/components/content/blocks/slideshow.ts +1 -3
  29. package/i18n/en-US/components/settings/matching_game.ts +4 -0
  30. package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
  31. package/i18n/es-ES/components/content/blocks/slideshow.ts +0 -2
  32. package/i18n/es-ES/components/settings/matching_game.ts +4 -0
  33. package/i18n/es-ES/components/settings/seven_strikes.ts +1 -1
  34. package/i18n/sv-SE/components/content/blocks/slideshow.ts +0 -2
  35. package/i18n/sv-SE/components/settings/matching_game.ts +4 -0
  36. package/i18n/sv-SE/components/settings/seven_strikes.ts +1 -1
  37. package/package.json +1 -1
  38. package/test/blocks/flashcards/CardFace.spec.js +2 -0
  39. package/test/blocks/flashcards/Flashcard.spec.js +1 -0
@@ -83,12 +83,35 @@
83
83
  "
84
84
  :disabled="render"
85
85
  ></v-text-field>
86
- <v-text-field
86
+
87
+ <ContentBlockAsset
88
+ id="content-block-asset"
87
89
  v-model="
88
90
  block.metadata.config.slides[index]
89
- .image_alt
91
+ .imageAsset
92
+ "
93
+ :assets.sync="block.assets"
94
+ mimes="image/png,image/jpeg"
95
+ :disabled="render"
96
+ ></ContentBlockAsset>
97
+
98
+ <v-text-field
99
+ v-if="
100
+ block.metadata.config.slides[index]
101
+ .imageAsset
90
102
  "
103
+ v-model="
104
+ block.metadata.config.slides[index].imageAlt
105
+ "
106
+ class="mt-4"
91
107
  outlined
108
+ :placeholder="
109
+ getImageAlt(
110
+ block.metadata.config.slides[index]
111
+ .imageAsset
112
+ )
113
+ "
114
+ persistent-placeholder
92
115
  :label="
93
116
  $t(
94
117
  'windward.games.components.content.blocks.slideshow.slides.image_alt'
@@ -96,14 +119,6 @@
96
119
  "
97
120
  :disabled="render"
98
121
  ></v-text-field>
99
- <ContentBlockAsset
100
- id="content-block-asset"
101
- v-model="
102
- block.metadata.config.slides[index].image
103
- "
104
- mimes="image/png,image/jpeg"
105
- :disabled="render"
106
- ></ContentBlockAsset>
107
122
  </v-container>
108
123
  </template>
109
124
  </SortableExpansionPanel>
@@ -111,6 +126,7 @@
111
126
  <v-row justify="center" class="my-4">
112
127
  <v-btn
113
128
  color="primary"
129
+ elevation="0"
114
130
  :disabled="render"
115
131
  @click="onAddSlide"
116
132
  >
@@ -195,8 +211,8 @@ export default {
195
211
  id: this.block.metadata.config.slides.length + 1,
196
212
  header: '',
197
213
  description: '',
198
- image: null,
199
- image_alt: '',
214
+ imageAsset: null,
215
+ imageAlt: '',
200
216
  }
201
217
  this.block.metadata.config.slides.push(defaultSlide)
202
218
  this.block.metadata.config.currentSlide =
@@ -226,6 +242,10 @@ export default {
226
242
  this.block.metadata.config.currentSlide =
227
243
  this.block.metadata.config.slides.length - 1
228
244
  },
245
+ getImageAlt(file) {
246
+ file = this.resolveAsset(file)
247
+ return _.get(file, 'asset.metadata.props.alt', '')
248
+ },
229
249
  },
230
250
  }
231
251
  </script>
@@ -76,6 +76,7 @@
76
76
  <v-row justify="center" class="my-4">
77
77
  <v-btn
78
78
  color="primary"
79
+ elevation="0"
79
80
  :disabled="render"
80
81
  @click="onAddElement"
81
82
  >
@@ -94,6 +94,7 @@
94
94
  <v-row justify="center" class="my-4">
95
95
  <v-btn
96
96
  color="primary"
97
+ elevation="0"
97
98
  :disabled="render"
98
99
  @click="onAddWord"
99
100
  >
@@ -3,11 +3,9 @@ export default {
3
3
  slide: 'Slide {0}: {1}',
4
4
  slide_header: 'Slide header',
5
5
  slide_description: 'Slide description',
6
- image_alt: 'Enter text here if not uploading image',
6
+ image_alt: 'Image Alt Text',
7
7
  },
8
8
  add_slide: 'Add Slide',
9
9
  amount_of_slides: 'Amount of slides',
10
10
  slideshow_title: 'Slideshow title',
11
- basic_instructions:
12
- "Click on the 'next' and 'previous' buttons to move through the slideshow.",
13
11
  }
@@ -2,6 +2,10 @@ export default {
2
2
  form: {
3
3
  title: 'Matching Game',
4
4
  instructions: 'Instructions',
5
+ prompt_body: 'Prompt Body',
6
+ correct_match: 'This match is correct.',
7
+ incorrect_match: 'That’s an incorrect match. Try again.',
8
+ correct_match_label: 'Explanation of the correct match',
5
9
  feedback: {
6
10
  correct: 'feedback when correct',
7
11
  incorrect: 'feedback when incorrect',
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  title: 'Seven Strikes',
3
3
  instructions:
4
- 'Read the clue below, and click on the letters to spell out the word the clue refers to. If you choose a letter that isnt in the word, an X will be illuminated. When you choose an incorrect letter 7 times, the game is over.Open a text-only version of this vocabulary game in a new windowSkip this vocabulary game',
4
+ 'Read the clue below, and click on the letters to spell out the word the clue refers to. If you choose a letter that isnt in the word, an X will be illuminated. When you choose an incorrect letter 7 times, the game is over.',
5
5
  word: 'Word or Phrase',
6
6
  hint: 'Clue',
7
7
  items: 'Seven Strikes Items',
@@ -8,6 +8,4 @@ export default {
8
8
  add_slide: 'Agregar diapositiva',
9
9
  amount_of_slides: 'Cantidad de diapositivas',
10
10
  slideshow_title: 'Título de la presentación de diapositivas',
11
- basic_instructions:
12
- "Haga clic en los botones 'siguiente' y 'anterior' para moverse por la presentación de diapositivas.",
13
11
  }
@@ -2,6 +2,10 @@ export default {
2
2
  form: {
3
3
  title: 'Juego de Correspondencias',
4
4
  instructions: 'Instrucciones',
5
+ prompt_body: 'Cuerpo rápido',
6
+ correct_match: 'Esta coincidencia es correcta.',
7
+ incorrect_match: 'Esa es una coincidencia incorrecta. Intentar otra vez.',
8
+ correct_match_label: 'Explicación de la coincidencia correcta.',
5
9
  feedback: {
6
10
  correct: 'comentarios cuando sea correcto',
7
11
  incorrect: 'comentarios cuando son incorrectos',
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  title: 'Siete golpes',
3
3
  instructions:
4
- 'Lea las pistas y haga clic en las letras para deletrear la palabra a la que se refiere. Si elige una letra que no está en la palabra, se iluminará una X. El juego se acaba si elijes una letra incorrecta 7 veces. Puedes tambien elejir la versión del juego en formato accesible.',
4
+ 'Lea las pistas y haga clic en las letras para deletrear la palabra a la que se refiere. Si elige una letra que no está en la palabra, se iluminará una X. El juego se acaba si elijes una letra incorrecta 7 veces.',
5
5
  word: 'Palabra o frase',
6
6
  hint: 'Pista',
7
7
  items: 'Elementos del juego',
@@ -8,6 +8,4 @@ export default {
8
8
  add_slide: 'Lägg till bild',
9
9
  amount_of_slides: 'Antal bilder',
10
10
  slideshow_title: 'Slideshow title',
11
- basic_instructions:
12
- "Klicka på knapparna 'nästa' och 'föregående' för att gå igenom bildspelet.",
13
11
  }
@@ -2,6 +2,10 @@ export default {
2
2
  form: {
3
3
  title: 'Matchande Spel',
4
4
  instructions: 'Instruktioner',
5
+ prompt_body: 'Snabb kropp',
6
+ correct_match: 'Denna matchning är korrekt',
7
+ incorrect_match: 'Det är en felaktig matchning. Försök igen.',
8
+ correct_match_label: 'Förklaring av rätt matchning',
5
9
  feedback: {
6
10
  correct: 'feedback när korrekt',
7
11
  incorrect: 'feedback when incorrect',
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  title: 'Sju slag',
3
3
  instructions:
4
- 'Läs ledtråden nedan och klicka på bokstäverna för att stava ordet ledtråden refererar till. Om du väljer en bokstav som inte finns i ordet kommer ett X att lysa. När du väljer en felaktig bokstav 7 gånger är spelet över.Öppna en textversion av detta ordförrådsspel i ett nytt fönsterHoppa över detta ordförrådsspel',
4
+ 'Läs ledtråden nedan och klicka på bokstäverna för att stava ordet ledtråden refererar till. Om du väljer en bokstav som inte finns i ordet kommer ett X att lysa. När du väljer en felaktig bokstav 7 gånger är spelet över.',
5
5
  word: 'Ord eller fras',
6
6
  hint: 'Clue',
7
7
  items: 'Sju Strejker Artiklar',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/games",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Windward UI Plugin Games",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -13,6 +13,8 @@ describe('CardFace', () => {
13
13
  propsData: {
14
14
  settings,
15
15
  textColor: '',
16
+ side: 'front',
17
+ assets: [],
16
18
  },
17
19
  mocks: defaultMocks,
18
20
  })
@@ -16,6 +16,7 @@ describe('FlashCard', () => {
16
16
  },
17
17
  slide: 1,
18
18
  data: {},
19
+ assets: [],
19
20
  },
20
21
  mocks: defaultMocks,
21
22
  })