@windward/core 0.4.3 → 0.5.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 (159) hide show
  1. package/.idea/codeStyles/Project.xml +58 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/php-docker-settings.xml +24 -0
  6. package/.idea/php.xml +19 -0
  7. package/.idea/vcs.xml +6 -0
  8. package/.idea/watcherTasks.xml +4 -0
  9. package/.idea/windward-ui-plugin-core.iml +8 -0
  10. package/components/Content/Blocks/Accordion.vue +10 -6
  11. package/components/Content/Blocks/ClickableIcons.vue +6 -5
  12. package/components/Content/Blocks/Feedback.vue +1 -1
  13. package/components/Content/Blocks/FileDownload/FileLinks.vue +82 -0
  14. package/components/Content/Blocks/FileDownload/FileTable.vue +106 -0
  15. package/components/Content/Blocks/FileDownload.vue +145 -0
  16. package/components/Content/Blocks/GenerateAIQuestionButton.vue +61 -0
  17. package/components/Content/Blocks/ScenarioChoice.vue +2 -2
  18. package/components/Content/Blocks/UserUpload.vue +15 -36
  19. package/components/Content/Blocks/Video.vue +2 -57
  20. package/components/Settings/AccordionSettings.vue +3 -6
  21. package/components/Settings/BlockQuoteSettings.vue +2 -2
  22. package/components/Settings/EmailSettings.vue +2 -2
  23. package/components/Settings/FileDownloadSettings.vue +168 -0
  24. package/components/Settings/UserUploadSettings.vue +36 -39
  25. package/components/utils/ContentViewer.vue +1 -0
  26. package/components/utils/TinyMCEWrapper.vue +15 -16
  27. package/components/utils/assets/tinymce/content/global.scss +10 -0
  28. package/config/menu.config.json +475 -0
  29. package/coverage/clover.xml +223 -0
  30. package/coverage/coverage-final.json +16 -0
  31. package/coverage/lcov-report/base.css +224 -0
  32. package/coverage/lcov-report/block-navigation.js +87 -0
  33. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
  34. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
  35. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
  36. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
  37. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
  38. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
  39. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
  40. package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
  41. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
  42. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
  43. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
  44. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
  45. package/coverage/lcov-report/components/utils/index.html +161 -0
  46. package/coverage/lcov-report/config/index.html +116 -0
  47. package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
  48. package/coverage/lcov-report/favicon.png +0 -0
  49. package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
  50. package/coverage/lcov-report/helpers/index.html +116 -0
  51. package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
  52. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
  53. package/coverage/lcov-report/index.html +191 -0
  54. package/coverage/lcov-report/prettify.css +1 -0
  55. package/coverage/lcov-report/prettify.js +2 -0
  56. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  57. package/coverage/lcov-report/sorter.js +196 -0
  58. package/coverage/lcov-report/test/index.html +116 -0
  59. package/coverage/lcov-report/test/mocks.js.html +457 -0
  60. package/coverage/lcov.info +403 -0
  61. package/i18n/en-US/components/content/blocks/file_download.ts +5 -0
  62. package/i18n/en-US/components/content/blocks/generate_questions.ts +3 -0
  63. package/i18n/en-US/components/content/blocks/index.ts +4 -0
  64. package/i18n/en-US/components/content/blocks/user_upload.ts +0 -2
  65. package/i18n/en-US/components/settings/file_download.ts +8 -0
  66. package/i18n/en-US/components/settings/index.ts +2 -0
  67. package/i18n/en-US/shared/content_blocks.ts +1 -0
  68. package/i18n/en-US/shared/settings.ts +1 -3
  69. package/i18n/es-ES/components/content/blocks/file_download.ts +5 -0
  70. package/i18n/es-ES/components/content/blocks/generate_questions.ts +3 -0
  71. package/i18n/es-ES/components/content/blocks/index.ts +6 -2
  72. package/i18n/es-ES/components/content/blocks/user_upload.ts +0 -2
  73. package/i18n/es-ES/components/settings/file_download.ts +8 -0
  74. package/i18n/es-ES/components/settings/index.ts +4 -2
  75. package/i18n/es-ES/shared/content_blocks.ts +1 -0
  76. package/i18n/es-ES/shared/settings.ts +1 -3
  77. package/i18n/sv-SE/components/content/blocks/file_download.ts +5 -0
  78. package/i18n/sv-SE/components/content/blocks/generate_questions.ts +3 -0
  79. package/i18n/sv-SE/components/content/blocks/index.ts +4 -0
  80. package/i18n/sv-SE/components/content/blocks/user_upload.ts +0 -2
  81. package/i18n/sv-SE/components/settings/file_download.ts +8 -0
  82. package/i18n/sv-SE/components/settings/index.ts +4 -2
  83. package/i18n/sv-SE/shared/content_blocks.ts +1 -0
  84. package/i18n/sv-SE/shared/settings.ts +2 -4
  85. package/lib/helpers/GlossaryHelper.d.ts +9 -0
  86. package/lib/helpers/GlossaryHelper.js +118 -0
  87. package/lib/helpers/GlossaryTerm.d.ts +10 -0
  88. package/lib/helpers/GlossaryTerm.js +22 -0
  89. package/lib/helpers/MathHelper.d.ts +99 -0
  90. package/lib/helpers/MathHelper.js +194 -0
  91. package/lib/helpers/tinymce/plugin.d.ts +2 -0
  92. package/lib/helpers/tinymce/plugin.js +86 -0
  93. package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
  94. package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
  95. package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
  96. package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
  97. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
  98. package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
  99. package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
  100. package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
  101. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
  102. package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
  103. package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
  104. package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
  105. package/lib/i18n/en-US/components/content/index.d.ts +77 -0
  106. package/lib/i18n/en-US/components/content/index.js +6 -0
  107. package/lib/i18n/en-US/components/index.d.ts +140 -0
  108. package/lib/i18n/en-US/components/index.js +12 -0
  109. package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
  110. package/lib/i18n/en-US/components/navigation/image.js +6 -0
  111. package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
  112. package/lib/i18n/en-US/components/navigation/index.js +8 -0
  113. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
  114. package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
  115. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
  116. package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
  117. package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
  118. package/lib/i18n/en-US/components/settings/image.js +3 -0
  119. package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
  120. package/lib/i18n/en-US/components/settings/index.js +14 -0
  121. package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
  122. package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
  123. package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
  124. package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
  125. package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
  126. package/lib/i18n/en-US/components/settings/video.js +14 -0
  127. package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
  128. package/lib/i18n/en-US/components/utils/index.js +6 -0
  129. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
  130. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
  131. package/lib/i18n/en-US/index.d.ts +197 -0
  132. package/lib/i18n/en-US/index.js +16 -0
  133. package/lib/i18n/en-US/modules/index.d.ts +2 -0
  134. package/lib/i18n/en-US/modules/index.js +6 -0
  135. package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
  136. package/lib/i18n/en-US/pages/glossary.js +9 -0
  137. package/lib/i18n/en-US/pages/index.d.ts +13 -0
  138. package/lib/i18n/en-US/pages/index.js +8 -0
  139. package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
  140. package/lib/i18n/en-US/pages/user_upload.js +5 -0
  141. package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
  142. package/lib/i18n/en-US/shared/content_blocks.js +21 -0
  143. package/lib/i18n/en-US/shared/index.d.ts +39 -0
  144. package/lib/i18n/en-US/shared/index.js +10 -0
  145. package/lib/i18n/en-US/shared/menu.d.ts +4 -0
  146. package/lib/i18n/en-US/shared/menu.js +5 -0
  147. package/lib/i18n/en-US/shared/settings.d.ts +15 -0
  148. package/lib/i18n/en-US/shared/settings.js +16 -0
  149. package/lib/i18n/en-US.d.ts +197 -0
  150. package/lib/i18n/en-US.js +15 -0
  151. package/lib/models/UserFileAsset.d.ts +5 -0
  152. package/lib/models/UserFileAsset.js +37 -0
  153. package/package.json +2 -2
  154. package/plugin.js +20 -0
  155. package/test/Components/Content/Blocks/FileDownload.spec.js +25 -0
  156. package/test/Components/Content/Blocks/Video.spec.js +0 -22
  157. package/test/Components/Settings/FileDownloadSettings.spec.js +20 -0
  158. package/test/Components/Settings/UserUploadSettings.spec.js +1 -1
  159. package/utils/index.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/core",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "Windward UI Core Plugins",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-core#readme",
