@gitlab/duo-ui 8.22.0 → 8.22.1

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
+ ## [8.22.1](https://gitlab.com/gitlab-org/duo-ui/compare/v8.22.0...v8.22.1) (2025-06-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **chat:** Fix chat history group dates ([548c507](https://gitlab.com/gitlab-org/duo-ui/commit/548c5078090d0a648824727a59a0fe6f727d31f2))
7
+
1
8
  # [8.22.0](https://gitlab.com/gitlab-org/duo-ui/compare/v8.21.0...v8.22.0) (2025-06-18)
2
9
 
3
10
 
@@ -26,9 +26,6 @@ var script = {
26
26
  }
27
27
  },
28
28
  computed: {
29
- formattedLocalDate() {
30
- return date => formatLocalizedDate(date, this.preferredLocale);
31
- },
32
29
  groupedThreads() {
33
30
  if (!this.hasThreads) {
34
31
  return {};
@@ -46,6 +43,9 @@ var script = {
46
43
  }
47
44
  },
48
45
  methods: {
46
+ formattedLocalDate(date) {
47
+ return formatLocalizedDate(date, this.preferredLocale);
48
+ },
49
49
  onNewChat() {
50
50
  this.$emit('new-chat');
51
51
  },
@@ -63,7 +63,8 @@ var script = {
63
63
  return new Date(dateA) - new Date(dateB);
64
64
  },
65
65
  getDateKey(date) {
66
- return new Date(date).toISOString().split('T')[0];
66
+ // add 00:00:00 to the date string to make it at midnight local time
67
+ return `${new Date(date).toISOString().split('T')[0]}T00:00:00`;
67
68
  },
68
69
  sprintf
69
70
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/duo-ui",
3
- "version": "8.22.0",
3
+ "version": "8.22.1",
4
4
  "description": "Duo UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -33,10 +33,6 @@ export default {
33
33
  },
34
34
 
35
35
  computed: {
36
- formattedLocalDate() {
37
- return (date) => formatLocalizedDate(date, this.preferredLocale);
38
- },
39
-
40
36
  groupedThreads() {
41
37
  if (!this.hasThreads) {
42
38
  return {};
@@ -53,38 +49,35 @@ export default {
53
49
  };
54
50
  }, {});
55
51
  },
56
-
57
52
  hasThreads() {
58
53
  return this.threads.length > 0;
59
54
  },
60
55
  },
61
56
 
62
57
  methods: {
58
+ formattedLocalDate(date) {
59
+ return formatLocalizedDate(date, this.preferredLocale);
60
+ },
63
61
  onNewChat() {
64
62
  this.$emit('new-chat');
65
63
  },
66
-
67
64
  onSelectThread(thread) {
68
65
  this.$emit('select-thread', thread);
69
66
  },
70
-
71
67
  onDeleteThread(threadId, event) {
72
68
  event.stopPropagation();
73
69
  this.$emit('delete-thread', threadId);
74
70
  },
75
-
76
71
  onClose() {
77
72
  this.$emit('close');
78
73
  },
79
-
80
74
  compareThreadDates(dateA, dateB) {
81
75
  return new Date(dateA) - new Date(dateB);
82
76
  },
83
-
84
77
  getDateKey(date) {
85
- return new Date(date).toISOString().split('T')[0];
78
+ // add 00:00:00 to the date string to make it at midnight local time
79
+ return `${new Date(date).toISOString().split('T')[0]}T00:00:00`;
86
80
  },
87
-
88
81
  sprintf,
89
82
  },
90
83
  i18n,