@windward/core 0.1.4 → 0.2.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.
Files changed (171) hide show
  1. package/components/Content/Blocks/Accordion.vue +12 -7
  2. package/components/Content/Blocks/BlockQuote.vue +3 -1
  3. package/components/Content/Blocks/ClickableIcons.vue +29 -27
  4. package/components/Content/Blocks/Email.vue +3 -1
  5. package/components/Content/Blocks/Feedback.vue +3 -12
  6. package/components/Content/Blocks/Image.vue +4 -4
  7. package/components/Content/Blocks/Math.vue +3 -1
  8. package/components/Content/Blocks/ScenarioChoice.vue +3 -1
  9. package/components/Content/Blocks/Tab.vue +5 -9
  10. package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +4 -4
  11. package/components/Content/Blocks/UserUpload.vue +3 -1
  12. package/components/Navigation/Items/AskTheExpert.vue +2 -2
  13. package/components/Navigation/Items/CourseGlossaryToolNav.vue +2 -2
  14. package/components/Settings/AccordionSettings.vue +1 -3
  15. package/components/Settings/BlockQuoteSettings.vue +1 -1
  16. package/components/Settings/ClickableIconsSettings.vue +1 -1
  17. package/components/Settings/EmailSettings.vue +1 -1
  18. package/components/Settings/FeedbackSettings.vue +3 -1
  19. package/components/Settings/ImageSettings.vue +69 -9
  20. package/components/Settings/MathSettings.vue +1 -1
  21. package/components/Settings/ScenarioChoiceSettings.vue +7 -5
  22. package/components/Settings/TabSettings.vue +1 -4
  23. package/components/Settings/TextEditorSettings.vue +2 -2
  24. package/components/Settings/UserUploadSettings.vue +1 -1
  25. package/components/utils/ContentViewer.vue +2 -1
  26. package/components/utils/FillInBlank/FillInTheBlanksManager.vue +20 -24
  27. package/components/utils/MathExpressionEditor.vue +83 -86
  28. package/components/utils/MathLiveWrapper.vue +3 -1
  29. package/components/utils/TinyMCEWrapper.vue +65 -18
  30. package/components/utils/glossary/CourseGlossary.vue +16 -3
  31. package/components/utils/glossary/CourseGlossaryForm.vue +2 -0
  32. package/components/utils/glossary/GlossaryToolTip.vue +2 -2
  33. package/config/tinymce.config.ts +313 -0
  34. package/helpers/MathHelper.ts +1 -1
  35. package/helpers/tinymce/plugin.ts +32 -25
  36. package/i18n/en-US/components/settings/image.ts +8 -0
  37. package/i18n/en-US/components/utils/math_expression_editor.ts +11 -0
  38. package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +1 -0
  39. package/i18n/en-US/pages/index.ts +2 -0
  40. package/i18n/en-US/pages/plugins/error.ts +9 -0
  41. package/i18n/en-US/pages/plugins/index.ts +5 -0
  42. package/i18n/en-US/shared/settings.ts +1 -1
  43. package/i18n/es-ES/components/settings/image.ts +8 -0
  44. package/i18n/es-ES/components/utils/math_expression_editor.ts +11 -0
  45. package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +1 -0
  46. package/i18n/es-ES/pages/index.ts +2 -0
  47. package/i18n/es-ES/pages/plugins/error.ts +9 -0
  48. package/i18n/es-ES/pages/plugins/index.ts +5 -0
  49. package/i18n/sv-SE/components/settings/image.ts +8 -0
  50. package/i18n/sv-SE/components/utils/math_expression_editor.ts +11 -0
  51. package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +1 -0
  52. package/i18n/sv-SE/pages/index.ts +2 -0
  53. package/i18n/sv-SE/pages/plugins/error.ts +8 -0
  54. package/i18n/sv-SE/pages/plugins/index.ts +5 -0
  55. package/package.json +7 -2
  56. package/pages/plugins/tinymce/_plugin.vue +79 -0
  57. package/plugin.js +25 -28
  58. package/test/Pages/Plugins/TinyMce.spec.js +23 -0
  59. package/test/__mocks__/componentsMock.js +1 -13
  60. package/test/mocks.js +1 -0
  61. package/.idea/codeStyles/Project.xml +0 -58
  62. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  63. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  64. package/.idea/modules.xml +0 -8
  65. package/.idea/php-docker-settings.xml +0 -24
  66. package/.idea/php.xml +0 -19
  67. package/.idea/vcs.xml +0 -6
  68. package/.idea/watcherTasks.xml +0 -4
  69. package/.idea/windward-ui-plugin-core.iml +0 -8
  70. package/.vscode/settings.json +0 -3
  71. package/config/tinymce.config.js +0 -136
  72. package/coverage/clover.xml +0 -223
  73. package/coverage/coverage-final.json +0 -16
  74. package/coverage/lcov-report/base.css +0 -224
  75. package/coverage/lcov-report/block-navigation.js +0 -87
  76. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
  77. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
  78. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
  79. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
  80. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
  81. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
  82. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
  83. package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
  84. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
  85. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
  86. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
  87. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
  88. package/coverage/lcov-report/components/utils/index.html +0 -161
  89. package/coverage/lcov-report/config/index.html +0 -116
  90. package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
  91. package/coverage/lcov-report/favicon.png +0 -0
  92. package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
  93. package/coverage/lcov-report/helpers/index.html +0 -116
  94. package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
  95. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
  96. package/coverage/lcov-report/index.html +0 -191
  97. package/coverage/lcov-report/prettify.css +0 -1
  98. package/coverage/lcov-report/prettify.js +0 -2
  99. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  100. package/coverage/lcov-report/sorter.js +0 -196
  101. package/coverage/lcov-report/test/index.html +0 -116
  102. package/coverage/lcov-report/test/mocks.js.html +0 -457
  103. package/coverage/lcov.info +0 -403
  104. package/lib/helpers/GlossaryHelper.d.ts +0 -9
  105. package/lib/helpers/GlossaryHelper.js +0 -118
  106. package/lib/helpers/GlossaryTerm.d.ts +0 -10
  107. package/lib/helpers/GlossaryTerm.js +0 -22
  108. package/lib/helpers/MathHelper.d.ts +0 -99
  109. package/lib/helpers/MathHelper.js +0 -194
  110. package/lib/helpers/tinymce/plugin.d.ts +0 -2
  111. package/lib/helpers/tinymce/plugin.js +0 -86
  112. package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
  113. package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
  114. package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
  115. package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
  116. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
  117. package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
  118. package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
  119. package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
  120. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
  121. package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
  122. package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
  123. package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
  124. package/lib/i18n/en-US/components/content/index.d.ts +0 -77
  125. package/lib/i18n/en-US/components/content/index.js +0 -6
  126. package/lib/i18n/en-US/components/index.d.ts +0 -140
  127. package/lib/i18n/en-US/components/index.js +0 -12
  128. package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
  129. package/lib/i18n/en-US/components/navigation/image.js +0 -6
  130. package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
  131. package/lib/i18n/en-US/components/navigation/index.js +0 -8
  132. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
  133. package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
  134. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
  135. package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
  136. package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
  137. package/lib/i18n/en-US/components/settings/image.js +0 -3
  138. package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
  139. package/lib/i18n/en-US/components/settings/index.js +0 -14
  140. package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
  141. package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
  142. package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
  143. package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
  144. package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
  145. package/lib/i18n/en-US/components/settings/video.js +0 -14
  146. package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
  147. package/lib/i18n/en-US/components/utils/index.js +0 -6
  148. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
  149. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
  150. package/lib/i18n/en-US/index.d.ts +0 -197
  151. package/lib/i18n/en-US/index.js +0 -16
  152. package/lib/i18n/en-US/modules/index.d.ts +0 -2
  153. package/lib/i18n/en-US/modules/index.js +0 -6
  154. package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
  155. package/lib/i18n/en-US/pages/glossary.js +0 -9
  156. package/lib/i18n/en-US/pages/index.d.ts +0 -13
  157. package/lib/i18n/en-US/pages/index.js +0 -8
  158. package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
  159. package/lib/i18n/en-US/pages/user_upload.js +0 -5
  160. package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
  161. package/lib/i18n/en-US/shared/content_blocks.js +0 -21
  162. package/lib/i18n/en-US/shared/index.d.ts +0 -39
  163. package/lib/i18n/en-US/shared/index.js +0 -10
  164. package/lib/i18n/en-US/shared/menu.d.ts +0 -4
  165. package/lib/i18n/en-US/shared/menu.js +0 -5
  166. package/lib/i18n/en-US/shared/settings.d.ts +0 -15
  167. package/lib/i18n/en-US/shared/settings.js +0 -16
  168. package/lib/i18n/en-US.d.ts +0 -197
  169. package/lib/i18n/en-US.js +0 -15
  170. package/lib/models/UserFileAsset.d.ts +0 -5
  171. package/lib/models/UserFileAsset.js +0 -37