23
23
  "dependencies": {
24
- "@mindedge/vuetify-player": "^0.3.0",
24
+ "@mindedge/vuetify-player": "^0.3.1",
25
25
  "@tinymce/tinymce-vue": "^3.2.8",
26
26
  "eslint": "^8.11.0",
27
27
  "he": "^1.2.0",
package/plugin.js CHANGED
@@ -19,6 +19,7 @@ import OpenResponse from './components/Content/Blocks/OpenResponse'
19
19
  import OpenResponseCollate from './components/Content/Blocks/OpenResponseCollate'
20
20
  import Image from './components/Content/Blocks/Image'
21
21
  import UserUpload from './components/Content/Blocks/UserUpload'
22
+ import FileDownload from './components/Content/Blocks/FileDownload'
22
23
 
23
24
  import GlossaryPage from './pages/glossary.vue'
24
25
  import TinymcePlugin from './pages/plugins/tinymce/_plugin.vue'
@@ -32,6 +33,7 @@ import OpenResponseSettings from './components/Settings/OpenResponseSettings.vue
32
33
  import OpenResponseCollateSettings from './components/Settings/OpenResponseCollateSettings.vue'
33
34
  import ImageSettings from './components/Settings/ImageSettings.vue'
34
35
  import UserUploadSettings from './components/Settings/UserUploadSettings.vue'
36
+ import FileDownloadSettings from './components/Settings/FileDownloadSettings.vue'
35
37
  import ClickableIconsSettings from './components/Settings/ClickableIconsSettings.vue'
36
38
  import ScenarioChoiceSettings from './components/Settings/ScenarioChoiceSettings.vue'
37
39
  import VideoSettings from './components/Settings/VideoSettings.vue'
@@ -220,6 +222,15 @@ export default {
220
222
  grouping: 'components.content.blocks.group.multimedia',
221
223
  },
222
224
  },
