@windward/core 0.0.1 → 0.0.3

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 (122) 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 +2 -2
  11. package/components/Content/Blocks/Tab.vue +8 -1
  12. package/components/Settings/TabSettings.vue +5 -2
  13. package/components/utils/ContentViewer.vue +5 -2
  14. package/components/utils/TinyMCEWrapper.vue +118 -24
  15. package/components/utils/assets/tinymce/css/content.scss +188 -0
  16. package/coverage/clover.xml +223 -0
  17. package/coverage/coverage-final.json +16 -0
  18. package/coverage/lcov-report/base.css +224 -0
  19. package/coverage/lcov-report/block-navigation.js +87 -0
  20. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
  21. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
  22. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
  23. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
  24. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
  25. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
  26. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
  27. package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
  28. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
  29. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
  30. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
  31. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
  32. package/coverage/lcov-report/components/utils/index.html +161 -0
  33. package/coverage/lcov-report/config/index.html +116 -0
  34. package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
  35. package/coverage/lcov-report/favicon.png +0 -0
  36. package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
  37. package/coverage/lcov-report/helpers/index.html +116 -0
  38. package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
  39. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
  40. package/coverage/lcov-report/index.html +191 -0
  41. package/coverage/lcov-report/prettify.css +1 -0
  42. package/coverage/lcov-report/prettify.js +2 -0
  43. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  44. package/coverage/lcov-report/sorter.js +196 -0
  45. package/coverage/lcov-report/test/index.html +116 -0
  46. package/coverage/lcov-report/test/mocks.js.html +457 -0
  47. package/coverage/lcov.info +403 -0
  48. package/helpers/GlossaryHelper.ts +1 -1
  49. package/helpers/tinymce/plugin.ts +13 -4
  50. package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +11 -0
  51. package/lib/helpers/GlossaryHelper.d.ts +9 -0
  52. package/lib/helpers/GlossaryHelper.js +118 -0
  53. package/lib/helpers/GlossaryTerm.d.ts +10 -0
  54. package/lib/helpers/GlossaryTerm.js +22 -0
  55. package/lib/helpers/MathHelper.d.ts +99 -0
  56. package/lib/helpers/MathHelper.js +194 -0
  57. package/lib/helpers/tinymce/plugin.d.ts +2 -0
  58. package/lib/helpers/tinymce/plugin.js +86 -0
  59. package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
  60. package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
  61. package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
  62. package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
  63. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
  64. package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
  65. package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
  66. package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
  67. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
  68. package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
  69. package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
  70. package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
  71. package/lib/i18n/en-US/components/content/index.d.ts +77 -0
  72. package/lib/i18n/en-US/components/content/index.js +6 -0
  73. package/lib/i18n/en-US/components/index.d.ts +140 -0
  74. package/lib/i18n/en-US/components/index.js +12 -0
  75. package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
  76. package/lib/i18n/en-US/components/navigation/image.js +6 -0
  77. package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
  78. package/lib/i18n/en-US/components/navigation/index.js +8 -0
  79. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
  80. package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
  81. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
  82. package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
  83. package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
  84. package/lib/i18n/en-US/components/settings/image.js +3 -0
  85. package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
  86. package/lib/i18n/en-US/components/settings/index.js +14 -0
  87. package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
  88. package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
  89. package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
  90. package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
  91. package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
  92. package/lib/i18n/en-US/components/settings/video.js +14 -0
  93. package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
  94. package/lib/i18n/en-US/components/utils/index.js +6 -0
  95. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
  96. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
  97. package/lib/i18n/en-US/index.d.ts +197 -0
  98. package/lib/i18n/en-US/index.js +16 -0
  99. package/lib/i18n/en-US/modules/index.d.ts +2 -0
  100. package/lib/i18n/en-US/modules/index.js +6 -0
  101. package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
  102. package/lib/i18n/en-US/pages/glossary.js +9 -0
  103. package/lib/i18n/en-US/pages/index.d.ts +13 -0
  104. package/lib/i18n/en-US/pages/index.js +8 -0
  105. package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
  106. package/lib/i18n/en-US/pages/user_upload.js +5 -0
  107. package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
  108. package/lib/i18n/en-US/shared/content_blocks.js +21 -0
  109. package/lib/i18n/en-US/shared/index.d.ts +39 -0
  110. package/lib/i18n/en-US/shared/index.js +10 -0
  111. package/lib/i18n/en-US/shared/menu.d.ts +4 -0
  112. package/lib/i18n/en-US/shared/menu.js +5 -0
  113. package/lib/i18n/en-US/shared/settings.d.ts +15 -0
  114. package/lib/i18n/en-US/shared/settings.js +16 -0
  115. package/lib/i18n/en-US.d.ts +197 -0
  116. package/lib/i18n/en-US.js +15 -0
  117. package/lib/models/UserFileAsset.d.ts +5 -0
  118. package/lib/models/UserFileAsset.js +37 -0
  119. package/package.json +4 -2
  120. package/plugin.js +0 -11
  121. package/components/Content/Blocks/Table.vue +0 -68
  122. package/test/Components/Content/Blocks/Table.spec.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/core",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Windward UI Core Plugins",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -22,7 +22,8 @@
