@windward/core 0.1.0 → 0.1.2
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/Accordion.vue +7 -2
- package/components/Content/Blocks/Email.vue +248 -0
- package/components/Content/Blocks/Image.vue +1 -1
- package/components/Content/Blocks/OpenResponse.vue +2 -2
- package/components/Content/Blocks/Tab.vue +7 -3
- package/components/Content/Blocks/UserUpload.vue +2 -2
- package/components/Settings/AccordionSettings.vue +9 -1
- package/components/Settings/EmailSettings.vue +216 -0
- package/components/Settings/ImageSettings.vue +1 -1
- package/components/Settings/OpenResponseCollateSettings.vue +1 -1
- package/components/Settings/OpenResponseSettings.vue +1 -1
- package/components/Settings/TabSettings.vue +7 -1
- package/components/Settings/TextEditorSettings.vue +1 -1
- package/components/Settings/UserUploadSettings.vue +1 -1
- package/components/utils/FillInBlank/FillInBlankInput.vue +5 -0
- package/components/utils/TinyMCEWrapper.vue +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/MathHelper.ts +3 -3
- package/i18n/en-US/components/content/blocks/email.ts +12 -0
- package/i18n/en-US/components/content/blocks/index.ts +3 -1
- package/i18n/en-US/components/settings/email.ts +9 -0
- package/i18n/en-US/components/settings/index.ts +2 -0
- package/i18n/en-US/shared/content_blocks.ts +1 -1
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/components/content/blocks/email.ts +12 -0
- package/i18n/es-ES/components/content/blocks/index.ts +3 -1
- package/i18n/es-ES/components/settings/email.ts +9 -0
- package/i18n/es-ES/components/settings/index.ts +3 -1
- package/i18n/es-ES/shared/content_blocks.ts +1 -1
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/email.ts +12 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +3 -1
- package/i18n/sv-SE/components/settings/email.ts +9 -0
- package/i18n/sv-SE/components/settings/index.ts +3 -1
- package/i18n/sv-SE/shared/content_blocks.ts +1 -1
- package/i18n/sv-SE/shared/settings.ts +3 -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 +21 -0
- package/test/Components/Content/Blocks/Accordion.spec.js +2 -0
- package/test/Components/Content/Blocks/BlockQuote.spec.js +2 -0
- package/test/Components/Content/Blocks/Email.spec.js +23 -0
- package/test/Components/Content/Blocks/Feedback.spec.js +1 -0
- package/test/Components/Content/Blocks/Math.spec.js +1 -0
- package/test/Components/Content/Blocks/Tab.spec.js +1 -0
- package/test/Components/Settings/EmailSettings.spec.js +45 -0
- package/test/__mocks__/componentsMock.js +6 -0
package/package.json
CHANGED
package/plugin.js
CHANGED
|
@@ -9,6 +9,7 @@ import Accordion from './components/Content/Blocks/Accordion'
|
|
|
9
9
|
import Feedback from './components/Content/Blocks/Feedback.vue'
|
|
10
10
|
import ClickableIcons from './components/Content/Blocks/ClickableIcons'
|
|
11
11
|
import ScenarioChoice from './components/Content/Blocks/ScenarioChoice'
|
|
12
|
+
import Email from './components/Content/Blocks/Email'
|
|
12
13
|
import BlockQuote from './components/Content/Blocks/BlockQuote.vue'
|
|
13
14
|
|
|
14
15
|
import UserUploadNav from './components/Navigation/Items/UserUploadNav.vue'
|
|
@@ -34,6 +35,7 @@ import VideoSettings from './components/Settings/VideoSettings.vue'
|
|
|
34
35
|
import AccordionSettings from './components/Settings/AccordionSettings.vue'
|
|
35
36
|
import TabSettings from './components/Settings/TabSettings.vue'
|
|
36
37
|
import FeedbackSettings from './components/Settings/FeedbackSettings.vue'
|
|
38
|
+
import EmailSettings from './components/Settings/EmailSettings.vue'
|
|
37
39
|
import BlockQuoteSettigns from './components/Settings/BlockQuoteSettings.vue'
|
|
38
40
|
|
|
39
41
|
import UserUploadPage from './pages/userUpload.vue'
|
|
@@ -253,6 +255,16 @@ export default {
|
|
|
253
255
|
'windward.core.shared.content_blocks.grouping.basic',
|
|
254
256
|
},
|
|
255
257
|
},
|
|
258
|
+
{
|
|
259
|
+
tag: 'core-email',
|
|
260
|
+
template: Email,
|
|
261
|
+
metadata: {
|
|
262
|
+
icon: 'mdi-email',
|
|
263
|
+
name: 'windward.core.shared.content_blocks.title.email',
|
|
264
|
+
grouping:
|
|
265
|
+
'windward.core.shared.content_blocks.grouping.basic',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
256
268
|
{
|
|
257
269
|
tag: 'core-block-quote',
|
|
258
270
|
template: BlockQuote,
|
|
@@ -382,6 +394,15 @@ export default {
|
|
|
382
394
|
name: 'windward.core.shared.settings.title.feedback',
|
|
383
395
|
},
|
|
384
396
|
},
|
|
397
|
+
{
|
|
398
|
+
tag: 'core-email-settings',
|
|
399
|
+
template: EmailSettings,
|
|
400
|
+
context: ['block.core-email'],
|
|
401
|
+
metadata: {
|
|
402
|
+
icon: 'mdi-notebook-outline',
|
|
403
|
+
name: 'windward.core.shared.settings.title.email',
|
|
404
|
+
},
|
|
405
|
+
},
|
|
385
406
|
{
|
|
386
407
|
tag: 'core-block-quote-settings',
|
|
387
408
|
template: BlockQuoteSettigns,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
import Vuetify from 'vuetify'
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
import { defaultMocks } from '@/test/mocks'
|
|
5
|
+
import Email from '@/components/Content/Blocks/Email'
|
|
6
|
+
|
|
7
|
+
Vue.use(Vuetify)
|
|
8
|
+
|
|
9
|
+
describe('Email', () => {
|
|
10
|
+
test('is a Vue instance', () => {
|
|
11
|
+
const wrapper = shallowMount(Email, {
|
|
12
|
+
vuetify: new Vuetify(),
|
|
13
|
+
mocks: defaultMocks,
|
|
14
|
+
propsData: {
|
|
15
|
+
value: {
|
|
16
|
+
body: 'email',
|
|
17
|
+
metadata: { config: {} },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
expect(wrapper.vm).toBeTruthy()
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
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 EmailSettings from '@/components/Settings/EmailSettings'
|
|
7
|
+
|
|
8
|
+
Vue.use(Vuetify)
|
|
9
|
+
|
|
10
|
+
describe('EmailSettings', () => {
|
|
11
|
+
test('is a Vue instance', () => {
|
|
12
|
+
const wrapper = shallowMount(EmailSettings, {
|
|
13
|
+
propsData: {
|
|
14
|
+
tag: 'core-email-settings',
|
|
15
|
+
},
|
|
16
|
+
mocks: defaultMocks,
|
|
17
|
+
})
|
|
18
|
+
expect(wrapper.vm).toBeTruthy()
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
test('can add an email', () => {
|
|
22
|
+
const wrapper = shallowMount(EmailSettings, {
|
|
23
|
+
propsData: {
|
|
24
|
+
tag: 'core-email-settings',
|
|
25
|
+
},
|
|
26
|
+
mocks: defaultMocks,
|
|
27
|
+
})
|
|
28
|
+
wrapper.vm.onAddElement()
|
|
29
|
+
expect(wrapper.vm.$data.block.metadata.config.emails).toEqual([
|
|
30
|
+
{ from: '', to: '', cc: '', body: '', expand: false },
|
|
31
|
+
{ from: '', to: '', cc: '', body: '', expand: false },
|
|
32
|
+
])
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test('can remove an email', () => {
|
|
36
|
+
const wrapper = shallowMount(EmailSettings, {
|
|
37
|
+
propsData: {
|
|
38
|
+
tag: 'core-email-settings',
|
|
39
|
+
},
|
|
40
|
+
mocks: defaultMocks,
|
|
41
|
+
})
|
|
42
|
+
wrapper.vm.onRemoveElement(0)
|
|
43
|
+
expect(wrapper.vm.$data.block.metadata.config.emails).toEqual([])
|
|
44
|
+
})
|
|
45
|
+
})
|
|
@@ -77,6 +77,9 @@ jest.mock(
|
|
|
77
77
|
props: {},
|
|
78
78
|
computed: {},
|
|
79
79
|
methods: {},
|
|
80
|
+
data() {
|
|
81
|
+
return { validation: {} }
|
|
82
|
+
},
|
|
80
83
|
}
|
|
81
84
|
},
|
|
82
85
|
{ virtual: true }
|
|
@@ -89,6 +92,9 @@ jest.mock(
|
|
|
89
92
|
props: {},
|
|
90
93
|
computed: {},
|
|
91
94
|
methods: {},
|
|
95
|
+
data() {
|
|
96
|
+
return { validation: {} }
|
|
97
|
+
},
|
|
92
98
|
}
|
|
93
99
|
},
|
|
94
100
|
{ virtual: true }
|