225
+ {
226
+ tag: 'core-file-download',
227
+ template: FileDownload,
228
+ metadata: {
229
+ icon: 'mdi-cloud-download',
230
+ name: 'windward.core.shared.content_blocks.title.file_download',
231
+ grouping: 'components.content.blocks.group.multimedia',
232
+ },
233
+ },
223
234
  {
224
235
  tag: 'core-clickable-icons',
225
236
  template: ClickableIcons,
@@ -312,6 +323,15 @@ export default {
312
323
  name: 'windward.core.shared.settings.title.user_upload',
313
324
  },
314
325
  },
326
+ {
327
+ tag: 'core-file-download-settings',
328
+ template: FileDownloadSettings,
329
+ context: ['block.core-file-download'],
330
+ metadata: {
331
+ icon: 'mdi-cog',
332
+ name: 'windward.core.shared.settings.title.file_download',
333
+ },
334
+ },
315
335
  {
316
336
  tag: 'core-tab-settings',
317
337
  template: TabSettings,
@@ -0,0 +1,25 @@
1
+ import { mount, shallowMount } from '@vue/test-utils'
2
+ import Vue from 'vue'
3
+ import Vuetify from 'vuetify'
4
+
5
+ import { defaultMocks } from '@/test/mocks'
6
+ import FileDownload from '@/components/Content/Blocks/FileDownload.vue'
7
+
8
+ Vue.use(Vuetify)
9
+
10
+ describe('FileDownload component', () => {
11
+ test('is a Vue instance', () => {
12
+ const wrapper = shallowMount(FileDownload, {
13
+ vuetify: new Vuetify(),
14
+ propsData: {
15
+ value: {
16
+ id: '00000000-0000-0000-0000-000000000000',
17
+ body: 'dummy text',
18
+ metadata: {},
19
+ },
20
+ },
21
+ mocks: defaultMocks,
22
+ })
23
+ expect(wrapper.vm).toBeTruthy()
24
+ })
25
+ })
@@ -87,26 +87,4 @@ describe('Video', () => {
87
87
  metadata.config.playlist
88
88
  )
89
89
  })
90
-
91
- test('Video config edit mode', async () => {
92
- const wrapper = mount(Video, {
93
- vuetify: new Vuetify(),
94
- propsData: {
95
- value: {
96
- body: 'video',
97
- metadata,
98
- },
99
- },
100
- mocks: defaultMocks,
101
- })
102
- expect(wrapper.vm).toBeTruthy()
103
-
104
- // Render mode enabled by default aka non-edit mode
105
- expect(wrapper.vm.$data.render).toEqual(true)
106
-
107
- // Turn on edit mode and test
108
- await wrapper.vm.onActionPanelEdit()
109
-
110
- expect(wrapper.vm.$data.render).toEqual(false)
111
- })
112
90
  })
@@ -0,0 +1,20 @@
1
+ import { shallowMount } from '@vue/test-utils'
2
+ import Vuetify from 'vuetify'
3
+ import Vue from 'vue'
4
+
5
+ import { defaultMocks } from '@/test/mocks'
6
+ import FileDownloadSettings from '@/components/Settings/FileDownloadSettings'
7
+
8
+ Vue.use(Vuetify)
9
+
10
+ describe('FileDownloadSettings', () => {
11
+ test('is a Vue instance', () => {
12
+ const wrapper = shallowMount(FileDownloadSettings, {
13
+ propsData: {
14
+ tag: 'core-file-download',
15
+ },
16
+ mocks: defaultMocks,
17
+ })
18
+ expect(wrapper.vm).toBeTruthy()
19
+ })
20
+ })
@@ -11,7 +11,7 @@ describe('UserUploadSettings', () => {
11
11
  test('is a Vue instance', () => {
12
12
  const wrapper = shallowMount(UserUploadSettings, {
13
13
  propsData: {
14
- tag: 'core-accordion-settings',
14
+ tag: 'core-user-upload-settings',
15
15
  },
16
16
  mocks: defaultMocks,
17
17
  })
package/utils/index.js CHANGED
@@ -7,6 +7,7 @@ import TinyMCEWrapper from '../components/utils/TinyMCEWrapper.vue'
7
7
  import MathExpressionEditor from '../components/utils/MathExpressionEditor'
8
8
  import CourseGlossary from '../components/utils/glossary/CourseGlossary.vue'
9
9
  import CourseGlossaryForm from '../components/utils/glossary/CourseGlossaryForm.vue'
10
+ import GenerateAIQuestionButton from '../components/Content/Blocks/GenerateAIQuestionButton.vue';
10
11
  export {
11
12
  MathHelper,
12
13
  ContentViewer,
@@ -15,4 +16,5 @@ export {
15
16
  TinyMCEWrapper,
16
17
  CourseGlossary,
17
18
  CourseGlossaryForm,
19
+ GenerateAIQuestionButton,
18
20
  }