@@ -5,13 +5,16 @@
5
5
  flat
6
6
  accordion
7
7
  focusable
8
- id="expansion-panel-setting"
8
+ class="expansion-panels-container"
9
9
  >
10
10
  <v-expansion-panel
11
11
  v-for="(item, itemIndex) in block.metadata.config.items"
12
12
  :key="itemIndex"
13
13
  >
14
- <v-expansion-panel-header class="header" color="primary">
14
+ <v-expansion-panel-header
15
+ class="expansion-panel-header"
16
+ color="primary"
17
+ >
15
18
  {{
16
19
  item.header === '' || item.header === null
17
20
  ? 'Item ' + (itemIndex + 1)
@@ -19,7 +22,7 @@
19
22
  }}
20
23
  </v-expansion-panel-header>
21
24
  <v-expansion-panel-content
22
- class="body"
25
+ class="expansion-panel-body"
23
26
  :key="expansionPanelKey"
24
27
  >
25
28
  <v-container>
@@ -77,7 +80,9 @@ export default {
77
80
  if (_.isEmpty(this.block.metadata.config.currentAccordion)) {
78
81
  this.block.metadata.config.currentAccordion = 0
79
82
  }
80
- this.block.body = 'accordion'
83
+ this.block.body = this.$t(
84
+ 'windward.core.shared.content_blocks.title.accordion'
85
+ )
81
86
  },
