@windward/core 0.0.9 → 0.1.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 (61) hide show
  1. package/components/Content/Blocks/Accordion.vue +7 -2
  2. package/components/Content/Blocks/BlockQuote.vue +191 -0
  3. package/components/Content/Blocks/Email.vue +248 -0
  4. package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionLikert.vue +25 -14
  5. package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionTrueFalse.vue +3 -7
  6. package/components/Content/Blocks/Image.vue +1 -1
  7. package/components/Content/Blocks/OpenResponse.vue +22 -16
  8. package/components/Content/Blocks/Tab.vue +7 -3
  9. package/components/Content/Blocks/UserUpload.vue +2 -2
  10. package/components/Settings/AccordionSettings.vue +9 -1
  11. package/components/Settings/BlockQuoteSettings.vue +143 -0
  12. package/components/Settings/EmailSettings.vue +216 -0
  13. package/components/Settings/ImageSettings.vue +1 -1
  14. package/components/Settings/OpenResponseCollateSettings.vue +1 -1
  15. package/components/Settings/OpenResponseSettings.vue +7 -9
  16. package/components/Settings/TabSettings.vue +14 -5
  17. package/components/Settings/TextEditorSettings.vue +1 -1
  18. package/components/Settings/UserUploadSettings.vue +1 -1
  19. package/components/utils/MathExpressionEditor.vue +30 -15
  20. package/components/utils/TinyMCEWrapper.vue +3 -1
  21. package/i18n/en-US/components/content/blocks/block_quote.ts +3 -0
  22. package/i18n/en-US/components/content/blocks/email.ts +12 -0
  23. package/i18n/en-US/components/content/blocks/index.ts +4 -0
  24. package/i18n/en-US/components/settings/block_quote.ts +9 -0
  25. package/i18n/en-US/components/settings/email.ts +9 -0
  26. package/i18n/en-US/components/settings/index.ts +4 -0
  27. package/i18n/en-US/components/utils/index.ts +2 -0
  28. package/i18n/en-US/components/utils/math_expression_editor.ts +3 -0
  29. package/i18n/en-US/shared/content_blocks.ts +2 -1
  30. package/i18n/en-US/shared/settings.ts +5 -0
  31. package/i18n/es-ES/components/content/blocks/block_quote.ts +3 -0
  32. package/i18n/es-ES/components/content/blocks/email.ts +12 -0
  33. package/i18n/es-ES/components/content/blocks/index.ts +4 -0
  34. package/i18n/es-ES/components/settings/block_quote.ts +9 -0
  35. package/i18n/es-ES/components/settings/email.ts +9 -0
  36. package/i18n/es-ES/components/settings/index.ts +4 -0
  37. package/i18n/es-ES/components/utils/index.ts +2 -1
  38. package/i18n/es-ES/components/utils/math_expression_editor.ts +3 -0
  39. package/i18n/es-ES/shared/content_blocks.ts +2 -1
  40. package/i18n/es-ES/shared/settings.ts +5 -0
  41. package/i18n/sv-SE/components/content/blocks/block_quote.ts +3 -0
  42. package/i18n/sv-SE/components/content/blocks/email.ts +12 -0
  43. package/i18n/sv-SE/components/content/blocks/index.ts +4 -0
  44. package/i18n/sv-SE/components/settings/block_quote.ts +9 -0
  45. package/i18n/sv-SE/components/settings/email.ts +9 -0
  46. package/i18n/sv-SE/components/settings/index.ts +4 -0
  47. package/i18n/sv-SE/components/utils/index.ts +2 -1
  48. package/i18n/sv-SE/components/utils/math_expression_editor.ts +3 -0
  49. package/i18n/sv-SE/shared/content_blocks.ts +2 -1
  50. package/i18n/sv-SE/shared/settings.ts +5 -0
  51. package/package.json +4 -4
  52. package/plugin.js +42 -0
  53. package/test/Components/Content/Blocks/Accordion.spec.js +2 -0
  54. package/test/Components/Content/Blocks/BlockQuote.spec.js +23 -0
  55. package/test/Components/Content/Blocks/Email.spec.js +23 -0
  56. package/test/Components/Content/Blocks/Feedback.spec.js +1 -0
  57. package/test/Components/Content/Blocks/Math.spec.js +1 -0
  58. package/test/Components/Content/Blocks/Tab.spec.js +1 -0
  59. package/test/Components/Settings/BlockQuoteSettings.spec.js +20 -0
  60. package/test/Components/Settings/EmailSettings.spec.js +45 -0
  61. package/test/__mocks__/componentsMock.js +6 -0
@@ -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 BlockQuoteSettings from '@/components/Settings/BlockQuoteSettings'
7
+
8
+ Vue.use(Vuetify)
9
+
10
+ describe('BlockQuoteSettings', () => {
11
+ test('is a Vue instance', () => {
12
+ const wrapper = shallowMount(BlockQuoteSettings, {
13
+ propsData: {
14
+ tag: 'core-block-quote-settings',
15
+ },
16
+ mocks: defaultMocks,
17
+ })
18
+ expect(wrapper.vm).toBeTruthy()
19
+ })
20
+ })
@@ -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 }