@windward/games 0.7.0 → 0.8.1
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/babel.config.js +1 -1
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +10 -2
- package/components/content/blocks/dragDrop/BucketGame.vue +6 -1
- package/components/content/blocks/dragDrop/SortingGame.vue +4 -2
- package/components/content/blocks/flashcards/FlashcardSlides.vue +2 -2
- package/components/content/blocks/matchingGame/MatchingGame.vue +34 -10
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +10 -2
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +4 -7
- package/components/content/blocks/quizshowGame/QuizShow.vue +0 -7
- package/components/content/blocks/slideshow/SlideShow.vue +6 -1
- package/components/settings/BucketGameSettingsManager.vue +6 -30
- package/components/settings/CrosswordPuzzleSettingsManager.vue +6 -28
- package/components/settings/FlashCardSlidesManager.vue +12 -34
- package/components/settings/MatchingGameManager.vue +30 -50
- package/components/settings/MultipleChoiceSettingsManager.vue +6 -30
- package/components/settings/QuizShowSettingsManager.vue +12 -62
- package/components/settings/SevenStrikesSettingsManager.vue +12 -47
- package/components/settings/SlideShowManager.vue +20 -47
- package/components/settings/SortingGameSettingsManager.vue +8 -44
- package/components/settings/WordJumbleSettingsManager.vue +10 -46
- package/i18n/en-US/shared/content_blocks.ts +1 -1
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/shared/settings.ts +4 -1
- package/package.json +4 -4
- package/test/mocks.js +10 -2
- package/test/settings/BucketGameManager.spec.js +0 -1
- package/test/settings/FlashCardSlidesManager.spec.js +2 -2
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
<v-container class="pa-0">
|
|
4
4
|
<v-text-field
|
|
5
5
|
ref="title"
|
|
6
|
+
id="block-settings-title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
|
-
:
|
|
8
|
-
:
|
|
8
|
+
:rules="$Validation.getRule('block.title')"
|
|
9
|
+
:counter="$Validation.getLimit('block.title')"
|
|
9
10
|
outlined
|
|
10
11
|
:autofocus="true"
|
|
11
12
|
:label="
|
|
@@ -16,9 +17,10 @@
|
|
|
16
17
|
:disabled="render"
|
|
17
18
|
></v-text-field>
|
|
18
19
|
<v-textarea
|
|
20
|
+
id="block-settings-instructions"
|
|
19
21
|
v-model="block.metadata.config.instructions"
|
|
20
|
-
:rules="
|
|
21
|
-
:counter="
|
|
22
|
+
:rules="$Validation.getRule('block.instructions')"
|
|
23
|
+
:counter="$Validation.getLimit('block.instructions')"
|
|
22
24
|
outlined
|
|
23
25
|
auto-grow
|
|
24
26
|
:label="
|
|
@@ -67,8 +69,8 @@
|
|
|
67
69
|
v-model="
|
|
68
70
|
block.metadata.config.words[index].value
|
|
69
71
|
"
|
|
70
|
-
:rules="
|
|
71
|
-
:counter="
|
|
72
|
+
:rules="$Validation.getRule('shortInput')"
|
|
73
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
72
74
|
outlined
|
|
73
75
|
:disabled="render"
|
|
74
76
|
></v-text-field>
|
|
@@ -85,8 +87,8 @@
|
|
|
85
87
|
v-model="
|
|
86
88
|
block.metadata.config.words[index].hint
|
|
87
89
|
"
|
|
88
|
-
:rules="
|
|
89
|
-
:counter="
|
|
90
|
+
:rules="$Validation.getRule('mediumInput')"
|
|
91
|
+
:counter="$Validation.getLimit('mediumInput')"
|
|
90
92
|
outlined
|
|
91
93
|
:disabled="render"
|
|
92
94
|
></v-textarea>
|
|
@@ -191,44 +193,6 @@ export default {
|
|
|
191
193
|
return {
|
|
192
194
|
valid: true,
|
|
193
195
|
loading: false,
|
|
194
|
-
validation: {
|
|
195
|
-
shortInputRules: [
|
|
196
|
-
(v) => {
|
|
197
|
-
if (v && v.length >= 50) {
|
|
198
|
-
return this.$t(
|
|
199
|
-
'windward.games.shared.settings.errors.input_limitations',
|
|
200
|
-
[50]
|
|
201
|
-
)
|
|
202
|
-
} else {
|
|
203
|
-
return true
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
instructionRule: [
|
|
208
|
-
(v) => {
|
|
209
|
-
if (v && v.length >= 255) {
|
|
210
|
-
return this.$t(
|
|
211
|
-
'windward.games.shared.settings.errors.input_limitations',
|
|
212
|
-
[255]
|
|
213
|
-
)
|
|
214
|
-
} else {
|
|
215
|
-
return true
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
hintRule: [
|
|
220
|
-
(v) => {
|
|
221
|
-
if (v && v.length >= 155) {
|
|
222
|
-
return this.$t(
|
|
223
|
-
'windward.games.shared.settings.errors.input_limitations',
|
|
224
|
-
[155]
|
|
225
|
-
)
|
|
226
|
-
} else {
|
|
227
|
-
return true
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
],
|
|
231
|
-
},
|
|
232
196
|
}
|
|
233
197
|
},
|
|
234
198
|
methods: {
|
|
@@ -12,6 +12,9 @@ export default {
|
|
|
12
12
|
crossword_puzzle_manager: 'Korsordshanterare',
|
|
13
13
|
},
|
|
14
14
|
errors: {
|
|
15
|
-
input_limitations: 'Måste vara mindre än {0} tecken.'
|
|
15
|
+
input_limitations: 'Måste vara mindre än {0} tecken.',
|
|
16
|
+
},
|
|
17
|
+
file_picker: {
|
|
18
|
+
image: 'Placera bild',
|
|
16
19
|
},
|
|
17
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windward/games",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Windward UI Plugin Games",
|
|
5
5
|
"main": "plugin.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+ssh://git@bitbucket.org/mindedge/windward-
|
|
13
|
+
"url": "git+ssh://git@bitbucket.org/mindedge/windward-ui-plugin-games.git"
|
|
14
14
|
},
|
|
15
15
|
"author": "Ted Celestin <tcelestin@mindedge.com>",
|
|
16
16
|
"contributors": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-games#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@windward/core": "^0.
|
|
24
|
+
"@windward/core": "^0.8.0",
|
|
25
25
|
"eslint": "^8.11.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"prettier": "^2.6.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"vuetify": "^2.6.4"
|
|
50
50
|
},
|
|
51
51
|
"bugs": {
|
|
52
|
-
"url": "https://bitbucket.org/mindedge/windward-
|
|
52
|
+
"url": "https://bitbucket.org/mindedge/windward-ui-plugin-games/issues"
|
|
53
53
|
},
|
|
54
54
|
"directories": {
|
|
55
55
|
"test": "test"
|
package/test/mocks.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import { defaultMocks as
|
|
1
|
+
import { defaultMocks as mocks } from '@windward/core/test/mocks'
|
|
2
|
+
|
|
3
|
+
jest.mock('@windward/core/utils', () => ({
|
|
4
|
+
__esModule: true, // this property makes it work
|
|
5
|
+
default: 'mockedDefaultExport',
|
|
6
|
+
MathExpressionEditor: jest.fn(),
|
|
7
|
+
MathLiveWrapper: jest.fn(),
|
|
8
|
+
ContentViewer: jest.fn(),
|
|
9
|
+
}))
|
|
2
10
|
|
|
3
11
|
require('./__mocks__/fileMock')
|
|
4
12
|
require('./__mocks__/styleMock')
|
|
5
13
|
require('./__mocks__/modelMock')
|
|
6
14
|
require('./__mocks__/componentsMock')
|
|
7
15
|
|
|
8
|
-
export const defaultMocks =
|
|
16
|
+
export const defaultMocks = mocks
|
|
@@ -13,8 +13,8 @@ describe('FLashcard slides manager', () => {
|
|
|
13
13
|
test('is a Vue instance', () => {
|
|
14
14
|
const wrapper = shallowMount(FlashCardSlidesManager, {
|
|
15
15
|
propsData: {
|
|
16
|
-
settings
|
|
17
|
-
context
|
|
16
|
+
settings,
|
|
17
|
+
context,
|
|
18
18
|
data: {},
|
|
19
19
|
},
|
|
20
20
|
mocks: defaultMocks,
|