@dotss/tictoccroc 0.0.14 → 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.
- package/dist/index.mjs +143 -112
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.d.ts +29 -0
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +174 -0
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.d.ts +8 -0
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +51 -0
- package/dist/shared/components/ChatKit/BotMessage/index.d.ts +4 -0
- package/dist/shared/components/ChatKit/BotMessage/index.mjs +8 -0
- package/dist/shared/components/ChatKit/InputBar/InputBar.d.ts +9 -0
- package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.d.ts +2 -0
- package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +85 -0
- package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +130 -0
- package/dist/shared/components/ChatKit/InputBar/index.d.ts +4 -0
- package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -0
- package/dist/shared/components/ChatKit/Message/Message.d.ts +40 -0
- package/dist/shared/components/ChatKit/Message/Message.fallback.d.ts +9 -0
- package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +59 -0
- package/dist/shared/components/ChatKit/Message/Message.mjs +237 -0
- package/dist/shared/components/ChatKit/Message/Message.utils.d.ts +14 -0
- package/dist/shared/components/ChatKit/Message/Message.utils.mjs +33 -0
- package/dist/shared/components/ChatKit/Message/index.d.ts +5 -0
- package/dist/shared/components/ChatKit/Message/index.mjs +9 -0
- package/dist/shared/components/ChatKit/Seperator/Seperator.d.ts +6 -0
- package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +29 -0
- package/dist/shared/components/ChatKit/Seperator/index.d.ts +3 -0
- package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -0
- package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.d.ts +7 -0
- package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +120 -0
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.d.ts +15 -0
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +107 -0
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.d.ts +2 -0
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +6 -0
- package/dist/shared/components/ChatKit/SystemMessage/index.d.ts +5 -0
- package/dist/shared/components/ChatKit/SystemMessage/index.mjs +8 -0
- package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.d.ts +7 -0
- package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +55 -0
- package/dist/shared/components/ChatKit/UnreadMessagePill/index.d.ts +3 -0
- package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +4 -0
- package/dist/shared/components/ChatKit/index.d.ts +12 -0
- package/dist/shared/components/ChatKit/index.mjs +29 -0
- package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +13 -14
- package/dist/shared/components/index.d.ts +2 -0
- package/dist/shared/components/index.mjs +65 -38
- package/dist/shared/hooks/index.d.ts +1 -0
- package/dist/shared/hooks/index.mjs +2 -0
- package/dist/shared/hooks/useInView/index.d.ts +2 -0
- package/dist/shared/hooks/useInView/index.mjs +4 -0
- package/dist/shared/hooks/useInView/useInView.d.ts +4 -0
- package/dist/shared/hooks/useInView/useInView.mjs +30 -0
- package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.d.ts +1 -0
- package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +21 -0
- package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.test.d.ts +1 -0
- package/dist/shared/utils/getCareTypeLabel/index.d.ts +2 -0
- package/dist/shared/utils/getCareTypeLabel/index.mjs +4 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.mjs +12 -10
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,131 +6,162 @@ import { default as m } from "./shared/components/MediaDialog/MediaDialog.mjs";
|
|
|
6
6
|
import { default as x } from "./shared/components/MediaDialog/MediaBlock/MediaBlock.mjs";
|
|
7
7
|
import { default as c } from "./shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs";
|
|
8
8
|
import { default as g } from "./shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as A } from "./shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs";
|
|
10
10
|
import { default as y } from "./shared/components/Swiper/Swiper.mjs";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
11
|
+
import { default as B } from "./shared/components/Swiper/SwiperBlock/SwiperBlock.mjs";
|
|
12
|
+
import { default as k } from "./shared/components/Carousel/Carousel.mjs";
|
|
13
|
+
import { default as T } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
|
|
14
|
+
import { default as h } from "./shared/components/TimePicker/TimePicker.mjs";
|
|
15
|
+
import { default as F } from "./shared/components/Roller/Roller.mjs";
|
|
16
|
+
import { default as R } from "./shared/components/Roller/RollerBlock/RollerBlock.mjs";
|
|
17
|
+
import { default as L } from "./shared/components/Image/Image.mjs";
|
|
18
|
+
import { default as G } from "./shared/components/Image/Image.error.mjs";
|
|
19
19
|
import { default as N } from "./shared/components/Calendar/Calendar.mjs";
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
20
|
+
import { default as U } from "./shared/components/Masonry/Masonry.mjs";
|
|
21
|
+
import { default as j } from "./shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
|
|
22
22
|
import { default as z } from "./shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs";
|
|
23
|
-
import { default as J } from "./shared/
|
|
24
|
-
import { default as W } from "./shared/
|
|
25
|
-
import {
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import {
|
|
29
|
-
import { default as
|
|
30
|
-
import {
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import {
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import {
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import {
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import {
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import {
|
|
23
|
+
import { default as J } from "./shared/components/ChatKit/Message/Message.mjs";
|
|
24
|
+
import { default as W } from "./shared/components/ChatKit/Message/Message.fallback.mjs";
|
|
25
|
+
import { getMessageLabel as Y, markMessageGroupBoundaries as Z } from "./shared/components/ChatKit/Message/Message.utils.mjs";
|
|
26
|
+
import { default as $ } from "./shared/components/ChatKit/SystemMessage/SystemMessage.mjs";
|
|
27
|
+
import { default as ae } from "./shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs";
|
|
28
|
+
import { getSystemMessageLabel as oe } from "./shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs";
|
|
29
|
+
import { default as fe } from "./shared/components/ChatKit/BotMessage/BotMessage.mjs";
|
|
30
|
+
import { getBotMessageLabel as se, getClassInfo as ue, getCtaButtonText as de } from "./shared/components/ChatKit/BotMessage/BotMessage.utils.mjs";
|
|
31
|
+
import { default as pe } from "./shared/components/ChatKit/InputBar/InputBar.mjs";
|
|
32
|
+
import { default as ie } from "./shared/components/ChatKit/InputBar/InputBar.fallback.mjs";
|
|
33
|
+
import { default as ne } from "./shared/components/ChatKit/Seperator/Seperator.mjs";
|
|
34
|
+
import { default as Se } from "./shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs";
|
|
35
|
+
import { default as Ce } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
36
|
+
import { default as be } from "./shared/hooks/useInView/useInView.mjs";
|
|
37
|
+
import { default as Me } from "./shared/utils/getImageUrl/getImageUrl.mjs";
|
|
38
|
+
import { default as Ie } from "./shared/utils/isServer/isServer.mjs";
|
|
39
|
+
import { default as De } from "./shared/utils/getTimeRange/getTimeRange.mjs";
|
|
40
|
+
import { default as ve } from "./shared/utils/getDateRange/getDateRange.mjs";
|
|
41
|
+
import { default as Pe } from "./shared/utils/isAndroid/isAndroid.mjs";
|
|
42
|
+
import { default as we } from "./shared/utils/isApp/isApp.mjs";
|
|
43
|
+
import { default as Ee } from "./shared/utils/isDesktop/isDesktop.mjs";
|
|
44
|
+
import { default as Ke } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
|
|
45
|
+
import { default as Qe } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
|
|
46
|
+
import { default as Ve } from "./shared/utils/getVimeoId/getVimeoId.mjs";
|
|
47
|
+
import { default as qe } from "./shared/utils/parseQueryString/parseQueryString.mjs";
|
|
48
|
+
import { default as He } from "./shared/utils/share/share.mjs";
|
|
49
|
+
import { default as Oe } from "./shared/utils/dayFlagToDay/dayFlagToDay.mjs";
|
|
50
|
+
import { default as Xe } from "./shared/utils/getCareTypeLabel/getCareTypeLabel.mjs";
|
|
51
|
+
import { default as Ze } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
|
|
52
|
+
import { default as $e } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
|
|
53
|
+
import { default as aa } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
|
|
54
|
+
import { default as oa } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
|
|
55
|
+
import { default as fa } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
|
|
56
|
+
import { default as sa } from "./teacher/profile/components/CertificateSection/CertificateSection.mjs";
|
|
57
|
+
import { default as da } from "./teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs";
|
|
58
|
+
import { default as pa } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
|
|
59
|
+
import { default as ia } from "./teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs";
|
|
60
|
+
import { default as na } from "./teacher/profile/components/EducationSection/EducationSection.mjs";
|
|
61
|
+
import { default as Sa } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
|
|
62
|
+
import { default as Ca } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
|
|
63
|
+
import { default as ba } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
|
|
64
|
+
import { getPreferredAgeKeywords as Ma } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
|
|
65
|
+
import { default as Ia } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
|
|
66
|
+
import { default as Da } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
|
|
67
|
+
import { getAbilityCollection as va } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
|
|
68
|
+
import { default as Pa } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
|
|
69
|
+
import { default as wa } from "./teacher/profile/components/ClassNotesSection/ClassNotesSection.mjs";
|
|
70
|
+
import { default as Ea } from "./teacher/profile/components/ClassNotesSection/ClassNote/ClassNote.mjs";
|
|
71
|
+
import { default as Ka } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
|
|
72
|
+
import { getChildLabel as Qa } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
|
|
73
|
+
import { default as Va } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
|
|
74
|
+
import { default as qa } from "./teacher/home/components/TextAccount/TextAccount.mjs";
|
|
75
|
+
import { default as Ha } from "./teacher/home/components/TextAccount/TextAccount.fallback.mjs";
|
|
76
|
+
import { default as Oa } from "./teacher/home/components/Carousel1Account/Carousel1Account.mjs";
|
|
77
|
+
import { default as Xa } from "./teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs";
|
|
78
|
+
import { default as Za } from "./teacher/home/components/Carousel2Account/Carousel2Account.mjs";
|
|
79
|
+
import { default as $a } from "./teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs";
|
|
80
|
+
import { default as at } from "./teacher/home/components/BannerAccount/BannerAccount.mjs";
|
|
81
|
+
import { default as ot } from "./teacher/home/components/BannerAccount/BannerAccount.fallback.mjs";
|
|
68
82
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
Da as AbilityBadge,
|
|
84
|
+
Ia as AbilityCollection,
|
|
85
|
+
oa as ActivityGallery,
|
|
86
|
+
fa as ActivityGalleryItem,
|
|
87
|
+
Pa as AvailableScheduleSection,
|
|
88
|
+
at as BannerAccount,
|
|
89
|
+
ot as BannerAccountFallback,
|
|
90
|
+
fe as BotMessage,
|
|
76
91
|
N as Calendar,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
L as
|
|
92
|
+
ia as CareerItem,
|
|
93
|
+
pa as CareerSection,
|
|
94
|
+
k as Carousel,
|
|
95
|
+
Oa as Carousel1Account,
|
|
96
|
+
Xa as Carousel1AccountFallback,
|
|
97
|
+
Za as Carousel2Account,
|
|
98
|
+
$a as Carousel2AccountFallback,
|
|
99
|
+
T as CarouselSlide,
|
|
100
|
+
da as CertificateItem,
|
|
101
|
+
sa as CertificateSection,
|
|
102
|
+
Ea as ClassNote,
|
|
103
|
+
wa as ClassNotesSection,
|
|
104
|
+
ae as DirectTradeRiskInfoBottomSheet,
|
|
105
|
+
Sa as EducationItem,
|
|
106
|
+
na as EducationSection,
|
|
107
|
+
L as Image,
|
|
108
|
+
G as ImageError,
|
|
109
|
+
pe as InputBar,
|
|
110
|
+
ie as InputBarFallback,
|
|
93
111
|
z as LoadingAnnouncer,
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
U as Masonry,
|
|
113
|
+
j as MasonryBlock,
|
|
96
114
|
x as MediaBlock,
|
|
97
115
|
m as MediaDialog,
|
|
98
116
|
c as MediaDialogContent,
|
|
99
117
|
g as MediaDialogFooter,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
118
|
+
A as MediaDialogToolbar,
|
|
119
|
+
J as Message,
|
|
120
|
+
W as MessageFallback,
|
|
121
|
+
Va as ParentReviewCard,
|
|
122
|
+
Ka as ParentReviewSection,
|
|
123
|
+
Ca as PreferredActivityKeywordGroup,
|
|
124
|
+
ba as PreferredAgeGroup,
|
|
125
|
+
Ze as ProfileSummary,
|
|
126
|
+
F as Roller,
|
|
127
|
+
R as RollerBlock,
|
|
108
128
|
l as ScheduleBlock,
|
|
109
129
|
r as ScheduleEvent,
|
|
110
130
|
t as Scheduler,
|
|
111
|
-
|
|
112
|
-
|
|
131
|
+
ne as Seperator,
|
|
132
|
+
aa as StatBadge,
|
|
133
|
+
$e as StatBadgeCollection,
|
|
113
134
|
y as Swiper,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
B as SwiperBlock,
|
|
136
|
+
$ as SystemMessage,
|
|
137
|
+
qa as TextAccount,
|
|
138
|
+
Ha as TextAccountFallback,
|
|
139
|
+
h as TimePicker,
|
|
140
|
+
Se as UnreadMessagePill,
|
|
141
|
+
Ke as birthDateToAge,
|
|
142
|
+
Oe as dayFlagToDay,
|
|
143
|
+
va as getAbilityCollection,
|
|
121
144
|
u as getAvailableDateRange,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
se as getBotMessageLabel,
|
|
146
|
+
Xe as getCareTypeLabel,
|
|
147
|
+
Qa as getChildLabel,
|
|
148
|
+
ue as getClassInfo,
|
|
149
|
+
de as getCtaButtonText,
|
|
150
|
+
ve as getDateRange,
|
|
151
|
+
Me as getImageUrl,
|
|
152
|
+
Y as getMessageLabel,
|
|
153
|
+
Ma as getPreferredAgeKeywords,
|
|
154
|
+
oe as getSystemMessageLabel,
|
|
155
|
+
De as getTimeRange,
|
|
156
|
+
Ve as getVimeoId,
|
|
157
|
+
Pe as isAndroid,
|
|
158
|
+
we as isApp,
|
|
159
|
+
Ee as isDesktop,
|
|
160
|
+
Ie as isServer,
|
|
161
|
+
Z as markMessageGroupBoundaries,
|
|
162
|
+
Qe as objectToQueryString,
|
|
163
|
+
qe as parseQueryString,
|
|
164
|
+
He as share,
|
|
165
|
+
be as useInView,
|
|
166
|
+
Ce as useIsomorphicLayoutEffect
|
|
136
167
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
|
|
2
|
+
export type BotMessageType = 'MATCHING_SUCCEEDED' | 'TEACHER_INQUIRED' | 'PARENT_CHANGED_OFFER_SCHEDULE' | 'PARENT_CHANGED_MATCHING_SCHEDULE' | 'TEACHER_APPLIED' | 'PARENT_SENT_OFFER' | 'TARGET_MATCHING_SUCCEEDED' | 'APPLICATION_MATCHING_SUCCEEDED' | 'PARENT_REFUSED_APPLICATION' | 'TEACHER_REFUSED_OFFER' | 'PARENT_CANCELED_MATCHING' | 'TEACHER_CANCELED_MATCHING' | 'TEACHER_COMPLETED_CARE' | 'ADMIN_CANCELED_MATCHING';
|
|
3
|
+
export type BotMessageCtaType = 'MY_CLASS_CHECK' | 'OFFER_CHECK' | 'CHANGE_INFO_CHECK' | 'MY_APPLICATION_INFO_VIEW' | 'CARE_NOTE_CHECK' | 'TEACHER_SELECTION';
|
|
4
|
+
export interface BotMessageOffer {
|
|
5
|
+
careStartDate: string;
|
|
6
|
+
careStartTime: string;
|
|
7
|
+
careEndTime: string;
|
|
8
|
+
firstCareType: string;
|
|
9
|
+
secondCareType: string;
|
|
10
|
+
totalCareCount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface BotMessageProps extends Omit<FlexboxProps, 'id' | 'title'> {
|
|
13
|
+
id: string | number;
|
|
14
|
+
botMessageType: BotMessageType;
|
|
15
|
+
ctaType?: BotMessageCtaType | null;
|
|
16
|
+
ctaTargetTable?: string | null;
|
|
17
|
+
ctaTargetId?: number | null;
|
|
18
|
+
mine: boolean;
|
|
19
|
+
avatarUrl?: string;
|
|
20
|
+
title: string;
|
|
21
|
+
content: string;
|
|
22
|
+
unreadUserCount: number;
|
|
23
|
+
offer: object | null;
|
|
24
|
+
regDatetime: string;
|
|
25
|
+
onAction?: (botMessageType: BotMessageType, ctaType?: BotMessageCtaType | null, ctaTargetId?: number | null) => void;
|
|
26
|
+
onView?: () => void;
|
|
27
|
+
}
|
|
28
|
+
declare function BotMessage({ id, botMessageType, ctaType, ctaTargetId, mine, avatarUrl, title, content, unreadUserCount, offer, regDatetime, onAction, onView, inlineCSS, ...props }: BotMessageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default BotMessage;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as H, useEffect as M } from "react";
|
|
3
|
+
import { Flexbox as n, Typography as e, Button as E } from "@dotss/ui";
|
|
4
|
+
import F from "@dotss/ui/core/useTheme";
|
|
5
|
+
import L from "dayjs";
|
|
6
|
+
import { getClassInfo as $, getCtaButtonText as q } from "./BotMessage.utils.mjs";
|
|
7
|
+
import z from "../../Image/Image.mjs";
|
|
8
|
+
import G from "../../../hooks/useInView/useInView.mjs";
|
|
9
|
+
import S from "../../../utils/getCareTypeLabel/getCareTypeLabel.mjs";
|
|
10
|
+
function A({
|
|
11
|
+
id: J,
|
|
12
|
+
botMessageType: y,
|
|
13
|
+
ctaType: s,
|
|
14
|
+
ctaTargetId: C,
|
|
15
|
+
mine: a,
|
|
16
|
+
avatarUrl: g,
|
|
17
|
+
title: b,
|
|
18
|
+
content: p,
|
|
19
|
+
unreadUserCount: h,
|
|
20
|
+
offer: v,
|
|
21
|
+
regDatetime: T,
|
|
22
|
+
onAction: o,
|
|
23
|
+
onView: l,
|
|
24
|
+
inlineCSS: R,
|
|
25
|
+
...w
|
|
26
|
+
}) {
|
|
27
|
+
const {
|
|
28
|
+
palette: { brand: I, grey: m, background: B },
|
|
29
|
+
spacing: d
|
|
30
|
+
} = F(), f = H(null), { isInView: u } = G(f), x = q(s), i = v, j = [
|
|
31
|
+
S(i == null ? void 0 : i.firstCareType),
|
|
32
|
+
S(i == null ? void 0 : i.secondCareType)
|
|
33
|
+
].filter(Boolean).filter((k) => k !== "-").join("+"), c = $(i), D = () => o == null ? void 0 : o(y, s, C);
|
|
34
|
+
return M(() => {
|
|
35
|
+
u && (l == null || l());
|
|
36
|
+
}, [u, l]), /* @__PURE__ */ t(
|
|
37
|
+
n,
|
|
38
|
+
{
|
|
39
|
+
ref: f,
|
|
40
|
+
alignItems: "flex-end",
|
|
41
|
+
justifyContent: "flex-end",
|
|
42
|
+
gap: 1,
|
|
43
|
+
pl: 4,
|
|
44
|
+
pr: 4,
|
|
45
|
+
flexDirection: a ? "row" : "row-reverse",
|
|
46
|
+
...w,
|
|
47
|
+
inlineCSS: {
|
|
48
|
+
overflowAnchor: "none",
|
|
49
|
+
...R
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ r(e, { visuallyHidden: !0, children: "안내" }),
|
|
53
|
+
/* @__PURE__ */ t(
|
|
54
|
+
n,
|
|
55
|
+
{
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
alignItems: a ? "flex-end" : "flex-start",
|
|
58
|
+
inlineCSS: {
|
|
59
|
+
whiteSpace: "nowrap"
|
|
60
|
+
},
|
|
61
|
+
children: [
|
|
62
|
+
a && h > 0 && /* @__PURE__ */ r(
|
|
63
|
+
e,
|
|
64
|
+
{
|
|
65
|
+
tag: "span",
|
|
66
|
+
variant: "c5B",
|
|
67
|
+
"aria-hidden": !0,
|
|
68
|
+
inlineCSS: {
|
|
69
|
+
color: I.primary.text
|
|
70
|
+
},
|
|
71
|
+
children: h
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ r(
|
|
75
|
+
e,
|
|
76
|
+
{
|
|
77
|
+
tag: "span",
|
|
78
|
+
variant: "c5R",
|
|
79
|
+
color: "etc.dimmed01",
|
|
80
|
+
"aria-hidden": !0,
|
|
81
|
+
inlineCSS: {
|
|
82
|
+
whiteSpace: "nowrap"
|
|
83
|
+
},
|
|
84
|
+
children: L(T).format("A h:mm")
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ t(
|
|
91
|
+
n,
|
|
92
|
+
{
|
|
93
|
+
alignItems: "flex-start",
|
|
94
|
+
flexDirection: a ? "row-reverse" : "row",
|
|
95
|
+
gap: 3,
|
|
96
|
+
p: 4,
|
|
97
|
+
"aria-hidden": !0,
|
|
98
|
+
inlineCSS: {
|
|
99
|
+
backgroundColor: m.white,
|
|
100
|
+
borderRadius: 12,
|
|
101
|
+
border: `1px solid ${m[20]}`
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
104
|
+
g && /* @__PURE__ */ r(
|
|
105
|
+
z,
|
|
106
|
+
{
|
|
107
|
+
src: g,
|
|
108
|
+
width: 32,
|
|
109
|
+
height: 32,
|
|
110
|
+
alt: "째깍악어 선생님 심볼",
|
|
111
|
+
role: "presentation"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ t(n, { flexDirection: "column", children: [
|
|
115
|
+
/* @__PURE__ */ r(e, { tag: "p", variant: "h4B", children: b }),
|
|
116
|
+
p && /* @__PURE__ */ r(
|
|
117
|
+
e,
|
|
118
|
+
{
|
|
119
|
+
tag: "p",
|
|
120
|
+
variant: "b3R",
|
|
121
|
+
inlineCSS: {
|
|
122
|
+
marginTop: d.content(1)
|
|
123
|
+
},
|
|
124
|
+
children: p
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
c && /* @__PURE__ */ t(
|
|
128
|
+
n,
|
|
129
|
+
{
|
|
130
|
+
mt: 2,
|
|
131
|
+
p: 2,
|
|
132
|
+
flexDirection: "column",
|
|
133
|
+
inlineCSS: {
|
|
134
|
+
borderRadius: d.content(2),
|
|
135
|
+
backgroundColor: B.primary
|
|
136
|
+
},
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ t(e, { tag: "dl", children: [
|
|
139
|
+
/* @__PURE__ */ r(e, { tag: "dt", visuallyHidden: !0, children: "날짜" }),
|
|
140
|
+
/* @__PURE__ */ r(e, { tag: "dd", variant: "b4M", children: c.dateRangeText })
|
|
141
|
+
] }),
|
|
142
|
+
/* @__PURE__ */ t(e, { tag: "dl", children: [
|
|
143
|
+
/* @__PURE__ */ r(e, { tag: "dt", visuallyHidden: !0, children: "시간" }),
|
|
144
|
+
/* @__PURE__ */ r(e, { tag: "dd", variant: "b4R", color: "grey.70", children: c.timeRangeText })
|
|
145
|
+
] }),
|
|
146
|
+
/* @__PURE__ */ t(e, { tag: "dl", children: [
|
|
147
|
+
/* @__PURE__ */ r(e, { tag: "dt", visuallyHidden: !0, children: "돌봄 유형" }),
|
|
148
|
+
/* @__PURE__ */ r(e, { tag: "dd", variant: "b4R", color: "grey.70", children: j })
|
|
149
|
+
] })
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
x && /* @__PURE__ */ r(
|
|
154
|
+
E,
|
|
155
|
+
{
|
|
156
|
+
color: "secondary",
|
|
157
|
+
onClick: D,
|
|
158
|
+
inlineCSS: {
|
|
159
|
+
marginTop: d.content(2)
|
|
160
|
+
},
|
|
161
|
+
children: x
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
export {
|
|
173
|
+
A as default
|
|
174
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BotMessageCtaType, BotMessageProps } from '.';
|
|
2
|
+
export declare function getCtaButtonText(ctaType?: BotMessageCtaType | null): "" | "공고 확인하기" | "변경내용 확인하기" | "나의 지원 내역 보러가기" | "돌봄노트 확인하기" | "선생님 선택하러 가기";
|
|
3
|
+
export declare function getClassInfo(offer: object): {
|
|
4
|
+
dateRangeText: string;
|
|
5
|
+
timeRangeText: string;
|
|
6
|
+
careType: string;
|
|
7
|
+
} | null;
|
|
8
|
+
export declare function getBotMessageLabel({ title, content, offer, regDatetime }: Pick<BotMessageProps, 'title' | 'content' | 'offer' | 'regDatetime'>): string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import n from "dayjs";
|
|
2
|
+
import c from "../../../utils/getCareTypeLabel/getCareTypeLabel.mjs";
|
|
3
|
+
function u(r) {
|
|
4
|
+
switch (r) {
|
|
5
|
+
case "MY_CLASS_CHECK":
|
|
6
|
+
return "공고 확인하기";
|
|
7
|
+
case "OFFER_CHECK":
|
|
8
|
+
return "공고 확인하기";
|
|
9
|
+
case "CHANGE_INFO_CHECK":
|
|
10
|
+
return "변경내용 확인하기";
|
|
11
|
+
case "MY_APPLICATION_INFO_VIEW":
|
|
12
|
+
return "나의 지원 내역 보러가기";
|
|
13
|
+
case "CARE_NOTE_CHECK":
|
|
14
|
+
return "돌봄노트 확인하기";
|
|
15
|
+
case "TEACHER_SELECTION":
|
|
16
|
+
return "선생님 선택하러 가기";
|
|
17
|
+
default:
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function C(r) {
|
|
22
|
+
const e = r;
|
|
23
|
+
if (!e)
|
|
24
|
+
return null;
|
|
25
|
+
let a;
|
|
26
|
+
e.totalCareCount > 1 ? a = `${n(e.careStartDate).format("M월 D일(ddd)")}부터 / 총 ${e.totalCareCount}회` : a = n(e.careStartDate).format("M월 D일(ddd)");
|
|
27
|
+
const o = n(`${e.careStartDate} ${e.careStartTime}`).format(
|
|
28
|
+
"A h:mm"
|
|
29
|
+
), t = n(`${e.careStartDate} ${e.careEndTime}`).format(
|
|
30
|
+
"A h:mm"
|
|
31
|
+
);
|
|
32
|
+
return {
|
|
33
|
+
dateRangeText: a,
|
|
34
|
+
timeRangeText: `${o} ~ ${t}`,
|
|
35
|
+
careType: c(e.firstCareType)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function f({
|
|
39
|
+
title: r,
|
|
40
|
+
content: e,
|
|
41
|
+
offer: a,
|
|
42
|
+
regDatetime: o
|
|
43
|
+
}) {
|
|
44
|
+
const t = C(a);
|
|
45
|
+
return `안내, ${r}, ${e ? `${e}, ` : ""}${t ? `${t.dateRangeText}, ${t.timeRangeText}, ${t.careType}, ` : ""}${n(o).format("YYYY년 MM월 DD일 A h:mm")}`;
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
f as getBotMessageLabel,
|
|
49
|
+
C as getClassInfo,
|
|
50
|
+
u as getCtaButtonText
|
|
51
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { default as BotMessage, BotMessageCtaType, BotMessageOffer, BotMessageProps, BotMessageType } from './BotMessage';
|
|
2
|
+
export { getClassInfo, getCtaButtonText, getBotMessageLabel } from './BotMessage.utils';
|
|
3
|
+
export type { BotMessageProps, BotMessageCtaType, BotMessageType, BotMessageOffer };
|
|
4
|
+
export default BotMessage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { InlineCSS } from '@dotss/ui/typings/component';
|
|
3
|
+
import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
|
|
4
|
+
export interface InputBarProps extends ComponentPropsWithRef<'textarea'>, InlineCSS {
|
|
5
|
+
wrapperProps?: FlexboxProps;
|
|
6
|
+
onSend?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function InputBar({ wrapperProps, inlineCSS, onSend, value, ref, ...props }: InputBarProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default InputBar;
|