@hhgtech/hhg-components 1.29.150 → 1.29.152

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 (51) hide show
  1. package/build/components.js +4 -4
  2. package/build/esm/components.js +4 -4
  3. package/build/esm/{index-5de23477.js → index-11dcba8a.js} +1 -1
  4. package/build/esm/{index-d2d2b1fc.js → index-19f44a29.js} +1 -1
  5. package/build/esm/{index-a79d730a.js → index-1b27d30b.js} +1 -1
  6. package/build/esm/{index-58b26bdf.js → index-27314aa3.js} +2 -2
  7. package/build/esm/{index-57846281.js → index-4f8051a2.js} +1 -1
  8. package/build/esm/{index-c83edb81.js → index-a4e2c8b2.js} +1 -1
  9. package/build/esm/{index-c12b2be7.js → index-bf6970f2.js} +1 -1
  10. package/build/esm/{index-3c78451c.js → index-d0853789.js} +3 -3
  11. package/build/esm/{index-e6d6dd54.js → index-f3d65ed2.js} +1 -1
  12. package/build/esm/index.js +9 -9
  13. package/build/esm/molecules.js +2 -2
  14. package/build/esm/navigation.js +2 -2
  15. package/build/esm/organisms.js +3 -3
  16. package/build/esm/ssoV2/ssoStateManager/store.d.ts +4 -1
  17. package/build/esm/ssoV2.js +8 -32
  18. package/build/esm/{store-626f70d4.js → store-18a9c261.js} +59 -15
  19. package/build/esm/subot.js +1 -1
  20. package/build/esm/surveyOrPremiumBanner.js +2 -2
  21. package/build/esm/together.js +6 -6
  22. package/build/esm/togetherMolecules.js +5 -5
  23. package/build/esm/togetherMoleculesCardAuthor.js +1 -1
  24. package/build/esm/togetherMoleculesProfileDetail.js +3 -3
  25. package/build/esm/togetherOrganisms.js +5 -5
  26. package/build/esm/useTogetherAuthRequiredAction.js +1 -1
  27. package/build/{index-6ff0b7c4.js → index-0b78fe6a.js} +1 -1
  28. package/build/{index-c138fae6.js → index-31a05fa1.js} +1 -1
  29. package/build/{index-44856d71.js → index-52478e6d.js} +1 -1
  30. package/build/{index-e046a371.js → index-57c5e1e2.js} +2 -2
  31. package/build/{index-7b6498f6.js → index-658ff430.js} +1 -1
  32. package/build/{index-abe34363.js → index-6bbae2fb.js} +1 -1
  33. package/build/{index-91a7c7a8.js → index-9cf87269.js} +1 -1
  34. package/build/{index-79b8cb46.js → index-c91fb265.js} +3 -3
  35. package/build/{index-b7965ae4.js → index-e263c762.js} +1 -1
  36. package/build/index.js +9 -9
  37. package/build/molecules.js +2 -2
  38. package/build/navigation.js +2 -2
  39. package/build/organisms.js +3 -3
  40. package/build/ssoV2/ssoStateManager/store.d.ts +4 -1
  41. package/build/ssoV2.js +7 -31
  42. package/build/{store-501f23d2.js → store-96fa1972.js} +59 -14
  43. package/build/subot.js +1 -1
  44. package/build/surveyOrPremiumBanner.js +2 -2
  45. package/build/together.js +6 -6
  46. package/build/togetherMolecules.js +5 -5
  47. package/build/togetherMoleculesCardAuthor.js +1 -1
  48. package/build/togetherMoleculesProfileDetail.js +3 -3
  49. package/build/togetherOrganisms.js +5 -5
  50. package/build/useTogetherAuthRequiredAction.js +1 -1
  51. package/package.json +1 -1
@@ -55,9 +55,9 @@ var index$v = require('./index-bcffcc04.js');
55
55
  var index$w = require('./index-b0e283b1.js');
56
56
  var index$x = require('./index-516cf54b.js');
57
57
  var index$y = require('./index-991243b4.js');
58
- var surveyOrPremiumBanner = require('./index-abe34363.js');
59
- var index$z = require('./index-7b6498f6.js');
60
- var index$A = require('./index-b7965ae4.js');
58
+ var surveyOrPremiumBanner = require('./index-6bbae2fb.js');
59
+ var index$z = require('./index-658ff430.js');
60
+ var index$A = require('./index-e263c762.js');
61
61
  var index$B = require('./index-cecbcd58.js');
62
62
  var navigationLogoutPopup = require('./navigationLogoutPopup.js');
63
63
  var navigationProfileButton = require('./index-8f176112.js');
@@ -141,7 +141,7 @@ require('./index-5dfe1929.js');
141
141
  require('./constants-ba3c316c.js');
142
142
  require('./dataTransform-e26d3567.js');
143
143
  require('./utils-9a3533f4.js');
144
- require('./store-501f23d2.js');
144
+ require('./store-96fa1972.js');
145
145
  require('zustand');
146
146
  require('./index-fac53e14.js');
147
147
  require('lodash/flatten');
@@ -51,9 +51,9 @@ export { P as PWGForm } from './index-90ad56b1.js';
51
51
  export { L as LanguageSwitcher } from './index-0f5393e9.js';
