@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.
- package/components/Content/Blocks/Accordion.vue +10 -6
- package/components/Content/Blocks/BlockQuote.vue +81 -98
- package/components/Content/Blocks/ClickableIcons.vue +6 -5
- package/components/Content/Blocks/Feedback.vue +1 -1
- package/components/Content/Blocks/FileDownload/FileLinks.vue +82 -0
- package/components/Content/Blocks/FileDownload/FileTable.vue +106 -0
- package/components/Content/Blocks/FileDownload.vue +145 -0
- package/components/Content/Blocks/GenerateAIQuestionButton.vue +61 -0
- package/components/Content/Blocks/ScenarioChoice.vue +2 -2
- package/components/Content/Blocks/UserUpload.vue +15 -36
- package/components/Content/Blocks/Video.vue +7 -57
- package/components/Settings/AccordionSettings.vue +3 -6
- package/components/Settings/BlockQuoteSettings.vue +44 -14
- package/components/Settings/EmailSettings.vue +2 -2
- package/components/Settings/FileDownloadSettings.vue +168 -0
- package/components/Settings/UserUploadSettings.vue +36 -39
- package/components/Settings/VideoSettings.vue +15 -2
- package/components/utils/ContentViewer.vue +1 -0
- package/components/utils/TinyMCEWrapper.vue +14 -16
- package/components/utils/assets/tinymce/content/global.scss +10 -0
- package/i18n/en-US/components/content/blocks/file_download.ts +5 -0
- package/i18n/en-US/components/content/blocks/generate_questions.ts +3 -0
- package/i18n/en-US/components/content/blocks/index.ts +4 -0
- package/i18n/en-US/components/content/blocks/user_upload.ts +0 -2
- package/i18n/en-US/components/settings/block_quote.ts +6 -0
- package/i18n/en-US/components/settings/file_download.ts +8 -0
- package/i18n/en-US/components/settings/index.ts +2 -0
- package/i18n/en-US/shared/content_blocks.ts +1 -0
- package/i18n/en-US/shared/settings.ts +1 -3
- package/i18n/es-ES/components/content/blocks/file_download.ts +5 -0
- package/i18n/es-ES/components/content/blocks/generate_questions.ts +3 -0
- package/i18n/es-ES/components/content/blocks/index.ts +6 -2
- package/i18n/es-ES/components/content/blocks/user_upload.ts +0 -2
- package/i18n/es-ES/components/settings/block_quote.ts +7 -1
- package/i18n/es-ES/components/settings/file_download.ts +8 -0
- package/i18n/es-ES/components/settings/index.ts +4 -2
- package/i18n/es-ES/shared/content_blocks.ts +1 -0
- package/i18n/es-ES/shared/settings.ts +1 -3
- package/i18n/sv-SE/components/content/blocks/file_download.ts +5 -0
- package/i18n/sv-SE/components/content/blocks/generate_questions.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +4 -0
- package/i18n/sv-SE/components/content/blocks/user_upload.ts +0 -2
- package/i18n/sv-SE/components/settings/block_quote.ts +7 -1
- package/i18n/sv-SE/components/settings/file_download.ts +8 -0
- package/i18n/sv-SE/components/settings/index.ts +4 -2
- package/i18n/sv-SE/shared/content_blocks.ts +1 -0
- package/i18n/sv-SE/shared/settings.ts +2 -4
- package/package.json +2 -2
- package/plugin.js +20 -0
- package/test/Components/Content/Blocks/FileDownload.spec.js +25 -0
- package/test/Components/Content/Blocks/Video.spec.js +0 -22
- package/test/Components/Settings/FileDownloadSettings.spec.js +20 -0
- package/test/Components/Settings/UserUploadSettings.spec.js +1 -1
- 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
|
+
})
|
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
|
}
|