@windward/core 0.11.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 CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### Release [0.12.0] created - 2025-02-18
4
+
5
+
3
6
  ### Release [0.11.0] created - 2025-02-05
4
7
 
5
8
 
@@ -64,7 +64,9 @@
64
64
  <ImageAssetViewer
65
65
  v-if="
66
66
  block.metadata.config.items[itemIndex]
67
- .fileConfig.asset
67
+ .fileConfig.asset &&
68
+ block.metadata.config.items[itemIndex]
69
+ .fileConfig.asset.file_asset_id
68
70
  "
69
71
  v-model="
70
72
  block.metadata.config.items[itemIndex]
@@ -245,7 +247,6 @@ export default {
245
247
  default:
246
248
  return 'flex-column '
247
249
  }
248
-
249
250
  },
250
251
  getImageOrder(item) {
251
252
  const margin = item.fileConfig.display?.margin
@@ -37,6 +37,10 @@
37
37
  size="100%"
38
38
  >
39
39
  <ImageAssetViewer
40
+ v-if="
41
+ item.fileConfig.asset &&
42
+ item.fileConfig.asset.file_asset_id
43
+ "
40
44
  v-model="item.fileConfig"
41
45
  :assets="block.assets"
42
46
  class="image-asset-viewer"
@@ -103,7 +103,8 @@ export default {
103
103
  this.$emit('click:generate', generatedQuestion)
104
104
  }
105
105
  } catch (error) {
106
- const errorType = error.response?.data?.errors?.detail?.split('.').pop() || 'default'
106
+ const errorMessage = error.response?.data?.error?.message || 'assessment.error.technical'
107
+ const errorType = errorMessage.split('.').pop()
107
108
  const basePath = 'windward.core.components.content.blocks.generate_questions.error'
108
109
 
109
110
  this.$dialog.error(
@@ -128,4 +129,4 @@ export default {
128
129
  .btn-selector {
129
130
  width: 100%;
130
131
  }
131
- </style>
132
+ </style>
@@ -49,7 +49,11 @@
49
49
  }}
50
50
  </p>
51
51
  <v-alert color="light-blue lighten-4">
52
- <TextViewer v-model="response" :height="200"></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,6 +67,7 @@
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>
@@ -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>
@@ -53,7 +53,8 @@
53
53
  <ImageAssetViewer
54
54
  v-if="
55
55
  tabContent.imageAsset &&
56
- tabContent.imageAsset.asset
56
+ tabContent.imageAsset.asset &&
57
+ tabContent.imageAsset.asset.file_asset_id
57
58
  "
58
59
  v-model="tabContent.imageAsset"
59
60
  :assets="block.assets"
@@ -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"
@@ -468,6 +469,13 @@ export default {
468
469
  },
469
470
 
470
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
+ },
471
479
  read() {
472
480
  if (this.paused) {
473
481
  this.resume()
@@ -1,25 +1,20 @@
1
1
  export default {
2
2
  error: {
3
3
  default: 'Could not generate question from provided content.',
4
- default_support:
5
- 'Please try again or contact support if the issue persists.',
6
-
4
+ default_support: 'Please try again or contact support if the issue persists.',
5
+
7
6
  insufficient_content: 'More content needed to generate questions.',
8
- insufficient_content_support:
9
- 'Please add more text, examples, or explanations to this section. We recommend at least 2-3 paragraphs of content.',
10
-
11
- content_mismatch: "Content doesn't match question type.",
12
- content_mismatch_support:
13
- "The current content isn't suitable for this type of question. Consider adding more specific examples or comparable items.",
14
-
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
+
15
12
  llm_unavailable: 'Question generation temporarily unavailable.',
16
- llm_unavailable_support:
17
- "We're unable to connect to our AI service at the moment. Please try again in a few minutes.",
18
-
13
+ llm_unavailable_support: 'We\'re unable to connect to our AI service at the moment. Please try again in a few minutes.',
14
+
19
15
  technical: 'Unable to process request.',
20
- technical_support:
21
- 'Something went wrong. Please try again or contact support if this continues.',
16
+ technical_support: 'Something went wrong. Please try again or contact support if this continues.'
22
17
  },
23
18
  button_label: 'Generate Question',
24
- selected_pages: 'Selected Page',
19
+ selected_pages: 'Selected Page'
25
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/core",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Windward UI Core Plugins",
5
5
  "main": "plugin.js",
6
6
  "scripts": {