@weni/unnnic-system 3.9.2 → 3.9.3
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 +6 -0
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +9 -2
- package/dist/components/index.d.ts +18 -4
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-4aab69cb.mjs → es-8146fb1b.mjs} +1 -1
- package/dist/{index-789225a6.mjs → index-724ed422.mjs} +11 -8
- package/dist/{pt-br-2f695ddd.mjs → pt-br-af294ec9.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +1 -1
- package/dist/unnnic.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/ChatsContact/ChatsContact.vue +6 -2
- package/src/stories/ChatsContact.stories.js +9 -0
package/package.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
}"
|
|
99
99
|
data-testid="last-interaction-time"
|
|
100
100
|
>
|
|
101
|
-
{{ formattedLastInteraction }}
|
|
101
|
+
{{ `${lastInteractionTimePrefix} ${formattedLastInteraction}`.trim() }}
|
|
102
102
|
</p>
|
|
103
103
|
<section
|
|
104
104
|
class="chats-contact__infos__unread-messages-container__pin-container"
|
|
@@ -173,12 +173,15 @@ export default {
|
|
|
173
173
|
title: {
|
|
174
174
|
type: String,
|
|
175
175
|
default: '',
|
|
176
|
-
required: true,
|
|
177
176
|
},
|
|
178
177
|
lastMessage: {
|
|
179
178
|
type: Object,
|
|
180
179
|
default: () => ({}),
|
|
181
180
|
},
|
|
181
|
+
lastInteractionTimePrefix: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: '',
|
|
184
|
+
},
|
|
182
185
|
lastInteractionTime: {
|
|
183
186
|
type: String,
|
|
184
187
|
default: '',
|
|
@@ -295,6 +298,7 @@ export default {
|
|
|
295
298
|
moment.locale(this.locale);
|
|
296
299
|
|
|
297
300
|
const now = moment();
|
|
301
|
+
|
|
298
302
|
const lastInteractionMoment = moment(this.lastInteractionTime);
|
|
299
303
|
|
|
300
304
|
if (now.subtract(1, 'day').isSame(lastInteractionMoment, 'day')) {
|
|
@@ -82,6 +82,15 @@ export const Default = {
|
|
|
82
82
|
},
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
export const WithLastInteractionTimePrefix = {
|
|
86
|
+
args: {
|
|
87
|
+
...defaultArgs,
|
|
88
|
+
unreadMessages,
|
|
89
|
+
lastInteractionTime: new Date().toISOString(),
|
|
90
|
+
lastInteractionTimePrefix: 'Since',
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
|
|
85
94
|
export const Selected = {
|
|
86
95
|
args: {
|
|
87
96
|
...defaultArgs,
|