@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.
- 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 +2 -2
- package/components/Content/Blocks/Tab.vue +8 -1
- package/components/Settings/TabSettings.vue +5 -2
- package/components/utils/ContentViewer.vue +5 -2
- package/components/utils/TinyMCEWrapper.vue +118 -24
- package/components/utils/assets/tinymce/css/content.scss +188 -0
- 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/GlossaryHelper.ts +1 -1
- package/helpers/tinymce/plugin.ts +13 -4
- package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +11 -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 +4 -2
- package/plugin.js +0 -11
- package/components/Content/Blocks/Table.vue +0 -68
- 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.
|
|
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%;"> </td>
|
|
37
|
-
<td style="width: 19.7426%;"> </td>
|
|
38
|
-
<td style="width: 19.7426%;"> </td>
|
|
39
|
-
<td style="width: 19.7555%;"> </td>
|
|
40
|
-
</tr>
|
|
41
|
-
<tr>
|
|
42
|
-
<td style="width: 19.7426%;"> </td>
|
|
43
|
-
<td style="width: 19.7426%;"> </td>
|
|
44
|
-
<td style="width: 19.7426%;"> </td>
|
|
45
|
-
<td style="width: 19.7555%;"> </td>
|
|
46
|
-
</tr>
|
|
47
|
-
<tr>
|
|
48
|
-
<td style="width: 19.7426%;"> </td>
|
|
49
|
-
<td style="width: 19.7426%;"> </td>
|
|
50
|
-
<td style="width: 19.7426%;"> </td>
|
|
51
|
-
<td style="width: 19.7555%;"> </td>
|
|
52
|
-
</tr>
|
|
53
|
-
<tr>
|
|
54
|
-
<td style="width: 19.7426%;"> </td>
|
|
55
|
-
<td style="width: 19.7426%;"> </td>
|
|
56
|
-
<td style="width: 19.7426%;"> </td>
|
|
57
|
-
<td style="width: 19.7555%;"> </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
|
-
})
|