@windward/core 0.25.1 → 0.27.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/CHANGELOG.md +44 -0
- package/components/Content/Blocks/Accordion.vue +8 -14
- package/components/Content/Blocks/BlockQuote.vue +29 -4
- package/components/Content/Blocks/ClickableIcons.vue +18 -6
- package/components/Content/Blocks/Email.vue +10 -3
- package/components/Content/Blocks/Feedback/FeedbackAnalytics.vue +179 -0
- package/components/Content/Blocks/Feedback.vue +115 -111
- package/components/Content/Blocks/Image.vue +4 -0
- package/components/Content/Blocks/OpenResponse.vue +0 -9
- package/components/Content/Blocks/OpenResponseCollate.vue +27 -0
- package/components/Content/Blocks/ScenarioChoice.vue +10 -1
- package/components/Content/Blocks/Tab.vue +15 -28
- package/components/Content/Blocks/UserUpload.vue +65 -37
- package/components/Content/Blocks/Video.vue +17 -7
- package/components/Settings/AccordionSettings.vue +3 -15
- package/components/Settings/BlockQuoteSettings.vue +6 -4
- package/components/Settings/ClickableIconsSettings.vue +21 -7
- package/components/Settings/EmailSettings.vue +3 -11
- package/components/Settings/FileDownloadSettings.vue +8 -2
- package/components/Settings/OpenResponseCollateSettings.vue +19 -1
- package/components/Settings/OpenResponseSettings.vue +8 -7
- package/components/Settings/ScenarioChoiceSettings.vue +11 -5
- package/components/Settings/TabSettings.vue +3 -18
- package/components/Settings/UserUploadSettings.vue +16 -8
- package/components/Settings/VideoSettings/SourcePicker.vue +34 -8
- package/components/Settings/VideoSettings.vue +18 -2
- package/components/utils/glossary/GlossaryToolTip.vue +4 -23
- package/helpers/GlossaryHelper.ts +4 -7
- package/i18n/en-US/components/content/blocks/accordion.ts +3 -0
- package/i18n/en-US/components/content/blocks/block_quote.ts +3 -1
- package/i18n/en-US/components/content/blocks/feedback.ts +2 -0
- package/i18n/en-US/components/content/blocks/file_download.ts +2 -1
- package/i18n/en-US/components/content/blocks/index.ts +2 -0
- package/i18n/en-US/components/content/blocks/open_response.ts +1 -1
- package/i18n/en-US/components/content/blocks/open_response_collate.ts +1 -1
- package/i18n/en-US/components/content/blocks/scenario_choice.ts +2 -0
- package/i18n/en-US/components/content/blocks/user_upload.ts +2 -1
- package/i18n/en-US/components/settings/accordion.ts +2 -1
- package/i18n/en-US/components/settings/block_quote.ts +1 -1
- package/i18n/en-US/components/settings/clickable_icon.ts +5 -0
- package/i18n/en-US/components/settings/email.ts +2 -1
- package/i18n/en-US/components/settings/file_download.ts +2 -2
- package/i18n/en-US/components/settings/image.ts +1 -0
- package/i18n/en-US/components/settings/open_response.ts +3 -0
- package/i18n/en-US/components/settings/open_response_collate.ts +3 -0
- package/i18n/en-US/components/settings/scenario_choice.ts +3 -1
- package/i18n/en-US/components/settings/tab.ts +4 -3
- package/i18n/en-US/components/settings/user_upload.ts +1 -0
- package/i18n/en-US/components/settings/video.ts +3 -1
- package/i18n/en-US/shared/content_blocks.ts +1 -1
- package/i18n/en-US/shared/settings.ts +1 -18
- package/i18n/es-ES/components/content/blocks/accordion.ts +3 -0
- package/i18n/es-ES/components/content/blocks/block_quote.ts +3 -1
- package/i18n/es-ES/components/content/blocks/feedback.ts +2 -0
- package/i18n/es-ES/components/content/blocks/file_download.ts +2 -1
- package/i18n/es-ES/components/content/blocks/index.ts +2 -0
- package/i18n/es-ES/components/content/blocks/open_response.ts +1 -2
- package/i18n/es-ES/components/content/blocks/open_response_collate.ts +1 -1
- package/i18n/es-ES/components/content/blocks/scenario_choice.ts +2 -0
- package/i18n/es-ES/components/content/blocks/user_upload.ts +2 -1
- package/i18n/es-ES/components/settings/accordion.ts +4 -2
- package/i18n/es-ES/components/settings/block_quote.ts +1 -1
- package/i18n/es-ES/components/settings/clickable_icon.ts +7 -0
- package/i18n/es-ES/components/settings/email.ts +2 -1
- package/i18n/es-ES/components/settings/image.ts +1 -0
- package/i18n/es-ES/components/settings/open_response.ts +3 -0
- package/i18n/es-ES/components/settings/open_response_collate.ts +3 -0
- package/i18n/es-ES/components/settings/scenario_choice.ts +3 -1
- package/i18n/es-ES/components/settings/tab.ts +3 -2
- package/i18n/es-ES/components/settings/user_upload.ts +1 -0
- package/i18n/es-ES/components/settings/video.ts +3 -1
- package/i18n/es-ES/shared/content_blocks.ts +1 -1
- package/i18n/es-ES/shared/settings.ts +1 -19
- package/i18n/sv-SE/components/content/blocks/accordion.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/block_quote.ts +3 -1
- package/i18n/sv-SE/components/content/blocks/feedback.ts +2 -0
- package/i18n/sv-SE/components/content/blocks/file_download.ts +2 -1
- package/i18n/sv-SE/components/content/blocks/index.ts +2 -0
- package/i18n/sv-SE/components/content/blocks/open_response.ts +1 -2
- package/i18n/sv-SE/components/content/blocks/open_response_collate.ts +1 -1
- package/i18n/sv-SE/components/content/blocks/scenario_choice.ts +2 -0
- package/i18n/sv-SE/components/content/blocks/user_upload.ts +2 -1
- package/i18n/sv-SE/components/settings/accordion.ts +2 -1
- package/i18n/sv-SE/components/settings/block_quote.ts +1 -1
- package/i18n/sv-SE/components/settings/clickable_icon.ts +6 -0
- package/i18n/sv-SE/components/settings/email.ts +2 -1
- package/i18n/sv-SE/components/settings/image.ts +1 -0
- package/i18n/sv-SE/components/settings/open_response.ts +3 -0
- package/i18n/sv-SE/components/settings/open_response_collate.ts +3 -0
- package/i18n/sv-SE/components/settings/scenario_choice.ts +3 -1
- package/i18n/sv-SE/components/settings/tab.ts +5 -3
- package/i18n/sv-SE/components/settings/user_upload.ts +1 -0
- package/i18n/sv-SE/components/settings/video.ts +3 -1
- package/i18n/sv-SE/shared/content_blocks.ts +1 -1
- package/i18n/sv-SE/shared/settings.ts +1 -18
- package/models/SurveyResultMetric.ts +8 -0
- package/package.json +1 -1
- package/plugin.js +27 -19
- package/test/Components/Content/Blocks/Feedback/FeedbackTemplates/FeedbackAnalytics.spec.js +23 -0
- package/test/Components/Content/Blocks/{FeedbackTemplates → Feedback/FeedbackTemplates}/FeedbackQuestionLikert.spec.js +1 -1
- package/test/Components/Content/Blocks/{FeedbackTemplates → Feedback/FeedbackTemplates}/FeedbackQuestionOpenResponse.spec.js +1 -1
- package/test/Components/Content/Blocks/{FeedbackTemplates → Feedback/FeedbackTemplates}/FeedbackQuestionTrueFalse.spec.js +1 -1
- package/test/Components/Settings/AccordionSettings.spec.js +0 -13
- package/test/Components/Settings/ClickableIconsSettings.spec.js +0 -11
- package/test/Components/Settings/EmailSettings.spec.js +0 -9
- package/test/Components/Settings/TabSettings.spec.js +0 -13
- package/test/helpers/GlossaryHelper.spec.js +8 -8
- package/components/Content/Blocks/{FeedbackTemplates → Feedback/FeedbackTemplates}/FeedbackQuestionLikert.vue +1 -1
- package/components/Content/Blocks/{FeedbackTemplates → Feedback/FeedbackTemplates}/FeedbackQuestionOpenResponse.vue +1 -1
- /package/components/Content/Blocks/{FeedbackTemplates → Feedback/FeedbackTemplates}/FeedbackQuestionTrueFalse.vue +0 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<ImageAssetViewer
|
|
4
|
+
v-if="block.metadata.config.asset"
|
|
4
5
|
v-model="block.metadata.config"
|
|
5
6
|
:assets="block.assets"
|
|
6
7
|
></ImageAssetViewer>
|
|
8
|
+
<v-alert v-else type="warning">{{
|
|
9
|
+
$t('windward.core.components.settings.image.no_image')
|
|
10
|
+
}}</v-alert>
|
|
7
11
|
</div>
|
|
8
12
|
</template>
|
|
9
13
|
|
|
@@ -25,14 +25,6 @@
|
|
|
25
25
|
>
|
|
26
26
|
{{ block.metadata.config.instructions }}
|
|
27
27
|
</p>
|
|
28
|
-
|
|
29
|
-
<p
|
|
30
|
-
v-if="block.metadata.config.starting_text"
|
|
31
|
-
tabindex="0"
|
|
32
|
-
class="pt-3"
|
|
33
|
-
>
|
|
34
|
-
{{ block.metadata.config.starting_text }}
|
|
35
|
-
</p>
|
|
36
28
|
</v-container>
|
|
37
29
|
<div v-if="stateLoaded">
|
|
38
30
|
<div v-if="block.body && !submitted">
|
|
@@ -182,7 +174,6 @@ export default {
|
|
|
182
174
|
}
|
|
183
175
|
if (_.isEmpty(this.block.metadata.config.starting_text)) {
|
|
184
176
|
this.block.metadata.config.starting_text = ''
|
|
185
|
-
|
|
186
177
|
}
|
|
187
178
|
},
|
|
188
179
|
mounted() {},
|
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<v-container
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title ||
|
|
7
|
+
block.metadata.config.instructions
|
|
8
|
+
"
|
|
9
|
+
class="pa-0"
|
|
10
|
+
>
|
|
11
|
+
<h2
|
|
12
|
+
v-if="
|
|
13
|
+
block.metadata.config.title &&
|
|
14
|
+
block.metadata.config.display_title
|
|
15
|
+
"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
>
|
|
18
|
+
{{ block.metadata.config.title }}
|
|
19
|
+
</h2>
|
|
20
|
+
|
|
21
|
+
<p
|
|
22
|
+
v-if="block.metadata.config.instructions"
|
|
23
|
+
tabindex="0"
|
|
24
|
+
class="pt-3"
|
|
25
|
+
>
|
|
26
|
+
{{ block.metadata.config.instructions }}
|
|
27
|
+
</p>
|
|
28
|
+
</v-container>
|
|
29
|
+
</div>
|
|
3
30
|
<div v-if="block.metadata.config.linked.length">
|
|
4
31
|
<v-btn
|
|
5
32
|
elevation="0"
|
|
@@ -35,7 +35,16 @@
|
|
|
35
35
|
</v-btn>
|
|
36
36
|
</div>
|
|
37
37
|
</v-container>
|
|
38
|
-
<v-
|
|
38
|
+
<v-alert
|
|
39
|
+
v-if="block.metadata.config.items.length === 0"
|
|
40
|
+
type="warning"
|
|
41
|
+
>{{
|
|
42
|
+
$t(
|
|
43
|
+
'windward.core.components.content.blocks.scenario_choice.no_scenario'
|
|
44
|
+
)
|
|
45
|
+
}}</v-alert
|
|
46
|
+
>
|
|
47
|
+
<v-container v-else class="pa-0">
|
|
39
48
|
<v-row
|
|
40
49
|
v-for="(item, itemIndex) in block.metadata.config.items"
|
|
41
50
|
:key="itemIndex"
|
|
@@ -25,8 +25,13 @@
|
|
|
25
25
|
{{ block.metadata.config.instructions }}
|
|
26
26
|
</p>
|
|
27
27
|
</v-container>
|
|
28
|
-
<v-
|
|
29
|
-
|
|
28
|
+
<v-alert
|
|
29
|
+
v-if="block.metadata.config.items.length === 0"
|
|
30
|
+
type="warning"
|
|
31
|
+
>{{ $t('windward.core.components.settings.tab.no_tabs') }}</v-alert
|
|
32
|
+
>
|
|
33
|
+
<v-container v-else class="pa-0">
|
|
34
|
+
<v-tabs v-model="block.metadata.config.currentTab" dark show-arrows>
|
|
30
35
|
<v-tabs-slider></v-tabs-slider>
|
|
31
36
|
<v-tab
|
|
32
37
|
v-for="(tab, tabIndex) in block.metadata.config.items"
|
|
@@ -96,31 +101,10 @@ export default {
|
|
|
96
101
|
this.block.body = this.$t(
|
|
97
102
|
'windward.core.shared.content_blocks.title.tab'
|
|
98
103
|
)
|
|
99
|
-
if (_.isEmpty(this.block.metadata.config.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
content: '',
|
|
104
|
-
imageAsset: {
|
|
105
|
-
display: {
|
|
106
|
-
width: 100,
|
|
107
|
-
margin: '',
|
|
108
|
-
padding: '',
|
|
109
|
-
},
|
|
110
|
-
hideBackground: true,
|
|
111
|
-
},
|
|
112
|
-
}
|
|
113
|
-
this.block.metadata.config.items = []
|
|
114
|
-
this.block.metadata.config.items.push(defaultObject)
|
|
115
|
-
} else {
|
|
116
|
-
this.block.metadata.config.items.forEach((element) => {
|
|
117
|
-
if (element.content == null) {
|
|
118
|
-
element.content = ''
|
|
119
|
-
}
|
|
120
|
-
if (element.tabHeader == null) {
|
|
121
|
-
element.tabHeader = ''
|
|
122
|
-
}
|
|
123
|
-
})
|
|
104
|
+
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
105
|
+
this.block.metadata.config.title = this.$t(
|
|
106
|
+
'windward.core.shared.content_blocks.title.tab'
|
|
107
|
+
)
|
|
124
108
|
}
|
|
125
109
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
126
110
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -128,9 +112,12 @@ export default {
|
|
|
128
112
|
if (_.isEmpty(this.block.metadata.config.currentTab)) {
|
|
129
113
|
this.block.metadata.config.currentTab = 0
|
|
130
114
|
}
|
|
115
|
+
if (_.isEmpty(this.block.metadata.config.items)) {
|
|
116
|
+
this.block.metadata.config.items = []
|
|
117
|
+
}
|
|
131
118
|
},
|
|
132
119
|
methods: {
|
|
133
|
-
|
|
120
|
+
onBeforeSave() {
|
|
134
121
|
this.block.metadata.config.items.forEach((element) => {
|
|
135
122
|
element.expand = false
|
|
136
123
|
})
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</p>
|
|
18
18
|
</v-col>
|
|
19
19
|
<v-col v-if="!blockExists" cols="12">
|
|
20
|
-
<v-alert
|
|
20
|
+
<v-alert type="warning">
|
|
21
21
|
<p>
|
|
22
22
|
{{
|
|
23
23
|
$t(
|
|
@@ -28,44 +28,47 @@
|
|
|
28
28
|
</v-alert>
|
|
29
29
|
</v-col>
|
|
30
30
|
</v-row>
|
|
31
|
-
<v-row>
|
|
31
|
+
<v-row v-if="render">
|
|
32
32
|
<v-col cols="12">
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>
|
|
46
|
-
<FileDropZone
|
|
47
|
-
v-model="uploadFiles"
|
|
48
|
-
:accept="
|
|
49
|
-
block.metadata.config.uploadSettings.accept
|
|
50
|
-
"
|
|
51
|
-
:multiple="
|
|
52
|
-
block.metadata.config.uploadSettings
|
|
53
|
-
.multiple
|
|
54
|
-
"
|
|
55
|
-
></FileDropZone>
|
|
56
|
-
|
|
57
|
-
<v-container class="text-center">
|
|
58
|
-
<v-btn
|
|
59
|
-
:disabled="!canUpload || loading"
|
|
60
|
-
color="primary"
|
|
61
|
-
elevation="0"
|
|
62
|
-
class="text-center"
|
|
63
|
-
@click="handleUpload"
|
|
33
|
+
<div class="upload-container" :class="uploadContainerClass">
|
|
34
|
+
<DisplayUserFilesTable
|
|
35
|
+
v-model="userFileAsset"
|
|
36
|
+
:enrollment="enrollment"
|
|
37
|
+
></DisplayUserFilesTable>
|
|
38
|
+
<div v-if="showUpload">
|
|
39
|
+
<div v-if="blockExists">
|
|
40
|
+
<v-form
|
|
41
|
+
ref="form"
|
|
42
|
+
v-model="valid"
|
|
43
|
+
lazy-validation
|
|
44
|
+
class="pb-0"
|
|
64
45
|
>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
<FileDropZone
|
|
47
|
+
v-model="uploadFiles"
|
|
48
|
+
:accept="
|
|
49
|
+
block.metadata.config.uploadSettings
|
|
50
|
+
.accept
|
|
51
|
+
"
|
|
52
|
+
:multiple="
|
|
53
|
+
block.metadata.config.uploadSettings
|
|
54
|
+
.multiple
|
|
55
|
+
"
|
|
56
|
+
></FileDropZone>
|
|
57
|
+
|
|
58
|
+
<v-container class="text-center">
|
|
59
|
+
<v-btn
|
|
60
|
+
:disabled="!canUpload || loading"
|
|
61
|
+
color="primary"
|
|
62
|
+
elevation="0"
|
|
63
|
+
class="text-center"
|
|
64
|
+
@click="handleUpload"
|
|
65
|
+
>
|
|
66
|
+
{{ $t('shared.forms.upload') }}
|
|
67
|
+
</v-btn>
|
|
68
|
+
</v-container>
|
|
69
|
+
</v-form>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
69
72
|
</div>
|
|
70
73
|
</v-col>
|
|
71
74
|
</v-row>
|
|
@@ -109,6 +112,11 @@ export default {
|
|
|
109
112
|
...mapGetters({
|
|
110
113
|
enrollment: 'enrollment/get',
|
|
111
114
|
}),
|
|
115
|
+
uploadContainerClass() {
|
|
116
|
+
return this.$vuetify.theme.dark
|
|
117
|
+
? 'upload-container--dark'
|
|
118
|
+
: 'upload-container--light'
|
|
119
|
+
},
|
|
112
120
|
blockExists() {
|
|
113
121
|
return Uuid.test(this.block.id)
|
|
114
122
|
},
|
|
@@ -255,3 +263,23 @@ export default {
|
|
|
255
263
|
},
|
|
256
264
|
}
|
|
257
265
|
</script>
|
|
266
|
+
|
|
267
|
+
<style scoped>
|
|
268
|
+
.upload-container {
|
|
269
|
+
padding: 16px;
|
|
270
|
+
border-radius: 4px;
|
|
271
|
+
border: 1px solid;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.upload-container--light {
|
|
275
|
+
background-color: #ffffff;
|
|
276
|
+
border-color: #e0e0e0;
|
|
277
|
+
color: #000000;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.upload-container--dark {
|
|
281
|
+
background-color: #424242;
|
|
282
|
+
border-color: #616161;
|
|
283
|
+
color: #ffffff;
|
|
284
|
+
}
|
|
285
|
+
</style>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{{ block.metadata.config.instructions }}
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
<div class="video-wrapper">
|
|
16
|
+
<div v-if="hasSource" class="video-wrapper">
|
|
17
17
|
<VuetifyPlayer
|
|
18
18
|
class="no-border-player"
|
|
19
19
|
:language="$i18n && $i18n.locale ? $i18n.locale : 'en-US'"
|
|
@@ -74,6 +74,9 @@
|
|
|
74
74
|
</template>
|
|
75
75
|
</VuetifyPlayer>
|
|
76
76
|
</div>
|
|
77
|
+
<v-alert v-else type="warning">
|
|
78
|
+
{{ $t('windward.core.components.settings.video.no_video_alert') }}
|
|
79
|
+
</v-alert>
|
|
77
80
|
<!-- display first note in the playlist for now -->
|
|
78
81
|
<v-alert
|
|
79
82
|
v-if="notes.length > 0"
|
|
@@ -399,12 +402,19 @@ export default {
|
|
|
399
402
|
},
|
|
400
403
|
getLinkedCaptions(file) {
|
|
401
404
|
// Check to see if the video source has a linked asset and it's a vtt file
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
// Prefer the most recently linked VTT (last match), not the oldest.
|
|
406
|
+
const linkedAssets = _.get(file, 'asset.linked_assets', [])
|
|
407
|
+
const linkedCaption = _.findLast(linkedAssets, function (f) {
|
|
408
|
+
const ext = _.get(f, 'asset.metadata.extension', '').toLowerCase()
|
|
409
|
+
const mime = _.get(f, 'asset.metadata.mime', '').toLowerCase()
|
|
410
|
+
const name = _.get(f, 'asset.name', '').toLowerCase()
|
|
411
|
+
|
|
412
|
+
return (
|
|
413
|
+
ext === 'vtt' ||
|
|
414
|
+
mime === 'text/vtt' ||
|
|
415
|
+
name.endsWith('.vtt')
|
|
416
|
+
)
|
|
417
|
+
})
|
|
408
418
|
|
|
409
419
|
if (linkedCaption) {
|
|
410
420
|
const foundAsset = this.block.assets.find((a) => {
|
|
@@ -165,7 +165,9 @@ export default {
|
|
|
165
165
|
this.block.metadata.config = {}
|
|
166
166
|
}
|
|
167
167
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
168
|
-
this.block.metadata.config.title =
|
|
168
|
+
this.block.metadata.config.title = this.$t(
|
|
169
|
+
'windward.core.components.settings.accordion.accordion'
|
|
170
|
+
)
|
|
169
171
|
}
|
|
170
172
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
171
173
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -183,21 +185,7 @@ export default {
|
|
|
183
185
|
this.block.metadata.config.editOnContentItem = false
|
|
184
186
|
}
|
|
185
187
|
if (_.isEmpty(this.block.metadata.config.items)) {
|
|
186
|
-
const defaultObject = {
|
|
187
|
-
header: '',
|
|
188
|
-
expand: false,
|
|
189
|
-
content: '',
|
|
190
|
-
fileConfig: {
|
|
191
|
-
display: {
|
|
192
|
-
width: 100,
|
|
193
|
-
margin: '',
|
|
194
|
-
padding: '',
|
|
195
|
-
},
|
|
196
|
-
hideBackground: true,
|
|
197
|
-
},
|
|
198
|
-
}
|
|
199
188
|
this.block.metadata.config.items = []
|
|
200
|
-
this.block.metadata.config.items.push(defaultObject)
|
|
201
189
|
}
|
|
202
190
|
this.block.body = this.$t(
|
|
203
191
|
'windward.core.shared.content_blocks.title.accordion'
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
</v-container>
|
|
9
9
|
<v-divider class="my-4 primary"></v-divider>
|
|
10
10
|
<v-container class="pa-0">
|
|
11
|
+
<p class="pt-4 mb-2">
|
|
12
|
+
{{ $t('windward.core.components.settings.block_quote.body') }}
|
|
13
|
+
</p>
|
|
11
14
|
<TextEditor
|
|
12
15
|
v-model="block.metadata.config.block_quote.quote"
|
|
13
16
|
:rules="$Validation.getRule('longInput')"
|
|
@@ -15,9 +18,6 @@
|
|
|
15
18
|
outlined
|
|
16
19
|
auto-grow
|
|
17
20
|
:height="200"
|
|
18
|
-
:label="
|
|
19
|
-
$t('windward.core.components.settings.block_quote.body')
|
|
20
|
-
"
|
|
21
21
|
:disabled="render"
|
|
22
22
|
></TextEditor>
|
|
23
23
|
</v-container>
|
|
@@ -150,7 +150,9 @@ export default {
|
|
|
150
150
|
this.block.metadata.config = {}
|
|
151
151
|
}
|
|
152
152
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
153
|
-
this.block.metadata.config.title =
|
|
153
|
+
this.block.metadata.config.title = this.$t(
|
|
154
|
+
'windward.core.components.content.blocks.block_quote.title'
|
|
155
|
+
)
|
|
154
156
|
}
|
|
155
157
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
156
158
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -64,6 +64,13 @@
|
|
|
64
64
|
:disabled="render"
|
|
65
65
|
></v-switch>
|
|
66
66
|
</v-container>
|
|
67
|
+
<p>
|
|
68
|
+
{{
|
|
69
|
+
$t(
|
|
70
|
+
'windward.core.components.settings.clickable_icon.item_header'
|
|
71
|
+
)
|
|
72
|
+
}}
|
|
73
|
+
</p>
|
|
67
74
|
<v-col class="pa-0">
|
|
68
75
|
<SortableExpansionPanel
|
|
69
76
|
v-model="block.metadata.config.items"
|
|
@@ -217,7 +224,11 @@
|
|
|
217
224
|
:disabled="render"
|
|
218
225
|
@click="onAddElement"
|
|
219
226
|
><v-icon>mdi-plus</v-icon
|
|
220
|
-
>{{
|
|
227
|
+
>{{
|
|
228
|
+
$t(
|
|
229
|
+
'windward.core.components.settings.clickable_icon.add_item'
|
|
230
|
+
)
|
|
231
|
+
}}</v-btn
|
|
221
232
|
>
|
|
222
233
|
</v-row>
|
|
223
234
|
</v-container>
|
|
@@ -285,7 +296,14 @@ export default {
|
|
|
285
296
|
this.block.metadata.config = {}
|
|
286
297
|
}
|
|
287
298
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
288
|
-
this.block.metadata.config.title =
|
|
299
|
+
this.block.metadata.config.title = this.$t(
|
|
300
|
+
'windward.core.components.settings.clickable_icon.clickable_icon_title'
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
304
|
+
this.block.metadata.config.instructions = this.$t(
|
|
305
|
+
'windward.core.components.settings.clickable_icon.instructions'
|
|
306
|
+
)
|
|
289
307
|
}
|
|
290
308
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
291
309
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -304,11 +322,7 @@ export default {
|
|
|
304
322
|
this.block.metadata.config.items = []
|
|
305
323
|
}
|
|
306
324
|
},
|
|
307
|
-
mounted() {
|
|
308
|
-
if (this.block.metadata.config.items.length <= 0) {
|
|
309
|
-
this.onAddElement()
|
|
310
|
-
}
|
|
311
|
-
},
|
|
325
|
+
mounted() {},
|
|
312
326
|
methods: {
|
|
313
327
|
onAddElement() {
|
|
314
328
|
const defaultObject = {
|
|
@@ -180,7 +180,9 @@ export default {
|
|
|
180
180
|
this.block.metadata.config = {}
|
|
181
181
|
}
|
|
182
182
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
183
|
-
this.block.metadata.config.title =
|
|
183
|
+
this.block.metadata.config.title = this.$t(
|
|
184
|
+
'windward.core.components.content.blocks.email.email'
|
|
185
|
+
)
|
|
184
186
|
}
|
|
185
187
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
186
188
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -193,16 +195,6 @@ export default {
|
|
|
193
195
|
}
|
|
194
196
|
if (_.isEmpty(this.block.metadata.config.emails)) {
|
|
195
197
|
this.block.metadata.config.emails = []
|
|
196
|
-
const defaultObject = {
|
|
197
|
-
from: '',
|
|
198
|
-
to: '',
|
|
199
|
-
cc: '',
|
|
200
|
-
subject: '',
|
|
201
|
-
body: '',
|
|
202
|
-
tinymce_expand: false,
|
|
203
|
-
initials: '',
|
|
204
|
-
}
|
|
205
|
-
this.block.metadata.config.emails.push(defaultObject)
|
|
206
198
|
}
|
|
207
199
|
this.block.body = this.$t(
|
|
208
200
|
'windward.core.components.content.blocks.email.title'
|
|
@@ -15,8 +15,14 @@
|
|
|
15
15
|
"
|
|
16
16
|
:disabled="render"
|
|
17
17
|
></v-switch>
|
|
18
|
-
<v-
|
|
19
|
-
|
|
18
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
19
|
+
<p>
|
|
20
|
+
{{
|
|
21
|
+
$t(
|
|
22
|
+
'windward.core.components.content.blocks.file_download.items_header'
|
|
23
|
+
)
|
|
24
|
+
}}
|
|
25
|
+
</p>
|
|
20
26
|
<SortableExpansionPanel
|
|
21
27
|
v-model="block.metadata.config.items"
|
|
22
28
|
:disabled="render"
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container>
|
|
3
3
|
<v-form>
|
|
4
|
+
<BaseContentBlockSettings
|
|
5
|
+
v-model="block.metadata.config"
|
|
6
|
+
:disabled="render"
|
|
7
|
+
></BaseContentBlockSettings>
|
|
4
8
|
<p>
|
|
5
9
|
{{
|
|
6
10
|
$t(
|
|
@@ -95,10 +99,11 @@ import BaseContentSettings from '~/components/Content/Settings/BaseContentSettin
|
|
|
95
99
|
import ContentBlock from '~/models/ContentBlock'
|
|
96
100
|
import Course from '~/models/Course'
|
|
97
101
|
import TextEditor from '~/components/Text/TextEditor'
|
|
102
|
+
import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
|
|
98
103
|
|
|
99
104
|
export default {
|
|
100
105
|
name: 'OpenResponseCollateSettings',
|
|
101
|
-
components: { TextEditor },
|
|
106
|
+
components: { TextEditor, BaseContentBlockSettings },
|
|
102
107
|
extends: BaseContentSettings,
|
|
103
108
|
props: {
|
|
104
109
|
settings: { type: Object, required: false, default: null },
|
|
@@ -146,12 +151,25 @@ export default {
|
|
|
146
151
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
147
152
|
this.block.metadata.config = {}
|
|
148
153
|
}
|
|
154
|
+
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
155
|
+
this.block.metadata.config.title = this.$t(
|
|
156
|
+
'windward.core.components.settings.open_response_collate.title'
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
160
|
+
this.block.metadata.config.instructions = this.$t(
|
|
161
|
+
'windward.core.components.settings.open_response_collate.block_instructions'
|
|
162
|
+
)
|
|
163
|
+
}
|
|
149
164
|
if (_.isEmpty(this.block.metadata.config.linked)) {
|
|
150
165
|
this.block.metadata.config.linked = []
|
|
151
166
|
}
|
|
152
167
|
if (_.isEmpty(this.block.metadata.config.filename)) {
|
|
153
168
|
this.block.metadata.config.filename = ''
|
|
154
169
|
}
|
|
170
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
171
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
172
|
+
}
|
|
155
173
|
if (_.isEmpty(this.block.metadata.config.additional_text)) {
|
|
156
174
|
this.block.metadata.config.additional_text = ''
|
|
157
175
|
}
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
></BaseContentBlockSettings>
|
|
8
8
|
</v-row>
|
|
9
9
|
<p class="pt-4 mb-2">
|
|
10
|
-
{{
|
|
11
|
-
$t('windward.core.components.settings.open_response.question')
|
|
12
|
-
}}
|
|
10
|
+
{{ $t('windward.core.components.settings.open_response.question') }}
|
|
13
11
|
</p>
|
|
14
12
|
<TextEditor
|
|
15
13
|
id="block-settings-body"
|
|
@@ -101,13 +99,17 @@ export default {
|
|
|
101
99
|
this.block.metadata.config = {}
|
|
102
100
|
}
|
|
103
101
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
104
|
-
this.block.metadata.config.title =
|
|
102
|
+
this.block.metadata.config.title = this.$t(
|
|
103
|
+
'windward.core.components.settings.open_response.title'
|
|
104
|
+
)
|
|
105
105
|
}
|
|
106
106
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
107
107
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
108
108
|
}
|
|
109
109
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
110
|
-
this.block.metadata.config.instructions =
|
|
110
|
+
this.block.metadata.config.instructions = this.$t(
|
|
111
|
+
'windward.core.components.settings.open_response.instructions'
|
|
112
|
+
)
|
|
111
113
|
}
|
|
112
114
|
if (_.isEmpty(this.block.metadata.config.sample_response)) {
|
|
113
115
|
this.block.metadata.config.sample_response = ''
|
|
@@ -127,8 +129,7 @@ export default {
|
|
|
127
129
|
const config = _.get(generatedBlock, 'metadata.config', {})
|
|
128
130
|
|
|
129
131
|
this.block.body = _.get(generatedBlock, 'body', '') ?? ''
|
|
130
|
-
this.block.metadata.config.title =
|
|
131
|
-
_.get(config, 'title', '') ?? ''
|
|
132
|
+
this.block.metadata.config.title = _.get(config, 'title', '') ?? ''
|
|
132
133
|
this.block.metadata.config.instructions =
|
|
133
134
|
_.get(config, 'instructions', '') ?? ''
|
|
134
135
|
this.block.metadata.config.sample_response =
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
></BaseContentBlockSettings>
|
|
9
9
|
</v-col>
|
|
10
10
|
<v-col class="pa-0">
|
|
11
|
-
<v-divider class="my-4 primary"></v-divider>
|
|
12
11
|
<v-select
|
|
13
12
|
v-model="block.metadata.config.display_style"
|
|
14
13
|
:items="displayStyles"
|
|
@@ -40,7 +39,15 @@
|
|
|
40
39
|
:disabled="render"
|
|
41
40
|
></v-switch>
|
|
42
41
|
</v-col>
|
|
42
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
43
43
|
<v-col class="pa-0">
|
|
44
|
+
<p>
|
|
45
|
+
{{
|
|
46
|
+
$t(
|
|
47
|
+
'windward.core.components.settings.scenario_choice.choices'
|
|
48
|
+
)
|
|
49
|
+
}}
|
|
50
|
+
</p>
|
|
44
51
|
<SortableExpansionPanel
|
|
45
52
|
v-model="block.metadata.config.items"
|
|
46
53
|
:disabled="render"
|
|
@@ -280,7 +287,9 @@ export default {
|
|
|
280
287
|
this.block.metadata.config = {}
|
|
281
288
|
}
|
|
282
289
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
283
|
-
this.block.metadata.config.title =
|
|
290
|
+
this.block.metadata.config.title = this.$t(
|
|
291
|
+
'windward.core.components.settings.scenario_choice.scenario_title'
|
|
292
|
+
)
|
|
284
293
|
}
|
|
285
294
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
286
295
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -311,9 +320,6 @@ export default {
|
|
|
311
320
|
}
|
|
312
321
|
},
|
|
313
322
|
mounted() {
|
|
314
|
-
if (this.block.metadata.config.items.length <= 0) {
|
|
315
|
-
this.onAddElement()
|
|
316
|
-
}
|
|
317
323
|
this.isLinked =
|
|
318
324
|
!_.isEmpty(this.block.metadata.config.link_content_id) &&
|
|
319
325
|
!_.isEmpty(this.block.metadata.config.link_text)
|
|
@@ -152,7 +152,9 @@ export default {
|
|
|
152
152
|
this.block.metadata.config = {}
|
|
153
153
|
}
|
|
154
154
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
155
|
-
this.block.metadata.config.title =
|
|
155
|
+
this.block.metadata.config.title = this.$t(
|
|
156
|
+
'windward.core.shared.content_blocks.title.tab'
|
|
157
|
+
)
|
|
156
158
|
}
|
|
157
159
|
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
158
160
|
this.$set(this.block.metadata.config, 'display_title', true)
|
|
@@ -170,27 +172,10 @@ export default {
|
|
|
170
172
|
this.block.metadata.config.currentTab = 0
|
|
171
173
|
}
|
|
172
174
|
if (_.isEmpty(this.block.metadata.config.items)) {
|
|
173
|
-
const defaultObject = {
|
|
174
|
-
tabHeader: '',
|
|
175
|
-
expand: false,
|
|
176
|
-
content: '',
|
|
177
|
-
imageAsset: {
|
|
178
|
-
display: {
|
|
179
|
-
width: 100,
|
|
180
|
-
margin: '',
|
|
181
|
-
padding: '',
|
|
182
|
-
},
|
|
183
|
-
hideBackground: true,
|
|
184
|
-
},
|
|
185
|
-
}
|
|
186
175
|
this.block.metadata.config.items = []
|
|
187
|
-
this.block.metadata.config.items.push(defaultObject)
|
|
188
176
|
}
|
|
189
177
|
},
|
|
190
178
|
mounted() {
|
|
191
|
-
if (this.block.metadata.config.items.length <= 0) {
|
|
192
|
-
this.onAddElement()
|
|
193
|
-
}
|
|
194
179
|
this.checkForCustomSpacing()
|
|
195
180
|
},
|
|
196
181
|
beforeDestroy() {
|