@windward/core 0.0.8 → 0.1.0
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/components/Content/Blocks/BlockQuote.vue +191 -0
- package/components/Content/Blocks/ClickableIcons.vue +128 -40
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionLikert.vue +25 -14
- package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionTrueFalse.vue +3 -7
- package/components/Content/Blocks/Image.vue +2 -2
- package/components/Content/Blocks/OpenResponse.vue +20 -14
- package/components/Content/Blocks/ScenarioChoice.vue +262 -0
- package/components/Content/Blocks/Tab.vue +2 -7
- package/components/Settings/AccordionSettings.vue +97 -74
- package/components/Settings/BlockQuoteSettings.vue +143 -0
- package/components/Settings/ClickableIconsSettings.vue +101 -86
- package/components/Settings/OpenResponseSettings.vue +6 -8
- package/components/Settings/ScenarioChoiceSettings.vue +329 -0
- package/components/Settings/TabSettings.vue +79 -62
- package/components/Settings/TextEditorSettings.vue +1 -3
- package/components/utils/FillInBlank/FillInBlankInput.vue +4 -1
- package/components/utils/MathExpressionEditor.vue +30 -15
- package/components/utils/TinyMCEWrapper.vue +3 -1
- package/helpers/FillInBlankHelper.ts +0 -2
- package/i18n/en-US/components/content/blocks/block_quote.ts +3 -0
- package/i18n/en-US/components/content/blocks/index.ts +4 -2
- package/i18n/en-US/components/content/blocks/scenario_choice.ts +5 -0
- package/i18n/en-US/components/settings/accordion.ts +5 -0
- package/i18n/en-US/components/settings/block_quote.ts +9 -0
- package/i18n/en-US/components/settings/clickable_icon.ts +8 -0
- package/i18n/en-US/components/settings/index.ts +8 -0
- package/i18n/en-US/components/settings/scenario_choice.ts +19 -0
- package/i18n/en-US/components/settings/tab.ts +7 -0
- package/i18n/en-US/components/utils/FillInBlank/FillInBlankInput.ts +1 -1
- package/i18n/en-US/components/utils/index.ts +2 -0
- package/i18n/en-US/components/utils/math_expression_editor.ts +3 -0
- package/i18n/en-US/shared/content_blocks.ts +2 -0
- package/i18n/en-US/shared/settings.ts +4 -0
- package/i18n/es-ES/components/content/blocks/block_quote.ts +3 -0
- package/i18n/es-ES/components/content/blocks/feedback.ts +2 -0
- package/i18n/es-ES/components/content/blocks/index.ts +4 -2
- package/i18n/es-ES/components/content/blocks/scenario_choice.ts +6 -0
- package/i18n/es-ES/components/navigation/index.ts +2 -0
- package/i18n/es-ES/components/settings/accordion.ts +5 -0
- package/i18n/es-ES/components/settings/block_quote.ts +9 -0
- package/i18n/es-ES/components/settings/clickable_icon.ts +8 -0
- package/i18n/es-ES/components/settings/index.ts +8 -0
- package/i18n/es-ES/components/settings/scenario_choice.ts +19 -0
- package/i18n/es-ES/components/{content/blocks → settings}/tab.ts +3 -0
- package/i18n/es-ES/components/utils/FillInBlank/FillInBlankInput.ts +13 -0
- package/i18n/es-ES/components/utils/FillInBlank/FillInTheBlanksManager.ts +11 -0
- package/i18n/es-ES/components/utils/FillInBlank/index.ts +6 -0
- package/i18n/es-ES/components/utils/index.ts +4 -1
- package/i18n/es-ES/components/utils/math_expression_editor.ts +3 -0
- package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/es-ES/shared/content_blocks.ts +2 -0
- package/i18n/es-ES/shared/menu.ts +1 -0
- package/i18n/es-ES/shared/settings.ts +4 -0
- package/i18n/index.ts +11 -0
- package/i18n/sv-SE/components/content/blocks/block_quote.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/feedback.ts +2 -0
- package/i18n/sv-SE/components/content/blocks/index.ts +4 -2
- package/i18n/sv-SE/components/content/blocks/scenario_choice.ts +5 -0
- package/i18n/sv-SE/components/navigation/index.ts +2 -0
- package/i18n/sv-SE/components/settings/accordion.ts +5 -0
- package/i18n/sv-SE/components/settings/block_quote.ts +9 -0
- package/i18n/sv-SE/components/settings/clickable_icon.ts +8 -0
- package/i18n/sv-SE/components/settings/index.ts +8 -0
- package/i18n/sv-SE/components/settings/scenario_choice.ts +19 -0
- package/i18n/sv-SE/components/{content/blocks → settings}/tab.ts +3 -0
- package/i18n/sv-SE/components/utils/FillInBlank/FillInBlankInput.ts +13 -0
- package/i18n/sv-SE/components/utils/FillInBlank/FillInTheBlanksManager.ts +11 -0
- package/i18n/sv-SE/components/utils/FillInBlank/index.ts +6 -0
- package/i18n/sv-SE/components/utils/index.ts +4 -1
- package/i18n/sv-SE/components/utils/math_expression_editor.ts +3 -0
- package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/sv-SE/shared/content_blocks.ts +2 -0
- package/i18n/sv-SE/shared/menu.ts +1 -0
- package/i18n/sv-SE/shared/settings.ts +4 -0
- package/package.json +5 -4
- package/plugin.js +45 -5
- package/test/Components/Content/Blocks/BlockQuote.spec.js +21 -0
- package/test/Components/Content/Blocks/ScenarioChoice.spec.js +21 -0
- package/test/Components/Settings/BlockQuoteSettings.spec.js +20 -0
- package/test/Components/Settings/ClickableIconsSettings.spec.js +1 -1
- package/test/Components/Settings/ScenarioChoiceSettings.spec.js +20 -0
- package/test/Feature/LocaleKeys.spec.js +9 -0
- package/test/__mocks__/componentsMock.js +24 -0
- package/test/locales.js +95 -0
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php-docker-settings.xml +0 -24
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/windward-ui-plugin-core.iml +0 -8
- package/coverage/clover.xml +0 -223
- package/coverage/coverage-final.json +0 -16
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
- package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
- package/coverage/lcov-report/components/utils/index.html +0 -161
- package/coverage/lcov-report/config/index.html +0 -116
- package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
- package/coverage/lcov-report/helpers/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov-report/test/mocks.js.html +0 -457
- package/coverage/lcov.info +0 -403
- package/i18n/en-US/components/content/blocks/tab.ts +0 -4
- package/lib/helpers/GlossaryHelper.d.ts +0 -9
- package/lib/helpers/GlossaryHelper.js +0 -118
- package/lib/helpers/GlossaryTerm.d.ts +0 -10
- package/lib/helpers/GlossaryTerm.js +0 -22
- package/lib/helpers/MathHelper.d.ts +0 -99
- package/lib/helpers/MathHelper.js +0 -194
- package/lib/helpers/tinymce/plugin.d.ts +0 -2
- package/lib/helpers/tinymce/plugin.js +0 -86
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
- package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
- package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
- package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
- package/lib/i18n/en-US/components/content/index.d.ts +0 -77
- package/lib/i18n/en-US/components/content/index.js +0 -6
- package/lib/i18n/en-US/components/index.d.ts +0 -140
- package/lib/i18n/en-US/components/index.js +0 -12
- package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
- package/lib/i18n/en-US/components/navigation/image.js +0 -6
- package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
- package/lib/i18n/en-US/components/navigation/index.js +0 -8
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
- package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
- package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
- package/lib/i18n/en-US/components/settings/image.js +0 -3
- package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
- package/lib/i18n/en-US/components/settings/index.js +0 -14
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
- package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
- package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
- package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
- package/lib/i18n/en-US/components/settings/video.js +0 -14
- package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
- package/lib/i18n/en-US/components/utils/index.js +0 -6
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
- package/lib/i18n/en-US/index.d.ts +0 -197
- package/lib/i18n/en-US/index.js +0 -16
- package/lib/i18n/en-US/modules/index.d.ts +0 -2
- package/lib/i18n/en-US/modules/index.js +0 -6
- package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
- package/lib/i18n/en-US/pages/glossary.js +0 -9
- package/lib/i18n/en-US/pages/index.d.ts +0 -13
- package/lib/i18n/en-US/pages/index.js +0 -8
- package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/pages/user_upload.js +0 -5
- package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
- package/lib/i18n/en-US/shared/content_blocks.js +0 -21
- package/lib/i18n/en-US/shared/index.d.ts +0 -39
- package/lib/i18n/en-US/shared/index.js +0 -10
- package/lib/i18n/en-US/shared/menu.d.ts +0 -4
- package/lib/i18n/en-US/shared/menu.js +0 -5
- package/lib/i18n/en-US/shared/settings.d.ts +0 -15
- package/lib/i18n/en-US/shared/settings.js +0 -16
- package/lib/i18n/en-US.d.ts +0 -197
- package/lib/i18n/en-US.js +0 -15
- package/lib/models/UserFileAsset.d.ts +0 -5
- package/lib/models/UserFileAsset.js +0 -37
|
@@ -1,60 +1,69 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-
|
|
4
|
-
<v-
|
|
5
|
-
{{ $t('windward.core.components.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:key="itemIndex"
|
|
11
|
-
class="elevation-0"
|
|
3
|
+
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
5
|
+
<p>{{ $t('windward.core.components.settings.tab.tabs') }}</p>
|
|
6
|
+
<SortableExpansionPanel
|
|
7
|
+
v-model="block.metadata.config.items"
|
|
8
|
+
@change="onDragged"
|
|
9
|
+
@click:close="onRemoveElement($event)"
|
|
12
10
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
<v-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
<template #header="{ item }">
|
|
12
|
+
{{ item.tabHeader !== '' ? item.tabHeader : 'No Header' }}
|
|
13
|
+
</template>
|
|
14
|
+
<template #body="{ item, index }">
|
|
15
|
+
<v-container :key="expansionPanelKey">
|
|
16
|
+
<p class="p-label">
|
|
17
|
+
{{
|
|
18
|
+
$t(
|
|
19
|
+
'windward.core.components.settings.tab.header'
|
|
20
|
+
)
|
|
21
|
+
}}
|
|
22
|
+
</p>
|
|
23
|
+
<v-text-field
|
|
24
|
+
outlined
|
|
25
|
+
:autofocus="true"
|
|
26
|
+
v-model="
|
|
27
|
+
block.metadata.config.items[index].tabHeader
|
|
27
28
|
"
|
|
28
|
-
|
|
29
|
-
>
|
|
30
|
-
<v-
|
|
31
|
-
v-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</v-
|
|
56
|
-
</v-
|
|
57
|
-
</v-
|
|
29
|
+
:placeholder="'item ' + (index + 1)"
|
|
30
|
+
></v-text-field>
|
|
31
|
+
<v-btn @click="onToggleExpand(index)" class="mb-3">
|
|
32
|
+
<v-icon
|
|
33
|
+
v-if="
|
|
34
|
+
!block.metadata.config.items[index].expand
|
|
35
|
+
"
|
|
36
|
+
>mdi-arrow-expand-all</v-icon
|
|
37
|
+
>
|
|
38
|
+
<v-icon
|
|
39
|
+
v-if="block.metadata.config.items[index].expand"
|
|
40
|
+
>
|
|
41
|
+
mdi-arrow-collapse-all
|
|
42
|
+
</v-icon>
|
|
43
|
+
</v-btn>
|
|
44
|
+
<TextEditor
|
|
45
|
+
v-model="block.metadata.config.items[index].content"
|
|
46
|
+
v-if="!item.expand"
|
|
47
|
+
:key="textEditorUpdateKey"
|
|
48
|
+
></TextEditor>
|
|
49
|
+
</v-container>
|
|
50
|
+
</template>
|
|
51
|
+
</SortableExpansionPanel>
|
|
52
|
+
<v-row justify="center" class="my-4">
|
|
53
|
+
<v-btn color="primary" @click="onAddElement">
|
|
54
|
+
<v-icon>mdi-plus</v-icon>
|
|
55
|
+
{{ $t('windward.core.components.settings.tab.add_tab') }}
|
|
56
|
+
</v-btn>
|
|
57
|
+
</v-row>
|
|
58
|
+
</v-form>
|
|
59
|
+
<div v-if="loading" class="text-center">
|
|
60
|
+
<v-progress-circular
|
|
61
|
+
:size="70"
|
|
62
|
+
:width="7"
|
|
63
|
+
color="primary"
|
|
64
|
+
indeterminate
|
|
65
|
+
></v-progress-circular>
|
|
66
|
+
</div>
|
|
58
67
|
</div>
|
|
59
68
|
</template>
|
|
60
69
|
|
|
@@ -63,17 +72,20 @@ import _, { get } from 'lodash'
|
|
|
63
72
|
import Crypto from '~/helpers/Crypto'
|
|
64
73
|
import TextEditor from '~/components/Text/TextEditor.vue'
|
|
65
74
|
import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
|
|
75
|
+
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
66
76
|
|
|
67
77
|
export default {
|
|
68
78
|
name: 'TabSettings',
|
|
69
|
-
components: { TextEditor },
|
|
79
|
+
components: { TextEditor, SortableExpansionPanel },
|
|
70
80
|
extends: BaseContentSettings,
|
|
71
81
|
beforeMount() {
|
|
72
82
|
if (_.isEmpty(this.block)) {
|
|
73
83
|
this.block = {}
|
|
74
84
|
}
|
|
75
85
|
if (_.isEmpty(this.block.body)) {
|
|
76
|
-
this.block.body =
|
|
86
|
+
this.block.body = this.$t(
|
|
87
|
+
'windward.core.components.settings.tab.tab'
|
|
88
|
+
)
|
|
77
89
|
}
|
|
78
90
|
if (_.isEmpty(this.block.metadata)) {
|
|
79
91
|
this.block.metadata = {}
|
|
@@ -93,12 +105,13 @@ export default {
|
|
|
93
105
|
this.block.metadata.config.items = []
|
|
94
106
|
this.block.metadata.config.items.push(defaultObject)
|
|
95
107
|
}
|
|
96
|
-
this.block.body = 'tab'
|
|
97
108
|
},
|
|
98
109
|
data() {
|
|
99
110
|
return {
|
|
100
111
|
expansionPanelKey: '0',
|
|
101
|
-
|
|
112
|
+
textEditorUpdateKey: Crypto.id(),
|
|
113
|
+
valid: true,
|
|
114
|
+
loading: false,
|
|
102
115
|
}
|
|
103
116
|
},
|
|
104
117
|
mounted() {
|
|
@@ -111,7 +124,6 @@ export default {
|
|
|
111
124
|
clearTimeout(this.debouncer)
|
|
112
125
|
}
|
|
113
126
|
},
|
|
114
|
-
|
|
115
127
|
methods: {
|
|
116
128
|
onAddElement() {
|
|
117
129
|
const defaultObject = {
|
|
@@ -125,9 +137,13 @@ export default {
|
|
|
125
137
|
this.block.metadata.config.items.splice(index, 1)
|
|
126
138
|
this.expansionPanelKey = Crypto.id()
|
|
127
139
|
},
|
|
128
|
-
onToggleExpand(
|
|
140
|
+
onToggleExpand(index) {
|
|
129
141
|
this.expansionPanelKey = Crypto.id()
|
|
130
|
-
return (
|
|
142
|
+
return (this.block.metadata.config.items[index].expand =
|
|
143
|
+
!this.block.metadata.config.items[index].expand)
|
|
144
|
+
},
|
|
145
|
+
onDragged() {
|
|
146
|
+
this.textEditorUpdateKey = Crypto.id()
|
|
131
147
|
},
|
|
132
148
|
},
|
|
133
149
|
}
|
|
@@ -136,7 +152,8 @@ export default {
|
|
|
136
152
|
.v-progress-circular {
|
|
137
153
|
margin: 1rem;
|
|
138
154
|
}
|
|
139
|
-
.
|
|
140
|
-
|
|
155
|
+
.p-label {
|
|
156
|
+
font-size: 16px;
|
|
157
|
+
font-weight: 500;
|
|
141
158
|
}
|
|
142
159
|
</style>
|
|
@@ -100,9 +100,7 @@
|
|
|
100
100
|
<br />
|
|
101
101
|
<text-editor
|
|
102
102
|
v-model="block.body"
|
|
103
|
-
v-
|
|
104
|
-
settingSelector.includes(1) && !block.metadata.config.expand
|
|
105
|
-
"
|
|
103
|
+
v-if="settingSelector.includes(1) && !block.metadata.config.expand"
|
|
106
104
|
autofill
|
|
107
105
|
></text-editor>
|
|
108
106
|
<v-skeleton-loader
|
|
@@ -133,7 +133,10 @@ export default {
|
|
|
133
133
|
|
|
134
134
|
computed: {
|
|
135
135
|
answerIsCorrect() {
|
|
136
|
-
if (
|
|
136
|
+
if (
|
|
137
|
+
_.trim(_.toLower(this.answer)) ===
|
|
138
|
+
_.trim(_.toLower(this.userInput))
|
|
139
|
+
) {
|
|
137
140
|
return true
|
|
138
141
|
}
|
|
139
142
|
return false
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-card flat class="py-12">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
<v-card-title>
|
|
5
|
+
{{
|
|
6
|
+
$t(
|
|
7
|
+
'windward.core.components.utils.math_expression_editor.title'
|
|
8
|
+
)
|
|
9
|
+
}}
|
|
10
|
+
</v-card-title>
|
|
11
|
+
<v-card-text>
|
|
12
|
+
<math-live-wrapper
|
|
13
|
+
ref="mathfield"
|
|
14
|
+
v-model="formula"
|
|
15
|
+
:id="mathElementId"
|
|
16
|
+
:options="options"
|
|
17
|
+
:value="value"
|
|
18
|
+
@change="submit"
|
|
19
|
+
></math-live-wrapper>
|
|
20
|
+
</v-card-text>
|
|
12
21
|
</v-card>
|
|
13
22
|
<v-card>
|
|
14
23
|
<v-card-text>
|
|
@@ -115,6 +124,7 @@
|
|
|
115
124
|
import MathHelper from '../../helpers/MathHelper'
|
|
116
125
|
import MathLiveWrapper from './MathLiveWrapper'
|
|
117
126
|
import tinymceConfig from '../../config/tinymce.config'
|
|
127
|
+
import Crypto from '~/helpers/Crypto'
|
|
118
128
|
export default {
|
|
119
129
|
components: { MathLiveWrapper },
|
|
120
130
|
layout: 'plugin',
|
|
@@ -140,6 +150,7 @@ export default {
|
|
|
140
150
|
tab: null,
|
|
141
151
|
toggle_exclusive: true,
|
|
142
152
|
panel: [],
|
|
153
|
+
mathElementId: '',
|
|
143
154
|
}
|
|
144
155
|
},
|
|
145
156
|
computed: {
|
|
@@ -158,6 +169,7 @@ export default {
|
|
|
158
169
|
},
|
|
159
170
|
},
|
|
160
171
|
beforeMount() {
|
|
172
|
+
this.mathElementId = Crypto.id()
|
|
161
173
|
if (this.mode === 'standalone') {
|
|
162
174
|
this.initStandaloneMode()
|
|
163
175
|
}
|
|
@@ -172,7 +184,6 @@ export default {
|
|
|
172
184
|
'*'
|
|
173
185
|
)
|
|
174
186
|
}
|
|
175
|
-
this.$refs.mathfield.focus()
|
|
176
187
|
},
|
|
177
188
|
created() {
|
|
178
189
|
if (this.mode === 'plugin') {
|
|
@@ -263,24 +274,28 @@ export default {
|
|
|
263
274
|
}
|
|
264
275
|
</script>
|
|
265
276
|
|
|
266
|
-
<style scoped>
|
|
277
|
+
<style lang="scss" scoped>
|
|
267
278
|
/* stylelint-disable-next-line selector-type-no-unknown */
|
|
268
279
|
math-field {
|
|
269
280
|
min-height: 150px;
|
|
270
|
-
outline: 2px solid
|
|
281
|
+
outline: 2px solid var(--v-primary-base);
|
|
271
282
|
border-radius: 4px;
|
|
283
|
+
width: 100%;
|
|
284
|
+
background: var(--v-background-base);
|
|
285
|
+
color: var(--v-primary-base);
|
|
272
286
|
}
|
|
273
287
|
/* stylelint-disable-next-line selector-type-no-unknown */
|
|
274
288
|
math-field:focus-within {
|
|
275
|
-
outline:
|
|
289
|
+
outline: 2px solid var(--v-secondary-base);
|
|
276
290
|
border-radius: 4px;
|
|
277
|
-
background:
|
|
291
|
+
background: var(--v-background-base);
|
|
292
|
+
color: var(--v-primary-base);
|
|
278
293
|
}
|
|
279
294
|
.btn {
|
|
280
295
|
cursor: pointer;
|
|
281
296
|
margin: 0 5px 5px 0;
|
|
282
297
|
border: 1px solid #595959;
|
|
283
|
-
background:
|
|
298
|
+
background: var(--v-background-base);
|
|
284
299
|
border-radius: 5px;
|
|
285
300
|
padding: 5px 10px;
|
|
286
301
|
min-height: 40px;
|
|
@@ -288,7 +303,7 @@ math-field:focus-within {
|
|
|
288
303
|
|
|
289
304
|
.btn:hover {
|
|
290
305
|
background: #595959;
|
|
291
|
-
color:
|
|
306
|
+
color: var(--v-background-base);
|
|
292
307
|
}
|
|
293
308
|
.adjustFont {
|
|
294
309
|
font-size: 12px !important;
|
|
@@ -37,6 +37,7 @@ export default {
|
|
|
37
37
|
default:
|
|
38
38
|
'undo redo | formatselect | fontsizeselect | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table bullist numlist outdent indent | mathButton ',
|
|
39
39
|
},
|
|
40
|
+
root_block: { type: String, required: false, default: 'div' },
|
|
40
41
|
},
|
|
41
42
|
beforeMount() {
|
|
42
43
|
this.text = this.value
|
|
@@ -61,6 +62,7 @@ export default {
|
|
|
61
62
|
return {
|
|
62
63
|
height: 500,
|
|
63
64
|
visual: false,
|
|
65
|
+
forced_root_block: this.root_block,
|
|
64
66
|
menubar: this.menubar,
|
|
65
67
|
menu: {
|
|
66
68
|
insert: {
|
|
@@ -190,7 +192,7 @@ export default {
|
|
|
190
192
|
contenteditable: 'true',
|
|
191
193
|
'data-feedback': btoa(
|
|
192
194
|
this.$t(
|
|
193
|
-
'windward.core.components.utils.fill_in_the_blank.fill_in_blank_input.
|
|
195
|
+
'windward.core.components.utils.fill_in_the_blank.fill_in_blank_input.default_description'
|
|
194
196
|
)
|
|
195
197
|
),
|
|
196
198
|
},
|
|
@@ -2,18 +2,20 @@ import user_upload from './user_upload'
|
|
|
2
2
|
import image from './image'
|
|
3
3
|
import video from './video'
|
|
4
4
|
import table from './table'
|
|
5
|
-
import tab from './tab'
|
|
6
5
|
import feedback from './feedback'
|
|
7
6
|
import open_response from './open_response'
|
|
8
7
|
import open_response_collate from './open_response_collate'
|
|
8
|
+
import scenarioChoice from './scenario_choice'
|
|
9
|
+
import block_quote from './block_quote'
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
12
|
user_upload,
|
|
12
13
|
image,
|
|
13
14
|
video,
|
|
14
15
|
table,
|
|
15
|
-
tab,
|
|
16
16
|
feedback,
|
|
17
17
|
open_response,
|
|
18
18
|
open_response_collate,
|
|
19
|
+
scenario_choice: scenarioChoice,
|
|
20
|
+
block_quote
|
|
19
21
|
}
|
|
@@ -2,8 +2,16 @@ export default {
|
|
|
2
2
|
title: 'Title',
|
|
3
3
|
description: 'Description',
|
|
4
4
|
information: 'Click on each of the list items below for more information.',
|
|
5
|
+
no_icon: 'No Icon',
|
|
5
6
|
item_icon: 'Item {0} icon',
|
|
6
7
|
item_title: 'Item Title',
|
|
7
8
|
item_color: 'Item Color',
|
|
8
9
|
item_text: 'Item Text',
|
|
10
|
+
autocolor: 'Auto-color Options',
|
|
11
|
+
display: {
|
|
12
|
+
show_title: 'Always Show Title',
|
|
13
|
+
show_background: 'Show Background',
|
|
14
|
+
round_icon: 'Round Icons',
|
|
15
|
+
italic_icon: 'Italic Icons',
|
|
16
|
+
},
|
|
9
17
|
}
|
|
@@ -5,13 +5,21 @@ import video from './video'
|
|
|
5
5
|
import clickable_icon from './clickable_icon'
|
|
6
6
|
import open_response from './open_response'
|
|
7
7
|
import open_response_collate from './open_response_collate'
|
|
8
|
+
import scenarioChoice from './scenario_choice'
|
|
9
|
+
import accordion from './accordion'
|
|
10
|
+
import tab from './tab'
|
|
11
|
+
import block_quote from './block_quote'
|
|
8
12
|
|
|
9
13
|
export default {
|
|
14
|
+
accordion,
|
|
10
15
|
image,
|
|
11
16
|
user_upload,
|
|
12
17
|
text_editor,
|
|
18
|
+
tab,
|
|
13
19
|
video,
|
|
14
20
|
clickable_icon,
|
|
15
21
|
open_response,
|
|
16
22
|
open_response_collate,
|
|
23
|
+
scenario_choice: scenarioChoice,
|
|
24
|
+
block_quote,
|
|
17
25
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Title',
|
|
3
|
+
description: 'Description',
|
|
4
|
+
over_item_limit: 'Cannot add more items',
|
|
5
|
+
no_title: 'No Title',
|
|
6
|
+
item_title: 'Item Title',
|
|
7
|
+
item_text: 'Item Text',
|
|
8
|
+
correct_choice: 'Is Correct Choice',
|
|
9
|
+
show_reset: 'Allow Retries',
|
|
10
|
+
display_style: 'Display Style',
|
|
11
|
+
is_linked: 'Block links to a page',
|
|
12
|
+
link_content: 'Link Content',
|
|
13
|
+
link_text: 'Link Text',
|
|
14
|
+
link_required: 'Link text and target page are required',
|
|
15
|
+
style: {
|
|
16
|
+
letter: 'Letters',
|
|
17
|
+
number: 'Numbers',
|
|
18
|
+
},
|
|
19
|
+
}
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
check_answer: 'Click to check answer',
|
|
6
6
|
close: 'Close',
|
|
7
7
|
correct: 'Correct',
|
|
8
|
-
default_description: '
|
|
8
|
+
default_description: 'Your input is correct',
|
|
9
9
|
incorrect: 'Incorrect',
|
|
10
10
|
input_incorrect: "'{0}' is incorrect",
|
|
11
11
|
reset: 'reset',
|
|
@@ -8,10 +8,14 @@ export default {
|
|
|
8
8
|
tab_settings: 'Tab Settings',
|
|
9
9
|
text_editor: 'Text Editor Settings',
|
|
10
10
|
clickable_icons: 'Clickable Icons Settings',
|
|
11
|
+
scenario_choice: 'Scenario Choice',
|
|
11
12
|
accordion: 'Accordion Settings',
|
|
12
13
|
video: 'Video Settings',
|
|
13
14
|
table: 'Table Settings',
|
|
14
15
|
math: 'Math Settings',
|
|
15
16
|
feedback: 'Feedback Settings',
|
|
17
|
+
block_quote: 'Block Quote Settings',
|
|
18
|
+
title: 'Title',
|
|
19
|
+
instructions: 'Instructions',
|
|
16
20
|
},
|
|
17
21
|
}
|
|
@@ -4,6 +4,8 @@ export default {
|
|
|
4
4
|
module: 'Módulo',
|
|
5
5
|
preset: 'Preajustes',
|
|
6
6
|
likert: 'Agregar preguntas tipo Likert estándar',
|
|
7
|
+
likert_directions:
|
|
8
|
+
'Haga clic para elegir la primera opción y luego use la pestaña para cambiar los grupos de botones y luego las flechas para navegar entre las opciones.',
|
|
7
9
|
contact_mindedge: 'Póngase en contacto con Mindedge pregunta',
|
|
8
10
|
open_response: 'Respuesta abierta',
|
|
9
11
|
response_prompt: 'Proporcione comentarios sobre el curso a continuación',
|
|
@@ -2,18 +2,20 @@ import user_upload from './user_upload'
|
|
|
2
2
|
import image from './image'
|
|
3
3
|
import video from './video'
|
|
4
4
|
import table from './table'
|
|
5
|
-
import tab from './tab'
|
|
6
5
|
import feedback from './feedback'
|
|
7
6
|
import open_response from './open_response'
|
|
8
7
|
import open_response_collate from './open_response_collate'
|
|
8
|
+
import scenarioChoice from './scenario_choice'
|
|
9
|
+
import block_quote from './block_quote'
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
12
|
user_upload,
|
|
12
13
|
image,
|
|
13
14
|
video,
|
|
14
15
|
table,
|
|
15
|
-
tab,
|
|
16
16
|
feedback,
|
|
17
17
|
open_response,
|
|
18
18
|
open_response_collate,
|
|
19
|
+
scenario_choice: scenarioChoice,
|
|
20
|
+
block_quote
|
|
19
21
|
}
|
|
@@ -3,8 +3,16 @@ export default {
|
|
|
3
3
|
description: 'Descripción',
|
|
4
4
|
information:
|
|
5
5
|
'Haga clic en cada uno de los elementos de la lista a continuación para obtener más información.',
|
|
6
|
+
no_icon: 'Sin icono',
|
|
6
7
|
item_icon: 'Ícono de elemento {0}',
|
|
7
8
|
item_title: 'Título del artículo',
|
|
8
9
|
item_color: 'Color del artículo',
|
|
9
10
|
item_text: 'Texto del elemento',
|
|
11
|
+
autocolor: 'Opciones de color automático',
|
|
12
|
+
display: {
|
|
13
|
+
show_title: 'Mostrar siempre el título',
|
|
14
|
+
show_background: 'Mostrar fondo',
|
|
15
|
+
round_icon: 'Iconos redondos',
|
|
16
|
+
italic_icon: 'Iconos en cursiva',
|
|
17
|
+
},
|
|
10
18
|
}
|
|
@@ -5,13 +5,21 @@ import video from './video'
|
|
|
5
5
|
import clickable_icon from './clickable_icon'
|
|
6
6
|
import open_response from './open_response'
|
|
7
7
|
import open_response_collate from './open_response_collate'
|
|
8
|
+
import scenarioChoice from './scenario_choice'
|
|
9
|
+
import accordion from './accordion'
|
|
10
|
+
import tab from './tab'
|
|
11
|
+
import block_quote from './block_quote'
|
|
8
12
|
|
|
9
13
|
export default {
|
|
14
|
+
accordion,
|
|
10
15
|
image,
|
|
11
16
|
user_upload,
|
|
12
17
|
text_editor,
|
|
18
|
+
tab,
|
|
13
19
|
video,
|
|
14
20
|
clickable_icon,
|
|
15
21
|
open_response,
|
|
16
22
|
open_response_collate,
|
|
23
|
+
scenario_choice: scenarioChoice,
|
|
24
|
+
block_quote
|
|
17
25
|
}
|