52
52
  export { P as PillCarousel } from './index-85c2bfdb.js';
53
53
  export { A as AddressInput } from './index-68483f2e.js';
54
- export { a as MAPPING_CATEGORY_PREMIUM_API_TYPE, M as MAPPING_CATEGORY_PREMIUM_TYPE, b as SideBannerModal, S as SurveyOrPremiumBanner } from './index-c12b2be7.js';
55
- export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-c83edb81.js';
56
- export { U as UserProfileNavigation, N as UserProfileNavigationHeader, a as UserProfileNavigationStats } from './index-e6d6dd54.js';
54
+ export { a as MAPPING_CATEGORY_PREMIUM_API_TYPE, M as MAPPING_CATEGORY_PREMIUM_TYPE, b as SideBannerModal, S as SurveyOrPremiumBanner } from './index-bf6970f2.js';
55
+ export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-a4e2c8b2.js';
56
+ export { U as UserProfileNavigation, N as UserProfileNavigationHeader, a as UserProfileNavigationStats } from './index-f3d65ed2.js';
57
57
  export { F as Footer } from './index-f0a718ae.js';
58
58
  export { NavigationLogoutPopup } from './navigationLogoutPopup.js';
59
59
  export { N as NavigationProfileButton } from './index-09f39a7f.js';
@@ -137,7 +137,7 @@ import './index-68d3eebd.js';
137
137
  import './constants-12116270.js';
138
138
  import './dataTransform-7c53fc27.js';
139
139
  import './utils-c204f794.js';
140
- import './store-626f70d4.js';
140
+ import './store-18a9c261.js';
141
141
  import 'zustand';
142
142
  import './index-0da33b55.js';
143
143
  import 'lodash/flatten';
@@ -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-d70c9403.js';
17
17
  import { C as CardLink } from './index-73303d7d.js';
18
- import { L as Loading } from './index-a79d730a.js';
18
+ import { L as Loading } from './index-1b27d30b.js';
19
19
  import { U as UserAvatar } from './index-1861cd41.js';
20
20
  import { R as RichTextEditor } from './editor-7221d317.js';
21
21
  import { Portal, useMantineTheme } from '@mantine/core';
@@ -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-83e3bac0.js';
12
12
  import { I as ImageWrap } from './index-65afe55a.js';
13
- import { P as PopupExpert, d as CardAuthor, C as CardAuthor$1 } from './index-a79d730a.js';
13
+ import { P as PopupExpert, d as CardAuthor, C as CardAuthor$1 } from './index-1b27d30b.js';
14
14
  import { S as SocialType } from './index-d7e10fea.js';
15
15
  import { u as useTranslations } from './index-dbfdecc6.js';
16
16
  import { theme } from './miscTheme.js';
