@windward/core 0.6.0 → 0.8.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 +8 -1
- package/components/Content/Blocks/Accordion.vue +22 -0
- package/components/Content/Blocks/BlockQuote.vue +6 -2
- package/components/Content/Blocks/ClickableIcons.vue +19 -4
- package/components/Content/Blocks/Email.vue +12 -3
- package/components/Content/Blocks/GenerateAIQuestionButton.vue +14 -6
- package/components/Content/Blocks/HorizontalRule.vue +3 -4
- package/components/Content/Blocks/OpenResponse.vue +25 -0
- package/components/Content/Blocks/OpenResponseCollate.vue +13 -12
- package/components/Content/Blocks/ScenarioChoice.vue +66 -33
- package/components/Content/Blocks/Tab.vue +19 -0
- package/components/Content/Blocks/UserUpload.vue +5 -10
- package/components/Content/Blocks/Video.vue +129 -15
- package/components/Settings/AccordionSettings.vue +52 -13
- package/components/Settings/BlockQuoteSettings.vue +17 -33
- package/components/Settings/ClickableIconsSettings.vue +37 -23
- package/components/Settings/EmailSettings.vue +12 -30
- package/components/Settings/FileDownloadSettings.vue +12 -31
- package/components/Settings/HorizontalRuleSettings.vue +0 -3
- package/components/Settings/ImageSettings.vue +3 -9
- package/components/Settings/OpenResponseCollateSettings.vue +47 -55
- package/components/Settings/OpenResponseSettings.vue +62 -36
- package/components/Settings/ScenarioChoiceSettings.vue +22 -29
- package/components/Settings/TabSettings.vue +99 -81
- package/components/Settings/UserUploadSettings.vue +16 -42
- package/components/Settings/VideoSettings/SourcePicker.vue +223 -0
- package/components/Settings/VideoSettings.vue +115 -195
- package/components/utils/TinyMCEWrapper.vue +9 -5
- package/components/utils/assets/tinymce/content/global.scss +14 -0
- package/components/utils/glossary/CourseGlossary.vue +52 -27
- package/helpers/GlossaryHelper.ts +12 -2
- package/helpers/tinymce/WindwardPlugins.ts +59 -10
- package/i18n/en-US/components/content/blocks/generate_questions.ts +2 -1
- package/i18n/en-US/components/content/blocks/video.ts +2 -51
- package/i18n/en-US/components/settings/accordion.ts +1 -0
- package/i18n/en-US/components/settings/open_response_collate.ts +1 -1
- package/i18n/en-US/components/settings/scenario_choice.ts +3 -2
- package/i18n/en-US/components/settings/tab.ts +1 -0
- package/i18n/en-US/components/settings/user_upload.ts +1 -0
- package/i18n/en-US/components/settings/video.ts +51 -0
- package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +9 -1
- package/i18n/en-US/shared/settings.ts +1 -1
- package/i18n/es-ES/components/content/blocks/generate_questions.ts +2 -1
- package/i18n/es-ES/components/content/blocks/video.ts +3 -53
- package/i18n/es-ES/components/settings/accordion.ts +1 -0
- package/i18n/es-ES/components/settings/open_response_collate.ts +1 -1
- package/i18n/es-ES/components/settings/scenario_choice.ts +3 -2
- package/i18n/es-ES/components/settings/tab.ts +2 -0
- package/i18n/es-ES/components/settings/user_upload.ts +1 -0
- package/i18n/es-ES/components/settings/video.ts +53 -0
- package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +9 -0
- package/i18n/es-ES/shared/settings.ts +1 -1
- package/i18n/sv-SE/components/content/blocks/generate_questions.ts +2 -1
- package/i18n/sv-SE/components/content/blocks/video.ts +2 -51
- package/i18n/sv-SE/components/settings/accordion.ts +2 -0
- package/i18n/sv-SE/components/settings/open_response_collate.ts +1 -1
- package/i18n/sv-SE/components/settings/scenario_choice.ts +3 -2
- package/i18n/sv-SE/components/settings/tab.ts +1 -0
- package/i18n/sv-SE/components/settings/user_upload.ts +1 -0
- package/i18n/sv-SE/components/settings/video.ts +51 -0
- package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +8 -0
- package/package.json +3 -2
- package/plugin.js +1 -1
- package/test/__mocks__/modelMock.js +1 -1
- package/test/helpers/GlossaryHelper.spec.js +22 -3
- package/test/mocks.js +8 -0
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php-docker-settings.xml +0 -24
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/windward-ui-plugin-core.iml +0 -8
- package/config/menu.config.json +0 -475
- package/coverage/clover.xml +0 -223
- package/coverage/coverage-final.json +0 -16
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
- package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
- package/coverage/lcov-report/components/utils/index.html +0 -161
- package/coverage/lcov-report/config/index.html +0 -116
- package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
- package/coverage/lcov-report/helpers/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov-report/test/mocks.js.html +0 -457
- package/coverage/lcov.info +0 -403
- package/lib/helpers/GlossaryHelper.d.ts +0 -9
- package/lib/helpers/GlossaryHelper.js +0 -118
- package/lib/helpers/GlossaryTerm.d.ts +0 -10
- package/lib/helpers/GlossaryTerm.js +0 -22
- package/lib/helpers/MathHelper.d.ts +0 -99
- package/lib/helpers/MathHelper.js +0 -194
- package/lib/helpers/tinymce/plugin.d.ts +0 -2
- package/lib/helpers/tinymce/plugin.js +0 -86
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
- package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
- package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
- package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
- package/lib/i18n/en-US/components/content/index.d.ts +0 -77
- package/lib/i18n/en-US/components/content/index.js +0 -6
- package/lib/i18n/en-US/components/index.d.ts +0 -140
- package/lib/i18n/en-US/components/index.js +0 -12
- package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
- package/lib/i18n/en-US/components/navigation/image.js +0 -6
- package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
- package/lib/i18n/en-US/components/navigation/index.js +0 -8
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
- package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
- package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
- package/lib/i18n/en-US/components/settings/image.js +0 -3
- package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
- package/lib/i18n/en-US/components/settings/index.js +0 -14
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
- package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
- package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
- package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
- package/lib/i18n/en-US/components/settings/video.js +0 -14
- package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
- package/lib/i18n/en-US/components/utils/index.js +0 -6
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
- package/lib/i18n/en-US/index.d.ts +0 -197
- package/lib/i18n/en-US/index.js +0 -16
- package/lib/i18n/en-US/modules/index.d.ts +0 -2
- package/lib/i18n/en-US/modules/index.js +0 -6
- package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
- package/lib/i18n/en-US/pages/glossary.js +0 -9
- package/lib/i18n/en-US/pages/index.d.ts +0 -13
- package/lib/i18n/en-US/pages/index.js +0 -8
- package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/pages/user_upload.js +0 -5
- package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
- package/lib/i18n/en-US/shared/content_blocks.js +0 -21
- package/lib/i18n/en-US/shared/index.d.ts +0 -39
- package/lib/i18n/en-US/shared/index.js +0 -10
- package/lib/i18n/en-US/shared/menu.d.ts +0 -4
- package/lib/i18n/en-US/shared/menu.js +0 -5
- package/lib/i18n/en-US/shared/settings.d.ts +0 -15
- package/lib/i18n/en-US/shared/settings.js +0 -16
- package/lib/i18n/en-US.d.ts +0 -197
- package/lib/i18n/en-US.js +0 -15
- package/lib/models/UserFileAsset.d.ts +0 -5
- package/lib/models/UserFileAsset.js +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<v-container
|
|
4
|
+
class="pa-0"
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title ||
|
|
7
|
+
block.metadata.config.instructions
|
|
8
|
+
"
|
|
9
|
+
>
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
|
+
{{ block.metadata.config.title }}
|
|
12
|
+
</h2>
|
|
13
|
+
|
|
14
|
+
<p
|
|
15
|
+
v-if="block.metadata.config.instructions"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
class="pt-3"
|
|
18
|
+
>
|
|
19
|
+
{{ block.metadata.config.instructions }}
|
|
20
|
+
</p>
|
|
21
|
+
</v-container>
|
|
3
22
|
<v-expansion-panels
|
|
4
23
|
:value="selectedPanels"
|
|
5
24
|
flat
|
|
@@ -91,6 +110,9 @@ export default {
|
|
|
91
110
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
92
111
|
this.block.metadata.config = {}
|
|
93
112
|
}
|
|
113
|
+
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
114
|
+
this.block.metadata.config.title = ''
|
|
115
|
+
}
|
|
94
116
|
if (_.isEmpty(this.block.metadata.config.items)) {
|
|
95
117
|
const defaultObject = {
|
|
96
118
|
header: '',
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
"
|
|
8
8
|
>
|
|
9
9
|
<v-col cols="12" class="pb-0">
|
|
10
|
-
<h2 v-if="block.metadata.config.title">
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
11
|
{{ block.metadata.config.title }}
|
|
12
12
|
</h2>
|
|
13
|
-
<p
|
|
13
|
+
<p
|
|
14
|
+
v-if="block.metadata.config.instructions"
|
|
15
|
+
tabindex="0"
|
|
16
|
+
class="pt-3"
|
|
17
|
+
>
|
|
14
18
|
{{ block.metadata.config.instructions }}
|
|
15
19
|
</p>
|
|
16
20
|
</v-col>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<h2
|
|
4
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
5
|
+
{{ block.metadata.config.title }}
|
|
6
|
+
</h2>
|
|
5
7
|
|
|
6
|
-
<p
|
|
8
|
+
<p
|
|
9
|
+
v-if="block.metadata.config.description"
|
|
10
|
+
tabindex="0"
|
|
11
|
+
class="pt-3"
|
|
12
|
+
>
|
|
13
|
+
{{ block.metadata.config.description }}
|
|
14
|
+
</p>
|
|
7
15
|
|
|
8
16
|
<p>
|
|
9
17
|
{{
|
|
@@ -50,7 +58,7 @@
|
|
|
50
58
|
</button>
|
|
51
59
|
</v-col>
|
|
52
60
|
<v-col cols="12" v-bind="bodyColumnAttrs">
|
|
53
|
-
<v-container class="
|
|
61
|
+
<v-container :class="bodyClass">
|
|
54
62
|
<h4
|
|
55
63
|
v-if="
|
|
56
64
|
block.metadata.config.display.show_title ||
|
|
@@ -155,7 +163,7 @@ export default {
|
|
|
155
163
|
} else {
|
|
156
164
|
return {
|
|
157
165
|
xl: '2',
|
|
158
|
-
lg: '
|
|
166
|
+
lg: '3',
|
|
159
167
|
md: '3',
|
|
160
168
|
sm: '3',
|
|
161
169
|
}
|
|
@@ -240,6 +248,13 @@ export default {
|
|
|
240
248
|
}
|
|
241
249
|
}
|
|
242
250
|
},
|
|
251
|
+
bodyClass() {
|
|
252
|
+
if (window.innerWidth <= 665) {
|
|
253
|
+
return ''
|
|
254
|
+
} else {
|
|
255
|
+
return 'ml-4'
|
|
256
|
+
}
|
|
257
|
+
},
|
|
243
258
|
},
|
|
244
259
|
methods: {
|
|
245
260
|
isIcon(str) {
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
"
|
|
8
8
|
>
|
|
9
9
|
<v-col cols="12" class="pa-0">
|
|
10
|
-
<h2 v-if="block.metadata.config.title">
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
11
|
{{ block.metadata.config.title }}
|
|
12
12
|
</h2>
|
|
13
|
-
<p
|
|
13
|
+
<p
|
|
14
|
+
v-if="block.metadata.config.instructions"
|
|
15
|
+
tabindex="0"
|
|
16
|
+
class="pt-3"
|
|
17
|
+
>
|
|
14
18
|
{{ block.metadata.config.instructions }}
|
|
15
19
|
</p>
|
|
16
20
|
</v-col>
|
|
@@ -25,7 +29,7 @@
|
|
|
25
29
|
class="pa-0 primary container-subject d-flex justify-center align-center"
|
|
26
30
|
>
|
|
27
31
|
<v-row class="d-flex ma-5">
|
|
28
|
-
<v-col cols="
|
|
32
|
+
<v-col cols="12">
|
|
29
33
|
{{
|
|
30
34
|
$t(
|
|
31
35
|
'windward.core.components.content.blocks.email.email'
|
|
@@ -33,6 +37,7 @@
|
|
|
33
37
|
}}
|
|
34
38
|
</v-col>
|
|
35
39
|
<v-col
|
|
40
|
+
v-if="false"
|
|
36
41
|
cols="6"
|
|
37
42
|
class="d-flex justify-end column-simulation"
|
|
38
43
|
>
|
|
@@ -197,6 +202,7 @@
|
|
|
197
202
|
</v-col>
|
|
198
203
|
<v-col cols="2" class="pa-0 d-flex justify-end">
|
|
199
204
|
<v-btn
|
|
205
|
+
v-show="false"
|
|
200
206
|
elevation="0"
|
|
201
207
|
color="primary"
|
|
202
208
|
outlined
|
|
@@ -350,4 +356,7 @@ export default {
|
|
|
350
356
|
.v-expansion-panels {
|
|
351
357
|
z-index: 0 !important;
|
|
352
358
|
}
|
|
359
|
+
.v-btn:before {
|
|
360
|
+
background-color: transparent !important;
|
|
361
|
+
}
|
|
353
362
|
</style>
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-btn
|
|
3
3
|
elevation="0"
|
|
4
|
-
color="
|
|
5
|
-
icon
|
|
4
|
+
color="secondary"
|
|
6
5
|
@click="generateAIQuestion"
|
|
7
6
|
:loading="isLoading"
|
|
8
7
|
:disabled="isLoading"
|
|
9
8
|
>
|
|
10
|
-
<v-icon v-if="!isLoading">mdi-magic-staff</v-icon>
|
|
9
|
+
<v-icon class="pr-1" v-if="!isLoading">mdi-magic-staff</v-icon>
|
|
10
|
+
{{
|
|
11
|
+
this.$t(
|
|
12
|
+
'windward.core.components.content.blocks.generate_questions.button_label'
|
|
13
|
+
)
|
|
14
|
+
}}
|
|
11
15
|
<template v-slot:loader>
|
|
12
16
|
<v-progress-circular indeterminate size="23"></v-progress-circular>
|
|
13
17
|
</template>
|
|
@@ -42,7 +46,7 @@ export default {
|
|
|
42
46
|
new Content(this.content),
|
|
43
47
|
new Assessment({ id: this.block.id }),
|
|
44
48
|
new AssessmentQuestion(),
|
|
45
|
-
|
|
49
|
+
`suggest/${this.questionType}`
|
|
46
50
|
).get()
|
|
47
51
|
|
|
48
52
|
if (response && response.length > 0) {
|
|
@@ -51,11 +55,15 @@ export default {
|
|
|
51
55
|
}
|
|
52
56
|
} catch (error) {
|
|
53
57
|
console.error(error)
|
|
54
|
-
this.$dialog.error(
|
|
58
|
+
this.$dialog.error(
|
|
59
|
+
this.$t(
|
|
60
|
+
'windward.core.components.content.blocks.generate_questions.error'
|
|
61
|
+
)
|
|
62
|
+
)
|
|
55
63
|
} finally {
|
|
56
64
|
this.isLoading = false
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
67
|
},
|
|
60
68
|
}
|
|
61
|
-
</script>
|
|
69
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<hr :class="isDashed" />
|
|
3
|
+
<hr :class="isDashed" class="mt-2 mb-2" />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
@@ -19,15 +19,14 @@ export default {
|
|
|
19
19
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
20
20
|
this.block.metadata.config = {}
|
|
21
21
|
}
|
|
22
|
-
if (_.isEmpty(this.block.metadata.config)) {
|
|
23
|
-
this.block.metadata.config = {}
|
|
24
|
-
}
|
|
25
22
|
if (_.isEmpty(this.block.metadata.config.dashed)) {
|
|
26
23
|
this.block.metadata.config.dashed = false
|
|
27
24
|
}
|
|
28
25
|
},
|
|
29
26
|
data() {
|
|
30
27
|
return {
|
|
28
|
+
saveState: false,
|
|
29
|
+
trackable: false,
|
|
31
30
|
isDashed: 'solid',
|
|
32
31
|
}
|
|
33
32
|
},
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<v-container
|
|
4
|
+
class="pa-0"
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title ||
|
|
7
|
+
block.metadata.config.instructions
|
|
8
|
+
"
|
|
9
|
+
>
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
|
+
{{ block.metadata.config.title }}
|
|
12
|
+
</h2>
|
|
13
|
+
|
|
14
|
+
<p
|
|
15
|
+
v-if="block.metadata.config.instructions"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
class="pt-3"
|
|
18
|
+
>
|
|
19
|
+
{{ block.metadata.config.instructions }}
|
|
20
|
+
</p>
|
|
21
|
+
</v-container>
|
|
3
22
|
<div v-if="stateLoaded">
|
|
4
23
|
<div v-if="block.body && !submitted">
|
|
5
24
|
<TextViewer v-model="block.body" :height="200"></TextViewer>
|
|
@@ -118,6 +137,12 @@ export default {
|
|
|
118
137
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
119
138
|
this.block.metadata.config = {}
|
|
120
139
|
}
|
|
140
|
+
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
141
|
+
this.block.metadata.config.title = ''
|
|
142
|
+
}
|
|
143
|
+
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
144
|
+
this.block.metadata.config.instructions = ''
|
|
145
|
+
}
|
|
121
146
|
if (_.isEmpty(this.block.metadata.config.sample_response)) {
|
|
122
147
|
this.block.metadata.config.sample_response = ''
|
|
123
148
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div v-if="block.metadata.config.linked.length">
|
|
4
|
-
<v-btn
|
|
4
|
+
<v-btn
|
|
5
|
+
elevation="0"
|
|
6
|
+
color="primary"
|
|
7
|
+
outlined
|
|
8
|
+
block
|
|
9
|
+
@click="onCollate"
|
|
10
|
+
>
|
|
5
11
|
<v-icon class="mr-3">mdi-file-word</v-icon>
|
|
6
12
|
{{
|
|
7
13
|
$t(
|
|
@@ -74,19 +80,14 @@ export default {
|
|
|
74
80
|
'metadata->block->block_id',
|
|
75
81
|
this.block.metadata.config.linked
|
|
76
82
|
)
|
|
83
|
+
.with('contentBlock')
|
|
77
84
|
.get()
|
|
78
|
-
let collated = ''
|
|
79
|
-
const sortedStates = []
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (found) {
|
|
87
|
-
sortedStates.push(found)
|
|
88
|
-
}
|
|
89
|
-
})
|
|
86
|
+
let collated = ''
|
|
87
|
+
// sort by order on the page
|
|
88
|
+
const sortedStates = userState.sort((a, b) =>
|
|
89
|
+
a.content_block.order < b.content_block.order ? -1 : 1
|
|
90
|
+
)
|
|
90
91
|
|
|
91
92
|
sortedStates.forEach((state) => {
|
|
92
93
|
// Prepend the prompt from the state if include prompts is enabled
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<h2
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
5
|
+
{{ block.metadata.config.title }}
|
|
6
|
+
</h2>
|
|
7
|
+
<p
|
|
8
|
+
v-if="block.metadata.config.description"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
class="pt-3"
|
|
11
|
+
>
|
|
12
|
+
{{ block.metadata.config.description }}
|
|
12
13
|
</p>
|
|
13
14
|
<div
|
|
14
15
|
v-if="choiceIndex !== null && block.metadata.config.show_reset"
|
|
15
16
|
class="text-right"
|
|
16
17
|
>
|
|
17
|
-
<v-btn
|
|
18
|
+
<v-btn
|
|
19
|
+
elevation="0"
|
|
20
|
+
color="primary"
|
|
21
|
+
outlined
|
|
22
|
+
@click="onClickReset"
|
|
23
|
+
>
|
|
18
24
|
{{
|
|
19
25
|
$t(
|
|
20
26
|
'windward.core.components.content.blocks.scenario_choice.try_again'
|
|
@@ -30,7 +36,7 @@
|
|
|
30
36
|
no-gutters
|
|
31
37
|
:class="rowClass(item, itemIndex)"
|
|
32
38
|
>
|
|
33
|
-
<v-col cols="
|
|
39
|
+
<v-col cols="12" v-bind="iconColumnAttrs" class="text-center">
|
|
34
40
|
<div
|
|
35
41
|
class="pt-8 pb-8 text-icon-container mb-4 mx-auto"
|
|
36
42
|
role="button"
|
|
@@ -48,30 +54,34 @@
|
|
|
48
54
|
}}
|
|
49
55
|
</strong>
|
|
50
56
|
</v-col>
|
|
51
|
-
<v-col cols="
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
<v-col cols="12" v-bind="bodyColumnAttrs">
|
|
58
|
+
<v-container :class="bodyClass">
|
|
59
|
+
<h4
|
|
60
|
+
role="button"
|
|
61
|
+
class="mt-4"
|
|
62
|
+
@click="onClickItem(itemIndex)"
|
|
63
|
+
>
|
|
64
|
+
{{ item.title }}
|
|
65
|
+
</h4>
|
|
59
66
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
<v-expand-transition>
|
|
68
|
+
<div v-if="choiceIndex !== null">
|
|
69
|
+
<v-divider light class="my-4" />
|
|
70
|
+
<TextViewer v-model="item.body"></TextViewer>
|
|
71
|
+
<a
|
|
72
|
+
v-if="linkedPage !== null"
|
|
73
|
+
class="white--text text-decoration-underline"
|
|
74
|
+
@click="
|
|
75
|
+
onClickLink(
|
|
76
|
+
linkedPage.course_content_id
|
|
77
|
+
)
|
|
78
|
+
"
|
|
79
|
+
>
|
|
80
|
+
{{ linkedPage.text }}
|
|
81
|
+
</a>
|
|
82
|
+
</div>
|
|
83
|
+
</v-expand-transition>
|
|
84
|
+
</v-container>
|
|
75
85
|
</v-col>
|
|
76
86
|
</v-row>
|
|
77
87
|
</v-container>
|
|
@@ -199,6 +209,29 @@ export default {
|
|
|
199
209
|
return null
|
|
200
210
|
}
|
|
201
211
|
},
|
|
212
|
+
iconColumnAttrs() {
|
|
213
|
+
return {
|
|
214
|
+
xl: '2',
|
|
215
|
+
lg: '3',
|
|
216
|
+
md: '3',
|
|
217
|
+
sm: '3',
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
bodyColumnAttrs() {
|
|
221
|
+
return {
|
|
222
|
+
xl: '10',
|
|
223
|
+
lg: '9',
|
|
224
|
+
md: '9',
|
|
225
|
+
sm: '9',
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
bodyClass() {
|
|
229
|
+
if (window.innerWidth <= 665) {
|
|
230
|
+
return ''
|
|
231
|
+
} else {
|
|
232
|
+
return 'ml-4'
|
|
233
|
+
}
|
|
234
|
+
},
|
|
202
235
|
},
|
|
203
236
|
beforeMount() {
|
|
204
237
|
// Apply the default config
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<v-container
|
|
4
|
+
v-if="
|
|
5
|
+
block.metadata.config.title ||
|
|
6
|
+
block.metadata.config.instructions
|
|
7
|
+
"
|
|
8
|
+
class="pa-0"
|
|
9
|
+
>
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
|
+
{{ block.metadata.config.title }}
|
|
12
|
+
</h2>
|
|
13
|
+
|
|
14
|
+
<p
|
|
15
|
+
v-if="block.metadata.config.instructions"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
class="pt-3"
|
|
18
|
+
>
|
|
19
|
+
{{ block.metadata.config.instructions }}
|
|
20
|
+
</p>
|
|
21
|
+
</v-container>
|
|
3
22
|
<v-container class="pa-0">
|
|
4
23
|
<v-tabs dark v-model="block.metadata.config.currentTab" show-arrows>
|
|
5
24
|
<v-tabs-slider></v-tabs-slider>
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container class="pa-0">
|
|
3
3
|
<div>
|
|
4
|
-
<h2 v-if="block.metadata.config.title">
|
|
4
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
5
5
|
{{ block.metadata.config.title }}
|
|
6
6
|
</h2>
|
|
7
7
|
<v-row>
|
|
8
|
-
<v-col cols="12">
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
></TextViewer>
|
|
13
|
-
<TextEditor
|
|
14
|
-
v-if="!render && block.__expandInstructions"
|
|
15
|
-
v-model="block.metadata.config.instructions"
|
|
16
|
-
/>
|
|
8
|
+
<v-col v-if="block.metadata.config.instructions" cols="12">
|
|
9
|
+
<p tabindex="0" class="pt-3">
|
|
10
|
+
{{ block.metadata.config.instructions }}
|
|
11
|
+
</p>
|
|
17
12
|
</v-col>
|
|
18
13
|
<v-col v-if="!blockExists" cols="12">
|
|
19
14
|
<v-alert color="warning">
|