@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.
- package/CHANGELOG.md +8 -1
- package/components/Content/Blocks/Accordion.vue +14 -0
- package/components/Content/Blocks/ClickableIcons.vue +9 -2
- package/components/Content/Blocks/Email.vue +11 -2
- package/components/Content/Blocks/GenerateAIQuestionButton.vue +14 -6
- package/components/Content/Blocks/HorizontalRule.vue +1 -4
- package/components/Content/Blocks/ScenarioChoice.vue +57 -32
- package/components/Content/Blocks/Tab.vue +5 -0
- package/components/Content/Blocks/UserUpload.vue +1 -8
- package/components/Content/Blocks/Video.vue +96 -8
- package/components/Settings/AccordionSettings.vue +61 -8
- package/components/Settings/BlockQuoteSettings.vue +20 -12
- package/components/Settings/ClickableIconsSettings.vue +48 -12
- package/components/Settings/EmailSettings.vue +20 -12
- package/components/Settings/FileDownloadSettings.vue +22 -16
- package/components/Settings/HorizontalRuleSettings.vue +0 -3
- package/components/Settings/ScenarioChoiceSettings.vue +29 -14
- package/components/Settings/TabSettings.vue +121 -78
- package/components/Settings/UserUploadSettings.vue +30 -32
- package/components/Settings/VideoSettings/SourcePicker.vue +222 -0
- package/components/Settings/VideoSettings.vue +139 -183
- package/components/utils/TinyMCEWrapper.vue +3 -2
- package/components/utils/assets/tinymce/content/global.scss +14 -0
- package/components/utils/glossary/CourseGlossary.vue +52 -27
- 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/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/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/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/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/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 +2 -1
- package/plugin.js +1 -1
- 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
|
@@ -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
|
-
|
|
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
|
-
|
|
199
|
-
|
|
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('
|
|
41
|
-
this.registerIcon('
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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','
|
|
166
|
-
this.addEditorMenuItem('FIB', 'Fill in the blank', 'fib-window','
|
|
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: '
|
|
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,53 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
}
|
|
@@ -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,55 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
}
|
|
@@ -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
|
}
|