@gitlab/ui 66.36.0 → 66.37.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 +14 -0
- package/dist/components/base/filtered_search/filtered_search.js +3 -4
- package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js +4 -1
- package/dist/components/experimental/duo/chat/mock_data.js +3 -3
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +1 -1
- package/src/components/base/filtered_search/filtered_search.vue +2 -4
- package/src/components/base/new_dropdowns/dropdown.scss +1 -1
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.spec.js +5 -0
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.vue +4 -1
- package/src/components/experimental/duo/chat/mock_data.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [66.37.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.36.1...v66.37.0) (2023-10-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlDuoChatMessage:** do not strip out copy-code ([14782a5](https://gitlab.com/gitlab-org/gitlab-ui/commit/14782a5d60a8e48dffb60fa120bddc61285d950a))
|
|
7
|
+
|
|
8
|
+
## [66.36.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.36.0...v66.36.1) (2023-10-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **Dropdown:** correct dropdown chevron position when block ([d7b7075](https://gitlab.com/gitlab-org/gitlab-ui/commit/d7b70757a6c96e6de7d472910f93f75b909c92e9))
|
|
14
|
+
|
|
1
15
|
# [66.36.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.35.2...v66.36.0) (2023-10-24)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import isEqual from 'lodash/isEqual';
|
|
2
2
|
import cloneDeep from 'lodash/cloneDeep';
|
|
3
|
-
import
|
|
4
|
-
import Vue from 'vue';
|
|
3
|
+
import { PortalTarget } from 'portal-vue';
|
|
5
4
|
import { GlTooltipDirective } from '../../../directives/tooltip';
|
|
6
5
|
import GlIcon from '../icon/icon';
|
|
7
6
|
import GlSearchBoxByClick from '../search_box_by_click/search_box_by_click';
|
|
@@ -9,7 +8,6 @@ import GlFilteredSearchTerm from './filtered_search_term';
|
|
|
9
8
|
import { termTokenDefinition, createTerm, needDenormalization, denormalizeTokens, isEmptyTerm, INTENT_ACTIVATE_PREVIOUS, ensureTokenId, normalizeTokens } from './filtered_search_utils';
|
|
10
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
11
10
|
|
|
12
|
-
Vue.use(PortalVue);
|
|
13
11
|
let portalUuid = 0;
|
|
14
12
|
function initialState() {
|
|
15
13
|
return [createTerm()];
|
|
@@ -18,7 +16,8 @@ var script = {
|
|
|
18
16
|
name: 'GlFilteredSearch',
|
|
19
17
|
components: {
|
|
20
18
|
GlSearchBoxByClick,
|
|
21
|
-
GlIcon
|
|
19
|
+
GlIcon,
|
|
20
|
+
PortalTarget
|
|
22
21
|
},
|
|
23
22
|
directives: {
|
|
24
23
|
GlTooltip: GlTooltipDirective
|
package/dist/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.js
CHANGED
|
@@ -14,6 +14,9 @@ const concatIndicesUntilEmpty = arr => {
|
|
|
14
14
|
};
|
|
15
15
|
var script = {
|
|
16
16
|
name: 'GlDuoChatMessage',
|
|
17
|
+
safeHtmlConfigExtension: {
|
|
18
|
+
ADD_TAGS: ['copy-code']
|
|
19
|
+
},
|
|
17
20
|
components: {
|
|
18
21
|
DocumentationSources,
|
|
19
22
|
GlDuoUserFeedback
|
|
@@ -102,7 +105,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
102
105
|
'gl-ml-auto gl-bg-blue-100 gl-text-blue-900 gl-rounded-bottom-right-none': _vm.isUserMessage,
|
|
103
106
|
'gl-rounded-bottom-left-none gl-text-gray-900 gl-bg-white gl-border-1 gl-border-solid gl-border-gray-50':
|
|
104
107
|
_vm.isAssistantMessage,
|
|
105
|
-
}},[_c('div',{directives:[{name:"safe-html",rawName:"v-safe-html",value:(_vm.messageContent),expression:"messageContent"}],ref:"content"}),_vm._v(" "),(_vm.isAssistantMessage)?[(_vm.sources)?_c('documentation-sources',{attrs:{"sources":_vm.sources}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-display-flex gl-align-items-flex-end gl-mt-4"},[_c('gl-duo-user-feedback',{on:{"feedback":function($event){return _vm.$emit('track-feedback', $event)}}})],1)]:_vm._e()],2)};
|
|
108
|
+
}},[_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:"gl-display-flex gl-align-items-flex-end gl-mt-4"},[_c('gl-duo-user-feedback',{on:{"feedback":function($event){return _vm.$emit('track-feedback', $event)}}})],1)]:_vm._e()],2)};
|
|
106
109
|
var __vue_staticRenderFns__ = [];
|
|
107
110
|
|
|
108
111
|
/* style */
|
|
@@ -17,8 +17,8 @@ const MOCK_SOURCES = [{
|
|
|
17
17
|
}];
|
|
18
18
|
const MOCK_RESPONSE_MESSAGE = {
|
|
19
19
|
id: '123',
|
|
20
|
-
content: '
|
|
21
|
-
contentHtml: '
|
|
20
|
+
content: 'Here is a simple JavaScript function to sum two numbers:\n\n ```js\n function sum(a, b) {\n return a + b;\n }\n ```\n \n To use it:\n \n ```js\n const result = sum(5, 3); // result = 8\n ```\n \n This function takes two number parameters, a and b. It returns the sum of adding them together.\n',
|
|
21
|
+
contentHtml: '<p data-sourcepos="1:1-1:56" dir="auto">Here is a simple JavaScript function to sum two numbers:</p>\n<div class="gl-relative markdown-code-block js-markdown-code">\n<pre data-sourcepos="3:1-7:3" data-canonical-lang="js" class="code highlight js-syntax-highlight language-javascript" lang="javascript" v-pre="true"><code><span id="LC1" class="line" lang="javascript"><span class="kd">function</span> <span class="nf">sum</span><span class="p">(</span><span class="nx">a</span><span class="p">,</span> <span class="nx">b</span><span class="p">)</span> <span class="p">{</span></span>\n<span id="LC2" class="line" lang="javascript"> <span class="k">return</span> <span class="nx">a</span> <span class="o">+</span> <span class="nx">b</span><span class="p">;</span></span>\n<span id="LC3" class="line" lang="javascript"><span class="p">}</span></span></code></pre>\n<copy-code></copy-code>\n</div>\n<p data-sourcepos="9:1-9:10" dir="auto">To use it:</p>\n<div class="gl-relative markdown-code-block js-markdown-code">\n<pre data-sourcepos="11:1-13:3" data-canonical-lang="js" class="code highlight js-syntax-highlight language-javascript" lang="javascript" v-pre="true"><code><span id="LC1" class="line" lang="javascript"><span class="kd">const</span> <span class="nx">result</span> <span class="o">=</span> <span class="nf">sum</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span> <span class="c1">// result = 8</span></span></code></pre>\n<copy-code></copy-code>\n</div>\n<p data-sourcepos="15:1-15:95" dir="auto">This function takes two number parameters, a and b. It returns the sum of adding them together.</p>',
|
|
22
22
|
role: MESSAGE_MODEL_ROLES.assistant,
|
|
23
23
|
extras: {
|
|
24
24
|
sources: MOCK_SOURCES
|
|
@@ -84,7 +84,7 @@ const renderMarkdown = content => content;
|
|
|
84
84
|
const renderGFM = el => {
|
|
85
85
|
const codeBlock = el.querySelectorAll('.markdown-code-block');
|
|
86
86
|
codeBlock.forEach(block => {
|
|
87
|
-
block === null || block === void 0 ? void 0 : block.classList.add('gl-
|
|
87
|
+
block === null || block === void 0 ? void 0 : block.classList.add('gl-markdown', 'gl-compact-markdown');
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
|