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