vrfi-design-system 1.1.90 → 1.1.93
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/dist/index.d.ts +2 -0
- package/dist/main.es.js +43 -42
- package/dist/main.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -311,6 +311,7 @@ export declare const ChatDetails: default_2.FC<ChatDetailsProps>;
|
|
|
311
311
|
|
|
312
312
|
declare interface ChatDetailsProps {
|
|
313
313
|
selectedChat: LooseChat | null;
|
|
314
|
+
loggedInUserId?: number;
|
|
314
315
|
newMessage: string;
|
|
315
316
|
onMessageChange: (e: default_2.ChangeEvent<HTMLInputElement>) => void;
|
|
316
317
|
onSendMessage: () => void;
|
|
@@ -764,6 +765,7 @@ declare interface LooseMessage {
|
|
|
764
765
|
senderType?: string;
|
|
765
766
|
body?: string;
|
|
766
767
|
createdAt?: string;
|
|
768
|
+
senderId?: number;
|
|
767
769
|
}
|
|
768
770
|
|
|
769
771
|
export { Menu }
|
package/dist/main.es.js
CHANGED
|
@@ -68563,7 +68563,7 @@ const VDe = ({
|
|
|
68563
68563
|
},
|
|
68564
68564
|
children: /* @__PURE__ */ B.jsx(O8, { className: hEe.segmented, ...e })
|
|
68565
68565
|
}
|
|
68566
|
-
), bEe = "
|
|
68566
|
+
), bEe = "_textArea_19113_24", CEe = "_textAreaContainer_19113_28", ll = {
|
|
68567
68567
|
textArea: bEe,
|
|
68568
68568
|
textAreaContainer: CEe
|
|
68569
68569
|
}, yEe = Go.TextArea, UDe = ({
|
|
@@ -71616,7 +71616,7 @@ const mIe = "_chatDetails_12d43_24", gIe = "_dateSeparator_12d43_32", vIe = "_no
|
|
|
71616
71616
|
hour: "numeric",
|
|
71617
71617
|
minute: "2-digit",
|
|
71618
71618
|
hour12: !0
|
|
71619
|
-
}) : "", MIe = (e, t) => (e == null ? void 0 : e.
|
|
71619
|
+
}) : "", MIe = (e, t) => (e == null ? void 0 : e.senderId) === (t == null ? void 0 : t.senderId), zIe = (e, t) => !e || !t ? !1 : new Date(e.createdAt ?? "").toDateString() === new Date(t.createdAt ?? "").toDateString(), HIe = (e, t) => !e || !t ? !1 : Math.abs(
|
|
71620
71620
|
new Date(t.createdAt ?? "").getTime() - new Date(e.createdAt ?? "").getTime()
|
|
71621
71621
|
) <= 60 * 60 * 1e3, $Ie = (e, t, n) => n === 0 || !MIe(e, t) || !zIe(e, t) || !HIe(e, t), jIe = (e) => {
|
|
71622
71622
|
const t = new Date(e), n = /* @__PURE__ */ new Date(), r = /* @__PURE__ */ new Date();
|
|
@@ -71635,50 +71635,51 @@ const mIe = "_chatDetails_12d43_24", gIe = "_dateSeparator_12d43_32", vIe = "_no
|
|
|
71635
71635
|
newMessage: t,
|
|
71636
71636
|
onMessageChange: n,
|
|
71637
71637
|
onSendMessage: r,
|
|
71638
|
-
userType: o
|
|
71638
|
+
userType: o,
|
|
71639
|
+
loggedInUserId: a
|
|
71639
71640
|
}) => {
|
|
71640
|
-
var
|
|
71641
|
-
const
|
|
71641
|
+
var f, g, v, p;
|
|
71642
|
+
const i = _e(null);
|
|
71642
71643
|
jt(() => {
|
|
71643
|
-
var
|
|
71644
|
-
(
|
|
71645
|
-
}, [(
|
|
71646
|
-
const
|
|
71647
|
-
|
|
71644
|
+
var m;
|
|
71645
|
+
(m = i.current) == null || m.scrollIntoView({ behavior: "auto" });
|
|
71646
|
+
}, [(f = e == null ? void 0 : e.messages) == null ? void 0 : f.length]);
|
|
71647
|
+
const l = (m) => {
|
|
71648
|
+
m.key === "Enter" && r();
|
|
71648
71649
|
};
|
|
71649
71650
|
if (!e)
|
|
71650
71651
|
return /* @__PURE__ */ B.jsx("div", { className: Kn.selectChatPlaceholder, children: ia.START_CHAT_PLACEHOLDER });
|
|
71651
|
-
const
|
|
71652
|
-
let
|
|
71653
|
-
const
|
|
71654
|
-
var
|
|
71655
|
-
return
|
|
71652
|
+
const s = e.chatType === ia.SUPPORT_CHAT && o === hg.CANDIDATE ? ia.SUPPORT_CHAT_LABEL : ((g = e.participantDetails) == null ? void 0 : g.name) ?? "";
|
|
71653
|
+
let d = "";
|
|
71654
|
+
const u = (m, h) => {
|
|
71655
|
+
var b;
|
|
71656
|
+
return h && /* @__PURE__ */ B.jsxs("div", { className: Kn.avatarContainer, children: [
|
|
71656
71657
|
/* @__PURE__ */ B.jsx(
|
|
71657
71658
|
xo,
|
|
71658
71659
|
{
|
|
71659
71660
|
size: lo.LARGE,
|
|
71660
|
-
name:
|
|
71661
|
-
imageUrl: (
|
|
71661
|
+
name: s,
|
|
71662
|
+
imageUrl: (b = e == null ? void 0 : e.participantDetails) == null ? void 0 : b.profileUrl
|
|
71662
71663
|
}
|
|
71663
71664
|
),
|
|
71664
|
-
/* @__PURE__ */ B.jsx("p", { className: Kn.userDetailName, children: RIe(
|
|
71665
|
-
/* @__PURE__ */ B.jsx("div", { className: Kn.timestamp, children: HC((
|
|
71665
|
+
/* @__PURE__ */ B.jsx("p", { className: Kn.userDetailName, children: RIe(s) || ia.DEFAULT_USER_NAME }),
|
|
71666
|
+
/* @__PURE__ */ B.jsx("div", { className: Kn.timestamp, children: HC((m == null ? void 0 : m.createdAt) ?? "") })
|
|
71666
71667
|
] });
|
|
71667
|
-
},
|
|
71668
|
-
var
|
|
71669
|
-
const { showMeta:
|
|
71670
|
-
|
|
71671
|
-
const
|
|
71668
|
+
}, A = (v = e.messages) == null ? void 0 : v.map((m, h) => {
|
|
71669
|
+
var w, S;
|
|
71670
|
+
const { showMeta: b, showDateLabel: C, currentDateLabel: y } = kIe(e.messages ?? [], h, d);
|
|
71671
|
+
C && (d = y);
|
|
71672
|
+
const x = a === m.senderId;
|
|
71672
71673
|
return /* @__PURE__ */ B.jsxs(X.Fragment, { children: [
|
|
71673
|
-
|
|
71674
|
+
C && /* @__PURE__ */ B.jsxs(
|
|
71674
71675
|
"div",
|
|
71675
71676
|
{
|
|
71676
71677
|
className: At(Kn.dateSeparator, {
|
|
71677
|
-
[Kn.noTopMargin]:
|
|
71678
|
+
[Kn.noTopMargin]: h === 0 || !((S = (w = e.messages) == null ? void 0 : w[h - 1]) != null && S.body)
|
|
71678
71679
|
}),
|
|
71679
71680
|
children: [
|
|
71680
71681
|
/* @__PURE__ */ B.jsx("hr", {}),
|
|
71681
|
-
/* @__PURE__ */ B.jsx("span", { children:
|
|
71682
|
+
/* @__PURE__ */ B.jsx("span", { children: y }),
|
|
71682
71683
|
/* @__PURE__ */ B.jsx("hr", {})
|
|
71683
71684
|
]
|
|
71684
71685
|
}
|
|
@@ -71687,27 +71688,27 @@ const mIe = "_chatDetails_12d43_24", gIe = "_dateSeparator_12d43_32", vIe = "_no
|
|
|
71687
71688
|
"div",
|
|
71688
71689
|
{
|
|
71689
71690
|
className: At(Kn.message, {
|
|
71690
|
-
[Kn.myMessage]:
|
|
71691
|
-
[Kn.otherMessage]: !
|
|
71691
|
+
[Kn.myMessage]: x,
|
|
71692
|
+
[Kn.otherMessage]: !x
|
|
71692
71693
|
}),
|
|
71693
|
-
children:
|
|
71694
|
+
children: x ? /* @__PURE__ */ B.jsxs(
|
|
71694
71695
|
"div",
|
|
71695
71696
|
{
|
|
71696
71697
|
className: At(Kn.myMessageContentWrapper, {
|
|
71697
|
-
[Kn.withTimestampMargin]:
|
|
71698
|
+
[Kn.withTimestampMargin]: b
|
|
71698
71699
|
}),
|
|
71699
71700
|
children: [
|
|
71700
|
-
|
|
71701
|
-
/* @__PURE__ */ B.jsx("div", { className: Kn.messageContent, children:
|
|
71701
|
+
b && /* @__PURE__ */ B.jsx("div", { className: Kn.timestamp, children: HC(m.createdAt ?? "") }),
|
|
71702
|
+
/* @__PURE__ */ B.jsx("div", { className: Kn.messageContent, children: m.body })
|
|
71702
71703
|
]
|
|
71703
71704
|
}
|
|
71704
71705
|
) : /* @__PURE__ */ B.jsxs("div", { className: Kn.otherMessageBlock, children: [
|
|
71705
|
-
|
|
71706
|
-
/* @__PURE__ */ B.jsx("div", { className: Kn.messageContent, children:
|
|
71706
|
+
u(m, b),
|
|
71707
|
+
/* @__PURE__ */ B.jsx("div", { className: Kn.messageContent, children: m.body })
|
|
71707
71708
|
] })
|
|
71708
71709
|
}
|
|
71709
71710
|
)
|
|
71710
|
-
] },
|
|
71711
|
+
] }, m.id ?? h);
|
|
71711
71712
|
});
|
|
71712
71713
|
return /* @__PURE__ */ B.jsxs("div", { className: Kn.chatDetails, children: [
|
|
71713
71714
|
/* @__PURE__ */ B.jsxs("div", { className: Kn.chatHeader, children: [
|
|
@@ -71715,15 +71716,15 @@ const mIe = "_chatDetails_12d43_24", gIe = "_dateSeparator_12d43_32", vIe = "_no
|
|
|
71715
71716
|
xo,
|
|
71716
71717
|
{
|
|
71717
71718
|
size: lo.LARGE,
|
|
71718
|
-
name:
|
|
71719
|
-
imageUrl: (
|
|
71719
|
+
name: s,
|
|
71720
|
+
imageUrl: (p = e.participantDetails) == null ? void 0 : p.profileUrl
|
|
71720
71721
|
}
|
|
71721
71722
|
),
|
|
71722
|
-
/* @__PURE__ */ B.jsx("div", { children:
|
|
71723
|
+
/* @__PURE__ */ B.jsx("div", { children: s || ia.DEFAULT_USER_NAME })
|
|
71723
71724
|
] }),
|
|
71724
71725
|
/* @__PURE__ */ B.jsxs("div", { className: Kn.messages, children: [
|
|
71725
|
-
|
|
71726
|
-
/* @__PURE__ */ B.jsx("div", { ref:
|
|
71726
|
+
A,
|
|
71727
|
+
/* @__PURE__ */ B.jsx("div", { ref: i })
|
|
71727
71728
|
] }),
|
|
71728
71729
|
/* @__PURE__ */ B.jsx("div", { className: Kn.inputContainer, children: /* @__PURE__ */ B.jsxs("div", { className: Kn.inputWrapper, children: [
|
|
71729
71730
|
/* @__PURE__ */ B.jsx(
|
|
@@ -71731,7 +71732,7 @@ const mIe = "_chatDetails_12d43_24", gIe = "_dateSeparator_12d43_32", vIe = "_no
|
|
|
71731
71732
|
{
|
|
71732
71733
|
value: t,
|
|
71733
71734
|
onChange: n,
|
|
71734
|
-
onKeyDown:
|
|
71735
|
+
onKeyDown: l,
|
|
71735
71736
|
placeholder: ia.INPUT_PLACEHOLDER
|
|
71736
71737
|
}
|
|
71737
71738
|
),
|