@bikdotai/bik-component-library 0.0.725-beta.9 → 0.0.725
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/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +1 -1
- package/package.json +1 -2
- package/dist/cjs/assets/icons/searchIconWhatsNew.svg.js +0 -1
- package/dist/cjs/assets/icons/whatsNew.svg.js +0 -1
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.d.ts +0 -4
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +0 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.d.ts +0 -4
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +0 -1
- package/dist/cjs/components/feature-announcements/MinorUpdatePopup.d.ts +0 -4
- package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +0 -1
- package/dist/cjs/components/feature-announcements/VideoModal.d.ts +0 -3
- package/dist/cjs/components/feature-announcements/VideoModal.js +0 -1
- package/dist/cjs/components/feature-announcements/constants/animations.d.ts +0 -27
- package/dist/cjs/components/feature-announcements/constants/animations.js +0 -1
- package/dist/cjs/components/feature-announcements/constants/dimensions.d.ts +0 -56
- package/dist/cjs/components/feature-announcements/constants/dimensions.js +0 -1
- package/dist/cjs/components/feature-announcements/constants/index.d.ts +0 -19
- package/dist/cjs/components/feature-announcements/constants/index.js +0 -1
- package/dist/cjs/components/feature-announcements/constants/localStorageKeys.d.ts +0 -18
- package/dist/cjs/components/feature-announcements/constants/localStorageKeys.js +0 -1
- package/dist/cjs/components/feature-announcements/constants/selectors.d.ts +0 -21
- package/dist/cjs/components/feature-announcements/constants/selectors.js +0 -1
- package/dist/cjs/components/feature-announcements/constants/zIndex.d.ts +0 -10
- package/dist/cjs/components/feature-announcements/constants/zIndex.js +0 -1
- package/dist/cjs/components/feature-announcements/hooks/index.d.ts +0 -1
- package/dist/cjs/components/feature-announcements/hooks/useFeatureAnnouncements.d.ts +0 -13
- package/dist/cjs/components/feature-announcements/hooks/useFeatureAnnouncements.js +0 -1
- package/dist/cjs/components/feature-announcements/index.d.ts +0 -7
- package/dist/cjs/components/feature-announcements/styles/index.d.ts +0 -4
- package/dist/cjs/components/feature-announcements/styles/joyride.styles.d.ts +0 -125
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.d.ts +0 -23
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.js +0 -1
- package/dist/cjs/components/feature-announcements/styles/minorPopup.styles.d.ts +0 -16
- package/dist/cjs/components/feature-announcements/styles/minorPopup.styles.js +0 -1
- package/dist/cjs/components/feature-announcements/styles/videoModal.styles.d.ts +0 -13
- package/dist/cjs/components/feature-announcements/styles/videoModal.styles.js +0 -1
- package/dist/cjs/components/feature-announcements/types/feature.types.d.ts +0 -41
- package/dist/cjs/components/feature-announcements/types/index.d.ts +0 -4
- package/dist/cjs/components/feature-announcements/types/props.types.d.ts +0 -43
- package/dist/cjs/components/feature-announcements/types/repository.types.d.ts +0 -11
- package/dist/cjs/components/feature-announcements/types/router.types.d.ts +0 -7
- package/dist/cjs/components/feature-announcements/useFeatureAnnouncements.d.ts +0 -13
- package/dist/cjs/components/feature-announcements/utils/animationHelpers.d.ts +0 -18
- package/dist/cjs/components/feature-announcements/utils/animationHelpers.js +0 -1
- package/dist/cjs/components/feature-announcements/utils/elementHelpers.d.ts +0 -30
- package/dist/cjs/components/feature-announcements/utils/elementHelpers.js +0 -1
- package/dist/cjs/components/feature-announcements/utils/htmlHelpers.d.ts +0 -18
- package/dist/cjs/components/feature-announcements/utils/htmlHelpers.js +0 -1
- package/dist/cjs/components/feature-announcements/utils/index.d.ts +0 -3
- package/dist/cjs/components/whats-new/WhatsNew.d.ts +0 -23
- package/dist/cjs/components/whats-new/WhatsNew.js +0 -1
- package/dist/cjs/components/whats-new/WhatsNew.styles.d.ts +0 -11
- package/dist/cjs/components/whats-new/WhatsNew.styles.js +0 -185
- package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +0 -58
- package/dist/cjs/components/whats-new/WhatsNewButton.d.ts +0 -3
- package/dist/cjs/components/whats-new/WhatsNewButton.js +0 -1
- package/dist/cjs/components/whats-new/WhatsNewPanel.d.ts +0 -3
- package/dist/cjs/components/whats-new/WhatsNewPanel.js +0 -1
- package/dist/cjs/components/whats-new/WhatsNewProvider.d.ts +0 -4
- package/dist/cjs/components/whats-new/WhatsNewProvider.js +0 -1
- package/dist/cjs/components/whats-new/index.d.ts +0 -7
- package/dist/cjs/components/whats-new/useWhatsNew.d.ts +0 -9
- package/dist/cjs/components/whats-new/useWhatsNew.js +0 -1
- package/dist/esm/assets/icons/searchIconWhatsNew.svg.js +0 -1
- package/dist/esm/assets/icons/whatsNew.svg.js +0 -1
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.d.ts +0 -4
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +0 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.d.ts +0 -4
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +0 -1
- package/dist/esm/components/feature-announcements/MinorUpdatePopup.d.ts +0 -4
- package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +0 -1
- package/dist/esm/components/feature-announcements/VideoModal.d.ts +0 -3
- package/dist/esm/components/feature-announcements/VideoModal.js +0 -1
- package/dist/esm/components/feature-announcements/constants/animations.d.ts +0 -27
- package/dist/esm/components/feature-announcements/constants/animations.js +0 -1
- package/dist/esm/components/feature-announcements/constants/dimensions.d.ts +0 -56
- package/dist/esm/components/feature-announcements/constants/dimensions.js +0 -1
- package/dist/esm/components/feature-announcements/constants/index.d.ts +0 -19
- package/dist/esm/components/feature-announcements/constants/index.js +0 -1
- package/dist/esm/components/feature-announcements/constants/localStorageKeys.d.ts +0 -18
- package/dist/esm/components/feature-announcements/constants/localStorageKeys.js +0 -1
- package/dist/esm/components/feature-announcements/constants/selectors.d.ts +0 -21
- package/dist/esm/components/feature-announcements/constants/selectors.js +0 -1
- package/dist/esm/components/feature-announcements/constants/zIndex.d.ts +0 -10
- package/dist/esm/components/feature-announcements/constants/zIndex.js +0 -1
- package/dist/esm/components/feature-announcements/hooks/index.d.ts +0 -1
- package/dist/esm/components/feature-announcements/hooks/useFeatureAnnouncements.d.ts +0 -13
- package/dist/esm/components/feature-announcements/hooks/useFeatureAnnouncements.js +0 -1
- package/dist/esm/components/feature-announcements/index.d.ts +0 -7
- package/dist/esm/components/feature-announcements/styles/index.d.ts +0 -4
- package/dist/esm/components/feature-announcements/styles/joyride.styles.d.ts +0 -125
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.d.ts +0 -23
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.js +0 -1
- package/dist/esm/components/feature-announcements/styles/minorPopup.styles.d.ts +0 -16
- package/dist/esm/components/feature-announcements/styles/minorPopup.styles.js +0 -1
- package/dist/esm/components/feature-announcements/styles/videoModal.styles.d.ts +0 -13
- package/dist/esm/components/feature-announcements/styles/videoModal.styles.js +0 -1
- package/dist/esm/components/feature-announcements/types/feature.types.d.ts +0 -41
- package/dist/esm/components/feature-announcements/types/index.d.ts +0 -4
- package/dist/esm/components/feature-announcements/types/props.types.d.ts +0 -43
- package/dist/esm/components/feature-announcements/types/repository.types.d.ts +0 -11
- package/dist/esm/components/feature-announcements/types/router.types.d.ts +0 -7
- package/dist/esm/components/feature-announcements/useFeatureAnnouncements.d.ts +0 -13
- package/dist/esm/components/feature-announcements/utils/animationHelpers.d.ts +0 -18
- package/dist/esm/components/feature-announcements/utils/animationHelpers.js +0 -1
- package/dist/esm/components/feature-announcements/utils/elementHelpers.d.ts +0 -30
- package/dist/esm/components/feature-announcements/utils/elementHelpers.js +0 -1
- package/dist/esm/components/feature-announcements/utils/htmlHelpers.d.ts +0 -18
- package/dist/esm/components/feature-announcements/utils/htmlHelpers.js +0 -1
- package/dist/esm/components/feature-announcements/utils/index.d.ts +0 -3
- package/dist/esm/components/whats-new/WhatsNew.d.ts +0 -23
- package/dist/esm/components/whats-new/WhatsNew.js +0 -1
- package/dist/esm/components/whats-new/WhatsNew.styles.d.ts +0 -11
- package/dist/esm/components/whats-new/WhatsNew.styles.js +0 -185
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +0 -58
- package/dist/esm/components/whats-new/WhatsNewButton.d.ts +0 -3
- package/dist/esm/components/whats-new/WhatsNewButton.js +0 -1
- package/dist/esm/components/whats-new/WhatsNewPanel.d.ts +0 -3
- package/dist/esm/components/whats-new/WhatsNewPanel.js +0 -1
- package/dist/esm/components/whats-new/WhatsNewProvider.d.ts +0 -4
- package/dist/esm/components/whats-new/WhatsNewProvider.js +0 -1
- package/dist/esm/components/whats-new/index.d.ts +0 -7
- package/dist/esm/components/whats-new/useWhatsNew.d.ts +0 -9
- package/dist/esm/components/whats-new/useWhatsNew.js +0 -1
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e);const r=n.default.div`
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
position: relative;
|
|
4
|
-
|
|
5
|
-
.main-icon-class {
|
|
6
|
-
padding: 6px;
|
|
7
|
-
border-radius: 32px;
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
align-items: center;
|
|
11
|
-
transition: background-color 0.2s ease;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.icon-active {
|
|
15
|
-
background: ${t.COLORS.background.brandLight};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.main-icon-class:hover {
|
|
19
|
-
background: ${t.COLORS.background.base};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.notification--count {
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
position: absolute;
|
|
25
|
-
right: 6px;
|
|
26
|
-
top: 4px;
|
|
27
|
-
border-radius: 50%;
|
|
28
|
-
width: 14px;
|
|
29
|
-
height: 14px;
|
|
30
|
-
background: ${t.COLORS.background.negative.vibrant};
|
|
31
|
-
border: 1.25px solid ${t.COLORS.surface.standard};
|
|
32
|
-
display: flex;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
align-items: center;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.count--text {
|
|
38
|
-
font-size: 8px;
|
|
39
|
-
line-height: 7.2px;
|
|
40
|
-
font-weight: 400;
|
|
41
|
-
color: ${t.COLORS.surface.standard};
|
|
42
|
-
}
|
|
43
|
-
`,a=n.default.div`
|
|
44
|
-
overflow-y: auto;
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
height: 100%;
|
|
48
|
-
max-height: calc(100vh - 60px);
|
|
49
|
-
|
|
50
|
-
&::-webkit-scrollbar {
|
|
51
|
-
display: block;
|
|
52
|
-
width: 6px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
::-webkit-scrollbar-thumb {
|
|
56
|
-
background: ${t.COLORS.content.inactive};
|
|
57
|
-
border-radius: 3px;
|
|
58
|
-
min-height: 30px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.icon--wrapper {
|
|
62
|
-
display: flex;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
align-items: center;
|
|
65
|
-
width: 64px;
|
|
66
|
-
height: 64px;
|
|
67
|
-
border-radius: 50%;
|
|
68
|
-
background: ${t.COLORS.background.base};
|
|
69
|
-
margin-bottom: 16px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.no--data--found {
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
align-items: center;
|
|
77
|
-
height: 300px;
|
|
78
|
-
text-align: center;
|
|
79
|
-
padding: 24px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.text--align {
|
|
83
|
-
text-align: center;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.scroller {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
gap: 16px;
|
|
90
|
-
padding: 16px 0;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.full--width {
|
|
94
|
-
width: 100%;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.flex {
|
|
98
|
-
display: flex;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.flex--row {
|
|
102
|
-
flex-direction: row;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.flex--column {
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.mt-8 {
|
|
110
|
-
margin-top: 8px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.mt-20 {
|
|
114
|
-
margin-top: 20px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.mt--8 {
|
|
118
|
-
margin-top: 8px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.mt--12 {
|
|
122
|
-
margin-top: 12px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.mb-mt-8 {
|
|
126
|
-
margin-bottom: 8px;
|
|
127
|
-
margin-top: 8px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.padding--16 {
|
|
131
|
-
padding: 16px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.card--desc {
|
|
135
|
-
max-height: 200px;
|
|
136
|
-
overflow-y: auto;
|
|
137
|
-
font-size: 12px;
|
|
138
|
-
color: ${t.COLORS.content.secondary};
|
|
139
|
-
|
|
140
|
-
p {
|
|
141
|
-
margin-bottom: 0px;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.created--at {
|
|
146
|
-
align-items: center;
|
|
147
|
-
gap: 4px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.new--content--tag {
|
|
151
|
-
padding: 2px 6px;
|
|
152
|
-
gap: 4px;
|
|
153
|
-
border-radius: 14px;
|
|
154
|
-
background: ${t.COLORS.background.warning.vibrant};
|
|
155
|
-
display: flex;
|
|
156
|
-
justify-content: center;
|
|
157
|
-
align-items: center;
|
|
158
|
-
margin-right: 8px;
|
|
159
|
-
}
|
|
160
|
-
`,o=n.default.div`
|
|
161
|
-
display: flex;
|
|
162
|
-
flex-direction: column;
|
|
163
|
-
height: 100%;
|
|
164
|
-
`,d=n.default.div`
|
|
165
|
-
background: ${t.COLORS.surface.standard};
|
|
166
|
-
border-radius: 8px;
|
|
167
|
-
border: 1px solid ${t.COLORS.stroke.primary};
|
|
168
|
-
padding: 16px;
|
|
169
|
-
display: flex;
|
|
170
|
-
flex-direction: column;
|
|
171
|
-
gap: 8px;
|
|
172
|
-
transition: all 0.2s ease;
|
|
173
|
-
|
|
174
|
-
&:hover {
|
|
175
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
176
|
-
}
|
|
177
|
-
`,p=n.default.div`
|
|
178
|
-
background-image: url(${e=>e.imageUrl});
|
|
179
|
-
background-size: cover;
|
|
180
|
-
background-position: center;
|
|
181
|
-
background-repeat: no-repeat;
|
|
182
|
-
height: ${e=>e.height||"200px"};
|
|
183
|
-
width: ${e=>e.width||"100%"};
|
|
184
|
-
border-radius: 4px;
|
|
185
|
-
`;exports.BackgroundImageContainer=p,exports.MainCardContainer=d,exports.MainContainer=o,exports.WhatsNewIconContainer=r,exports.WhatsNewWrapper=a;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface WhatsNewContent {
|
|
3
|
-
id: string;
|
|
4
|
-
title: string;
|
|
5
|
-
body: string;
|
|
6
|
-
content: string;
|
|
7
|
-
image: string;
|
|
8
|
-
buttonText: string;
|
|
9
|
-
redirectUrl: string;
|
|
10
|
-
productVideo?: string;
|
|
11
|
-
docId?: string;
|
|
12
|
-
createdAt: any;
|
|
13
|
-
module: string[];
|
|
14
|
-
visibility: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface WhatsNewProviderProps {
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
fetchWhatsNewContent: () => Promise<[Error | null, WhatsNewContent[] | null]>;
|
|
19
|
-
markContentAsViewed?: (contentId: string) => Promise<void>;
|
|
20
|
-
module?: string;
|
|
21
|
-
isLoading?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface WhatsNewButtonProps {
|
|
24
|
-
onClick?: () => void;
|
|
25
|
-
newContentCount?: number;
|
|
26
|
-
isOpen?: boolean;
|
|
27
|
-
isLoading?: boolean;
|
|
28
|
-
tooltip?: string;
|
|
29
|
-
testId?: string;
|
|
30
|
-
iconWidth?: number;
|
|
31
|
-
iconHeight?: number;
|
|
32
|
-
customIcon?: React.ComponentType<{
|
|
33
|
-
width?: number;
|
|
34
|
-
height?: number;
|
|
35
|
-
color?: string;
|
|
36
|
-
}>;
|
|
37
|
-
}
|
|
38
|
-
export interface WhatsNewPanelProps {
|
|
39
|
-
isOpen: boolean;
|
|
40
|
-
onClose: () => void;
|
|
41
|
-
content: WhatsNewContent[];
|
|
42
|
-
isLoading?: boolean;
|
|
43
|
-
title?: string;
|
|
44
|
-
searchPlaceholder?: string;
|
|
45
|
-
emptyStateTitle?: string;
|
|
46
|
-
emptyStateDescription?: string;
|
|
47
|
-
noResultsText?: string;
|
|
48
|
-
width?: string;
|
|
49
|
-
onContentClick?: (content: WhatsNewContent) => void;
|
|
50
|
-
renderCustomContent?: (content: WhatsNewContent) => React.ReactNode;
|
|
51
|
-
}
|
|
52
|
-
export interface WhatsNewHookReturn {
|
|
53
|
-
whatsNewContent: WhatsNewContent[];
|
|
54
|
-
isLoading: boolean;
|
|
55
|
-
newContentCount: number;
|
|
56
|
-
markAsViewed: (contentId: string) => Promise<void>;
|
|
57
|
-
refreshContent: () => Promise<void>;
|
|
58
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),s=require("../../assets/icons/whatsNew.svg.js"),e=require("../../constants/Theme.js"),n=require("../tooltips/Tooltip.js"),i=require("./WhatsNew.styles.js");exports.WhatsNewButton=o=>{let{onClick:r,newContentCount:a=0,isOpen:c=!1,isLoading:x=!1,tooltip:d="What's new",testId:j="whats-new-button",iconWidth:l=24,iconHeight:u=24,customIcon:p}=o;return x?t.jsxRuntimeExports.jsxs("div",Object.assign({style:{margin:"0px 8px"}},{children:[t.jsxRuntimeExports.jsx("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),t.jsxRuntimeExports.jsx("style",{children:"\n\t\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t\t}\n\t\t\t\t\t"})]})):t.jsxRuntimeExports.jsx(i.WhatsNewIconContainer,Object.assign({count:a},{children:t.jsxRuntimeExports.jsxs("div",Object.assign({className:"main-icon-class "+(c?"icon-active":""),style:{color:c?e.COLORS.content.brand:e.COLORS.content.primary},onClick:r,"data-testid":j},{children:[t.jsxRuntimeExports.jsx(n.Tooltip,Object.assign({body:d},{children:t.jsxRuntimeExports.jsx("div",{children:p?t.jsxRuntimeExports.jsx(p,{width:l,height:u,color:c?e.COLORS.content.brand:e.COLORS.content.primary}):t.jsxRuntimeExports.jsx(s.default,{width:l,height:u})})})),a>0&&t.jsxRuntimeExports.jsx("div",Object.assign({className:"notification--count"},{children:t.jsxRuntimeExports.jsx("div",Object.assign({className:"count--text"},{children:a}))}))]}))}))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("date-fns"),s=require("react"),r=require("../../assets/icons/searchIconWhatsNew.svg.js"),n=require("../../assets/icons/whatsNew.svg.js"),i=require("../../constants/Theme.js"),a=require("../button/Button.js"),o=require("../feature-announcements/VideoModal.js"),d=require("../searchBar/searchBar.js"),c=require("../side-modal/SideModal.js"),x=require("../TypographyStyle.js"),l=require("./WhatsNew.styles.js");exports.WhatsNewPanel=u=>{let{isOpen:j,onClose:m,content:h,isLoading:p=!1,title:g="What's new on BIK",searchPlaceholder:R="Search posts",emptyStateTitle:E="Nothing new!",emptyStateDescription:w="There are no new updates or features at the moment. Check back soon!",noResultsText:b="Sorry, no results found.",width:C="480px",onContentClick:O,renderCustomContent:y}=u;const[f,N]=s.useState(""),[S,v]=s.useState(!1),[M,q]=s.useState(""),L=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},T=s.useMemo((()=>{if(!f.trim())return h;const e=f.toLowerCase();return h.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[h,f]),k=0===h.length,B=0===T.length;return j?e.jsxRuntimeExports.jsxs(c.SideModal,Object.assign({width:C,onClose:m,header:"",headerCustomComponent:e.jsxRuntimeExports.jsx(x.TitleMedium,Object.assign({color:i.COLORS.background.inverse},{children:g})),headerStyle:{background:i.COLORS.background.brandLight},hideFooter:!0},{children:[e.jsxRuntimeExports.jsxs(l.MainContainer,{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-8"},{children:e.jsxRuntimeExports.jsx(d.SearchBar,{width:"100%",isEnabled:!k,onChange:e=>{N(e)},onEnter:e=>{N(e)},placeholder:R,variant:"default",searchValue:f,onClickCross:()=>{N("")}})})),e.jsxRuntimeExports.jsx(l.WhatsNewWrapper,{children:k||B?e.jsxRuntimeExports.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"icon--wrapper"},{children:k?e.jsxRuntimeExports.jsx(n.default,{width:32,height:32}):e.jsxRuntimeExports.jsx(r.default,{width:32,height:32})})),k?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(x.TitleRegular,{children:E}),e.jsxRuntimeExports.jsx(x.BodyPrimary,Object.assign({color:i.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:w}))]}):B?e.jsxRuntimeExports.jsx(x.BodyPrimary,Object.assign({color:i.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:b})):null]})):e.jsxRuntimeExports.jsx("div",Object.assign({className:"scroller"},{children:T.map(((s,r)=>y?y(s):e.jsxRuntimeExports.jsxs(l.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsxRuntimeExports.jsx(l.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxRuntimeExports.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[L(s)?e.jsxRuntimeExports.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsxRuntimeExports.jsx(x.Caption,{children:"New"})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),e.jsxRuntimeExports.jsx(x.Caption,Object.assign({style:{color:i.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt--8"},{children:e.jsxRuntimeExports.jsx(x.TitleSmall,{children:s.title})})),e.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsxRuntimeExports.jsx(a.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(q(e.productVideo),v(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),O&&O(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${r}`)))}))})]}),e.jsxRuntimeExports.jsx(o.VideoModal,{isOpen:S,videoUrl:M,onClose:()=>{v(!1)}})]})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("react"),r=require("./useWhatsNew.js");const s=t.createContext(null);exports.WhatsNewProvider=t=>{let{children:n,fetchWhatsNewContent:o,markContentAsViewed:u,module:a}=t;const i=r.useWhatsNew({fetchWhatsNewContent:o,markContentAsViewed:u,module:a});return e.jsxRuntimeExports.jsx(s.Provider,Object.assign({value:i},{children:n}))},exports.useWhatsNewContext=()=>{const e=t.useContext(s);if(!e)throw new Error("useWhatsNewContext must be used within a WhatsNewProvider");return e};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { WhatsNewContent, WhatsNewHookReturn } from './WhatsNew.types';
|
|
2
|
-
interface UseWhatsNewProps {
|
|
3
|
-
fetchWhatsNewContent: () => Promise<[Error | null, WhatsNewContent[] | null]>;
|
|
4
|
-
markContentAsViewed?: (contentId: string) => Promise<void>;
|
|
5
|
-
module?: string;
|
|
6
|
-
newContentThresholdDays?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const useWhatsNew: ({ fetchWhatsNewContent, markContentAsViewed, module, newContentThresholdDays, }: UseWhatsNewProps) => WhatsNewHookReturn;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("date-fns"),r=require("react");exports.useWhatsNew=a=>{let{fetchWhatsNewContent:n,markContentAsViewed:o,module:c,newContentThresholdDays:s=7}=a;const[i,d]=r.useState([]),[u,l]=r.useState(!0),f=r.useRef(n),w=r.useRef(o);r.useEffect((()=>{f.current=n}),[n]),r.useEffect((()=>{w.current=o}),[o]);const v=r.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){l(!0);try{const[e,t]=yield f.current();if(e)console.error("Failed to fetch what's new content:",e),d([]);else if(t){let e=t;c&&(e=t.filter((e=>Array.isArray(e.module)?e.module.includes(c):e.module===c))),e.sort(((e,t)=>{var r,a;const n=(null===(r=e.createdAt)||void 0===r?void 0:r.toDate)?e.createdAt.toDate():new Date(e.createdAt);return((null===(a=t.createdAt)||void 0===a?void 0:a.toDate)?t.createdAt.toDate():new Date(t.createdAt)).getTime()-n.getTime()})),d(e)}else d([])}catch(e){console.error("Failed to fetch what's new content:",e),d([])}finally{l(!1)}}))),[c]);r.useEffect((()=>{v()}),[v]);const A=r.useCallback((e=>{if(!e.createdAt)return!1;const r=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,r)<s}),[s]),h=i.reduce(((e,t)=>A(t)?e+1:e),0);return{whatsNewContent:i,isLoading:u,newContentCount:h,markAsViewed:r.useCallback((t=>e.__awaiter(void 0,void 0,void 0,(function*(){if(w.current)try{yield w.current(t)}catch(e){console.warn("Failed to mark content as viewed:",e)}}))),[]),refreshContent:r.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){yield v()}))),[v])}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as r from"react";var e;function t(){return t=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},t.apply(this,arguments)}var a=a=>r.createElement("svg",t({fill:"none",viewBox:"0 0 24 24"},a),e||(e=r.createElement("path",{stroke:"currentColor",d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0z"})));export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";var t;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},r.apply(this,arguments)}var a=a=>e.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},a),t||(t=e.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},e.createElement("path",{d:"m18.135 13.479-5.044 7.323a.562.562 0 0 0-.076.524l.315.875a.564.564 0 0 0 .887.243l2.836-2.27"}),e.createElement("path",{d:"M6.834 15.248a.562.562 0 0 0 .488.896c4.3-.295 7.47 1.858 7.47 1.858l2.26 1.672a2.813 2.813 0 0 0 3.344-4.523l-2.261-1.672s-2.989-2.398-4.114-7.073a.562.562 0 0 0-1-.204l-6.187 9.046ZM7.769 10.561l-1.582-.547M9.707 8.268l-.79-1.741M8.19 9.264l-2.44-2.11"}))));export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t}from"../../_virtual/_tslib.js";import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as o,useEffect as n,useCallback as r}from"react";import a,{ACTIONS as i}from"react-joyride";import"./constants/animations.js";import{SELECTORS as s}from"./constants/selectors.js";import{useFeatureAnnouncements as d}from"./hooks/useFeatureAnnouncements.js";import l from"./MajorUpdatePopup.js";import u from"./MinorUpdatePopup.js";import{VideoModal as c}from"./VideoModal.js";const p=p=>{let{children:f,fetchVisibleFeatures:b,getStoreFeatureProgress:m,fetchFeatureById:g,markFeatureAsViewedForStore:h,isFeatureApplicableToCurrentPage:y,module:x,router:C}=p;var S;const{majorUpdateFeatures:k,minorUpdateFeatures:T,isLoading:w,markFeatureAsViewed:v}=d({fetchVisibleFeatures:b,getStoreFeatureProgress:m,fetchFeatureById:g,markFeatureAsViewedForStore:h,isFeatureApplicableToCurrentPage:y,module:x,router:C}),[B,j]=o(null),[I,F]=o(null),[E,N]=o(!1),[W,P]=o([]),[M,O]=o(!1),[q,V]=o([]),[_,L]=o(!1),[R,A]=o(!1),[U,$]=o([]),[z,H]=o(!1),[Z,D]=o(!1),[G,J]=o(!1),[K,Q]=o(""),[X,Y]=o(!1),[tt,et]=o(!1),[ot,nt]=o(!1),[rt,at]=o(0),[it,st]=o(0),[dt,lt]=o(new Set);n((()=>{const t="minor-spotlight-cutout-style";let e=document.getElementById(t);return e||(e=document.createElement("style"),e.id=t,document.head.appendChild(e)),e.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t",()=>{const e=document.getElementById(t);e&&e.remove()}}),[]),n((()=>{at((t=>t+1)),st((t=>t+1)),et(!1),nt(!1),lt(new Set)}),[null==C?void 0:C.pathname]),n((()=>{if(!(k.length>0)||B||w||_||X)0!==k.length||w||D(!0);else{D(!1),H(!1),N(!1),P([]),F(null),$([]);let t=0;const e=10,o=()=>{t++;document.querySelector('[data-testid="whats-new-button"]')?ut(k[0]):t<e?setTimeout(o,1e3):D(!0)};o()}}),[k,B,w,_,X]),n((()=>{var t;const e=null===(t=null==C?void 0:C.query)||void 0===t?void 0:t.featureId;if(!e||w||0===T.length)return;const o=T.find((t=>t.id===e));if(!o||!o.featureTag)return;H(!0),A(!0);let n=0;const r=setInterval((()=>{n++;const t=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(t)){const t=[o];$(t),yt(o,t),clearInterval(r)}else n>=25&&(A(!1),clearInterval(r))}),200);return()=>{clearInterval(r)}}),[T,null===(S=null==C?void 0:C.query)||void 0===S?void 0:S.featureId,w]),n((()=>{var t;if(T.length>0&&!w&&!E&&!R&&!I&&!z&&Z&&!X){let t=null,e=null,o=null,n=!1;const r=()=>{if(n||R||I||z||!Z)return;const r=T.filter((t=>{if(!t.featureTag||""===t.featureTag.trim())return!1;if(dt.has(t.id))return!1;const e=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`;return null!==document.querySelector(e)}));r.length>0&&($(r),yt(r[0],r),t&&(t.disconnect(),t=null),e&&(window.removeEventListener("scroll",e),e=null),o&&(clearTimeout(o),o=null))};return t=new MutationObserver((t=>{let e=!1;for(const o of t){if("childList"===o.type&&o.addedNodes.length>0)for(let t=0;t<o.addedNodes.length;t++){const n=o.addedNodes[t];if(n.nodeType===Node.ELEMENT_NODE){const t=n;if(t.id||t.querySelector("[id]")){e=!0;break}}}if(e)break}E||n||R||I||z||!Z||!e||(o&&clearTimeout(o),o=setTimeout((()=>{n||R||I||z||!Z||r()}),200))})),e=()=>{E||n||R||I||z||!Z||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||R||I||z||!Z||r()}),300)})))},t&&t.observe(document.body,{childList:!0,subtree:!0}),e&&window.addEventListener("scroll",e,{passive:!0}),r(),setTimeout((()=>{n||R||I||z||!Z||r()}),100),setTimeout((()=>{n||R||I||z||!Z||r()}),1e3),setTimeout((()=>{n||R||I||z||!Z||r()}),500),()=>{n=!0,t&&t.disconnect(),e&&window.removeEventListener("scroll",e),o&&clearTimeout(o)}}if(0===T.length||w){(null===(t=null==C?void 0:C.query)||void 0===t?void 0:t.featureId)&&I||(N(!1),P([]),F(null),$([]),H(!1))}}),[T,w,E,R,I,z,Z,v,X]);const ut=t=>{j(t);const o=k.findIndex((e=>e.id===t.id)),n=k.length,r=[{target:s.WHATS_NEW_BUTTON,content:e.jsx(l,{feature:t,currentIndex:o,totalFeatures:n,onSkip:()=>ct(t),onExplore:()=>pt(t),onPrevious:()=>ft(t),onNext:()=>bt(t),setIsClosing:et}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(r),O(!0)},ct=r((t=>{(t||B)&&(L(!0),k.forEach((t=>{v(t.id)})),O(!1),j(null),V([]),D(!0),setTimeout((()=>{L(!1)}),500))}),[B,k,v]),pt=r((t=>{L(!0),v(t.id),t.productVideo&&(Q(t.productVideo),J(!0),Y(!0)),O(!1),j(null),V([]);k.findIndex((e=>e.id===t.id))===k.length-1&&D(!0),setTimeout((()=>{L(!1)}),500)}),[k,v]),ft=r((t=>{const o=t||B;if(!o)return;const n=k.findIndex((t=>t.id===o.id));if(n>0){const t=k[n-1];j(t);const o=n-1,r=k.length,a=[{target:'[data-testid="whats-new-button"]',content:e.jsx(l,{feature:t,currentIndex:o,totalFeatures:r,onSkip:()=>ct(t),onExplore:()=>pt(t),onPrevious:()=>ft(t),onNext:()=>bt(t),setIsClosing:et}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(a)}}),[B,k]),bt=r((t=>{const o=t||B;if(!o)return;const n=k.findIndex((t=>t.id===o.id));if(n<k.length-1){const t=k[n+1];j(t);const o=n+1,r=k.length,a=[{target:'[data-testid="whats-new-button"]',content:e.jsx(l,{feature:t,currentIndex:o,totalFeatures:r,onSkip:()=>ct(t),onExplore:()=>pt(t),onPrevious:()=>ft(t),onNext:()=>bt(t),setIsClosing:et}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];V(a)}else L(!0),v(o.id),O(!1),j(null),V([]),D(!0),setTimeout((()=>{L(!1)}),500)}),[B,k,v]),mt=()=>{if(k.length>0&&!B){document.querySelector('[data-testid="whats-new-button"]')&&ut(k[0])}};n((()=>(window.showMajorUpdatePopup=mt,()=>{delete window.showMajorUpdatePopup})),[k,B]);const gt=r((t=>{const{action:e}=t;e===i.CLOSE&&(B&&(L(!0),k.forEach((t=>{v(t.id)})),D(!0),setTimeout((()=>{L(!1)}),500)),O(!1),j(null),V([]))}),[B,k,v]),ht=r((t=>{const{action:e}=t;if(e===i.CLOSE){if(I){A(!0),v(I.id);U.findIndex((t=>t.id===I.id))===U.length-1&&H(!0),setTimeout((()=>{A(!1)}),500)}N(!1),F(null),P([])}}),[I,U,v]),yt=(o,n)=>t(void 0,void 0,void 0,(function*(){F(o);const t=n||U,r=t.findIndex((t=>t.id===o.id)),a=t.length,i=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,s=document.querySelector(i);if(s)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(s,120)}catch(t){}const d=[{target:i,content:e.jsx(u,{feature:o,currentIndex:r,totalFeatures:a,onSkip:()=>xt(o),onExplore:()=>Ct(o),onPrevious:()=>St(o),onNext:()=>kt(o),setIsClosing:nt}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];P(d),N(!0)})),xt=r((t=>{const e=t||I;if(e){A(!0),v(e.id),lt((t=>new Set(t).add(e.id))),N(!1),F(null),P([]);const t=U.find((t=>t.id!==e.id&&!dt.has(t.id)));setTimeout((()=>{A(!1),t?yt(t,U):H(!0)}),500)}}),[I,U,v,dt]),Ct=r((t=>{A(!0),v(t.id),lt((e=>new Set(e).add(t.id))),t.productVideo&&(Q(t.productVideo),J(!0),Y(!0)),N(!1),F(null),P([]);const e=U.find((e=>e.id!==t.id&&!dt.has(e.id)));setTimeout((()=>{A(!1),e&&!t.productVideo?yt(e,U):e||H(!0)}),500)}),[U,v,dt]),St=r((o=>t(void 0,void 0,void 0,(function*(){const t=o||I;if(!t)return;const n=U.findIndex((e=>e.id===t.id));if(n>0){const t=U[n-1];F(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,r=document.querySelector(o);if(r)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(r,120)}catch(t){}const a=n-1,i=U.length,s=[{target:o,content:e.jsx(u,{feature:t,currentIndex:a,totalFeatures:i,onSkip:()=>xt(t),onExplore:()=>Ct(t),onPrevious:()=>St(t),onNext:()=>kt(t),setIsClosing:nt}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];P(s)}}))),[I,U]),kt=r((o=>t(void 0,void 0,void 0,(function*(){const t=o||I;if(!t)return;const n=U.findIndex((e=>e.id===t.id));if(n<U.length-1){const t=U[n+1];F(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,r=document.querySelector(o);if(r)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(r,120)}catch(t){}const a=n+1,i=U.length,s=[{target:o,content:e.jsx(u,{feature:t,currentIndex:a,totalFeatures:i,onSkip:()=>xt(t),onExplore:()=>Ct(t),onPrevious:()=>St(t),onNext:()=>kt(t),setIsClosing:nt}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];P(s)}else A(!0),H(!0),v(t.id),N(!1),F(null),P([]),setTimeout((()=>{A(!1)}),500)}))),[I,U,v]);return e.jsxs(e.Fragment,{children:[f,q.length>0&&e.jsx(a,{steps:q,run:M,continuous:!1,showProgress:!1,showSkipButton:!1,callback:gt,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:tt?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${rt}`),W.length>0&&e.jsx(a,{steps:W,run:E,continuous:!1,showProgress:!1,showSkipButton:!1,callback:ht,disableOverlayClose:!0,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:ot?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:ot?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${it}`),e.jsx(c,{isOpen:G,videoUrl:K,onClose:()=>{J(!1),Q(""),Y(!1);const t=U.find((t=>!dt.has(t.id)));t?setTimeout((()=>{yt(t,U)}),300):H(!0)}})]})};export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as s,useEffect as n}from"react";import{TEXT as o}from"./constants/index.js";import{getMajorPopupStyles as r}from"./styles/majorPopup.styles.js";import"../../constants/Theme.js";import"./constants/animations.js";import{decodeHTMLEntities as i}from"./utils/htmlHelpers.js";import{hideJoyrideArrow as a,calculateCloseTransform as l,executeAfterAnimation as c}from"./utils/animationHelpers.js";import{findWhatsNewButton as u}from"./utils/elementHelpers.js";const g=g=>{let{feature:j,currentIndex:b,totalFeatures:p,onSkip:m,onExplore:d,onPrevious:v,onNext:y,setIsClosing:O}=g;const[x,T]=t(!1),[h,E]=t(!1),[f,B]=t(""),I=s(null);n((()=>{x&&E(!0)}),[x]);const P=r(h,f);return e.jsxs("div",Object.assign({ref:I,style:P.container},{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),(e=>{a(I.current);const t=u();if(t&&I.current){const e=l(I.current,t);B(e)}else B("scale(0)");null==O||O(!0),T(!0),c(e)})(m)},style:P.skipButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,P.skipButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,P.skipButton.base)},{children:o.SKIP_BUTTON})),e.jsx("div",Object.assign({style:P.imageContainer},{children:j.displayImage?e.jsx("img",{src:j.displayImage,alt:j.title,style:P.image,onError:e=>{j.image&&(e.target.src=j.image)}}):e.jsx("div",Object.assign({style:P.imagePlaceholder},{children:o.FEATURE_PREVIEW_PLACEHOLDER}))})),e.jsxs("div",Object.assign({style:P.contentContainer},{children:[e.jsxs("div",{children:[e.jsx("h3",Object.assign({style:P.title},{children:j.title})),e.jsx("div",{style:P.content,dangerouslySetInnerHTML:{__html:i(j.content||j.body||"")}}),e.jsx("button",Object.assign({onClick:()=>{d(),a(I.current);const e=u();if(e&&I.current){const t=l(I.current,e);B(t)}else B("scale(0)");null==O||O(!0),T(!0)},style:P.exploreButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,P.exploreButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,P.exploreButton.base)},{children:j.buttonText||o.DEFAULT_BUTTON_TEXT}))]}),p>1&&e.jsxs("div",Object.assign({style:P.navigationContainer},{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),v()},disabled:0===b,style:P.navigationButton(0===b).base,onMouseEnter:e=>{0!==b&&Object.assign(e.currentTarget.style,P.navigationButton(!1).hover)},onMouseLeave:e=>{0!==b&&Object.assign(e.currentTarget.style,P.navigationButton(!1).base)}},{children:o.NAVIGATION_PREVIOUS})),e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),y()},disabled:b===p-1,style:P.navigationButton(b===p-1).base,onMouseEnter:e=>{b!==p-1&&Object.assign(e.currentTarget.style,P.navigationButton(!1).hover)},onMouseLeave:e=>{b!==p-1&&Object.assign(e.currentTarget.style,P.navigationButton(b===p-1).base)}},{children:o.NAVIGATION_NEXT}))]}))]}))]}))};export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as s,useEffect as n}from"react";import{TEXT as r}from"./constants/index.js";import"../../constants/Theme.js";import"./constants/animations.js";import{getMinorPopupStyles as i}from"./styles/minorPopup.styles.js";import{decodeHTMLEntities as a}from"./utils/htmlHelpers.js";import{hideJoyrideArrow as l,calculateCloseTransform as o,executeAfterAnimation as c}from"./utils/animationHelpers.js";import{findFeatureTagElement as d}from"./utils/elementHelpers.js";const u=u=>{let{feature:j,currentIndex:m,totalFeatures:g,onSkip:p,onExplore:x,onPrevious:f,onNext:T,setIsClosing:h}=u;const[y,b]=t(!1),[E,O]=t(!1),[v,_]=t(""),C=s(null);n((()=>{y&&O(!0)}),[y]);const I=i(E,v);return e.jsxs("div",Object.assign({ref:C,style:I.container},{children:[e.jsx("div",Object.assign({style:I.imageContainer},{children:j.displayImage?e.jsxs("div",Object.assign({style:I.imageWrapper},{children:[e.jsx("img",{src:j.displayImage,alt:j.title,style:I.image,onError:e=>{j.image&&(e.target.src=j.image)}}),e.jsx("div",Object.assign({style:I.badge},{children:e.jsx("span",Object.assign({style:I.badgeText},{children:r.NEW_FEATURE_BADGE}))}))]})):e.jsx("div",Object.assign({style:I.imagePlaceholder},{children:r.FEATURE_PREVIEW_PLACEHOLDER}))})),e.jsxs("div",Object.assign({style:I.contentContainer},{children:[e.jsxs("div",{children:[e.jsx("h3",Object.assign({style:I.title},{children:j.title})),e.jsx("div",{style:I.content,dangerouslySetInnerHTML:{__html:a(j.content||j.body||"")}})]}),e.jsxs("div",Object.assign({style:I.actionsContainer},{children:[e.jsx("span",Object.assign({onClick:()=>{(e=>{if(l(C.current),C.current&&j.featureTag){const e=d(j.featureTag);if(e){const t=o(C.current,e);_(t)}else _("scale(0)")}else _("scale(0)");null==h||h(!0),b(!0),c(e)})(p)},style:I.understoodText},{children:r.UNDERSTOOD})),j.productVideo&&e.jsx("button",Object.assign({onClick:()=>{if(x(),l(C.current),C.current&&j.featureTag){const e=j.featureTag.startsWith("#")||j.featureTag.startsWith(".")||j.featureTag.startsWith("[")?j.featureTag:`#${j.featureTag}`,t=document.querySelector(e);if(t){const e=o(C.current,t);_(e)}else _("scale(0)")}else _("scale(0)");null==h||h(!0),b(!0)},style:I.exploreButton},{children:j.buttonText||r.DEFAULT_BUTTON_TEXT}))]}))]}))]}))};export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"../../node_modules/react/jsx-runtime.js";import{TEXT as s}from"./constants/index.js";import"../../constants/Theme.js";import"./constants/animations.js";import{videoModalStyles as t}from"./styles/videoModal.styles.js";import{formatVideoUrl as o,isYouTubeVideo as r}from"./utils/htmlHelpers.js";const i=i=>{let{isOpen:n,videoUrl:c,onClose:l}=i;if(!n)return null;const a=o(c),d=r(c);return e.jsx("div",Object.assign({style:t.backdrop,onClick:e=>{e.target===e.currentTarget&&l()}},{children:e.jsxs("div",Object.assign({style:t.container,onClick:e=>e.stopPropagation()},{children:[e.jsx("button",Object.assign({onClick:l,style:t.closeButton.base,onMouseOver:e=>Object.assign(e.currentTarget.style,t.closeButton.hover),onMouseOut:e=>Object.assign(e.currentTarget.style,t.closeButton.base)},{children:"×"})),e.jsx("div",Object.assign({style:t.videoWrapper},{children:c?d?e.jsx("iframe",{width:"100%",height:"100%",src:a,title:s.VIDEO_MODAL_TITLE,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,style:t.iframe}):e.jsxs("video",Object.assign({controls:!0,autoPlay:!0,style:t.video},{children:[e.jsx("source",{src:c,type:"video/mp4"}),e.jsx("source",{src:c,type:"video/webm"}),e.jsx("source",{src:c,type:"video/ogg"}),"Your browser does not support the video tag."]})):e.jsx("div",Object.assign({style:t.noVideoMessage},{children:s.NO_VIDEO_AVAILABLE}))}))]}))}))};export{i as VideoModal};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Animation timing constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const ANIMATION_TIMING: {
|
|
5
|
-
readonly CLOSE_DURATION: 1150;
|
|
6
|
-
readonly PROCESSING_DELAY: 500;
|
|
7
|
-
readonly MINOR_POPUP_DELAY: 2000;
|
|
8
|
-
readonly TRANSITION_DURATION: "1s";
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Animation easing functions
|
|
12
|
-
*/
|
|
13
|
-
export declare const ANIMATION_EASING: {
|
|
14
|
-
readonly STANDARD: "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Element check configuration
|
|
18
|
-
*/
|
|
19
|
-
export declare const ELEMENT_CHECK_CONFIG: {
|
|
20
|
-
readonly MAX_ATTEMPTS: 25;
|
|
21
|
-
readonly RETRY_INTERVAL_MS: 200;
|
|
22
|
-
readonly SCROLL_DEBOUNCE_MS: 300;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Combined transition string
|
|
26
|
-
*/
|
|
27
|
-
export declare const POPUP_TRANSITION: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const A={CLOSE_DURATION:1150,PROCESSING_DELAY:500,MINOR_POPUP_DELAY:2e3,TRANSITION_DURATION:"1s"},N={STANDARD:"cubic-bezier(0.4, 0, 0.2, 1)"},T=`transform ${A.TRANSITION_DURATION} ${N.STANDARD}, opacity ${A.TRANSITION_DURATION} ${N.STANDARD}`;export{N as ANIMATION_EASING,A as ANIMATION_TIMING,T as POPUP_TRANSITION};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Popup dimension constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const POPUP_DIMENSIONS: {
|
|
5
|
-
readonly MAJOR: {
|
|
6
|
-
readonly width: 959;
|
|
7
|
-
readonly height: 274;
|
|
8
|
-
readonly imageWidth: 480;
|
|
9
|
-
readonly imageHeight: 274;
|
|
10
|
-
readonly imageInnerWidth: 464;
|
|
11
|
-
readonly imageInnerHeight: 258;
|
|
12
|
-
readonly imagePlaceholderWidth: 290;
|
|
13
|
-
readonly imagePlaceholderHeight: 258;
|
|
14
|
-
};
|
|
15
|
-
readonly MINOR: {
|
|
16
|
-
readonly width: 519;
|
|
17
|
-
readonly height: 160;
|
|
18
|
-
readonly imageWidth: 235;
|
|
19
|
-
readonly imageHeight: 134;
|
|
20
|
-
readonly badgeHeight: 27;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Spacing constants
|
|
25
|
-
*/
|
|
26
|
-
export declare const SPACING: {
|
|
27
|
-
readonly MAJOR: {
|
|
28
|
-
readonly contentMargin: "0 8px 0 0";
|
|
29
|
-
readonly imagePadding: "8px";
|
|
30
|
-
readonly titlePadding: "36px 0 0 0";
|
|
31
|
-
readonly buttonMarginTop: "16px";
|
|
32
|
-
readonly skipButtonTop: "10px";
|
|
33
|
-
readonly skipButtonRight: "10px";
|
|
34
|
-
readonly navigationBottom: "16px";
|
|
35
|
-
readonly navigationRight: "16px";
|
|
36
|
-
readonly navigationGap: "8px";
|
|
37
|
-
};
|
|
38
|
-
readonly MINOR: {
|
|
39
|
-
readonly imageMargin: "13px 10px 13px 10px";
|
|
40
|
-
readonly contentMargin: "13px 13px 13px 3px";
|
|
41
|
-
readonly actionsBottom: "13px";
|
|
42
|
-
readonly actionsRight: "10px";
|
|
43
|
-
readonly actionsGap: "16px";
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Border radius constants
|
|
48
|
-
*/
|
|
49
|
-
export declare const BORDER_RADIUS: {
|
|
50
|
-
readonly POPUP: "4px";
|
|
51
|
-
readonly IMAGE: "4px";
|
|
52
|
-
readonly BUTTON: "4px";
|
|
53
|
-
readonly VIDEO_MODAL: "12px";
|
|
54
|
-
readonly CLOSE_BUTTON: "50%";
|
|
55
|
-
readonly SPOTLIGHT: "8px";
|
|
56
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const i={MAJOR:{width:959,height:274,imageWidth:480,imageHeight:274,imageInnerWidth:464,imageInnerHeight:258,imagePlaceholderWidth:290,imagePlaceholderHeight:258},MINOR:{width:519,height:160,imageWidth:235,imageHeight:134,badgeHeight:27}},t={MAJOR:{contentMargin:"0 8px 0 0",imagePadding:"8px",titlePadding:"36px 0 0 0",buttonMarginTop:"16px",skipButtonTop:"10px",skipButtonRight:"10px",navigationBottom:"16px",navigationRight:"16px",navigationGap:"8px"},MINOR:{imageMargin:"13px 10px 13px 10px",contentMargin:"13px 13px 13px 3px",actionsBottom:"13px",actionsRight:"10px",actionsGap:"16px"}},p={POPUP:"4px",IMAGE:"4px",BUTTON:"4px",VIDEO_MODAL:"12px",CLOSE_BUTTON:"50%",SPOTLIGHT:"8px"};export{p as BORDER_RADIUS,i as POPUP_DIMENSIONS,t as SPACING};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from './animations';
|
|
2
|
-
export * from './dimensions';
|
|
3
|
-
export * from './selectors';
|
|
4
|
-
export * from './zIndex';
|
|
5
|
-
export * from './localStorageKeys';
|
|
6
|
-
/**
|
|
7
|
-
* Text constants
|
|
8
|
-
*/
|
|
9
|
-
export declare const TEXT: {
|
|
10
|
-
readonly DEFAULT_BUTTON_TEXT: "Explore the feature";
|
|
11
|
-
readonly SKIP_BUTTON: "Skip";
|
|
12
|
-
readonly UNDERSTOOD: "Understood";
|
|
13
|
-
readonly NEW_FEATURE_BADGE: "New feature";
|
|
14
|
-
readonly FEATURE_PREVIEW_PLACEHOLDER: "Feature Preview";
|
|
15
|
-
readonly NO_VIDEO_AVAILABLE: "No video available";
|
|
16
|
-
readonly VIDEO_MODAL_TITLE: "Product Video";
|
|
17
|
-
readonly NAVIGATION_PREVIOUS: "‹";
|
|
18
|
-
readonly NAVIGATION_NEXT: "›";
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ANIMATION_EASING,ANIMATION_TIMING,POPUP_TRANSITION}from"./animations.js";const E={DEFAULT_BUTTON_TEXT:"Explore the feature",SKIP_BUTTON:"Skip",UNDERSTOOD:"Understood",NEW_FEATURE_BADGE:"New feature",FEATURE_PREVIEW_PLACEHOLDER:"Feature Preview",NO_VIDEO_AVAILABLE:"No video available",VIDEO_MODAL_TITLE:"Product Video",NAVIGATION_PREVIOUS:"‹",NAVIGATION_NEXT:"›"};export{E as TEXT};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Local storage keys for feature announcements
|
|
3
|
-
*/
|
|
4
|
-
export declare const LOCAL_STORAGE_KEYS: {
|
|
5
|
-
readonly STORE_ID: "storeId";
|
|
6
|
-
readonly BIK_STORE_ID: "Bik/StoreId";
|
|
7
|
-
readonly CURRENT_STORE: "currentStore";
|
|
8
|
-
readonly STORE: "store";
|
|
9
|
-
readonly CURRENT_USER: "Bik/CurrentUser";
|
|
10
|
-
readonly QUERY_PARAM: "storeId";
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* URL query parameters
|
|
14
|
-
*/
|
|
15
|
-
export declare const QUERY_PARAMS: {
|
|
16
|
-
readonly FEATURE_ID: "featureId";
|
|
17
|
-
readonly STORE_ID: "storeId";
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r={STORE_ID:"storeId",BIK_STORE_ID:"Bik/StoreId",CURRENT_STORE:"currentStore",STORE:"store",CURRENT_USER:"Bik/CurrentUser",QUERY_PARAM:"storeId"},R={FEATURE_ID:"featureId",STORE_ID:"storeId"};export{r as LOCAL_STORAGE_KEYS,R as QUERY_PARAMS};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors for feature announcements
|
|
3
|
-
*/
|
|
4
|
-
export declare const SELECTORS: {
|
|
5
|
-
readonly WHATS_NEW_BUTTON: "[data-testid=\"whats-new-button\"]";
|
|
6
|
-
readonly MAIN_ICON_CLASS: ".main-icon-class";
|
|
7
|
-
readonly SVG_VIEWBOX: "svg[viewBox=\"0 0 32 32\"]";
|
|
8
|
-
readonly CLIPPATH_PATTERN: "clipPath[id*=\"clip\"]";
|
|
9
|
-
readonly JOYRIDE_TOOLTIP: "[class*=\"react-joyride__tooltip\"]";
|
|
10
|
-
readonly JOYRIDE_ARROW: "[class*=\"react-joyride__arrow\"]";
|
|
11
|
-
readonly JOYRIDE_SPOTLIGHT: ".react-joyride__spotlight";
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Data test IDs
|
|
15
|
-
*/
|
|
16
|
-
export declare const TEST_IDS: {
|
|
17
|
-
readonly WHATS_NEW_BUTTON: "whats-new-button";
|
|
18
|
-
readonly MAJOR_POPUP: "major-update-popup";
|
|
19
|
-
readonly MINOR_POPUP: "minor-update-popup";
|
|
20
|
-
readonly VIDEO_MODAL: "video-modal";
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t={WHATS_NEW_BUTTON:'[data-testid="whats-new-button"]',MAIN_ICON_CLASS:".main-icon-class",SVG_VIEWBOX:'svg[viewBox="0 0 32 32"]',CLIPPATH_PATTERN:'clipPath[id*="clip"]',JOYRIDE_TOOLTIP:'[class*="react-joyride__tooltip"]',JOYRIDE_ARROW:'[class*="react-joyride__arrow"]',JOYRIDE_SPOTLIGHT:".react-joyride__spotlight"};export{t as SELECTORS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const O={JOYRIDE:1e4,VIDEO_MODAL:2e3,SKIP_BUTTON:10,IMAGE_BADGE:10,CLOSE_BUTTON:10};export{O as Z_INDEX};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useFeatureAnnouncements } from './useFeatureAnnouncements';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FeatureAnnouncement, FeatureAnnouncementRepository, RouterProps } from '../types';
|
|
2
|
-
export declare const useFeatureAnnouncements: ({ fetchVisibleFeatures, getStoreFeatureProgress, fetchFeatureById, markFeatureAsViewedForStore, isFeatureApplicableToCurrentPage, module, router, }: FeatureAnnouncementRepository & {
|
|
3
|
-
module?: string | undefined;
|
|
4
|
-
router?: RouterProps | undefined;
|
|
5
|
-
}) => {
|
|
6
|
-
features: FeatureAnnouncement[];
|
|
7
|
-
majorUpdateFeatures: FeatureAnnouncement[];
|
|
8
|
-
minorUpdateFeatures: FeatureAnnouncement[];
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
error: string | null;
|
|
11
|
-
markFeatureAsViewed: (featureId: string) => Promise<void>;
|
|
12
|
-
refetch: () => Promise<void>;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{useState as t,useCallback as r,useEffect as o}from"react";import{ANIMATION_TIMING as i}from"../constants/animations.js";import{QUERY_PARAMS as a,LOCAL_STORAGE_KEYS as n}from"../constants/localStorageKeys.js";const l=l=>{let{fetchVisibleFeatures:d,getStoreFeatureProgress:u,fetchFeatureById:s,markFeatureAsViewedForStore:c,isFeatureApplicableToCurrentPage:f,module:p,router:g}=l;var v;const y=(()=>{const[e,r]=t(null);return o((()=>{if("undefined"!=typeof window){let e=null;try{if(e=localStorage.getItem(n.STORE_ID)||localStorage.getItem(n.BIK_STORE_ID)||localStorage.getItem(n.CURRENT_STORE)||localStorage.getItem(n.STORE),!e){const t=localStorage.getItem(n.CURRENT_USER);t&&(e=JSON.parse(t).storeId)}e||(e=new URLSearchParams(window.location.search).get(n.QUERY_PARAM))}catch(e){}r(e)}}),[]),e})(),[m,D]=t([]),[U,w]=t([]),[h,R]=t([]),[I,S]=t(!1),[T,x]=t(null),E=r((()=>e(void 0,void 0,void 0,(function*(){if(y){S(!0),x(null);try{const[e,t]=yield d(p);if(e||!t)return void x("Failed to fetch features");const[r,o]=yield u(y),a=new Date,n="undefined"!=typeof window?window.location.pathname:"",l=e=>{if(!e.expirationDate)return!0;let t;return"object"==typeof e.expirationDate&&null!==e.expirationDate&&("seconds"in e.expirationDate||"nanoseconds"in e.expirationDate)?t=new Date(1e3*e.expirationDate.seconds):"string"==typeof e.expirationDate?t=new Date(e.expirationDate):e.expirationDate instanceof Date&&(t=e.expirationDate),!(!t||isNaN(t.getTime()))&&a<t},s=e=>{if("Major"===e.featureUpdateType){let t=[];return Array.isArray(e.pageUrls)?t=e.pageUrls:"object"==typeof e.pageUrls&&null!==e.pageUrls&&"length"in e.pageUrls&&(t=Array.from(e.pageUrls)),t.some((e=>{if(e===n)return!0;const t=e.replace(/\[([^\]]+)\]/g,"[^/]+").replace(/\//g,"\\/");return new RegExp(`^${t}$`).test(n)}))}return!0},c=t.filter((e=>{var t;const r=(null===(t=null==o?void 0:o.viewedFeatures)||void 0===t?void 0:t[e.id])||!1,i=e.archived||!1,a=f(e),n=l(e),d=s(e);return!r&&!i&&a&&n&&d})),g=c.filter((e=>"Major"===e.featureUpdateType)),v=c.filter((e=>"Minor"===e.featureUpdateType));D(c),w(g),setTimeout((()=>{R(v)}),i.MINOR_POPUP_DELAY)}catch(e){x("An unexpected error occurred")}finally{S(!1)}}}))),[y,d,u,f,p]),F=r((t=>e(void 0,void 0,void 0,(function*(){S(!0),x(null);try{const[e,r]=yield s(t);if(e||!r)return void x("Failed to fetch feature by ID");"Major"===r.featureUpdateType?w([r]):R([r]),D([r])}catch(e){x("An unexpected error occurred while fetching by ID")}finally{S(!1)}}))),[s]),A=r((t=>e(void 0,void 0,void 0,(function*(){if(!y)return;const[e]=yield c(y,t);D((e=>e.filter((e=>e.id!==t)))),w((e=>e.filter((e=>e.id!==t)))),R((e=>e.filter((e=>e.id!==t))))}))),[y,c]);return o((()=>{var e;const t=null===(e=null==g?void 0:g.query)||void 0===e?void 0:e[a.FEATURE_ID];t&&g?F(t):E()}),[null==g?void 0:g.pathname,null===(v=null==g?void 0:g.query)||void 0===v?void 0:v[a.FEATURE_ID],y,E,F,g]),{features:m,majorUpdateFeatures:U,minorUpdateFeatures:h,isLoading:I,error:T,markFeatureAsViewed:A,refetch:E}};export{l as useFeatureAnnouncements};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as FeatureAnnouncementProvider } from './FeatureAnnouncementProvider';
|
|
2
|
-
export { default as MajorUpdatePopup } from './MajorUpdatePopup';
|
|
3
|
-
export { default as MinorUpdatePopup } from './MinorUpdatePopup';
|
|
4
|
-
export { VideoModal } from './VideoModal';
|
|
5
|
-
export { useFeatureAnnouncements } from './hooks/useFeatureAnnouncements';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export { TEXT, ANIMATION_TIMING, POPUP_DIMENSIONS } from './constants';
|