@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.
Files changed (176) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/components/Content/Blocks/Accordion.vue +22 -0
  3. package/components/Content/Blocks/BlockQuote.vue +6 -2
  4. package/components/Content/Blocks/ClickableIcons.vue +19 -4
  5. package/components/Content/Blocks/Email.vue +12 -3
  6. package/components/Content/Blocks/GenerateAIQuestionButton.vue +14 -6
  7. package/components/Content/Blocks/HorizontalRule.vue +3 -4
  8. package/components/Content/Blocks/OpenResponse.vue +25 -0
  9. package/components/Content/Blocks/OpenResponseCollate.vue +13 -12
  10. package/components/Content/Blocks/ScenarioChoice.vue +66 -33
  11. package/components/Content/Blocks/Tab.vue +19 -0
  12. package/components/Content/Blocks/UserUpload.vue +5 -10
  13. package/components/Content/Blocks/Video.vue +129 -15
  14. package/components/Settings/AccordionSettings.vue +52 -13
  15. package/components/Settings/BlockQuoteSettings.vue +17 -33
  16. package/components/Settings/ClickableIconsSettings.vue +37 -23
  17. package/components/Settings/EmailSettings.vue +12 -30
  18. package/components/Settings/FileDownloadSettings.vue +12 -31
  19. package/components/Settings/HorizontalRuleSettings.vue +0 -3
  20. package/components/Settings/ImageSettings.vue +3 -9
  21. package/components/Settings/OpenResponseCollateSettings.vue +47 -55
  22. package/components/Settings/OpenResponseSettings.vue +62 -36
  23. package/components/Settings/ScenarioChoiceSettings.vue +22 -29
  24. package/components/Settings/TabSettings.vue +99 -81
  25. package/components/Settings/UserUploadSettings.vue +16 -42
  26. package/components/Settings/VideoSettings/SourcePicker.vue +223 -0
  27. package/components/Settings/VideoSettings.vue +115 -195
  28. package/components/utils/TinyMCEWrapper.vue +9 -5
  29. package/components/utils/assets/tinymce/content/global.scss +14 -0
  30. package/components/utils/glossary/CourseGlossary.vue +52 -27
  31. package/helpers/GlossaryHelper.ts +12 -2
  32. package/helpers/tinymce/WindwardPlugins.ts +59 -10
  33. package/i18n/en-US/components/content/blocks/generate_questions.ts +2 -1
  34. package/i18n/en-US/components/content/blocks/video.ts +2 -51
  35. package/i18n/en-US/components/settings/accordion.ts +1 -0
  36. package/i18n/en-US/components/settings/open_response_collate.ts +1 -1
  37. package/i18n/en-US/components/settings/scenario_choice.ts +3 -2
  38. package/i18n/en-US/components/settings/tab.ts +1 -0
  39. package/i18n/en-US/components/settings/user_upload.ts +1 -0
  40. package/i18n/en-US/components/settings/video.ts +51 -0
  41. package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +9 -1
  42. package/i18n/en-US/shared/settings.ts +1 -1
  43. package/i18n/es-ES/components/content/blocks/generate_questions.ts +2 -1
  44. package/i18n/es-ES/components/content/blocks/video.ts +3 -53
  45. package/i18n/es-ES/components/settings/accordion.ts +1 -0
  46. package/i18n/es-ES/components/settings/open_response_collate.ts +1 -1
  47. package/i18n/es-ES/components/settings/scenario_choice.ts +3 -2
  48. package/i18n/es-ES/components/settings/tab.ts +2 -0
  49. package/i18n/es-ES/components/settings/user_upload.ts +1 -0
  50. package/i18n/es-ES/components/settings/video.ts +53 -0
  51. package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +9 -0
  52. package/i18n/es-ES/shared/settings.ts +1 -1
  53. package/i18n/sv-SE/components/content/blocks/generate_questions.ts +2 -1
  54. package/i18n/sv-SE/components/content/blocks/video.ts +2 -51
  55. package/i18n/sv-SE/components/settings/accordion.ts +2 -0
  56. package/i18n/sv-SE/components/settings/open_response_collate.ts +1 -1
  57. package/i18n/sv-SE/components/settings/scenario_choice.ts +3 -2
  58. package/i18n/sv-SE/components/settings/tab.ts +1 -0
  59. package/i18n/sv-SE/components/settings/user_upload.ts +1 -0
  60. package/i18n/sv-SE/components/settings/video.ts +51 -0
  61. package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +8 -0
  62. package/package.json +3 -2
  63. package/plugin.js +1 -1
  64. package/test/__mocks__/modelMock.js +1 -1
  65. package/test/helpers/GlossaryHelper.spec.js +22 -3
  66. package/test/mocks.js +8 -0
  67. package/.idea/codeStyles/Project.xml +0 -58
  68. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  69. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  70. package/.idea/modules.xml +0 -8
  71. package/.idea/php-docker-settings.xml +0 -24
  72. package/.idea/php.xml +0 -19
  73. package/.idea/vcs.xml +0 -6
  74. package/.idea/watcherTasks.xml +0 -4
  75. package/.idea/windward-ui-plugin-core.iml +0 -8
  76. package/config/menu.config.json +0 -475
  77. package/coverage/clover.xml +0 -223
  78. package/coverage/coverage-final.json +0 -16
  79. package/coverage/lcov-report/base.css +0 -224
  80. package/coverage/lcov-report/block-navigation.js +0 -87
  81. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
  82. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
  83. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
  84. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
  85. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
  86. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
  87. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
  88. package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
  89. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
  90. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
  91. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
  92. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
  93. package/coverage/lcov-report/components/utils/index.html +0 -161
  94. package/coverage/lcov-report/config/index.html +0 -116
  95. package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
  96. package/coverage/lcov-report/favicon.png +0 -0
  97. package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
  98. package/coverage/lcov-report/helpers/index.html +0 -116
  99. package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
  100. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
  101. package/coverage/lcov-report/index.html +0 -191
  102. package/coverage/lcov-report/prettify.css +0 -1
  103. package/coverage/lcov-report/prettify.js +0 -2
  104. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  105. package/coverage/lcov-report/sorter.js +0 -196
  106. package/coverage/lcov-report/test/index.html +0 -116
  107. package/coverage/lcov-report/test/mocks.js.html +0 -457
  108. package/coverage/lcov.info +0 -403
  109. package/lib/helpers/GlossaryHelper.d.ts +0 -9
  110. package/lib/helpers/GlossaryHelper.js +0 -118
  111. package/lib/helpers/GlossaryTerm.d.ts +0 -10
  112. package/lib/helpers/GlossaryTerm.js +0 -22
  113. package/lib/helpers/MathHelper.d.ts +0 -99
  114. package/lib/helpers/MathHelper.js +0 -194
  115. package/lib/helpers/tinymce/plugin.d.ts +0 -2
  116. package/lib/helpers/tinymce/plugin.js +0 -86
  117. package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
  118. package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
  119. package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
  120. package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
  121. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
  122. package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
  123. package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
  124. package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
  125. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
  126. package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
  127. package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
  128. package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
  129. package/lib/i18n/en-US/components/content/index.d.ts +0 -77
  130. package/lib/i18n/en-US/components/content/index.js +0 -6
  131. package/lib/i18n/en-US/components/index.d.ts +0 -140
  132. package/lib/i18n/en-US/components/index.js +0 -12
  133. package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
  134. package/lib/i18n/en-US/components/navigation/image.js +0 -6
  135. package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
  136. package/lib/i18n/en-US/components/navigation/index.js +0 -8
  137. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
  138. package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
  139. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
  140. package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
  141. package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
  142. package/lib/i18n/en-US/components/settings/image.js +0 -3
  143. package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
  144. package/lib/i18n/en-US/components/settings/index.js +0 -14
  145. package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
  146. package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
  147. package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
  148. package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
  149. package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
  150. package/lib/i18n/en-US/components/settings/video.js +0 -14
  151. package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
  152. package/lib/i18n/en-US/components/utils/index.js +0 -6
  153. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
  154. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
  155. package/lib/i18n/en-US/index.d.ts +0 -197
  156. package/lib/i18n/en-US/index.js +0 -16
  157. package/lib/i18n/en-US/modules/index.d.ts +0 -2
  158. package/lib/i18n/en-US/modules/index.js +0 -6
  159. package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
  160. package/lib/i18n/en-US/pages/glossary.js +0 -9
  161. package/lib/i18n/en-US/pages/index.d.ts +0 -13
  162. package/lib/i18n/en-US/pages/index.js +0 -8
  163. package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
  164. package/lib/i18n/en-US/pages/user_upload.js +0 -5
  165. package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
  166. package/lib/i18n/en-US/shared/content_blocks.js +0 -21
  167. package/lib/i18n/en-US/shared/index.d.ts +0 -39
  168. package/lib/i18n/en-US/shared/index.js +0 -10
  169. package/lib/i18n/en-US/shared/menu.d.ts +0 -4
  170. package/lib/i18n/en-US/shared/menu.js +0 -5
  171. package/lib/i18n/en-US/shared/settings.d.ts +0 -15
  172. package/lib/i18n/en-US/shared/settings.js +0 -16
  173. package/lib/i18n/en-US.d.ts +0 -197
  174. package/lib/i18n/en-US.js +0 -15
  175. package/lib/models/UserFileAsset.d.ts +0 -5
  176. package/lib/models/UserFileAsset.js +0 -37
