@windward/core 0.2.3 → 0.4.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/babel.config.js +1 -1
- package/components/Content/Blocks/Accordion.vue +37 -0
- package/components/Content/Blocks/ClickableIcons.vue +107 -20
- package/components/Content/Blocks/Email.vue +9 -0
- package/components/Content/Blocks/Image.vue +48 -20
- package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +1 -1
- package/components/Content/Blocks/Video.vue +80 -9
- package/components/Navigation/Items/AskTheExpert.vue +2 -1
- package/components/Navigation/Items/CourseGlossaryToolNav.vue +2 -1
- package/components/Settings/AccordionSettings.vue +64 -4
- package/components/Settings/BlockQuoteSettings.vue +9 -1
- package/components/Settings/ClickableIconsSettings.vue +104 -13
- package/components/Settings/EmailSettings.vue +13 -13
- package/components/Settings/FeedbackSettings.vue +2 -1
- package/components/Settings/HorizontalRuleSettings.vue +2 -1
- package/components/Settings/ImageSettings.vue +148 -39
- package/components/Settings/MathSettings.vue +6 -5
- package/components/Settings/OpenResponseCollateSettings.vue +5 -1
- package/components/Settings/OpenResponseSettings.vue +9 -4
- package/components/Settings/ScenarioChoiceSettings.vue +15 -4
- package/components/Settings/TabSettings.vue +12 -4
- package/components/Settings/TextEditorSettings.vue +14 -7
- package/components/Settings/UserUploadSettings.vue +11 -4
- package/components/Settings/VideoSettings.vue +121 -66
- package/components/utils/ContentViewer.vue +6 -1
- package/components/utils/MathExpressionEditor.vue +10 -5
- package/components/utils/TinyMCEWrapper.vue +120 -19
- package/components/utils/assets/tinymce/content/dark/content.scss +4 -0
- package/components/utils/assets/tinymce/{css/content.scss → content/global.scss} +38 -37
- package/components/utils/assets/tinymce/content/light/content.scss +4 -0
- package/components/utils/assets/tinymce/ui/dark/content.scss +803 -0
- package/components/utils/assets/tinymce/ui/dark/skin.scss +4727 -0
- package/components/utils/assets/tinymce/ui/global.scss +19 -0
- package/components/utils/assets/tinymce/ui/light/content.scss +822 -0
- package/components/utils/assets/tinymce/ui/light/skin.scss +4731 -0
- package/components/utils/glossary/CourseGlossary.vue +4 -3
- package/components/utils/glossary/CourseGlossaryForm.vue +1 -1
- package/config/tinymce.config.ts +22 -14
- package/helpers/FillInBlankHelper.ts +34 -28
- package/helpers/GlossaryHelper.ts +90 -73
- package/helpers/MathHelper.ts +49 -28
- package/helpers/tinymce/plugin.ts +9 -7
- package/i18n/en-US/components/content/blocks/image.ts +1 -1
- package/i18n/en-US/components/settings/clickable_icon.ts +2 -0
- package/i18n/en-US/components/settings/image.ts +6 -1
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/components/content/blocks/image.ts +1 -1
- package/i18n/es-ES/components/settings/clickable_icon.ts +2 -0
- package/i18n/es-ES/components/settings/image.ts +8 -1
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/image.ts +1 -1
- package/i18n/sv-SE/components/settings/clickable_icon.ts +2 -0
- package/i18n/sv-SE/components/settings/image.ts +6 -1
- package/i18n/sv-SE/shared/settings.ts +3 -0
- package/package.json +4 -3
- package/test/Components/Settings/AccordionSettings.spec.js +16 -2
- package/test/__mocks__/componentsMock.js +57 -97
- package/test/__mocks__/contentBlockMock.js +7 -1
- package/test/__mocks__/contentSettingsMock.js +8 -1
- package/test/__mocks__/helpersMock.js +9 -0
- package/test/__mocks__/modelMock.js +101 -31
- package/test/helpers/MathHelper.spec.js +22 -3
- package/tsconfig.json +1 -0
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php-docker-settings.xml +0 -24
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/windward-ui-plugin-core.iml +0 -8
- package/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
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
'windward.core.components.settings.user_upload.accept_multiple'
|
|
8
8
|
)
|
|
9
9
|
"
|
|
10
|
+
:disabled="render"
|
|
10
11
|
></v-switch>
|
|
11
12
|
<v-select
|
|
12
13
|
v-model="block.metadata.config.uploadSettings.accept"
|
|
@@ -19,8 +20,9 @@
|
|
|
19
20
|
:label="
|
|
20
21
|
$t('windward.core.components.settings.user_upload.accept_types')
|
|
21
22
|
"
|
|
23
|
+
:disabled="render"
|
|
22
24
|
></v-select>
|
|
23
|
-
<v-btn
|
|
25
|
+
<v-btn text class="mt-4" :disabled="render" @click="onToggleExpand()">
|
|
24
26
|
<v-icon v-if="!block.metadata.config.expand" color="primary"
|
|
25
27
|
>mdi-arrow-expand-all</v-icon
|
|
26
28
|
>
|
|
@@ -37,7 +39,10 @@
|
|
|
37
39
|
)
|
|
38
40
|
}}
|
|
39
41
|
</h4>
|
|
40
|
-
<TextEditor
|
|
42
|
+
<TextEditor
|
|
43
|
+
v-model="block.metadata.config.instructions"
|
|
44
|
+
:disabled="render"
|
|
45
|
+
/>
|
|
41
46
|
</v-col>
|
|
42
47
|
</v-row>
|
|
43
48
|
<v-skeleton-loader
|
|
@@ -48,7 +53,7 @@
|
|
|
48
53
|
</div>
|
|
49
54
|
</template>
|
|
50
55
|
<script>
|
|
51
|
-
import BaseContentSettings from '~/components/Content/
|
|
56
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
52
57
|
import Crypto from '~/helpers/Crypto'
|
|
53
58
|
import TextEditor from '~/components/Text/TextEditor'
|
|
54
59
|
import _ from 'lodash'
|
|
@@ -62,7 +67,9 @@ export default {
|
|
|
62
67
|
this.block = {}
|
|
63
68
|
}
|
|
64
69
|
if (_.isEmpty(this.block.body)) {
|
|
65
|
-
this.block.body = this.$t(
|
|
70
|
+
this.block.body = this.$t(
|
|
71
|
+
'windward.core.shared.content_blocks.title.user_upload'
|
|
72
|
+
)
|
|
66
73
|
}
|
|
67
74
|
if (_.isEmpty(this.block.metadata)) {
|
|
68
75
|
this.block.metadata = {}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
7
|
:label="$t('windward.core.components.settings.video.title')"
|
|
8
|
+
:disabled="render"
|
|
8
9
|
></v-text-field>
|
|
9
10
|
<h4 class="mb-3">
|
|
10
11
|
{{ $t('windward.core.components.settings.video.sources') }}
|
|
@@ -44,10 +45,12 @@
|
|
|
44
45
|
<v-tab-item class="mb-1">
|
|
45
46
|
<ContentBlockAsset
|
|
46
47
|
v-model="media.source"
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
:assets.sync="block.assets"
|
|
49
|
+
mimes="video/mp4,audio/mpeg,video/webm,video/youtube"
|
|
49
50
|
allow-url
|
|
50
51
|
class="mb-4"
|
|
52
|
+
:disabled="render"
|
|
53
|
+
@change="onSourceSelect"
|
|
51
54
|
>
|
|
52
55
|
<template #title>
|
|
53
56
|
{{
|
|
@@ -64,13 +67,14 @@
|
|
|
64
67
|
}}
|
|
65
68
|
</template>
|
|
66
69
|
</ContentBlockAsset>
|
|
67
|
-
|
|
68
70
|
<ContentBlockAsset
|
|
69
71
|
v-model="media.track"
|
|
72
|
+
:assets.sync="block.assets"
|
|
70
73
|
mimes="text/vtt,text/xml"
|
|
71
|
-
@click:file="onTrackSelect"
|
|
72
74
|
allow-url
|
|
73
75
|
class="mb-4"
|
|
76
|
+
:disabled="render"
|
|
77
|
+
@change="onTrackSelect"
|
|
74
78
|
>
|
|
75
79
|
<template #title>
|
|
76
80
|
{{
|
|
@@ -92,9 +96,11 @@
|
|
|
92
96
|
<v-tab-item class="mb-1">
|
|
93
97
|
<ContentBlockAsset
|
|
94
98
|
v-model="media.poster"
|
|
99
|
+
:assets.sync="block.assets"
|
|
95
100
|
mimes="image/png,image/jpeg"
|
|
96
|
-
@click:file="onPosterSelect"
|
|
97
101
|
allow-url
|
|
102
|
+
:disabled="render"
|
|
103
|
+
@change="onPosterSelect"
|
|
98
104
|
>
|
|
99
105
|
<template #title>
|
|
100
106
|
{{
|
|
@@ -116,10 +122,12 @@
|
|
|
116
122
|
<v-tab-item class="mb-1">
|
|
117
123
|
<ContentBlockAsset
|
|
118
124
|
v-model="media.ads.preroll.source"
|
|
125
|
+
:assets.sync="block.assets"
|
|
119
126
|
mimes="video/mp4,video/webm"
|
|
120
|
-
@click:file="onAdSourceSelect($event, 0)"
|
|
121
127
|
allow-url
|
|
122
128
|
class="mb-4"
|
|
129
|
+
:disabled="render"
|
|
130
|
+
@change="onAdSourceSelect($event, 0)"
|
|
123
131
|
>
|
|
124
132
|
<template #title>
|
|
125
133
|
{{
|
|
@@ -139,9 +147,11 @@
|
|
|
139
147
|
|
|
140
148
|
<ContentBlockAsset
|
|
141
149
|
v-model="media.ads.preroll.track"
|
|
150
|
+
:assets.sync="block.assets"
|
|
142
151
|
mimes="text/vtt,text/xml"
|
|
143
|
-
@click:file="onAdTrackSelect($event, 0)"
|
|
144
152
|
allow-url
|
|
153
|
+
:disabled="render"
|
|
154
|
+
@change="onAdTrackSelect($event, 0)"
|
|
145
155
|
>
|
|
146
156
|
<template #title>
|
|
147
157
|
{{
|
|
@@ -163,10 +173,12 @@
|
|
|
163
173
|
<v-tab-item class="mb-1">
|
|
164
174
|
<ContentBlockAsset
|
|
165
175
|
v-model="media.ads.postroll.source"
|
|
176
|
+
:assets.sync="block.assets"
|
|
166
177
|
mimes="video/mp4,video/webm"
|
|
167
|
-
@click:file="onAdSourceSelect($event, 100)"
|
|
168
178
|
allow-url
|
|
169
179
|
class="mb-4"
|
|
180
|
+
:disabled="render"
|
|
181
|
+
@change="onAdSourceSelect($event, 100)"
|
|
170
182
|
>
|
|
171
183
|
<template #title>
|
|
172
184
|
{{
|
|
@@ -186,9 +198,11 @@
|
|
|
186
198
|
|
|
187
199
|
<ContentBlockAsset
|
|
188
200
|
v-model="media.ads.postroll.track"
|
|
201
|
+
:assets.sync="block.assets"
|
|
189
202
|
mimes="text/vtt,text/xml"
|
|
190
|
-
@click:file="onAdTrackSelect($event, 100)"
|
|
191
203
|
allow-url
|
|
204
|
+
:disabled="render"
|
|
205
|
+
@change="onAdTrackSelect($event, 100)"
|
|
192
206
|
>
|
|
193
207
|
<template #title>
|
|
194
208
|
{{
|
|
@@ -239,6 +253,7 @@
|
|
|
239
253
|
)
|
|
240
254
|
"
|
|
241
255
|
:disabled="
|
|
256
|
+
render ||
|
|
242
257
|
!block.metadata.config.playlist[playlistIndex]
|
|
243
258
|
.sources ||
|
|
244
259
|
!block.metadata.config.playlist[playlistIndex]
|
|
@@ -260,6 +275,7 @@
|
|
|
260
275
|
text
|
|
261
276
|
color="error"
|
|
262
277
|
:disabled="
|
|
278
|
+
render ||
|
|
263
279
|
block.metadata.config.playlist.length <= 1
|
|
264
280
|
"
|
|
265
281
|
@click="onRemovePlaylistItem"
|
|
@@ -288,6 +304,7 @@
|
|
|
288
304
|
v-on="on"
|
|
289
305
|
color="primary"
|
|
290
306
|
text
|
|
307
|
+
:disabled="render"
|
|
291
308
|
@click="onAddPlaylistItem"
|
|
292
309
|
>
|
|
293
310
|
<v-icon>mdi-plus</v-icon>
|
|
@@ -319,6 +336,7 @@
|
|
|
319
336
|
<v-row>
|
|
320
337
|
<v-col cols="12">
|
|
321
338
|
<v-select
|
|
339
|
+
id="video-playback-rates"
|
|
322
340
|
v-model="
|
|
323
341
|
block.metadata.config.attributes
|
|
324
342
|
.playbackrates
|
|
@@ -330,6 +348,7 @@
|
|
|
330
348
|
)
|
|
331
349
|
"
|
|
332
350
|
multiple
|
|
351
|
+
:disabled="render"
|
|
333
352
|
@change="onPlaybackChange"
|
|
334
353
|
>
|
|
335
354
|
<template #selection="{ item }">
|
|
@@ -350,6 +369,7 @@
|
|
|
350
369
|
'windward.core.components.content.blocks.video.video.controls'
|
|
351
370
|
)
|
|
352
371
|
"
|
|
372
|
+
:disabled="render"
|
|
353
373
|
></v-switch>
|
|
354
374
|
<v-switch
|
|
355
375
|
v-model="
|
|
@@ -360,6 +380,7 @@
|
|
|
360
380
|
'windward.core.components.content.blocks.video.video.rewind'
|
|
361
381
|
)
|
|
362
382
|
"
|
|
383
|
+
:disabled="render"
|
|
363
384
|
></v-switch>
|
|
364
385
|
<v-switch
|
|
365
386
|
v-model="
|
|
@@ -371,6 +392,7 @@
|
|
|
371
392
|
'windward.core.components.content.blocks.video.video.captionsmenu'
|
|
372
393
|
)
|
|
373
394
|
"
|
|
395
|
+
:disabled="render"
|
|
374
396
|
></v-switch>
|
|
375
397
|
<v-switch
|
|
376
398
|
v-model="
|
|
@@ -382,6 +404,7 @@
|
|
|
382
404
|
'windward.core.components.content.blocks.video.video.disablepictureinpicture'
|
|
383
405
|
)
|
|
384
406
|
"
|
|
407
|
+
:disabled="render"
|
|
385
408
|
></v-switch>
|
|
386
409
|
<!--
|
|
387
410
|
<v-switch
|
|
@@ -404,6 +427,7 @@
|
|
|
404
427
|
'windward.core.components.content.blocks.video.video.muted'
|
|
405
428
|
)
|
|
406
429
|
"
|
|
430
|
+
:disabled="render"
|
|
407
431
|
></v-switch>
|
|
408
432
|
<v-switch
|
|
409
433
|
v-model="
|
|
@@ -414,6 +438,7 @@
|
|
|
414
438
|
'windward.core.components.content.blocks.video.video.loop'
|
|
415
439
|
)
|
|
416
440
|
"
|
|
441
|
+
:disabled="render"
|
|
417
442
|
></v-switch>
|
|
418
443
|
<v-switch
|
|
419
444
|
v-model="
|
|
@@ -425,6 +450,7 @@
|
|
|
425
450
|
'windward.core.components.content.blocks.video.video.playsinline'
|
|
426
451
|
)
|
|
427
452
|
"
|
|
453
|
+
:disabled="render"
|
|
428
454
|
></v-switch>
|
|
429
455
|
</v-col>
|
|
430
456
|
</v-row>
|
|
@@ -435,9 +461,9 @@
|
|
|
435
461
|
</div>
|
|
436
462
|
</template>
|
|
437
463
|
<script>
|
|
438
|
-
import
|
|
439
|
-
import
|
|
440
|
-
|
|
464
|
+
import _ from 'lodash'
|
|
465
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
466
|
+
import Uuid from '~/helpers/Uuid'
|
|
441
467
|
export default {
|
|
442
468
|
name: 'VideoSettings',
|
|
443
469
|
extends: BaseContentSettings,
|
|
@@ -477,20 +503,83 @@ export default {
|
|
|
477
503
|
this.playlistPaginator = 1
|
|
478
504
|
}
|
|
479
505
|
},
|
|
480
|
-
mounted() {
|
|
506
|
+
mounted() {
|
|
507
|
+
this.reloadMedia()
|
|
508
|
+
},
|
|
481
509
|
methods: {
|
|
482
510
|
reloadMedia() {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
this.media.
|
|
511
|
+
// Prefill the media sources with the related file asset
|
|
512
|
+
// If the source is empty then it will just return null
|
|
513
|
+
this.media.source = this.resolveAsset(
|
|
514
|
+
_.get(
|
|
515
|
+
this.block,
|
|
516
|
+
'metadata.config.playlist[' +
|
|
517
|
+
this.playlistIndex +
|
|
518
|
+
'].sources[0]',
|
|
519
|
+
null
|
|
520
|
+
)
|
|
521
|
+
)
|
|
522
|
+
this.media.track = this.resolveAsset(
|
|
523
|
+
_.get(
|
|
524
|
+
this.block,
|
|
525
|
+
'metadata.config.playlist[' +
|
|
526
|
+
this.playlistIndex +
|
|
527
|
+
'].tracks[0]',
|
|
528
|
+
null
|
|
529
|
+
)
|
|
530
|
+
)
|
|
531
|
+
this.media.poster = this.resolveAsset(
|
|
532
|
+
_.get(this.block, 'metadata.config.attributes.poster', null)
|
|
533
|
+
)
|
|
534
|
+
|
|
486
535
|
this.media.ads = {
|
|
487
536
|
preroll: {
|
|
488
|
-
source:
|
|
489
|
-
|
|
537
|
+
source: this.resolveAsset(
|
|
538
|
+
_.get(
|
|
539
|
+
this.block,
|
|
540
|
+
'metadata.config.playlist[' +
|
|
541
|
+
this.playlistIndex +
|
|
542
|
+
'].ads[' +
|
|
543
|
+
this.getAdSlot(0) +
|
|
544
|
+
'].sources[0]',
|
|
545
|
+
null
|
|
546
|
+
)
|
|
547
|
+
),
|
|
548
|
+
track: this.resolveAsset(
|
|
549
|
+
_.get(
|
|
550
|
+
this.block,
|
|
551
|
+
'metadata.config.playlist[' +
|
|
552
|
+
this.playlistIndex +
|
|
553
|
+
'].ads[' +
|
|
554
|
+
this.getAdSlot(0) +
|
|
555
|
+
'].tracks[0]',
|
|
556
|
+
null
|
|
557
|
+
)
|
|
558
|
+
),
|
|
490
559
|
},
|
|
491
560
|
postroll: {
|
|
492
|
-
source:
|
|
493
|
-
|
|
561
|
+
source: this.resolveAsset(
|
|
562
|
+
_.get(
|
|
563
|
+
this.block,
|
|
564
|
+
'metadata.config.playlist[' +
|
|
565
|
+
this.playlistIndex +
|
|
566
|
+
'].ads[' +
|
|
567
|
+
this.getAdSlot(100) +
|
|
568
|
+
'].sources[0]',
|
|
569
|
+
null
|
|
570
|
+
)
|
|
571
|
+
),
|
|
572
|
+
track: this.resolveAsset(
|
|
573
|
+
_.get(
|
|
574
|
+
this.block,
|
|
575
|
+
'metadata.config.playlist[' +
|
|
576
|
+
this.playlistIndex +
|
|
577
|
+
'].ads[' +
|
|
578
|
+
this.getAdSlot(100) +
|
|
579
|
+
'].tracks[0]',
|
|
580
|
+
null
|
|
581
|
+
)
|
|
582
|
+
),
|
|
494
583
|
},
|
|
495
584
|
}
|
|
496
585
|
},
|
|
@@ -553,7 +642,7 @@ export default {
|
|
|
553
642
|
]
|
|
554
643
|
)
|
|
555
644
|
) {
|
|
556
|
-
|
|
645
|
+
this.$set(
|
|
557
646
|
this.block.metadata.config.playlist[this.playlistIndex].ads,
|
|
558
647
|
adIndex,
|
|
559
648
|
{ sources: [], tracks: [] }
|
|
@@ -575,19 +664,11 @@ export default {
|
|
|
575
664
|
return this.block.metadata.config.playlist.length - 1
|
|
576
665
|
},
|
|
577
666
|
onPosterSelect(file) {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
this.block.metadata.config.attributes.poster = ''
|
|
582
|
-
} else {
|
|
583
|
-
this.block.metadata.config.attributes.poster_file_asset_id =
|
|
584
|
-
file.file_asset_id
|
|
585
|
-
this.block.metadata.config.attributes.poster =
|
|
586
|
-
file.asset.public_url
|
|
587
|
-
}
|
|
667
|
+
this.block.metadata.config.attributes.poster = file
|
|
668
|
+
|
|
669
|
+
this.reloadVideo()
|
|
588
670
|
},
|
|
589
671
|
onSourceSelect(file) {
|
|
590
|
-
this.reloadVideo()
|
|
591
672
|
// No file, clear the selection
|
|
592
673
|
if (_.isEmpty(file)) {
|
|
593
674
|
delete this.block.metadata.config.playlist[this.playlistIndex]
|
|
@@ -608,37 +689,23 @@ export default {
|
|
|
608
689
|
// Apply the playlist source video(s)
|
|
609
690
|
this.block.metadata.config.playlist[
|
|
610
691
|
this.playlistIndex
|
|
611
|
-
].sources = [
|
|
612
|
-
{
|
|
613
|
-
file_asset_id: file.file_asset_id,
|
|
614
|
-
src: file.asset.public_url,
|
|
615
|
-
type: file.asset.metadata.mime,
|
|
616
|
-
},
|
|
617
|
-
]
|
|
692
|
+
].sources = [file]
|
|
618
693
|
|
|
619
694
|
this.showVideo = true
|
|
620
695
|
}
|
|
696
|
+
this.reloadVideo()
|
|
621
697
|
},
|
|
622
698
|
onTrackSelect(file) {
|
|
623
|
-
this.reloadVideo()
|
|
624
699
|
if (_.isEmpty(file)) {
|
|
625
700
|
this.block.metadata.config.playlist[this.playlistIndex].tracks =
|
|
626
701
|
[]
|
|
627
702
|
this.showVideo = false
|
|
628
703
|
} else {
|
|
629
704
|
this.block.metadata.config.playlist[this.playlistIndex].tracks =
|
|
630
|
-
[
|
|
631
|
-
{
|
|
632
|
-
file_asset_id: file.file_asset_id,
|
|
633
|
-
src: file.asset.public_url,
|
|
634
|
-
kind: 'captions',
|
|
635
|
-
srclang: 'en-US',
|
|
636
|
-
default: true,
|
|
637
|
-
},
|
|
638
|
-
]
|
|
705
|
+
[file]
|
|
639
706
|
}
|
|
707
|
+
this.reloadVideo()
|
|
640
708
|
},
|
|
641
|
-
|
|
642
709
|
onAdSourceSelect(file, playAtPercent) {
|
|
643
710
|
const adIndex = this.getAdSlot(playAtPercent)
|
|
644
711
|
|
|
@@ -656,14 +723,9 @@ export default {
|
|
|
656
723
|
|
|
657
724
|
this.block.metadata.config.playlist[this.playlistIndex].ads[
|
|
658
725
|
adIndex
|
|
659
|
-
].sources = [
|
|
660
|
-
{
|
|
661
|
-
file_asset_id: file.file_asset_id,
|
|
662
|
-
src: file.asset.public_url,
|
|
663
|
-
type: file.asset.metadata.mime,
|
|
664
|
-
},
|
|
665
|
-
]
|
|
726
|
+
].sources = [file]
|
|
666
727
|
}
|
|
728
|
+
this.reloadVideo()
|
|
667
729
|
},
|
|
668
730
|
onAdTrackSelect(file, playAtPercent) {
|
|
669
731
|
const adIndex = this.getAdSlot(playAtPercent)
|
|
@@ -679,16 +741,9 @@ export default {
|
|
|
679
741
|
|
|
680
742
|
this.block.metadata.config.playlist[this.playlistIndex].ads[
|
|
681
743
|
adIndex
|
|
682
|
-
].tracks = [
|
|
683
|
-
{
|
|
684
|
-
file_asset_id: file.file_asset_id,
|
|
685
|
-
src: file.asset.public_url,
|
|
686
|
-
kind: 'captions',
|
|
687
|
-
srclang: 'en-US',
|
|
688
|
-
default: true,
|
|
689
|
-
},
|
|
690
|
-
]
|
|
744
|
+
].tracks = [file]
|
|
691
745
|
}
|
|
746
|
+
this.reloadVideo()
|
|
692
747
|
},
|
|
693
748
|
onPlaybackChange(e) {
|
|
694
749
|
// Sort the list so we don't get instances of 2, 1, 0.25, 3
|
|
@@ -79,6 +79,11 @@ img {
|
|
|
79
79
|
width: 100% !important;
|
|
80
80
|
}
|
|
81
81
|
.text-viewer {
|
|
82
|
-
@import './assets/tinymce/
|
|
82
|
+
@import './assets/tinymce/content/global';
|
|
83
|
+
}
|
|
84
|
+
.ML__text {
|
|
85
|
+
font-family: 'Roboto', sans-serif !important;
|
|
86
|
+
font-size: 1rem;
|
|
87
|
+
line-height: 1.75em;
|
|
83
88
|
}
|
|
84
89
|
</style>
|
|
@@ -41,9 +41,12 @@
|
|
|
41
41
|
:key="buttonIndex"
|
|
42
42
|
class="btn"
|
|
43
43
|
@click="insert(button)"
|
|
44
|
-
v-html="
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
v-html="
|
|
45
|
+
'<strong>' +
|
|
46
|
+
convertLatexToMarkup(button.text) +
|
|
47
|
+
'</strong>'
|
|
48
|
+
"
|
|
49
|
+
></button>
|
|
47
50
|
</div>
|
|
48
51
|
</v-container>
|
|
49
52
|
</v-tab-item>
|
|
@@ -131,7 +134,7 @@ export default {
|
|
|
131
134
|
spokenText: '',
|
|
132
135
|
spokenTextChanged: false,
|
|
133
136
|
options: {
|
|
134
|
-
smartFence:
|
|
137
|
+
smartFence: false,
|
|
135
138
|
smartMode: false,
|
|
136
139
|
virtualKeyboardMode: 'none',
|
|
137
140
|
keypressSound: 'none',
|
|
@@ -250,7 +253,9 @@ export default {
|
|
|
250
253
|
},
|
|
251
254
|
insert(latex) {
|
|
252
255
|
this.$refs.mathfield.insert(this.getBtnCode(latex), {
|
|
253
|
-
selectionMode: '
|
|
256
|
+
selectionMode: 'item',
|
|
257
|
+
insertionMode: 'replaceSelection',
|
|
258
|
+
focus: true,
|
|
254
259
|
})
|
|
255
260
|
},
|
|
256
261
|
|