@windward/core 0.0.6 → 0.0.8
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/.idea/codeStyles/Project.xml +58 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/php-docker-settings.xml +24 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/windward-ui-plugin-core.iml +8 -0
- package/components/Content/Blocks/Image.vue +36 -14
- package/components/Content/Blocks/OpenResponse.vue +159 -0
- package/components/Content/Blocks/OpenResponseCollate.vue +185 -0
- package/components/Settings/ImageSettings.vue +10 -0
- package/components/Settings/OpenResponseCollateSettings.vue +171 -0
- package/components/Settings/OpenResponseSettings.vue +81 -0
- package/components/Settings/TextEditorSettings.vue +1 -0
- package/components/utils/TinyMCEWrapper.vue +21 -4
- package/components/utils/assets/tinymce/css/content.scss +1 -1
- package/coverage/clover.xml +223 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
- package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
- package/coverage/lcov-report/components/utils/index.html +161 -0
- package/coverage/lcov-report/config/index.html +116 -0
- package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
- package/coverage/lcov-report/helpers/index.html +116 -0
- package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
- package/coverage/lcov-report/index.html +191 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov-report/test/mocks.js.html +457 -0
- package/coverage/lcov.info +403 -0
- package/helpers/tinymce/plugin.ts +1 -1
- package/i18n/en-US/components/content/blocks/index.ts +4 -0
- package/i18n/en-US/components/content/blocks/open_response.ts +5 -0
- package/i18n/en-US/components/content/blocks/open_response_collate.ts +7 -0
- package/i18n/en-US/components/settings/image.ts +3 -1
- package/i18n/en-US/components/settings/index.ts +5 -1
- package/i18n/en-US/components/settings/open_response.ts +5 -0
- package/i18n/en-US/components/settings/open_response_collate.ts +6 -0
- package/i18n/en-US/shared/content_blocks.ts +2 -0
- package/i18n/en-US/shared/settings.ts +3 -1
- package/i18n/es-ES/components/content/blocks/index.ts +4 -0
- package/i18n/es-ES/components/content/blocks/open_response.ts +6 -0
- package/i18n/es-ES/components/content/blocks/open_response_collate.ts +7 -0
- package/i18n/es-ES/components/settings/image.ts +3 -1
- package/i18n/es-ES/components/settings/index.ts +4 -0
- package/i18n/es-ES/components/settings/open_response.ts +5 -0
- package/i18n/es-ES/components/settings/open_response_collate.ts +7 -0
- package/i18n/es-ES/shared/content_blocks.ts +2 -0
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +4 -0
- package/i18n/sv-SE/components/content/blocks/open_response.ts +6 -0
- package/i18n/sv-SE/components/content/blocks/open_response_collate.ts +7 -0
- package/i18n/sv-SE/components/settings/image.ts +3 -1
- package/i18n/sv-SE/components/settings/index.ts +5 -1
- package/i18n/sv-SE/components/settings/open_response.ts +5 -0
- package/i18n/sv-SE/components/settings/open_response_collate.ts +6 -0
- package/i18n/sv-SE/shared/content_blocks.ts +2 -0
- package/i18n/sv-SE/shared/settings.ts +2 -0
- package/lib/helpers/GlossaryHelper.d.ts +9 -0
- package/lib/helpers/GlossaryHelper.js +118 -0
- package/lib/helpers/GlossaryTerm.d.ts +10 -0
- package/lib/helpers/GlossaryTerm.js +22 -0
- package/lib/helpers/MathHelper.d.ts +99 -0
- package/lib/helpers/MathHelper.js +194 -0
- package/lib/helpers/tinymce/plugin.d.ts +2 -0
- package/lib/helpers/tinymce/plugin.js +86 -0
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
- package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
- package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
- package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
- package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
- package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
- package/lib/i18n/en-US/components/content/index.d.ts +77 -0
- package/lib/i18n/en-US/components/content/index.js +6 -0
- package/lib/i18n/en-US/components/index.d.ts +140 -0
- package/lib/i18n/en-US/components/index.js +12 -0
- package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
- package/lib/i18n/en-US/components/navigation/image.js +6 -0
- package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
- package/lib/i18n/en-US/components/navigation/index.js +8 -0
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
- package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
- package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
- package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
- package/lib/i18n/en-US/components/settings/image.js +3 -0
- package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
- package/lib/i18n/en-US/components/settings/index.js +14 -0
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
- package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
- package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
- package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
- package/lib/i18n/en-US/components/settings/video.js +14 -0
- package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
- package/lib/i18n/en-US/components/utils/index.js +6 -0
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
- package/lib/i18n/en-US/index.d.ts +197 -0
- package/lib/i18n/en-US/index.js +16 -0
- package/lib/i18n/en-US/modules/index.d.ts +2 -0
- package/lib/i18n/en-US/modules/index.js +6 -0
- package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
- package/lib/i18n/en-US/pages/glossary.js +9 -0
- package/lib/i18n/en-US/pages/index.d.ts +13 -0
- package/lib/i18n/en-US/pages/index.js +8 -0
- package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
- package/lib/i18n/en-US/pages/user_upload.js +5 -0
- package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
- package/lib/i18n/en-US/shared/content_blocks.js +21 -0
- package/lib/i18n/en-US/shared/index.d.ts +39 -0
- package/lib/i18n/en-US/shared/index.js +10 -0
- package/lib/i18n/en-US/shared/menu.d.ts +4 -0
- package/lib/i18n/en-US/shared/menu.js +5 -0
- package/lib/i18n/en-US/shared/settings.d.ts +15 -0
- package/lib/i18n/en-US/shared/settings.js +16 -0
- package/lib/i18n/en-US.d.ts +197 -0
- package/lib/i18n/en-US.js +15 -0
- package/lib/models/UserFileAsset.d.ts +5 -0
- package/lib/models/UserFileAsset.js +37 -0
- package/package.json +1 -1
- package/plugin.js +43 -0
- package/test/Components/Content/Blocks/OpenResponse.spec.js +31 -0
- package/test/Components/Content/Blocks/OpenResponseCollate.spec.js +36 -0
- package/test/Components/Settings/OpenResponseCollateSettings.spec.js +20 -0
- package/test/Components/Settings/OpenResponseSettings.spec.js +20 -0
- package/test/__mocks__/helpersMock.js +3 -0
- package/test/__mocks__/modelMock.js +4 -0
package/package.json
CHANGED
package/plugin.js
CHANGED
|
@@ -11,6 +11,8 @@ import ClickableIcons from './components/Content/Blocks/ClickableIcons'
|
|
|
11
11
|
|
|
12
12
|
import UserUploadNav from './components/Navigation/Items/UserUploadNav.vue'
|
|
13
13
|
|
|
14
|
+
import OpenResponse from './components/Content/Blocks/OpenResponse'
|
|
15
|
+
import OpenResponseCollate from './components/Content/Blocks/OpenResponseCollate'
|
|
14
16
|
import Image from './components/Content/Blocks/Image'
|
|
15
17
|
import UserUpload from './components/Content/Blocks/UserUpload'
|
|
16
18
|
|
|
@@ -18,7 +20,10 @@ import GlossaryPage from './pages/glossary.vue'
|
|
|
18
20
|
import CourseGlossaryToolNav from './components/Navigation/Items/CourseGlossaryToolNav.vue'
|
|
19
21
|
import GlossaryNav from './components/Navigation/Items/GlossaryNav.vue'
|
|
20
22
|
import AskTheExpert from './components/Navigation/Items/AskTheExpert.vue'
|
|
23
|
+
|
|
21
24
|
// Entrypoint for npm
|
|
25
|
+
import OpenResponseSettings from './components/Settings/OpenResponseSettings.vue'
|
|
26
|
+
import OpenResponseCollateSettings from './components/Settings/OpenResponseCollateSettings.vue'
|
|
22
27
|
import ImageSettings from './components/Settings/ImageSettings.vue'
|
|
23
28
|
import UserUploadSettings from './components/Settings/UserUploadSettings.vue'
|
|
24
29
|
import ClickableIconsSettings from './components/Settings/ClickableIconsSettings.vue'
|
|
@@ -176,6 +181,26 @@ export default {
|
|
|
176
181
|
'windward.core.shared.content_blocks.grouping.basic',
|
|
177
182
|
},
|
|
178
183
|
},
|
|
184
|
+
{
|
|
185
|
+
tag: 'core-open-response',
|
|
186
|
+
template: OpenResponse,
|
|
187
|
+
metadata: {
|
|
188
|
+
icon: 'mdi-typewriter',
|
|
189
|
+
name: 'windward.core.shared.content_blocks.title.open_response',
|
|
190
|
+
grouping:
|
|
191
|
+
'windward.core.shared.content_blocks.grouping.basic',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
tag: 'core-open-response-collate',
|
|
196
|
+
template: OpenResponseCollate,
|
|
197
|
+
metadata: {
|
|
198
|
+
icon: 'mdi-typewriter',
|
|
199
|
+
name: 'windward.core.shared.content_blocks.title.open_response_collate',
|
|
200
|
+
grouping:
|
|
201
|
+
'windward.core.shared.content_blocks.grouping.basic',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
179
204
|
{
|
|
180
205
|
tag: 'core-image',
|
|
181
206
|
template: Image,
|
|
@@ -218,6 +243,24 @@ export default {
|
|
|
218
243
|
},
|
|
219
244
|
],
|
|
220
245
|
settings: [
|
|
246
|
+
{
|
|
247
|
+
tag: 'core-open-response-settings',
|
|
248
|
+
template: OpenResponseSettings,
|
|
249
|
+
context: ['block.core-open-response'],
|
|
250
|
+
metadata: {
|
|
251
|
+
icon: 'mdi-cog',
|
|
252
|
+
name: 'windward.core.shared.settings.title.open_response',
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
tag: 'core-open-response-collate-settings',
|
|
257
|
+
template: OpenResponseCollateSettings,
|
|
258
|
+
context: ['block.core-open-response-collate'],
|
|
259
|
+
metadata: {
|
|
260
|
+
icon: 'mdi-cog',
|
|
261
|
+
name: 'windward.core.shared.settings.title.open_response_collate',
|
|
262
|
+
},
|
|
263
|
+
},
|
|
221
264
|
{
|
|
222
265
|
tag: 'core-image-settings',
|
|
223
266
|
template: ImageSettings,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
import Vuetify from 'vuetify'
|
|
4
|
+
import { defaultMocks } from '@/test/mocks'
|
|
5
|
+
import OpenResponse from '@/components/Content/Blocks/OpenResponse.vue'
|
|
6
|
+
|
|
7
|
+
Vue.use(Vuetify)
|
|
8
|
+
|
|
9
|
+
describe('OpenResponse content block component', () => {
|
|
10
|
+
test('is a Vue instance', () => {
|
|
11
|
+
const wrapper = shallowMount(OpenResponse, {
|
|
12
|
+
vuetify: new Vuetify(),
|
|
13
|
+
mocks: defaultMocks,
|
|
14
|
+
propsData: {
|
|
15
|
+
value: {
|
|
16
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
17
|
+
tag: 'plugin-core-open-response',
|
|
18
|
+
body: '<p>Test Block</p>',
|
|
19
|
+
metadata: {
|
|
20
|
+
config: {
|
|
21
|
+
sample_response: 'sample response example',
|
|
22
|
+
starting_text: 'starting text example',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
expect(wrapper.vm).toBeTruthy()
|
|
30
|
+
})
|
|
31
|
+
})
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
import Vuetify from 'vuetify'
|
|
4
|
+
import { defaultMocks } from '@/test/mocks'
|
|
5
|
+
import Image from '@/components/Content/Blocks/Image.vue'
|
|
6
|
+
|
|
7
|
+
Vue.use(Vuetify)
|
|
8
|
+
|
|
9
|
+
describe('Image content block component', () => {
|
|
10
|
+
test('is a Vue instance', () => {
|
|
11
|
+
const wrapper = shallowMount(Image, {
|
|
12
|
+
vuetify: new Vuetify(),
|
|
13
|
+
mocks: defaultMocks,
|
|
14
|
+
propsData: {
|
|
15
|
+
value: {
|
|
16
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
17
|
+
tag: 'plugin-core-open-response-collate',
|
|
18
|
+
body: '00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002,00000000-0000-0000-0000-000000000003',
|
|
19
|
+
metadata: {
|
|
20
|
+
config: {
|
|
21
|
+
linked: [
|
|
22
|
+
'00000000-0000-0000-0000-000000000001',
|
|
23
|
+
'00000000-0000-0000-0000-000000000002',
|
|
24
|
+
'00000000-0000-0000-0000-000000000003',
|
|
25
|
+
],
|
|
26
|
+
filename: 'example_filename_override',
|
|
27
|
+
include_prompts: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
expect(wrapper.vm).toBeTruthy()
|
|
35
|
+
})
|
|
36
|
+
})
|
|
@@ -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 OpenResponseCollateSettings from '@/components/Settings/OpenResponseCollateSettings'
|
|
7
|
+
|
|
8
|
+
Vue.use(Vuetify)
|
|
9
|
+
|
|
10
|
+
describe('OpenResponseCollateSettings', () => {
|
|
11
|
+
test('is a Vue instance', () => {
|
|
12
|
+
const wrapper = shallowMount(OpenResponseCollateSettings, {
|
|
13
|
+
propsData: {
|
|
14
|
+
tag: 'core-open-response-collate-settings',
|
|
15
|
+
},
|
|
16
|
+
mocks: defaultMocks,
|
|
17
|
+
})
|
|
18
|
+
expect(wrapper.vm).toBeTruthy()
|
|
19
|
+
})
|
|
20
|
+
})
|
|
@@ -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 OpenResponseSettings from '@/components/Settings/OpenResponseSettings'
|
|
7
|
+
|
|
8
|
+
Vue.use(Vuetify)
|
|
9
|
+
|
|
10
|
+
describe('OpenResponseSettings', () => {
|
|
11
|
+
test('is a Vue instance', () => {
|
|
12
|
+
const wrapper = shallowMount(OpenResponseSettings, {
|
|
13
|
+
propsData: {
|
|
14
|
+
tag: 'core-open-response-settings',
|
|
15
|
+
},
|
|
16
|
+
mocks: defaultMocks,
|
|
17
|
+
})
|
|
18
|
+
expect(wrapper.vm).toBeTruthy()
|
|
19
|
+
})
|
|
20
|
+
})
|
|
@@ -8,6 +8,10 @@ jest.mock('axios')
|
|
|
8
8
|
|
|
9
9
|
// Define any new model mocks here. The imports / mocks will be auto-generated below
|
|
10
10
|
const mockVirtualModels = [
|
|
11
|
+
{
|
|
12
|
+
path: '~/models/UserContentBlockState',
|
|
13
|
+
resource: 'user-content-block-state',
|
|
14
|
+
},
|
|
11
15
|
{ path: '~/models/Enrollment', resource: 'enrollments' },
|
|
12
16
|
{ path: '~/models/ContentBlock', resource: 'blocks' },
|
|
13
17
|
{ path: '~/models/FileAsset', resource: 'file-assets' },
|