22
22
  "lodash": "^4.17.21",
23
23
  "mathlive": "^0.73.7",
24
24
  "mathml-to-latex": "^1.2.0",
25
- "prettier": "^2.6.0"
25
+ "prettier": "^2.6.0",
26
+ "raw-loader": "^4.0.2"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@babel/preset-env": "^7.16.11",
@@ -38,6 +39,7 @@
38
39
  "eslint-plugin-nuxt": "^3.2.0",
39
40
  "eslint-plugin-prettier": "^4.0.0",
40
41
  "jest": "^26.6.3",
42
+ "node-sass": "^8.0.0",
41
43
  "ts-jest": "^26.5.6",
42
44
  "typescript": "^4.6.3",
43
45
  "vue": "^2.6.14",
package/plugin.js CHANGED
@@ -2,7 +2,6 @@ import enUS from './i18n/en-US'
2
2
 
3
3
  // Content Blocks
4
4
  import Video from './components/Content/Blocks/Video'
5
- import Table from './components/Content/Blocks/Table'
6
5
  import Tab from './components/Content/Blocks/Tab'
7
6
  import Math from './components/Content/Blocks/Math'
8
7
  import MathExpressionEditor from './components/utils/MathExpressionEditor'
@@ -122,16 +121,6 @@ export default {
122
121
  'windward.core.shared.content_blocks.grouping.multimedia',
123
122
  },
124
123
  },
125
- {
126
- tag: 'core-table',
127
- template: Table,
128
- metadata: {
129
- icon: 'mdi-table',
130
- name: 'windward.core.shared.content_blocks.title.default_table',
131
- grouping:
132
- 'windward.core.shared.content_blocks.grouping.basic',
133
- },
134
- },
135
124
  {
136
125
  tag: 'core-tab',
137
126
  template: Tab,
@@ -1,68 +0,0 @@
1
- <template>
2
- <v-container>
3
- <TextEditor
4
- v-if="!render && block.metadata.config.expand"
5
- v-model="block.body"
6
- />
7
- <TextViewer
8
- v-if="render || !block.metadata.config.expand"
9
- v-model="block.body"
10
- />
11
- </v-container>
12
- </template>
13
- <script>
14
- import _ from 'lodash'
15
- import TextViewer from '~/components/Text/TextViewer.vue'
16
- import TextEditor from '~/components/Text/TextEditor.vue'
17
- import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
18
- export default {
19
- name: 'ContentBlockTable',
20
- components: { TextEditor, TextViewer },
21
- extends: BaseContentBlock,
22
- beforeMount() {
23
- // Apply the default config
24
- if (_.isEmpty(this.block.body)) {
25
- this.block.body = this.tablePreset
26
- }
27
- if (_.isEmpty(this.block.metadata.config)) {
28
- this.block.metadata.config = { expand: false }
29
- }
30
- },
31
- data() {
32
- return {
33
- tablePreset: `<table style="border-collapse: collapse; width: 99.951%;" border="1">
34
- <tbody>
35
- <tr>
36
- <td style="width: 19.7426%;">&nbsp;</td>
37
- <td style="width: 19.7426%;">&nbsp;</td>
38
- <td style="width: 19.7426%;">&nbsp;</td>
39
- <td style="width: 19.7555%;">&nbsp;</td>
40
- </tr>
41
- <tr>
42
- <td style="width: 19.7426%;">&nbsp;</td>
43
- <td style="width: 19.7426%;">&nbsp;</td>
44
- <td style="width: 19.7426%;">&nbsp;</td>
45
- <td style="width: 19.7555%;">&nbsp;</td>
46
- </tr>
47
- <tr>
48
- <td style="width: 19.7426%;">&nbsp;</td>
49
- <td style="width: 19.7426%;">&nbsp;</td>
50
- <td style="width: 19.7426%;">&nbsp;</td>
51
- <td style="width: 19.7555%;">&nbsp;</td>
52
- </tr>
53
- <tr>
54
- <td style="width: 19.7426%;">&nbsp;</td>
55
- <td style="width: 19.7426%;">&nbsp;</td>
56
- <td style="width: 19.7426%;">&nbsp;</td>
57
- <td style="width: 19.7555%;">&nbsp;</td>
58
- </tr>
59
- </tbody>
60
- </table>`,
61
- }
62
- },
63
- mounted() {},
64
- methods: {},
65
- }
66
- </script>
67
-
68
- <style scoped></style>
@@ -1,21 +0,0 @@
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 Table from '@/components/Content/Blocks/Table'
7
-
8
- Vue.use(Vuetify)
9
-
10
- describe('Table Component', () => {
11
- test('is a Vue instance', () => {
12
- const wrapper = shallowMount(Table, {
13
- vuetify: new Vuetify(),
14
- mocks: defaultMocks,
15
- propsData: {
16
- value: { body: 'Table', metadata: { config: {} } },
17
- },
18
- })
19
- expect(wrapper.vm).toBeTruthy()
20
- })
21
- })