@windward/core 0.6.0 → 0.7.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 (158) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/components/Content/Blocks/Accordion.vue +14 -0
  3. package/components/Content/Blocks/ClickableIcons.vue +9 -2
  4. package/components/Content/Blocks/Email.vue +11 -2
  5. package/components/Content/Blocks/GenerateAIQuestionButton.vue +14 -6
  6. package/components/Content/Blocks/HorizontalRule.vue +1 -4
  7. package/components/Content/Blocks/ScenarioChoice.vue +57 -32
  8. package/components/Content/Blocks/Tab.vue +5 -0
  9. package/components/Content/Blocks/UserUpload.vue +1 -8
  10. package/components/Content/Blocks/Video.vue +96 -8
  11. package/components/Settings/AccordionSettings.vue +61 -8
  12. package/components/Settings/BlockQuoteSettings.vue +20 -12
  13. package/components/Settings/ClickableIconsSettings.vue +48 -12
  14. package/components/Settings/EmailSettings.vue +20 -12
  15. package/components/Settings/FileDownloadSettings.vue +22 -16
  16. package/components/Settings/HorizontalRuleSettings.vue +0 -3
  17. package/components/Settings/ScenarioChoiceSettings.vue +29 -14
  18. package/components/Settings/TabSettings.vue +121 -78
  19. package/components/Settings/UserUploadSettings.vue +30 -32
  20. package/components/Settings/VideoSettings/SourcePicker.vue +222 -0
  21. package/components/Settings/VideoSettings.vue +139 -183
  22. package/components/utils/TinyMCEWrapper.vue +3 -2
  23. package/components/utils/assets/tinymce/content/global.scss +14 -0
  24. package/components/utils/glossary/CourseGlossary.vue +52 -27
  25. package/helpers/tinymce/WindwardPlugins.ts +59 -10
  26. package/i18n/en-US/components/content/blocks/generate_questions.ts +2 -1
  27. package/i18n/en-US/components/content/blocks/video.ts +2 -51
  28. package/i18n/en-US/components/settings/accordion.ts +1 -0
  29. package/i18n/en-US/components/settings/tab.ts +1 -0
  30. package/i18n/en-US/components/settings/user_upload.ts +1 -0
  31. package/i18n/en-US/components/settings/video.ts +51 -0
  32. package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +9 -1
  33. package/i18n/es-ES/components/content/blocks/generate_questions.ts +2 -1
  34. package/i18n/es-ES/components/content/blocks/video.ts +3 -53
  35. package/i18n/es-ES/components/settings/accordion.ts +1 -0
  36. package/i18n/es-ES/components/settings/tab.ts +2 -0
  37. package/i18n/es-ES/components/settings/user_upload.ts +1 -0
  38. package/i18n/es-ES/components/settings/video.ts +53 -0
  39. package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +9 -0
  40. package/i18n/sv-SE/components/content/blocks/generate_questions.ts +2 -1
  41. package/i18n/sv-SE/components/content/blocks/video.ts +2 -51
  42. package/i18n/sv-SE/components/settings/accordion.ts +2 -0
  43. package/i18n/sv-SE/components/settings/tab.ts +1 -0
  44. package/i18n/sv-SE/components/settings/user_upload.ts +1 -0
  45. package/i18n/sv-SE/components/settings/video.ts +51 -0
  46. package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +8 -0
  47. package/package.json +2 -1
  48. package/plugin.js +1 -1
  49. package/.idea/codeStyles/Project.xml +0 -58
  50. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  51. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  52. package/.idea/modules.xml +0 -8
  53. package/.idea/php-docker-settings.xml +0 -24
  54. package/.idea/php.xml +0 -19
  55. package/.idea/vcs.xml +0 -6
  56. package/.idea/watcherTasks.xml +0 -4
  57. package/.idea/windward-ui-plugin-core.iml +0 -8
  58. package/config/menu.config.json +0 -475
  59. package/coverage/clover.xml +0 -223
  60. package/coverage/coverage-final.json +0 -16
  61. package/coverage/lcov-report/base.css +0 -224
  62. package/coverage/lcov-report/block-navigation.js +0 -87
  63. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
  64. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
  65. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
  66. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
  67. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
  68. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
  69. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
  70. package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
  71. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
  72. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
  73. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
  74. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
  75. package/coverage/lcov-report/components/utils/index.html +0 -161
  76. package/coverage/lcov-report/config/index.html +0 -116
  77. package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
  78. package/coverage/lcov-report/favicon.png +0 -0
  79. package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
  80. package/coverage/lcov-report/helpers/index.html +0 -116
  81. package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
  82. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
  83. package/coverage/lcov-report/index.html +0 -191
  84. package/coverage/lcov-report/prettify.css +0 -1
  85. package/coverage/lcov-report/prettify.js +0 -2
  86. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  87. package/coverage/lcov-report/sorter.js +0 -196
  88. package/coverage/lcov-report/test/index.html +0 -116
  89. package/coverage/lcov-report/test/mocks.js.html +0 -457
  90. package/coverage/lcov.info +0 -403
  91. package/lib/helpers/GlossaryHelper.d.ts +0 -9
  92. package/lib/helpers/GlossaryHelper.js +0 -118
  93. package/lib/helpers/GlossaryTerm.d.ts +0 -10
  94. package/lib/helpers/GlossaryTerm.js +0 -22
  95. package/lib/helpers/MathHelper.d.ts +0 -99
  96. package/lib/helpers/MathHelper.js +0 -194
  97. package/lib/helpers/tinymce/plugin.d.ts +0 -2
  98. package/lib/helpers/tinymce/plugin.js +0 -86
  99. package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
  100. package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
  101. package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
  102. package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
  103. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
  104. package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
  105. package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
  106. package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
  107. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
  108. package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
  109. package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
  110. package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
  111. package/lib/i18n/en-US/components/content/index.d.ts +0 -77
  112. package/lib/i18n/en-US/components/content/index.js +0 -6
  113. package/lib/i18n/en-US/components/index.d.ts +0 -140
  114. package/lib/i18n/en-US/components/index.js +0 -12
  115. package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
  116. package/lib/i18n/en-US/components/navigation/image.js +0 -6
  117. package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
  118. package/lib/i18n/en-US/components/navigation/index.js +0 -8
  119. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
  120. package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
  121. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
  122. package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
  123. package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
  124. package/lib/i18n/en-US/components/settings/image.js +0 -3
  125. package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
  126. package/lib/i18n/en-US/components/settings/index.js +0 -14
  127. package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
  128. package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
  129. package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
  130. package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
  131. package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
  132. package/lib/i18n/en-US/components/settings/video.js +0 -14
  133. package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
  134. package/lib/i18n/en-US/components/utils/index.js +0 -6
  135. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
  136. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
  137. package/lib/i18n/en-US/index.d.ts +0 -197
  138. package/lib/i18n/en-US/index.js +0 -16
  139. package/lib/i18n/en-US/modules/index.d.ts +0 -2
  140. package/lib/i18n/en-US/modules/index.js +0 -6
  141. package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
  142. package/lib/i18n/en-US/pages/glossary.js +0 -9
  143. package/lib/i18n/en-US/pages/index.d.ts +0 -13
  144. package/lib/i18n/en-US/pages/index.js +0 -8
  145. package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
  146. package/lib/i18n/en-US/pages/user_upload.js +0 -5
  147. package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
  148. package/lib/i18n/en-US/shared/content_blocks.js +0 -21
  149. package/lib/i18n/en-US/shared/index.d.ts +0 -39
  150. package/lib/i18n/en-US/shared/index.js +0 -10
  151. package/lib/i18n/en-US/shared/menu.d.ts +0 -4
  152. package/lib/i18n/en-US/shared/menu.js +0 -5
  153. package/lib/i18n/en-US/shared/settings.d.ts +0 -15
  154. package/lib/i18n/en-US/shared/settings.js +0 -16
  155. package/lib/i18n/en-US.d.ts +0 -197
  156. package/lib/i18n/en-US.js +0 -15
  157. package/lib/models/UserFileAsset.d.ts +0 -5
  158. package/lib/models/UserFileAsset.js +0 -37