@@ -958,7 +958,7 @@ const _CardAuthor = (props) => {
958
958
  useEffect(() => {
959
959
  if (open && !ProfileDetail) {
960
960
  if (userType === 'chatbot') {
961
- import('./index-57846281.js').then((module) => {
961
+ import('./index-4f8051a2.js').then((module) => {
962
962
  setProfileDetail(() => module.ProfileChatbot);
963
963
  });
964
964
  }
@@ -20,7 +20,7 @@ import './utils-b79a7ddf.js';
20
20
  import './other-68bb97c7.js';
21
21
  import './index-5263905a.js';
22
22
  import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath, b as callApiWithAuth } from './utils-de9524a4.js';
23
- import { u as useImagePicker, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-5de23477.js';
23
+ import { u as useImagePicker, d as IconCloseCircle, g as getDefaultFailNoti, e as getPostFormData, f as editPost, h as createPost } from './index-11dcba8a.js';
24
24
  import styled from '@emotion/styled';
25
25
  import { B as BtnChoice } from './index-31c197f1.js';
26
26
  import { c as formatTopic, b as formatPost } from './dataTransform-7c53fc27.js';
@@ -28,7 +28,7 @@ import { M as MAX_IMAGE_UPLOADS } from './constants-d10c55bf.js';
28
28
  import { h as highlightBadWords, d as decodeMention, a as decodePostUrl } from './post-d70c9403.js';
29
29
  import { S as StyledCreatePostDescription, R as RichTextEditor } from './editor-7221d317.js';
30
30
  import { C as CardLink } from './index-73303d7d.js';
31
- import { L as Loading } from './index-a79d730a.js';
31
+ import { L as Loading } from './index-1b27d30b.js';
32
32
  import { I as Input } from './index-e20876f4.js';
33
33
  import debounce from 'lodash/debounce';
34
34
  import ContentEditable from 'react-contenteditable';
@@ -8,7 +8,7 @@ import { PATHS } from './togetherApiPaths.js';
8
8
  import { T as TogetherComponentGlobalContext, c as callApi, d as getApiPath } from './utils-de9524a4.js';
9
9
  import { Minus, Plus } from '@hhgtech/icons/core';
10
10
  import { Collapse } from '@mantine/core';
11
- import { C as CardAuthor } from './index-a79d730a.js';
11
+ import { C as CardAuthor } from './index-1b27d30b.js';
12
12
  import { L as LOCALE } from './Locale-1d47037e.js';
13
13
  import '@hhgtech/icons/other';
14
14
  import './index-c6d0d4e3.js';
@@ -40,7 +40,7 @@ import { U as UserAvatar } from './index-1861cd41.js';
40
40
  import { ArrowRight } from '@hhgtech/icons/other';
41
41
  import formatString from 'string-format';
42
42
  import { C as Container } from './index-72fd8d69.js';
43
- import { u as useSSOV2Store } from './store-626f70d4.js';
43
+ import { u as useSSOV2Store } from './store-18a9c261.js';
44
44
  import { L as LOCALE } from './Locale-1d47037e.js';
45
45
  import debounce from 'lodash/debounce';
46
46
  import { g as getDataWithCache } from './core-733a7b61.js';
@@ -5,7 +5,7 @@ import { b as callApiWithAuth, d as getApiPath, T as TogetherComponentGlobalCont
5
5
  import { G as GA_TOKEN_COOKIE } from './index-ac1446eb.js';
6
6
  import { RISK_SCREENER_NAME, RISK_SCREENER_SLUG } from './constantsRiskScreener.js';
7
7
  import { _ as __rest, a as __awaiter } from './tslib.es6-ef20411b.js';
8
- import { u as useSSOV2Store } from './store-626f70d4.js';
8
+ import { u as useSSOV2Store } from './store-18a9c261.js';
9
9
  import { I as ImageWrap } from './index-65afe55a.js';
10
10
  import { g as getCurrentBaseUrl, a as getCurrentSsoUrl } from './normalizeLink-688c6b8d.js';
11
11
  import { u as useTranslations } from './index-dbfdecc6.js';
@@ -4,7 +4,7 @@ import { B as Button } from './index-8d56be31.js';
4
4
  import { H as Heading } from './index-38a4a6b2.js';
5
5
  import { u as useTranslations } from './index-dbfdecc6.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-5de23477.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-11dcba8a.js';
8
8
  import { C as CommonGAssets } from './index-83e3bac0.js';
9
9
  import { R as REPORT_REASON_MAP, D as DEFAULT_IMG } from './constants-d10c55bf.js';
10
10
  import { PATHS, DISCOVER_PATHS, CARE_PATHS } from './togetherApiPaths.js';
@@ -16,8 +16,8 @@ import { M as MediaQueries } from './utils-b79a7ddf.js';
16
16
  import { theme } from './miscTheme.js';
17
17
  import { g as formatArticle, h as formatCategory, e as formatComment } from './dataTransform-7c53fc27.js';
18
18
  import { C as CardLink } from './index-73303d7d.js';
19
- import { C as CardAuthor, L as Loading, c as ProfileDetailModal } from './index-a79d730a.js';
20
- import { a as ProfileDetail, P as PostContent } from './index-d2d2b1fc.js';
19
+ import { C as CardAuthor, L as Loading, c as ProfileDetailModal } from './index-1b27d30b.js';
20
+ import { a as ProfileDetail, P as PostContent } from './index-19f44a29.js';
21
21
  import { a as PostImagePreview } from './index-b2b7deb5.js';
22
22
  import { D as Divider } from './index-0c2f3879.js';
23
23
  import './index-ac1446eb.js';
@@ -5,7 +5,7 @@ import { C as CommonGAssets } from './index-83e3bac0.js';
5
5
  import { e as normalizeLinkSlash, n as normalizeLink } from './normalizeLink-688c6b8d.js';
6
6
  import { theme } from './miscTheme.js';
7
7
  import { A as Avatar } from './index-1a3eacd9.js';
8
- import { b as getTogetherUserPostsApiPath } from './index-c83edb81.js';
8
+ import { b as getTogetherUserPostsApiPath } from './index-a4e2c8b2.js';
9
9
  import { B as Button } from './index-8d56be31.js';
10
10
 
11
11
  const INTERNAL_CARD_URLS = {
@@ -58,9 +58,9 @@ export { P as PWGForm } from './index-90ad56b1.js';
58
58
  export { L as LanguageSwitcher } from './index-0f5393e9.js';
59
59
  export { P as PillCarousel } from './index-85c2bfdb.js';
60
60
  export { A as AddressInput } from './index-68483f2e.js';
61
- export { a as MAPPING_CATEGORY_PREMIUM_API_TYPE, M as MAPPING_CATEGORY_PREMIUM_TYPE, b as SideBannerModal, S as SurveyOrPremiumBanner } from './index-c12b2be7.js';
62
- export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-c83edb81.js';
63
- export { U as UserProfileNavigation, N as UserProfileNavigationHeader, a as UserProfileNavigationStats } from './index-e6d6dd54.js';
61
+ export { a as MAPPING_CATEGORY_PREMIUM_API_TYPE, M as MAPPING_CATEGORY_PREMIUM_TYPE, b as SideBannerModal, S as SurveyOrPremiumBanner } from './index-bf6970f2.js';
62
+ export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-a4e2c8b2.js';
63
+ export { U as UserProfileNavigation, N as UserProfileNavigationHeader, a as UserProfileNavigationStats } from './index-f3d65ed2.js';
64
64
  export { F as Footer } from './index-f0a718ae.js';
65
65
  export { NavigationLogoutPopup } from './navigationLogoutPopup.js';
66
66
  export { N as NavigationProfileButton } from './index-09f39a7f.js';
@@ -80,13 +80,13 @@ export { U as UserAvatar } from './index-1861cd41.js';
80
80
  export { C as CardLink } from './index-73303d7d.js';
81
81
  export { C as CardReactions, a as LabelPin, L as LabelSortPin, T as TagTopic } from './treePopoverMenu-2edaacb7.js';
82
82
  export { L as LabelSorting } from './labelSorting-c24d2623.js';
83
- export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-a79d730a.js';
84
- export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-58b26bdf.js';
85
- export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-5de23477.js';
83
+ export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-1b27d30b.js';
84
+ export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-27314aa3.js';
85
+ export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-11dcba8a.js';
86
86
  export { ShareBox } from './togetherShareBox.js';
87
- export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-d2d2b1fc.js';
87
+ export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-19f44a29.js';
88
88
  export { I as ImagePreviewPopup, a as PostImagePreview, P as PostSingleImageViewPopup } from './index-b2b7deb5.js';
89
- export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-3c78451c.js';
89
+ export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-d0853789.js';
90
90
  export { P as PopoverMenu } from './index-41660a3a.js';
91
91
  export { D as DefaultComponentGlobalContextData, G as GlobalData, T as TogetherComponentGlobalContext, a as TogetherComponentGlobalContextProvider } from './utils-de9524a4.js';
92
92
  export { BookingSearchBar } from './careBookingSearchBar.js';
@@ -156,7 +156,7 @@ import './embeddedHeathToolCards_helpers.js';
156
156
  import './index-68d3eebd.js';
157
157
  import './constants-12116270.js';
158
158
  import './utils-c204f794.js';
159
- import './store-626f70d4.js';
159
+ import './store-18a9c261.js';
160
160
  import 'zustand';
161
161
  import './togetherApiPaths.js';
162
162
  import './index-0da33b55.js';
@@ -28,7 +28,7 @@ export { P as PWGForm } from './index-90ad56b1.js';
28
28
  export { L as LanguageSwitcher } from './index-0f5393e9.js';
29
29
  export { P as PillCarousel } from './index-85c2bfdb.js';
30
30
  export { A as AddressInput } from './index-68483f2e.js';
31
- export { a as MAPPING_CATEGORY_PREMIUM_API_TYPE, M as MAPPING_CATEGORY_PREMIUM_TYPE, b as SideBannerModal, S as SurveyOrPremiumBanner } from './index-c12b2be7.js';
31
+ export { a as MAPPING_CATEGORY_PREMIUM_API_TYPE, M as MAPPING_CATEGORY_PREMIUM_TYPE, b as SideBannerModal, S as SurveyOrPremiumBanner } from './index-bf6970f2.js';
32
32
  export { S as SurveyQuestionCard, a as SurveyThankyouCard } from './surveyThankyouCard-970e0a36.js';
33
33
  import 'react';
34
34
  import '@hhgtech/icons/other';
@@ -116,7 +116,7 @@ import './miscCookieHelper.js';
116
116
  import 'slugify';
117
117
  import 'string-format';
118
118
  import './togetherApiPaths.js';
119
- import './store-626f70d4.js';
119
+ import './store-18a9c261.js';
120
120
  import 'zustand';
121
121
  import './index-8d33b43d.js';
122
122
  import './Spinner-7451b6e5.js';
@@ -1,4 +1,4 @@
1
- export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-c83edb81.js';
1
+ export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-a4e2c8b2.js';
2
2
  import './tslib.es6-ef20411b.js';
3
3
  import 'react';
4
4
  import './index-0f5393e9.js';
@@ -63,7 +63,7 @@ import './useIsInit-0c488a48.js';
63
63
  import 'dayjs/plugin/relativeTime';
64
64
  import './index-1861cd41.js';
65
65
  import './index-72fd8d69.js';
66
- import './store-626f70d4.js';
66
+ import './store-18a9c261.js';
67
67
  import 'zustand';
68
68
  import 'lodash/debounce';
69
69
  import './core-733a7b61.js';
@@ -1,5 +1,5 @@
1
- export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-c83edb81.js';
2
- export { U as UserProfileNavigation, N as UserProfileNavigationHeader, a as UserProfileNavigationStats } from './index-e6d6dd54.js';
1
+ export { N as NavigationV2, g as getNavMenuContent, a as getNavMenuContentWithCache } from './index-a4e2c8b2.js';
2
+ export { U as UserProfileNavigation, N as UserProfileNavigationHeader, a as UserProfileNavigationStats } from './index-f3d65ed2.js';
3
3
  export { F as Footer } from './index-f0a718ae.js';
4
4
  export { NavigationLogoutPopup } from './navigationLogoutPopup.js';
5
5
  export { N as NavigationProfileButton } from './index-09f39a7f.js';
@@ -61,7 +61,7 @@ import './miscDefaultClassWrapper.js';
61
61
  import 'dayjs/plugin/relativeTime';
62
62
  import './index-1861cd41.js';
63
63
  import './index-72fd8d69.js';
64
- import './store-626f70d4.js';
64
+ import './store-18a9c261.js';
65
65
  import 'zustand';
66
66
  import 'lodash/debounce';
67
67
  import './core-733a7b61.js';
@@ -21,6 +21,9 @@ export type SSOV2StoreType = {
21
21
  source?: string;
22
22
  returnUrl?: string;
23
23
  }) => void;
24
- overrideClose?: () => Promise<boolean>;
24
+ overrideClose?: () => void;
25
+ onCloseProp?: () => void;
26
+ setOnCloseProp: (onClose: () => void) => void;
25
27
  };
26
28
  export declare const useSSOV2Store: import("zustand").UseBoundStore<import("zustand").StoreApi<SSOV2StoreType>>;
29
+ export declare const redirect: (returnUrl?: string, source?: string) => void;
@@ -21,8 +21,8 @@ import './other-68bb97c7.js';
21
21
  import './index-5263905a.js';
22
22
  import { L as LOCALE } from './Locale-1d47037e.js';
23
23
  import './translationsContext-90c02030.js';
24
- import { a as useSSOSteps, f as fetchSSOV2Api, w as websiteId, S as SSO_V2_PATHS, c as checkUserExist, b as SSOStepTypeType, d as allAvailableAreaCodes, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, e as updateUserInfo, r as resetPassword, u as useSSOV2Store } from './store-626f70d4.js';
25
- export { u as useSSOV2Store } from './store-626f70d4.js';
24
+ import { a as useSSOSteps, f as fetchSSOV2Api, w as websiteId, S as SSO_V2_PATHS, c as checkUserExist, b as SSOStepTypeType, d as allAvailableAreaCodes, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, e as updateUserInfo, r as resetPassword, u as useSSOV2Store, i as redirect } from './store-18a9c261.js';
25
+ export { u as useSSOV2Store } from './store-18a9c261.js';
26
26
  import { G as Google, F as Facebook } from './Google-518b81f0.js';
27
27
  import { Info } from '@hhgtech/icons/other';
28
28
  import './index.styles-66045747.js';
@@ -2100,7 +2100,7 @@ const SSOScreenRenderer = () => {
2100
2100
  };
2101
2101
 
2102
2102
  const SSOV2 = ({ onClose: onCloseProps, locale }) => {
2103
- const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose } = useSSOV2Store();
2103
+ const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, } = useSSOV2Store();
2104
2104
  useEffect(() => {
2105
2105
  setMounted(true);
2106
2106
  return () => {
@@ -2112,40 +2112,16 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
2112
2112
  }
2113
2113
  const onClose = (success) => __awaiter(void 0, void 0, void 0, function* () {
2114
2114
  if (success && overrideClose) {
2115
- const allowContinue = yield overrideClose();
2116
- if (!allowContinue) {
2117
- return;
2118
- }
2119
- }
2120
- let newReturnUrl;
2121
- if (returnUrl.startsWith('http') || returnUrl.startsWith('//')) {
2122
- newReturnUrl = new URL(returnUrl);
2123
- }
2124
- else {
2125
- newReturnUrl = new URL(returnUrl, window.location.href);
2126
- }
2127
- const currentUrl = new URL(window.location.href);
2128
- currentUrl.searchParams.delete('source');
2129
- const paramSource = newReturnUrl.searchParams.get('source');
2130
- if (paramSource) {
2131
- newReturnUrl.searchParams.delete('source');
2132
- }
2133
- // delete source from both url so we can compare and readd source later if needed
2134
- const _source = paramSource || source;
2135
- if (success && returnUrl && currentUrl.href !== newReturnUrl.href) {
2136
- if (_source) {
2137
- newReturnUrl.searchParams.set('source', _source || '');
2138
- }
2139
- window.location.href = newReturnUrl.href;
2115
+ overrideClose();
2140
2116
  return;
2141
2117
  }
2142
- if (success && _source) {
2143
- currentUrl.searchParams.set('source', _source);
2144
- window.location.replace(currentUrl.href);
2145
- }
2118
+ redirect(returnUrl, source);
2146
2119
  setOpen(false);
2147
2120
  onCloseProps === null || onCloseProps === void 0 ? void 0 : onCloseProps();
2148
2121
  });
2122
+ useEffect(() => {
2123
+ setOnCloseProp(onClose);
2124
+ }, [onClose]);
2149
2125
  return (React__default.createElement(SSOStateProvider, { onClose: onClose, locale: locale },
2150
2126
  React__default.createElement(SSOPopupWrapper, { opened: true, onClose: onClose },
2151
2127
  React__default.createElement(SSOScreenRenderer, null))));
@@ -246,7 +246,7 @@ const handleAuthSuccess = (res) => {
246
246
  });
247
247
  };
248
248
 
249
- const useSSOV2Store = create()((set) => ({
249
+ const useSSOV2Store = create()((set, get) => ({
250
250
  isOpen: false,
251
251
  setOpen: (isOpen) => set({ isOpen }),
252
252
  returnUrl: undefined,
@@ -257,14 +257,17 @@ const useSSOV2Store = create()((set) => ({
257
257
  setSource: (source) => set({ source }),
258
258
  setupSource: undefined,
259
259
  setSetupSource: (setupSource) => set({ setupSource }),
260
+ setOnCloseProp: (onClose) => set({ onCloseProp: onClose }),
260
261
  triggerLogin: (params) => {
262
+ var _a, _b;
261
263
  const { source, returnUrl } = params || {};
262
264
  const alreadyHasToken = getCookie(BEARER_TOKEN_COOKIE$1);
263
265
  if (alreadyHasToken) {
264
- if (returnUrl && returnUrl !== window.location.href) {
265
- window.location.href = returnUrl;
266
- return;
267
- }
266
+ redirect(params === null || params === void 0 ? void 0 : params.returnUrl, params === null || params === void 0 ? void 0 : params.source);
267
+ set({
268
+ isOpen: false,
269
+ });
270
+ (_b = (_a = get()).onCloseProp) === null || _b === void 0 ? void 0 : _b.call(_a);
268
271
  }
269
272
  else {
270
273
  useSSOSteps.setState({
@@ -288,10 +291,11 @@ const useSSOV2Store = create()((set) => ({
288
291
  var _a;
289
292
  const userInfo = yield getUserInfo();
290
293
  const forceUpdatePhoneEmail = () => __awaiter(void 0, void 0, void 0, function* () {
291
- var _b, _c, _d;
294
+ var _b, _c, _d, _e, _f, _g, _h;
292
295
  const userInfo = yield getUserInfo();
293
296
  const hasPhone = !!((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _b === void 0 ? void 0 : _b.phone) && !!((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified_at);
294
- const hasEmail = !!((_d = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _d === void 0 ? void 0 : _d.email);
297
+ const hasEmail = !!((_d = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _d === void 0 ? void 0 : _d.email) &&
298
+ !((_f = (_e = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _e === void 0 ? void 0 : _e.email) === null || _f === void 0 ? void 0 : _f.endsWith('@hhg.com'));
295
299
  if (!hasPhone || !hasEmail) {
296
300
  useSSOSteps.setState({
297
301
  steps: [
@@ -319,7 +323,11 @@ const useSSOV2Store = create()((set) => ({
319
323
  });
320
324
  }
321
325
  else {
322
- return true;
326
+ redirect(params === null || params === void 0 ? void 0 : params.returnUrl, params === null || params === void 0 ? void 0 : params.source);
327
+ set({
328
+ isOpen: false,
329
+ });
330
+ (_h = (_g = get()).onCloseProp) === null || _h === void 0 ? void 0 : _h.call(_g);
323
331
  }
324
332
  });
325
333
  if (!((_a = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _a === void 0 ? void 0 : _a.id)) {
@@ -345,12 +353,12 @@ const useSSOV2Store = create()((set) => ({
345
353
  }
346
354
  }),
347
355
  triggerEcomPhoneVerify: (params) => __awaiter(void 0, void 0, void 0, function* () {
348
- var _e;
356
+ var _j;
349
357
  const userInfo = yield getUserInfo();
350
358
  const forceUpdatePhone = () => __awaiter(void 0, void 0, void 0, function* () {
351
- var _f, _g;
359
+ var _k, _l, _m, _o;
352
360
  const userInfo = yield getUserInfo();
353
- const hasPhone = !!((_f = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _f === void 0 ? void 0 : _f.phone) && !!((_g = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _g === void 0 ? void 0 : _g.phone_verified_at);
361
+ const hasPhone = !!((_k = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _k === void 0 ? void 0 : _k.phone) && !!((_l = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _l === void 0 ? void 0 : _l.phone_verified_at);
354
362
  if (!hasPhone) {
355
363
  useSSOSteps.setState({
356
364
  steps: [
@@ -372,10 +380,15 @@ const useSSOV2Store = create()((set) => ({
372
380
  });
373
381
  }
374
382
  else {
375
- return true;
383
+ // redirect here
384
+ redirect(params === null || params === void 0 ? void 0 : params.returnUrl, params === null || params === void 0 ? void 0 : params.source);
385
+ set({
386
+ isOpen: false,
387
+ });
388
+ (_o = (_m = get()).onCloseProp) === null || _o === void 0 ? void 0 : _o.call(_m);
376
389
  }
377
390
  });
378
- if (!((_e = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _e === void 0 ? void 0 : _e.id)) {
391
+ if (!((_j = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _j === void 0 ? void 0 : _j.id)) {
379
392
  useSSOSteps.setState({
380
393
  steps: [
381
394
  {
@@ -397,6 +410,37 @@ const useSSOV2Store = create()((set) => ({
397
410
  forceUpdatePhone();
398
411
  }
399
412
  }),
400
- }));
413
+ }));
414
+ const redirect = (returnUrl, source) => {
415
+ const currentUrl = new URL(window.location.href);
416
+ if (returnUrl) {
417
+ let newReturnUrl;
418
+ if (returnUrl.startsWith('http') || returnUrl.startsWith('//')) {
419
+ newReturnUrl = new URL(returnUrl);
420
+ }
421
+ else {
422
+ newReturnUrl = new URL(returnUrl, window.location.href);
423
+ }
424
+ currentUrl.searchParams.delete('source');
425
+ const paramSource = newReturnUrl.searchParams.get('source');
426
+ if (paramSource) {
427
+ newReturnUrl.searchParams.delete('source');
428
+ }
429
+ // delete source from both url so we can compare and readd source later if needed
430
+ const _source = paramSource || source;
431
+ if (currentUrl.href !== newReturnUrl.href) {
432
+ if (_source) {
433
+ newReturnUrl.searchParams.set('source', _source || '');
434
+ }
435
+ window.location.href = newReturnUrl.href;
436
+ return;
437
+ }
438
+ }
439
+ if (source) {
440
+ currentUrl.searchParams.set('source', source);
441
+ window.location.replace(currentUrl.href);
442
+ return;
443
+ }
444
+ };
401
445
 
402
- export { FacebookAppId as F, GoogleAuthClientId as G, SSO_V2_PATHS as S, useSSOSteps as a, SSOStepTypeType as b, checkUserExist as c, allAvailableAreaCodes as d, updateUserInfo as e, fetchSSOV2Api as f, getUserInfo as g, handleAuthSuccess as h, resetPassword as r, useSSOV2Store as u, websiteId as w };
446
+ export { FacebookAppId as F, GoogleAuthClientId as G, SSO_V2_PATHS as S, useSSOSteps as a, SSOStepTypeType as b, checkUserExist as c, allAvailableAreaCodes as d, updateUserInfo as e, fetchSSOV2Api as f, getUserInfo as g, handleAuthSuccess as h, redirect as i, resetPassword as r, useSSOV2Store as u, websiteId as w };
@@ -47,7 +47,7 @@ import { L as LOCALE } from './Locale-1d47037e.js';
47
47
  import { D as DatePicker } from './index-0f29c1bf.js';
48
48
  import { D as Dropdown } from './index-7c3ae825.js';
49
49
  import { B as Button$1 } from './index-8d56be31.js';
50
- import { u as useSSOV2Store } from './store-626f70d4.js';
50
+ import { u as useSSOV2Store } from './store-18a9c261.js';
51
51
  import 'date-fns/locale';
52
52
  import './constantsSite.js';
53
53
  import './constantsRiskScreener.js';
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import '@mantine/core';
3
- export { S as SurveyOrPremiumBanner } from './index-c12b2be7.js';
3
+ export { S as SurveyOrPremiumBanner } from './index-bf6970f2.js';
4
4
  import './utils-de9524a4.js';
5
5
  import './index-dbfdecc6.js';
6
6
  import './index-83e3bac0.js';
@@ -13,7 +13,7 @@ import './index-d7e10fea.js';
13
13
  import './constantsSite.js';
14
14
  import './constantsRiskScreener.js';
15
15
  import './tslib.es6-ef20411b.js';
16
- import './store-626f70d4.js';
16
+ import './store-18a9c261.js';
17
17
  import 'zustand';
18
18
  import './normalizeLink-688c6b8d.js';
19
19
  import './miscCookieHelper.js';
@@ -7,17 +7,17 @@ export { U as UserAvatar } from './index-1861cd41.js';
7
7
  export { C as CardLink } from './index-73303d7d.js';
8
8
  export { C as CardReactions, a as LabelPin, L as LabelSortPin, T as TagTopic } from './treePopoverMenu-2edaacb7.js';
9
9
  export { L as LabelSorting } from './labelSorting-c24d2623.js';
10
- export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-a79d730a.js';
11
- export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-58b26bdf.js';
12
- export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-5de23477.js';
10
+ export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-1b27d30b.js';
11
+ export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-27314aa3.js';
12
+ export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-11dcba8a.js';
13
13
  export { ShareBox } from './togetherShareBox.js';
14
- export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-d2d2b1fc.js';
14
+ export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-19f44a29.js';
15
15
  export { I as ImagePreviewPopup, a as PostImagePreview, P as PostSingleImageViewPopup } from './index-b2b7deb5.js';
16
- export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-3c78451c.js';
16
+ export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-d0853789.js';
17
17
  export { P as PopoverMenu } from './index-41660a3a.js';
18
18
  import 'react';
19
19
  import './miscCookieHelper.js';
20
- import './store-626f70d4.js';
20
+ import './store-18a9c261.js';
21
21
  import './tslib.es6-ef20411b.js';
22
22
  import 'zustand';
23
23
  import './constantsIsProduction.js';
@@ -1,8 +1,8 @@
1
- export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-a79d730a.js';
2
- export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-58b26bdf.js';
3
- export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-5de23477.js';
1
+ export { C as CardAuthor, a as PopupDoctor, P as PopupExpert, b as PopupHospital, c as ProfileDetailModal } from './index-1b27d30b.js';
2
+ export { C as CreateNewPostContent, a as CreatePostDescription, b as CreatePostTitle, S as SkipQuestionOfExpertBtn, T as TopicSelectList } from './index-27314aa3.js';
3
+ export { I as InputCommentBar, P as PopupDanger, a as PopupFrame, S as SharePopup, c as SocialLinkPreview, b as SubmitReportForm } from './index-11dcba8a.js';
4
4
  export { ShareBox } from './togetherShareBox.js';
5
- export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-d2d2b1fc.js';
5
+ export { P as PostContent, a as ProfileDetail, T as TabNameInProfileDetail } from './index-19f44a29.js';
6
6
  export { I as ImagePreviewPopup, a as PostImagePreview, P as PostSingleImageViewPopup } from './index-b2b7deb5.js';
7
7
  import 'react';
8
8
  import '@hhgtech/icons/other';
@@ -73,6 +73,6 @@ import './index-eaa20d1d.js';
73
73
  import './miscDefaultClassWrapper.js';
74
74
  import './index-9b1e7d53.js';
75
75
  import './useTogetherAuthRequiredAction.js';
76
- import './store-626f70d4.js';
76
+ import './store-18a9c261.js';
77
77
  import 'zustand';
78
78
  import './normalizeLink-688c6b8d.js';
@@ -7,7 +7,7 @@ import './index-dbfdecc6.js';
7
7
  import './utils-b79a7ddf.js';
8
8
  import './index-422c592d.js';
9
9
  import './index-8d33b43d.js';
10
- export { C as CardAuthor } from './index-a79d730a.js';
10
+ export { C as CardAuthor } from './index-1b27d30b.js';
11
11
  import './index.styles-66045747.js';
12
12
  import './index-ac1446eb.js';
13
13
  import './index-83e3bac0.js';
@@ -6,8 +6,8 @@ import './index-9b1e7d53.js';
6
6
  import './dataTransform-7c53fc27.js';
7
7
  import './togetherApiPaths.js';
8
8
  import './utils-de9524a4.js';
9
- export { a as ProfileDetail, b as TabDataInit, T as TabName, U as UserType } from './index-d2d2b1fc.js';
10
- import './index-a79d730a.js';
9
+ export { a as ProfileDetail, b as TabDataInit, T as TabName, U as UserType } from './index-19f44a29.js';
10
+ import './index-1b27d30b.js';
11
11
  import './index-dbfdecc6.js';
12
12
  import '@hhgtech/icons/other';
13
13
  import '@mantine/core';
@@ -44,7 +44,7 @@ import 'classnames';
44
44
  import './useUniqueId-6311faae.js';
45
45
  import '@mantine/dates';
46
46
  import './useTogetherAuthRequiredAction.js';
47
- import './store-626f70d4.js';
47
+ import './store-18a9c261.js';
48
48
  import 'zustand';
49
49
  import './normalizeLink-688c6b8d.js';
50
50
  import './post-d70c9403.js';
@@ -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-3c78451c.js';
1
+ export { C as CardPost, a as CardPostPopoverMore, b as CardReply, c as CardReplyPopover, S as SourceList, V as VerifiedTag } from './index-d0853789.js';
2
2
  export { P as PopoverMenu } from './index-41660a3a.js';
3
3
  import './tslib.es6-ef20411b.js';
4
4
  import 'react';
@@ -11,7 +11,7 @@ import './other-68bb97c7.js';
11
11
  import './index-dbfdecc6.js';
12
12
  import './translationsContext-90c02030.js';
13
13
  import 'innertext';
14
- import './index-5de23477.js';
14
+ import './index-11dcba8a.js';
15
15
  import './utils-b79a7ddf.js';
16
16
  import 'react-dom';
17
17
  import './utils-de9524a4.js';
@@ -28,7 +28,7 @@ import './index-e20876f4.js';
28
28
  import './dataTransform-7c53fc27.js';
29
29
  import './post-d70c9403.js';
30
30
  import './index-73303d7d.js';
31
- import './index-a79d730a.js';
31
+ import './index-1b27d30b.js';
32
32
  import '@hhgtech/icons/other';
33
33
  import 'dayjs';
34
34
  import 'dayjs/plugin/relativeTime';
@@ -59,7 +59,7 @@ import './index-b2b7deb5.js';
59
59
  import './miscDefaultClassWrapper.js';
60
60
  import './togetherShareBox.js';
61
61
  import './useTogetherAuthRequiredAction.js';
62
- import './store-626f70d4.js';
62
+ import './store-18a9c261.js';
63
63
  import 'zustand';
64
64
  import './normalizeLink-688c6b8d.js';
65
65
  import './treePopoverMenu-2edaacb7.js';
@@ -74,6 +74,6 @@ import '@mantine/dates';
74
74
  import './index-5263905a.js';
75
75
  import './number-6c73ba1c.js';
76
76
  import 'date-fns';
77
- import './index-d2d2b1fc.js';
77
+ import './index-19f44a29.js';
78
78
  import './index-9b1e7d53.js';
79
79
  import './index-0c2f3879.js';
@@ -2,7 +2,7 @@ import React__default, { createContext, useContext } from 'react';
2
2
  import { deleteCookie } from './miscCookieHelper.js';
3
3
  import { T as TogetherComponentGlobalContext, j as getUrlToSignUp } from './utils-de9524a4.js';
4
4
  import { B as BEARER_TOKEN_COOKIE } from './constants-d10c55bf.js';
5
- import { u as useSSOV2Store } from './store-626f70d4.js';
5
+ import { u as useSSOV2Store } from './store-18a9c261.js';
6
6
  import './tslib.es6-ef20411b.js';
7
7
  import './index-31ea7e88.js';
8
8
  import 'slugify';