@dotss/tictoccroc 0.0.15 → 0.0.16
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.
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
return
|
|
4
|
-
var d;
|
|
1
|
+
import c from "dayjs";
|
|
2
|
+
function l(a) {
|
|
3
|
+
return a.map(([o, s]) => {
|
|
5
4
|
const n = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
|
|
6
5
|
for (let t = 0; t < s.length; t += 1) {
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
const r = s[t], i = r.senderId;
|
|
7
|
+
i == null || r.status === "FAILED" || (n.has(i) || n.set(i, r.id), e.set(i, r.id));
|
|
9
8
|
}
|
|
10
|
-
const
|
|
9
|
+
const d = new Set(n.values()), u = new Set(e.values());
|
|
11
10
|
return [
|
|
12
|
-
|
|
11
|
+
o,
|
|
13
12
|
s.map((t) => ({
|
|
14
13
|
...t,
|
|
15
14
|
// 역방향 스크롤에 따른 역순 처리
|
|
16
|
-
isFirstInGroup:
|
|
17
|
-
isLastInGroup:
|
|
15
|
+
isFirstInGroup: u.has(t.id),
|
|
16
|
+
isLastInGroup: d.has(t.id)
|
|
18
17
|
}))
|
|
19
18
|
];
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
|
-
function
|
|
23
|
-
mine:
|
|
24
|
-
status:
|
|
21
|
+
function I({
|
|
22
|
+
mine: a,
|
|
23
|
+
status: o,
|
|
25
24
|
unreadUserCount: s,
|
|
26
25
|
content: n,
|
|
27
26
|
regDatetime: e
|
|
28
27
|
}) {
|
|
29
|
-
return `${
|
|
28
|
+
return `${a ? "나" : "상대방"}, ${n}, ${s && s > 0 ? "읽지 않음" : "읽음"}, ${o === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${c(e).format("YYYY년 MM월 DD일 A h:mm")}`;
|
|
30
29
|
}
|
|
31
30
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
I as getMessageLabel,
|
|
32
|
+
l as markMessageGroupBoundaries
|
|
34
33
|
};
|
package/package.json
CHANGED