@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
@@ -31,83 +31,48 @@
31
31
  <v-tab>
32
32
  {{
33
33
  $t(
34
- 'windward.core.components.content.blocks.video.tabs.video'
34
+ 'windward.core.components.settings.video.tabs.source'
35
35
  )
36
36
  }}
37
37
  </v-tab>
38
38
  <v-tab>
39
39
  {{
40
40
  $t(
41
- 'windward.core.components.content.blocks.video.tabs.poster'
41
+ 'windward.core.components.settings.video.tabs.poster'
42
42
  )
43
43
  }}
44
44
  </v-tab>
45
- <v-tab>
45
+ <v-tab v-if="showPreRoll">
46
46
  {{
47
47
  $t(
48
- 'windward.core.components.content.blocks.video.tabs.preroll'
48
+ 'windward.core.components.settings.video.tabs.preroll'
49
49
  )
50
50
  }}
51
51
  </v-tab>
52
- <v-tab>
52
+ <v-tab v-if="showPostRoll">
53
53
  {{
54
54
  $t(
55
- 'windward.core.components.content.blocks.video.tabs.postroll'
55
+ 'windward.core.components.settings.video.tabs.postroll'
56
56
  )
57
57
  }}
58
58
  </v-tab>
59
59
  </v-tabs>
60
60
 
61
- <v-tabs-items v-model="fileTab">
61
+ <v-tabs-items v-model="fileTab" class="mt-2">
62
62
  <v-tab-item class="mb-1">
63
- <ContentBlockAsset
64
- v-model="media.source"
65
- :assets.sync="block.assets"
66
- mimes="video/mp4,audio/mpeg,video/webm,video/youtube"
67
- allow-url
68
- class="mb-4"
69
- :disabled="render"
70
- @change="onSourceSelect"
71
- >
72
- <template #title>
73
- {{
74
- $t(
75
- 'windward.core.components.content.blocks.video.video.title'
76
- )
77
- }}
78
- </template>
79
- <template #description>
80
- {{
81
- $t(
82
- 'windward.core.components.content.blocks.video.video.configure_blurb'
83
- )
84
- }}
85
- </template>
86
- </ContentBlockAsset>
87
- <ContentBlockAsset
88
- v-model="media.track"
63
+ <SourcePicker
64
+ :source.sync="media.source"
65
+ :track.sync="media.track"
89
66
  :assets.sync="block.assets"
90
- mimes="text/vtt,text/xml"
91
- allow-url
92
- class="mb-4"
67
+ :source-label="
68
+ $t(
69
+ 'windward.core.components.settings.video.place_source'
70
+ )
71
+ "
93
72
  :disabled="render"
94
- @change="onTrackSelect"
95
- >
96
- <template #title>
97
- {{
98
- $t(
99
- 'windward.core.components.content.blocks.video.caption.title'
100
- )
101
- }}
102
- </template>
103
- <template #description>
104
- {{
105
- $t(
106
- 'windward.core.components.content.blocks.video.caption.configure_blurb'
107
- )
108
- }}
109
- </template>
110
- </ContentBlockAsset>
73
+ @change:source="onSourceSelect"
74
+ @change:track="onTrackSelect"
75
+ ></SourcePicker>
111
76
  </v-tab-item>
112
77
 
113
78
  <v-tab-item class="mb-1">
@@ -122,120 +87,67 @@
122
87
  <template #title>
123
88
  {{
124
89
  $t(
125
- 'windward.core.components.content.blocks.video.poster.title'
90
+ 'windward.core.components.settings.video.poster.title'
126
91
  )
127
92
  }}
128
93
  </template>
129
94
  <template #description>
130
95
  {{
131
96
  $t(
132
- 'windward.core.components.content.blocks.video.poster.configure_blurb'
97
+ 'windward.core.components.settings.video.poster.configure_blurb'
133
98
  )
134
99
  }}
135
100
  </template>
136
101
  </ContentBlockAsset>
