@gitlab/duo-ui 11.1.1 → 11.2.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/chat/components/duo_chat_header/web_duo_chat_header.js +1 -1
  3. package/dist/components/chat/components/duo_chat_message/message_types/message_tool.js +8 -4
  4. package/dist/components/chat/components/duo_chat_message_tool_approval/components/base_tool_params.js +79 -0
  5. package/dist/components/chat/components/duo_chat_message_tool_approval/components/issuable_tool_params.js +116 -0
  6. package/dist/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.js +45 -5
  7. package/dist/components/chat/components/duo_chat_message_tool_approval/message_tool_approval.js +67 -20
  8. package/dist/components/chat/constants.js +12 -1
  9. package/dist/components/chat/mock_data.js +77 -1
  10. package/dist/components.css +1 -1
  11. package/dist/components.css.map +1 -1
  12. package/dist/tailwind.css +1 -1
  13. package/dist/tailwind.css.map +1 -1
  14. package/package.json +2 -2
  15. package/src/components/chat/components/duo_chat_header/web_duo_chat_header.vue +1 -1
  16. package/src/components/chat/components/duo_chat_message/message_types/message_tool.vue +23 -11
  17. package/src/components/chat/components/duo_chat_message_tool_approval/components/base_tool_params.vue +55 -0
  18. package/src/components/chat/components/duo_chat_message_tool_approval/components/issuable_tool_params.vue +112 -0
  19. package/src/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.vue +51 -6
  20. package/src/components/chat/components/duo_chat_message_tool_approval/message_tool_approval.vue +97 -22
  21. package/src/components/chat/constants.js +12 -0
  22. package/src/components/chat/mock_data.js +80 -0
  23. package/translations.js +24 -7
  24. package/dist/components/chat/components/duo_chat_message_tool_approval/components/create_issue_tool_params.js +0 -88
  25. package/dist/components/chat/components/duo_chat_message_tool_approval/components/create_merge_request_tool_params.js +0 -83
  26. package/src/components/chat/components/duo_chat_message_tool_approval/components/create_issue_tool_params.vue +0 -80
  27. package/src/components/chat/components/duo_chat_message_tool_approval/components/create_merge_request_tool_params.vue +0 -74
