@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.
Files changed (154) 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 +7 -2
  11. package/components/Content/Blocks/Email.vue +248 -0
  12. package/components/Content/Blocks/Image.vue +1 -1
  13. package/components/Content/Blocks/OpenResponse.vue +2 -2
  14. package/components/Content/Blocks/Tab.vue +7 -3
  15. package/components/Content/Blocks/UserUpload.vue +2 -2
  16. package/components/Settings/AccordionSettings.vue +9 -1
  17. package/components/Settings/EmailSettings.vue +216 -0
  18. package/components/Settings/ImageSettings.vue +1 -1
  19. package/components/Settings/OpenResponseCollateSettings.vue +1 -1
  20. package/components/Settings/OpenResponseSettings.vue +1 -1
  21. package/components/Settings/TabSettings.vue +7 -1
  22. package/components/Settings/TextEditorSettings.vue +1 -1
  23. package/components/Settings/UserUploadSettings.vue +1 -1
  24. package/components/utils/FillInBlank/FillInBlankInput.vue +5 -0
  25. package/components/utils/TinyMCEWrapper.vue +1 -1
  26. package/coverage/clover.xml +223 -0
  27. package/coverage/coverage-final.json +16 -0
  28. package/coverage/lcov-report/base.css +224 -0
  29. package/coverage/lcov-report/block-navigation.js +87 -0
  30. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
  31. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
  32. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
  33. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
  34. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
  35. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
  36. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
  37. package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
  38. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
  39. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
  40. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
  41. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
  42. package/coverage/lcov-report/components/utils/index.html +161 -0
  43. package/coverage/lcov-report/config/index.html +116 -0
  44. package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
  45. package/coverage/lcov-report/favicon.png +0 -0
  46. package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
  47. package/coverage/lcov-report/helpers/index.html +116 -0
  48. package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
  49. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
  50. package/coverage/lcov-report/index.html +191 -0
  51. package/coverage/lcov-report/prettify.css +1 -0
  52. package/coverage/lcov-report/prettify.js +2 -0
  53. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  54. package/coverage/lcov-report/sorter.js +196 -0
  55. package/coverage/lcov-report/test/index.html +116 -0
  56. package/coverage/lcov-report/test/mocks.js.html +457 -0
  57. package/coverage/lcov.info +403 -0
  58. package/helpers/MathHelper.ts +3 -3
  59. package/i18n/en-US/components/content/blocks/email.ts +12 -0
  60. package/i18n/en-US/components/content/blocks/index.ts +3 -1
  61. package/i18n/en-US/components/settings/email.ts +9 -0
  62. package/i18n/en-US/components/settings/index.ts +2 -0
  63. package/i18n/en-US/shared/content_blocks.ts +1 -1
  64. package/i18n/en-US/shared/settings.ts +3 -0
  65. package/i18n/es-ES/components/content/blocks/email.ts +12 -0
  66. package/i18n/es-ES/components/content/blocks/index.ts +3 -1
  67. package/i18n/es-ES/components/settings/email.ts +9 -0
  68. package/i18n/es-ES/components/settings/index.ts +3 -1
  69. package/i18n/es-ES/shared/content_blocks.ts +1 -1
  70. package/i18n/es-ES/shared/settings.ts +3 -0
  71. package/i18n/sv-SE/components/content/blocks/email.ts +12 -0
  72. package/i18n/sv-SE/components/content/blocks/index.ts +3 -1
  73. package/i18n/sv-SE/components/settings/email.ts +9 -0
  74. package/i18n/sv-SE/components/settings/index.ts +3 -1
  75. package/i18n/sv-SE/shared/content_blocks.ts +1 -1
  76. package/i18n/sv-SE/shared/settings.ts +3 -0
  77. package/lib/helpers/GlossaryHelper.d.ts +9 -0
  78. package/lib/helpers/GlossaryHelper.js +118 -0
  79. package/lib/helpers/GlossaryTerm.d.ts +10 -0
  80. package/lib/helpers/GlossaryTerm.js +22 -0
  81. package/lib/helpers/MathHelper.d.ts +99 -0
  82. package/lib/helpers/MathHelper.js +194 -0
  83. package/lib/helpers/tinymce/plugin.d.ts +2 -0
  84. package/lib/helpers/tinymce/plugin.js +86 -0
  85. package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
  86. package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
  87. package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
  88. package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
  89. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
  90. package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
  91. package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
  92. package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
  93. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
  94. package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
  95. package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
  96. package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
  97. package/lib/i18n/en-US/components/content/index.d.ts +77 -0
  98. package/lib/i18n/en-US/components/content/index.js +6 -0
  99. package/lib/i18n/en-US/components/index.d.ts +140 -0
  100. package/lib/i18n/en-US/components/index.js +12 -0
  101. package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
  102. package/lib/i18n/en-US/components/navigation/image.js +6 -0
  103. package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
  104. package/lib/i18n/en-US/components/navigation/index.js +8 -0
  105. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
  106. package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
  107. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
  108. package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
  109. package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
  110. package/lib/i18n/en-US/components/settings/image.js +3 -0
  111. package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
  112. package/lib/i18n/en-US/components/settings/index.js +14 -0
  113. package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
  114. package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
  115. package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
  116. package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
  117. package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
  118. package/lib/i18n/en-US/components/settings/video.js +14 -0
  119. package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
  120. package/lib/i18n/en-US/components/utils/index.js +6 -0
  121. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
  122. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
  123. package/lib/i18n/en-US/index.d.ts +197 -0
  124. package/lib/i18n/en-US/index.js +16 -0
  125. package/lib/i18n/en-US/modules/index.d.ts +2 -0
  126. package/lib/i18n/en-US/modules/index.js +6 -0
  127. package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
  128. package/lib/i18n/en-US/pages/glossary.js +9 -0
  129. package/lib/i18n/en-US/pages/index.d.ts +13 -0
  130. package/lib/i18n/en-US/pages/index.js +8 -0
  131. package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
  132. package/lib/i18n/en-US/pages/user_upload.js +5 -0
  133. package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
  134. package/lib/i18n/en-US/shared/content_blocks.js +21 -0
  135. package/lib/i18n/en-US/shared/index.d.ts +39 -0
  136. package/lib/i18n/en-US/shared/index.js +10 -0
  137. package/lib/i18n/en-US/shared/menu.d.ts +4 -0
  138. package/lib/i18n/en-US/shared/menu.js +5 -0
  139. package/lib/i18n/en-US/shared/settings.d.ts +15 -0
  140. package/lib/i18n/en-US/shared/settings.js +16 -0
  141. package/lib/i18n/en-US.d.ts +197 -0
  142. package/lib/i18n/en-US.js +15 -0
  143. package/lib/models/UserFileAsset.d.ts +5 -0
  144. package/lib/models/UserFileAsset.js +37 -0
  145. package/package.json +1 -1
  146. package/plugin.js +21 -0
  147. package/test/Components/Content/Blocks/Accordion.spec.js +2 -0
  148. package/test/Components/Content/Blocks/BlockQuote.spec.js +2 -0
  149. package/test/Components/Content/Blocks/Email.spec.js +23 -0
  150. package/test/Components/Content/Blocks/Feedback.spec.js +1 -0
  151. package/test/Components/Content/Blocks/Math.spec.js +1 -0
  152. package/test/Components/Content/Blocks/Tab.spec.js +1 -0
  153. package/test/Components/Settings/EmailSettings.spec.js +45 -0
  154. package/test/__mocks__/componentsMock.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Windward UI Core Plugins",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
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,
@@ -9,6 +9,8 @@ Vue.use(Vuetify)
9
9
  describe('Accordion', () => {
10
10
  test('is a Vue instance', () => {
11
11
  const wrapper = shallowMount(Accordion, {
12
+ vuetify: new Vuetify(),
13
+ mocks: defaultMocks,
12
14
  propsData: {
13
15
  value: {
14
16
  body: 'accordion',
@@ -9,6 +9,8 @@ Vue.use(Vuetify)
9
9
  describe('BlockQuote', () => {
10
10
  test('is a Vue instance', () => {
11
11
  const wrapper = shallowMount(BlockQuote, {
12
+ vuetify: new Vuetify(),
13
+ mocks: defaultMocks,
12
14
  propsData: {
13
15
  value: {
14
16
  body: 'block quote',
@@ -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
+ })
@@ -10,6 +10,7 @@ describe('Feedback', () => {
10
10
  test('is a Vue instance', () => {
11
11
  const wrapper = shallowMount(Feedback, {
12
12
  vuetify: new Vuetify(),
13
+ mocks: defaultMocks,
13
14
  propsData: {
14
15
  value: {
15
16
  body: 'feedback',
@@ -19,6 +19,7 @@ describe('ContentMathEditor component', () => {
19
19
  test('is a Vue instance', () => {
20
20
  const wrapper = shallowMount(CoreMath, {
21
21
  vuetify: new Vuetify(),
22
+ mocks: defaultMocks,
22
23
  propsData: {
23
24
  value: {
24
25
  id: '00000000-0000-0000-0000-000000000000',
@@ -10,6 +10,7 @@ Vue.use(Vuetify)
10
10
  describe('Tab', () => {
11
11
  test('is a Vue instance', () => {
12
12
  const wrapper = shallowMount(Tab, {
13
+ vuetify: new Vuetify(),
13
14
  propsData: {
14
15
  value: { body: 'tab', metadata: { config: {} } },
15
16
  },
@@ -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 }