@windward/core 0.4.3 → 0.5.1

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 (54) hide show
  1. package/components/Content/Blocks/Accordion.vue +10 -6
  2. package/components/Content/Blocks/BlockQuote.vue +81 -98
  3. package/components/Content/Blocks/ClickableIcons.vue +6 -5
  4. package/components/Content/Blocks/Feedback.vue +1 -1
  5. package/components/Content/Blocks/FileDownload/FileLinks.vue +82 -0
  6. package/components/Content/Blocks/FileDownload/FileTable.vue +106 -0
  7. package/components/Content/Blocks/FileDownload.vue +145 -0
  8. package/components/Content/Blocks/GenerateAIQuestionButton.vue +61 -0
  9. package/components/Content/Blocks/ScenarioChoice.vue +2 -2
  10. package/components/Content/Blocks/UserUpload.vue +15 -36
  11. package/components/Content/Blocks/Video.vue +7 -57
  12. package/components/Settings/AccordionSettings.vue +3 -6
  13. package/components/Settings/BlockQuoteSettings.vue +44 -14
  14. package/components/Settings/EmailSettings.vue +2 -2
  15. package/components/Settings/FileDownloadSettings.vue +168 -0
  16. package/components/Settings/UserUploadSettings.vue +36 -39
  17. package/components/Settings/VideoSettings.vue +15 -2
  18. package/components/utils/ContentViewer.vue +1 -0
  19. package/components/utils/TinyMCEWrapper.vue +14 -16
  20. package/components/utils/assets/tinymce/content/global.scss +10 -0
  21. package/i18n/en-US/components/content/blocks/file_download.ts +5 -0
  22. package/i18n/en-US/components/content/blocks/generate_questions.ts +3 -0
  23. package/i18n/en-US/components/content/blocks/index.ts +4 -0
  24. package/i18n/en-US/components/content/blocks/user_upload.ts +0 -2
  25. package/i18n/en-US/components/settings/block_quote.ts +6 -0
  26. package/i18n/en-US/components/settings/file_download.ts +8 -0
  27. package/i18n/en-US/components/settings/index.ts +2 -0
  28. package/i18n/en-US/shared/content_blocks.ts +1 -0
  29. package/i18n/en-US/shared/settings.ts +1 -3
  30. package/i18n/es-ES/components/content/blocks/file_download.ts +5 -0
  31. package/i18n/es-ES/components/content/blocks/generate_questions.ts +3 -0
  32. package/i18n/es-ES/components/content/blocks/index.ts +6 -2
  33. package/i18n/es-ES/components/content/blocks/user_upload.ts +0 -2
  34. package/i18n/es-ES/components/settings/block_quote.ts +7 -1
  35. package/i18n/es-ES/components/settings/file_download.ts +8 -0
  36. package/i18n/es-ES/components/settings/index.ts +4 -2
  37. package/i18n/es-ES/shared/content_blocks.ts +1 -0
  38. package/i18n/es-ES/shared/settings.ts +1 -3
  39. package/i18n/sv-SE/components/content/blocks/file_download.ts +5 -0
  40. package/i18n/sv-SE/components/content/blocks/generate_questions.ts +3 -0
  41. package/i18n/sv-SE/components/content/blocks/index.ts +4 -0
  42. package/i18n/sv-SE/components/content/blocks/user_upload.ts +0 -2
  43. package/i18n/sv-SE/components/settings/block_quote.ts +7 -1
  44. package/i18n/sv-SE/components/settings/file_download.ts +8 -0
  45. package/i18n/sv-SE/components/settings/index.ts +4 -2
  46. package/i18n/sv-SE/shared/content_blocks.ts +1 -0
  47. package/i18n/sv-SE/shared/settings.ts +2 -4
  48. package/package.json +2 -2
  49. package/plugin.js +20 -0
  50. package/test/Components/Content/Blocks/FileDownload.spec.js +25 -0
  51. package/test/Components/Content/Blocks/Video.spec.js +0 -22
  52. package/test/Components/Settings/FileDownloadSettings.spec.js +20 -0
  53. package/test/Components/Settings/UserUploadSettings.spec.js +1 -1
  54. package/utils/index.js +2 -0
@@ -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
  }