@windward/core 0.2.3 → 0.4.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/babel.config.js +1 -1
- package/components/Content/Blocks/Accordion.vue +37 -0
- package/components/Content/Blocks/ClickableIcons.vue +107 -20
- package/components/Content/Blocks/Email.vue +9 -0
- package/components/Content/Blocks/Image.vue +48 -20
- package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +1 -1
- package/components/Content/Blocks/Video.vue +80 -9
- package/components/Navigation/Items/AskTheExpert.vue +2 -1
- package/components/Navigation/Items/CourseGlossaryToolNav.vue +2 -1
- package/components/Settings/AccordionSettings.vue +64 -4
- package/components/Settings/BlockQuoteSettings.vue +9 -1
- package/components/Settings/ClickableIconsSettings.vue +104 -13
- package/components/Settings/EmailSettings.vue +13 -13
- package/components/Settings/FeedbackSettings.vue +2 -1
- package/components/Settings/HorizontalRuleSettings.vue +2 -1
- package/components/Settings/ImageSettings.vue +148 -39
- package/components/Settings/MathSettings.vue +6 -5
- package/components/Settings/OpenResponseCollateSettings.vue +5 -1
- package/components/Settings/OpenResponseSettings.vue +9 -4
- package/components/Settings/ScenarioChoiceSettings.vue +15 -4
- package/components/Settings/TabSettings.vue +12 -4
- package/components/Settings/TextEditorSettings.vue +14 -7
- package/components/Settings/UserUploadSettings.vue +11 -4
- package/components/Settings/VideoSettings.vue +121 -66
- package/components/utils/ContentViewer.vue +6 -1
- package/components/utils/MathExpressionEditor.vue +10 -5
- package/components/utils/TinyMCEWrapper.vue +120 -19
- package/components/utils/assets/tinymce/content/dark/content.scss +4 -0
- package/components/utils/assets/tinymce/{css/content.scss → content/global.scss} +38 -37
- package/components/utils/assets/tinymce/content/light/content.scss +4 -0
- package/components/utils/assets/tinymce/ui/dark/content.scss +803 -0
- package/components/utils/assets/tinymce/ui/dark/skin.scss +4727 -0
- package/components/utils/assets/tinymce/ui/global.scss +19 -0
- package/components/utils/assets/tinymce/ui/light/content.scss +822 -0
- package/components/utils/assets/tinymce/ui/light/skin.scss +4731 -0
- package/components/utils/glossary/CourseGlossary.vue +4 -3
- package/components/utils/glossary/CourseGlossaryForm.vue +1 -1
- package/config/tinymce.config.ts +22 -14
- package/helpers/FillInBlankHelper.ts +34 -28
- package/helpers/GlossaryHelper.ts +90 -73
- package/helpers/MathHelper.ts +49 -28
- package/helpers/tinymce/plugin.ts +9 -7
- package/i18n/en-US/components/content/blocks/image.ts +1 -1
- package/i18n/en-US/components/settings/clickable_icon.ts +2 -0
- package/i18n/en-US/components/settings/image.ts +6 -1
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/components/content/blocks/image.ts +1 -1
- package/i18n/es-ES/components/settings/clickable_icon.ts +2 -0
- package/i18n/es-ES/components/settings/image.ts +8 -1
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/image.ts +1 -1
- package/i18n/sv-SE/components/settings/clickable_icon.ts +2 -0
- package/i18n/sv-SE/components/settings/image.ts +6 -1
- package/i18n/sv-SE/shared/settings.ts +3 -0
- package/package.json +4 -3
- package/test/Components/Settings/AccordionSettings.spec.js +16 -2
- package/test/__mocks__/componentsMock.js +57 -97
- package/test/__mocks__/contentBlockMock.js +7 -1
- package/test/__mocks__/contentSettingsMock.js +8 -1
- package/test/__mocks__/helpersMock.js +9 -0
- package/test/__mocks__/modelMock.js +101 -31
- package/test/helpers/MathHelper.spec.js +22 -3
- package/tsconfig.json +1 -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/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
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
<v-container>
|
|
3
3
|
<ContentBlockAsset
|
|
4
4
|
mimes="image/jpeg,image/png,image/gif"
|
|
5
|
-
|
|
5
|
+
v-model="block.metadata.config.asset"
|
|
6
6
|
class="mb-4"
|
|
7
|
+
:disabled="render"
|
|
8
|
+
@click:file="onFileSelect"
|
|
7
9
|
>
|
|
8
10
|
<template #title>
|
|
9
11
|
{{ $t('windward.core.components.content.blocks.image.title') }}
|
|
@@ -18,39 +20,98 @@
|
|
|
18
20
|
</ContentBlockAsset>
|
|
19
21
|
|
|
20
22
|
<v-switch
|
|
21
|
-
v-model="block.metadata.config.
|
|
23
|
+
v-model="block.metadata.config.hideBackground"
|
|
22
24
|
:label="
|
|
23
25
|
$t('windward.core.components.settings.image.hide_background')
|
|
24
26
|
"
|
|
27
|
+
:disabled="render"
|
|
25
28
|
></v-switch>
|
|
26
29
|
<v-switch
|
|
27
30
|
v-model="block.metadata.config.modal"
|
|
28
31
|
:label="$t('windward.core.components.settings.image.modal')"
|
|
32
|
+
:disabled="render"
|
|
29
33
|
></v-switch>
|
|
30
34
|
<v-tooltip top color="primary">
|
|
31
|
-
<template
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
<template #activator="{ on, attrs }">
|
|
36
|
+
<v-switch
|
|
37
|
+
v-model="block.metadata.config.decorative"
|
|
38
|
+
:disabled="render"
|
|
39
|
+
@change="onDecorativeToggled($event)"
|
|
40
|
+
>
|
|
41
|
+
<template #label>
|
|
42
|
+
<span v-bind="attrs" v-on="on">
|
|
43
|
+
{{
|
|
44
|
+
$t(
|
|
45
|
+
'windward.core.components.settings.image.decorative'
|
|
46
|
+
)
|
|
47
|
+
}}
|
|
48
|
+
<v-icon x-small class="help-offset-icon">
|
|
49
|
+
mdi-help
|
|
50
|
+
</v-icon>
|
|
51
|
+
</span>
|
|
52
|
+
</template>
|
|
53
|
+
</v-switch>
|
|
46
54
|
</template>
|
|
47
55
|
<span class="span-description">{{
|
|
48
|
-
$t(
|
|
56
|
+
$t(
|
|
57
|
+
'windward.core.components.settings.image.decorative_toggle_description'
|
|
58
|
+
)
|
|
49
59
|
}}</span>
|
|
50
60
|
</v-tooltip>
|
|
51
61
|
|
|
52
62
|
<v-form v-if="!block.metadata.config.decorative">
|
|
63
|
+
<v-tooltip top color="primary">
|
|
64
|
+
<template #activator="{ on, attrs }">
|
|
65
|
+
<v-switch
|
|
66
|
+
v-model="block.metadata.config.inherit"
|
|
67
|
+
:disabled="render"
|
|
68
|
+
>
|
|
69
|
+
<template #label>
|
|
70
|
+
<span v-bind="attrs" v-on="on">
|
|
71
|
+
{{
|
|
72
|
+
$t(
|
|
73
|
+
'windward.core.components.settings.image.inherit'
|
|
74
|
+
)
|
|
75
|
+
}}
|
|
76
|
+
<v-icon x-small class="help-offset-icon">
|
|
77
|
+
mdi-help
|
|
78
|
+
</v-icon>
|
|
79
|
+
</span>
|
|
80
|
+
</template>
|
|
81
|
+
</v-switch>
|
|
82
|
+
</template>
|
|
83
|
+
<span class="span-description">{{
|
|
84
|
+
$t(
|
|
85
|
+
'windward.core.components.settings.image.inherit_global_toggle_description'
|
|
86
|
+
)
|
|
87
|
+
}}</span>
|
|
88
|
+
</v-tooltip>
|
|
89
|
+
|
|
90
|
+
<v-alert
|
|
91
|
+
v-if="block.metadata.config.inherit && !assetAltText"
|
|
92
|
+
type="warning"
|
|
93
|
+
>
|
|
94
|
+
{{
|
|
95
|
+
$t('windward.core.components.settings.image.inherit_no_alt')
|
|
96
|
+
}}
|
|
97
|
+
</v-alert>
|
|
98
|
+
|
|
99
|
+
<v-text-field
|
|
100
|
+
v-if="block.metadata.config.inherit && assetAltText"
|
|
101
|
+
:value="assetAltText"
|
|
102
|
+
:label="
|
|
103
|
+
$t('windward.core.components.navigation.image.default_alt')
|
|
104
|
+
"
|
|
105
|
+
outlined
|
|
106
|
+
counter
|
|
107
|
+
maxlength="125"
|
|
108
|
+
:rules="validation.textRules"
|
|
109
|
+
disabled
|
|
110
|
+
>
|
|
111
|
+
</v-text-field>
|
|
112
|
+
|
|
53
113
|
<v-text-field
|
|
114
|
+
v-if="!block.metadata.config.inherit"
|
|
54
115
|
v-model="block.metadata.config.alt"
|
|
55
116
|
outlined
|
|
56
117
|
counter
|
|
@@ -59,10 +120,11 @@
|
|
|
59
120
|
$t('windward.core.components.navigation.image.default_alt')
|
|
60
121
|
"
|
|
61
122
|
:rules="validation.textRules"
|
|
123
|
+
:disabled="render"
|
|
62
124
|
>
|
|
63
|
-
<template
|
|
125
|
+
<template #append>
|
|
64
126
|
<v-tooltip top color="primary">
|
|
65
|
-
<template
|
|
127
|
+
<template #activator="{ on }">
|
|
66
128
|
<v-icon v-on="on" small>mdi-help</v-icon>
|
|
67
129
|
</template>
|
|
68
130
|
<span class="span-description">{{
|
|
@@ -76,8 +138,10 @@
|
|
|
76
138
|
<h5 class="pb-2">
|
|
77
139
|
{{ $t('windward.core.components.settings.image.screenreader') }}
|
|
78
140
|
<v-tooltip top color="primary">
|
|
79
|
-
<template
|
|
80
|
-
<v-icon v-on="on" small class="
|
|
141
|
+
<template #activator="{ on }">
|
|
142
|
+
<v-icon v-on="on" small class="help-offset-icon">
|
|
143
|
+
mdi-help
|
|
144
|
+
</v-icon>
|
|
81
145
|
</template>
|
|
82
146
|
<span class="span-description">{{
|
|
83
147
|
$t(
|
|
@@ -87,9 +151,26 @@
|
|
|
87
151
|
</v-tooltip>
|
|
88
152
|
</h5>
|
|
89
153
|
<TextEditor
|
|
90
|
-
v-
|
|
154
|
+
v-if="!block.metadata.config.inherit"
|
|
155
|
+
v-model="block.metadata.config.ariaDescribedBy"
|
|
91
156
|
menubar="bullist numlist"
|
|
157
|
+
:disabled="render"
|
|
92
158
|
></TextEditor>
|
|
159
|
+
|
|
160
|
+
<div v-if="block.metadata.config.inherit">
|
|
161
|
+
<v-card v-if="assetDescribedByText">
|
|
162
|
+
<v-card-text>
|
|
163
|
+
<TextViewer v-model="assetDescribedByText"></TextViewer>
|
|
164
|
+
</v-card-text>
|
|
165
|
+
</v-card>
|
|
166
|
+
<v-alert v-if="!assetDescribedByText" type="warning">
|
|
167
|
+
{{
|
|
168
|
+
$t(
|
|
169
|
+
'windward.core.components.settings.image.inherit_no_aria'
|
|
170
|
+
)
|
|
171
|
+
}}
|
|
172
|
+
</v-alert>
|
|
173
|
+
</div>
|
|
93
174
|
</v-form>
|
|
94
175
|
</v-container>
|
|
95
176
|
</template>
|
|
@@ -97,17 +178,38 @@
|
|
|
97
178
|
<script>
|
|
98
179
|
import _ from 'lodash'
|
|
99
180
|
import TextEditor from '~/components/Text/TextEditor'
|
|
100
|
-
import
|
|
181
|
+
import TextViewer from '~/components/Text/TextViewer'
|
|
182
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
101
183
|
import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
|
|
102
184
|
|
|
103
185
|
export default {
|
|
104
186
|
name: 'ImageSettings',
|
|
105
187
|
extends: BaseContentSettings,
|
|
106
|
-
components: { ContentBlockAsset, TextEditor },
|
|
188
|
+
components: { ContentBlockAsset, TextEditor, TextViewer },
|
|
107
189
|
props: {
|
|
108
190
|
settings: { type: Object, required: false, default: null },
|
|
109
191
|
context: { type: String, required: false, default: 'block' },
|
|
110
192
|
},
|
|
193
|
+
computed: {
|
|
194
|
+
assetAltText() {
|
|
195
|
+
// Get the block aria info and fallback to the asset metadata
|
|
196
|
+
return _.get(this.fileAsset, 'metadata.props.alt', null)
|
|
197
|
+
},
|
|
198
|
+
assetDescribedByText() {
|
|
199
|
+
// Get the block aria info and fallback to the asset metadata
|
|
200
|
+
return _.get(
|
|
201
|
+
this.fileAsset,
|
|
202
|
+
'metadata.props.aria_describedby',
|
|
203
|
+
null
|
|
204
|
+
)
|
|
205
|
+
},
|
|
206
|
+
fileAsset() {
|
|
207
|
+
return _.get(this.block, 'assets[0].asset', null)
|
|
208
|
+
},
|
|
209
|
+
fileAssetMap() {
|
|
210
|
+
return _.get(this.block, 'metadata.config.asset', null)
|
|
211
|
+
},
|
|
212
|
+
},
|
|
111
213
|
beforeMount() {
|
|
112
214
|
if (_.isEmpty(this.block)) {
|
|
113
215
|
this.block = {}
|
|
@@ -121,11 +223,17 @@ export default {
|
|
|
121
223
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
122
224
|
this.block.metadata.config = {}
|
|
123
225
|
}
|
|
226
|
+
if (_.isEmpty(this.block.metadata.config.asset)) {
|
|
227
|
+
this.block.metadata.config.asset = null
|
|
228
|
+
}
|
|
124
229
|
if (_.isEmpty(this.block.metadata.config.alt)) {
|
|
125
230
|
this.block.metadata.config.alt = ''
|
|
126
231
|
}
|
|
127
|
-
if (!_.isBoolean(this.block.metadata.config.
|
|
128
|
-
this.block.metadata.config.
|
|
232
|
+
if (!_.isBoolean(this.block.metadata.config.hideBackground)) {
|
|
233
|
+
this.block.metadata.config.hideBackground = false
|
|
234
|
+
}
|
|
235
|
+
if (!_.isBoolean(this.block.metadata.config.inherit)) {
|
|
236
|
+
this.block.metadata.config.inherit = true
|
|
129
237
|
}
|
|
130
238
|
if (!_.isBoolean(this.block.metadata.config.modal)) {
|
|
131
239
|
this.block.metadata.config.modal = false
|
|
@@ -133,18 +241,12 @@ export default {
|
|
|
133
241
|
if (!_.isBoolean(this.block.metadata.config.decorative)) {
|
|
134
242
|
this.block.metadata.config.decorative = false
|
|
135
243
|
}
|
|
136
|
-
if (_.isEmpty(this.block.metadata.config.
|
|
137
|
-
this.block.metadata.config.
|
|
244
|
+
if (_.isEmpty(this.block.metadata.config.ariaDescribedBy)) {
|
|
245
|
+
this.block.metadata.config.ariaDescribedBy = ''
|
|
138
246
|
}
|
|
139
247
|
},
|
|
140
248
|
data() {
|
|
141
249
|
return {
|
|
142
|
-
imageSettings: {
|
|
143
|
-
// Default values
|
|
144
|
-
alt_text: '',
|
|
145
|
-
aria_described: '',
|
|
146
|
-
release_results: 'submitted',
|
|
147
|
-
},
|
|
148
250
|
validation: {
|
|
149
251
|
textRules: [
|
|
150
252
|
(v) => !!v || this.$t('shared.forms.errors.required'),
|
|
@@ -157,16 +259,19 @@ export default {
|
|
|
157
259
|
methods: {
|
|
158
260
|
onDecorativeToggled(evt) {
|
|
159
261
|
if (evt) {
|
|
160
|
-
this.block.metadata.config.
|
|
262
|
+
this.block.metadata.config.ariaDescribedBy = ''
|
|
161
263
|
this.block.metadata.config.alt = ''
|
|
162
264
|
}
|
|
163
265
|
},
|
|
164
266
|
onFileSelect(file) {
|
|
267
|
+
// Clear out the body since we're defining a proper file link now
|
|
268
|
+
this.block.body = ''
|
|
269
|
+
|
|
165
270
|
// file = null when you remove a file
|
|
166
271
|
if (_.isEmpty(file)) {
|
|
167
|
-
this.block.
|
|
272
|
+
this.block.assets = []
|
|
168
273
|
} else {
|
|
169
|
-
this.block.
|
|
274
|
+
this.block.assets = [file]
|
|
170
275
|
|
|
171
276
|
//Assign height and width for skeleton loader
|
|
172
277
|
if (!_.isEmpty(file.asset.metadata.props)) {
|
|
@@ -182,7 +287,7 @@ export default {
|
|
|
182
287
|
''
|
|
183
288
|
)
|
|
184
289
|
|
|
185
|
-
this.block.metadata.config.
|
|
290
|
+
this.block.metadata.config.ariaDescribedBy = _.get(
|
|
186
291
|
file,
|
|
187
292
|
'asset.metadata.props.aria_describedby',
|
|
188
293
|
''
|
|
@@ -198,4 +303,8 @@ export default {
|
|
|
198
303
|
justify-content: center;
|
|
199
304
|
width: 200px;
|
|
200
305
|
}
|
|
306
|
+
.help-offset-icon {
|
|
307
|
+
position: relative;
|
|
308
|
+
top: -8px;
|
|
309
|
+
}
|
|
201
310
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<br />
|
|
4
|
-
<v-btn @click="onToggleExpand" text class="mb-2">
|
|
4
|
+
<v-btn :disabled="render" @click="onToggleExpand" text class="mb-2">
|
|
5
5
|
<v-icon v-if="!block.metadata.config.expand" color="primary"
|
|
6
6
|
>mdi-arrow-expand-all</v-icon
|
|
7
7
|
>
|
|
@@ -11,18 +11,19 @@
|
|
|
11
11
|
</v-btn>
|
|
12
12
|
<math-expression-editor
|
|
13
13
|
v-if="!block.metadata.config.expand"
|
|
14
|
-
:key="key"
|
|
15
|
-
:shrinkFont="true"
|
|
16
14
|
v-model="block.metadata.config.formula"
|
|
17
|
-
mode="standalone"
|
|
18
15
|
:value="block.metadata.config.formula"
|
|
16
|
+
mode="standalone"
|
|
17
|
+
:key="key"
|
|
18
|
+
:shrinkFont="true"
|
|
19
|
+
:disabled="render"
|
|
19
20
|
></math-expression-editor>
|
|
20
21
|
<br />
|
|
21
22
|
</div>
|
|
22
23
|
</template>
|
|
23
24
|
|
|
24
25
|
<script>
|
|
25
|
-
import BaseContentSettings from '~/components/Content/
|
|
26
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
26
27
|
import MathExpressionEditor from '../utils/MathExpressionEditor.vue'
|
|
27
28
|
import _ from 'lodash'
|
|
28
29
|
import Crypto from '~/helpers/Crypto'
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
'windward.core.components.settings.open_response_collate.include_prompts'
|
|
16
16
|
)
|
|
17
17
|
"
|
|
18
|
+
:disabled="render"
|
|
18
19
|
></v-switch>
|
|
19
20
|
<v-text-field
|
|
20
21
|
v-model="block.metadata.config.filename"
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
'windward.core.components.settings.open_response_collate.filename'
|
|
24
25
|
)
|
|
25
26
|
"
|
|
27
|
+
:disabled="render"
|
|
26
28
|
></v-text-field>
|
|
27
29
|
<v-list>
|
|
28
30
|
<v-list-item-group
|
|
@@ -60,6 +62,7 @@
|
|
|
60
62
|
<v-checkbox
|
|
61
63
|
:input-value="active"
|
|
62
64
|
color="primary"
|
|
65
|
+
:disabled="render"
|
|
63
66
|
></v-checkbox>
|
|
64
67
|
</v-list-item-action>
|
|
65
68
|
</template>
|
|
@@ -76,7 +79,7 @@ import _ from 'lodash'
|
|
|
76
79
|
import { mapGetters } from 'vuex'
|
|
77
80
|
import draggable from 'vuedraggable'
|
|
78
81
|
import TextEditor from '~/components/Text/TextEditor'
|
|
79
|
-
import BaseContentSettings from '~/components/Content/
|
|
82
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
80
83
|
import ContentBlock from '~/models/ContentBlock'
|
|
81
84
|
import Course from '~/models/Course'
|
|
82
85
|
|
|
@@ -103,6 +106,7 @@ export default {
|
|
|
103
106
|
dragOptions() {
|
|
104
107
|
return {
|
|
105
108
|
animation: 200,
|
|
109
|
+
disabled: this.render,
|
|
106
110
|
}
|
|
107
111
|
},
|
|
108
112
|
},
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
)
|
|
9
9
|
}}
|
|
10
10
|
</p>
|
|
11
|
-
<TextEditor
|
|
11
|
+
<TextEditor
|
|
12
|
+
v-model="block.body"
|
|
13
|
+
:height="200"
|
|
14
|
+
:disabled="render"
|
|
15
|
+
></TextEditor>
|
|
12
16
|
<p class="pt-4">
|
|
13
17
|
{{
|
|
14
18
|
$t(
|
|
@@ -19,6 +23,7 @@
|
|
|
19
23
|
<TextEditor
|
|
20
24
|
v-model="block.metadata.config.sample_response"
|
|
21
25
|
:height="200"
|
|
26
|
+
:disabled="render"
|
|
22
27
|
></TextEditor>
|
|
23
28
|
<p class="pt-4">
|
|
24
29
|
{{
|
|
@@ -30,6 +35,7 @@
|
|
|
30
35
|
<TextEditor
|
|
31
36
|
v-model="block.metadata.config.starting_text"
|
|
32
37
|
:height="200"
|
|
38
|
+
:disabled="render"
|
|
33
39
|
></TextEditor>
|
|
34
40
|
</v-form>
|
|
35
41
|
</v-container>
|
|
@@ -38,13 +44,12 @@
|
|
|
38
44
|
<script>
|
|
39
45
|
import _ from 'lodash'
|
|
40
46
|
import TextEditor from '~/components/Text/TextEditor'
|
|
41
|
-
import BaseContentSettings from '~/components/Content/
|
|
42
|
-
import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
|
|
47
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
43
48
|
|
|
44
49
|
export default {
|
|
45
50
|
name: 'ImageSettings',
|
|
46
51
|
extends: BaseContentSettings,
|
|
47
|
-
components: {
|
|
52
|
+
components: { TextEditor },
|
|
48
53
|
props: {
|
|
49
54
|
settings: { type: Object, required: false, default: null },
|
|
50
55
|
context: { type: String, required: false, default: 'block' },
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
'windward.core.components.settings.scenario_choice.title'
|
|
11
11
|
)
|
|
12
12
|
"
|
|
13
|
+
:disabled="render"
|
|
13
14
|
></v-text-field>
|
|
14
15
|
<v-text-field
|
|
15
16
|
v-model="block.metadata.config.description"
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
'windward.core.components.settings.scenario_choice.description'
|
|
20
21
|
)
|
|
21
22
|
"
|
|
23
|
+
:disabled="render"
|
|
22
24
|
></v-text-field>
|
|
23
25
|
<v-select
|
|
24
26
|
v-model="block.metadata.config.display_style"
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
'windward.core.components.settings.scenario_choice.display_style'
|
|
29
31
|
)
|
|
30
32
|
"
|
|
33
|
+
:disabled="render"
|
|
31
34
|
></v-select>
|
|
32
35
|
<v-switch
|
|
33
36
|
v-model="isLinked"
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
'windward.core.components.settings.scenario_choice.is_linked'
|
|
37
40
|
)
|
|
38
41
|
"
|
|
42
|
+
:disabled="render"
|
|
39
43
|
@click="onClickLinkSwitch"
|
|
40
44
|
></v-switch>
|
|
41
45
|
|
|
@@ -46,11 +50,13 @@
|
|
|
46
50
|
'windward.core.components.settings.scenario_choice.show_reset'
|
|
47
51
|
)
|
|
48
52
|
"
|
|
53
|
+
:disabled="render"
|
|
49
54
|
></v-switch>
|
|
50
55
|
</v-col>
|
|
51
56
|
<v-col class="pa-0">
|
|
52
57
|
<SortableExpansionPanel
|
|
53
58
|
v-model="block.metadata.config.items"
|
|
59
|
+
:disabled="render"
|
|
54
60
|
@click:close="onRemoveElement"
|
|
55
61
|
>
|
|
56
62
|
<template #header="{ item }">
|
|
@@ -75,6 +81,7 @@
|
|
|
75
81
|
'windward.core.components.settings.scenario_choice.item_title'
|
|
76
82
|
)
|
|
77
83
|
"
|
|
84
|
+
:disabled="render"
|
|
78
85
|
></v-text-field>
|
|
79
86
|
|
|
80
87
|
<v-switch
|
|
@@ -86,6 +93,7 @@
|
|
|
86
93
|
'windward.core.components.settings.scenario_choice.correct_choice'
|
|
87
94
|
)
|
|
88
95
|
"
|
|
96
|
+
:disabled="render"
|
|
89
97
|
></v-switch>
|
|
90
98
|
|
|
91
99
|
<span>{{
|
|
@@ -98,6 +106,7 @@
|
|
|
98
106
|
block.metadata.config.items[index].body
|
|
99
107
|
"
|
|
100
108
|
:height="200"
|
|
109
|
+
:disabled="render"
|
|
101
110
|
></TextEditor>
|
|
102
111
|
</v-container>
|
|
103
112
|
</template>
|
|
@@ -106,7 +115,9 @@
|
|
|
106
115
|
<v-row justify="center" class="my-4">
|
|
107
116
|
<v-btn
|
|
108
117
|
color="primary"
|
|
109
|
-
:disabled="
|
|
118
|
+
:disabled="
|
|
119
|
+
render || block.metadata.config.items.length > 26
|
|
120
|
+
"
|
|
110
121
|
@click="onAddElement"
|
|
111
122
|
>
|
|
112
123
|
<v-icon>mdi-plus</v-icon>
|
|
@@ -184,10 +195,10 @@
|
|
|
184
195
|
<script>
|
|
185
196
|
import _ from 'lodash'
|
|
186
197
|
import { mapGetters } from 'vuex'
|
|
187
|
-
import BaseContentSettings from '~/components/Content/
|
|
198
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
188
199
|
import TextEditor from '~/components/Text/TextEditor'
|
|
189
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
190
|
-
import DialogBox from '~/components/DialogBox.vue'
|
|
200
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
201
|
+
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
191
202
|
|
|
192
203
|
export default {
|
|
193
204
|
name: 'ScenarioChoiceSettings',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<SortableExpansionPanel
|
|
7
7
|
v-model="block.metadata.config.items"
|
|
8
8
|
v-bind:currentPanel.sync="block.metadata.config.currentTab"
|
|
9
|
+
:disabled="render"
|
|
9
10
|
@change="onDragged"
|
|
10
11
|
@click:close="onRemoveElement($event)"
|
|
11
12
|
>
|
|
@@ -28,8 +29,14 @@
|
|
|
28
29
|
block.metadata.config.items[index].tabHeader
|
|
29
30
|
"
|
|
30
31
|
:placeholder="'item ' + (index + 1)"
|
|
32
|
+
:disabled="render"
|
|
31
33
|
></v-text-field>
|
|
32
|
-
<v-btn
|
|
34
|
+
<v-btn
|
|
35
|
+
@click="onToggleExpand(index)"
|
|
36
|
+
text
|
|
37
|
+
class="mb-3"
|
|
38
|
+
:disabled="render"
|
|
39
|
+
>
|
|
33
40
|
<v-icon
|
|
34
41
|
v-if="
|
|
35
42
|
!block.metadata.config.items[index].expand
|
|
@@ -48,12 +55,13 @@
|
|
|
48
55
|
v-model="block.metadata.config.items[index].content"
|
|
49
56
|
v-if="!item.expand"
|
|
50
57
|
:key="textEditorUpdateKey"
|
|
58
|
+
:disabled="render"
|
|
51
59
|
></TextEditor>
|
|
52
60
|
</v-container>
|
|
53
61
|
</template>
|
|
54
62
|
</SortableExpansionPanel>
|
|
55
63
|
<v-row justify="center" class="my-4">
|
|
56
|
-
<v-btn color="primary" @click="onAddElement">
|
|
64
|
+
<v-btn color="primary" :disabled="render" @click="onAddElement">
|
|
57
65
|
<v-icon>mdi-plus</v-icon>
|
|
58
66
|
{{ $t('windward.core.components.settings.tab.add_tab') }}
|
|
59
67
|
</v-btn>
|
|
@@ -74,8 +82,8 @@
|
|
|
74
82
|
import _, { get } from 'lodash'
|
|
75
83
|
import Crypto from '~/helpers/Crypto'
|
|
76
84
|
import TextEditor from '~/components/Text/TextEditor'
|
|
77
|
-
import BaseContentSettings from '~/components/Content/
|
|
78
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
85
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
86
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
79
87
|
|
|
80
88
|
export default {
|
|
81
89
|
name: 'TabSettings',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<v-btn-toggle v-model="settingSelector" multiple borderless>
|
|
6
6
|
<v-tooltip top>
|
|
7
7
|
<template #activator="{ on, attrs }">
|
|
8
|
-
<v-btn v-bind="attrs" v-on="on" text>
|
|
8
|
+
<v-btn v-bind="attrs" v-on="on" text :disabled="render">
|
|
9
9
|
<v-icon>mdi-comment-text-multiple</v-icon>
|
|
10
10
|
{{
|
|
11
11
|
$t(
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<v-tooltip top>
|
|
27
27
|
<template #activator="{ on, attrs }">
|
|
28
|
-
<v-btn v-bind="attrs" v-on="on" text>
|
|
28
|
+
<v-btn v-bind="attrs" v-on="on" text :disabled="render">
|
|
29
29
|
<v-icon> mdi-text-long</v-icon>
|
|
30
30
|
{{
|
|
31
31
|
$t(
|
|
@@ -48,11 +48,12 @@
|
|
|
48
48
|
<v-btn
|
|
49
49
|
v-bind="attrs"
|
|
50
50
|
v-on="on"
|
|
51
|
+
text
|
|
52
|
+
:disabled="render"
|
|
51
53
|
@click="
|
|
52
54
|
block.metadata.config.expand =
|
|
53
55
|
!block.metadata.config.expand
|
|
54
56
|
"
|
|
55
|
-
text
|
|
56
57
|
>
|
|
57
58
|
<v-icon
|
|
58
59
|
v-if="!block.metadata.config.expand"
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
close
|
|
97
98
|
color="success"
|
|
98
99
|
close-icon="mdi-pencil"
|
|
100
|
+
:disabled="render"
|
|
99
101
|
@click:close="editTerm(verified)"
|
|
100
102
|
>
|
|
101
103
|
{{ verified.term }}
|
|
@@ -118,6 +120,7 @@
|
|
|
118
120
|
close
|
|
119
121
|
color="error"
|
|
120
122
|
close-icon="mdi-content-save-plus-outline"
|
|
123
|
+
:disabled="render"
|
|
121
124
|
@click:close="addGlossaryTerm(unVerified)"
|
|
122
125
|
>
|
|
123
126
|
{{ unVerified.term }}
|
|
@@ -140,11 +143,12 @@
|
|
|
140
143
|
>
|
|
141
144
|
</div>
|
|
142
145
|
<br />
|
|
143
|
-
<
|
|
144
|
-
v-model="block.body"
|
|
146
|
+
<TextEditor
|
|
145
147
|
v-if="settingSelector.includes(1) && !block.metadata.config.expand"
|
|
148
|
+
v-model="block.body"
|
|
146
149
|
autofill
|
|
147
|
-
|
|
150
|
+
:disabled="render"
|
|
151
|
+
></TextEditor>
|
|
148
152
|
<v-skeleton-loader
|
|
149
153
|
v-bind="attrs"
|
|
150
154
|
type=" table-row-divider, list-item, divider, list-item, divider, image,image"
|
|
@@ -156,6 +160,7 @@
|
|
|
156
160
|
max-width="600px"
|
|
157
161
|
action-save
|
|
158
162
|
:trigger="false"
|
|
163
|
+
:disabled="render"
|
|
159
164
|
@click:save="save"
|
|
160
165
|
@click:outside="close"
|
|
161
166
|
@click:close="close"
|
|
@@ -177,15 +182,17 @@
|
|
|
177
182
|
|
|
178
183
|
<script>
|
|
179
184
|
import { mapGetters, mapMutations } from 'vuex'
|
|
185
|
+
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
180
186
|
import GlossaryHelper from '../../helpers/GlossaryHelper'
|
|
181
187
|
import Course from '~/models/Course'
|
|
182
|
-
import BaseContentSettings from '~/components/Content/
|
|
188
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
183
189
|
import TextEditor from '~/components/Text/TextEditor'
|
|
184
190
|
import CourseGlossaryForm from '../utils/glossary/CourseGlossaryForm.vue'
|
|
185
191
|
export default {
|
|
186
192
|
name: 'TextEditorSettings',
|
|
187
193
|
extends: BaseContentSettings,
|
|
188
194
|
components: {
|
|
195
|
+
DialogBox,
|
|
189
196
|
TextEditor,
|
|
190
197
|
CourseGlossaryForm,
|
|
191
198
|
},
|