@dotss/tictoccroc 0.4.1 → 0.5.0

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.
Files changed (205) hide show
  1. package/dist/Calendar-BOLCHnjh.js +97 -0
  2. package/dist/TimePicker-BwACyeBR.js +120 -0
  3. package/dist/convertMdToHtml-Bmk0brLK.js +1431 -0
  4. package/dist/index.mjs +105 -200
  5. package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +26 -29
  6. package/dist/parent/b2b/components/ActionButtons/index.mjs +5 -4
  7. package/dist/parent/b2b/components/BottomNotes/BottomNotes.mjs +37 -35
  8. package/dist/parent/b2b/components/BottomNotes/index.mjs +5 -4
  9. package/dist/parent/b2b/components/EmployeeNumberField/EmployeeNumberField.mjs +12 -15
  10. package/dist/parent/b2b/components/EmployeeNumberField/index.mjs +5 -4
  11. package/dist/parent/b2b/components/NameField/NameField.mjs +12 -7
  12. package/dist/parent/b2b/components/NameField/index.mjs +5 -4
  13. package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.mjs +27 -30
  14. package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs +7 -8
  15. package/dist/parent/b2b/components/PhoneNumberField/index.mjs +6 -7
  16. package/dist/parent/b2b/components/Title/Title.mjs +22 -16
  17. package/dist/parent/b2b/components/Title/index.mjs +4 -3
  18. package/dist/parent/b2b/components/TopLogo/TopLogo.mjs +55 -93
  19. package/dist/parent/b2b/components/TopLogo/index.mjs +5 -4
  20. package/dist/parent/b2b/components/index.mjs +9 -19
  21. package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +2 -1143
  22. package/dist/parent/b2b/utils/index.mjs +2 -4
  23. package/dist/parent/notification/components/NotificationCard/NotificationCard.d.ts +3 -1
  24. package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -105
  25. package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
  26. package/dist/parent/notification/components/index.mjs +2 -4
  27. package/dist/parent/notification/utils/index.mjs +2 -4
  28. package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
  29. package/dist/purify.es-D3W4zDrg.js +549 -0
  30. package/dist/shared/components/Calendar/Calendar.mjs +2 -80
  31. package/dist/shared/components/Calendar/index.mjs +5 -4
  32. package/dist/shared/components/Carousel/Carousel.mjs +184 -210
  33. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
  34. package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
  35. package/dist/shared/components/Carousel/index.mjs +6 -6
  36. package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
  37. package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
  38. package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
  39. package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
  40. package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
  41. package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
  42. package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
  43. package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
  44. package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
  45. package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
  46. package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
  47. package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
  48. package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
  49. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
  50. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
  51. package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
  52. package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
  53. package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
  54. package/dist/shared/components/ChatKit/index.mjs +13 -29
  55. package/dist/shared/components/Image/Image.d.ts +2 -0
  56. package/dist/shared/components/Image/Image.error.mjs +34 -40
  57. package/dist/shared/components/Image/Image.mjs +247 -289
  58. package/dist/shared/components/Image/index.mjs +6 -6
  59. package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
  60. package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
  61. package/dist/shared/components/Masonry/Masonry.mjs +240 -276
  62. package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
  63. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
  64. package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
  65. package/dist/shared/components/Masonry/index.mjs +6 -6
  66. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
  67. package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
  68. package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
  69. package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
  70. package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
  71. package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
  72. package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
  73. package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
  74. package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
  75. package/dist/shared/components/MediaDialog/index.mjs +9 -12
  76. package/dist/shared/components/Roller/Roller.mjs +99 -132
  77. package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
  78. package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
  79. package/dist/shared/components/Roller/index.mjs +6 -6
  80. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
  81. package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
  82. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
  83. package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
  84. package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
  85. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
  86. package/dist/shared/components/Scheduler/index.mjs +8 -10
  87. package/dist/shared/components/Swiper/Swiper.mjs +238 -283
  88. package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
  89. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
  90. package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
  91. package/dist/shared/components/Swiper/index.mjs +6 -6
  92. package/dist/shared/components/TextField/TextField.mjs +44 -55
  93. package/dist/shared/components/TextField/index.mjs +5 -4
  94. package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
  95. package/dist/shared/components/TimePicker/index.mjs +5 -4
  96. package/dist/shared/components/index.mjs +36 -75
  97. package/dist/shared/hooks/index.mjs +4 -8
  98. package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
  99. package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
  100. package/dist/shared/hooks/useInView/index.mjs +5 -4
  101. package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
  102. package/dist/shared/hooks/useInView/useInView.mjs +37 -47
  103. package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
  104. package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
  105. package/dist/shared/typings/common.mjs +6 -4
  106. package/dist/shared/typings/index.mjs +2 -4
  107. package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
  108. package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
  109. package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
  110. package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
  111. package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
  112. package/dist/shared/utils/combineRef/index.mjs +5 -4
  113. package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
  114. package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
  115. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
  116. package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
  117. package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
  118. package/dist/shared/utils/getDateRange/index.mjs +5 -4
  119. package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
  120. package/dist/shared/utils/getImageUrl/index.mjs +5 -6
  121. package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
  122. package/dist/shared/utils/getTimeRange/index.mjs +5 -4
  123. package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
  124. package/dist/shared/utils/getVimeoId/index.mjs +5 -4
  125. package/dist/shared/utils/index.mjs +18 -36
  126. package/dist/shared/utils/isAndroid/index.mjs +5 -4
  127. package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
  128. package/dist/shared/utils/isApp/index.mjs +5 -4
  129. package/dist/shared/utils/isApp/isApp.mjs +4 -4
  130. package/dist/shared/utils/isDesktop/index.mjs +5 -4
  131. package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
  132. package/dist/shared/utils/isIos/index.mjs +5 -4
  133. package/dist/shared/utils/isIos/isIos.mjs +5 -5
  134. package/dist/shared/utils/isServer/index.mjs +4 -3
  135. package/dist/shared/utils/isServer/isServer.mjs +4 -4
  136. package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
  137. package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
  138. package/dist/shared/utils/parseQueryString/index.mjs +4 -3
  139. package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
  140. package/dist/shared/utils/share/index.mjs +5 -4
  141. package/dist/shared/utils/share/share.mjs +12 -14
  142. package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
  143. package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
  144. package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
  145. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
  146. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
  147. package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
  148. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
  149. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
  150. package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
  151. package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
  152. package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
  153. package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
  154. package/dist/teacher/home/components/index.mjs +9 -18
  155. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
  156. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
  157. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
  158. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
  159. package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
  160. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
  161. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
  162. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
  163. package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
  164. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
  165. package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
  166. package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
  167. package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
  168. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
  169. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
  170. package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
  171. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
  172. package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
  173. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
  174. package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
  175. package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
  176. package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
  177. package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
  178. package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
  179. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
  180. package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
  181. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
  182. package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
  183. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
  184. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
  185. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
  186. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
  187. package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
  188. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
  189. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
  190. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
  191. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +11 -12
  192. package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +5 -5
  193. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +348 -433
  194. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +7 -7
  195. package/dist/teacher/profile/components/ProfileSummary/index.mjs +5 -4
  196. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +80 -105
  197. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +5 -4
  198. package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +34 -27
  199. package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -6
  200. package/dist/teacher/profile/components/index.mjs +24 -48
  201. package/dist/teacher/profile/utils/index.mjs +2 -4
  202. package/dist/teacher/profile/utils/sortItems/index.mjs +5 -4
  203. package/dist/teacher/profile/utils/sortItems/sortItems.mjs +48 -48
  204. package/package.json +1 -1
  205. package/dist/purify.es-BGaRrCfO.js +0 -553
