@windward/core 0.10.0 → 0.12.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 +6 -0
- package/components/Content/Blocks/Accordion.vue +97 -32
- package/components/Content/Blocks/ClickableIcons.vue +4 -0
- package/components/Content/Blocks/FileDownload.vue +1 -1
- package/components/Content/Blocks/GenerateAIQuestionButton.vue +17 -21
- package/components/Content/Blocks/OpenResponse.vue +13 -3
- package/components/Content/Blocks/Tab.vue +67 -2
- package/components/Content/Blocks/Video.vue +34 -0
- package/components/Navigation/Items/CourseGlossaryToolNav.vue +15 -1
- package/components/Navigation/Items/GlossaryNav.vue +3 -3
- package/components/Settings/AccordionSettings.vue +40 -2
- package/components/Settings/TabSettings.vue +44 -3
- package/components/Settings/VideoSettings.vue +16 -10
- package/components/utils/ContentViewer.vue +19 -0
- package/components/utils/TinyMCEWrapper.vue +9 -0
- package/components/utils/assets/tinymce/content/global.scss +10 -0
- package/components/utils/assets/tinymce/ui/global.scss +6 -2
- package/components/utils/glossary/CourseGlossary.vue +6 -3
- package/i18n/en-US/components/content/blocks/generate_questions.ts +17 -2
- package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/es-ES/components/content/blocks/generate_questions.ts +24 -1
- package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/sv-SE/components/content/blocks/generate_questions.ts +21 -1
- package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +1 -0
- package/package.json +2 -2
- package/pages/glossary.vue +10 -2
- package/test/Components/Settings/AccordionSettings.spec.js +16 -2
- package/test/Components/Settings/TabSettings.spec.js +26 -2
package/CHANGELOG.md
CHANGED
|
@@ -46,7 +46,10 @@
|
|
|
46
46
|
class="expansion-panel-body"
|
|
47
47
|
:key="expansionPanelKey"
|
|
48
48
|
>
|
|
49
|
-
<v-container
|
|
49
|
+
<v-container
|
|
50
|
+
class="px-0 d-flex"
|
|
51
|
+
:class="getTextImageContainerClass(item)"
|
|
52
|
+
>
|
|
50
53
|
<TextViewer
|
|
51
54
|
v-if="!item.expand"
|
|
52
55
|
v-model="item.content"
|
|
@@ -58,19 +61,20 @@
|
|
|
58
61
|
block.metadata.config.items[itemIndex].content
|
|
59
62
|
"
|
|
60
63
|
></TextEditor>
|
|
61
|
-
</v-container>
|
|
62
|
-
<v-container
|
|
63
|
-
v-if="
|
|
64
|
-
block.metadata.config.items[itemIndex].fileConfig
|
|
65
|
-
.asset
|
|
66
|
-
"
|
|
67
|
-
>
|
|
68
64
|
<ImageAssetViewer
|
|
65
|
+
v-if="
|
|
66
|
+
block.metadata.config.items[itemIndex]
|
|
67
|
+
.fileConfig.asset &&
|
|
68
|
+
block.metadata.config.items[itemIndex]
|
|
69
|
+
.fileConfig.asset.file_asset_id
|
|
70
|
+
"
|
|
69
71
|
v-model="
|
|
70
72
|
block.metadata.config.items[itemIndex]
|
|
71
73
|
.fileConfig
|
|
72
74
|
"
|
|
75
|
+
:class="getImageOrder(item)"
|
|
73
76
|
:assets="block.assets"
|
|
77
|
+
:max-width="getImageWidth(item)"
|
|
74
78
|
></ImageAssetViewer>
|
|
75
79
|
</v-container>
|
|
76
80
|
</v-expansion-panel-content>
|
|
@@ -113,7 +117,14 @@ export default {
|
|
|
113
117
|
header: '',
|
|
114
118
|
expand: false,
|
|
115
119
|
content: '',
|
|
116
|
-
fileConfig: {
|
|
120
|
+
fileConfig: {
|
|
121
|
+
display: {
|
|
122
|
+
width: 100,
|
|
123
|
+
margin: '',
|
|
124
|
+
padding: '',
|
|
125
|
+
},
|
|
126
|
+
hideBackground: true,
|
|
127
|
+
},
|
|
117
128
|
}
|
|
118
129
|
this.block.metadata.config.items = []
|
|
119
130
|
this.block.metadata.config.items.push(defaultObject)
|
|
@@ -127,36 +138,42 @@ export default {
|
|
|
127
138
|
expansionPanelKey: '0',
|
|
128
139
|
editingInContentItem: false,
|
|
129
140
|
selectedPanels: null,
|
|
141
|
+
fullWidth: true,
|
|
130
142
|
}
|
|
131
143
|
},
|
|
132
144
|
watch: {
|
|
133
|
-
value
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.selectedPanels !== newValue.metadata.config.selectedPanels
|
|
137
|
-
) {
|
|
138
|
-
// update editing content block
|
|
139
|
-
this.selectedPanels = newValue.metadata.config.selectedPanels
|
|
140
|
-
this.expansionPanelKey = Crypto.id()
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const length = newValue.metadata.config.items.length
|
|
144
|
-
let counter = 0
|
|
145
|
-
newValue.metadata.config.items.forEach((element) => {
|
|
145
|
+
value: {
|
|
146
|
+
deep: true,
|
|
147
|
+
handler(newValue) {
|
|
146
148
|
if (
|
|
147
|
-
|
|
148
|
-
this.
|
|
149
|
+
!this.render &&
|
|
150
|
+
this.selectedPanels !==
|
|
151
|
+
newValue.metadata.config.selectedPanels
|
|
149
152
|
) {
|
|
150
|
-
|
|
153
|
+
// update editing content block
|
|
154
|
+
this.selectedPanels =
|
|
155
|
+
newValue.metadata.config.selectedPanels
|
|
151
156
|
this.expansionPanelKey = Crypto.id()
|
|
152
157
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
|
|
159
|
+
const length = newValue.metadata.config.items.length
|
|
160
|
+
let counter = 0
|
|
161
|
+
newValue.metadata.config.items.forEach((element) => {
|
|
162
|
+
if (
|
|
163
|
+
element.expand === true &&
|
|
164
|
+
this.editingInContentItem !== true
|
|
165
|
+
) {
|
|
166
|
+
this.editingInContentItem = true
|
|
167
|
+
this.expansionPanelKey = Crypto.id()
|
|
168
|
+
}
|
|
169
|
+
if (element.expand === false) {
|
|
170
|
+
counter = counter + 1
|
|
171
|
+
}
|
|
172
|
+
if (counter === length) {
|
|
173
|
+
this.editingInContentItem = false
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
},
|
|
160
177
|
},
|
|
161
178
|
render() {
|
|
162
179
|
if (this.render === true) {
|
|
@@ -199,6 +216,54 @@ export default {
|
|
|
199
216
|
const foundAsset = this.resolveAsset(asset)
|
|
200
217
|
return _.get(foundAsset, 'asset.metadata.props.alt', null)
|
|
201
218
|
},
|
|
219
|
+
getImageWidth(item) {
|
|
220
|
+
if (item.fileConfig.display) {
|
|
221
|
+
return String(item.fileConfig.display.width) + '%'
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
getTextImageContainerClass(item) {
|
|
225
|
+
const { margin, width } = item.fileConfig.display
|
|
226
|
+
|
|
227
|
+
if (width === 100) {
|
|
228
|
+
return margin === 'top'
|
|
229
|
+
? 'flex-column-reverse '
|
|
230
|
+
: 'flex-column '
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// If no display items have been set, keep the image in its own row
|
|
234
|
+
if (!margin) {
|
|
235
|
+
return 'flex-column '
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
switch (margin) {
|
|
239
|
+
case 'top':
|
|
240
|
+
return 'flex-column-reverse '
|
|
241
|
+
case 'right':
|
|
242
|
+
return _.isEmpty(item.content)
|
|
243
|
+
? 'justify-end'
|
|
244
|
+
: 'justify-space-between'
|
|
245
|
+
case 'left':
|
|
246
|
+
return ''
|
|
247
|
+
default:
|
|
248
|
+
return 'flex-column '
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
getImageOrder(item) {
|
|
252
|
+
const margin = item.fileConfig.display?.margin
|
|
253
|
+
if (margin) {
|
|
254
|
+
switch (margin) {
|
|
255
|
+
case 'left':
|
|
256
|
+
return 'order-first pr-1 '
|
|
257
|
+
case 'right':
|
|
258
|
+
return ''
|
|
259
|
+
default:
|
|
260
|
+
return 'align-self-center '
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
// if adjusting size and margin hasn't been set yet keep centered here
|
|
264
|
+
return 'align-self-center '
|
|
265
|
+
}
|
|
266
|
+
},
|
|
202
267
|
async onBeforeSave() {
|
|
203
268
|
this.block.metadata.config.items.forEach((element) => {
|
|
204
269
|
element.expand = false
|
|
@@ -10,19 +10,10 @@
|
|
|
10
10
|
:disabled="isLoading"
|
|
11
11
|
@click="generateAIQuestion"
|
|
12
12
|
>
|
|
13
|
-
<v-icon class="pr-1" v-if="!isLoading"
|
|
14
|
-
|
|
15
|
-
>
|
|
16
|
-
{{
|
|
17
|
-
this.$t(
|
|
18
|
-
'windward.core.components.content.blocks.generate_questions.button_label'
|
|
19
|
-
)
|
|
20
|
-
}}
|
|
13
|
+
<v-icon class="pr-1" v-if="!isLoading">mdi-magic-staff</v-icon>
|
|
14
|
+
{{ $t('windward.core.components.content.blocks.generate_questions.button_label') }}
|
|
21
15
|
<template v-slot:loader>
|
|
22
|
-
<v-progress-circular
|
|
23
|
-
indeterminate
|
|
24
|
-
size="23"
|
|
25
|
-
></v-progress-circular>
|
|
16
|
+
<v-progress-circular indeterminate size="23"></v-progress-circular>
|
|
26
17
|
</template>
|
|
27
18
|
</v-btn>
|
|
28
19
|
</v-col>
|
|
@@ -34,11 +25,7 @@
|
|
|
34
25
|
outlined
|
|
35
26
|
hide-details
|
|
36
27
|
dense
|
|
37
|
-
:label="
|
|
38
|
-
$t(
|
|
39
|
-
'windward.core.components.content.blocks.generate_questions.selected_pages'
|
|
40
|
-
)
|
|
41
|
-
"
|
|
28
|
+
:label="$t('windward.core.components.content.blocks.generate_questions.selected_pages')"
|
|
42
29
|
item-text="content.name"
|
|
43
30
|
return-object
|
|
44
31
|
></v-select>
|
|
@@ -116,11 +103,19 @@ export default {
|
|
|
116
103
|
this.$emit('click:generate', generatedQuestion)
|
|
117
104
|
}
|
|
118
105
|
} catch (error) {
|
|
119
|
-
|
|
106
|
+
const errorMessage = error.response?.data?.error?.message || 'assessment.error.technical'
|
|
107
|
+
const errorType = errorMessage.split('.').pop()
|
|
108
|
+
const basePath = 'windward.core.components.content.blocks.generate_questions.error'
|
|
109
|
+
|
|
120
110
|
this.$dialog.error(
|
|
121
|
-
this.$t(
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
this.$t(`${basePath}.${errorType}`) + '\n\n' +
|
|
112
|
+
this.$t(`${basePath}.${errorType}_support`),
|
|
113
|
+
{
|
|
114
|
+
duration: 5000,
|
|
115
|
+
keepOnHover: true,
|
|
116
|
+
singleton: true,
|
|
117
|
+
type: 'error'
|
|
118
|
+
}
|
|
124
119
|
)
|
|
125
120
|
} finally {
|
|
126
121
|
this.isLoading = false
|
|
@@ -129,6 +124,7 @@ export default {
|
|
|
129
124
|
},
|
|
130
125
|
}
|
|
131
126
|
</script>
|
|
127
|
+
|
|
132
128
|
<style scoped>
|
|
133
129
|
.btn-selector {
|
|
134
130
|
width: 100%;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:height="200"
|
|
28
28
|
menubar=""
|
|
29
29
|
></TextEditor>
|
|
30
|
-
<p class="pa-3 text-center
|
|
30
|
+
<p class="pa-3 text-center">
|
|
31
31
|
<v-btn
|
|
32
32
|
color="primary"
|
|
33
33
|
elevation="0"
|
|
@@ -49,7 +49,11 @@
|
|
|
49
49
|
}}
|
|
50
50
|
</p>
|
|
51
51
|
<v-alert color="light-blue lighten-4">
|
|
52
|
-
<TextViewer
|
|
52
|
+
<TextViewer
|
|
53
|
+
v-model="response"
|
|
54
|
+
:height="200"
|
|
55
|
+
class="alert-text"
|
|
56
|
+
></TextViewer>
|
|
53
57
|
</v-alert>
|
|
54
58
|
<div v-if="block.metadata.config.sample_response">
|
|
55
59
|
<p>
|
|
@@ -63,10 +67,11 @@
|
|
|
63
67
|
<TextViewer
|
|
64
68
|
v-model="block.metadata.config.sample_response"
|
|
65
69
|
:height="200"
|
|
70
|
+
class="alert-text"
|
|
66
71
|
></TextViewer>
|
|
67
72
|
</v-alert>
|
|
68
73
|
</div>
|
|
69
|
-
<p class="pa-3 text-center
|
|
74
|
+
<p class="pa-3 text-center">
|
|
70
75
|
<v-btn
|
|
71
76
|
elevation="0"
|
|
72
77
|
color="primary"
|
|
@@ -192,3 +197,8 @@ export default {
|
|
|
192
197
|
},
|
|
193
198
|
}
|
|
194
199
|
</script>
|
|
200
|
+
<style scoped>
|
|
201
|
+
.alert-text {
|
|
202
|
+
color: black !important;
|
|
203
|
+
}
|
|
204
|
+
</style>
|
|
@@ -37,7 +37,10 @@
|
|
|
37
37
|
.config.items"
|
|
38
38
|
:key="'tabContent ' + tabContentIndex"
|
|
39
39
|
>
|
|
40
|
-
<v-container
|
|
40
|
+
<v-container
|
|
41
|
+
class="d-flex"
|
|
42
|
+
:class="getTextImageContainerClass(tabContent)"
|
|
43
|
+
>
|
|
41
44
|
<TextViewer
|
|
42
45
|
v-if="!tabContent.expand"
|
|
43
46
|
v-model="tabContent.content"
|
|
@@ -50,10 +53,13 @@
|
|
|
50
53
|
<ImageAssetViewer
|
|
51
54
|
v-if="
|
|
52
55
|
tabContent.imageAsset &&
|
|
53
|
-
tabContent.imageAsset.asset
|
|
56
|
+
tabContent.imageAsset.asset &&
|
|
57
|
+
tabContent.imageAsset.asset.file_asset_id
|
|
54
58
|
"
|
|
55
59
|
v-model="tabContent.imageAsset"
|
|
56
60
|
:assets="block.assets"
|
|
61
|
+
:class="getImageOrder(tabContent)"
|
|
62
|
+
:max-width="getImageWidth(tabContent)"
|
|
57
63
|
></ImageAssetViewer>
|
|
58
64
|
</v-container>
|
|
59
65
|
</v-tab-item>
|
|
@@ -86,6 +92,14 @@ export default {
|
|
|
86
92
|
tabHeader: '',
|
|
87
93
|
expand: false,
|
|
88
94
|
content: '',
|
|
95
|
+
imageAsset: {
|
|
96
|
+
display: {
|
|
97
|
+
width: 100,
|
|
98
|
+
margin: '',
|
|
99
|
+
padding: '',
|
|
100
|
+
},
|
|
101
|
+
hideBackground: true,
|
|
102
|
+
},
|
|
89
103
|
}
|
|
90
104
|
this.block.metadata.config.items = []
|
|
91
105
|
this.block.metadata.config.items.push(defaultObject)
|
|
@@ -113,6 +127,57 @@ export default {
|
|
|
113
127
|
})
|
|
114
128
|
this.block.metadata.config.currentTab = null
|
|
115
129
|
},
|
|
130
|
+
getImageWidth(item) {
|
|
131
|
+
if (item.imageAsset?.display) {
|
|
132
|
+
return String(item.imageAsset.display.width) + '%'
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
getTextImageContainerClass(item) {
|
|
136
|
+
const { margin, width } = item.imageAsset.display
|
|
137
|
+
// if full width set container to column
|
|
138
|
+
if (width === 100) {
|
|
139
|
+
return margin === 'top'
|
|
140
|
+
? 'flex-column-reverse '
|
|
141
|
+
: 'flex-column '
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// If no display items have been set, keep the image in its own row
|
|
145
|
+
if (!margin) {
|
|
146
|
+
return 'flex-column '
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
switch (margin) {
|
|
150
|
+
case 'top':
|
|
151
|
+
return 'flex-column-reverse '
|
|
152
|
+
case 'right':
|
|
153
|
+
return _.isEmpty(item.content)
|
|
154
|
+
? 'justify-end'
|
|
155
|
+
: 'justify-space-between'
|
|
156
|
+
case 'left':
|
|
157
|
+
return ''
|
|
158
|
+
default:
|
|
159
|
+
return 'flex-column '
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
getImageOrder(item) {
|
|
163
|
+
const margin = item.imageAsset.display?.margin
|
|
164
|
+
// filter out tab blocks that were created before custom
|
|
165
|
+
// spacing was added to image asset settings
|
|
166
|
+
if (margin) {
|
|
167
|
+
// if top or bottom image will always be centered
|
|
168
|
+
switch (margin) {
|
|
169
|
+
case 'left':
|
|
170
|
+
return 'order-first pr-1 '
|
|
171
|
+
case 'right':
|
|
172
|
+
return ''
|
|
173
|
+
default:
|
|
174
|
+
return 'align-self-center '
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
// if adjusting size and margin hasn't been set yet keep centered here
|
|
178
|
+
return 'align-self-center '
|
|
179
|
+
}
|
|
180
|
+
},
|
|
116
181
|
},
|
|
117
182
|
}
|
|
118
183
|
</script>
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
:rewind="block.metadata.config.attributes.rewind"
|
|
30
30
|
:loop="block.metadata.config.attributes.loop"
|
|
31
31
|
:muted="block.metadata.config.attributes.muted"
|
|
32
|
+
:volume.sync="volume"
|
|
33
|
+
:cc.sync="ccVisible"
|
|
32
34
|
:playsinline="block.metadata.config.attributes.playsinline"
|
|
33
35
|
:poster="linkedPosterPublicUrl"
|
|
34
36
|
:preload="block.metadata.config.attributes.preload"
|
|
@@ -268,6 +270,38 @@ export default {
|
|
|
268
270
|
}
|
|
269
271
|
},
|
|
270
272
|
},
|
|
273
|
+
ccVisible: {
|
|
274
|
+
get() {
|
|
275
|
+
const user = new AuthUserRepository(this.$nuxt)
|
|
276
|
+
return user.getPreference('video.cc-visible', false)
|
|
277
|
+
},
|
|
278
|
+
set(v) {
|
|
279
|
+
try {
|
|
280
|
+
const user = new AuthUserRepository(this.$nuxt)
|
|
281
|
+
user.setPreference('video.cc-visible', v)
|
|
282
|
+
user.save()
|
|
283
|
+
} catch (e) {
|
|
284
|
+
console.error('Could not save user video preference!')
|
|
285
|
+
console.error(e)
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
volume: {
|
|
290
|
+
get() {
|
|
291
|
+
const user = new AuthUserRepository(this.$nuxt)
|
|
292
|
+
return user.getPreference('video.volume', 0.5)
|
|
293
|
+
},
|
|
294
|
+
set(v) {
|
|
295
|
+
try {
|
|
296
|
+
const user = new AuthUserRepository(this.$nuxt)
|
|
297
|
+
user.setPreference('video.volume', v)
|
|
298
|
+
user.save()
|
|
299
|
+
} catch (e) {
|
|
300
|
+
console.error('Could not save user video preference!')
|
|
301
|
+
console.error(e)
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
},
|
|
271
305
|
},
|
|
272
306
|
data() {
|
|
273
307
|
return {
|
|
@@ -9,7 +9,21 @@
|
|
|
9
9
|
<template #title>{{ $t(config.i18n) }}</template>
|
|
10
10
|
<template #form="{ on, attrs }">
|
|
11
11
|
<div v-bind="attrs" v-on="on">
|
|
12
|
-
<
|
|
12
|
+
<v-alert
|
|
13
|
+
v-if="!$ContextService.courseInSourceOrganization()"
|
|
14
|
+
type="warning"
|
|
15
|
+
>
|
|
16
|
+
{{
|
|
17
|
+
$t(
|
|
18
|
+
'shared.forms.source_organization_course_lock'
|
|
19
|
+
)
|
|
20
|
+
}}
|
|
21
|
+
</v-alert>
|
|
22
|
+
<CourseGlossary
|
|
23
|
+
:disabled="
|
|
24
|
+
!$ContextService.courseInSourceOrganization()
|
|
25
|
+
"
|
|
26
|
+
/>
|
|
13
27
|
</div>
|
|
14
28
|
</template>
|
|
15
29
|
</DialogBox>
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<template #activator="{ on, attrs }">
|
|
4
4
|
<v-list-item
|
|
5
5
|
:class="color"
|
|
6
|
-
v-on="on"
|
|
7
|
-
v-bind="attrs"
|
|
8
6
|
:to="'/course/' + course.id + '/glossary'"
|
|
7
|
+
v-bind="attrs"
|
|
8
|
+
v-on="on"
|
|
9
9
|
>
|
|
10
10
|
<v-list-item-action>
|
|
11
|
-
<v-icon v-
|
|
11
|
+
<v-icon v-bind="attrs" v-on="on"
|
|
12
12
|
>mdi-comment-text-multiple</v-icon
|
|
13
13
|
>
|
|
14
14
|
</v-list-item-action>
|
|
@@ -104,9 +104,11 @@
|
|
|
104
104
|
.fileConfig
|
|
105
105
|
"
|
|
106
106
|
:assets.sync="block.assets"
|
|
107
|
+
:disabled="render"
|
|
107
108
|
hide-background
|
|
108
109
|
hide-decorative
|
|
109
110
|
hide-modal
|
|
111
|
+
show-spacing
|
|
110
112
|
></ImageAssetSettings>
|
|
111
113
|
</v-container>
|
|
112
114
|
</v-container>
|
|
@@ -184,7 +186,14 @@ export default {
|
|
|
184
186
|
header: '',
|
|
185
187
|
expand: false,
|
|
186
188
|
content: '',
|
|
187
|
-
fileConfig: {
|
|
189
|
+
fileConfig: {
|
|
190
|
+
display: {
|
|
191
|
+
width: 100,
|
|
192
|
+
margin: '',
|
|
193
|
+
padding: '',
|
|
194
|
+
},
|
|
195
|
+
hideBackground: true,
|
|
196
|
+
},
|
|
188
197
|
}
|
|
189
198
|
this.block.metadata.config.items = []
|
|
190
199
|
this.block.metadata.config.items.push(defaultObject)
|
|
@@ -206,8 +215,30 @@ export default {
|
|
|
206
215
|
},
|
|
207
216
|
mounted() {
|
|
208
217
|
this.block.metadata.config.selectedPanels = 0
|
|
218
|
+
this.checkForCustomSpacing()
|
|
209
219
|
},
|
|
210
220
|
methods: {
|
|
221
|
+
checkForCustomSpacing() {
|
|
222
|
+
// check if block has items set up already and if they were created before the display key was added to image asset object
|
|
223
|
+
if (
|
|
224
|
+
this.block.metadata.config.items.length >= 1 &&
|
|
225
|
+
_.isEmpty(
|
|
226
|
+
this.block.metadata.config.items[0].fileConfig.display
|
|
227
|
+
)
|
|
228
|
+
) {
|
|
229
|
+
// need to add display.margin ect. for custom spacing component so that changes are tracked reactively
|
|
230
|
+
this.block.metadata.config.items.forEach((item) => {
|
|
231
|
+
if (!item.fileConfig.display) {
|
|
232
|
+
item.fileConfig.display = {
|
|
233
|
+
width: 100,
|
|
234
|
+
margin: '',
|
|
235
|
+
padding: '',
|
|
236
|
+
}
|
|
237
|
+
item.fileConfig.hideBackground = true
|
|
238
|
+
}
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
},
|
|
211
242
|
onUpdatePanel($event) {
|
|
212
243
|
if ($event !== this.block.metadata.config.selectedPanels) {
|
|
213
244
|
//catch click event to open selected panel to edit
|
|
@@ -223,7 +254,14 @@ export default {
|
|
|
223
254
|
header: '',
|
|
224
255
|
expand: false,
|
|
225
256
|
content: '',
|
|
226
|
-
fileConfig: {
|
|
257
|
+
fileConfig: {
|
|
258
|
+
display: {
|
|
259
|
+
width: 100,
|
|
260
|
+
margin: '',
|
|
261
|
+
padding: '',
|
|
262
|
+
},
|
|
263
|
+
hideBackground: true,
|
|
264
|
+
},
|
|
227
265
|
}
|
|
228
266
|
this.block.metadata.config.items.push(default_item)
|
|
229
267
|
this.block.metadata.config.selectedPanels =
|
|
@@ -76,13 +76,18 @@
|
|
|
76
76
|
></TextEditor>
|
|
77
77
|
|
|
78
78
|
<v-card class="mt-2">
|
|
79
|
-
<v-card-text>
|
|
79
|
+
<v-card-text class="pa-0">
|
|
80
80
|
<ImageAssetSettings
|
|
81
81
|
v-model="
|
|
82
82
|
block.metadata.config.items[index]
|
|
83
83
|
.imageAsset
|
|
84
84
|
"
|
|
85
85
|
:assets.sync="block.assets"
|
|
86
|
+
:disabled="render"
|
|
87
|
+
hide-background
|
|
88
|
+
hide-decorative
|
|
89
|
+
hide-modal
|
|
90
|
+
show-spacing
|
|
86
91
|
>
|
|
87
92
|
</ImageAssetSettings>
|
|
88
93
|
</v-card-text>
|
|
@@ -160,7 +165,14 @@ export default {
|
|
|
160
165
|
tabHeader: '',
|
|
161
166
|
expand: false,
|
|
162
167
|
content: '',
|
|
163
|
-
imageAsset:
|
|
168
|
+
imageAsset: {
|
|
169
|
+
display: {
|
|
170
|
+
width: 100,
|
|
171
|
+
margin: '',
|
|
172
|
+
padding: '',
|
|
173
|
+
},
|
|
174
|
+
hideBackground: true,
|
|
175
|
+
},
|
|
164
176
|
}
|
|
165
177
|
this.block.metadata.config.items = []
|
|
166
178
|
this.block.metadata.config.items.push(defaultObject)
|
|
@@ -178,6 +190,7 @@ export default {
|
|
|
178
190
|
if (this.block.metadata.config.items.length <= 0) {
|
|
179
191
|
this.onAddElement()
|
|
180
192
|
}
|
|
193
|
+
this.checkForCustomSpacing()
|
|
181
194
|
},
|
|
182
195
|
beforeDestroy() {
|
|
183
196
|
if (this.debouncer) {
|
|
@@ -185,12 +198,40 @@ export default {
|
|
|
185
198
|
}
|
|
186
199
|
},
|
|
187
200
|
methods: {
|
|
201
|
+
checkForCustomSpacing() {
|
|
202
|
+
// check if block has items set up already and if they were created before the dispaly key was added to image asset object
|
|
203
|
+
if (
|
|
204
|
+
this.block.metadata.config.items.length >= 1 &&
|
|
205
|
+
_.isEmpty(
|
|
206
|
+
this.block.metadata.config.items[0].imageAsset.display
|
|
207
|
+
)
|
|
208
|
+
) {
|
|
209
|
+
// need to add display.margin ect. for custom spacing component so that changes are tracked reactively
|
|
210
|
+
this.block.metadata.config.items.forEach((item) => {
|
|
211
|
+
if (!item.imageAsset.display) {
|
|
212
|
+
item.imageAsset.display = {
|
|
213
|
+
width: 100,
|
|
214
|
+
margin: '',
|
|
215
|
+
padding: '',
|
|
216
|
+
}
|
|
217
|
+
item.imageAsset.hideBackground = true
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
},
|
|
188
222
|
onAddElement() {
|
|
189
223
|
const defaultObject = {
|
|
190
224
|
tabHeader: '',
|
|
191
225
|
expand: false,
|
|
192
226
|
content: '',
|
|
193
|
-
imageAsset:
|
|
227
|
+
imageAsset: {
|
|
228
|
+
display: {
|
|
229
|
+
width: 100,
|
|
230
|
+
margin: '',
|
|
231
|
+
padding: '',
|
|
232
|
+
},
|
|
233
|
+
hideBackground: true,
|
|
234
|
+
},
|
|
194
235
|
}
|
|
195
236
|
this.block.metadata.config.items.push(defaultObject)
|
|
196
237
|
this.block.metadata.config.currentTab =
|
|
@@ -123,7 +123,10 @@
|
|
|
123
123
|
(file, rawFile) =>
|
|
124
124
|
onAdSourceSelect(file, rawFile, 0)
|
|
125
125
|
"
|
|
126
|
-
@change:track="
|
|
126
|
+
@change:track="
|
|
127
|
+
(file, rawFile) =>
|
|
128
|
+
onAdTrackSelect(file, rawFile, 0)
|
|
129
|
+
"
|
|
127
130
|
></SourcePicker>
|
|
128
131
|
</v-tab-item>
|
|
129
132
|
|
|
@@ -148,7 +151,10 @@
|
|
|
148
151
|
(file, rawFile) =>
|
|
149
152
|
onAdSourceSelect(file, rawFile, 100)
|
|
150
153
|
"
|
|
151
|
-
@change:track="
|
|
154
|
+
@change:track="
|
|
155
|
+
(file, rawFile) =>
|
|
156
|
+
onAdTrackSelect(file, rawFile, 100)
|
|
157
|
+
"
|
|
152
158
|
></SourcePicker>
|
|
153
159
|
</v-tab-item>
|
|
154
160
|
</v-tabs-items>
|
|
@@ -626,7 +632,7 @@ export default {
|
|
|
626
632
|
|
|
627
633
|
this.reloadVideo()
|
|
628
634
|
},
|
|
629
|
-
onSourceSelect(file,
|
|
635
|
+
onSourceSelect(file, _rawFile) {
|
|
630
636
|
// No file, clear the selection
|
|
631
637
|
if (_.isEmpty(file)) {
|
|
632
638
|
delete this.block.metadata.config.playlist[this.playlistIndex]
|
|
@@ -637,7 +643,7 @@ export default {
|
|
|
637
643
|
|
|
638
644
|
// Clear out any associated captions
|
|
639
645
|
this.media.track = null
|
|
640
|
-
this.onTrackSelect(
|
|
646
|
+
this.onTrackSelect()
|
|
641
647
|
|
|
642
648
|
this.showVideo = false
|
|
643
649
|
} else {
|
|
@@ -657,11 +663,11 @@ export default {
|
|
|
657
663
|
|
|
658
664
|
// Clear the tracks. it will either be inherited via linked captions or be hard-set by the user
|
|
659
665
|
this.media.track = null
|
|
660
|
-
this.onTrackSelect(
|
|
666
|
+
this.onTrackSelect()
|
|
661
667
|
}
|
|
662
668
|
this.reloadVideo()
|
|
663
669
|
},
|
|
664
|
-
onTrackSelect(file) {
|
|
670
|
+
onTrackSelect(file = null, _rawFile = null) {
|
|
665
671
|
if (_.isEmpty(file)) {
|
|
666
672
|
this.block.metadata.config.playlist[this.playlistIndex].tracks =
|
|
667
673
|
[]
|
|
@@ -672,7 +678,7 @@ export default {
|
|
|
672
678
|
}
|
|
673
679
|
this.reloadVideo()
|
|
674
680
|
},
|
|
675
|
-
onAdSourceSelect(file,
|
|
681
|
+
onAdSourceSelect(file, _rawFile, playAtPercent) {
|
|
676
682
|
const adIndex = this.getAdSlot(playAtPercent)
|
|
677
683
|
|
|
678
684
|
// Prep in case the ad slot isn't setup yet
|
|
@@ -693,11 +699,11 @@ export default {
|
|
|
693
699
|
|
|
694
700
|
// Clear the tracks. it will either be inherited via linked captions or be hard-set by the user
|
|
695
701
|
this.media.ads[playAtPercent].track = null
|
|
696
|
-
this.onAdTrackSelect(null, playAtPercent)
|
|
702
|
+
this.onAdTrackSelect(null, null, playAtPercent)
|
|
697
703
|
}
|
|
698
704
|
this.reloadVideo()
|
|
699
705
|
},
|
|
700
|
-
onAdTrackSelect(file, playAtPercent) {
|
|
706
|
+
onAdTrackSelect(file, _rawFile, playAtPercent) {
|
|
701
707
|
const adIndex = this.getAdSlot(playAtPercent)
|
|
702
708
|
|
|
703
709
|
if (_.isEmpty(file)) {
|
|
@@ -715,7 +721,7 @@ export default {
|
|
|
715
721
|
}
|
|
716
722
|
this.reloadVideo()
|
|
717
723
|
},
|
|
718
|
-
onPlaybackChange(
|
|
724
|
+
onPlaybackChange(_e) {
|
|
719
725
|
// Sort the list so we don't get instances of 2, 1, 0.25, 3
|
|
720
726
|
this.block.metadata.config.attributes.playbackrates.sort()
|
|
721
727
|
},
|
|
@@ -54,6 +54,21 @@ export default {
|
|
|
54
54
|
content =
|
|
55
55
|
FillInBlankHelper.renderFillInTHeBlankHtml(content)
|
|
56
56
|
}
|
|
57
|
+
// finds any underscores grouped together of any length over 2
|
|
58
|
+
let regex = /(_{2,})/g
|
|
59
|
+
if (content.match(regex)) {
|
|
60
|
+
content = content.replace(regex, (match) => {
|
|
61
|
+
return (
|
|
62
|
+
'<span role="img" aria-label="' +
|
|
63
|
+
this.$t(
|
|
64
|
+
'windward.core.components.utils.tiny_mce_wrapper.blank'
|
|
65
|
+
) +
|
|
66
|
+
'">' +
|
|
67
|
+
match +
|
|
68
|
+
'</span>'
|
|
69
|
+
)
|
|
70
|
+
})
|
|
71
|
+
}
|
|
57
72
|
}
|
|
58
73
|
return Vue.compile('<div>' + content + '</div>')
|
|
59
74
|
},
|
|
@@ -84,4 +99,8 @@ img {
|
|
|
84
99
|
font-size: 1rem;
|
|
85
100
|
line-height: 1.75em;
|
|
86
101
|
}
|
|
102
|
+
caption {
|
|
103
|
+
color: var(--v-primary-base);
|
|
104
|
+
text-align: left;
|
|
105
|
+
}
|
|
87
106
|
</style>
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<label v-if="label" class="editor-label">{{ label }}</label>
|
|
12
12
|
</slot>
|
|
13
13
|
<Editor
|
|
14
|
+
ref="editor"
|
|
14
15
|
:id="editorId"
|
|
15
16
|
:key="seed + (isDarkTheme ? '-theme-dark' : '-theme-light')"
|
|
16
17
|
v-model="text"
|
|
@@ -440,6 +441,7 @@ export default {
|
|
|
440
441
|
' color: #1a1d1e;' +
|
|
441
442
|
'}',
|
|
442
443
|
importcss_append: true,
|
|
444
|
+
link_default_target: '_blank',
|
|
443
445
|
}
|
|
444
446
|
},
|
|
445
447
|
elementBody() {
|
|
@@ -467,6 +469,13 @@ export default {
|
|
|
467
469
|
},
|
|
468
470
|
|
|
469
471
|
methods: {
|
|
472
|
+
getEditor() {
|
|
473
|
+
if (this.$refs.editor && this.$refs.editor.editor) {
|
|
474
|
+
return this.$refs.editor.editor
|
|
475
|
+
} else {
|
|
476
|
+
return null
|
|
477
|
+
}
|
|
478
|
+
},
|
|
470
479
|
read() {
|
|
471
480
|
if (this.paused) {
|
|
472
481
|
this.resume()
|
|
@@ -9,7 +9,17 @@ table {
|
|
|
9
9
|
border: 1px solid var(--v-primary-base);
|
|
10
10
|
padding: 3px;
|
|
11
11
|
}
|
|
12
|
+
|
|
13
|
+
// Define styles for floating buttons and behavior in small screens
|
|
14
|
+
@media (max-width: 600px) {
|
|
15
|
+
// Ensure table is scrollable horizontally
|
|
16
|
+
display: block;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
12
21
|
}
|
|
22
|
+
|
|
13
23
|
table {
|
|
14
24
|
&.windward-table-default {
|
|
15
25
|
color: black;
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
'writable'
|
|
34
34
|
)
|
|
35
35
|
"
|
|
36
|
+
:disabled="disabled"
|
|
36
37
|
@click:save="save"
|
|
37
38
|
@click:save-new="saveNew"
|
|
38
39
|
@click:trigger="addTerm"
|
|
@@ -108,6 +109,7 @@
|
|
|
108
109
|
<SpeedDial
|
|
109
110
|
direction="left"
|
|
110
111
|
transition="slide-x-reverse-transition"
|
|
112
|
+
:disabled="disabled"
|
|
111
113
|
>
|
|
112
114
|
<v-btn
|
|
113
115
|
color="error"
|
|
@@ -142,7 +144,7 @@
|
|
|
142
144
|
>
|
|
143
145
|
{{ $t('shared.forms.edit') }}
|
|
144
146
|
<span class="sr-only">{{
|
|
145
|
-
$t('forms.edit')
|
|
147
|
+
$t('shared.forms.edit')
|
|
146
148
|
}}</span>
|
|
147
149
|
</v-btn>
|
|
148
150
|
</SpeedDial>
|
|
@@ -171,8 +173,9 @@ export default {
|
|
|
171
173
|
components: { DialogBox, CourseGlossaryForm, SpeedDial, TextViewer },
|
|
172
174
|
layout: 'course',
|
|
173
175
|
middleware: ['auth'],
|
|
174
|
-
props: {
|
|
175
|
-
|
|
176
|
+
props: {
|
|
177
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
178
|
+
},
|
|
176
179
|
data() {
|
|
177
180
|
return {
|
|
178
181
|
dialog: false,
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
error:
|
|
2
|
+
error: {
|
|
3
|
+
default: 'Could not generate question from provided content.',
|
|
4
|
+
default_support: 'Please try again or contact support if the issue persists.',
|
|
5
|
+
|
|
6
|
+
insufficient_content: 'More content needed to generate questions.',
|
|
7
|
+
insufficient_content_support: 'Please add more text, examples, or explanations to this section. We recommend at least 2-3 paragraphs of content.',
|
|
8
|
+
|
|
9
|
+
content_mismatch: 'Content doesn\'t match question type.',
|
|
10
|
+
content_mismatch_support: 'The current content isn\'t suitable for this type of question. Consider adding more specific examples or comparable items.',
|
|
11
|
+
|
|
12
|
+
llm_unavailable: 'Question generation temporarily unavailable.',
|
|
13
|
+
llm_unavailable_support: 'We\'re unable to connect to our AI service at the moment. Please try again in a few minutes.',
|
|
14
|
+
|
|
15
|
+
technical: 'Unable to process request.',
|
|
16
|
+
technical_support: 'Something went wrong. Please try again or contact support if this continues.'
|
|
17
|
+
},
|
|
3
18
|
button_label: 'Generate Question',
|
|
4
|
-
selected_pages: 'Selected Page'
|
|
19
|
+
selected_pages: 'Selected Page'
|
|
5
20
|
}
|
|
@@ -27,4 +27,5 @@ export default {
|
|
|
27
27
|
link_href_missing: 'a (anchor) element must contain an href attribute.',
|
|
28
28
|
link_text_missing:
|
|
29
29
|
'a (anchor) element must contain text. The text may occur in the anchor text or in the title attribute of the anchor or in the Alt text of an image used within the anchor',
|
|
30
|
+
blank: 'blank',
|
|
30
31
|
}
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
error:
|
|
2
|
+
error: {
|
|
3
|
+
default:
|
|
4
|
+
'No se pudo generar la pregunta a partir del contenido proporcionado.',
|
|
5
|
+
default_support:
|
|
6
|
+
'Inténtalo de nuevo o ponte en contacto con el servicio de asistencia si el problema persiste.',
|
|
7
|
+
|
|
8
|
+
insufficient_content:
|
|
9
|
+
'Se necesita más contenido para generar preguntas.',
|
|
10
|
+
insufficient_content_support:
|
|
11
|
+
'Agregue más texto, ejemplos o explicaciones a esta sección. Recomendamos al menos 2 o 3 párrafos de contenido.',
|
|
12
|
+
|
|
13
|
+
content_mismatch: 'El contenido no coincide con el tipo de pregunta.',
|
|
14
|
+
content_mismatch_support:
|
|
15
|
+
'El contenido actual no es adecuado para este tipo de pregunta. Considere agregar ejemplos más específicos o elementos comparables.',
|
|
16
|
+
|
|
17
|
+
llm_unavailable:
|
|
18
|
+
'La generación de preguntas no está disponible temporalmente.',
|
|
19
|
+
llm_unavailable_support:
|
|
20
|
+
'No podemos conectarnos a nuestro servicio de IA en este momento. Inténtalo nuevamente en unos minutos.',
|
|
21
|
+
|
|
22
|
+
technical: 'No se puede procesar la solicitud.',
|
|
23
|
+
technical_support:
|
|
24
|
+
'Algo salió mal. Inténtalo de nuevo o ponte en contacto con el servicio de asistencia si el problema persiste.',
|
|
25
|
+
},
|
|
3
26
|
button_label: 'Generar pregunta',
|
|
4
27
|
selected_pages: 'Página seleccionada',
|
|
5
28
|
}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
error:
|
|
2
|
+
error: {
|
|
3
|
+
default: 'Kunde inte generera fråga från tillhandahållet innehåll.',
|
|
4
|
+
default_support:
|
|
5
|
+
'Försök igen eller kontakta supporten om problemet kvarstår.',
|
|
6
|
+
|
|
7
|
+
insufficient_content: 'Mer innehåll behövs för att generera frågor.',
|
|
8
|
+
insufficient_content_support:
|
|
9
|
+
'Vänligen lägg till mer text, exempel eller förklaringar till det här avsnittet. Vi rekommenderar minst 2-3 stycken innehåll.',
|
|
10
|
+
|
|
11
|
+
content_mismatch: 'Innehållet matchar inte frågetyp.',
|
|
12
|
+
content_mismatch_support:
|
|
13
|
+
'Det aktuella innehållet är inte lämpligt för den här typen av frågor. Överväg att lägga till mer specifika exempel eller jämförbara objekt.',
|
|
14
|
+
|
|
15
|
+
llm_unavailable: 'Frågegenerering tillfälligt otillgänglig.',
|
|
16
|
+
llm_unavailable_support:
|
|
17
|
+
'Vi kan inte ansluta till vår AI-tjänst för tillfället. Försök igen om några minuter.',
|
|
18
|
+
|
|
19
|
+
technical: 'Kan inte behandla begäran.',
|
|
20
|
+
technical_support:
|
|
21
|
+
'Något gick fel. Försök igen eller kontakta supporten om detta fortsätter.',
|
|
22
|
+
},
|
|
3
23
|
button_label: 'Generera fråga',
|
|
4
24
|
selected_pages: 'Vald sida',
|
|
5
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windward/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Windward UI Core Plugins",
|
|
5
5
|
"main": "plugin.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-core#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@mindedge/vuetify-player": "^0.4.
|
|
24
|
+
"@mindedge/vuetify-player": "^0.4.2",
|
|
25
25
|
"@tinymce/tinymce-vue": "^3.2.8",
|
|
26
26
|
"accessibility-scanner": "^0.0.1",
|
|
27
27
|
"eslint": "^8.11.0",
|
package/pages/glossary.vue
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-row justify="center" align="center">
|
|
3
3
|
<v-col cols="12">
|
|
4
|
+
<v-alert
|
|
5
|
+
v-if="!$ContextService.courseInSourceOrganization()"
|
|
6
|
+
type="warning"
|
|
7
|
+
>
|
|
8
|
+
{{ $t('shared.forms.source_organization_course_lock') }}
|
|
9
|
+
</v-alert>
|
|
4
10
|
<div class="d-flex mb-5">
|
|
5
11
|
<h2 class="mr-auto flex-grow-1" tabindex="0">
|
|
6
12
|
{{ $t('windward.core.pages.glossary.title') }}
|
|
@@ -8,7 +14,9 @@
|
|
|
8
14
|
</div>
|
|
9
15
|
|
|
10
16
|
<v-spacer class="mt-5 mb-5" />
|
|
11
|
-
<CourseGlossary
|
|
17
|
+
<CourseGlossary
|
|
18
|
+
:disabled="!$ContextService.courseInSourceOrganization()"
|
|
19
|
+
/>
|
|
12
20
|
</v-col>
|
|
13
21
|
</v-row>
|
|
14
22
|
</template>
|
|
@@ -17,9 +25,9 @@
|
|
|
17
25
|
import { CourseGlossary } from '../utils/index'
|
|
18
26
|
export default {
|
|
19
27
|
name: 'Glossary',
|
|
20
|
-
middleware: ['auth', 'privilege'],
|
|
21
28
|
components: { CourseGlossary },
|
|
22
29
|
layout: 'authenticated',
|
|
30
|
+
middleware: ['auth', 'privilege'],
|
|
23
31
|
meta: {
|
|
24
32
|
privilege: {
|
|
25
33
|
'windward.organization.course.contentBlock': {
|
|
@@ -31,13 +31,27 @@ describe('AccordionSettings', () => {
|
|
|
31
31
|
header: '',
|
|
32
32
|
expand: false,
|
|
33
33
|
content: '',
|
|
34
|
-
fileConfig: {
|
|
34
|
+
fileConfig: {
|
|
35
|
+
display: {
|
|
36
|
+
width: 100,
|
|
37
|
+
margin: '',
|
|
38
|
+
padding: '',
|
|
39
|
+
},
|
|
40
|
+
hideBackground: true,
|
|
41
|
+
},
|
|
35
42
|
},
|
|
36
43
|
{
|
|
37
44
|
header: '',
|
|
38
45
|
expand: false,
|
|
39
46
|
content: '',
|
|
40
|
-
fileConfig: {
|
|
47
|
+
fileConfig: {
|
|
48
|
+
display: {
|
|
49
|
+
width: 100,
|
|
50
|
+
margin: '',
|
|
51
|
+
padding: '',
|
|
52
|
+
},
|
|
53
|
+
hideBackground: true,
|
|
54
|
+
},
|
|
41
55
|
},
|
|
42
56
|
])
|
|
43
57
|
})
|
|
@@ -27,8 +27,32 @@ describe('TabSettings', () => {
|
|
|
27
27
|
})
|
|
28
28
|
wrapper.vm.onAddElement()
|
|
29
29
|
expect(wrapper.vm.$data.block.metadata.config.items).toEqual([
|
|
30
|
-
{
|
|
31
|
-
|
|
30
|
+
{
|
|
31
|
+
tabHeader: '',
|
|
32
|
+
expand: false,
|
|
33
|
+
content: '',
|
|
34
|
+
imageAsset: {
|
|
35
|
+
display: {
|
|
36
|
+
width: 100,
|
|
37
|
+
margin: '',
|
|
38
|
+
padding: '',
|
|
39
|
+
},
|
|
40
|
+
hideBackground: true,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
tabHeader: '',
|
|
45
|
+
expand: false,
|
|
46
|
+
content: '',
|
|
47
|
+
imageAsset: {
|
|
48
|
+
display: {
|
|
49
|
+
width: 100,
|
|
50
|
+
margin: '',
|
|
51
|
+
padding: '',
|
|
52
|
+
},
|
|
53
|
+
hideBackground: true,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
32
56
|
])
|
|
33
57
|
})
|
|
34
58
|
|