@@ -1,83 +0,0 @@
1
- import { GlSprintf, GlAccordion, GlAccordionItem } from '@gitlab/ui';
2
- import { translate } from '../../../../../utils/i18n';
3
- import PreBlock from './pre_block';
4
- import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
-
6
- var script = {
7
- name: 'CreateMergeRequestToolParams',
8
- components: {
9
- GlSprintf,
10
- GlAccordion,
11
- GlAccordionItem,
12
- PreBlock
13
- },
14
- props: {
15
- projectId: {
16
- type: [String, Number],
17
- required: true
18
- },
19
- projectPath: {
20
- type: String,
21
- required: false,
22
- default: ''
23
- },
24
- title: {
25
- type: String,
26
- required: true
27
- },
28
- sourceBranch: {
29
- type: String,
30
- required: true
31
- },
32
- targetBranch: {
33
- type: String,
34
- required: true
35
- },
36
- description: {
37
- type: String,
38
- required: true
39
- }
40
- },
41
- i18n: {
42
- MERGE_REQUEST_SUMMARY_MESSAGE: translate('CreateMergeRequestToolParams.MERGE_REQUEST_SUMMARY_MESSAGE', 'Open a merge request with title "%{title}" in project %{project} from branch %{sourceBranch} to branch %{targetBranch}.'),
43
- ACCORDION_TITLE: translate('CreateMergeRequestToolParams.ACCORDION_TITLE', 'Read description')
44
- }
45
- };
46
-
47
- /* script */
48
- const __vue_script__ = script;
49
-
50
- /* template */
51
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-flex gl-flex-col"},[_c('div',[_c('gl-sprintf',{attrs:{"message":_vm.$options.i18n.MERGE_REQUEST_SUMMARY_MESSAGE},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('em',[_vm._v(_vm._s(_vm.title))])]},proxy:true},{key:"project",fn:function(){return [_c('code',[_vm._v(_vm._s(_vm.projectPath || _vm.projectId))])]},proxy:true},{key:"sourceBranch",fn:function(){return [_c('code',[_vm._v(_vm._s(_vm.sourceBranch))])]},proxy:true},{key:"targetBranch",fn:function(){return [_c('code',[_vm._v(_vm._s(_vm.targetBranch))])]},proxy:true}])})],1),_vm._v(" "),_c('gl-accordion',{staticClass:"-gl-ml-2 gl-mt-3",attrs:{"header-level":3}},[_c('gl-accordion-item',{attrs:{"title":_vm.$options.i18n.ACCORDION_TITLE}},[_c('pre-block',[_vm._v(_vm._s(_vm.description))])],1)],1)],1)};
52
- var __vue_staticRenderFns__ = [];
53
-
54
- /* style */
55
- const __vue_inject_styles__ = undefined;
56
- /* scoped */
57
- const __vue_scope_id__ = undefined;
58
- /* module identifier */
59
- const __vue_module_identifier__ = undefined;
60
- /* functional template */
61
- const __vue_is_functional_template__ = false;
62
- /* style inject */
63
-
64
- /* style inject SSR */
65
-
66
- /* style inject shadow dom */
67
-
68
-
69
-
70
- const __vue_component__ = __vue_normalize__(
71
- { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
72
- __vue_inject_styles__,
73
- __vue_script__,
74
- __vue_scope_id__,
75
- __vue_is_functional_template__,
76
- __vue_module_identifier__,
77
- false,
78
- undefined,
79
- undefined,
80
- undefined
81
- );
82
-
83
- export default __vue_component__;
@@ -1,80 +0,0 @@
1
- <script>
2
- import { GlSprintf, GlAccordion, GlAccordionItem } from '@gitlab/ui';
3
- import { translate } from '../../../../../utils/i18n';
4
- import PreBlock from './pre_block.vue';
5
-
6
- export default {
7
- name: 'CreateIssueToolParams',
8
- components: {
9
- GlSprintf,
10
- GlAccordion,
11
- GlAccordionItem,
12
- PreBlock,
13
- },
14
- props: {
15
- projectId: {
16
- type: [String, Number],
17
- required: true,
18
- },
19
- projectPath: {
20
- type: String,
21
- required: false,
22
- default: '',
23
- },
24
- title: {
25
- type: String,
26
- required: true,
27
- },
28
- description: {
29
- type: String,
30
- required: true,
31
- },
32
- labels: {
33
- type: String,
34
- required: false,
35
- default: '',
36
- },
37
- },
38
- computed: {
39
- issueMessage() {
40
- const baseMessage = this.$options.i18n.ISSUE_SUMMARY_MESSAGE_BASE;
41
- const labelsMessage = this.$options.i18n.ISSUE_SUMMARY_MESSAGE_WITH_LABELS;
42
-
43
- return this.labels ? `${baseMessage} ${labelsMessage}` : baseMessage;
44
- },
45
- },
46
- i18n: {
47
- ISSUE_SUMMARY_MESSAGE_BASE: translate(
48
- 'CreateIssueToolParams.ISSUE_SUMMARY_MESSAGE_BASE',
49
- 'Open an issue with title "%{title}" in project %{project}.'
50
- ),
51
- ISSUE_SUMMARY_MESSAGE_WITH_LABELS: translate(
52
- 'CreateIssueToolParams.ISSUE_SUMMARY_MESSAGE_WITH_LABELS',
53
- 'Assign the labels %{labels}.'
54
- ),
55
- ACCORDION_TITLE: translate('CreateIssueToolParams.ACCORDION_TITLE', 'Read description'),
56
- },
57
- };
58
- </script>
59
- <template>
60
- <div class="gl-flex gl-flex-col">
61
- <div>
62
- <gl-sprintf :message="issueMessage">
63
- <template #title>
64
- <em>{{ title }}</em>
65
- </template>
66
- <template #project>
67
- <code>{{ projectPath || projectId }}</code>
68
- </template>
69
- <template #labels>
70
- <code>{{ labels }}</code>
71
- </template>
72
- </gl-sprintf>
73
- </div>
74
- <gl-accordion class="-gl-ml-2 gl-mt-3" :header-level="3">
75
- <gl-accordion-item :title="$options.i18n.ACCORDION_TITLE">
76
- <pre-block>{{ description }}</pre-block>
77
- </gl-accordion-item>
78
- </gl-accordion>
79
- </div>
80
- </template>
@@ -1,74 +0,0 @@
1
- <script>
2
- import { GlSprintf, GlAccordion, GlAccordionItem } from '@gitlab/ui';
3
- import { translate } from '../../../../../utils/i18n';
4
- import PreBlock from './pre_block.vue';
5
-
6
- export default {
7
- name: 'CreateMergeRequestToolParams',
8
- components: {
9
- GlSprintf,
10
- GlAccordion,
11
- GlAccordionItem,
12
- PreBlock,
13
- },
14
- props: {
15
- projectId: {
16
- type: [String, Number],
17
- required: true,
18
- },
19
- projectPath: {
20
- type: String,
21
- required: false,
22
- default: '',
23
- },
24
- title: {
25
- type: String,
26
- required: true,
27
- },
28
- sourceBranch: {
29
- type: String,
30
- required: true,
31
- },
32
- targetBranch: {
33
- type: String,
34
- required: true,
35
- },
36
- description: {
37
- type: String,
38
- required: true,
39
- },
40
- },
41
- i18n: {
42
- MERGE_REQUEST_SUMMARY_MESSAGE: translate(
43
- 'CreateMergeRequestToolParams.MERGE_REQUEST_SUMMARY_MESSAGE',
44
- 'Open a merge request with title "%{title}" in project %{project} from branch %{sourceBranch} to branch %{targetBranch}.'
45
- ),
46
- ACCORDION_TITLE: translate('CreateMergeRequestToolParams.ACCORDION_TITLE', 'Read description'),
47
- },
48
- };
49
- </script>
50
- <template>
51
- <div class="gl-flex gl-flex-col">
52
- <div>
53
- <gl-sprintf :message="$options.i18n.MERGE_REQUEST_SUMMARY_MESSAGE">
54
- <template #title>
55
- <em>{{ title }}</em>
56
- </template>
57
- <template #project>
58
- <code>{{ projectPath || projectId }}</code>
59
- </template>
60
- <template #sourceBranch>
61
- <code>{{ sourceBranch }}</code>
62
- </template>
63
- <template #targetBranch>
64
- <code>{{ targetBranch }}</code>
65
- </template>
66
- </gl-sprintf>
67
- </div>
68
- <gl-accordion class="-gl-ml-2 gl-mt-3" :header-level="3">
69
- <gl-accordion-item :title="$options.i18n.ACCORDION_TITLE">
70
- <pre-block>{{ description }}</pre-block>
71
- </gl-accordion-item>
72
- </gl-accordion>
73
- </div>
74
- </template>