@gitlab/ui 86.14.1 → 86.14.2
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,3 +1,10 @@
|
|
|
1
|
+
## [86.14.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.14.1...v86.14.2) (2024-07-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **DuoChat:** render Markdown in error messages ([ce32884](https://gitlab.com/gitlab-org/gitlab-ui/commit/ce32884e22b08cac5726c3004ccfcb19d036a038))
|
|
7
|
+
|
|
1
8
|
## [86.14.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.14.0...v86.14.1) (2024-07-19)
|
|
2
9
|
|
|
3
10
|
|
package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js
CHANGED
|
@@ -122,9 +122,13 @@ var script = {
|
|
|
122
122
|
}
|
|
123
123
|
return this.defaultContent || this.renderMarkdown(concatUntilEmpty(this.message.chunks));
|
|
124
124
|
},
|
|
125
|
+
renderedError() {
|
|
126
|
+
var _this$message$errors;
|
|
127
|
+
return this.renderMarkdown(((_this$message$errors = this.message.errors) === null || _this$message$errors === void 0 ? void 0 : _this$message$errors.join('; ')) || '');
|
|
128
|
+
},
|
|
125
129
|
error() {
|
|
126
|
-
var _this$message, _this$message$
|
|
127
|
-
return Boolean((_this$message = this.message) === null || _this$message === void 0 ? void 0 : (_this$message$
|
|
130
|
+
var _this$message, _this$message$errors2;
|
|
131
|
+
return Boolean((_this$message = this.message) === null || _this$message === void 0 ? void 0 : (_this$message$errors2 = _this$message.errors) === null || _this$message$errors2 === void 0 ? void 0 : _this$message$errors2.length) && this.message.errors.join('; ');
|
|
128
132
|
}
|
|
129
133
|
},
|
|
130
134
|
beforeCreate() {
|
|
@@ -201,7 +205,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
201
205
|
_vm.isAssistantMessage,
|
|
202
206
|
'gl-bg-white': _vm.isAssistantMessage && !_vm.error,
|
|
203
207
|
'!gl-border-none gl-bg-red-50': _vm.error,
|
|
204
|
-
},on:{"insert-code-snippet":_vm.onInsertCodeSnippet}},[(_vm.error)?_c('gl-icon',{staticClass:"error-icon gl-border gl-mr-3 gl-flex-shrink-0 gl-rounded-full gl-border-red-500 gl-text-red-600",attrs:{"aria-label":_vm.$options.i18n.MESSAGE_ERROR,"name":"status_warning_borderless","size":16,"data-testid":"error"}}):_vm._e(),_vm._v(" "),_c('div',{ref:"content-wrapper",class:{ 'has-error': _vm.error }},[(_vm.error)?_c('div',{
|
|
208
|
+
},on:{"insert-code-snippet":_vm.onInsertCodeSnippet}},[(_vm.error)?_c('gl-icon',{staticClass:"error-icon gl-border gl-mr-3 gl-flex-shrink-0 gl-rounded-full gl-border-red-500 gl-text-red-600",attrs:{"aria-label":_vm.$options.i18n.MESSAGE_ERROR,"name":"status_warning_borderless","size":16,"data-testid":"error"}}):_vm._e(),_vm._v(" "),_c('div',{ref:"content-wrapper",class:{ 'has-error': _vm.error }},[(_vm.error)?_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:(_vm.renderedError),expression:"renderedError",arg:_vm.$options.safeHtmlConfigExtension}],ref:"error-message"}):_c('div',[_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:(_vm.messageContent),expression:"messageContent",arg:_vm.$options.safeHtmlConfigExtension}],ref:"content"}),_vm._v(" "),(_vm.isAssistantMessage)?[(_vm.sources)?_c('documentation-sources',{attrs:{"sources":_vm.sources}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"duo-chat-message-feedback gl-mt-4 gl-flex gl-items-end"},[(_vm.isChunkAndNotCancelled)?_c('gl-loading-icon',{staticClass:"gl-pt-4",attrs:{"variant":"dots","inline":""}}):_vm._e(),_vm._v(" "),(_vm.isNotChunkOrCancelled)?_c('gl-duo-user-feedback',{attrs:{"feedback-received":_vm.hasFeedback,"modal-title":_vm.$options.i18n.MODAL.TITLE,"modal-alert":_vm.$options.i18n.MODAL.ALERT_TEXT},on:{"feedback":_vm.logEvent},scopedSlots:_vm._u([{key:"feedback-extra-fields",fn:function(){return [_c('gl-form-group',{attrs:{"label":_vm.$options.i18n.MODAL.DID_WHAT,"optional":""}},[_c('gl-form-textarea',{attrs:{"placeholder":_vm.$options.i18n.MODAL.INTERACTION},model:{value:(_vm.didWhat),callback:function ($$v) {_vm.didWhat=$$v;},expression:"didWhat"}})],1),_vm._v(" "),_c('gl-form-group',{attrs:{"label":_vm.$options.i18n.MODAL.IMPROVE_WHAT,"optional":""}},[_c('gl-form-textarea',{attrs:{"placeholder":_vm.$options.i18n.MODAL.BETTER_RESPONSE},model:{value:(_vm.improveWhat),callback:function ($$v) {_vm.improveWhat=$$v;},expression:"improveWhat"}})],1)]},proxy:true}],null,false,419229417)}):_vm._e()],1)]:_vm._e()],2)])],1)};
|
|
205
209
|
var __vue_staticRenderFns__ = [];
|
|
206
210
|
|
|
207
211
|
/* style */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "86.14.
|
|
3
|
+
"version": "86.14.2",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@arkweid/lefthook": "0.7.7",
|
|
108
|
-
"@babel/core": "^7.24.
|
|
108
|
+
"@babel/core": "^7.24.9",
|
|
109
109
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
110
110
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
111
111
|
"@babel/preset-env": "^7.24.8",
|
|
@@ -114,24 +114,24 @@
|
|
|
114
114
|
"@gitlab/eslint-plugin": "19.6.0",
|
|
115
115
|
"@gitlab/fonts": "^1.3.0",
|
|
116
116
|
"@gitlab/stylelint-config": "6.1.0",
|
|
117
|
-
"@gitlab/svgs": "3.
|
|
117
|
+
"@gitlab/svgs": "3.107.0",
|
|
118
118
|
"@jest/test-sequencer": "^29.7.0",
|
|
119
119
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
120
120
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
121
121
|
"@rollup/plugin-replace": "^2.3.2",
|
|
122
|
-
"@storybook/addon-a11y": "^7.6.
|
|
123
|
-
"@storybook/addon-docs": "^7.6.
|
|
124
|
-
"@storybook/addon-essentials": "^7.6.
|
|
125
|
-
"@storybook/addon-interactions": "^7.6.
|
|
126
|
-
"@storybook/addon-viewport": "^7.6.
|
|
127
|
-
"@storybook/builder-webpack5": "^7.6.
|
|
128
|
-
"@storybook/test": "^7.6.
|
|
129
|
-
"@storybook/test-runner": "0.
|
|
130
|
-
"@storybook/theming": "^7.6.
|
|
122
|
+
"@storybook/addon-a11y": "^7.6.20",
|
|
123
|
+
"@storybook/addon-docs": "^7.6.20",
|
|
124
|
+
"@storybook/addon-essentials": "^7.6.20",
|
|
125
|
+
"@storybook/addon-interactions": "^7.6.20",
|
|
126
|
+
"@storybook/addon-viewport": "^7.6.20",
|
|
127
|
+
"@storybook/builder-webpack5": "^7.6.20",
|
|
128
|
+
"@storybook/test": "^7.6.20",
|
|
129
|
+
"@storybook/test-runner": "0.19.1",
|
|
130
|
+
"@storybook/theming": "^7.6.20",
|
|
131
131
|
"@storybook/vue": "^7.6.17",
|
|
132
132
|
"@storybook/vue-webpack5": "^7.6.17",
|
|
133
|
-
"@storybook/vue3": "^7.6.
|
|
134
|
-
"@storybook/vue3-webpack5": "^7.6.
|
|
133
|
+
"@storybook/vue3": "^7.6.20",
|
|
134
|
+
"@storybook/vue3-webpack5": "^7.6.20",
|
|
135
135
|
"@types/jest-image-snapshot": "^6.4.0",
|
|
136
136
|
"@vue/compat": "^3.2.40",
|
|
137
137
|
"@vue/compiler-sfc": "^3.2.40",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"babel-loader": "^8.0.5",
|
|
149
149
|
"bootstrap": "4.6.2",
|
|
150
150
|
"cobertura-merge": "^1.0.4",
|
|
151
|
-
"cypress": "13.13.
|
|
151
|
+
"cypress": "13.13.1",
|
|
152
152
|
"cypress-axe": "^1.4.0",
|
|
153
153
|
"cypress-real-events": "^1.11.0",
|
|
154
154
|
"dompurify": "^3.1.2",
|
|
@@ -172,8 +172,8 @@
|
|
|
172
172
|
"module-alias": "^2.2.2",
|
|
173
173
|
"npm-run-all": "^4.1.5",
|
|
174
174
|
"pikaday": "^1.8.0",
|
|
175
|
-
"playwright": "^1.45.
|
|
176
|
-
"playwright-core": "^1.45.
|
|
175
|
+
"playwright": "^1.45.2",
|
|
176
|
+
"playwright-core": "^1.45.2",
|
|
177
177
|
"plop": "^2.5.4",
|
|
178
178
|
"postcss": "8.4.28",
|
|
179
179
|
"postcss-loader": "^7.0.2",
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"sass-loader": "^10.2.0",
|
|
194
194
|
"sass-true": "^6.1.0",
|
|
195
195
|
"start-server-and-test": "^1.10.6",
|
|
196
|
-
"storybook": "^7.6.
|
|
196
|
+
"storybook": "^7.6.20",
|
|
197
197
|
"storybook-dark-mode": "4.0.2",
|
|
198
198
|
"style-dictionary": "^3.8.0",
|
|
199
199
|
"stylelint": "15.10.2",
|
package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue
CHANGED
|
@@ -124,7 +124,9 @@ export default {
|
|
|
124
124
|
|
|
125
125
|
return this.defaultContent || this.renderMarkdown(concatUntilEmpty(this.message.chunks));
|
|
126
126
|
},
|
|
127
|
-
|
|
127
|
+
renderedError() {
|
|
128
|
+
return this.renderMarkdown(this.message.errors?.join('; ') || '');
|
|
129
|
+
},
|
|
128
130
|
error() {
|
|
129
131
|
return Boolean(this.message?.errors?.length) && this.message.errors.join('; ');
|
|
130
132
|
},
|
|
@@ -211,7 +213,11 @@ export default {
|
|
|
211
213
|
data-testid="error"
|
|
212
214
|
/>
|
|
213
215
|
<div ref="content-wrapper" :class="{ 'has-error': error }">
|
|
214
|
-
<div
|
|
216
|
+
<div
|
|
217
|
+
v-if="error"
|
|
218
|
+
ref="error-message"
|
|
219
|
+
v-safe-html:[$options.safeHtmlConfigExtension]="renderedError"
|
|
220
|
+
></div>
|
|
215
221
|
<div v-else>
|
|
216
222
|
<div ref="content" v-safe-html:[$options.safeHtmlConfigExtension]="messageContent"></div>
|
|
217
223
|
|