@@ -93,7 +93,18 @@
93
93
  </td>
94
94
  <td>{{ item.related_term }}</td>
95
95
 
96
- <td>
96
+ <td
97
+ v-if="
98
+ $PermissionService.userHasAccessTo(
99
+ 'windward.global.course,windward.organization.contentBlock,windward.organization.course.contentBlock',
100
+ 'writable'
101
+ ) &&
102
+ $PermissionService.userHasAccessTo(
103
+ 'windward.organization.current,windward.organization.section,windward.organization.course',
104
+ 'deletable'
105
+ )
106
+ "
107
+ >
97
108
  <SpeedDial
98
109
  direction="left"
99
110
  transition="slide-x-reverse-transition"
@@ -162,7 +173,30 @@ export default {
162
173
 
163
174
  data() {
164
175
  return {
165
- headers: [
176
+ dialog: false,
177
+ editMode: false,
178
+ glossaryTerms: [],
179
+ selectedTerm: {},
180
+ search: '',
181
+ tableKey: Crypto.id(),
182
+ defaultTerm: {
183
+ term: '',
184
+ definition: '',
185
+ alternate_forms: '',
186
+ related_term: '',
187
+ },
188
+ }
189
+ },
190
+
191
+ computed: {
192
+ ...mapGetters({
193
+ course: 'course/get',
194
+ }),
195
+ ...mapMutations({
196
+ saveCourse: 'course/set',
197
+ }),
198
+ headers() {
199
+ const headers = [
166
200
  {
167
201
  text: this.$t('windward.core.pages.glossary.term'),
168
202
  align: 'start',
@@ -189,34 +223,25 @@ export default {
189
223
  sortable: true,
190
224
  value: 'related_term',
191
225
  },
192
- {
226
+ ]
227
+ if (
228
+ this.$PermissionService.userHasAccessTo(
229
+ 'windward.global.course,windward.organization.contentBlock,windward.organization.course.contentBlock',
230
+ 'writable'
231
+ ) &&
232
+ this.$PermissionService.userHasAccessTo(
233
+ 'windward.organization.current,windward.organization.section,windward.organization.course',
234
+ 'deletable'
235
+ )
236
+ ) {
237
+ headers.push({
193
238
  text: this.$t('shared.forms.actions'),
194
239
  value: 'actions',
195
240
  sortable: false,
196
- },
197
- ],
198
- dialog: false,
199
- editMode: false,
200
- glossaryTerms: [],
201
- selectedTerm: {},
202
- search: '',
203
- tableKey: Crypto.id(),
204
- defaultTerm: {
205
- term: '',
206
- definition: '',
207
- alternate_forms: '',
208
- related_term: '',
209
- },
210
- }
211
- },
212
-
213
- computed: {
214
- ...mapGetters({
215
- course: 'course/get',
216
- }),
217
- ...mapMutations({
218
- saveCourse: 'course/set',
219
- }),
241
+ })
242
+ }
243
+ return headers
244
+ },
220
245
  },
221
246
 
222
247
  beforeMount() {
@@ -1,4 +1,6 @@
1
-
1
+ import { Scanner } from 'accessibility-scanner'
2
+ import local from '../../i18n/index'
3
+ import _ from 'lodash'
2
4
 
3
5
  /**
4
6
  * Class representing the WindwardPlugins.
@@ -9,6 +11,7 @@ export class WindwardPlugins {
9
11
  fillInBlank: any
10
12
  private window: any;
11
13
 
14
+
12
15
  constructor(editor: any) {
13
16
 
14
17
  this.editor = editor
@@ -18,6 +21,15 @@ export class WindwardPlugins {
18
21
  this.register()
19
22
  }
20
23
 
24
+ public $t(key: string, replacements: string[]=[]): string {
25
+ const lang = local.messages[navigator.languages[0]]; // Get the browser language
26
+ let str = _.get(lang, key); // Get the message string using lodash's get function
27
+
28
+ str = str.replace(/{(\d+)}/g, (match, number) => replacements[number] ?? match);
29
+
30
+ return str;
31
+ }
32
+
21
33
 
22
34
  /**
23
35
  * registers an icon with the given icon name and SVG path.
@@ -37,8 +49,8 @@ export class WindwardPlugins {
37
49
  * Adds icons to the editor's UI registry.
38
50
  */
39
51
  private addIcons() {
40
- this.registerIcon('insertMath', '<svg x="0px" y="0px"width="20px" height="20px" viewBox="0 0 445.878 445.878" style="enable-background:new 0 0 445.878 445.878;"><path d="M426.024,86.447H209.705l-84.911,298.911c-2.568,7.967-9.854,13.482-18.22,13.771c-0.236,0-0.464,0.006-0.688,0.006 c-8.092,0-15.41-4.924-18.436-12.478l-34.714-86.782H19.851C8.884,299.876,0,290.986,0,280.022 c0-10.965,8.893-19.854,19.851-19.854H66.18c8.109,0,15.421,4.941,18.436,12.483l19.237,48.09l72.472-260.218 c2.639-8.213,10.279-13.781,18.903-13.781h230.798c10.97,0,19.854,8.89,19.854,19.851S436.988,86.447,426.024,86.447z M436.723,353.227l-78.259-87.904l74.576-82.783c1.318-1.454,1.638-3.547,0.857-5.341c-0.804-1.791-2.577-2.946-4.54-2.946h-47.18 c-1.442,0-2.802,0.629-3.759,1.72l-50.059,58.047l-49.674-58.029c-0.939-1.103-2.317-1.738-3.771-1.738h-49.334 c-1.956,0-3.729,1.149-4.521,2.929c-0.81,1.785 0.479,3.875,0.824,5.332l73.743,82.81l-77.641,87.923 c-1.297,1.465-1.605,3.552 0.813,5.325c0.813,1.785,2.586,2.92,4.528,2.92h48.9c1.472,0,2.867-0.65,3.807-1.785l51.819-62.181 l53.05,62.229c0.951,1.11,2.328,1.743,3.782,1.743h49.97c1.962,0,3.735-1.141,4.527-2.926 C438.354,356.779,438.035,354.692,436.723,353.227z"/></svg>');
41
- this.registerIcon('insertFIB', '<svg width="20px" height="20px" viewBox="0 0 24 24"><path d="M17,7H22V17H17V19A1,1 0 0,0 18,20H20V22H17.5C16.95,22 16,21.55 16,21C16,21.55 15.05,22 14.5,22H12V20H14A1,1 0 0,0 15,19V5A1,1 0 0,0 14,4H12V2H14.5C15.05,2 16,2.45 16,3C16,2.45 16.95,2 17.5,2H20V4H18A1,1 0 0,0 17,5V7M2,7H13V9H4V15H13V17H2V7M20,15V9H17V15H20Z" /></svg>');
52
+ this.registerIcon('mathIcon', '<svg x="0px" y="0px"width="20px" height="20px" viewBox="0 0 445.878 445.878" style="enable-background:new 0 0 445.878 445.878;"><path d="M426.024,86.447H209.705l-84.911,298.911c-2.568,7.967-9.854,13.482-18.22,13.771c-0.236,0-0.464,0.006-0.688,0.006 c-8.092,0-15.41-4.924-18.436-12.478l-34.714-86.782H19.851C8.884,299.876,0,290.986,0,280.022 c0-10.965,8.893-19.854,19.851-19.854H66.18c8.109,0,15.421,4.941,18.436,12.483l19.237,48.09l72.472-260.218 c2.639-8.213,10.279-13.781,18.903-13.781h230.798c10.97,0,19.854,8.89,19.854,19.851S436.988,86.447,426.024,86.447z M436.723,353.227l-78.259-87.904l74.576-82.783c1.318-1.454,1.638-3.547,0.857-5.341c-0.804-1.791-2.577-2.946-4.54-2.946h-47.18 c-1.442,0-2.802,0.629-3.759,1.72l-50.059,58.047l-49.674-58.029c-0.939-1.103-2.317-1.738-3.771-1.738h-49.334 c-1.956,0-3.729,1.149-4.521,2.929c-0.81,1.785 0.479,3.875,0.824,5.332l73.743,82.81l-77.641,87.923 c-1.297,1.465-1.605,3.552 0.813,5.325c0.813,1.785,2.586,2.92,4.528,2.92h48.9c1.472,0,2.867-0.65,3.807-1.785l51.819-62.181 l53.05,62.229c0.951,1.11,2.328,1.743,3.782,1.743h49.97c1.962,0,3.735-1.141,4.527-2.926 C438.354,356.779,438.035,354.692,436.723,353.227z"/></svg>');
53
+ this.registerIcon('fibIcon', '<svg width="20px" height="20px" viewBox="0 0 24 24"><path d="M17,7H22V17H17V19A1,1 0 0,0 18,20H20V22H17.5C16.95,22 16,21.55 16,21C16,21.55 15.05,22 14.5,22H12V20H14A1,1 0 0,0 15,19V5A1,1 0 0,0 14,4H12V2H14.5C15.05,2 16,2.45 16,3C16,2.45 16.95,2 17.5,2H20V4H18A1,1 0 0,0 17,5V7M2,7H13V9H4V15H13V17H2V7M20,15V9H17V15H20Z" /></svg>');
42
54
  this.registerIcon('glossaryIcon', '<svg viewBox="0 0 24 24" width="20px" height="20px" ><path d="M3,15H1V3A2,2 0 0,1 3,1H19V3H3V15M12,23A1,1 0 0,1 11,22V19H7A2,2 0 0,1 5,17V7A2,2 0 0,1 7,5H21A2,2 0 0,1 23,7V17A2,2 0 0,1 21,19H16.9L13.2,22.71C13,22.89 12.76,23 12.5,23H12M9,9V11H19V9H9M9,13V15H17V13H9Z"></path></svg>');
43
55
  }
44
56
  /**
@@ -98,7 +110,8 @@ export class WindwardPlugins {
98
110
 
99
111
  this.addButtonToEditor(
100
112
  "mathButton",
101
- "insertMath",
113
+ "mathIcon",
114
+ this.$t('windward.core.components.utils.tiny_mce_wrapper.math'),
102
115
  () => {
103
116
  this.editor.execCommand("equation-window", true);
104
117
  }
@@ -106,24 +119,36 @@ export class WindwardPlugins {
106
119
  this.addButtonToEditor(
107
120
  "glossaryButton",
108
121
  "glossaryIcon",
122
+ this.$t('windward.core.components.utils.tiny_mce_wrapper.glossary'),
109
123
  () => {
110
124
  this.editor.formatter.apply("glossary");
111
125
  }
112
126
  );
113
127
  this.addButtonToEditor(
114
128
  "fibInsertButton",
115
- "insertFIB",
129
+ "fibIcon",
130
+ this.$t('windward.core.components.utils.tiny_mce_wrapper.fill_blank'),
116
131
  () => {
117
132
  this.editor.execCommand("fib-window", true);
118
133
  }
119
134
  );
120
135
  this.addButtonToEditor(
121
136
  "fibFormatButton",
122
- "insertFIB",
137
+ "fibIcon",
138
+ this.$t('windward.core.components.utils.tiny_mce_wrapper.fill_blank'),
123
139
  () => {
124
140
  this.editor.formatter.apply("fib");
125
141
  }
126
142
  );
143
+
144
+ this.addButtonToEditor(
145
+ "a11yButton",
146
+ "accessibility-check",
147
+ this.$t('windward.core.components.utils.tiny_mce_wrapper.accessibility'),
148
+ () => {
149
+ this.setAccessibilityIssues(this.editor)
150
+ }
151
+ );
127
152
  }
128
153
 
129
154
  /**
@@ -132,9 +157,10 @@ export class WindwardPlugins {
132
157
  * @param {string} icon Icon name of the button
133
158
  * @param {() => void} onAction Callback function for the action to be done when the button is clicked
134
159
  */
135
- private addButtonToEditor(name: string, icon: string, onAction: () => void) {
160
+ private addButtonToEditor(name: string, icon: string, tooltip: string, onAction: () => void) {
136
161
  this.editor.ui.registry.addButton(name, {
137
162
  icon: icon,
163
+ tooltip: tooltip,
138
164
  onAction: onAction
139
165
  });
140
166
  }
@@ -162,8 +188,8 @@ export class WindwardPlugins {
162
188
  * @returns {void}
163
189
  */
164
190
  private addMenuItems() {
165
- this.addEditorMenuItem('math', 'Math', 'equation-window','insertMath');
166
- this.addEditorMenuItem('FIB', 'Fill in the blank', 'fib-window','insertFIB');
191
+ this.addEditorMenuItem('math', 'Math', 'equation-window','mathIcon');
192
+ this.addEditorMenuItem('FIB', 'Fill in the blank', 'fib-window','fibIcon');
167
193
  }
168
194
 
169
195
  /**
@@ -190,6 +216,7 @@ export class WindwardPlugins {
190
216
  this.editor.on('SetContent', () => {
191
217
  this.setOnDoubleClickEquationContent(this.editor)
192
218
  this.setOnClickFillInBlank(this.editor)
219
+
193
220
  })
194
221
  }
195
222
 
@@ -239,7 +266,7 @@ export class WindwardPlugins {
239
266
  this.editor.addCommand('fib-window', (data: any) => {
240
267
  return this.editor.windowManager.openUrl({
241
268
  url: '/plugins/tinymce/FIB',
242
- title: 'Fill in the blank',
269
+ title: this.$t('windward.core.components.utils.tiny_mce_wrapper.fill_blank'),
243
270
  buttons: [
244
271
  {
245
272
  type: 'cancel',
@@ -316,6 +343,28 @@ export class WindwardPlugins {
316
343
  }
317
344
  }
318
345
 
346
+
347
+ setAccessibilityIssues(editor: any) {
348
+ const tinymceDoc = editor.getDoc();
349
+ tinymceDoc.querySelectorAll("p.a11y-error").forEach(el => el.remove());
350
+ tinymceDoc.querySelectorAll(".a11y-error--highlight").forEach(el => el.classList.remove("a11y-error--highlight"));
351
+ const scanner = Scanner.fromHtmlText(editor.getContent());
352
+ const report = scanner.runScan();
353
+ report.forEach((lineItem: any) => {
354
+ lineItem.issues.forEach((item) => {
355
+ let elements = Array.prototype
356
+ .slice.call(tinymceDoc.getElementsByTagName(item.tagName));
357
+ elements = elements.filter((res) => res.outerHTML === item.outerHTML) //only get the element that are on report
358
+ elements.forEach(element => {
359
+ element.classList.add("a11y-error--highlight");
360
+ element.outerHTML = element.outerHTML + "<p class=\"a11y-error\" ><em>" + this.$t("windward.core.components.utils.tiny_mce_wrapper." + lineItem.key) +" "+ this.$t("windward.core.components.utils.tiny_mce_wrapper.wcag_guidelines",[lineItem.success_criterion]) +".</em></p>";
361
+
362
+ });
363
+ });
364
+ });
365
+ }
366
+
367
+
319
368
  /**
320
369
  * Registers the application, initializing necessary components and setting up the user interface.
321
370
  *
@@ -1,3 +1,4 @@
1
1
  export default {
2
- error: "Could not generate question from provided content."
2
+ error: "Could not generate question from provided content.",
3
+ button_label: 'Generate Question'
3
4
  }
@@ -1,53 +1,4 @@
1
1
  export default {
2
- tabs: {
3
- video: 'Video',
4
- poster: 'Poster',
5
- preroll: 'Preroll',
6
- postroll: 'Postroll',
7
- },
8
- forms: {
9
- unsaved: 'You have unsaved changes. Would you like to save them?',
10
- cancel: 'Cancel',
11
- confirm: 'Confirm',
12
- },
13
- video: {
14
- title: 'Video File',
15
- configure_blurb:
16
- 'Upload a video file (.mp4 or .webm), pick one from the file manager, or add via the public URL',
17
- not_configured_title: 'Video not configured',
18
- edit_prompt: 'Edit this block to get started',
19
- autoplay: 'Autoplay on load',
20
- controls: 'Show Controls',
21
- loop: 'Loop video',
22
- muted: 'Start muted',
23
- disablepictureinpicture: 'Disable picture-in-picture button',
24
- poster: 'Video poster',
25
- playback_rates: 'Playback Rates',
26
- rewind: 'Allow 10 Second Rewind',
27
- playsinline: 'Disable fullscreen and force inline viewing',
28
- captionsmenu: 'Show the interactive captions menu',
29
- playlistmenu:
30
- 'Show playlist menu (Requires more than 1 video selected to show)',
31
- playlistautoadvance: 'Auto-advance the playlist on media end',
32
- },
33
- caption: {
34
- title: 'Captions File',
35
- configure_blurb:
36
- 'Upload a captions file (.vtt or .xml), pick one from the file manager, or add via the public URL',
37
- },
38
- poster: {
39
- title: 'Poster Image File',
40
- configure_blurb:
41
- 'Upload a poster file (.png or .jpg), pick one from the file manager, or add via the public URL. This is the image that appears before the video is played.',
42
- },
43
- preroll: {
44
- title: 'Preroll Video File',
45
- configure_blurb:
46
- 'Upload a preroll video file (.mp4 or .webm), pick one from the file manager, or add via the public URL',
47
- },
48
- postroll: {
49
- title: 'Postroll Video File',
50
- configure_blurb:
51
- 'Upload a postroll video file (.mp4 or .webm), pick one from the file manager, or add via the public URL',
52
- },
2
+ not_configured_title: 'Video not configured',
3
+ edit_prompt: 'Edit this block to get started',
53
4
  }
@@ -3,4 +3,5 @@ export default {
3
3
  add: 'Add Accordion Item',
4
4
  accordion: 'Accordion',
5
5
  label: 'Accordion body text',
6
+ instructions: 'Click on each of the headings below for more information.',
6
7
  }
@@ -4,4 +4,5 @@ export default {
4
4
  header: 'Tab Header',
5
5
  add_tab: 'Add Tab',
6
6
  delete_tab: 'Delete Tab',
7
+ instructions: 'Click on each of the headings below for more information.'
7
8
  }
@@ -8,4 +8,5 @@ export default {
8
8
  all_excel: 'Spreadsheets - .xls and .xlsx',
9
9
  all_zip: 'Compressed - .zip',
10
10
  },
11
+ instructions: 'Drag or click here to upload files.',
11
12
  }
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  title: 'Video Title',
3
3
  sources: 'Sources',
4
+ place_source: 'Place Video or Audio',
4
5
  playback: 'Playback',
5
6
  no_sources: 'No Sources Configured',
6
7
  default_filename: 'Video',
@@ -10,4 +11,54 @@ export default {
10
11
  'Select a source before naming this playlist item',
11
12
  playlist_add: 'Add a playlist item',
12
13
  playlist_remove: 'Remove this playlist item',
14
+ inherit_captions: 'Inherit global captions',
15
+ inherit_global_toggle_description:
16
+ 'When enabled, the selected media will use captions linked on the file, managed in the file manager. When disabled, the selected media will have its own unique captions that is not shared globally on the file.',
17
+ inherit_missing_captions:
18
+ 'No global captions are available for this source. Please set them in the file settings',
19
+ video: {
20
+ title: 'Video File',
21
+ configure_blurb:
22
+ 'Upload a video file (.mp4 or .webm), pick one from the file manager, or add via the public URL',
23
+ autoplay: 'Autoplay on load',
24
+ controls: 'Show Controls',
25
+ loop: 'Loop video',
26
+ muted: 'Start muted',
27
+ disablepictureinpicture: 'Disable picture-in-picture button',
28
+ poster: 'Video poster',
29
+ playback_rates: 'Playback Rates',
30
+ rewind: 'Allow 10 Second Rewind',
31
+ playsinline: 'Disable fullscreen and force inline viewing',
32
+ captionsmenu: 'Show the interactive captions menu',
33
+ playlistmenu:
34
+ 'Show playlist menu (Requires more than 1 video selected to show)',
35
+ playlistautoadvance: 'Auto-advance the playlist on media end',
36
+ },
37
+ tabs: {
38
+ source: 'Source',
39
+ video: 'Video',
40
+ poster: 'Poster',
41
+ preroll: 'Preroll',
42
+ postroll: 'Postroll',
43
+ },
44
+ caption: {
45
+ title: 'Captions File',
46
+ configure_blurb:
47
+ 'Upload a captions file (.vtt or .xml), pick one from the file manager, or add via the public URL',
48
+ },
49
+ poster: {
50
+ title: 'Poster Image File',
51
+ configure_blurb:
52
+ 'Upload a poster file (.png or .jpg), pick one from the file manager, or add via the public URL. This is the image that appears before the video is played.',
53
+ },
54
+ preroll: {
55
+ title: 'Preroll Video File',
56
+ configure_blurb:
57
+ 'Upload a preroll video file (.mp4 or .webm), pick one from the file manager, or add via the public URL',
58
+ },
59
+ postroll: {
60
+ title: 'Postroll Video File',
61
+ configure_blurb:
62
+ 'Upload a postroll video file (.mp4 or .webm), pick one from the file manager, or add via the public URL',
63
+ },
13
64
  }
@@ -1,4 +1,5 @@
1
1
  export default {
2
+ accessibility: 'Accessibility',
2
3
  glossary: 'Glossary',
3
4
  term: 'Glossary Term',
4
5
  alternate_forms: 'Alternate Forms',
@@ -16,6 +17,13 @@ export default {
16
17
  t_chart: 'T Chart',
17
18
  subject_report: 'Subject Report',
18
19
  },
20
+ math: 'Math',
19
21
  minimize: 'Minimize',
20
- read_text_aloud: 'Read Text aloud'
22
+ read_text_aloud: 'Read Text aloud',
23
+ heading_order_incorrect:
24
+ 'Headings must be applied in sequential order: H2 should be followed by H3, H4, and so on',
25
+ wcag_guidelines: '(WCAG {0} guidelines)',
26
+ link_href_missing: 'a (anchor) element must contain an href attribute.',
27
+ link_text_missing:
28
+ 'a (anchor) element must contain text. The text may occur in the anchor text or in the title attribute of the anchor or in the Alt text of an image used within the anchor',
21
29
  }
@@ -1,3 +1,4 @@
1
1
  export default {
2
- error: "No se pudo generar una pregunta a partir del contenido proporcionado."
2
+ error: "No se pudo generar una pregunta a partir del contenido proporcionado.",
3
+ button_label: 'Generar pregunta'
3
4
  }
@@ -1,55 +1,5 @@
1
1
  export default {
2
- tabs: {
3
- video: 'Vídeo',
4
- poster: 'Póster',
5
- preroll: 'Preroll',
6
- postroll: 'Desplazamiento posterior',
7
- },
8
- forms: {
9
- unsaved: 'Tiene cambios sin guardar. ¿Te gustaría salvarlos?',
10
- cancel: 'Cancelar',
11
- confirm: 'Confirmar',
12
- },
13
- video: {
14
- title: 'Archivo de vídeo',
15
- configure_blurb:
16
- 'Cargue un archivo de video (.mp4 o .webm), elija uno del administrador de archivos o agréguelo a través de la URL pública',
17
- not_configured_title: 'Video no configurado',
18
- edit_prompt: 'Editar este bloque para empezar',
19
- autoplay: 'Reproducción automática al cargar',
20
- controls: 'Mostrar controles',
21
- loop: 'Vídeo en bucle',
22
- muted: 'Empezar silenciado',
23
- disablepictureinpicture: 'Desactivar botón de imagen en imagen',
24
- poster: 'Póster de vídeo',
25
- playback_rates: 'Tasas de reproducción',
26
- rewind: 'Permitir rebobinado de 10 segundos',
27
- playsinline:
28
- 'Deshabilitar pantalla completa y forzar visualización en línea',
29
- captionsmenu: 'Mostrar el interactivo menú de subtítulos',
30
- playlistmenu:
31
- 'Mostrar menú de lista de reproducción (requiere más de 1 video seleccionado para mostrar)',
32
- playlistautoadvance:
33
- 'Avanzar automáticamente la lista de reproducción al final de los medios',
34
- },
35
- caption: {
36
- title: 'Archivo de subtítulos',
37
- configure_blurb:
38
- 'Cargue un archivo de subtítulos (.vtt o .xml), elija uno del administrador de archivos o agréguelo a través de la URL pública',
39
- },
40
- poster: {
41
- title: 'Archivo de imagen de póster',
42
- configure_blurb:
43
- 'Cargue un archivo de póster (.png o .jpg), elija uno del administrador de archivos o agréguelo a través de la URL pública. Esta es la imagen que aparece antes de reproducir el video.',
44
- },
45
- preroll: {
46
- title: 'Archivo de vídeo predesplazamiento',
47
- configure_blurb:
48
- 'Cargue un archivo de video pre-roll (.mp4 o .webm), elija uno del administrador de archivos o agréguelo a través de la URL pública',
49
- },
50
- postroll: {
51
- title: 'Archivo de vídeo Post-roll',
52
- configure_blurb:
53
- 'Cargue un archivo de video post-roll (.mp4 o .webm), elija uno del administrador de archivos o agréguelo a través de la URL pública',
54
- },
2
+ not_configured_title: 'Video no configurado',
3
+ edit_prompt:
4
+ "Para comenzar a manipular el bloque,haga clic en el botón 'Editar'.",
55
5
  }
@@ -3,4 +3,5 @@ export default {
3
3
  add: 'Añadir acordeón',
4
4
  accordion: 'Acordeón',
5
5
  label: 'Texto del cuerpo del acordeón',
6
+ instructions: 'Haga clic en cada uno de los títulos a continuación para obtener más información.',
6
7
  }
@@ -4,4 +4,6 @@ export default {
4
4
  header: 'Encabezado de Pestaña',
5
5
  add_tab: 'Añadir pestaña',
6
6
  delete_tab: 'Borrar pestaña',
7
+ instructions:
8
+ 'Haga clic en cada uno de los títulos a continuación para obtener más información.',
7
9
  }
@@ -8,4 +8,5 @@ export default {
8
8
  all_excel: 'Hojas de cálculo - .xls y .xlsx',
9
9
  all_zip: 'Comprimido - .zip',
10
10
  },
11
+ instructions: 'Arrastre o haga clic aquí para cargar archivos.',
11
12
  }
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  title: 'Título del vídeo',
3
3
  sources: 'Fuentes',
4
+ place_source: 'Colocar video o audio',
4
5
  playback: 'Reproducción',
5
6
  no_sources: 'No hay fuentes configuradas',
6
7
  default_filename: 'Vídeo',
@@ -10,4 +11,56 @@ export default {
10
11
  'Seleccione una fuente antes de nombrar este elemento de la lista de reproducción',
11
12
  playlist_add: 'Añadir una lista de reproducción artículo',
12
13
  playlist_remove: 'Eliminar este elemento de la lista de reproducción',
14
+ inherit_captions: 'Ärv global bildtext',
15
+ inherit_global_toggle_description:
16
+ 'Cuando está habilitado, el contenido multimedia seleccionado utilizará subtítulos vinculados al archivo, administrados en el administrador de archivos. Cuando está deshabilitado, el contenido multimedia seleccionado tendrá sus propios subtítulos exclusivos que no se comparten globalmente en el archivo.',
17
+ inherit_missing_captions:
18
+ 'No hay subtítulos globales disponibles para esta fuente. Establézcalos en la configuración del archivo',
19
+ video: {
20
+ title: 'Archivo de vídeo',
21
+ configure_blurb:
22
+ 'Cargue un archivo de video (.mp4 o .webm), elija uno del administrador de archivos o agréguelo a través de la URL pública',
23
+ autoplay: 'Reproducción automática al cargar',
24
+ controls: 'Mostrar controles',
25
+ loop: 'Vídeo en bucle',
26
+ muted: 'Empezar silenciado',
27
+ disablepictureinpicture: 'Desactivar botón de imagen en imagen',
28
+ poster: 'Póster de vídeo',
29
+ playback_rates: 'Tasas de reproducción',
30
+ rewind: 'Permitir rebobinado de 10 segundos',
31
+ playsinline:
32
+ 'Deshabilitar pantalla completa y forzar visualización en línea',
33
+ captionsmenu: 'Mostrar el interactivo menú de subtítulos',
34
+ playlistmenu:
35
+ 'Mostrar menú de lista de reproducción (requiere más de 1 video seleccionado para mostrar)',
36
+ playlistautoadvance:
37
+ 'Avanzar automáticamente la lista de reproducción al final de los medios',
38
+ },
39
+ tabs: {
40
+ source: 'Källa',
41
+ video: 'Vídeo',
42
+ poster: 'Póster',
43
+ preroll: 'Preroll',
44
+ postroll: 'Desplazamiento posterior',
45
+ },
46
+ caption: {
47
+ title: 'Archivo de subtítulos',
48
+ configure_blurb:
49
+ 'Cargue un archivo de subtítulos (.vtt o .xml), elija uno del administrador de archivos o agréguelo a través de la URL pública',
50
+ },
51
+ poster: {
52
+ title: 'Archivo de imagen de póster',
53
+ configure_blurb:
54
+ 'Cargue un archivo de póster (.png o .jpg), elija uno del administrador de archivos o agréguelo a través de la URL pública. Esta es la imagen que aparece antes de reproducir el video.',
55
+ },
56
+ preroll: {
57
+ title: 'Archivo de vídeo predesplazamiento',
58
+ configure_blurb:
59
+ 'Cargue un archivo de video pre-roll (.mp4 o .webm), elija uno del administrador de archivos o agréguelo a través de la URL pública',
60
+ },
61
+ postroll: {
62
+ title: 'Archivo de vídeo Post-roll',
63
+ configure_blurb:
64
+ 'Cargue un archivo de video post-roll (.mp4 o .webm), elija uno del administrador de archivos o agréguelo a través de la URL pública',
65
+ },
13
66
  }
@@ -1,4 +1,5 @@
1
1
  export default {
2
+ accessibility: 'Accesibilidad',
2
3
  glossary: 'Glosario',
3
4
  term: 'Término del glosario',
4
5
  alternate_forms: 'Formas alternativas',
@@ -16,6 +17,14 @@ export default {
16
17
  t_chart: 'Gráfico T',
17
18
  subject_report: 'Informe de asunto',
18
19
  },
20
+ math: 'Matemáticas',
19
21
  minimize: 'Minimizar',
20
22
  read_text_aloud: 'Leer texto',
23
+ heading_order_incorrect:
24
+ 'Los títulos deben aplicarse en orden secuencial: H2 debe ir seguido de H3, H4, etc.',
25
+ wcag_guidelines: '(Directrices WCAG {0})',
26
+ link_href_missing:
27
+ 'El Elemento HTML Anchor <a> debe contener un atributo href',
28
+ link_text_missing:
29
+ 'El Elemento HTML Anchor <a> debe contener texto. ',
21
30
  }
@@ -1,3 +1,4 @@
1
1
  export default {
2
- error: "Kunde inte generera en fråga från det tillhandahållna innehållet."
2
+ error: "Kunde inte generera en fråga från det tillhandahållna innehållet.",
3
+ button_label: 'Generera fråga'
3
4
  }