@@ -1,278 +1,180 @@
1
- import { jsxs as n, jsx as e, Fragment as q } from "react/jsx-runtime";
2
- import { useRef as y, useImperativeHandle as J, useEffect as v } from "react";
3
- import { Flexbox as d, Typography as I, Button as Q, Icon as C, Menu as X, MenuBlock as T, CircularProgressIndicator as Y } from "@dotss/ui";
4
- import Z from "@dotss/ui/core/useTheme";
1
+ import e from "../../../hooks/useInView/index.mjs";
2
+ import t from "../../Image/index.mjs";
3
+ import { useEffect as n, useImperativeHandle as r, useRef as i } from "react";
4
+ import { Button as a, CircularProgressIndicator as o, Flexbox as s, Icon as c, Menu as l, MenuBlock as u, Typography as d } from "@dotss/ui";
5
+ import f from "@dotss/ui/core/useTheme";
6
+ import p from "dayjs";
7
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
5
8
  import { useCheckHoverPossible as _ } from "@dotss/ui/hooks";
6
- import { MenuButton as A } from "@dotss/ui/Menu";
7
- import V from "dayjs";
8
- import U from "../../Image/Image.mjs";
9
- import M from "../../../hooks/useInView/useInView.mjs";
10
- function de({
11
- id: k,
12
- content: u = "",
13
- mine: i = !1,
14
- avatarUrl: h = "",
15
- unreadUserCount: g = 0,
16
- regDatetime: $,
17
- status: l,
18
- onView: m,
19
- openMenu: S,
20
- onClickAvatar: a,
21
- onCloseMenu: t,
22
- onClickMenu: z,
23
- onResend: b,
24
- onDelete: x,
25
- onViewAll: B,
26
- showAvatar: w,
27
- showTime: R,
28
- ref: j,
29
- inlineCSS: G,
30
- ...H
31
- }) {
32
- const {
33
- palette: { brand: p, grey: c, etc: K },
34
- spacing: E
35
- } = Z(), { isHoverPossible: D } = _(), o = y(null), F = y(null), s = y(null);
36
- J(j, () => o.current);
37
- const L = M(o), N = 300, f = l === "FAILED", P = u.length > N, O = (r) => {
38
- r === "resend" ? (t == null || t(), s.current = setTimeout(() => {
39
- b == null || b();
40
- }, 200)) : r === "delete" && (t == null || t(), s.current = setTimeout(() => {
41
- x == null || x();
42
- }, 200));
43
- }, W = (r) => {
44
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
45
- };
46
- return v(() => {
47
- L && (m == null || m());
48
- }, [L, m]), v(() => {
49
- var r;
50
- f && ((r = o == null ? void 0 : o.current) == null || r.scrollIntoView());
51
- }, [f]), v(() => () => {
52
- s.current && clearTimeout(s.current);
53
- }, []), /* @__PURE__ */ n(
54
- d,
55
- {
56
- ref: o,
57
- alignItems: "flex-end",
58
- flexDirection: i ? "row-reverse" : "row",
59
- pl: 4,
60
- pr: 4,
61
- gap: 1,
62
- "aria-busy": l === "PENDING",
63
- ...H,
64
- inlineCSS: {
65
- cursor: l === "PENDING" ? "wait" : "default",
66
- overflowAnchor: "none",
67
- ...G
68
- },
69
- children: [
70
- /* @__PURE__ */ n(d, { alignItems: "flex-start", gap: 2.5, children: [
71
- !i && w && h && /* @__PURE__ */ e(
72
- d,
73
- {
74
- role: typeof a == "function" ? "button" : void 0,
75
- tabIndex: typeof a == "function" ? 0 : -1,
76
- onClick: a,
77
- onKeyDown: W,
78
- "aria-label": typeof a == "function" ? "선생님 프로필 보기" : void 0,
79
- inlineCSS: {
80
- position: "relative",
81
- overflow: "hidden",
82
- minWidth: 32,
83
- cursor: typeof a == "function" ? "pointer" : void 0
84
- },
85
- children: /* @__PURE__ */ e(
86
- U,
87
- {
88
- src: h,
89
- width: 32,
90
- height: 32,
91
- borderRadius: "50%",
92
- alt: "선생님 프로필 사진",
93
- role: "presentation",
94
- enableFallback: !0,
95
- style: {
96
- objectFit: "cover"
97
- }
98
- }
99
- )
100
- }
101
- ),
102
- /* @__PURE__ */ n(
103
- d,
104
- {
105
- pt: 2,
106
- pb: 2,
107
- pl: 3,
108
- pr: 3,
109
- ml: !i && !w && h ? 10.5 : void 0,
110
- flexDirection: "column",
111
- gap: 2.5,
112
- inlineCSS: {
113
- borderRadius: 12,
114
- backgroundColor: i ? p.primary.pageControl : c[10]
115
- },
116
- children: [
117
- /* @__PURE__ */ e(
118
- I,
119
- {
120
- tag: "p",
121
- variant: "b3R",
122
- inlineCSS: {
123
- whiteSpace: "pre-wrap",
124
- wordBreak: "break-all",
125
- userSelect: "text",
126
- "& *": {
127
- userSelect: "text"
128
- }
129
- },
130
- children: P ? u.slice(0, N) + "..." : u
131
- }
132
- ),
133
- P && /* @__PURE__ */ e(
134
- Q,
135
- {
136
- variant: "text",
137
- size: "xSmall",
138
- endAdornment: /* @__PURE__ */ e(C, { name: "ChevronRightLine" }),
139
- onClick: B,
140
- inlineCSS: {
141
- marginLeft: "auto",
142
- '&:active:not([aria-disabled="true"])': {
143
- backgroundColor: p.primary.main
144
- },
145
- ...D && {
146
- '&:hover:not([aria-disabled="true"])': {
147
- backgroundColor: p.primary.main
148
- }
149
- }
150
- },
151
- children: "전체보기"
152
- }
153
- )
154
- ]
155
- }
156
- )
157
- ] }),
158
- f && /* @__PURE__ */ n(q, { children: [
159
- /* @__PURE__ */ n(
160
- A,
161
- {
162
- ref: F,
163
- isMenuOpen: !!S,
164
- menuId: `message-${k}-menu`,
165
- onClick: z,
166
- size: "xSmall",
167
- inlineCSS: {
168
- padding: E.content(0.5),
169
- gap: E.content(0.5),
170
- borderRadius: 200,
171
- backgroundColor: S ? c[10] : "transparent",
172
- cursor: "pointer",
173
- ...D && {
174
- "&:hover": {
175
- backgroundColor: `${c[10]} !important`
176
- }
177
- },
178
- "&:active": {
179
- backgroundColor: `${c[10]} !important`
180
- }
181
- },
182
- children: [
183
- /* @__PURE__ */ e(
184
- C,
185
- {
186
- name: "ResetLine",
187
- size: "xSmall",
188
- color: "grey.70",
189
- inlineCSS: {
190
- color: `${c[70]} !important`
191
- }
192
- }
193
- ),
194
- /* @__PURE__ */ e(
195
- C,
196
- {
197
- name: "CloseLine",
198
- size: "xSmall",
199
- color: "etc.red",
200
- inlineCSS: {
201
- color: `${K.red} !important`
202
- }
203
- }
204
- )
205
- ]
206
- }
207
- ),
208
- /* @__PURE__ */ n(
209
- X,
210
- {
211
- id: `message-${k}-menu`,
212
- anchorRef: F,
213
- open: S,
214
- onClose: t,
215
- onChange: O,
216
- width: 160,
217
- placement: "bottom-left",
218
- children: [
219
- /* @__PURE__ */ e(T, { value: "resend", children: "재전송" }),
220
- /* @__PURE__ */ e(T, { value: "delete", children: "삭제" })
221
- ]
222
- }
223
- )
224
- ] }),
225
- !f && /* @__PURE__ */ n(
226
- d,
227
- {
228
- flexDirection: "column",
229
- alignItems: i ? "flex-end" : "flex-start",
230
- inlineCSS: {
231
- whiteSpace: "nowrap"
232
- },
233
- children: [
234
- i && g > 0 && l === "SUCCEEDED" && /* @__PURE__ */ e(
235
- I,
236
- {
237
- tag: "span",
238
- variant: "c5B",
239
- "aria-hidden": !0,
240
- inlineCSS: {
241
- color: p.primary.text
242
- },
243
- children: g
244
- }
245
- ),
246
- i && g > 0 && l === "PENDING" && /* @__PURE__ */ e(
247
- Y,
248
- {
249
- size: "small",
250
- loop: !0,
251
- inlineCSS: {
252
- width: 12,
253
- height: 12
254
- }
255
- }
256
- ),
257
- /* @__PURE__ */ e(
258
- I,
259
- {
260
- tag: "span",
261
- variant: "c5R",
262
- color: "etc.dimmed01",
263
- inlineCSS: {
264
- display: R ? void 0 : "none"
265
- },
266
- children: V($).format("A h:mm")
267
- }
268
- )
269
- ]
270
- }
271
- )
272
- ]
273
- }
274
- );
9
+ import { MenuButton as v } from "@dotss/ui/Menu";
10
+ //#region shared/components/ChatKit/Message/Message.tsx
11
+ function y({ id: y, content: b = "", mine: x = !1, avatarUrl: S = "", unreadUserCount: C = 0, regDatetime: w, status: T, onView: E, openMenu: D, onClickAvatar: O, onCloseMenu: k, onClickMenu: A, onResend: j, onDelete: M, onViewAll: N, showAvatar: P, showTime: F, ref: I, inlineCSS: L, ...R }) {
12
+ let { palette: { brand: z, grey: B, etc: V }, spacing: H } = f(), { isHoverPossible: U } = _(), W = i(null), G = i(null), K = i(null);
13
+ r(I, () => W.current);
14
+ let q = e(W), J = T === "FAILED", Y = b.length > 300, X = (e) => {
15
+ e === "resend" ? (k?.(), K.current = setTimeout(() => {
16
+ j?.();
17
+ }, 200)) : e === "delete" && (k?.(), K.current = setTimeout(() => {
18
+ M?.();
19
+ }, 200));
20
+ }, Z = (e) => {
21
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
22
+ };
23
+ return n(() => {
24
+ q && E?.();
25
+ }, [q, E]), n(() => {
26
+ J && W?.current?.scrollIntoView();
27
+ }, [J]), n(() => () => {
28
+ K.current && clearTimeout(K.current);
29
+ }, []), /* @__PURE__ */ g(s, {
30
+ ref: W,
31
+ alignItems: "flex-end",
32
+ flexDirection: x ? "row-reverse" : "row",
33
+ pl: 4,
34
+ pr: 4,
35
+ gap: 1,
36
+ "aria-busy": T === "PENDING",
37
+ ...R,
38
+ inlineCSS: {
39
+ cursor: T === "PENDING" ? "wait" : "default",
40
+ overflowAnchor: "none",
41
+ ...L
42
+ },
43
+ children: [
44
+ /* @__PURE__ */ g(s, {
45
+ alignItems: "flex-start",
46
+ gap: 2.5,
47
+ children: [!x && P && S && /* @__PURE__ */ h(s, {
48
+ role: typeof O == "function" ? "button" : void 0,
49
+ tabIndex: typeof O == "function" ? 0 : -1,
50
+ onClick: O,
51
+ onKeyDown: Z,
52
+ "aria-label": typeof O == "function" ? "선생님 프로필 보기" : void 0,
53
+ inlineCSS: {
54
+ position: "relative",
55
+ overflow: "hidden",
56
+ minWidth: 32,
57
+ cursor: typeof O == "function" ? "pointer" : void 0
58
+ },
59
+ children: /* @__PURE__ */ h(t, {
60
+ src: S,
61
+ width: 32,
62
+ height: 32,
63
+ borderRadius: "50%",
64
+ alt: "선생님 프로필 사진",
65
+ role: "presentation",
66
+ enableFallback: !0,
67
+ style: { objectFit: "cover" }
68
+ })
69
+ }), /* @__PURE__ */ g(s, {
70
+ pt: 2,
71
+ pb: 2,
72
+ pl: 3,
73
+ pr: 3,
74
+ ml: !x && !P && S ? 10.5 : void 0,
75
+ flexDirection: "column",
76
+ gap: 2.5,
77
+ inlineCSS: {
78
+ borderRadius: 12,
79
+ backgroundColor: x ? z.primary.pageControl : B[10]
80
+ },
81
+ children: [/* @__PURE__ */ h(d, {
82
+ tag: "p",
83
+ variant: "b3R",
84
+ inlineCSS: {
85
+ whiteSpace: "pre-wrap",
86
+ wordBreak: "break-all",
87
+ userSelect: "text",
88
+ "& *": { userSelect: "text" }
89
+ },
90
+ children: Y ? b.slice(0, 300) + "..." : b
91
+ }), Y && /* @__PURE__ */ h(a, {
92
+ variant: "text",
93
+ size: "xSmall",
94
+ endAdornment: /* @__PURE__ */ h(c, { name: "ChevronRightLine" }),
95
+ onClick: N,
96
+ inlineCSS: {
97
+ marginLeft: "auto",
98
+ "&:active:not([aria-disabled=\"true\"])": { backgroundColor: z.primary.main },
99
+ ...U && { "&:hover:not([aria-disabled=\"true\"])": { backgroundColor: z.primary.main } }
100
+ },
101
+ children: "전체보기"
102
+ })]
103
+ })]
104
+ }),
105
+ J && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(v, {
106
+ ref: G,
107
+ isMenuOpen: !!D,
108
+ menuId: `message-${y}-menu`,
109
+ onClick: A,
110
+ size: "xSmall",
111
+ inlineCSS: {
112
+ padding: H.content(.5),
113
+ gap: H.content(.5),
114
+ borderRadius: 200,
115
+ backgroundColor: D ? B[10] : "transparent",
116
+ cursor: "pointer",
117
+ ...U && { "&:hover": { backgroundColor: `${B[10]} !important` } },
118
+ "&:active": { backgroundColor: `${B[10]} !important` }
119
+ },
120
+ children: [/* @__PURE__ */ h(c, {
121
+ name: "ResetLine",
122
+ size: "xSmall",
123
+ color: "grey.70",
124
+ inlineCSS: { color: `${B[70]} !important` }
125
+ }), /* @__PURE__ */ h(c, {
126
+ name: "CloseLine",
127
+ size: "xSmall",
128
+ color: "etc.red",
129
+ inlineCSS: { color: `${V.red} !important` }
130
+ })]
131
+ }), /* @__PURE__ */ g(l, {
132
+ id: `message-${y}-menu`,
133
+ anchorRef: G,
134
+ open: D,
135
+ onClose: k,
136
+ onChange: X,
137
+ width: 160,
138
+ placement: "bottom-left",
139
+ children: [/* @__PURE__ */ h(u, {
140
+ value: "resend",
141
+ children: "재전송"
142
+ }), /* @__PURE__ */ h(u, {
143
+ value: "delete",
144
+ children: "삭제"
145
+ })]
146
+ })] }),
147
+ !J && /* @__PURE__ */ g(s, {
148
+ flexDirection: "column",
149
+ alignItems: x ? "flex-end" : "flex-start",
150
+ inlineCSS: { whiteSpace: "nowrap" },
151
+ children: [
152
+ x && C > 0 && T === "SUCCEEDED" && /* @__PURE__ */ h(d, {
153
+ tag: "span",
154
+ variant: "c5B",
155
+ "aria-hidden": !0,
156
+ inlineCSS: { color: z.primary.text },
157
+ children: C
158
+ }),
159
+ x && C > 0 && T === "PENDING" && /* @__PURE__ */ h(o, {
160
+ size: "small",
161
+ loop: !0,
162
+ inlineCSS: {
163
+ width: 12,
164
+ height: 12
165
+ }
166
+ }),
167
+ /* @__PURE__ */ h(d, {
168
+ tag: "span",
169
+ variant: "c5R",
170
+ color: "etc.dimmed01",
171
+ inlineCSS: { display: F ? void 0 : "none" },
172
+ children: p(w).format("A h:mm")
173
+ })
174
+ ]
175
+ })
176
+ ]
177
+ });
275
178
  }