package/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ### Release [0.6.0] created - 2024-07-30
3
+ ## Release [0.7.0] - 2024-08-29
4
+
5
+ * Version bump to 0.7.0
6
+
4
7
 
8
+ ### Release [0.7.0] created - 2024-08-29
9
+
10
+
11
+ ### Release [0.6.0] created - 2024-07-30
@@ -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 v-if="block.metadata.config.instructions" class="pb-0 mb-0">
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>{{ block.metadata.config.title }}</h2>
4
+ <h2 v-if="block.metadata.config.title" tabindex="0">
5
+ {{ block.metadata.config.title }}
6
+ </h2>
5
7
 
6
- <p>{{ block.metadata.config.description }}</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="ml-4">
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: '2',
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 v-if="block.metadata.config.instructions" class="pb-0 mb-0">
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="6">
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="primary"
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
- `suggest/${this.questionType}`
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(this.$t('windward.core.components.content.blocks.generate_questions.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 elevation="0" color="primary" outlined block @click="onCollate">
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
- // Sorted the states based on the linked order
82
- this.block.metadata.config.linked.forEach((linkedId) => {
83
- const found = userState.find((state) => {
84
- return state.metadata.block.block_id === linkedId
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>{{ block.metadata.config.title }}</h2>
5
- <p>{{ block.metadata.config.description }}</p>
6
- <p>
7
- {{
8
- $t(
9
- 'windward.core.components.content.blocks.scenario_choice.information'
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 elevation="0" color="primary" outlined @click="onClickReset">
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="2" class="text-center">
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="10">
52
- <h4
53
- role="button"
54
- class="mt-4"
55
- @click="onClickItem(itemIndex)"
56
- >
57
- {{ item.title }}
58
- </h4>
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
- <v-expand-transition>
61
- <div v-if="choiceIndex !== null">
62
- <v-divider light class="my-4" />
63
- <TextViewer v-model="item.body"></TextViewer>
64
- <a
65
- v-if="linkedPage !== null"
66
- class="white--text text-decoration-underline"
67
- @click="
68
- onClickLink(linkedPage.course_content_id)
69
- "
70
- >
71
- {{ linkedPage.text }}
72
- </a>
73
- </div>
74
- </v-expand-transition>
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
- <TextViewer
10
- v-if="render || !block.__expandInstructions"
11
- v-model="block.metadata.config.instructions"
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">