@windward/core 0.12.2 → 0.12.4
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
CHANGED
|
@@ -217,12 +217,15 @@ export default {
|
|
|
217
217
|
return _.get(foundAsset, 'asset.metadata.props.alt', null)
|
|
218
218
|
},
|
|
219
219
|
getImageWidth(item) {
|
|
220
|
-
if (item
|
|
220
|
+
if (item?.fileConfig?.display) {
|
|
221
221
|
return String(item.fileConfig.display.width) + '%'
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
getTextImageContainerClass(item) {
|
|
225
|
-
const { margin, width } = item
|
|
225
|
+
const { margin, width } = item?.fileConfig?.display || {
|
|
226
|
+
margin: null,
|
|
227
|
+
width: null,
|
|
228
|
+
}
|
|
226
229
|
|
|
227
230
|
if (width === 100) {
|
|
228
231
|
return margin === 'top'
|
|
@@ -249,7 +252,7 @@ export default {
|
|
|
249
252
|
}
|
|
250
253
|
},
|
|
251
254
|
getImageOrder(item) {
|
|
252
|
-
const margin = item
|
|
255
|
+
const margin = item?.fileConfig?.display?.margin
|
|
253
256
|
if (margin) {
|
|
254
257
|
switch (margin) {
|
|
255
258
|
case 'left':
|
|
@@ -107,9 +107,16 @@ export default {
|
|
|
107
107
|
const errorType = errorMessage.split('.').pop()
|
|
108
108
|
const basePath = 'windward.core.components.content.blocks.generate_questions.error'
|
|
109
109
|
|
|
110
|
+
let errorText = this.$t(`${basePath}.${errorType}`) + '\n\n' +
|
|
111
|
+
this.$t(`${basePath}.${errorType}_support`)
|
|
112
|
+
|
|
113
|
+
if (errorType === 'technical') {
|
|
114
|
+
const errorCode = error.response?.data?.error?.details?.error_type || 'UNKNOWN'
|
|
115
|
+
errorText = errorText.replace('[ERROR_CODE]', errorCode)
|
|
116
|
+
}
|
|
117
|
+
|
|
110
118
|
this.$dialog.error(
|
|
111
|
-
|
|
112
|
-
this.$t(`${basePath}.${errorType}_support`),
|
|
119
|
+
errorText,
|
|
113
120
|
{
|
|
114
121
|
duration: 5000,
|
|
115
122
|
keepOnHover: true,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
+
:is="convertedContent"
|
|
3
4
|
v-show="value"
|
|
4
5
|
:class="textViewer ? 'text-viewer' : ''"
|
|
5
|
-
:is="convertedContent"
|
|
6
6
|
></component>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
+
import { mapGetters } from 'vuex'
|
|
11
|
+
import Vue from 'vue'
|
|
10
12
|
import MathHelper from '../../helpers/MathHelper'
|
|
11
13
|
import GlossaryHelper from '../../helpers/GlossaryHelper'
|
|
12
14
|
import FillInBlankHelper from '../../helpers/FillInBlankHelper'
|
|
13
|
-
import { mapGetters } from 'vuex'
|
|
14
|
-
import Vue from 'vue'
|
|
15
15
|
export default {
|
|
16
16
|
name: 'ContentViewer',
|
|
17
17
|
props: {
|
|
@@ -54,21 +54,6 @@ 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
|
-
}
|
|
72
57
|
}
|
|
73
58
|
return Vue.compile('<div>' + content + '</div>')
|
|
74
59
|
},
|
|
@@ -4,16 +4,16 @@ export default {
|
|
|
4
4
|
default_support: 'Please try again or contact support if the issue persists.',
|
|
5
5
|
|
|
6
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.',
|
|
7
|
+
insufficient_content_support: 'Please add more text, examples, or explanations to this section. We recommend at least 2-3 paragraphs of content to generate relevant questions.',
|
|
8
8
|
|
|
9
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.',
|
|
10
|
+
content_mismatch_support: 'The current content isn\'t suitable for this type of question. Consider adding more specific examples, numerical data, or comparable items depending on your desired question type.',
|
|
11
11
|
|
|
12
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.',
|
|
13
|
+
llm_unavailable_support: 'We\'re unable to connect to our AI service at the moment. Please try again in a few minutes or contact support if the issue persists.',
|
|
14
14
|
|
|
15
15
|
technical: 'Unable to process request.',
|
|
16
|
-
technical_support: 'Something went wrong. Please try again or contact support if this continues.'
|
|
16
|
+
technical_support: 'Something went wrong on our end. Please try again or contact support if this continues. Reference code: [ERROR_CODE]'
|
|
17
17
|
},
|
|
18
18
|
button_label: 'Generate Question',
|
|
19
19
|
selected_pages: 'Selected Page'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windward/core",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
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.3",
|
|
25
25
|
"@tinymce/tinymce-vue": "^3.2.8",
|
|
26
26
|
"accessibility-scanner": "^0.0.1",
|
|
27
27
|
"eslint": "^8.11.0",
|