276
- export {
277
- de as default
278
- };
179
+ //#endregion
180
+ export { y as default };
@@ -1,33 +1,22 @@
1
- import w from "dayjs";
2
- function h(a) {
3
- return a.map(([c, s]) => {
4
- const r = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
5
- for (let t = 0; t < s.length; t += 1) {
6
- const n = s[t], d = n.senderId, i = s[t - 1], o = s[t + 1];
7
- d == null || n.status === "FAILED" || n.type !== "USER" || (i && (i == null ? void 0 : i.senderId) !== d && u.set(`${d}-${n.id}`, n.id), o && (o == null ? void 0 : o.senderId) !== d && I.set(`${d}-${n.id}`, n.id), r.has(d) || r.set(d, n.id), e.set(d, n.id));
8
- }
9
- const f = new Set(r.values()), l = new Set(e.values()), p = new Set(I.values()), $ = new Set(u.values());
10
- return [
11
- c,
12
- s.map((t) => ({
13
- ...t,
14
- // 역방향 스크롤에 따른 역순 처리
15
- isFirstInGroup: l.has(t.id) || p.has(t.id),
16
- isLastInGroup: f.has(t.id) || $.has(t.id)
17
- }))
18
- ];
19
- });
1
+ import e from "dayjs";
2
+ //#region shared/components/ChatKit/Message/Message.utils.ts
3
+ function t(e) {
4
+ return e.map(([e, t]) => {
5
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
6
+ for (let e = 0; e < t.length; e += 1) {
7
+ let o = t[e], s = o.senderId, c = t[e - 1], l = t[e + 1];
8
+ s == null || o.status === "FAILED" || o.type !== "USER" || (c && c?.senderId !== s && a.set(`${s}-${o.id}`, o.id), l && l?.senderId !== s && i.set(`${s}-${o.id}`, o.id), n.has(s) || n.set(s, o.id), r.set(s, o.id));
9
+ }
10
+ let o = new Set(n.values()), s = new Set(r.values()), c = new Set(i.values()), l = new Set(a.values());
11
+ return [e, t.map((e) => ({
12
+ ...e,
13
+ isFirstInGroup: s.has(e.id) || c.has(e.id),
14
+ isLastInGroup: o.has(e.id) || l.has(e.id)
15
+ }))];
16
+ });
20
17
  }
21
- function E({
22
- mine: a,
23
- status: c,
24
- unreadUserCount: s,
25
- content: r,
26
- regDatetime: e
27
- }) {
28
- return `${a ? "나" : "상대방"}, ${r}, ${s && s > 0 ? "읽지 않음" : "읽음"}, ${c === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${w(e).format("YYYY년 MM월 DD일 A h:mm")}`;
18
+ function n({ mine: t, status: n, unreadUserCount: r, content: i, regDatetime: a }) {
19
+ return `${t ? "나" : "상대방"}, ${i}, ${r && r > 0 ? "읽지 않음" : "읽음"}, ${n === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${e(a).format("YYYY년 MM월 DD일 A h:mm")}`;
29
20
  }
30
- export {
31
- E as getMessageLabel,
32
- h as markMessageGroupBoundaries
33
- };
21
+ //#endregion
22
+ export { n as getMessageLabel, t as markMessageGroupBoundaries };
@@ -1,9 +1,7 @@
1
- import a from "./Message.mjs";
2
- import { default as o } from "./Message.fallback.mjs";
3
- import { getMessageLabel as f, markMessageGroupBoundaries as g } from "./Message.utils.mjs";
4
- export {
5
- o as MessageFallback,
6
- a as default,
7
- f as getMessageLabel,
8
- g as markMessageGroupBoundaries
9
- };
1
+ import e from "./Message.mjs";
2
+ import t from "./Message.fallback.mjs";
3
+ import { getMessageLabel as n, markMessageGroupBoundaries as r } from "./Message.utils.mjs";
4
+ //#region shared/components/ChatKit/Message/index.ts
5
+ var i = e;
6
+ //#endregion
7
+ export { t as MessageFallback, i as default, n as getMessageLabel, r as markMessageGroupBoundaries };
@@ -1,29 +1,33 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Flexbox as o, Typography as i } from "@dotss/ui";
1
+ import { Flexbox as e, Typography as t } from "@dotss/ui";
3
2
  import n from "@dotss/ui/core/useTheme";
4
- import p from "dayjs";
5
- function f({ date: t, ...e }) {
6
- const {
7
- palette: { grey: a }
8
- } = n();
9
- return /* @__PURE__ */ r(o, { role: "separator", ...e, children: /* @__PURE__ */ r(
10
- o,
11
- {
12
- pt: 0.5,
13
- pb: 0.5,
14
- pl: 2,
15
- pr: 2,
16
- inlineCSS: {
17
- maxWidth: "fit-content",
18
- marginLeft: "auto",
19
- marginRight: "auto",
20
- borderRadius: 20,
21
- backgroundColor: a[10]
22
- },
23
- children: /* @__PURE__ */ r(i, { tag: "p", variant: "c3M", color: "grey.70", children: p(t).format("YYYY년 M월 D일 dddd") })
24
- }
25
- ) });
3
+ import r from "dayjs";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ //#region shared/components/ChatKit/Seperator/Seperator.tsx
6
+ function a({ date: a, ...o }) {
7
+ let { palette: { grey: s } } = n();
8
+ return /* @__PURE__ */ i(e, {
9
+ role: "separator",
10
+ ...o,
11
+ children: /* @__PURE__ */ i(e, {
12
+ pt: .5,
13
+ pb: .5,
14
+ pl: 2,
15
+ pr: 2,
16
+ inlineCSS: {
17
+ maxWidth: "fit-content",
18
+ marginLeft: "auto",
19
+ marginRight: "auto",
20
+ borderRadius: 20,
21
+ backgroundColor: s[10]
22
+ },
23
+ children: /* @__PURE__ */ i(t, {
24
+ tag: "p",
25
+ variant: "c3M",
26
+ color: "grey.70",
27
+ children: r(a).format("YYYY년 M월 D일 dddd")
28
+ })
29
+ })
30
+ });
26
31
  }
27
- export {
28
- f as default
29
- };
32
+ //#endregion
33
+ export { a as default };
@@ -1,4 +1,5 @@
1
1
  import e from "./Seperator.mjs";
2
- export {
3
- e as default
4
- };
2
+ //#region shared/components/ChatKit/Seperator/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };