@hhgtech/hhg-components 1.29.140 → 1.29.141

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 (31) hide show
  1. package/build/esm/{index-09516d1e.js → index-1a587a83.js} +1 -1
  2. package/build/esm/{index-fd0222a8.js → index-41754197.js} +3 -3
  3. package/build/esm/{index-dad753fe.js → index-44c3e4f6.js} +2 -2
  4. package/build/esm/{index-66b3c380.js → index-8454652b.js} +3 -3
  5. package/build/esm/{index-7ade18ac.js → index-b72fd319.js} +6 -4
  6. package/build/esm/{index-82d4c3ee.js → index-da0010cf.js} +1 -1
  7. package/build/esm/index.js +5 -5
  8. package/build/esm/together/components/molecules/cardAuthor/index.d.ts +1 -0
  9. package/build/esm/together/components/molecules/profileChatbot/index.d.ts +2 -1
  10. package/build/esm/together/components/molecules/profileDetail/index.d.ts +1 -0
  11. package/build/esm/together.js +5 -5
  12. package/build/esm/togetherMolecules.js +4 -4
  13. package/build/esm/togetherMoleculesCardAuthor.js +1 -1
  14. package/build/esm/togetherMoleculesProfileDetail.js +2 -2
  15. package/build/esm/togetherOrganisms.js +4 -4
  16. package/build/{index-bedf58f2.js → index-5cd971f5.js} +6 -4
  17. package/build/{index-a82b886e.js → index-6bb6252d.js} +3 -3
  18. package/build/{index-7c21535a.js → index-9607e8a6.js} +1 -1
  19. package/build/{index-30478996.js → index-9d2aefe3.js} +3 -3
  20. package/build/{index-7b9ef7bc.js → index-b84dd3b2.js} +2 -2
  21. package/build/{index-a6bdab6e.js → index-bcc04dcf.js} +1 -1
  22. package/build/index.js +5 -5
  23. package/build/together/components/molecules/cardAuthor/index.d.ts +1 -0
  24. package/build/together/components/molecules/profileChatbot/index.d.ts +2 -1
  25. package/build/together/components/molecules/profileDetail/index.d.ts +1 -0
  26. package/build/together.js +5 -5
  27. package/build/togetherMolecules.js +4 -4
  28. package/build/togetherMoleculesCardAuthor.js +1 -1
  29. package/build/togetherMoleculesProfileDetail.js +2 -2
  30. package/build/togetherOrganisms.js +4 -4
  31. package/package.json +1 -1
@@ -15,7 +15,7 @@ import { M as MAX_IMAGE_UPLOADS, a as DEFAULT_AVATAR_IMG, D as DEFAULT_IMG } fro
15
15
  import { PATHS } from './togetherApiPaths.js';
16
16
  import { r as removeBannedWordWrapper, g as getMentionIdsFromString, e as encodePostContent, u as uploadAndGetSrc, y as youtubeVidIdGetter } from './post-4691b86d.js';
17
17
  import { C as CardLink } from './index-09070a12.js';
18
- import { L as Loading } from './index-7ade18ac.js';
18
+ import { L as Loading } from './index-b72fd319.js';
19
19
  import { U as UserAvatar } from './index-8e44f657.js';
20
20
  import { R as RichTextEditor } from './editor-2a6058e1.js';
21
21
  import { Portal, useMantineTheme } from '@mantine/core';
@@ -7,7 +7,7 @@ import { PATHS } from './togetherApiPaths.js';
7
7
  import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath } from './utils-2d1f55cb.js';
8
8
  import { Minus, Plus } from '@hhgtech/icons/core';
9
9
  import { Collapse } from '@mantine/core';
10
- import { C as CardAuthor } from './index-7ade18ac.js';
10
+ import { C as CardAuthor } from './index-b72fd319.js';
11
11
  import '@hhgtech/icons/other';
12
12
  import './index-9ccb14be.js';
13
13
  import './index-2583b218.js';
@@ -117,7 +117,7 @@ const TabDataInit = {
117
117
  data: {},
118
118
  };
119
119
  const ProfileChatbot = (_a) => {
120
- var { authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, showSkipQuestionTag, currentPageUrl } = _a, rest = __rest(_a, ["authorProps", "authActionWrapper", "onSkipQuestion", "onCloseFromPost", "showSkipQuestionTag", "currentPageUrl"]);
120
+ var { authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, onChatWithBot, showSkipQuestionTag, currentPageUrl } = _a, rest = __rest(_a, ["authorProps", "authActionWrapper", "onSkipQuestion", "onCloseFromPost", "onChatWithBot", "showSkipQuestionTag", "currentPageUrl"]);
121
121
  const { data: { locale, userInfo, env: { isMarryBaby }, }, } = useContext(TogetherComponentGlobalContext);
122
122
  const id = String(authorProps === null || authorProps === void 0 ? void 0 : authorProps.userId);
123
123
  const [countValues, setCountValues] = useState();
@@ -186,7 +186,7 @@ const ProfileChatbot = (_a) => {
186
186
  } },