137
102
  </v-tab-item>
138
103
 
139
- <v-tab-item class="mb-1">
140
- <ContentBlockAsset
141
- v-model="media.ads.preroll.source"
142
- :assets.sync="block.assets"
143
- mimes="video/mp4,video/webm"
144
- allow-url
145
- class="mb-4"
146
- :disabled="render"
147
- @change="onAdSourceSelect($event, 0)"
148
- >
149
- <template #title>
150
- {{
151
- $t(
152
- 'windward.core.components.content.blocks.video.preroll.title'
153
- )
154
- }}
155
- </template>
156
- <template #description>
157
- {{
158
- $t(
159
- 'windward.core.components.content.blocks.video.preroll.configure_blurb'
160
- )
161
- }}
162
- </template>
163
- </ContentBlockAsset>
164
-
165
- <ContentBlockAsset
166
- v-model="media.ads.preroll.track"
104
+ <v-tab-item v-if="showPreRoll" class="mb-1">
105
+ <SourcePicker
106
+ :source.sync="media.ads[0].source"
107
+ :track.sync="media.ads[0].track"
167
108
  :assets.sync="block.assets"
168
- mimes="text/vtt,text/xml"
169
- allow-url
109
+ :source-label="
110
+ $t(
111
+ 'windward.core.components.settings.video.preroll.title'
112
+ )
113
+ "
114
+ :source-description="
115
+ $t(
116
+ 'windward.core.components.settings.video.preroll.configure_blurb'
117
+ )
118
+ "
170
119
  :disabled="render"
171
- @change="onAdTrackSelect($event, 0)"
172
- >
173
- <template #title>
174
- {{
175
- $t(
176
- 'windward.core.components.content.blocks.video.caption.title'
177
- )
178
- }}
179
- </template>
180
- <template #description>
181
- {{
182
- $t(
183
- 'windward.core.components.content.blocks.video.caption.configure_blurb'
184
- )
185
- }}
186
- </template>
187
- </ContentBlockAsset>
120
+ @change:source="
121
+ (file, rawFile) =>
122
+ onAdSourceSelect(file, rawFile, 0)
123
+ "
124
+ @change:track="onAdTrackSelect($event, 0)"
125
+ ></SourcePicker>
188
126
  </v-tab-item>
189
127
 
190
128
  <v-tab-item class="mb-1">
191
- <ContentBlockAsset
192
- v-model="media.ads.postroll.source"
193
- :assets.sync="block.assets"
194
- mimes="video/mp4,video/webm"
195
- allow-url
196
- class="mb-4"
197
- :disabled="render"
198
- @change="onAdSourceSelect($event, 100)"
199
- >
200
- <template #title>
201
- {{
202
- $t(
203
- 'windward.core.components.content.blocks.video.postroll.title'
204
- )
205
- }}
206
- </template>
207
- <template #description>
208
- {{
209
- $t(
210
- 'windward.core.components.content.blocks.video.postroll.configure_blurb'
211
- )
212
- }}
213
- </template>
214
- </ContentBlockAsset>
215
-
216
- <ContentBlockAsset
217
- v-model="media.ads.postroll.track"
129
+ <SourcePicker
130
+ v-if="showPostRoll"
131
+ :source.sync="media.ads[100].source"
132
+ :track.sync="media.ads[100].track"
218
133
  :assets.sync="block.assets"
219
- mimes="text/vtt,text/xml"
220
- allow-url
134
+ :source-label="
135
+ $t(
136
+ 'windward.core.components.settings.video.postroll.title'
137
+ )
138
+ "
139
+ :source-description="
140
+ $t(
141
+ 'windward.core.components.settings.video.postroll.configure_blurb'
142
+ )
143
+ "
221
144
  :disabled="render"
