@gitlab/ui 66.35.1 → 66.36.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,18 @@
1
+ # [66.36.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.35.2...v66.36.0) (2023-10-24)
2
+
3
+
4
+ ### Features
5
+
6
+ * **GlLink:** Removes text size override in gl-link ([ff9d6fa](https://gitlab.com/gitlab-org/gitlab-ui/commit/ff9d6fab70bdcfc903238c9f3f5a9da5924e9a36))
7
+
8
+ ## [66.35.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.35.1...v66.35.2) (2023-10-24)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * rendering chunks after the final message ([b745c98](https://gitlab.com/gitlab-org/gitlab-ui/commit/b745c98cce77355e3efef2ec08867cb2e2cacb2a))
14
+ * **GlDiscreteChatter:** Fix popover handling ([3a9deb0](https://gitlab.com/gitlab-org/gitlab-ui/commit/3a9deb05e7fd9fd6f63ae18c4bed565170735038))
15
+
1
16
  ## [66.35.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v66.35.0...v66.35.1) (2023-10-20)
2
17
 
3
18
 
@@ -48,7 +48,7 @@ var script = {
48
48
  disableTooltip: {
49
49
  type: Boolean,
50
50
  required: false,
51
- default: () => false
51
+ default: false
52
52
  },
53
53
  /**
54
54
  * Sets the chart's height in pixels. Set to `"auto"` to use the height of the container.
@@ -91,7 +91,7 @@ var script = {
91
91
  },
92
92
  options() {
93
93
  const mergedOptions = merge({}, defaultChartOptions, {
94
- tooltip: {
94
+ tooltip: this.disableTooltip ? undefined : {
95
95
  formatter: this.onLabelChange
96
96
  },
97
97
  xAxis: {
@@ -127,9 +127,7 @@ var script = {
127
127
  },
128
128
  methods: {
129
129
  defaultFormatTooltipText(params) {
130
- const {
131
- data
132
- } = params;
130
+ const data = this.getChartData(params);
133
131
  const [title, content] = data;
134
132
  this.tooltipTitle = title;
135
133
  const seriesName = this.yAxisTitle;
@@ -152,9 +150,7 @@ var script = {
152
150
  },
153
151
  onLabelChange(params) {
154
152
  this.selectedFormatTooltipText(params);
155
- const {
156
- data = []
157
- } = params;
153
+ const data = this.getChartData(params);
158
154
  if (data.length) {
159
155
  const [left, top] = this.chart.convertToPixel('grid', data);
160
156
  this.tooltipPosition = {
@@ -162,6 +158,13 @@ var script = {
162
158
  top: `${top}px`
163
159
  };
164
160
  }
161
+ },
162
+ getChartData(_ref) {
163
+ let {
164
+ data
165
+ } = _ref;
166
+ const chartData = (data === null || data === void 0 ? void 0 : data.value) || data;
167
+ return Array.isArray(chartData) ? chartData : [];
165
168
  }
166
169
  },
167
170
  HEIGHT_AUTO_CLASSES
@@ -33,7 +33,8 @@ var script = {
33
33
  },
34
34
  data() {
35
35
  return {
36
- messageContent: ''
36
+ messageContent: '',
37
+ messageWatcher: null
37
38
  };
38
39
  },
39
40
  computed: {
@@ -51,24 +52,10 @@ var script = {
51
52
  return this.message.contentHtml || this.renderMarkdown(this.message.content || this.message.errors.join('; '));
52
53
  }
53
54
  },
54
- watch: {
55
- message: {
56
- handler() {
57
- const {
58
- chunkId,
59
- content
60
- } = this.message;
61
- if (!chunkId) {
62
- this.messageChunks = [];
63
- this.messageContent = this.content;
64
- this.hydrateContentWithGFM();
65
- } else {
66
- this.messageChunks[chunkId] = content;
67
- this.messageContent = this.renderMarkdown(concatIndicesUntilEmpty(this.messageChunks));
68
- }
69
- },
55
+ created() {
56
+ this.messageWatcher = this.$watch('message', this.messageUpdateHandler, {
70
57
  deep: true
71
- }
58
+ });
72
59
  },
73
60
  beforeCreate() {
74
61
  /**
@@ -88,6 +75,21 @@ var script = {
88
75
  async hydrateContentWithGFM() {
89
76
  await nextTick();
90
77
  this.renderGFM(this.$refs.content);
78
+ },
79
+ async messageUpdateHandler() {
80
+ const {
81
+ chunkId,
82
+ content
83
+ } = this.message;
84
+ if (!chunkId) {
85
+ this.messageChunks = [];
86
+ this.messageContent = this.content;
87
+ this.messageWatcher();
88
+ this.hydrateContentWithGFM();
89
+ } else {
90
+ this.messageChunks[chunkId] = content;
91
+ this.messageContent = this.renderMarkdown(concatIndicesUntilEmpty(this.messageChunks));
92
+ }
91
93
  }
92
94
  }
93
95
  };