@windward/core 0.27.0 → 0.28.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 +37 -0
- package/components/Content/Blocks/Accordion.vue +1 -1
- package/components/Content/Blocks/BlockQuote.vue +1 -1
- package/components/Content/Blocks/ClickableIcons.vue +4 -3
- package/components/Content/Blocks/Email.vue +1 -1
- package/components/Content/Blocks/FileDownload.vue +2 -2
- package/components/Content/Blocks/Image.vue +140 -0
- package/components/Content/Blocks/OpenResponse.vue +419 -5
- package/components/Content/Blocks/ScenarioChoice.vue +1 -1
- package/components/Content/Blocks/Tab.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +1 -1
- package/components/Content/Blocks/Video.vue +361 -22
- package/components/Settings/ClickableIconsSettings.vue +3 -3
- package/components/Settings/ImageSettings.vue +26 -0
- package/components/Settings/OpenResponseSettings.vue +59 -0
- package/components/Settings/VideoSettings/SourcePicker.vue +40 -32
- package/components/utils/ContentViewer.vue +180 -1
- package/i18n/en-US/components/content/blocks/open_response.ts +18 -0
- package/i18n/en-US/components/settings/open_response.ts +5 -0
- package/i18n/es-ES/components/content/blocks/open_response.ts +18 -0
- package/i18n/es-ES/components/settings/open_response.ts +5 -0
- package/i18n/sv-SE/components/content/blocks/open_response.ts +18 -0
- package/i18n/sv-SE/components/settings/open_response.ts +5 -0
- package/package.json +2 -2
- package/test/Components/Settings/ClickableIconsSettings.spec.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release [0.28.0] - 2026-02-18
|
|
4
|
+
|
|
5
|
+
* Merged in feature/LE-2250/open-response-feedback-2 (pull request #485)
|
|
6
|
+
* Merged in feature/LE-2223-add-title-and-instructions-to-im (pull request #483)
|
|
7
|
+
* Merged in feature/LE-2250/open-response-feedback (pull request #482)
|
|
8
|
+
* Merged in feature/LE-2223-add-title-and-instructions-to-im (pull request #481)
|
|
9
|
+
* Merged in feature/LE-2208-translate-course (pull request #478)
|
|
10
|
+
* Merge remote-tracking branch 'origin/release/0.28.0' into feature/LE-2208-translate-course
|
|
11
|
+
* Merge branch 'develop' into feature/LE-2208-translate-course
|
|
12
|
+
* Merged in release/0.27.0 (pull request #462)
|
|
13
|
+
* Merged in feature/LE-2155-consistent-ui-for-adding-new-blo (pull request #476)
|
|
14
|
+
* Merged release/0.27.0 into feature/LE-2155-consistent-ui-for-adding-new-blo
|
|
15
|
+
* Merged in feature/LE-2155-consistent-ui-for-adding-new-blo (pull request #474)
|
|
16
|
+
* Merged in feature/LE-2155-consistent-ui-for-adding-new-blo (pull request #473)
|
|
17
|
+
* Merged release/0.27.0 into feature/LE-2155-consistent-ui-for-adding-new-blo
|
|
18
|
+
* Merged release/0.27.0 into feature/LE-2155-consistent-ui-for-adding-new-blo
|
|
19
|
+
* Merged in LE-1915-block-quote-design-updates (pull request #468)
|
|
20
|
+
* Merge remote-tracking branch 'origin/release/0.27.0' into LE-1915-block-quote-design-updates
|
|
21
|
+
* Merged in LE-2185-feedback-block-add-container-bac (pull request #469)
|
|
22
|
+
* Merge remote-tracking branch 'origin/release/0.27.0' into LE-2185-feedback-block-add-container-bac
|
|
23
|
+
* Merged in feature/LE-2236-bar-charts-for-non-open-ended-it (pull request #472)
|
|
24
|
+
* Merged in feature/LE-1788-transcript-generation (pull request #465)
|
|
25
|
+
* Merged release/0.27.0 into feature/LE-2236-bar-charts-for-non-open-ended-it
|
|
26
|
+
* Merged in LE-2186-file-upload-block-add-container- (pull request #470)
|
|
27
|
+
* Merged in feature/LE-2236-bar-charts-for-non-open-ended-it (pull request #471)
|
|
28
|
+
* Add localized "item header" message for ClickableIconsSettings and update "initial setup" text for OpenResponse block
|
|
29
|
+
* Merged in LE-1897-glossary-pop-up-displayy (pull request #467)
|
|
30
|
+
* Merged in feature/LE-2155-consistent-ui-for-adding-new-blo (pull request #464)
|
|
31
|
+
* Merged in feature/LE-2155-consistent-ui-for-adding-new-blo (pull request #466)
|
|
32
|
+
* Merged release/0.27.0 into feature/LE-2155-consistent-ui-for-adding-new-blo
|
|
33
|
+
* Merge remote-tracking branch 'origin/feature/LE-2155-consistent-ui-for-adding-new-blo' into feature/LE-2155-consistent-ui-for-adding-new-blo
|
|
34
|
+
* Merged release/0.27.0 into feature/LE-2155-consistent-ui-for-adding-new-blo
|
|
35
|
+
* Merged release/0.28.0 into feature/LE-2223-add-title-and-instructions-to-im
|
|
36
|
+
* Merged in feature/LE-2223-add-title-and-instructions-to-im (pull request #477)
|
|
37
|
+
* Merged in feature/LE-2215-clickable-icon-default-settings- (pull request #475)
|
|
38
|
+
|
|
39
|
+
|
|
3
40
|
## Release [0.27.0] - 2026-01-15
|
|
4
41
|
|
|
5
42
|
* Merged in feature/LE-2155-consistent-ui-for-adding-new-blo (pull request #476)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div :class="blockDirectionClasses" :dir="blockTextDirection">
|
|
3
3
|
<v-container class="pa-0">
|
|
4
4
|
<h2
|
|
5
5
|
v-if="
|
|
@@ -254,10 +254,11 @@ export default {
|
|
|
254
254
|
}
|
|
255
255
|
if (_.isEmpty(this.block.metadata.config.display)) {
|
|
256
256
|
this.block.metadata.config.display = {
|
|
257
|
-
show_title:
|
|
258
|
-
show_background:
|
|
257
|
+
show_title: true,
|
|
258
|
+
show_background: true,
|
|
259
259
|
round_icon: false,
|
|
260
260
|
italic_icon: false,
|
|
261
|
+
large_icon: false,
|
|
261
262
|
autocolor: true,
|
|
262
263
|
}
|
|
263
264
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div :class="blockDirectionClasses" :dir="blockTextDirection">
|
|
3
3
|
<h2
|
|
4
4
|
v-if="
|
|
5
5
|
block.metadata.config.title &&
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"
|
|
52
52
|
:value="resolvedItemAssets"
|
|
53
53
|
></FileLinks>
|
|
54
|
-
</
|
|
54
|
+
</div>
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script>
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<v-container
|
|
4
|
+
v-if="
|
|
5
|
+
block.metadata.config.title ||
|
|
6
|
+
block.metadata.config.instructions
|
|
7
|
+
"
|
|
8
|
+
class="pa-0"
|
|
9
|
+
>
|
|
10
|
+
<h2
|
|
11
|
+
v-if="
|
|
12
|
+
block.metadata.config.title &&
|
|
13
|
+
block.metadata.config.display_title
|
|
14
|
+
"
|
|
15
|
+
tabindex="0"
|
|
16
|
+
>
|
|
17
|
+
{{ block.metadata.config.title }}
|
|
18
|
+
</h2>
|
|
19
|
+
|
|
20
|
+
<p
|
|
21
|
+
v-if="block.metadata.config.instructions"
|
|
22
|
+
tabindex="0"
|
|
23
|
+
class="pt-3"
|
|
24
|
+
>
|
|
25
|
+
{{ block.metadata.config.instructions }}
|
|
26
|
+
</p>
|
|
27
|
+
</v-container>
|
|
3
28
|
<ImageAssetViewer
|
|
4
29
|
v-if="block.metadata.config.asset"
|
|
5
30
|
v-model="block.metadata.config"
|
|
@@ -8,6 +33,24 @@
|
|
|
8
33
|
<v-alert v-else type="warning">{{
|
|
9
34
|
$t('windward.core.components.settings.image.no_image')
|
|
10
35
|
}}</v-alert>
|
|
36
|
+
|
|
37
|
+
<!-- Visible image description for translated courses only -->
|
|
38
|
+
<!-- aria-hidden prevents screen readers from reading this twice (already read via aria-describedby on the image) -->
|
|
39
|
+
<div
|
|
40
|
+
v-if="isTranslatedBlock && imageDescription"
|
|
41
|
+
class="image-description mt-3 pa-3"
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
>
|
|
44
|
+
<h4
|
|
45
|
+
class="image-description__heading text-subtitle-2 font-weight-bold mb-1"
|
|
46
|
+
>
|
|
47
|
+
{{ $t('shared.file.image.description') }}
|
|
48
|
+
</h4>
|
|
49
|
+
<div
|
|
50
|
+
class="image-description__text text-body-2"
|
|
51
|
+
v-html="imageDescription"
|
|
52
|
+
></div>
|
|
53
|
+
</div>
|
|
11
54
|
</div>
|
|
12
55
|
</template>
|
|
13
56
|
|
|
@@ -15,6 +58,7 @@
|
|
|
15
58
|
import _ from 'lodash'
|
|
16
59
|
import ImageAssetViewer from '~/components/Content/ImageAssetViewer.vue'
|
|
17
60
|
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
61
|
+
import Uuid from '~/helpers/Uuid'
|
|
18
62
|
|
|
19
63
|
export default {
|
|
20
64
|
name: 'ContentBlockImage',
|
|
@@ -25,6 +69,47 @@ export default {
|
|
|
25
69
|
data() {
|
|
26
70
|
return {}
|
|
27
71
|
},
|
|
72
|
+
computed: {
|
|
73
|
+
/**
|
|
74
|
+
* Check if this block is from a translated course
|
|
75
|
+
* Translated blocks have metadata.translation object
|
|
76
|
+
*/
|
|
77
|
+
isTranslatedBlock() {
|
|
78
|
+
return !!_.get(this.block, 'metadata.translation', null)
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Get the file asset for this image
|
|
82
|
+
* Uses resolveAsset from BaseContentBlock which wraps FileAssetHelper
|
|
83
|
+
*/
|
|
84
|
+
fileAsset() {
|
|
85
|
+
const config = _.get(this.block, 'metadata.config', {})
|
|
86
|
+
return this.resolveAsset(config.asset)
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Get the image description (ariaDescribedBy) from config or asset
|
|
90
|
+
* Checks multiple sources in order of priority
|
|
91
|
+
*/
|
|
92
|
+
imageDescription() {
|
|
93
|
+
const config = _.get(this.block, 'metadata.config', {})
|
|
94
|
+
|
|
95
|
+
// If not inheriting from global, use the config value
|
|
96
|
+
if (!config.inherit) {
|
|
97
|
+
return config.ariaDescribedBy || ''
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// If inheriting, try to get from file asset (locale-aware props first)
|
|
101
|
+
return (
|
|
102
|
+
_.get(this.fileAsset, 'aria_describedby', null) ||
|
|
103
|
+
_.get(this.fileAsset, 'props.aria_describedby', null) ||
|
|
104
|
+
_.get(
|
|
105
|
+
this.fileAsset,
|
|
106
|
+
'asset.metadata.props.aria_describedby',
|
|
107
|
+
null
|
|
108
|
+
) ||
|
|
109
|
+
''
|
|
110
|
+
)
|
|
111
|
+
},
|
|
112
|
+
},
|
|
28
113
|
beforeMount() {
|
|
29
114
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
30
115
|
this.block.metadata.config = {}
|
|
@@ -41,6 +126,61 @@ export default {
|
|
|
41
126
|
if (_.isEmpty(this.block.metadata.config.ariaDescribedBy)) {
|
|
42
127
|
this.block.metadata.config.ariaDescribedBy = ''
|
|
43
128
|
}
|
|
129
|
+
// If the block is brand new and the title is missing then pre-set the word 'Image' to it
|
|
130
|
+
if (
|
|
131
|
+
!Uuid.test(this.block.id) &&
|
|
132
|
+
_.isEmpty(this.block.metadata.config.title)
|
|
133
|
+
) {
|
|
134
|
+
this.block.metadata.config.title = this.$t(
|
|
135
|
+
'windward.core.shared.content_blocks.title.image'
|
|
136
|
+
)
|
|
137
|
+
} else if (_.isEmpty(this.block.metadata.config.title)) {
|
|
138
|
+
// Otherwise make sure the title key at least exists
|
|
139
|
+
this.block.metadata.config.title = ''
|
|
140
|
+
}
|
|
141
|
+
if (!_.isBoolean(this.block.metadata.config.display_title)) {
|
|
142
|
+
this.$set(this.block.metadata.config, 'display_title', true)
|
|
143
|
+
}
|
|
144
|
+
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
145
|
+
this.block.metadata.config.instructions = ''
|
|
146
|
+
}
|
|
44
147
|
},
|
|
45
148
|
}
|
|
46
149
|
</script>
|
|
150
|
+
|
|
151
|
+
<style lang="scss" scoped>
|
|
152
|
+
.image-description {
|
|
153
|
+
background-color: rgba(var(--v-theme-surface-variant), 0.5);
|
|
154
|
+
border-radius: 4px;
|
|
155
|
+
border-left: 3px solid rgba(var(--v-theme-primary), 0.7);
|
|
156
|
+
|
|
157
|
+
&__heading {
|
|
158
|
+
color: rgba(var(--v-theme-on-surface), 0.87);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&__text {
|
|
162
|
+
color: rgba(var(--v-theme-on-surface), 0.7);
|
|
163
|
+
|
|
164
|
+
// Deep selector to style HTML content rendered via v-html
|
|
165
|
+
::v-deep {
|
|
166
|
+
p {
|
|
167
|
+
margin-bottom: 0.5rem;
|
|
168
|
+
|
|
169
|
+
&:last-child {
|
|
170
|
+
margin-bottom: 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
ul,
|
|
175
|
+
ol {
|
|
176
|
+
margin: 0.5rem 0;
|
|
177
|
+
padding-left: 1.5rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
li {
|
|
181
|
+
margin-bottom: 0.25rem;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</style>
|