222
- @change="onAdTrackSelect($event, 100)"
223
- >
224
- <template #title>
225
- {{
226
- $t(
227
- 'windward.core.components.content.blocks.video.caption.title'
228
- )
229
- }}
230
- </template>
231
- <template #description>
232
- {{
233
- $t(
234
- 'windward.core.components.content.blocks.video.caption.configure_blurb'
235
- )
236
- }}
237
- </template>
238
- </ContentBlockAsset>
145
+ @change:source="
146
+ (file, rawFile) =>
147
+ onAdSourceSelect(file, rawFile, 0)
148
+ "
149
+ @change:track="onAdTrackSelect($event, 0)"
150
+ ></SourcePicker>
239
151
  </v-tab-item>
240
152
  </v-tabs-items>
241
153
  </v-col>
@@ -363,7 +275,7 @@
363
275
  :items="playbackRateOptions"
364
276
  :label="
365
277
  $t(
366
- 'windward.core.components.content.blocks.video.video.playback_rates'
278
+ 'windward.core.components.settings.video.video.playback_rates'
367
279
  )
368
280
  "
369
281
  multiple
@@ -385,7 +297,7 @@
385
297
  "
386
298
  :label="
387
299
  $t(
388
- 'windward.core.components.content.blocks.video.video.controls'
300
+ 'windward.core.components.settings.video.video.controls'
389
301
  )
390
302
  "
391
303
  :disabled="render"
@@ -396,7 +308,7 @@
396
308
  "
397
309
  :label="
398
310
  $t(
399
- 'windward.core.components.content.blocks.video.video.rewind'
311
+ 'windward.core.components.settings.video.video.rewind'
400
312
  )
401
313
  "
402
314
  :disabled="render"
@@ -408,7 +320,7 @@
408
320
  "
409
321
  :label="
410
322
  $t(
411
- 'windward.core.components.content.blocks.video.video.captionsmenu'
323
+ 'windward.core.components.settings.video.video.captionsmenu'
412
324
  )
413
325
  "
414
326
  :disabled="render"
@@ -420,7 +332,7 @@
420
332
  "
421
333
  :label="
422
334
  $t(
423
- 'windward.core.components.content.blocks.video.video.disablepictureinpicture'
335
+ 'windward.core.components.settings.video.video.disablepictureinpicture'
424
336
  )
425
337
  "
426
338
  :disabled="render"
@@ -428,11 +340,11 @@
428
340
  <!--
429
341
  <v-switch
430
342
  v-model="block.metadata.config.attributes.playlistmenu"
431
- :label="$t('windward.core.components.content.blocks.video.video.attributes.playlistmenu')"
343
+ :label="$t('windward.core.components.settings.video.video.attributes.playlistmenu')"
432
344
  ></v-switch>
433
345
  <v-switch
434
346
  v-model="block.metadata.config.attributes.playlistautoadvance"
435
- :label="$t('windward.core.components.content.blocks.video.video.attributes.playlistautoadvance')"
347
+ :label="$t('windward.core.components.settings.video.video.attributes.playlistautoadvance')"
436
348
  ></v-switch>
437
349
  -->
438
350
  </v-col>
@@ -443,7 +355,7 @@
443
355
  "
444
356
  :label="
445
357
  $t(
446
- 'windward.core.components.content.blocks.video.video.muted'
358
+ 'windward.core.components.settings.video.video.muted'
447
359
  )
448
360
  "
449
361
  :disabled="render"
@@ -454,7 +366,7 @@
454
366
  "
455
367
  :label="
456
368
  $t(
457
- 'windward.core.components.content.blocks.video.video.loop'
369
+ 'windward.core.components.settings.video.video.loop'
458
370
  )
459
371
  "
460
372
  :disabled="render"
@@ -466,7 +378,7 @@
466
378
  "
467
379
  :label="
468
380
  $t(
469
- 'windward.core.components.content.blocks.video.video.playsinline'
381
+ 'windward.core.components.settings.video.video.playsinline'
470
382
  )
471
383
  "
472
384
  :disabled="render"
@@ -482,11 +394,13 @@
482
394
  <script>
