@appcorp/app-corp-vista 0.3.11 → 0.3.12

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.
@@ -156,7 +156,7 @@ exports.vistaChatV2Props = {
156
156
  message: 'Hello from User',
157
157
  id: 'item-4',
158
158
  createdAt: '2025-01-12T10:29:49.891',
159
- messageStatus: vista_chat_type_1.VISTA_CHAT_MESSAGE_STATUS.DELIVERED,
159
+ messageStatus: vista_chat_type_1.VISTA_CHAT_MESSAGE_STATUS.READ,
160
160
  isUser: true,
161
161
  },
162
162
  ],
@@ -39,7 +39,7 @@ var vista_avatar_v1_1 = require("../vista-avatar-v1/vista-avatar-v1");
39
39
  var format_timestamp_1 = require("../../utils/format-timestamp");
40
40
  var chat_triangle_1 = require("../../atoms/chat-triangle/chat-triangle");
41
41
  var VistaChatBubbleV1 = function (_a) {
42
- var createdAt = _a.createdAt, isLast = _a.isLast, isUser = _a.isUser, message = _a.message, psychic = _a.psychic, user = _a.user;
42
+ var createdAt = _a.createdAt, isLast = _a.isLast, isUser = _a.isUser, message = _a.message, messageStatus = _a.messageStatus, psychic = _a.psychic, user = _a.user;
43
43
  var lastChatBubble = (0, react_1.useRef)(null);
44
44
  var getBubbleStyles = function () { return ({
45
45
  borderTopLeftRadius: isUser ? '8px' : '0px',
@@ -64,7 +64,8 @@ var VistaChatBubbleV1 = function (_a) {
64
64
  react_1.default.createElement(chat_triangle_1.ChatTriangle, { fill: isUser ? '#9153D0' : '#E5E7EB' })),
65
65
  react_1.default.createElement("p", { className: "px-4 pt-2" }, message),
66
66
  react_1.default.createElement("div", { className: "flex items-center px-4 py-2 text-xs justify-between ".concat(isUser ? 'text-right' : 'text-left') },
67
- react_1.default.createElement("span", { className: "mr-2" }, (0, format_timestamp_1.formatTimestamp)(createdAt))))),
67
+ react_1.default.createElement("span", { className: "mr-2" }, (0, format_timestamp_1.formatTimestamp)(createdAt)))),
68
+ react_1.default.createElement("p", { className: "text-xs font-semibold text-end" }, messageStatus)),
68
69
  react_1.default.createElement("div", { className: "order-1 min-w-10" },
69
70
  react_1.default.createElement(vista_avatar_v1_1.VistaAvatarV1, { alt: isUser ? user.avatarAlt : psychic.avatarAlt, src: isUser ? user.avatarUrl : psychic.avatarUrl }))));
70
71
  };
@@ -20,7 +20,7 @@ var VistaChatV2 = function (_a) {
20
20
  var lastDate = '';
21
21
  return (react_1.default.createElement("div", { className: "overflow-y-scroll" }, messages.map(function (_a, ind) {
22
22
  var _b, _c;
23
- var createdAt = _a.createdAt, id = _a.id, isUser = _a.isUser, message = _a.message;
23
+ var createdAt = _a.createdAt, id = _a.id, isUser = _a.isUser, message = _a.message, messageStatus = _a.messageStatus;
24
24
  var shouldShowDivider = ((_b = lastDate.split('T')) === null || _b === void 0 ? void 0 : _b[0]) === ((_c = createdAt.split('T')) === null || _c === void 0 ? void 0 : _c[0])
25
25
  ? false
26
26
  : true;
@@ -28,7 +28,7 @@ var VistaChatV2 = function (_a) {
28
28
  return (react_1.default.createElement("div", { key: id },
29
29
  shouldShowDivider && (react_1.default.createElement("div", { className: "pt-8" },
30
30
  react_1.default.createElement(vista_vertical_divider_v1_1.VistaVerticalDividerV1, { label: (0, util_functions_1.formatDate)(createdAt, util_functions_1.DATE_FORMATS.DAY_DD_MM_YY_COMPACT) }))),
31
- react_1.default.createElement(vista_chat_bubble_v1_1.VistaChatBubbleV1, { createdAt: createdAt, isUser: isUser, message: message, psychic: psychic, user: user, isLast: ind === messages.length - 1 })));
31
+ react_1.default.createElement(vista_chat_bubble_v1_1.VistaChatBubbleV1, { createdAt: createdAt, isLast: ind === messages.length - 1, isUser: isUser, message: message, psychic: psychic, user: user, messageStatus: messageStatus })));
32
32
  })));
33
33
  };
34
34
  var handleOnKeyDown = function (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
6
6
  "build:next": "next build",
@@ -1,9 +1,10 @@
1
- import { VistaChatV2Psychic, VistaChatV2User } from './vista-chat-type';
1
+ import { VISTA_CHAT_MESSAGE_STATUS, VistaChatV2Psychic, VistaChatV2User } from './vista-chat-type';
2
2
  export interface VistaChatBubbleV1Props {
3
3
  createdAt: string;
4
4
  isLast: boolean;
5
5
  isUser: boolean;
6
6
  message: string;
7
+ messageStatus: VISTA_CHAT_MESSAGE_STATUS;
7
8
  psychic: VistaChatV2Psychic;
8
9
  user: VistaChatV2User;
9
10
  }