82
87
  data() {
83
88
  return {
@@ -125,14 +130,14 @@ export default {
125
130
  </script>
126
131
 
127
132
  <style lang="scss" scoped>
128
- .header {
133
+ .expansion-panel-header {
129
134
  color: white;
130
135
  margin-top: 1px;
131
136
  }
132
- .body {
137
+ .expansion-panel-body {
133
138
  background: var(--v-surface-base);
134
139
  }
135
- #expansion-panel-setting {
140
+ .expansion-panels-container {
136
141
  z-index: 0;
137
142
  }
138
143
  </style>
@@ -70,7 +70,9 @@ export default {
70
70
  source_type: '',
71
71
  }
72
72
  }
73
- this.block.body = 'block quote'
73
+ this.block.body = this.$t(
74
+ 'windward.core.components.content.blocks.block_quote.body'
75
+ )
74
76
  },
75
77
  data() {
76
78
  return {
@@ -71,6 +71,35 @@ export default {
71
71
  TextViewer,
72
72
  },
73
73
  extends: BaseContentBlock,
74
+ beforeMount() {
75
+ // Apply the default config
76
+ this.block.body = this.$t(
77
+ 'windward.core.shared.content_blocks.title.clickable_icons'
78
+ )
79
+ if (_.isEmpty(this.block.metadata.config.items)) {
80
+ this.block.metadata.config.items = []
81
+ }
82
+ if (_.isEmpty(this.block.metadata.config.title)) {
83
+ this.block.metadata.config.title = ''
84
+ }
85
+ if (_.isEmpty(this.block.metadata.config.description)) {
86
+ this.block.metadata.config.description = ''
87
+ }
88
+ if (_.isEmpty(this.block.metadata.config.display)) {
89
+ this.block.metadata.config.display = {
90
+ show_title: false,
91
+ show_background: false,
92
+ round_icon: false,
93
+ italic_icon: false,
94
+ autocolor: true,
95
+ }
96
+ }
97
+ if (this.block.metadata.config.items.length) {
98
+ for (const index in this.block.metadata.config.items) {
99
+ this.block.metadata.config.items[index].active = false
100
+ }
101
+ }
102
+ },
74
103
  data() {
75
104
  return {}
76
105
  },
@@ -146,33 +175,6 @@ export default {
146
175
  }
147
176
  },
148
177
  },
149
- beforeMount() {
150
- // Apply the default config
151
- this.block.body = 'clickable icons'
152
- if (_.isEmpty(this.block.metadata.config.items)) {
153
- this.block.metadata.config.items = []
154
- }
155
- if (_.isEmpty(this.block.metadata.config.title)) {
156
- this.block.metadata.config.title = ''
157
- }
158
- if (_.isEmpty(this.block.metadata.config.description)) {
159
- this.block.metadata.config.description = ''
160
- }
161
- if (_.isEmpty(this.block.metadata.config.display)) {
162
- this.block.metadata.config.display = {
163
- show_title: false,
164
- show_background: false,
165
- round_icon: false,
166
- italic_icon: false,
167
- autocolor: true,
168
- }
169
- }
170
- if (this.block.metadata.config.items.length) {
171
- for (const index in this.block.metadata.config.items) {
172
- this.block.metadata.config.items[index].active = false
173
- }
174
- }
175
- },
176
178
  methods: {
177
179
  isIcon(str) {
178
180
  return str && _.isString(str) && str.indexOf('mdi-') === 0
@@ -231,7 +231,9 @@ export default {
231
231
  if (_.isEmpty(this.block.metadata.config.activeEmail)) {
232
232
  this.block.metadata.config.activeEmail = 0
233
233
  }
234
- this.block.body = 'emails'
234
+ this.block.body = this.$t(
235
+ 'windward.core.components.content.blocks.email.title'
236
+ )
235
237
  },
236
238
  data() {
237
239
  return {
@@ -186,7 +186,9 @@ export default {
186
186
  if (_.isEmpty(this.block.metadata.config.definition)) {
187
187
  this.block.metadata.config.definition = {}
188
188
  }
189
- this.block.body = 'feedback'
189
+ this.block.body = this.$t(
190
+ 'windward.core.components.content.blocks.feedback.feedback'
191
+ )
190
192
  },
191
193
  data() {
192
194
  return {
@@ -318,14 +320,3 @@ export default {
318
320
  },
319
321
  }
320
322
  </script>
321
- <style scoped>
322
- .question {
323
- font-weight: bold;
324
- }
325
- .radio-group {
326
- width: 100% !important;
327
- }
328
- .likert-radio {
329
- margin-left: 55px;
330
- }
331
- </style>
@@ -43,7 +43,7 @@
43
43
  class="sr-only"
44
44
  ></TextViewer>
45
45
  </v-container>
46
- <Dialog v-model="dialog" persistent :trigger="false">
46
+ <DialogBox v-model="dialog" persistent :trigger="false">
47
47
  <template #title></template>
48
48
  <template #form="{ on, attrs }">
49
49
  <v-responsive
@@ -72,13 +72,13 @@
72
72
  </v-img>
73
73
  </v-responsive>
74
74
  </template>
75
- </Dialog>
75
+ </DialogBox>
76
76
  </div>
77
77
  </template>
78
78
 
79
79
  <script>
80
80
  import _ from 'lodash'
81
- import Dialog from '~/components/Dialog'
81
+ import DialogBox from '~/components/DialogBox.vue'
82
82
  import TextViewer from '~/components/Text/TextViewer'
83
83
  import Crypto from '~/helpers/Crypto'
84
84
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
@@ -87,7 +87,7 @@ export default {
87
87
  name: 'ContentBlockImage',
88
88
  extends: BaseContentBlock,
89
89
  components: {
90
- Dialog,
90
+ DialogBox,
91
91
  TextViewer,
92
92
  },
93
93
  data() {
@@ -33,7 +33,9 @@ export default {
33
33
  this.block = {}
34
34
  }
35
35
  if (_.isEmpty(this.block.body)) {
36
- this.block.body = 'Math Editor'
36
+ this.block.body = this.$t(
37
+ 'windward.core.shared.content_blocks.title.math'
38
+ )
37
39
  }
38
40
  if (_.isEmpty(this.block.metadata)) {
39
41
  this.block.metadata = {}
@@ -202,7 +202,9 @@ export default {
202
202
  },
203
203
  beforeMount() {
204
204
  // Apply the default config
205
- this.block.body = 'scenario choice'
205
+ this.block.body = this.$t(
206
+ 'windward.core.shared.content_blocks.title.scenario_choice'
207
+ )
206
208
  if (_.isEmpty(this.block.metadata.config.items)) {
207
209
  this.block.metadata.config.items = []
208
210
  }
@@ -1,10 +1,7 @@
1
1
  <template>
2
2
  <div>
3
- <v-container>
4
- <v-tabs
5
- background-color="primary"
6
- v-model="block.metadata.config.currentTab"
7
- >
3
+ <v-container class="pa-0">
4
+ <v-tabs dark v-model="block.metadata.config.currentTab" show-arrows>
8
5
  <v-tabs-slider></v-tabs-slider>
9
6
  <v-tab
10
7
  v-for="(tab, tabIndex) in block.metadata.config.items"
@@ -52,7 +49,9 @@ export default {
52
49
  },
53
50
  extends: BaseContentBlock,
54
51
  beforeMount() {
55
- this.block.body = 'tab'
52
+ this.block.body = this.$t(
53
+ 'windward.core.shared.content_blocks.title.tab'
54
+ )
56
55
  if (_.isEmpty(this.block.metadata.config.items)) {
57
56
  const defaultObject = {
58
57
  tabHeader: '',
@@ -60,9 +59,6 @@ export default {
60
59
  content: '',
61
60
  }
62
61
  this.block.metadata.config.items = []
63
- if (_.isEmpty(this.block.metadata.config.tab)) {
64
- this.block.metadata.config.tab = 0
65
- }
66
62
  this.block.metadata.config.items.push(defaultObject)
67
63
  } else {
68
64
  this.block.metadata.config.items.forEach((element) => {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="text-center">
3
- <Dialog
3
+ <DialogBox
4
4
  v-bind="$attrs"
5
5
  transition="dialog-bottom-transition"
6
6
  :color="color"
@@ -22,20 +22,20 @@
22
22
  :enrollment="enrollment"
23
23
  ></DisplayUserFilesTable>
24
24
  </template>
25
- </Dialog>
25
+ </DialogBox>
26
26
  <span v-else>---</span>
27
27
  </div>
28
28
  </template>
29
29
 
30
30
  <script>
31
31
  import _ from 'lodash'
32
- import Dialog from '~/components/Dialog'
32
+ import DialogBox from '~/components/DialogBox'
33
33
 
34
34
  import DisplayUserFilesTable from './DisplayUserFilesTable.vue'
35
35
 
36
36
  export default {
37
37
  name: 'ManageDataTableUserFiles',
38
- components: { Dialog, DisplayUserFilesTable },
38
+ components: { DialogBox, DisplayUserFilesTable },
39
39
  props: {
40
40
  value: { type: Object, required: true },
41
41
  enrollment: { type: Object, required: true },
@@ -119,7 +119,9 @@ export default {
119
119
  this.block = {}
120
120
  }
121
121
  if (_.isEmpty(this.block.body)) {
122
- this.block.body = 'user uplaod'
122
+ this.block.body = this.$t(
123
+ 'windward.core.shared.content_blocks.title.user_upload'
124
+ )
123
125
  }
124
126
  if (_.isEmpty(this.block.metadata)) {
125
127
  this.block.metadata = {}
@@ -7,7 +7,7 @@
7
7
  <v-list-item-title>
8
8
  {{ $t(config.i18n) }}
9
9
  </v-list-item-title>
10
- <Dialog v-model="dialog" color="primary" text :trigger="false">
10
+ <DialogBox v-model="dialog" color="primary" text :trigger="false">
11
11
  <template #title>{{ $t(config.i18n) }}</template>
12
12
  <template #form="{ on, attrs }">
13
13
  <v-card flat v-bind="attrs" v-on="on">
@@ -104,7 +104,7 @@
104
104
  </v-container>
105
105
  </v-card>
106
106
  </template>
107
- </Dialog>
107
+ </DialogBox>
108
108
  </v-list-item-content>
109
109
  </v-list-item>
110
110
  </template>
@@ -5,14 +5,14 @@
5
5
  </v-list-item-action>
6
6
  <v-list-item-content>
7
7
  <v-list-item-title>{{ $t(config.i18n) }}</v-list-item-title>
8
- <Dialog v-model="dialog" color="primary" text :trigger="false">
8
+ <DialogBox v-model="dialog" color="primary" text :trigger="false">
9
9
  <template #title>{{ $t(config.i18n) }}</template>
10
10
  <template #form="{ on, attrs }">
11
11
  <div v-bind="attrs" v-on="on">
12
12
  <CourseGlossary />
13
13
  </div>
14
14
  </template>
15
- </Dialog>
15
+ </DialogBox>
16
16
  </v-list-item-content>
17
17
  </v-list-item>
18
18
  </template>
@@ -134,9 +134,7 @@ export default {
134
134
  if (_.isEmpty(this.block.metadata.config.currentAccordion)) {
135
135
  this.block.metadata.config.currentAccordion = 0
136
136
  }
137
- this.block.body = this.$t(
138
- 'windward.core.components.settings.accordion.accordion'
139
- )
137
+ this.block.body = this.$t('windward.core.shared.content_blocks.title.accordion')
140
138
  },
141
139
  data() {
142
140
  return {
@@ -117,7 +117,7 @@ export default {
117
117
  }
118
118
  }
119
119
  this.block.body = this.$t(
120
- 'windward.core.shared.settings.title.block_quote'
120
+ 'windward.core.components.content.blocks.block_quote.body'
121
121
  )
122
122
  },
123
123
  data() {
@@ -171,7 +171,7 @@ export default {
171
171
  this.block = {}
172
172
  }
173
173
  if (_.isEmpty(this.block.body)) {
174
- this.block.body = 'clickable icons'
174
+ this.block.body = this.$t('windward.core.shared.content_blocks.title.clickable_icons')
175
175
  }
176
176
  if (_.isEmpty(this.block.metadata)) {
177
177
  this.block.metadata = {}
@@ -161,7 +161,7 @@ export default {
161
161
  }
162
162
  this.block.metadata.config.emails.push(defaultObject)
163
163
  }
164
- this.block.body = 'emails'
164
+ this.block.body = this.$t('windward.core.components.content.blocks.email.title')
165
165
  },
166
166
  data() {
167
167
  return {
@@ -53,7 +53,9 @@ export default {
53
53
  if (_.isEmpty(this.block.metadata.config.definition)) {
54
54
  this.block.metadata.config.definition = {}
55
55
  }
56
- this.block.body = 'feedback'
56
+ this.block.body = this.$t(
57
+ 'windward.core.components.content.blocks.feedback.feedback'
58
+ )
57
59
  },
58
60
  data() {
59
61
  return {
@@ -27,24 +27,68 @@
27
27
  v-model="block.metadata.config.modal"
28
28
  :label="$t('windward.core.components.settings.image.modal')"
29
29
  ></v-switch>
30
+ <v-tooltip top color="primary">
31
+ <template v-slot:activator="{ on, attrs }">
32
+ <div v-bind="attrs" v-on="on" class="d-flex justify-content">
33
+ <v-switch
34
+ v-model="block.metadata.config.decorative"
35
+ @change="onDecorativeToggled($event)"
36
+ :label="
37
+ $t(
38
+ 'windward.core.components.settings.image.decorative'
39
+ )
40
+ "
41
+ ></v-switch>
42
+ <div class="d-flex align-center pb-4">
43
+ <v-icon x-small>mdi-help</v-icon>
44
+ </div>
45
+ </div>
46
+ </template>
47
+ <span class="span-description">{{
48
+ $t('windward.core.components.settings.image.toggle_description')
49
+ }}</span>
50
+ </v-tooltip>
30
51
 
31
- <v-form>
52
+ <v-form v-if="!block.metadata.config.decorative">
32
53
  <v-text-field
33
54
  v-model="block.metadata.config.alt"
55
+ outlined
56
+ counter
57
+ maxlength="125"
34
58
  :label="
35
59
  $t('windward.core.components.navigation.image.default_alt')
36
60
  "
37
61
  :rules="validation.textRules"
38
- ></v-text-field>
39
- <h3 class="pb-2">
40
- {{
41
- $t(
42
- 'windward.core.components.navigation.image.default_aria_described'
43
- )
44
- }}
45
- </h3>
62
+ >
63
+ <template v-slot:append>
64
+ <v-tooltip top color="primary">
65
+ <template v-slot:activator="{ on }">
66
+ <v-icon v-on="on" small>mdi-help</v-icon>
67
+ </template>
68
+ <span class="span-description">{{
69
+ $t(
70
+ 'windward.core.components.settings.image.alt_description'
71
+ )
72
+ }}</span>
73
+ </v-tooltip>
74
+ </template>
75
+ </v-text-field>
76
+ <h5 class="pb-2">
77
+ {{ $t('windward.core.components.settings.image.screenreader') }}
78
+ <v-tooltip top color="primary">
79
+ <template v-slot:activator="{ on }">
80
+ <v-icon v-on="on" small class="pb-3">mdi-help</v-icon>
81
+ </template>
82
+ <span class="span-description">{{
83
+ $t(
84
+ 'windward.core.components.settings.image.screenreader_description'
85
+ )
86
+ }}</span>
87
+ </v-tooltip>
88
+ </h5>
46
89
  <TextEditor
47
90
  v-model="block.metadata.config.aria_describedby"
91
+ menubar="bullist numlist"
48
92
  ></TextEditor>
49
93
  </v-form>
50
94
  </v-container>
@@ -86,6 +130,9 @@ export default {
86
130
  if (!_.isBoolean(this.block.metadata.config.modal)) {
87
131
  this.block.metadata.config.modal = false
88
132
  }
133
+ if (!_.isBoolean(this.block.metadata.config.decorative)) {
134
+ this.block.metadata.config.decorative = false
135
+ }
89
136
  if (_.isEmpty(this.block.metadata.config.aria_describedby)) {
90
137
  this.block.metadata.config.aria_describedby = ''
91
138
  }
@@ -108,6 +155,12 @@ export default {
108
155
  watch: {},
109
156
  mounted() {},
110
157
  methods: {
158
+ onDecorativeToggled(evt) {
159
+ if (evt) {
160
+ this.block.metadata.config.aria_describedby = ''
161
+ this.block.metadata.config.alt = ''
162
+ }
163
+ },
111
164
  onFileSelect(file) {
112
165
  // file = null when you remove a file
113
166
  if (_.isEmpty(file)) {
@@ -139,3 +192,10 @@ export default {
139
192
  },
140
193
  }
141
194
  </script>
195
+ <style>
196
+ .span-description {
197
+ display: flex;
198
+ justify-content: center;
199
+ width: 200px;
200
+ }
201
+ </style>
@@ -36,7 +36,7 @@ export default {
36
36
  this.block = {}
37
37
  }
38
38
  if (_.isEmpty(this.block.body)) {
39
- this.block.body = 'Math Editor'
39
+ this.block.body = this.$t('windward.core.shared.content_blocks.title.math')
40
40
  }
41
41
  if (_.isEmpty(this.block.metadata)) {
42
42
  this.block.metadata = {}
@@ -117,7 +117,7 @@
117
117
  </v-col>
118
118
  </v-container>
119
119
 
120
- <Dialog
120
+ <DialogBox
121
121
  v-model="showLinkDialog"
122
122
  :trigger="false"
123
123
  action-save
@@ -171,7 +171,7 @@
171
171
  </v-treeview>
172
172
  </v-form>
173
173
  </template>
174
- </Dialog>
174
+ </DialogBox>
175
175
  </div>
176
176
  </template>
177
177
  <script>
@@ -180,14 +180,14 @@ import { mapGetters } from 'vuex'
180
180
  import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
181
181
  import TextEditor from '~/components/Text/TextEditor'
182
182
  import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
183
- import Dialog from '~/components/Dialog.vue'
183
+ import DialogBox from '~/components/DialogBox.vue'
184
184
 
185
185
  export default {
186
186
  name: 'ScenarioChoiceSettings',
187
187
  components: {
188
188
  SortableExpansionPanel,
189
189
  TextEditor,
190
- Dialog,
190
+ DialogBox,
191
191
  },
192
192
  extends: BaseContentSettings,
193
193
  computed: {
@@ -231,7 +231,9 @@ export default {
231
231
  this.block = {}
232
232
  }
233
233
  if (_.isEmpty(this.block.body)) {
234
- this.block.body = 'scenario choice'
234
+ this.block.body = this.$t(
235
+ 'windward.core.shared.content_blocks.title.scenario_choice'
236
+ )
235
237
  }
236
238
  if (_.isEmpty(this.block.metadata)) {
237
239
  this.block.metadata = {}
@@ -85,7 +85,7 @@ export default {
85
85
  }
86
86
  if (_.isEmpty(this.block.body)) {
87
87
  this.block.body = this.$t(
88
- 'windward.core.components.settings.tab.tab'
88
+ 'windward.core.shared.content_blocks.title.tab'
89
89
  )
90
90
  }
91
91
  if (_.isEmpty(this.block.metadata)) {
@@ -94,9 +94,6 @@ export default {
94
94
  if (_.isEmpty(this.block.metadata.config)) {
95
95
  this.block.metadata.config = {}
96
96
  }
97
- if (_.isEmpty(this.block.metadata.config.tab)) {
98
- this.block.metadata.config.tab = 0
99
- }
100
97
  if (_.isEmpty(this.block.metadata.config.currentTab)) {
101
98
  this.block.metadata.config.currentTab = 0
102
99
  }
@@ -108,7 +108,7 @@
108
108
  type=" table-row-divider, list-item, divider, list-item, divider, image,image"
109
109
  v-show="settingSelector.includes(1) && block.metadata.config.expand"
110
110
  ></v-skeleton-loader>
111
- <Dialog
111
+ <DialogBox
112
112
  v-model="dialog"
113
113
  color="primary"
114
114
  max-width="600px"
@@ -129,7 +129,7 @@
129
129
  v-on="on"
130
130
  />
131
131
  </template>
132
- </Dialog>
132
+ </DialogBox>
133
133
  </div>
134
134
  </template>
135
135
 
@@ -62,7 +62,7 @@ export default {
62
62
  this.block = {}
63
63
  }
64
64
  if (_.isEmpty(this.block.body)) {
65
- this.block.body = 'user uplaod'
65
+ this.block.body = this.$t('windward.core.shared.content_blocks.title.user_upload')
66
66
  }
67
67
  if (_.isEmpty(this.block.metadata)) {
68
68
  this.block.metadata = {}
@@ -33,7 +33,8 @@ export default {
33
33
  content = _.cloneDeep(this.value)
34
34
  if (
35
35
  MathHelper.containsMathML(content) ||
36
- MathHelper.containsLatex(content)
36
+ MathHelper.containsLatex(content) ||
37
+ MathHelper.containSREnhancedLatex(content)
37
38
  ) {
38
39
  content = MathHelper.convertMathContentToHtml(content)
39
40
  }