483
395
  import _ from 'lodash'
484
396
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
397
+ import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
398
+ import SourcePicker from './VideoSettings/SourcePicker.vue'
485
399
 
486
400
  export default {
487
401
  name: 'VideoSettings',
488
402
  extends: BaseContentSettings,
489
- components: {},
403
+ components: { ContentBlockAsset, SourcePicker },
490
404
  data() {
491
405
  return {
492
406
  fileTab: null,
@@ -494,45 +408,64 @@ export default {
494
408
  playlistPaginator: 1,
495
409
  media: {
496
410
  source: null,
411
+ sourceInherit: true,
497
412
  track: null,
498
413
  poster: null,
499
414
  ads: {
500
- preroll: {
415
+ // preroll
416
+ 0: {
501
417
  source: null,
502
418
  track: null,
419
+ inherit: true,
503
420
  },
504
- postroll: {
421
+ // postroll
422
+ 100: {
505
423
  source: null,
506
424
  track: null,
425
+ inherit: true,
507
426
  },
508
427
  },
509
428
  },
510
429
  validation: {
511
430
  shortInputRules: [
512
- (v) =>
513
- v.length <= 50 ||
514
- this.$t(
515
- 'windward.core.shared.settings.errors.input_limitations',
516
- [50]
517
- ),
431
+ (v) => {
432
+ if (v && v.length >= 50) {
433
+ return this.$t(
434
+ 'windward.core.shared.settings.errors.input_limitations',
435
+ [50]
436
+ )
437
+ } else {
438
+ return true
439
+ }
440
+ },
518
441
  ],
519
442
  instructionRule: [
520
- (v) =>
521
- v.length <= 255 ||
522
- this.$t(
523
- 'windward.core.shared.settings.errors.input_limitations',
524
- [255]
525
- ),
443
+ (v) => {
444
+ if (v && v.length >= 255) {
445
+ return this.$t(
446
+ 'windward.core.shared.settings.errors.input_limitations',
447
+ [255]
448
+ )
449
+ } else {
450
+ return true
451
+ }
452
+ },
526
453
  ],
527
454
  clueRule: [
528
- (v) =>
529
- v.length <= 155 ||
530
- this.$t(
531
- 'windward.core.shared.settings.errors.input_limitations',
532
- [155]
533
- ),
455
+ (v) => {
456
+ if (v && v.length >= 155) {
457
+ return this.$t(
458
+ 'windward.core.shared.settings.errors.input_limitations',
459
+ [155]
460
+ )
461
+ } else {
462
+ return true
463
+ }
464
+ },
534
465
  ],
535
466
  },
467
+ showPreRoll: false,
468
+ showPostRoll: false,
536
469
  }
537
470
  },
538
471
  computed: {
@@ -578,7 +511,7 @@ export default {
578
511
  )
579
512
 
580
513
  this.media.ads = {
581
- preroll: {
514
+ 0: {
582
515
  source: this.resolveAsset(
583
516
  _.get(
584
517
  this.block,
@@ -602,7 +535,7 @@ export default {
602
535
  )
603
536
  ),
604
537
  },
605
- postroll: {
538
+ 100: {
606
539
  source: this.resolveAsset(
607
540
  _.get(
608
541
  this.block,
@@ -640,6 +573,17 @@ export default {
640
573
  delete self.block.metadata.config.__isDirty
641
574
  }, 500)
642
575
  },
576
+ getLinkedCaptions(file) {
577
+ // Check to see if the video source has a linked asset and it's a vtt file
578
+ const linkedCaption = _.find(
579
+ _.get(file, 'asset.linked_assets', []),
580
+ function (f) {
581
+ return _.get(f, 'asset.metadata.extension', '') === 'vtt'
582
+ }
583
+ )
584
+
585
+ return linkedCaption || null
586
+ },
643
587
  /**
644
588
  * Returns the next array index for an ad slot
645
589
  * If a slot is already defined then return that index
@@ -713,7 +657,7 @@ export default {
713
657
 
714
658
  this.reloadVideo()
715
659
  },
716
- onSourceSelect(file) {
660
+ onSourceSelect(file, rawFile) {
717
661
  // No file, clear the selection
718
662
  if (_.isEmpty(file)) {
719
663
  delete this.block.metadata.config.playlist[this.playlistIndex]
@@ -722,6 +666,10 @@ export default {
722
666
  this.playlistIndex
723
667
  ].sources = []
724
668
 
669
+ // Clear out any associated captions
670
+ this.media.track = null
671
+ this.onTrackSelect(null)
672
+
725
673
  this.showVideo = false
726
674
  } else {
727
675
  // Apply an updated name
@@ -737,6 +685,10 @@ export default {
737
685
  ].sources = [file]
738
686
 
739
687
  this.showVideo = true
688
+
689
+ // Clear the tracks. it will either be inherited via linked captions or be hard-set by the user
690
+ this.media.track = null
691
+ this.onTrackSelect(null)
740
692
  }
741
693
  this.reloadVideo()
742
694
  },
@@ -751,7 +703,7 @@ export default {
751
703
  }
752
704
  this.reloadVideo()
753
705
  },
754
- onAdSourceSelect(file, playAtPercent) {
706
+ onAdSourceSelect(file, rawFile, playAtPercent) {
755
707
  const adIndex = this.getAdSlot(playAtPercent)
756
708
 
757
709
  // Prep in case the ad slot isn't setup yet
@@ -769,6 +721,10 @@ export default {
769
721
  this.block.metadata.config.playlist[this.playlistIndex].ads[
770
722
  adIndex
771
723
  ].sources = [file]
724
+
725
+ // Clear the tracks. it will either be inherited via linked captions or be hard-set by the user
726
+ this.media.ads[playAtPercent].track = null
727
+ this.onAdTrackSelect(null, playAtPercent)
772
728
  }
773
729
  this.reloadVideo()
774
730
  },
@@ -145,7 +145,7 @@ export default {
145
145
  type: String,
146
146
  required: false,
147
147
  default:
148
- 'undo redo | styles | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table bullist numlist outdent indent | glossaryButton fibFormatButton mathButton ',
148
+ 'undo redo | styles | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table tablerowprops tablecellprops |bullist numlist outdent indent |glossaryButton fibFormatButton mathButton a11yButton',
149
149
  },
150
150
  root_block: { type: String, required: false, default: 'div' },
151
151
  label: { type: String, required: false, default: '' },
@@ -238,7 +238,7 @@ export default {
238
238
  },
239
239
  format: {
240
240
  title: 'Format',
241
- items: ' bold italic underline strikethrough superscript subscript codeformat | formats align | forecolor backcolor | language | removeformat',
241
+ items: ' bold italic underline strikethrough superscript subscript codeformat | formats align | language | removeformat',
242
242
  },
243
243
  },
244
244
  plugins: [
@@ -263,6 +263,7 @@ export default {
263
263
  table_advtab: false,
264
264
  table_cell_advtab: false,
265
265
  table_row_advtab: false,
266
+ table_header_type: 'auto',
266
267
  table_default_attributes: {
267
268
  class: 'default',
268
269
  },
@@ -206,3 +206,17 @@ html:has(body.editor--theme-light) {
206
206
  html:has(body.editor--theme-dark) {
207
207
  @import './dark/content.scss';
208
208
  }
209
+
210
+ .a11y-error{
211
+ background-color: #cf3f3f;
212
+ border-color: #cf3f3f;
213
+ color: #fff;
214
+ padding: 4px;
215
+ font-size: 0.8333rem;
216
+ border-radius: 4px;
217
+ &--highlight{
218
+ text-decoration-line: underline;
219
+ text-decoration-style: wavy;
220
+ text-decoration-color: #cf3f3f;
221
+ }
222
+ }