187
187
  React__default.createElement("div", Object.assign({}, rest, { className: `${styles.container} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, "data-is-marrybaby": isMarryBaby }), loading ? (React__default.createElement(Loading, null)) : (React__default.createElement(React__default.Fragment, null,
188
188
  React__default.createElement("div", { className: styles.cardAuthorWrapper },
189
- React__default.createElement(CardAuthor, Object.assign({}, authorProps, { className: "card-author", showDetailPopup: false, showChatbotButton: true }))),
189
+ React__default.createElement(CardAuthor, Object.assign({}, authorProps, { className: "card-author", showDetailPopup: false, showChatbotButton: true, onChatWithBot: onChatWithBot }))),
190
190
  React__default.createElement("div", { className: styles.description, dangerouslySetInnerHTML: { __html: description } }),
191
191
  React__default.createElement("div", { className: styles.body },
192
192
  React__default.createElement(Tabs, Object.assign({}, tabsProps))))))));
@@ -20,7 +20,7 @@ import './utils-82cbef66.js';
20
20
  import './other-2d47fb8c.js';
21
21
  import './index-bcb84d0c.js';
22
22
  import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, b as callApiWithAuth } from './utils-2d1f55cb.js';
23
- import { u as useImagePicker, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-09516d1e.js';
23
+ import { u as useImagePicker, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-1a587a83.js';
24
24
  import styled from '@emotion/styled';
25
25
  import { B as BtnChoice } from './index-7e2513b8.js';
26
26
  import { c as formatTopic, b as formatPost } from './dataTransform-f8a336e5.js';
@@ -28,7 +28,7 @@ import { M as MAX_IMAGE_UPLOADS } from './constants-55e1e358.js';
28
28
  import { h as highlightBadWords, d as decodeMention, a as decodePostUrl } from './post-4691b86d.js';
29
29
  import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-2a6058e1.js';
30
30
  import { C as CardLink } from './index-09070a12.js';
31
- import { L as Loading } from './index-7ade18ac.js';
31
+ import { L as Loading } from './index-b72fd319.js';
32
32
  import { I as Input } from './index-afd96d6f.js';
33
33
  import debounce from 'lodash/debounce';
34
34
  import ContentEditable from 'react-contenteditable';
@@ -4,7 +4,7 @@ import { B as Button } from './index-d7d1418c.js';
4
4
  import { H as Heading } from './index-215fec77.js';
5
5
  import { u as useTranslations } from './index-52d625db.js';
6
6
  import innertext from 'innertext';
7
- import { S as SharePopup, P as PopupDanger, i as deletePost, j as IconAlertCircle, b as SubmitReportForm, k as deleteComment, l as decodeCommentBody, m as likeUnlikeComment, I as InputCommentBar, c as SocialLinkPreview, n as likeUnlikePost, g as getDefaultFailNoti } from './index-09516d1e.js';
7
+ import { S as SharePopup, P as PopupDanger, i as deletePost, j as IconAlertCircle, b as SubmitReportForm, k as deleteComment, l as decodeCommentBody, m as likeUnlikeComment, I as InputCommentBar, c as SocialLinkPreview, n as likeUnlikePost, g as getDefaultFailNoti } from './index-1a587a83.js';
8
8
  import { C as CommonGAssets } from './index-3273f46f.js';
9
9
  import { R as REPORT_REASON_MAP, D as DEFAULT_IMG } from './constants-55e1e358.js';
10
10
  import { PATHS, DISCOVER_PATHS, CARE_PATHS } from './togetherApiPaths.js';
@@ -16,8 +16,8 @@ import { M as MediaQueries } from './utils-82cbef66.js';
16
16
  import { theme } from './miscTheme.js';
17
17
  import { g as formatArticle, h as formatCategory, e as formatComment } from './dataTransform-f8a336e5.js';
18
18
  import { C as CardLink } from './index-09070a12.js';
19
- import { C as CardAuthor, L as Loading, c as ProfileDetailModal } from './index-7ade18ac.js';
20
- import { a as ProfileDetail, P as PostContent } from './index-82d4c3ee.js';
19
+ import { C as CardAuthor, L as Loading, c as ProfileDetailModal } from './index-b72fd319.js';
20
+ import { a as ProfileDetail, P as PostContent } from './index-da0010cf.js';
21
21
  import { a as PostImagePreview } from './index-243852fc.js';
22
22
  import { D as Divider } from './index-dde7c253.js';
23
23
  import './index-b9c08b71.js';
@@ -910,7 +910,7 @@ const ProfileDetailModal = ({ open, onClose, children, profileModalProps, }) =>
910
910
 
911
911
  dayjs.extend(relativeTime);
912
912
  const _CardAuthor = (props) => {
913
- const { className = '', community, name, username, url, avatar: avatarProp, role: roleProp, title, userType = 'user', expertId, specialty, organisation, isMarryBaby: isMarryBabyProp, doctorId, hospitalId, hasQuickBooking, handleMakeAppointment, communityTrackingAttr, isAnonymous, showDetailPopup, showChatbotButton = false, subLine, authActionWrapper, profileProps, profileModalProps, extendEle, avatarProps, hideInfo, timeText, onCloseFromPost, avatarIcon, badgeIconSize, hideBackground, children, styles, dataEventCategory, dataEventAction, dataEventLabel, } = props;
913
+ const { className = '', community, name, username, url, avatar: avatarProp, role: roleProp, title, userType = 'user', expertId, specialty, organisation, isMarryBaby: isMarryBabyProp, doctorId, hospitalId, hasQuickBooking, handleMakeAppointment, communityTrackingAttr, isAnonymous, showDetailPopup, showChatbotButton = false, subLine, authActionWrapper, profileProps, profileModalProps, extendEle, avatarProps, hideInfo, timeText, onCloseFromPost, onChatWithBot, avatarIcon, badgeIconSize, hideBackground, children, styles, dataEventCategory, dataEventAction, dataEventLabel, } = props;
914
914
  const { data: { locale, router, env: { isMarryBaby: isMarryBabyContext, togetherBasePath }, }, } = useContext(TogetherComponentGlobalContext);
915
915
  const { isMobile } = useScreenSize();
916
916
  const { t } = useTranslations();
@@ -958,7 +958,7 @@ const _CardAuthor = (props) => {
958
958
  useEffect(() => {
959
959
  if (open && !ProfileDetail) {
960
960
  if (userType === 'chatbot') {
961
- import('./index-fd0222a8.js').then((module) => {
961
+ import('./index-41754197.js').then((module) => {
962
962
  setProfileDetail(() => module.ProfileChatbot);
963
963
  });
964
964
  }
@@ -982,7 +982,7 @@ const _CardAuthor = (props) => {
982
982
  React__default.createElement(ProfileDetailModal, { open: open, onClose: () => setOpen(false), profileModalProps: profileModalProps }, ProfileDetail && (React__default.createElement(ProfileDetail, Object.assign({ currentPageUrl: dataEventLabel, authActionWrapper: authActionWrapper, onCloseFromPost: () => {
983
983
  setOpen(false);
984
984
  onCloseFromPost === null || onCloseFromPost === void 0 ? void 0 : onCloseFromPost();
985
- } }, profileProps, { authorProps: Object.assign({ userId: props === null || props === void 0 ? void 0 : props.userId, avatar, name: props === null || props === void 0 ? void 0 : props.name, role: props === null || props === void 0 ? void 0 : props.role, title: props === null || props === void 0 ? void 0 : props.title, doctorId,
985
+ }, onChatWithBot: onChatWithBot }, profileProps, { authorProps: Object.assign({ userId: props === null || props === void 0 ? void 0 : props.userId, avatar, name: props === null || props === void 0 ? void 0 : props.name, role: props === null || props === void 0 ? void 0 : props.role, title: props === null || props === void 0 ? void 0 : props.title, doctorId,
986
986
  hospitalId,
987
987
  hasQuickBooking, userType: userType }, profileProps === null || profileProps === void 0 ? void 0 : profileProps.authorProps) })))),
988
988
  role === 'expert' && expertId ? (React__default.createElement(PopupExpert, { isOpen: openPopupExpert, onClose: () => setOpenPopupExpert(false), expertId: expertId })) : null,
@@ -1007,7 +1007,9 @@ const _CardAuthor = (props) => {
1007
1007
  transform: 'translate(0, 2px)',
1008
1008
  } }),
1009
1009
  showChatbotButton && (React__default.createElement("div", { style: { marginTop: '8px' } },
1010
- React__default.createElement(Button$1, { color: "primary", size: "xs", variant: "filled", leftIcon: React__default.createElement(Icon.App, { size: 16 }), onClick: authActionWrapper }, "Chat with me"))))) : (React__default.createElement(AuthorBadgeItem, null)))),
1010
+ React__default.createElement(Button$1, { color: "primary", size: "xs", variant: "filled", type: "button", leftIcon: React__default.createElement(Icon.App, { size: 16 }), onClick: () => {
1011
+ onChatWithBot === null || onChatWithBot === void 0 ? void 0 : onChatWithBot();
1012
+ } }, "Chat with me"))))) : (React__default.createElement(AuthorBadgeItem, null)))),
1011
1013
  subLine || (React__default.createElement(CardAuthor$1.SubTextRow, { style: hasQuickBooking
1012
1014
  ? {
1013
1015
  position: 'relative',
@@ -10,7 +10,7 @@ import { Plus } from '@hhgtech/icons/core';
10
10
  import { createStyles, Anchor, Accordion, Flex, useMantineTheme } from '@mantine/core';
11
11
  import { C as CommonGAssets } from './index-3273f46f.js';
12
12
  import { I as ImageWrap } from './index-eb26bc06.js';
13
- import { P as PopupExpert, d as CardAuthor, C as CardAuthor$1 } from './index-7ade18ac.js';
13
+ import { P as PopupExpert, d as CardAuthor, C as CardAuthor$1 } from './index-b72fd319.js';
14
14
  import { S as SocialType } from './index-42e7ee2a.js';
15
15
  import { u as useTranslations } from './index-52d625db.js';
16
16
  import { theme } from './miscTheme.js';
@@ -80,13 +80,13 @@ export { U as UserAvatar } from './index-8e44f657.js';
80
80
  export { C as CardLink } from './index-09070a12.js';
81
81
  export { C as CardReactions, a as LabelPin, L as LabelSortPin, T as TagTopic } from './treePopoverMenu-048e4445.js';
82
82
  export { L as LabelSorting } from './labelSorting-2829dbe1.js';
83
- export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-7ade18ac.js';
84
- export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-dad753fe.js';
85
- export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-09516d1e.js';
83
+ export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-b72fd319.js';
84
+ export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-44c3e4f6.js';
85
+ export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-1a587a83.js';
86
86
  export { ShareBox } from './togetherShareBox.js';
87
- export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-82d4c3ee.js';
87
+ export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-da0010cf.js';
88
88
  export { I as ImagePreviewPopup, a as PostImagePreview, P as PostSingleImageViewPopup } from './index-243852fc.js';
89
- export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-66b3c380.js';
89
+ export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-8454652b.js';
90
90
  export { P as PopoverMenu } from './index-447f5f9b.js';
91
91
  export { D as DefaultComponentGlobalContextData, G as GlobalData, T as TogetherComponentGlobalContext, a as TogetherComponentGlobalContextProvider } from './utils-2d1f55cb.js';
92
92
  export { BookingSearchBar } from './careBookingSearchBar.js';
@@ -47,6 +47,7 @@ export interface Props extends DefaultProps<MyComponentStylesNames, HTMLAttribut
47
47
  avatarProps?: UserAvatarProps;
48
48
  avatarIcon?: ReactNode;
49
49
  onCloseFromPost?: () => void;
50
+ onChatWithBot?: () => void;
50
51
  badgeIconSize?: number;
51
52
  hideBackground?: boolean;
52
53
  children?: ReactNode;
@@ -16,6 +16,7 @@ export type ProfileDetailProps = {
16
16
  authActionWrapper?: any;
17
17
  onClose?: () => void;
18
18
  onCloseFromPost?: () => void;
19
+ onChatWithBot?: () => void;
19
20
  siteType?: SiteType;
20
21
  hideQuestionTab?: boolean;
21
22
  hideAnswerTab?: boolean;
@@ -41,5 +42,5 @@ export declare const TabDataInit: {
41
42
  contact: {};
42
43
  data: {};
43
44
  };
44
- declare const ProfileChatbot: ({ authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, showSkipQuestionTag, currentPageUrl, ...rest }: ProfileDetailProps) => React.JSX.Element;
45
+ declare const ProfileChatbot: ({ authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, onChatWithBot, showSkipQuestionTag, currentPageUrl, ...rest }: ProfileDetailProps) => React.JSX.Element;
45
46
  export { ProfileChatbot };
@@ -16,6 +16,7 @@ export type ProfileDetailProps = {
16
16
  authActionWrapper?: any;
17
17
  onClose?: () => void;
18
18
  onCloseFromPost?: () => void;
19
+ onChatWithBot?: () => void;
19
20
  siteType?: SiteType;
20
21
  hideQuestionTab?: boolean;
21
22
  hideAnswerTab?: boolean;
@@ -7,13 +7,13 @@ export { U as UserAvatar } from './index-8e44f657.js';
7
7
  export { C as CardLink } from './index-09070a12.js';
8
8
  export { C as CardReactions, a as LabelPin, L as LabelSortPin, T as TagTopic } from './treePopoverMenu-048e4445.js';
9
9
  export { L as LabelSorting } from './labelSorting-2829dbe1.js';
10
- export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-7ade18ac.js';
11
- export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-dad753fe.js';
12
- export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-09516d1e.js';
10
+ export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-b72fd319.js';
11
+ export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-44c3e4f6.js';
12
+ export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-1a587a83.js';
13
13
  export { ShareBox } from './togetherShareBox.js';
14
- export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-82d4c3ee.js';
14
+ export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-da0010cf.js';
15
15
  export { I as ImagePreviewPopup, a as PostImagePreview, P as PostSingleImageViewPopup } from './index-243852fc.js';
16
- export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-66b3c380.js';
16
+ export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-8454652b.js';
17
17
  export { P as PopoverMenu } from './index-447f5f9b.js';
18
18
  import 'react';
19
19
  import './miscCookieHelper.js';
@@ -1,8 +1,8 @@
1
- export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-7ade18ac.js';
2
- export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-dad753fe.js';
3
- export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-09516d1e.js';
1
+ export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-b72fd319.js';
2
+ export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-44c3e4f6.js';
3
+ export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-1a587a83.js';
4
4
  export { ShareBox } from './togetherShareBox.js';
5
- export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-82d4c3ee.js';
5
+ export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-da0010cf.js';
6
6
  export { I as ImagePreviewPopup, a as PostImagePreview, P as PostSingleImageViewPopup } from './index-243852fc.js';
7
7
  import 'react';
8
8
  import '@hhgtech/icons/other';
@@ -7,7 +7,7 @@ import './index-52d625db.js';
7
7
  import './utils-82cbef66.js';
8
8
  import './index-1b202b79.js';
9
9
  import './index-dcc6dde2.js';
10
- export { C as CardAuthor } from './index-7ade18ac.js';
10
+ export { C as CardAuthor } from './index-b72fd319.js';
11
11
  import './index.styles-df57874e.js';
12
12
  import './index-b9c08b71.js';
13
13
  import './index-3273f46f.js';
@@ -6,8 +6,8 @@ import './index-ccec85d6.js';
6
6
  import './dataTransform-f8a336e5.js';
7
7
  import './togetherApiPaths.js';
8
8
  import './utils-2d1f55cb.js';
9
- export { a as ProfileDetail, b as TabDataInit, T as TabName, U as UserType } from './index-82d4c3ee.js';
10
- import './index-7ade18ac.js';
9
+ export { a as ProfileDetail, b as TabDataInit, T as TabName, U as UserType } from './index-da0010cf.js';
10
+ import './index-b72fd319.js';
11
11
  import './index-52d625db.js';
12
12
  import '@hhgtech/icons/other';
13
13
  import '@mantine/core';
@@ -1,4 +1,4 @@
1
- export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-66b3c380.js';
1
+ export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-8454652b.js';
2
2
  export { P as PopoverMenu } from './index-447f5f9b.js';
3
3
  import './tslib.es6-aa7db302.js';
4
4
  import 'react';
@@ -11,7 +11,7 @@ import './other-2d47fb8c.js';
11
11
  import './index-52d625db.js';
12
12
  import './translationsContext-bc2511cd.js';
13
13
  import 'innertext';
14
- import './index-09516d1e.js';
14
+ import './index-1a587a83.js';
15
15
  import './utils-82cbef66.js';
16
16
  import 'react-dom';
17
17
  import './utils-2d1f55cb.js';
@@ -28,7 +28,7 @@ import './index-afd96d6f.js';
28
28
  import './dataTransform-f8a336e5.js';
29
29
  import './post-4691b86d.js';
30
30
  import './index-09070a12.js';
31
- import './index-7ade18ac.js';
31
+ import './index-b72fd319.js';
32
32
  import '@hhgtech/icons/other';
33
33
  import 'dayjs';
34
34
  import 'dayjs/plugin/relativeTime';
@@ -73,7 +73,7 @@ import '@mantine/dates';
73
73
  import './index-bcb84d0c.js';
74
74
  import './number-b17f387d.js';
75
75
  import 'date-fns';
76
- import './index-82d4c3ee.js';
76
+ import './index-da0010cf.js';
77
77
  import './index-ccec85d6.js';
78
78
  import './index-dde7c253.js';
79
79
  import './routing-12a24af0.js';
@@ -919,7 +919,7 @@ const ProfileDetailModal = ({ open, onClose, children, profileModalProps, }) =>
919
919
 
920
920
  dayjs__default["default"].extend(relativeTime__default["default"]);
921
921
  const _CardAuthor = (props) => {
922
- const { className = '', community, name, username, url, avatar: avatarProp, role: roleProp, title, userType = 'user', expertId, specialty, organisation, isMarryBaby: isMarryBabyProp, doctorId, hospitalId, hasQuickBooking, handleMakeAppointment, communityTrackingAttr, isAnonymous, showDetailPopup, showChatbotButton = false, subLine, authActionWrapper, profileProps, profileModalProps, extendEle, avatarProps, hideInfo, timeText, onCloseFromPost, avatarIcon, badgeIconSize, hideBackground, children, styles, dataEventCategory, dataEventAction, dataEventLabel, } = props;
922
+ const { className = '', community, name, username, url, avatar: avatarProp, role: roleProp, title, userType = 'user', expertId, specialty, organisation, isMarryBaby: isMarryBabyProp, doctorId, hospitalId, hasQuickBooking, handleMakeAppointment, communityTrackingAttr, isAnonymous, showDetailPopup, showChatbotButton = false, subLine, authActionWrapper, profileProps, profileModalProps, extendEle, avatarProps, hideInfo, timeText, onCloseFromPost, onChatWithBot, avatarIcon, badgeIconSize, hideBackground, children, styles, dataEventCategory, dataEventAction, dataEventLabel, } = props;
923
923
  const { data: { locale, router, env: { isMarryBaby: isMarryBabyContext, togetherBasePath }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
924
924
  const { isMobile } = index_styles.useScreenSize();
925
925
  const { t } = index$2.useTranslations();
@@ -967,7 +967,7 @@ const _CardAuthor = (props) => {
967
967
  React.useEffect(() => {
968
968
  if (open && !ProfileDetail) {
969
969
  if (userType === 'chatbot') {
970
- Promise.resolve().then(function () { return require('./index-a82b886e.js'); }).then((module) => {
970
+ Promise.resolve().then(function () { return require('./index-6bb6252d.js'); }).then((module) => {
971
971
  setProfileDetail(() => module.ProfileChatbot);
972
972
  });
973
973
  }
@@ -991,7 +991,7 @@ const _CardAuthor = (props) => {
991
991
  React__default["default"].createElement(ProfileDetailModal, { open: open, onClose: () => setOpen(false), profileModalProps: profileModalProps }, ProfileDetail && (React__default["default"].createElement(ProfileDetail, Object.assign({ currentPageUrl: dataEventLabel, authActionWrapper: authActionWrapper, onCloseFromPost: () => {
992
992
  setOpen(false);
993
993
  onCloseFromPost === null || onCloseFromPost === void 0 ? void 0 : onCloseFromPost();
994
- } }, profileProps, { authorProps: Object.assign({ userId: props === null || props === void 0 ? void 0 : props.userId, avatar, name: props === null || props === void 0 ? void 0 : props.name, role: props === null || props === void 0 ? void 0 : props.role, title: props === null || props === void 0 ? void 0 : props.title, doctorId,
994
+ }, onChatWithBot: onChatWithBot }, profileProps, { authorProps: Object.assign({ userId: props === null || props === void 0 ? void 0 : props.userId, avatar, name: props === null || props === void 0 ? void 0 : props.name, role: props === null || props === void 0 ? void 0 : props.role, title: props === null || props === void 0 ? void 0 : props.title, doctorId,
995
995
  hospitalId,
996
996
  hasQuickBooking, userType: userType }, profileProps === null || profileProps === void 0 ? void 0 : profileProps.authorProps) })))),
997
997
  role === 'expert' && expertId ? (React__default["default"].createElement(PopupExpert, { isOpen: openPopupExpert, onClose: () => setOpenPopupExpert(false), expertId: expertId })) : null,
@@ -1016,7 +1016,9 @@ const _CardAuthor = (props) => {
1016
1016
  transform: 'translate(0, 2px)',
1017
1017
  } }),
1018
1018
  showChatbotButton && (React__default["default"].createElement("div", { style: { marginTop: '8px' } },
1019
- React__default["default"].createElement(core.Button, { color: "primary", size: "xs", variant: "filled", leftIcon: React__default["default"].createElement(index$9.Icon.App, { size: 16 }), onClick: authActionWrapper }, "Chat with me"))))) : (React__default["default"].createElement(AuthorBadgeItem, null)))),
1019
+ React__default["default"].createElement(core.Button, { color: "primary", size: "xs", variant: "filled", type: "button", leftIcon: React__default["default"].createElement(index$9.Icon.App, { size: 16 }), onClick: () => {
1020
+ onChatWithBot === null || onChatWithBot === void 0 ? void 0 : onChatWithBot();
1021
+ } }, "Chat with me"))))) : (React__default["default"].createElement(AuthorBadgeItem, null)))),
1020
1022
  subLine || (React__default["default"].createElement(CardAuthor$1.SubTextRow, { style: hasQuickBooking
1021
1023
  ? {
1022
1024
  position: 'relative',
@@ -9,7 +9,7 @@ var togetherApiPaths = require('./togetherApiPaths.js');
9
9
  var togetherComponentGlobalContext = require('./utils-9ab67651.js');
10
10
  var core = require('@hhgtech/icons/core');
11
11
  var core$1 = require('@mantine/core');
12
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
12
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
13
13
  require('@hhgtech/icons/other');
14
14
  require('./index-72d154cf.js');
15
15
  require('./index-c08e669e.js');
@@ -123,7 +123,7 @@ const TabDataInit = {
123
123
  data: {},
124
124
  };
125
125
  const ProfileChatbot = (_a) => {
126
- var { authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, showSkipQuestionTag, currentPageUrl } = _a, rest = tslib_es6.__rest(_a, ["authorProps", "authActionWrapper", "onSkipQuestion", "onCloseFromPost", "showSkipQuestionTag", "currentPageUrl"]);
126
+ var { authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, onChatWithBot, showSkipQuestionTag, currentPageUrl } = _a, rest = tslib_es6.__rest(_a, ["authorProps", "authActionWrapper", "onSkipQuestion", "onCloseFromPost", "onChatWithBot", "showSkipQuestionTag", "currentPageUrl"]);
127
127
  const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
128
128
  const id = String(authorProps === null || authorProps === void 0 ? void 0 : authorProps.userId);
129
129
  const [countValues, setCountValues] = React.useState();
@@ -192,7 +192,7 @@ const ProfileChatbot = (_a) => {
192
192
  } },
193
193
  React__default["default"].createElement("div", Object.assign({}, rest, { className: `${styles.container} ${(rest === null || rest === void 0 ? void 0 : rest.className) || ''}`, "data-is-marrybaby": isMarryBaby }), loading ? (React__default["default"].createElement(index.Loading, null)) : (React__default["default"].createElement(React__default["default"].Fragment, null,
194
194
  React__default["default"].createElement("div", { className: styles.cardAuthorWrapper },
195
- React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor, Object.assign({}, authorProps, { className: "card-author", showDetailPopup: false, showChatbotButton: true }))),
195
+ React__default["default"].createElement(togetherMoleculesCardAuthor.CardAuthor, Object.assign({}, authorProps, { className: "card-author", showDetailPopup: false, showChatbotButton: true, onChatWithBot: onChatWithBot }))),
196
196
  React__default["default"].createElement("div", { className: styles.description, dangerouslySetInnerHTML: { __html: description } }),
197
197
  React__default["default"].createElement("div", { className: styles.body },
198
198
  React__default["default"].createElement(index$1.Tabs, Object.assign({}, tabsProps))))))));
@@ -17,7 +17,7 @@ var constants = require('./constants-f9938fdb.js');
17
17
  var togetherApiPaths = require('./togetherApiPaths.js');
18
18
  var post = require('./post-a2d5ada6.js');
19
19
  var index$7 = require('./index-fc9ccd9b.js');
20
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
20
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
21
21
  var index$5 = require('./index-cf3b58cb.js');
22
22
  var togetherRichTextEditor = require('./editor-44c3ee81.js');
23
23
  var core = require('@mantine/core');
@@ -6,7 +6,7 @@ var index$6 = require('./index-9039a480.js');
6
6
  var index$3 = require('./index-f266c756.js');
7
7
  var index = require('./index-49c71507.js');
8
8
  var innertext = require('innertext');
9
- var index$1 = require('./index-7c21535a.js');
9
+ var index$1 = require('./index-9607e8a6.js');
10
10
  var index$2 = require('./index-4f3cd503.js');
11
11
  var constants = require('./constants-f9938fdb.js');
12
12
  var togetherApiPaths = require('./togetherApiPaths.js');
@@ -18,8 +18,8 @@ var utils = require('./utils-0ee12d08.js');
18
18
  var miscTheme = require('./miscTheme.js');
19
19
  var dataTransform = require('./dataTransform-1e2db547.js');
20
20
  var index$8 = require('./index-fc9ccd9b.js');
21
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
22
- var togetherMoleculesProfileDetail = require('./index-a6bdab6e.js');
21
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
22
+ var togetherMoleculesProfileDetail = require('./index-bcc04dcf.js');
23
23
  var togetherMoleculesPostImagePreview = require('./index-ba3de425.js');
24
24
  var index$7 = require('./index-09a8b2ef.js');
25
25
  require('./index-24bf5ed7.js');
@@ -22,7 +22,7 @@ require('./utils-0ee12d08.js');
22
22
  require('./other-1a58e150.js');
23
23
  require('./index-6a9cf2fb.js');
24
24
  var togetherComponentGlobalContext = require('./utils-9ab67651.js');
25
- var index$1 = require('./index-7c21535a.js');
25
+ var index$1 = require('./index-9607e8a6.js');
26
26
  var styled = require('@emotion/styled');
27
27
  var index$5 = require('./index-b3e2a9f4.js');
28
28
  var dataTransform = require('./dataTransform-1e2db547.js');
@@ -30,7 +30,7 @@ var constants = require('./constants-f9938fdb.js');
30
30
  var post = require('./post-a2d5ada6.js');
31
31
  var togetherRichTextEditor = require('./editor-44c3ee81.js');
32
32
  var index$3 = require('./index-fc9ccd9b.js');
33
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
33
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
34
34
  var index$4 = require('./index-861dd70a.js');
35
35
  var debounce = require('lodash/debounce');
36
36
  var ContentEditable = require('react-contenteditable');
@@ -12,7 +12,7 @@ var core$1 = require('@hhgtech/icons/core');
12
12
  var core = require('@mantine/core');
13
13
  var index$2 = require('./index-4f3cd503.js');
14
14
  var index$1 = require('./index-74248f8f.js');
15
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
15
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
16
16
  var index$3 = require('./index-3097fe78.js');
17
17
  var index = require('./index-49c71507.js');
18
18
  var miscTheme = require('./miscTheme.js');
package/build/index.js CHANGED
@@ -84,13 +84,13 @@ var index$F = require('./index-cf3b58cb.js');
84
84
  var index$G = require('./index-fc9ccd9b.js');
85
85
  var treePopoverMenu = require('./treePopoverMenu-f1b0d759.js');
86
86
  var labelSorting = require('./labelSorting-3b0fb87d.js');
87
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
88
- var index$H = require('./index-7b9ef7bc.js');
89
- var index$I = require('./index-7c21535a.js');
87
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
88
+ var index$H = require('./index-b84dd3b2.js');
89
+ var index$I = require('./index-9607e8a6.js');
90
90
  var togetherShareBox = require('./togetherShareBox.js');
91
- var togetherMoleculesProfileDetail = require('./index-a6bdab6e.js');
91
+ var togetherMoleculesProfileDetail = require('./index-bcc04dcf.js');
92
92
  var togetherMoleculesPostImagePreview = require('./index-ba3de425.js');
93
- var index$J = require('./index-30478996.js');
93
+ var index$J = require('./index-9d2aefe3.js');
94
94
  var index$K = require('./index-3a2947f1.js');
95
95
  var togetherComponentGlobalContext = require('./utils-9ab67651.js');
96
96
  var careBookingSearchBar = require('./careBookingSearchBar.js');
@@ -47,6 +47,7 @@ export interface Props extends DefaultProps<MyComponentStylesNames, HTMLAttribut
47
47
  avatarProps?: UserAvatarProps;
48
48
  avatarIcon?: ReactNode;
49
49
  onCloseFromPost?: () => void;
50
+ onChatWithBot?: () => void;
50
51
  badgeIconSize?: number;
51
52
  hideBackground?: boolean;
52
53
  children?: ReactNode;
@@ -16,6 +16,7 @@ export type ProfileDetailProps = {
16
16
  authActionWrapper?: any;
17
17
  onClose?: () => void;
18
18
  onCloseFromPost?: () => void;
19
+ onChatWithBot?: () => void;
19
20
  siteType?: SiteType;
20
21
  hideQuestionTab?: boolean;
21
22
  hideAnswerTab?: boolean;
@@ -41,5 +42,5 @@ export declare const TabDataInit: {
41
42
  contact: {};
42
43
  data: {};
43
44
  };
44
- declare const ProfileChatbot: ({ authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, showSkipQuestionTag, currentPageUrl, ...rest }: ProfileDetailProps) => React.JSX.Element;
45
+ declare const ProfileChatbot: ({ authorProps, authActionWrapper, onSkipQuestion, onCloseFromPost, onChatWithBot, showSkipQuestionTag, currentPageUrl, ...rest }: ProfileDetailProps) => React.JSX.Element;
45
46
  export { ProfileChatbot };
@@ -16,6 +16,7 @@ export type ProfileDetailProps = {
16
16
  authActionWrapper?: any;
17
17
  onClose?: () => void;
18
18
  onCloseFromPost?: () => void;
19
+ onChatWithBot?: () => void;
19
20
  siteType?: SiteType;
20
21
  hideQuestionTab?: boolean;
21
22
  hideAnswerTab?: boolean;
package/build/together.js CHANGED
@@ -11,13 +11,13 @@ var index = require('./index-cf3b58cb.js');
11
11
  var index$1 = require('./index-fc9ccd9b.js');
12
12
  var treePopoverMenu = require('./treePopoverMenu-f1b0d759.js');
13
13
  var labelSorting = require('./labelSorting-3b0fb87d.js');
14
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
15
- var index$2 = require('./index-7b9ef7bc.js');
16
- var index$3 = require('./index-7c21535a.js');
14
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
15
+ var index$2 = require('./index-b84dd3b2.js');
16
+ var index$3 = require('./index-9607e8a6.js');
17
17
  var togetherShareBox = require('./togetherShareBox.js');
18
- var togetherMoleculesProfileDetail = require('./index-a6bdab6e.js');
18
+ var togetherMoleculesProfileDetail = require('./index-bcc04dcf.js');
19
19
  var togetherMoleculesPostImagePreview = require('./index-ba3de425.js');
20
- var index$4 = require('./index-30478996.js');
20
+ var index$4 = require('./index-9d2aefe3.js');
21
21
  var index$5 = require('./index-3a2947f1.js');
22
22
  require('react');
23
23
  require('./miscCookieHelper.js');
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
6
- var index = require('./index-7b9ef7bc.js');
7
- var index$1 = require('./index-7c21535a.js');
5
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
6
+ var index = require('./index-b84dd3b2.js');
7
+ var index$1 = require('./index-9607e8a6.js');
8
8
  var togetherShareBox = require('./togetherShareBox.js');
9
- var togetherMoleculesProfileDetail = require('./index-a6bdab6e.js');
9
+ var togetherMoleculesProfileDetail = require('./index-bcc04dcf.js');
10
10
  var togetherMoleculesPostImagePreview = require('./index-ba3de425.js');
11
11
  require('react');
12
12
  require('@hhgtech/icons/other');
@@ -11,7 +11,7 @@ require('./index-49c71507.js');
11
11
  require('./utils-0ee12d08.js');
12
12
  require('./index-38a75ddd.js');
13
13
  require('./index-fe08f1d7.js');
14
- var togetherMoleculesCardAuthor = require('./index-bedf58f2.js');
14
+ var togetherMoleculesCardAuthor = require('./index-5cd971f5.js');
15
15
  require('./index.styles-3a583c4f.js');
16
16
  require('./index-24bf5ed7.js');
17
17
  require('./index-4f3cd503.js');
@@ -10,8 +10,8 @@ require('./index-821525db.js');
10
10
  require('./dataTransform-1e2db547.js');
11
11
  require('./togetherApiPaths.js');
12
12
  require('./utils-9ab67651.js');
13
- var togetherMoleculesProfileDetail = require('./index-a6bdab6e.js');
14
- require('./index-bedf58f2.js');
13
+ var togetherMoleculesProfileDetail = require('./index-bcc04dcf.js');
14
+ require('./index-5cd971f5.js');
15
15
  require('./index-49c71507.js');
16
16
  require('@hhgtech/icons/other');
17
17
  require('@mantine/core');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-30478996.js');
5
+ var index = require('./index-9d2aefe3.js');
6
6
  var index$1 = require('./index-3a2947f1.js');
7
7
  require('./tslib.es6-231e4bfd.js');
8
8
  require('react');
@@ -15,7 +15,7 @@ require('./other-1a58e150.js');
15
15
  require('./index-49c71507.js');
16
16
  require('./translationsContext-f401a607.js');
17
17
  require('innertext');
18
- require('./index-7c21535a.js');
18
+ require('./index-9607e8a6.js');
19
19
  require('./utils-0ee12d08.js');
20
20
  require('react-dom');
21
21
  require('./utils-9ab67651.js');
@@ -32,7 +32,7 @@ require('./index-861dd70a.js');
32
32
  require('./dataTransform-1e2db547.js');
33
33
  require('./post-a2d5ada6.js');
34
34
  require('./index-fc9ccd9b.js');
35
- require('./index-bedf58f2.js');
35
+ require('./index-5cd971f5.js');
36
36
  require('@hhgtech/icons/other');
37
37
  require('dayjs');
38
38
  require('dayjs/plugin/relativeTime');
@@ -77,7 +77,7 @@ require('@mantine/dates');
77
77
  require('./index-6a9cf2fb.js');
78
78
  require('./number-9c456d84.js');
79
79
  require('date-fns');
80
- require('./index-a6bdab6e.js');
80
+ require('./index-bcc04dcf.js');
81
81
  require('./index-821525db.js');
82
82
  require('./index-09a8b2ef.js');
83
83
  require('./routing-b678614d.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.29.140",
3
+ "version": "1.29.141",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [