@bikdotai/bik-component-library 0.0.508 → 0.0.509-beta.1
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/assets/{bundle-0deb4a74.css → bundle-22122157.css} +325 -0
- 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/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/carousel-preview/CarouselPreview.d.ts +2 -0
- package/dist/cjs/components/carousel-preview/CarouselPreview.js +32 -1
- package/dist/cjs/components/carousel-preview/CarouselPreview.style.js +2 -2
- package/dist/cjs/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +1 -0
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +4 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/assets/{bundle-0deb4a74.css → bundle-22122157.css} +325 -0
- 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/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +2 -0
- package/dist/esm/components/carousel-preview/CarouselPreview.js +32 -1
- package/dist/esm/components/carousel-preview/CarouselPreview.style.js +2 -2
- package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +1 -0
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +4 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/package.json +4 -1
|
@@ -1,5 +1,330 @@
|
|
|
1
1
|
.buttonBack___1mlaL,.buttonFirst___2rhFr,.buttonLast___2yuh0,.buttonNext___2mOCa,.buttonNext___3Lm3s,.dot___3c3SI{cursor:pointer}.image___xtQGH{display:block;width:100%;height:100%}.spinner___27VUp{position:absolute;top:calc(50% - 15px);left:calc(50% - 15px);width:30px;height:30px;animation-name:spin___S3UuE;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;border:4px solid #a9a9a9;border-top-color:#000;border-radius:30px}@keyframes spin___S3UuE{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.container___2O72F{position:relative;overflow:hidden;height:100%;width:100%}.overlay___IV4qY{position:absolute;top:0;left:0;bottom:0;right:0;opacity:0;cursor:zoom-in;transition:opacity .3s,transform .3s}.hover___MYy31,.loading___1pvNI,.zoom___3kqYk{opacity:1}.imageLoadingSpinnerContainer___3UIPD{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#f4f4f4}.slide___3-Nqo{position:relative;display:block;box-sizing:border-box;height:0;margin:0;list-style-type:none}.slide___3-Nqo:focus{outline:none!important}.slideHorizontal___1NzNV{float:left}[dir=rtl] .slideHorizontal___1NzNV{direction:rtl;transform:scaleX(-1)}.slideInner___2mfX9{position:absolute;top:0;left:0;width:100%;height:100%}.focusRing___1airF{position:absolute;top:5px;right:5px;bottom:5px;left:5px;pointer-events:none;outline-width:5px;outline-style:solid;outline-color:Highlight}@media (-webkit-min-device-pixel-ratio:0){.focusRing___1airF{outline-style:auto;outline-color:-webkit-focus-ring-color}}.horizontalSlider___281Ls{position:relative;overflow:hidden;touch-action:pan-y pinch-zoom}[dir=rtl] .horizontalSlider___281Ls{direction:ltr;transform:scaleX(-1)}.horizontalSliderTray___1L-0W{overflow:hidden;width:100%}.verticalSlider___34ZFD{position:relative;overflow:hidden}.verticalSliderTray___267D8{overflow:hidden}.verticalTray___12Key{float:left}.verticalSlideTrayWrap___2nO7o{overflow:hidden}.sliderTray___-vHFQ{display:block;list-style:none;padding:0;margin:0}.sliderAnimation___300FY{transition:transform .5s;transition-timing-function:cubic-bezier(.645,.045,.355,1);will-change:transform}.masterSpinnerContainer___1Z6hB{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#f4f4f4}
|
|
2
2
|
/*# sourceMappingURL=react-carousel.es.css.map */
|
|
3
|
+
@charset 'UTF-8';
|
|
4
|
+
/* Slider */
|
|
5
|
+
.slick-loading .slick-list
|
|
6
|
+
{
|
|
7
|
+
background: #fff url('./ajax-loader.gif') center center no-repeat;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Icons */
|
|
11
|
+
@font-face
|
|
12
|
+
{
|
|
13
|
+
font-family: 'slick';
|
|
14
|
+
font-weight: normal;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
|
|
17
|
+
src: url('./fonts/slick.eot');
|
|
18
|
+
src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
|
|
19
|
+
}
|
|
20
|
+
/* Arrows */
|
|
21
|
+
.slick-prev,
|
|
22
|
+
.slick-next
|
|
23
|
+
{
|
|
24
|
+
font-size: 0;
|
|
25
|
+
line-height: 0;
|
|
26
|
+
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 50%;
|
|
29
|
+
|
|
30
|
+
display: block;
|
|
31
|
+
|
|
32
|
+
width: 20px;
|
|
33
|
+
height: 20px;
|
|
34
|
+
padding: 0;
|
|
35
|
+
-webkit-transform: translate(0, -50%);
|
|
36
|
+
-ms-transform: translate(0, -50%);
|
|
37
|
+
transform: translate(0, -50%);
|
|
38
|
+
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
|
|
41
|
+
color: transparent;
|
|
42
|
+
border: none;
|
|
43
|
+
outline: none;
|
|
44
|
+
background: transparent;
|
|
45
|
+
}
|
|
46
|
+
.slick-prev:hover,
|
|
47
|
+
.slick-prev:focus,
|
|
48
|
+
.slick-next:hover,
|
|
49
|
+
.slick-next:focus
|
|
50
|
+
{
|
|
51
|
+
color: transparent;
|
|
52
|
+
outline: none;
|
|
53
|
+
background: transparent;
|
|
54
|
+
}
|
|
55
|
+
.slick-prev:hover:before,
|
|
56
|
+
.slick-prev:focus:before,
|
|
57
|
+
.slick-next:hover:before,
|
|
58
|
+
.slick-next:focus:before
|
|
59
|
+
{
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
.slick-prev.slick-disabled:before,
|
|
63
|
+
.slick-next.slick-disabled:before
|
|
64
|
+
{
|
|
65
|
+
opacity: .25;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.slick-prev:before,
|
|
69
|
+
.slick-next:before
|
|
70
|
+
{
|
|
71
|
+
font-family: 'slick';
|
|
72
|
+
font-size: 20px;
|
|
73
|
+
line-height: 1;
|
|
74
|
+
|
|
75
|
+
opacity: .75;
|
|
76
|
+
color: white;
|
|
77
|
+
|
|
78
|
+
-webkit-font-smoothing: antialiased;
|
|
79
|
+
-moz-osx-font-smoothing: grayscale;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.slick-prev
|
|
83
|
+
{
|
|
84
|
+
left: -25px;
|
|
85
|
+
}
|
|
86
|
+
[dir='rtl'] .slick-prev
|
|
87
|
+
{
|
|
88
|
+
right: -25px;
|
|
89
|
+
left: auto;
|
|
90
|
+
}
|
|
91
|
+
.slick-prev:before
|
|
92
|
+
{
|
|
93
|
+
content: '←';
|
|
94
|
+
}
|
|
95
|
+
[dir='rtl'] .slick-prev:before
|
|
96
|
+
{
|
|
97
|
+
content: '→';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.slick-next
|
|
101
|
+
{
|
|
102
|
+
right: -25px;
|
|
103
|
+
}
|
|
104
|
+
[dir='rtl'] .slick-next
|
|
105
|
+
{
|
|
106
|
+
right: auto;
|
|
107
|
+
left: -25px;
|
|
108
|
+
}
|
|
109
|
+
.slick-next:before
|
|
110
|
+
{
|
|
111
|
+
content: '→';
|
|
112
|
+
}
|
|
113
|
+
[dir='rtl'] .slick-next:before
|
|
114
|
+
{
|
|
115
|
+
content: '←';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Dots */
|
|
119
|
+
.slick-dotted.slick-slider
|
|
120
|
+
{
|
|
121
|
+
margin-bottom: 30px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.slick-dots
|
|
125
|
+
{
|
|
126
|
+
position: absolute;
|
|
127
|
+
bottom: -25px;
|
|
128
|
+
|
|
129
|
+
display: block;
|
|
130
|
+
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: 0;
|
|
133
|
+
margin: 0;
|
|
134
|
+
|
|
135
|
+
list-style: none;
|
|
136
|
+
|
|
137
|
+
text-align: center;
|
|
138
|
+
}
|
|
139
|
+
.slick-dots li
|
|
140
|
+
{
|
|
141
|
+
position: relative;
|
|
142
|
+
|
|
143
|
+
display: inline-block;
|
|
144
|
+
|
|
145
|
+
width: 20px;
|
|
146
|
+
height: 20px;
|
|
147
|
+
margin: 0 5px;
|
|
148
|
+
padding: 0;
|
|
149
|
+
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
}
|
|
152
|
+
.slick-dots li button
|
|
153
|
+
{
|
|
154
|
+
font-size: 0;
|
|
155
|
+
line-height: 0;
|
|
156
|
+
|
|
157
|
+
display: block;
|
|
158
|
+
|
|
159
|
+
width: 20px;
|
|
160
|
+
height: 20px;
|
|
161
|
+
padding: 5px;
|
|
162
|
+
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
|
|
165
|
+
color: transparent;
|
|
166
|
+
border: 0;
|
|
167
|
+
outline: none;
|
|
168
|
+
background: transparent;
|
|
169
|
+
}
|
|
170
|
+
.slick-dots li button:hover,
|
|
171
|
+
.slick-dots li button:focus
|
|
172
|
+
{
|
|
173
|
+
outline: none;
|
|
174
|
+
}
|
|
175
|
+
.slick-dots li button:hover:before,
|
|
176
|
+
.slick-dots li button:focus:before
|
|
177
|
+
{
|
|
178
|
+
opacity: 1;
|
|
179
|
+
}
|
|
180
|
+
.slick-dots li button:before
|
|
181
|
+
{
|
|
182
|
+
font-family: 'slick';
|
|
183
|
+
font-size: 6px;
|
|
184
|
+
line-height: 20px;
|
|
185
|
+
|
|
186
|
+
position: absolute;
|
|
187
|
+
top: 0;
|
|
188
|
+
left: 0;
|
|
189
|
+
|
|
190
|
+
width: 20px;
|
|
191
|
+
height: 20px;
|
|
192
|
+
|
|
193
|
+
content: '•';
|
|
194
|
+
text-align: center;
|
|
195
|
+
|
|
196
|
+
opacity: .25;
|
|
197
|
+
color: black;
|
|
198
|
+
|
|
199
|
+
-webkit-font-smoothing: antialiased;
|
|
200
|
+
-moz-osx-font-smoothing: grayscale;
|
|
201
|
+
}
|
|
202
|
+
.slick-dots li.slick-active button:before
|
|
203
|
+
{
|
|
204
|
+
opacity: .75;
|
|
205
|
+
color: black;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Slider */
|
|
209
|
+
.slick-slider
|
|
210
|
+
{
|
|
211
|
+
position: relative;
|
|
212
|
+
|
|
213
|
+
display: block;
|
|
214
|
+
box-sizing: border-box;
|
|
215
|
+
|
|
216
|
+
-webkit-user-select: none;
|
|
217
|
+
-moz-user-select: none;
|
|
218
|
+
-ms-user-select: none;
|
|
219
|
+
user-select: none;
|
|
220
|
+
|
|
221
|
+
-webkit-touch-callout: none;
|
|
222
|
+
-khtml-user-select: none;
|
|
223
|
+
-ms-touch-action: pan-y;
|
|
224
|
+
touch-action: pan-y;
|
|
225
|
+
-webkit-tap-highlight-color: transparent;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.slick-list
|
|
229
|
+
{
|
|
230
|
+
position: relative;
|
|
231
|
+
|
|
232
|
+
display: block;
|
|
233
|
+
overflow: hidden;
|
|
234
|
+
|
|
235
|
+
margin: 0;
|
|
236
|
+
padding: 0;
|
|
237
|
+
}
|
|
238
|
+
.slick-list:focus
|
|
239
|
+
{
|
|
240
|
+
outline: none;
|
|
241
|
+
}
|
|
242
|
+
.slick-list.dragging
|
|
243
|
+
{
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
cursor: hand;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.slick-slider .slick-track,
|
|
249
|
+
.slick-slider .slick-list
|
|
250
|
+
{
|
|
251
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
252
|
+
-moz-transform: translate3d(0, 0, 0);
|
|
253
|
+
-ms-transform: translate3d(0, 0, 0);
|
|
254
|
+
-o-transform: translate3d(0, 0, 0);
|
|
255
|
+
transform: translate3d(0, 0, 0);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.slick-track
|
|
259
|
+
{
|
|
260
|
+
position: relative;
|
|
261
|
+
top: 0;
|
|
262
|
+
left: 0;
|
|
263
|
+
|
|
264
|
+
display: block;
|
|
265
|
+
margin-left: auto;
|
|
266
|
+
margin-right: auto;
|
|
267
|
+
}
|
|
268
|
+
.slick-track:before,
|
|
269
|
+
.slick-track:after
|
|
270
|
+
{
|
|
271
|
+
display: table;
|
|
272
|
+
|
|
273
|
+
content: '';
|
|
274
|
+
}
|
|
275
|
+
.slick-track:after
|
|
276
|
+
{
|
|
277
|
+
clear: both;
|
|
278
|
+
}
|
|
279
|
+
.slick-loading .slick-track
|
|
280
|
+
{
|
|
281
|
+
visibility: hidden;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.slick-slide
|
|
285
|
+
{
|
|
286
|
+
display: none;
|
|
287
|
+
float: left;
|
|
288
|
+
|
|
289
|
+
height: 100%;
|
|
290
|
+
min-height: 1px;
|
|
291
|
+
}
|
|
292
|
+
[dir='rtl'] .slick-slide
|
|
293
|
+
{
|
|
294
|
+
float: right;
|
|
295
|
+
}
|
|
296
|
+
.slick-slide img
|
|
297
|
+
{
|
|
298
|
+
display: block;
|
|
299
|
+
}
|
|
300
|
+
.slick-slide.slick-loading img
|
|
301
|
+
{
|
|
302
|
+
display: none;
|
|
303
|
+
}
|
|
304
|
+
.slick-slide.dragging img
|
|
305
|
+
{
|
|
306
|
+
pointer-events: none;
|
|
307
|
+
}
|
|
308
|
+
.slick-initialized .slick-slide
|
|
309
|
+
{
|
|
310
|
+
display: block;
|
|
311
|
+
}
|
|
312
|
+
.slick-loading .slick-slide
|
|
313
|
+
{
|
|
314
|
+
visibility: hidden;
|
|
315
|
+
}
|
|
316
|
+
.slick-vertical .slick-slide
|
|
317
|
+
{
|
|
318
|
+
display: block;
|
|
319
|
+
|
|
320
|
+
height: auto;
|
|
321
|
+
|
|
322
|
+
border: 1px solid transparent;
|
|
323
|
+
}
|
|
324
|
+
.slick-arrow.slick-hidden {
|
|
325
|
+
display: none;
|
|
326
|
+
}
|
|
327
|
+
|
|
3
328
|
.ReactCrop{position:relative;display:inline-block;cursor:crosshair;overflow:hidden;max-width:100%}.ReactCrop *,.ReactCrop *:before,.ReactCrop *:after{box-sizing:border-box}.ReactCrop--disabled,.ReactCrop--locked{cursor:inherit}.ReactCrop__child-wrapper{max-height:inherit}.ReactCrop__child-wrapper>img,.ReactCrop__child-wrapper>video{display:block;max-width:100%;max-height:inherit}.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper>img,.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper>video{touch-action:none}.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__crop-selection{touch-action:none}.ReactCrop__crop-selection{position:absolute;top:0;left:0;transform:translateZ(0);cursor:move;box-shadow:0 0 0 9999em #00000080}.ReactCrop--disabled .ReactCrop__crop-selection{cursor:inherit}.ReactCrop--circular-crop .ReactCrop__crop-selection{border-radius:50%}.ReactCrop--no-animate .ReactCrop__crop-selection{outline:1px dashed white}.ReactCrop__crop-selection:not(.ReactCrop--no-animate .ReactCrop__crop-selection){animation:marching-ants 1s;background-image:linear-gradient(to right,#fff 50%,#444 50%),linear-gradient(to right,#fff 50%,#444 50%),linear-gradient(to bottom,#fff 50%,#444 50%),linear-gradient(to bottom,#fff 50%,#444 50%);background-size:10px 1px,10px 1px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;color:#fff;animation-play-state:running;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes marching-ants{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:20px 0,-20px 100%,0 -20px,100% 20px}}.ReactCrop__crop-selection:focus{outline:none;border-color:#00f;border-style:solid}.ReactCrop--invisible-crop .ReactCrop__crop-selection{display:none}.ReactCrop__rule-of-thirds-vt:before,.ReactCrop__rule-of-thirds-vt:after,.ReactCrop__rule-of-thirds-hz:before,.ReactCrop__rule-of-thirds-hz:after{content:"";display:block;position:absolute;background-color:#fff6}.ReactCrop__rule-of-thirds-vt:before,.ReactCrop__rule-of-thirds-vt:after{width:1px;height:100%}.ReactCrop__rule-of-thirds-vt:before{left:33.3333%;left:33.3333333333%}.ReactCrop__rule-of-thirds-vt:after{left:66.6666%;left:66.6666666667%}.ReactCrop__rule-of-thirds-hz:before,.ReactCrop__rule-of-thirds-hz:after{width:100%;height:1px}.ReactCrop__rule-of-thirds-hz:before{top:33.3333%;top:33.3333333333%}.ReactCrop__rule-of-thirds-hz:after{top:66.6666%;top:66.6666666667%}.ReactCrop__drag-handle{position:absolute}.ReactCrop__drag-handle:after{position:absolute;content:"";display:block;width:10px;height:10px;background-color:#0003;border:1px solid rgba(255,255,255,.7);outline:1px solid transparent}.ReactCrop__drag-handle:focus:after{border-color:#00f;background:#2dbfff}.ReactCrop .ord-nw{top:0;left:0;margin-top:-5px;margin-left:-5px;cursor:nw-resize}.ReactCrop .ord-nw:after{top:0;left:0}.ReactCrop .ord-n{top:0;left:50%;margin-top:-5px;margin-left:-5px;cursor:n-resize}.ReactCrop .ord-n:after{top:0}.ReactCrop .ord-ne{top:0;right:0;margin-top:-5px;margin-right:-5px;cursor:ne-resize}.ReactCrop .ord-ne:after{top:0;right:0}.ReactCrop .ord-e{top:50%;right:0;margin-top:-5px;margin-right:-5px;cursor:e-resize}.ReactCrop .ord-e:after{right:0}.ReactCrop .ord-se{bottom:0;right:0;margin-bottom:-5px;margin-right:-5px;cursor:se-resize}.ReactCrop .ord-se:after{bottom:0;right:0}.ReactCrop .ord-s{bottom:0;left:50%;margin-bottom:-5px;margin-left:-5px;cursor:s-resize}.ReactCrop .ord-s:after{bottom:0}.ReactCrop .ord-sw{bottom:0;left:0;margin-bottom:-5px;margin-left:-5px;cursor:sw-resize}.ReactCrop .ord-sw:after{bottom:0;left:0}.ReactCrop .ord-w{top:50%;left:0;margin-top:-5px;margin-left:-5px;cursor:w-resize}.ReactCrop .ord-w:after{left:0}.ReactCrop__disabled .ReactCrop__drag-handle{cursor:inherit}.ReactCrop__drag-bar{position:absolute}.ReactCrop__drag-bar.ord-n{top:0;left:0;width:100%;height:6px;margin-top:-3px}.ReactCrop__drag-bar.ord-e{right:0;top:0;width:6px;height:100%;margin-right:-3px}.ReactCrop__drag-bar.ord-s{bottom:0;left:0;width:100%;height:6px;margin-bottom:-3px}.ReactCrop__drag-bar.ord-w{top:0;left:0;width:6px;height:100%;margin-left:-3px}.ReactCrop--new-crop .ReactCrop__drag-bar,.ReactCrop--new-crop .ReactCrop__drag-handle,.ReactCrop--fixed-aspect .ReactCrop__drag-bar,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w{display:none}@media (pointer: coarse){.ReactCrop .ord-n,.ReactCrop .ord-e,.ReactCrop .ord-s,.ReactCrop .ord-w{display:none}.ReactCrop__drag-handle{width:24px;height:24px}}
|
|
4
329
|
|
|
5
330
|
@charset "UTF-8";/*!
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime"),i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var s=require("react");require("../../../checkBox/CheckBox.styled.js");var g=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js"),require("../../../icon-button/IconButton.js"),require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../curtain/CurtainHelper.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../modals/styledModal.js"),require("../../../template-preview/models/Channels.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../button/Button.js"),require("../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var I=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../heatmap/HeatMap.js"),require("../heatmap/HeatMapVertical.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../states/StateComponent.js"),require("../../../../_virtual/_tslib.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../discount-modal/CouponExpiration/CouponExpiration.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../modals/modal.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("pure-react-carousel"),require("../../../carousel-preview/CarouselPreview.style.js"),require("../../../card-selector/CardSelector.styled.js");var C=require("chart.js"),o=require("react-chartjs-2");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(e);C.Chart.register(C.ArcElement,C.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},d=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],u=a.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(u,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:t,slices:C,size:c}=e;const[a,u]=s.useState([]),[A,n]=s.useState();return s.useEffect((()=>{const e=C.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(C).map(((e,r)=>Object.assign({color:d[r%d.length]},C[e]))),u([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:C.map((e=>i.default.capitalize(e.name))),datasets:[{data:C.map((e=>e.count)),backgroundColor:C.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:d[r%d.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[C]),A?r.jsxs(r.Fragment,{children:[t&&r.jsx(g.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:c,height:c}},{children:r.jsx(o.Doughnut,{data:A,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!c})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(I.PieChart,{slices:a})}))]}))]}):r.jsx(r.Fragment,{})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/styled/base"),r=require("react/jsx-runtime"),i=require("../../../../utils/StringUtils.js"),t=require("../../../../constants/Theme.js");require("../../../../constants/zindex.js");var s=require("react");require("../../../checkBox/CheckBox.styled.js");var g=require("../../../TypographyStyle.js");require("../../../list-item/ListItem.js"),require("../../../pagination/Pagination.js"),require("../../../radioButton/RadioButton.styled.js"),require("react-dom"),require("react-toastify"),require("../../../toaster/Toaster.styled.js"),require("../../../tooltips/Tooltip.js"),require("../../../spinner/Spinner.js"),require("../../../stepper/Stepper.styled.js"),require("../../../tag/Tag.js"),require("../../../icon-button/IconButton.js"),require("../../../template-preview/TemplatePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js"),require("../../../curtain/CurtainHelper.js"),require("../../../template-preview/models/TemplateMeta.js"),require("../../../template-preview/models/WhatsAppTemplate.js"),require("../../../modals/styledModal.js"),require("../../../template-preview/models/Channels.js"),require("../../../template-context-mapper/context/templateModalContext.js"),require("../../../template-context-mapper/modalElements/Footer.js"),require("../../../template-context-mapper/modalElements/Body.js"),require("../../../template-context-mapper/modalElements/Header.js"),require("../../../zeroState/ZeroState.js"),require("../../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../../button/Button.js"),require("../../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../../input/Input.js"),require("react-bootstrap"),require("../../../floating-action-button/FloatingActionButton.styles.js"),require("../../../image-compress/ImageCompress.js"),require("../../../progress-bar/ProgressBarComponent.js"),require("../../../QueryBuilder/QueryBuilder.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js"),require("../../../QueryBuilder/constants/connectorPosition.js"),require("../../../QueryBuilder/constants/connector.js"),require("../../../QueryBuilder/types/QueryBuilder.type.js"),require("../../../dropdown/Dropdown.js"),require("../../../QueryBuilder/components/InputLoader.js"),require("../../../QueryBuilder/components/Connectors/Components/EmojiPicker.js"),require("react-chips"),require("../../../input/ChipInput.styled.js"),require("../../../QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js"),require("../../../QueryBuilder/components/Connectors/Components/IgPicker.js"),require("../../../QueryBuilder/components/Connectors/Components/InTheLast.js"),require("../../../QueryBuilder/components/Connectors/Components/InTwoLast.js"),require("react-calendar"),require("../../../../utils/DateUtils.js"),require("../../../datePicker/DatePickerWrapper.styled.js"),require("../../../QueryBuilder/components/Connectors/Connector.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.js"),require("../../../QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.js"),require("../../../QueryBuilder/redux/queryBuilder.reducer.js"),require("../../../QueryBuilder/redux/queryBuilderCache.reducer.js"),require("../../../QueryBuilder/types/QueryBuilderOperator.type.js"),require("../../../dropdown/DropdownPopover/index.js"),require("../../../dropdown/ChipDropdown.js"),require("../../../dropdown/MenuItem/MenuItem.js"),require("../../../shimmer/ShimmerComponent/ShimmerStyled.js"),require("../../../analytics-card/AnalyticsCard.styled.js"),require("../../CommonStyles.js"),require("../../../datePicker/DatePicker.styled.js"),require("../../AnalyticsMetric.js"),require("../LineChart/LineChart.js"),require("../linearChipGroupedChart/LinearChipGroupedChart.styled.js");var I=require("./PieChart.js");require("../HorizontalBarGraph/HorizontalGraph.js"),require("../StackedBarChart/StackedBarChart.js"),require("../StackedBarChart/StackedBarDistributionChart.js"),require("../StackedBarChart/StackedBarDistributionChart.model.js"),require("../VerticalBarGraph/VerticalGraph.js"),require("../heatmap/HeatMap.js"),require("../heatmap/HeatMapVertical.js"),require("../VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js"),require("../../../avatar/Avatar.js"),require("../../../avatar/AvatarHelper.js"),require("../../../alerts/Alert.styled.js"),require("../../../alerts/AlertHelper.js"),require("../../../thumbnail/Thumbnail.js"),require("../../../curtain/Curtain.styled.js"),require("../../../switch/Switch.js"),require("../../../plans/SubscriptionPlanStyled.js"),require("../../../plans/SubscriptionPlanSelector.js"),require("../../../plans/SubscriptionPlansCollected.js"),require("../../../tabs/Tabs.js"),require("../../../TablePagination/TablePagination.styled.js"),require("../../../TablePagination/TablePaginationCard.js"),require("../../../states/StateComponent.js"),require("../../../../_virtual/_tslib.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditor.js"),require("../../../WhatsAppTextEditor/WhatsAppTextEditorHeader.js"),require("../../../card-selection-modal/CardSelectionModal.styled.js"),require("react-image-crop"),require("../../../buttonGroup/ButtonGroupStyle.js"),require("../../../accordion/Accordion.style.js"),require("../../../accordion/AccordionArrow.js"),require("../../../file-uploader/FileUploaderStyle.js"),require("../../../colourInput/ColourInput.styled.js"),require("../../../bik-layout/CommonStyles.js"),require("../../../navigation-hyperlink/NavigationHyperlink.js"),require("../../../bik-layout/SidebarStyles.js"),require("date-fns"),require("react-popper"),require("../../../dropdown/Common.styled.js"),require("../../../custom-date-time/CustomDateTime.styled.js"),require("../../../../node_modules/lodash.debounce/index.js"),require("../../../product-picker/ProductPicker.styled.js"),require("../../../discount-modal/type.js"),require("../../../product-picker-v2/modal.js"),require("../../../discount-modal/DiscountModal.styled.js"),require("../../../discount-modal/DynamicCoupon/DynamicCoupon.js"),require("../../../discount-modal/CouponExpiration/CouponExpiration.js"),require("../../../country-code-picker/CountryCodePicker.styled.js"),require("../../../carousel/carousel.js"),require("../../../carousel-secondary/CarouselSecondary.style.js"),require("../../../access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.js"),require("../../../radioList/RadioList.styled.js"),require("../../../checkList/CheckList.styled.js"),require("../../../postPicker/postPicker.js"),require("../../../dropdown-button/DropdownButton.style.js"),require("../../../side-modal/SideModal.style.js"),require("../../../add-variableV2/AddVariableV2.styled.js"),require("../../../modals/modal.styled.js"),require("../../../SearchFilter/types/SearchFilter.type.js"),require("../../../SearchFilter/components/DatePickerButton.js"),require("../../../SearchFilter/components/DateRangeOnlyButton.js"),require("../../../input-with-vars/InputWithVariables.js"),require("../../../star-rating/StarRating.js"),require("../../../dashboard-review-popup/components/FiveStar.styled.js"),require("../../../dashboard-review-popup/components/Form.styled.js"),require("../../../dashboard-review-popup/components/ZeroState.js"),require("../../../dashboard-review-popup/DashboardReviewPopUp.styled.js"),require("../../../testimonial-card/TestimonialCard.style.js"),require("../../../slider/slider.js"),require("../../../carousel-preview/CarouselPreview.js"),require("../../../card-selector/CardSelector.styled.js");var C=require("chart.js"),o=require("react-chartjs-2");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(e);C.Chart.register(C.ArcElement,C.Legend);const l={plugins:{legend:{display:!1},tooltip:{enabled:!0,callbacks:{label:e=>{if(!e.label)return" 0%";const r=e.dataset.data.reduce(((e,r)=>e+r),0),i=parseFloat((e.raw/r*100).toFixed(1));return` ${e.label}: ${i}%`}}}}},d=["#5E07BB","#9E77ED","#D2AEFF","#CDE1FF","#92AFFA","#3935E1"],u=a.default("div","production"===process.env.NODE_ENV?{target:"elaov7f0"}:{target:"elaov7f0",label:"CartStyled"})("background:",(e=>t.COLORS.surface.standard),";border:1px solid ",(e=>t.COLORS.stroke.primary),";border-radius:4px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQzhCIiwiZmlsZSI6IlBpZUNoYXJ0QW5hbHl0aWNzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4LCBGcmFnbWVudCBhcyBfRnJhZ21lbnQsIGpzeHMgYXMgX2pzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBTdHJpbmdVdGlscyB9IGZyb20gXCIuLi8uLi8uLi8uLi9pbmRleFwiO1xyXG5pbXBvcnQgeyBBcmNFbGVtZW50LCBDaGFydCBhcyBDaGFydEpTLCBMZWdlbmQgfSBmcm9tICdjaGFydC5qcyc7XHJcbmltcG9ydCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tICdyZWFjdCc7XHJcbmltcG9ydCB7IERvdWdobnV0IH0gZnJvbSAncmVhY3QtY2hhcnRqcy0yJztcclxuaW1wb3J0IHsgVGl0bGVNZWRpdW0gfSBmcm9tIFwiLi4vLi4vLi4vVHlwb2dyYXBoeVN0eWxlXCI7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi8uLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgUGllQ2hhcnQgfSBmcm9tICcuL1BpZUNoYXJ0JztcclxuQ2hhcnRKUy5yZWdpc3RlcihBcmNFbGVtZW50LCBMZWdlbmQpO1xyXG5jb25zdCBvcHRpb25zID0ge1xyXG4gICAgcGx1Z2luczoge1xyXG4gICAgICAgIGxlZ2VuZDoge1xyXG4gICAgICAgICAgICBkaXNwbGF5OiBmYWxzZSxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHRvb2x0aXA6IHtcclxuICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2tzOiB7XHJcbiAgICAgICAgICAgICAgICBsYWJlbDogKHRvb2x0aXBJdGVtKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwSXRlbS5sYWJlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYCAwJWA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gdG9vbHRpcEl0ZW0uZGF0YXNldC5kYXRhLnJlZHVjZSgoYWNjLCBjdXIpID0+IGFjYyArIGN1ciwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVyY2VudGFnZSA9IHBhcnNlRmxvYXQoKCh0b29sdGlwSXRlbS5yYXcgLyB0b3RhbCkgKiAxMDApLnRvRml4ZWQoMSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBgICR7dG9vbHRpcEl0ZW0ubGFiZWx9OiAke3BlcmNlbnRhZ2V9JWA7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG59O1xyXG5jb25zdCBHUkFQSF9DT0xPUlMgPSBbXHJcbiAgICAnIzVFMDdCQicsXHJcbiAgICAnIzlFNzdFRCcsXHJcbiAgICAnI0QyQUVGRicsXHJcbiAgICAnI0NERTFGRicsXHJcbiAgICAnIzkyQUZGQScsXHJcbiAgICAnIzM5MzVFMScsXHJcbl07XHJcbmNvbnN0IENhcnRTdHlsZWQgPSBzdHlsZWQuZGl2IGBcblx0YmFja2dyb3VuZDogJHsocHJvcHMpID0+IENPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHsocHJvcHMpID0+IENPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDYXJkID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gX2pzeChDYXJ0U3R5bGVkLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHsgcGFkZGluZzogMjQgfSB9LCB7IGNoaWxkcmVuOiBwcm9wcy5jaGlsZHJlbiB9KSk7XHJcbn07XHJcbmV4cG9ydCBjb25zdCBQaWVDaGFydEFuYWx5dGljcyA9ICh7IHRpdGxlLCBzbGljZXMsIHNpemUsIH0pID0+IHtcclxuICAgIGNvbnN0IFtzbGljZXNXaXRoQ29sb3IsIHNldFNsaWNlc1dpdGhDb2xvcl0gPSB1c2VTdGF0ZShbXSk7XHJcbiAgICBjb25zdCBbZGF0YSwgc2V0RGF0YV0gPSB1c2VTdGF0ZSgpO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBjb25zdCB0b3RhbFN1bSA9IHNsaWNlcy5yZWR1Y2UoKHN1bSwgc2xpY2UpID0+IHN1bSArIHNsaWNlLmNvdW50LCAwKTtcclxuICAgICAgICBsZXQgdXBkYXRlZFNsaWNlc1dpdGhDb2xvciA9IFtdO1xyXG4gICAgICAgIHVwZGF0ZWRTbGljZXNXaXRoQ29sb3IgPSBPYmplY3Qua2V5cyhzbGljZXMpLm1hcCgoa2V5LCBpbmRleCkgPT4gKE9iamVjdC5hc3NpZ24oeyBjb2xvcjogR1JBUEhfQ09MT1JTW2luZGV4ICUgR1JBUEhfQ09MT1JTLmxlbmd0aF0gfSwgc2xpY2VzW2tleV0pKSk7XHJcbiAgICAgICAgc2V0U2xpY2VzV2l0aENvbG9yKFsuLi51cGRhdGVkU2xpY2VzV2l0aENvbG9yXSk7XHJcbiAgICAgICAgaWYgKHRvdGFsU3VtID09PSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGRhdGFTZXQgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhc2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogWzEwMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogWycjRjBGMEYwJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiAwLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXREYXRhKGRhdGFTZXQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgY29uc3QgZGF0YVNldCA9IHtcclxuICAgICAgICAgICAgICAgIGxhYmVsczogc2xpY2VzLm1hcCgoc2xpY2UpID0+IFN0cmluZ1V0aWxzLmNhcGl0YWxpemUoc2xpY2UubmFtZSkpLFxyXG4gICAgICAgICAgICAgICAgZGF0YXNldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHNsaWNlcy5tYXAoKHNsaWNlKSA9PiBzbGljZS5jb3VudCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogc2xpY2VzLm1hcCgoc2xpY2UsIGluZGV4KSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHNsaWNlLmNvbG9yKSAhPT0gbnVsbCAmJiBfYSAhPT0gdm9pZCAwID8gX2EgOiBHUkFQSF9DT0xPUlNbaW5kZXggJSBHUkFQSF9DT0xPUlMubGVuZ3RoXTsgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlckNvbG9yOiBbJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJywgJ3doaXRlJ10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcldpZHRoOiA0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IDgsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNldERhdGEoZGF0YVNldCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3NsaWNlc10pO1xyXG4gICAgaWYgKCFkYXRhKSB7XHJcbiAgICAgICAgcmV0dXJuIF9qc3goX0ZyYWdtZW50LCB7fSk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gKF9qc3hzKF9GcmFnbWVudCwgeyBjaGlsZHJlbjogW3RpdGxlICYmIChfanN4KFRpdGxlTWVkaXVtLCBPYmplY3QuYXNzaWduKHsgc3R5bGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5Cb3R0b206IDE2LFxyXG4gICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiB0aXRsZSB9KSkpLCBfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAncm93JyB9LCB7IGNoaWxkcmVuOiBbX2pzeChcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY2xhc3NOYW1lOiAnY29sLTYnIH0sIHsgY2hpbGRyZW46IF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KERvdWdobnV0LCB7IGRhdGE6IGRhdGEsIG9wdGlvbnM6IE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSwgb3B0aW9ucyksIHsgbWFpbnRhaW5Bc3BlY3RSYXRpbzogc2l6ZSA/IGZhbHNlIDogdHJ1ZSB9KSB9KSB9KSkgfSkpLCBfanN4KFwiZGl2XCIsIE9iamVjdC5hc3NpZ24oeyBjbGFzc05hbWU6ICdjb2wtNicsIHN0eWxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nTGVmdDogNDgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiAnZmxleCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGV4RGlyZWN0aW9uOiAnY29sdW1uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3RpZnlDb250ZW50OiAnY2VudGVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSB9LCB7IGNoaWxkcmVuOiBfanN4KFBpZUNoYXJ0LCB7IHNsaWNlczogc2xpY2VzV2l0aENvbG9yIH0pIH0pKV0gfSkpXSB9KSk7XHJcbn07XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVBpZUNoYXJ0QW5hbHl0aWNzLmpzLm1hcCJdfQ== */"));exports.Card=e=>r.jsx(u,Object.assign({style:{padding:24}},{children:e.children})),exports.PieChartAnalytics=e=>{let{title:t,slices:C,size:c}=e;const[a,u]=s.useState([]),[A,n]=s.useState();return s.useEffect((()=>{const e=C.reduce(((e,r)=>e+r.count),0);let r=[];if(r=Object.keys(C).map(((e,r)=>Object.assign({color:d[r%d.length]},C[e]))),u([...r]),0===e){n({datasets:[{data:[100],backgroundColor:["#F0F0F0"],borderWidth:0}]})}else{const e={labels:C.map((e=>i.default.capitalize(e.name))),datasets:[{data:C.map((e=>e.count)),backgroundColor:C.map(((e,r)=>{var i;return null!==(i=e.color)&&void 0!==i?i:d[r%d.length]})),borderColor:["white","white","white","white","white","white"],borderWidth:4,borderRadius:8}]};n(e)}}),[C]),A?r.jsxs(r.Fragment,{children:[t&&r.jsx(g.TitleMedium,Object.assign({style:{marginBottom:16}},{children:t})),r.jsxs("div",Object.assign({className:"row"},{children:[r.jsx("div",Object.assign({className:"col-6"},{children:r.jsx("div",Object.assign({style:{width:c,height:c}},{children:r.jsx(o.Doughnut,{data:A,options:Object.assign(Object.assign({},l),{maintainAspectRatio:!c})})}))})),r.jsx("div",Object.assign({className:"col-6",style:{paddingLeft:48,display:"flex",flexDirection:"column",justifyContent:"center"}},{children:r.jsx(I.PieChart,{slices:a})}))]}))]}):r.jsx(r.Fragment,{})};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import 'pure-react-carousel/dist/react-carousel.es.css';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import 'slick-carousel/slick/slick-theme.css';
|
|
4
|
+
import 'slick-carousel/slick/slick.css';
|
|
3
5
|
import { CHANNEL_TYPE } from "../template-preview/models/Channels";
|
|
4
6
|
import { EmailTemplateType } from "../template-preview/models/EmailTemplate";
|
|
5
7
|
import { SMSTemplateType } from "../template-preview/models/SmsTemplate";
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("../../assets/icons/chevronLeft.svg.js"),t=require("../../assets/icons/chevronRight.svg.js"),l=require("react"),s=require("react-slick"),r=require("styled-components"),o=require("./CarouselPreview.style.js"),i=require("./CarouselPreviewCard.js"),a=require("../../constants/Theme.js"),c=require("../template-context-mapper/context/templateModalContext.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(l),x=d(s),p=d(r);const h=u.default.forwardRef(((n,t)=>{let{channel:l,template:s,showSampleValues:r,isPreview:a,removeBottomBorder:d}=n;var u,p,h,j,C;const f=null===(u=null==s?void 0:s.components)||void 0===u?void 0:u[1].cards,{sliderRef:b,selectedCarouselIndex:w,cardCount:O}=c.useTemplateModalContext();let y="500px";const k=null!==(h=null===(p=null==s?void 0:s.components)||void 0===p?void 0:p[0].text)&&void 0!==h?h:"";return k.length>100&&k.length<300?y="530px":k.length>300&&k.length<600?y="560px":k.length>600&&k.length<900?y="590px":k.length>900&&k.length<1200&&(y="620px"),e.jsxs(o.Container,Object.assign({removeBottomBorder:d},{children:[e.jsx(i.default,{channel:l,currentTemplate:s,carouselCardIndex:-1,isPreview:a,width:"77%"}),!!(null==f?void 0:f.length)&&e.jsx(o.CarouselContainer,Object.assign({height:y},{children:e.jsx(m,Object.assign({cardCount:null!=O?O:0,selectedCarouselIndex:null!=w?w:-1},{children:e.jsx(x.default,Object.assign({ref:b,slidesToShow:1.3,swipeToSlide:!0,swipe:!0,infinite:!1,focusOnSelect:!0,arrows:!0,nextArrow:e.jsx(v,{}),prevArrow:e.jsx(g,{})},{children:null===(C=null===(j=null==s?void 0:s.components)||void 0===j?void 0:j[1].cards)||void 0===C?void 0:C.map(((n,t)=>{var r,o;const c={components:n.components,mapping:null===(o=null===(r=null==s?void 0:s.mapping)||void 0===r?void 0:r.cards)||void 0===o?void 0:o[t]};return e.jsx(i.default,{channel:l,currentTemplate:c,carouselCardIndex:t,isPreview:a,width:"100%"},t)}))}))}))}))]}))})),v=n=>{const{className:l,style:s,onClick:r}=n,{selectedCarouselIndex:o,setSelectedCarouselIndex:i}=c.useTemplateModalContext();return e.jsx("div",Object.assign({className:l,style:Object.assign(Object.assign({},s),{display:r&&(null!=o?o:-1)>-1?"flex":"none",content:"none"}),onClick:e=>{null==i||i((e=>e+1)),null==r||r(e)}},{children:e.jsx(t.default,{height:10,width:10,color:a.COLORS.content.primary})}))},g=t=>{const{className:l,style:s,onClick:r}=t,{selectedCarouselIndex:o,setSelectedCarouselIndex:i}=c.useTemplateModalContext();return e.jsx("div",Object.assign({className:l,style:Object.assign(Object.assign({},s),{display:r&&(null!=o?o:-1)>-1?"flex":"none",content:"none"}),onClick:e=>{null==i||i((e=>e-1)),null==r||r(e)}},{children:e.jsx(n.default,{height:10,width:10,color:a.COLORS.content.primary})}))},m=p.default.div`
|
|
2
|
+
width: calc(100% - 40px);
|
|
3
|
+
/* ${e=>e.selectedCarouselIndex<e.cardCount-1?"width: calc(100% - 48px);":"width: 100%;"} */
|
|
4
|
+
/* margin: auto; */
|
|
5
|
+
|
|
6
|
+
.slick-next:before {
|
|
7
|
+
content: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.slick-prev:before {
|
|
11
|
+
content: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.slick-next {
|
|
15
|
+
z-index: 10;
|
|
16
|
+
background: ${a.COLORS.background.base};
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
/* height: 100%; */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.slick-prev {
|
|
24
|
+
left: 0px;
|
|
25
|
+
z-index: 10;
|
|
26
|
+
background: ${a.COLORS.background.base};
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
/* height: 100%; */
|
|
31
|
+
}
|
|
32
|
+
`;exports.CarouselPreview=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../../assets/icons/info.svg.js"),i=require("../../input/Input.js"),a=require("../../TypographyStyle.js"),s=require("../../../constants/Theme.js"),n=require("../DiscountModal.styled.js");exports.default=o=>t.jsxs(n.StaticCouponContainerStyled,{children:[t.jsxs("div",Object.assign({className:"static-coupon__data"},{children:[t.jsx("div",Object.assign({className:"static-input__wrapper"},{children:t.jsx(i.Input,{maxCharLimit:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../../assets/icons/info.svg.js"),i=require("../../input/Input.js"),a=require("../../TypographyStyle.js"),s=require("../../../constants/Theme.js"),n=require("../DiscountModal.styled.js");exports.default=o=>t.jsxs(n.StaticCouponContainerStyled,{children:[t.jsxs("div",Object.assign({className:"static-coupon__data"},{children:[t.jsx("div",Object.assign({className:"static-input__wrapper"},{children:t.jsx(i.Input,{maxCharLimit:30,onChangeText:t=>{o.setDiscountData(Object.assign(Object.assign({},o.discountData),{couponCode:null==t?void 0:t.trim()}))},labelText:"Coupon code",value:o.discountData.couponCode,placeholder:"Enter code created on shopify"})})),t.jsx("div",Object.assign({className:"static-input__wrapper"},{children:t.jsx(i.Input,{maxCharLimit:30,labelText:"Coupon title",value:o.discountData.title,onChangeText:t=>{o.setDiscountData(Object.assign(Object.assign({},o.discountData),{title:null==t?void 0:t.trim()}))},placeholder:"Enter coupon title"})}))]})),t.jsx(i.Input,{maxCharLimit:60,labelText:"Coupon description",value:o.discountData.description,onChangeText:t=>{o.setDiscountData(Object.assign(Object.assign({},o.discountData),{description:null==t?void 0:t.trim()}))},placeholder:"Enter coupon description"}),!o.hideProbability&&t.jsx(i.Input,{labelText:"Probability",value:o.discountData.probability?o.discountData.probability.toString():"",onChangeText:t=>{o.setDiscountData(Object.assign(Object.assign({},o.discountData),{probability:t.startsWith(".")?parseFloat(parseFloat(`0${t}`).toFixed(2)):parseFloat(parseFloat(t).toFixed(2))}))},placeholder:"Enter probability in decimals (0 - 1)"}),o.discountAdminUrl&&t.jsxs("div",Object.assign({className:"info__container"},{children:[t.jsx(e.default,{height:18,width:18,color:s.DEFAULT_THEME.colorsV2.content.secondary}),t.jsx(a.BodySecondaryLink,Object.assign({onClick:()=>{window.open(o.discountAdminUrl,"_blank")}},{children:"Click here"})),t.jsx(a.BodySecondary,{children:"to create discount code on Shopify"})]}))]});
|
|
@@ -24,6 +24,7 @@ interface CollectionsScreenInterface {
|
|
|
24
24
|
hideCollectionCheckbox?: boolean;
|
|
25
25
|
renderWithoutModal?: boolean;
|
|
26
26
|
pickerType?: 'COLLECTION' | 'PRODUCT';
|
|
27
|
+
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
27
28
|
}
|
|
28
29
|
export declare const CollectionsScreen: (props: CollectionsScreenInterface) => import("react/jsx-runtime").JSX.Element;
|
|
29
30
|
export interface CollectionCardInterface {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronRight.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronRight.svg.js"),l=require("react"),r=require("../checkBox/CheckBox.js"),i=require("../icon-button/IconButton.js"),c=require("../tag/Tag.js"),n=require("../tooltips/Tooltip.js"),s=require("../TypographyStyle.js"),o=require("./emptyState.js"),d=require("./ProductPickerShimmer.js"),a=require("./style.js"),u=require("./utility.js");const h=l=>{const{customCollectionRestriction:o,data:d,selectedCollectionsDispatch:u,setCollectionId:h,setSelectedCollectionId:C,isPartiallyChecked:p,setScreen:v,id:j,isChecked:g,isDisabled:y,hideCollectionCheckbox:x,pickerType:b,usedInSearch:m}=l;return e.jsxs(a.CollectionCardStyle,Object.assign({isDisabled:y,onClick:e=>{if(!y){if("COLLECTION"===b)return e.stopPropagation(),u({type:"reset",data:{}}),u({type:"selected",data:{id:j,val:d,isRestricted:o}}),h(j),void C(j);h(j),C(j),v("products")}},isActive:g,usedInSearch:null!=m&&m},{children:[e.jsxs(a.CollectionCardInfoStyle,{children:[!x&&e.jsx(r.CheckBox,{isDisabled:y,isChecked:g,isPartiallyChecked:p,onValueChange:function(e,t,l){null==l||l.stopPropagation(),u(e?{type:"selected",data:{id:j,val:d,isRestricted:o}}:{type:"unselected",data:{id:j}}),C(e?j:"")}}),e.jsx(a.CollectionCardDetailStyle,{children:e.jsx(n.Tooltip,Object.assign({body:d.name,placement:"bottom",delay:400,variant:"light"},{children:e.jsxs(a.CollectionNameHolder,{children:[m?e.jsx(s.BodyPrimary,Object.assign({numberOfLines:1},{children:d.name})):e.jsx(s.TitleRegular,Object.assign({numberOfLines:1},{children:d.name})),d.isSmartCollection?e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(c.Tag,{tagText:"Smart Collection",type:"warning"})})):e.jsx(e.Fragment,{})]})}))})]}),"COLLECTION"!==b&&e.jsx(i.IconButton,{height:12,width:12,disabled:y,Icon:t.default})]}))};exports.CollectionCard=h,exports.CollectionsScreen=t=>{var r;const{customCollectionRestriction:i,dataLoading:c,collections:n,selectedCollectionsDispatch:s,setCollectionId:a,setSelectedCollectionId:C,selectedCollections:p,setScreen:v,collectionFetcher:j,collectionsDispatch:g,pagingControls:y,storeId:x,setSaveDisabled:b,hideCollectionCheckbox:m,renderWithoutModal:f,pickerType:k,scrollContainerRef:S}=t,O=l.useRef(null),P=l.useRef(y.curPage),I=!!i&&(null==p?void 0:p.isCustom),[T,R]=l.useState(!1),q=l.useRef(!1),D=l.useRef(!1),L=()=>{if(!S||!(null==S?void 0:S.current))return;const{scrollTop:e,clientHeight:t,scrollHeight:l}=S.current;e+t>=l-20&&!q.current&&!D.current&&(b(!0),R(!0),D.current=!0,b(!0),R(!0),j(P.current,x).then((e=>{g({type:"paged",data:(null==e?void 0:e.collections)||{}}),y.setCurPage(P.current+1),R(!1),b(!1),D.current=!1,Object.keys(null==e?void 0:e.collections).length||(q.current=!0)})).catch())};return l.useEffect((()=>{var e;return null===(e=null==S?void 0:S.current)||void 0===e||e.addEventListener("scroll",L),()=>{var e;null===(e=null==S?void 0:S.current)||void 0===e||e.removeEventListener("scroll",L)}}),[]),l.useEffect((()=>{P.current=y.curPage}),[y.curPage]),l.useEffect((()=>{const e=new IntersectionObserver((e=>{e[0].isIntersecting&&P.current>0&&!q.current&&(b(!0),R(!0),j(P.current,x).then((e=>{g({type:"paged",data:(null==e?void 0:e.collections)||{}}),y.setCurPage(P.current+1),R(!1),b(!1),Object.keys(e).length||(q.current=!0)})).catch())}),{threshold:1});return O.current&&e.observe(O.current),()=>{O.current&&e.unobserve(O.current)}}),[O]),e.jsxs("div",{children:[(null===(r=Object.keys(null!=n?n:{}))||void 0===r?void 0:r.length)?Object.keys(n).map((t=>{var l,r;const c=!!(null==p?void 0:p[t])&&("PRODUCT"!==k||!!Object.keys(null!==(r=null===(l=null==p?void 0:p[t])||void 0===l?void 0:l.products)&&void 0!==r?r:{}).length);return e.jsx(h,{customCollectionRestriction:i,data:n[t],isDisabled:I&&!(null==p?void 0:p[t]),isChecked:c,isPartiallyChecked:u.isCollectionPartiallyChecked(t,null==n?void 0:n[t],p),selectedCollectionsDispatch:s,setCollectionId:a,setSelectedCollectionId:C,setScreen:v,id:t,hideCollectionCheckbox:m||"-1"===t,selectedCollections:p,renderWithoutModal:f,pickerType:k},t)})):c?e.jsx(d.ProductPickerShimmer,{}):e.jsx(o.EmptyState,{title:"No collections to show",subtitle:"We couldn’t find any collection."}),e.jsx("div",{ref:O}),T&&e.jsx(d.ProductPickerShimmer,{})]})},exports.truncate=(e,t,l)=>{if(!e)return"";if(e.length<=t)return e;const r=e.slice(0,t-1);return(l?r.slice(0,r.lastIndexOf(" ")):r)+"..."};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react/jsx-runtime"),o=require("../../assets/icons/search.svg.js"),c=require("react"),r=require("../../constants/Theme.js"),s=require("../button/Button.js"),n=require("../input/Input.js"),l=require("../modals/styledModal.js"),i=require("../spinner/Spinner.js"),a=require("../tag/Tag.js"),d=require("./collectionScreen.js"),u=require("./productInfoOverlay.js"),h=require("./productScreen.js"),p=require("./rearrangeScreen.js"),S=require("./reducers.js"),C=require("./searchScreen.js"),x=require("./selectedScreen.js"),g=require("./style.js"),j=require("./type.js");exports.ScreenName=void 0,(e=exports.ScreenName||(exports.ScreenName={})).Collections="collections",e.RearrangeProducts="rearrange",e.SelectedProducts="view",e.SearchProducts="searchProducts",e.Products="products";exports.ProductPickerModal=e=>{const{storeId:y,selectedItems:b,onClose:f,visible:m,zIndex:v,exactLimit:P,limit:k,hideCollectionCheckbox:O,hideProductCheckbox:I,outOfStockAction:F=j.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:R,selectProductsFromCustomCollection:T,hideSelectionCount:q,title:E,width:D,renderWithoutModal:w,onClickSave:N,pickerType:A,hideProductVariants:B=!1,startupScreen:M=exports.ScreenName.Collections,rearrangeEnabled:V,selectSingleItem:$=!1,showProductDetails:L,containerStyle:_}=e,[z,W]=c.useReducer(S.collectionsReducer,{}),[G,H]=c.useState([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(M)?M:exports.ScreenName.Collections),[K,U]=c.useState("grid"),[Y,J]=c.useState(""),[Q,X]=c.useState(""),[Z,ee]=c.useState(0),[te,oe]=c.useState(!1),[ce,re]=c.useState(0),[se,ne]=c.useState(""),[le,ie]=c.useState(!1),[ae,de]=c.useState(!1),[ue,he]=c.useReducer(S.searchReducer,{collections:{},products:{}}),[pe,Se]=c.useReducer(S.selectedColectionsReducer,Object.keys(b).length>0?b:{}),Ce=c.useRef(null),[xe,ge]=c.useState(!1),[je,ye]=c.useState();c.useEffect((()=>{oe(!0),de(!0),e.collectionFetcher(Z,y).then((e=>{W({type:"fetched",data:(null==e?void 0:e.collections)||{}}),oe(!1),ee((e=>e+1)),de(!1)})).catch()}),[]),c.useEffect((()=>{let e=0;B?Object.keys(pe||[]).forEach((t=>{var o;Object.keys((null===(o=pe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&pe[-1]&&(null===(c=pe[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(pe||[]).forEach((t=>{var o;Object.keys((null===(o=pe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=pe[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),re(e)}),[z,pe,B]),c.useEffect((()=>{Q&&(oe(!0),e.productFetcher(Q,y).then((e=>{Object.keys(e).length&&W({type:"productsFetched",data:{collectionId:Q,products:e}}),oe(!1)})).catch())}),[Q]),c.useEffect((()=>{const t=setTimeout((()=>{"rearrange"!==G&&(se.length||"collections"!==G)&&(se.length?(ie(!0),e.searchFetcher(y,se).then((e=>{"collections"in e&&"products"in e?(he({type:"set",data:e}),W({type:"searched",data:e.collections})):(he({type:"set",data:{collections:{},products:e}}),W({type:"searched",data:e})),H("searchProducts"),oe(!1),ie(!1)}))):H("collections"))}),800);return()=>clearTimeout(t)}),[se]),c.useEffect((()=>{N&&(e.onAdd(pe,ce),be())}),[N]),c.useEffect((()=>{$&&Object.keys(pe||{}).length&&ce&&(e.onAdd(pe,ce),be())}),[$,pe,ce]);const be=()=>{Se({type:"reset",data:{}})},fe=t.jsxs(g.ContainerStyle,Object.assign({style:null!=_?_:{}},{children:[e.postHeader&&t.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:e.postHeader})),!e.hideGlobalSearch&&t.jsx(t.Fragment,{children:("collections"===G||"searchProducts"===G)&&t.jsx("div",Object.assign({style:{padding:w?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:t.jsx(n.Input,{placeholder:"Search Collections or Products",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>le?t.jsx(i.Spinner,{size:"small",color:r.COLORS.content.primary}):t.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:se,onChangeText:e=>{e.length&&e.trim().length?ne(e):ne("")}})}))}),t.jsxs(g.ScrollContainerStyle,Object.assign({ref:Ce,screenName:G},{children:["collections"===G&&t.jsx(d.CollectionsScreen,{customCollectionRestriction:e.customCollectionRestriction,dataLoading:ae,collections:z,selectedCollectionsDispatch:Se,setCollectionId:J,setSelectedCollectionId:X,setScreen:H,selectedCollections:pe,collectionFetcher:e.collectionFetcher,storeId:y,collectionsDispatch:W,setSaveDisabled:oe,pagingControls:{curPage:Z,setCurPage:ee},hideCollectionCheckbox:O,renderWithoutModal:w,pickerType:A}),"products"===G&&Y&&t.jsx(S.CollectionIdContext.Provider,Object.assign({value:Y},{children:t.jsx(h.ProductsScreen,{hideInCollectionSearch:e.hideInCollectionSearch,customCollectionRestriction:e.customCollectionRestriction,productFetcher:e.productFetcher,setScreen:H,storeId:y,data:z[Y],collectionsDispatch:W,selectedCollectionsDispatch:Se,selectedData:pe,setSaveDisabled:oe,searchInCollectionFetcher:e.searchInCollectionFetcher,hideProductCheckbox:I,outOfStockAction:F,hideVariantCheckbox:R,selectProductsFromCustomCollection:T,renderWithoutModal:w,pickerType:A,hideProductVariants:B,fbStatusFetcher:e.fbStatusFetcher,onProductDetailClick:e=>{ge(!0),ye(e)},showProductDetailInfoIcon:L,scrollContainerRef:Ce})})),"view"===G&&t.jsx(x.SelectedScreen,{selectedCollections:pe||{},selectedCollectionsDispatch:Se,setScreen:H,collections:z,hideProductVariants:B,outOfStockAction:F,storeId:y,fbStatusFetcher:e.fbStatusFetcher}),"rearrange"===G&&t.jsx(p.RearrangeScreen,{selectedCollections:pe||{},selectedCollectionsDispatch:Se,setScreen:H,outOfStockAction:F,rearrangeViewType:"grid"===K?"list":"grid",scrollContainerRef:Ce,storeId:y,fbStatusFetcher:e.fbStatusFetcher}),"searchProducts"===G&&t.jsx(C.SearchScreen,{customCollectionRestriction:e.customCollectionRestriction,selectedCollections:pe||{},searchedCollections:ue||{},searchedCollectionsDispatch:he,selectedCollectionsDispatch:Se,setScreen:H,collections:z,onBackPress:()=>{ne(""),he({type:"set",data:{collections:{},products:{}}})},pickerType:A,hideProductCheckbox:I,hideProductVariants:B,hideVariantCheckbox:R,storeId:y,fbStatusFetcher:e.fbStatusFetcher,setCollectionId:J,setSelectedCollectionId:X,renderWithoutModal:w,hideCollectionCheckbox:O,outOfStockAction:F})]}))]}));return t.jsx(t.Fragment,{children:w?fe:t.jsxs(l.StyledModal,Object.assign({zIndex:v,open:m,onClose:()=>{null==f||f(),be()},headingTitle:E||("collections"===G||"products"===G?"Select Products":"view"===G?"Selected Products":"searchProducts"===G?"Searched Results":"rearrange"===G?"Rearrange Products":void 0),footerShadow:!0,centralContainerStyles:{width:D||"600px"},headerRightCustomElement:t.jsx(t.Fragment,{}),footerContainerStyle:e.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:r.COLORS.surface.standard}:void 0,primaryButton:{buttonText:te?"Loading...":G===exports.ScreenName.RearrangeProducts?"Done":"Add",disabled:te||ce<1||P&&ce<P||!P&&k&&ce>k||!1,onClick:()=>{e.onAdd(pe,ce),be()}},wrapperStyle:e.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:q?t.jsx(t.Fragment,{}):P&&ce>P?t.jsx(a.Tag,{tagText:`You can only select ${P} products`,type:"negative"}):k&&ce>k?t.jsx(a.Tag,{tagText:`You can only select ${k} products`,type:"negative"}):ce>0?t.jsx(s.Button,{onClick:()=>{H(V?exports.ScreenName.RearrangeProducts:exports.ScreenName.SelectedProducts)},buttonText:P?`${ce}/${P} products selected`:`${ce} products selected`,buttonType:["rearrange","view"].includes(G)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(G)}):t.jsx(s.Button,{disabled:!0,buttonText:P?`${ce}/${P} products selected`:`${ce} products selected`,buttonType:"tertiaryGray"}),hideCrossButton:xe},{children:[fe,xe&&je?t.jsx(u.ProductInfoOverlay,{productData:je,outOfStockAction:F,onClose:()=>{ge(!1)}}):t.jsx(t.Fragment,{})]}))})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react/jsx-runtime"),o=require("../../assets/icons/search.svg.js"),c=require("react"),r=require("../../constants/Theme.js"),s=require("../button/Button.js"),n=require("../input/Input.js"),l=require("../modals/styledModal.js"),i=require("../spinner/Spinner.js"),a=require("../tag/Tag.js"),d=require("./collectionScreen.js"),u=require("./productInfoOverlay.js"),h=require("./productScreen.js"),p=require("./rearrangeScreen.js"),S=require("./reducers.js"),C=require("./searchScreen.js"),x=require("./selectedScreen.js"),g=require("./style.js"),j=require("./type.js");exports.ScreenName=void 0,(e=exports.ScreenName||(exports.ScreenName={})).Collections="collections",e.RearrangeProducts="rearrange",e.SelectedProducts="view",e.SearchProducts="searchProducts",e.Products="products";exports.ProductPickerModal=e=>{const{storeId:y,selectedItems:b,onClose:f,visible:m,zIndex:v,exactLimit:P,limit:k,hideCollectionCheckbox:O,hideProductCheckbox:I,outOfStockAction:F=j.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:R,selectProductsFromCustomCollection:T,hideSelectionCount:q,title:E,width:D,renderWithoutModal:w,onClickSave:N,pickerType:A,hideProductVariants:B=!1,startupScreen:M=exports.ScreenName.Collections,rearrangeEnabled:V,selectSingleItem:$=!1,showProductDetails:L,containerStyle:_}=e,[z,W]=c.useReducer(S.collectionsReducer,{}),[G,H]=c.useState([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(M)?M:exports.ScreenName.Collections),[K,U]=c.useState("grid"),[Y,J]=c.useState(""),[Q,X]=c.useState(""),[Z,ee]=c.useState(0),[te,oe]=c.useState(!1),[ce,re]=c.useState(0),[se,ne]=c.useState(""),[le,ie]=c.useState(!1),[ae,de]=c.useState(!1),[ue,he]=c.useReducer(S.searchReducer,{collections:{},products:{}}),[pe,Se]=c.useReducer(S.selectedColectionsReducer,Object.keys(b).length>0?b:{}),Ce=c.useRef(null),[xe,ge]=c.useState(!1),[je,ye]=c.useState();c.useEffect((()=>{oe(!0),de(!0),e.collectionFetcher(Z,y).then((e=>{W({type:"fetched",data:(null==e?void 0:e.collections)||{}}),oe(!1),ee((e=>e+1)),de(!1)})).catch()}),[]),c.useEffect((()=>{let e=0;B?Object.keys(pe||[]).forEach((t=>{var o;Object.keys((null===(o=pe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&pe[-1]&&(null===(c=pe[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(pe||[]).forEach((t=>{var o;Object.keys((null===(o=pe[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=pe[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),re(e)}),[z,pe,B]),c.useEffect((()=>{Q&&(oe(!0),e.productFetcher(Q,y).then((e=>{Object.keys(e).length&&W({type:"productsFetched",data:{collectionId:Q,products:e}}),oe(!1)})).catch())}),[Q]),c.useEffect((()=>{const t=setTimeout((()=>{"rearrange"!==G&&(se.length||"collections"!==G)&&(se.length?(ie(!0),e.searchFetcher(y,se).then((e=>{"collections"in e&&"products"in e?(he({type:"set",data:e}),W({type:"searched",data:e.collections})):(he({type:"set",data:{collections:{},products:e}}),W({type:"searched",data:e})),H("searchProducts"),oe(!1),ie(!1)}))):H("collections"))}),800);return()=>clearTimeout(t)}),[se]),c.useEffect((()=>{N&&(e.onAdd(pe,ce),be())}),[N]),c.useEffect((()=>{$&&Object.keys(pe||{}).length&&ce&&(e.onAdd(pe,ce),be())}),[$,pe,ce]);const be=()=>{Se({type:"reset",data:{}})},fe=t.jsxs(g.ContainerStyle,Object.assign({style:null!=_?_:{}},{children:[e.postHeader&&t.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:e.postHeader})),!e.hideGlobalSearch&&t.jsx(t.Fragment,{children:("collections"===G||"searchProducts"===G)&&t.jsx("div",Object.assign({style:{padding:w?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:t.jsx(n.Input,{placeholder:"Search Collections or Products",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>le?t.jsx(i.Spinner,{size:"small",color:r.COLORS.content.primary}):t.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:se,onChangeText:e=>{e.length&&e.trim().length?ne(e):ne("")}})}))}),t.jsxs(g.ScrollContainerStyle,Object.assign({ref:Ce,screenName:G},{children:["collections"===G&&t.jsx(d.CollectionsScreen,{customCollectionRestriction:e.customCollectionRestriction,dataLoading:ae,collections:z,selectedCollectionsDispatch:Se,setCollectionId:J,setSelectedCollectionId:X,setScreen:H,selectedCollections:pe,collectionFetcher:e.collectionFetcher,storeId:y,collectionsDispatch:W,setSaveDisabled:oe,pagingControls:{curPage:Z,setCurPage:ee},hideCollectionCheckbox:O,renderWithoutModal:w,pickerType:A,scrollContainerRef:Ce}),"products"===G&&Y&&t.jsx(S.CollectionIdContext.Provider,Object.assign({value:Y},{children:t.jsx(h.ProductsScreen,{hideInCollectionSearch:e.hideInCollectionSearch,customCollectionRestriction:e.customCollectionRestriction,productFetcher:e.productFetcher,setScreen:H,storeId:y,data:z[Y],collectionsDispatch:W,selectedCollectionsDispatch:Se,selectedData:pe,setSaveDisabled:oe,searchInCollectionFetcher:e.searchInCollectionFetcher,hideProductCheckbox:I,outOfStockAction:F,hideVariantCheckbox:R,selectProductsFromCustomCollection:T,renderWithoutModal:w,pickerType:A,hideProductVariants:B,fbStatusFetcher:e.fbStatusFetcher,onProductDetailClick:e=>{ge(!0),ye(e)},showProductDetailInfoIcon:L,scrollContainerRef:Ce})})),"view"===G&&t.jsx(x.SelectedScreen,{selectedCollections:pe||{},selectedCollectionsDispatch:Se,setScreen:H,collections:z,hideProductVariants:B,outOfStockAction:F,storeId:y,fbStatusFetcher:e.fbStatusFetcher}),"rearrange"===G&&t.jsx(p.RearrangeScreen,{selectedCollections:pe||{},selectedCollectionsDispatch:Se,setScreen:H,outOfStockAction:F,rearrangeViewType:"grid"===K?"list":"grid",scrollContainerRef:Ce,storeId:y,fbStatusFetcher:e.fbStatusFetcher}),"searchProducts"===G&&t.jsx(C.SearchScreen,{customCollectionRestriction:e.customCollectionRestriction,selectedCollections:pe||{},searchedCollections:ue||{},searchedCollectionsDispatch:he,selectedCollectionsDispatch:Se,setScreen:H,collections:z,onBackPress:()=>{ne(""),he({type:"set",data:{collections:{},products:{}}})},pickerType:A,hideProductCheckbox:I,hideProductVariants:B,hideVariantCheckbox:R,storeId:y,fbStatusFetcher:e.fbStatusFetcher,setCollectionId:J,setSelectedCollectionId:X,renderWithoutModal:w,hideCollectionCheckbox:O,outOfStockAction:F})]}))]}));return t.jsx(t.Fragment,{children:w?fe:t.jsxs(l.StyledModal,Object.assign({zIndex:v,open:m,onClose:()=>{null==f||f(),be()},headingTitle:E||("collections"===G||"products"===G?"Select Products":"view"===G?"Selected Products":"searchProducts"===G?"Searched Results":"rearrange"===G?"Rearrange Products":void 0),footerShadow:!0,centralContainerStyles:{width:D||"600px"},headerRightCustomElement:t.jsx(t.Fragment,{}),footerContainerStyle:e.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:r.COLORS.surface.standard}:void 0,primaryButton:{buttonText:te?"Loading...":G===exports.ScreenName.RearrangeProducts?"Done":"Add",disabled:te||ce<1||P&&ce<P||!P&&k&&ce>k||!1,onClick:()=>{e.onAdd(pe,ce),be()}},wrapperStyle:e.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:q?t.jsx(t.Fragment,{}):P&&ce>P?t.jsx(a.Tag,{tagText:`You can only select ${P} products`,type:"negative"}):k&&ce>k?t.jsx(a.Tag,{tagText:`You can only select ${k} products`,type:"negative"}):ce>0?t.jsx(s.Button,{onClick:()=>{H(V?exports.ScreenName.RearrangeProducts:exports.ScreenName.SelectedProducts)},buttonText:P?`${ce}/${P} products selected`:`${ce} products selected`,buttonType:["rearrange","view"].includes(G)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(G)}):t.jsx(s.Button,{disabled:!0,buttonText:P?`${ce}/${P} products selected`:`${ce} products selected`,buttonType:"tertiaryGray"}),hideCrossButton:xe},{children:[fe,xe&&je?t.jsx(u.ProductInfoOverlay,{productData:je,outOfStockAction:F,onClose:()=>{ge(!1)}}):t.jsx(t.Fragment,{})]}))})};
|