@gitlab/duo-ui 10.8.2 → 10.9.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,3 +1,10 @@
1
+ # [10.9.0](https://gitlab.com/gitlab-org/duo-ui/compare/v10.8.2...v10.9.0) (2025-07-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * Support workflow_end custom values ([53271a4](https://gitlab.com/gitlab-org/duo-ui/commit/53271a44e301117b7eff1be5c8efcd8f1d90a83b))
7
+
1
8
  ## [10.8.2](https://gitlab.com/gitlab-org/duo-ui/compare/v10.8.1...v10.8.2) (2025-07-17)
2
9
 
3
10
 
@@ -9,8 +9,26 @@ var script = {
9
9
  AgentMessage,
10
10
  GlButton
11
11
  },
12
- workflowEndMessage: {
13
- content: "Review the changes. To improve the implementation, create another workflow and describe the specific changes you'd like to see."
12
+ props: {
13
+ endMessage: {
14
+ required: false,
15
+ type: String,
16
+ default: "Review the changes. To improve the implementation, create another workflow and describe the specific changes you'd like to see."
17
+ },
18
+ action: {
19
+ required: false,
20
+ type: Object,
21
+ default: null
22
+ }
23
+ },
24
+ computed: {
25
+ route() {
26
+ return this.action && Object.keys(this.action).length > 0 ? undefined : this.$options.newRoute;
27
+ },
28
+ buttonText() {
29
+ var _this$action;
30
+ return ((_this$action = this.action) === null || _this$action === void 0 ? void 0 : _this$action.text) || 'New workflow';
31
+ }
14
32
  },
15
33
  newRoute: {
16
34
  name: WORKFLOW_NEW_APP
@@ -21,9 +39,9 @@ var script = {
21
39
  const __vue_script__ = script;
22
40
 
23
41
  /* template */
24
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('agent-message',{attrs:{"message":_vm.$options.workflowEndMessage},scopedSlots:_vm._u([{key:"message",fn:function(ref){
42
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('agent-message',{attrs:{"message":{ content: _vm.endMessage }},scopedSlots:_vm._u([{key:"message",fn:function(ref){
25
43
  var content = ref.content;
26
- return [_c('p',[_vm._v("\n "+_vm._s(content)+"\n ")]),_vm._v(" "),_c('gl-button',{staticClass:"gl-mt-4",attrs:{"to":_vm.$options.newRoute}},[_vm._v("New workflow")])]}}])})};
44
+ return [_c('p',[_vm._v("\n "+_vm._s(content)+"\n ")]),_vm._v(" "),_c('gl-button',{staticClass:"gl-mt-4",attrs:{"to":_vm.route},on:{"click":function($event){return _vm.$emit('new-flow')}}},[_vm._v(_vm._s(_vm.buttonText))])]}}])})};
27
45
  var __vue_staticRenderFns__ = [];
28
46
 
29
47
  /* style */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/duo-ui",
3
- "version": "10.8.2",
3
+ "version": "10.9.0",
4
4
  "description": "Duo UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -100,7 +100,7 @@
100
100
  "@gitlab/eslint-plugin": "21.2.0",
101
101
  "@gitlab/fonts": "^1.3.0",
102
102
  "@gitlab/stylelint-config": "6.2.2",
103
- "@gitlab/svgs": "^3.139.0",
103
+ "@gitlab/svgs": "^3.140.0",
104
104
  "@gitlab/ui": "latest",
105
105
  "@jest/test-sequencer": "^29.7.0",
106
106
  "@rollup/plugin-commonjs": "^11.1.0",
@@ -10,9 +10,28 @@ export default {
10
10
  AgentMessage,
11
11
  GlButton,
12
12
  },
13
- workflowEndMessage: {
14
- content:
15
- "Review the changes. To improve the implementation, create another workflow and describe the specific changes you'd like to see.",
13
+ props: {
14
+ endMessage: {
15
+ required: false,
16
+ type: String,
17
+ default:
18
+ "Review the changes. To improve the implementation, create another workflow and describe the specific changes you'd like to see.",
19
+ },
20
+ action: {
21
+ required: false,
22
+ type: Object,
23
+ default: null,
24
+ },
25
+ },
26
+ computed: {
27
+ route() {
28
+ return this.action && Object.keys(this.action).length > 0
29
+ ? undefined
30
+ : this.$options.newRoute;
31
+ },
32
+ buttonText() {
33
+ return this.action?.text || 'New workflow';
34
+ },
16
35
  },
17
36
  newRoute: {
18
37
  name: WORKFLOW_NEW_APP,
@@ -20,13 +39,12 @@ export default {
20
39
  };
21
40
  </script>
22
41
  <template>
23
- <agent-message :message="$options.workflowEndMessage">
42
+ <agent-message :message="{ content: endMessage }">
24
43
  <template #message="{ content }">
25
44
  <p>
26
45
  {{ content }}
27
46
  </p>
28
-
29
- <gl-button :to="$options.newRoute" class="gl-mt-4">New workflow</gl-button>
47
+ <gl-button :to="route" class="gl-mt-4" @click="$emit('new-flow')">{{ buttonText }}</gl-button>
30
48
  </template>
31
49
  </agent-message>
32
50
  </template>