@surfside/ads-react 0.1.17 → 0.1.18
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/lib/cjs/BuildInfo.js +1 -1
- package/lib/cjs/BuildInfo.js.map +1 -1
- package/lib/cjs/hooks/useSurfsideProducts.js +17 -6
- package/lib/cjs/hooks/useSurfsideProducts.js.map +1 -1
- package/lib/cjs/provider/SurfsideContextProvider.js +16 -0
- package/lib/cjs/provider/SurfsideContextProvider.js.map +1 -1
- package/lib/esm/BuildInfo.js +1 -1
- package/lib/esm/BuildInfo.js.map +1 -1
- package/lib/esm/components/SurfsideBanner.js +43 -0
- package/lib/esm/components/SurfsideBanner.js.map +1 -0
- package/lib/esm/components/SurfsideBannerRenderer.js +41 -0
- package/lib/esm/components/SurfsideBannerRenderer.js.map +1 -0
- package/lib/esm/components/SurfsideBannerVideoRenderer.js +21 -0
- package/lib/esm/components/SurfsideBannerVideoRenderer.js.map +1 -0
- package/lib/esm/components/SurfsideCarousel.js +112 -0
- package/lib/esm/components/SurfsideCarousel.js.map +1 -0
- package/lib/esm/components/SurfsideDynamicZone.js +136 -0
- package/lib/esm/components/SurfsideDynamicZone.js.map +1 -0
- package/lib/esm/components/SurfsideProduct.js +113 -0
- package/lib/esm/components/SurfsideProduct.js.map +1 -0
- package/lib/esm/components/SurfsideVideo.js +81 -0
- package/lib/esm/components/SurfsideVideo.js.map +1 -0
- package/lib/esm/components/SurfsideVideoRenderer.js +38 -0
- package/lib/esm/components/SurfsideVideoRenderer.js.map +1 -0
- package/lib/esm/components/index.js +9 -0
- package/lib/esm/components/index.js.map +1 -0
- package/lib/esm/hooks/index.js +5 -0
- package/lib/esm/hooks/index.js.map +1 -0
- package/lib/esm/hooks/useSurfsideBanner.js +209 -0
- package/lib/esm/hooks/useSurfsideBanner.js.map +1 -0
- package/lib/esm/hooks/useSurfsideDynamicZone.js +278 -0
- package/lib/esm/hooks/useSurfsideDynamicZone.js.map +1 -0
- package/lib/esm/hooks/useSurfsideProducts.js +438 -0
- package/lib/esm/hooks/useSurfsideProducts.js.map +1 -0
- package/lib/esm/hooks/useSurfsideVideo.js +293 -0
- package/lib/esm/hooks/useSurfsideVideo.js.map +1 -0
- package/lib/esm/index.js +20 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/provider/SurfsideContextProvider.js +168 -0
- package/lib/esm/provider/SurfsideContextProvider.js.map +1 -0
- package/lib/esm/provider/index.js +2 -0
- package/lib/esm/provider/index.js.map +1 -0
- package/lib/esm/utils/Analytics.js +171 -0
- package/lib/esm/utils/Analytics.js.map +1 -0
- package/lib/esm/utils/index.js +2 -0
- package/lib/esm/utils/index.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
3
|
+
import { useSurfsideContext } from '../provider';
|
|
4
|
+
import { AsyncPipe, Err, Ok, Ctx } from '@surfside/ads-core-client';
|
|
5
|
+
import { useSurfsideProductsResponse, useSurfsideBannerResponse, useSurfsideVideoResponse } from '../hooks';
|
|
6
|
+
;
|
|
7
|
+
;
|
|
8
|
+
;
|
|
9
|
+
;
|
|
10
|
+
;
|
|
11
|
+
;
|
|
12
|
+
/**
|
|
13
|
+
* @overload
|
|
14
|
+
*
|
|
15
|
+
* Returns a typed version of the `UseSurfsideDynamicZoneReturn` populated with full product data, if product data is
|
|
16
|
+
* available. If you pass `withProductInfo: true` to props (or pass nothing at all), this overload will be used.
|
|
17
|
+
* @expandType UseSurfDynamicZoneOptionsWithProductInfo
|
|
18
|
+
* @param {UseSurfDynamicZoneOptionsWithProductInfo} props
|
|
19
|
+
*/ ;
|
|
20
|
+
/**
|
|
21
|
+
* React hook for surfside dynamic zones. A dynamic zone is a creative which determines which type of creative to
|
|
22
|
+
* request based on the dimensions of the screen (i.e, it can request different creatives for desktop vs mobile).
|
|
23
|
+
* Dynamic zones can also define an order of priority for backup creatives. This requires you to have configured a
|
|
24
|
+
* dynamic zone ahead of time within the Surfside platform
|
|
25
|
+
*
|
|
26
|
+
* For example, a dynamic zone might be configured to request A carousel and a 4x1 banner on Desktop, or a 1x4 banner
|
|
27
|
+
* and 1x1 video on Mobile. Once it has selected the screen size, it will send a request for all configured creative
|
|
28
|
+
* types. It will then return the first available creative in order of priority. In our example, the dynamic zone might
|
|
29
|
+
* detect that we are on a Desktop view and then request the carousel and 4x1 banner at the same time. It will then try
|
|
30
|
+
* to render the carousel, if it is available. If it is not, it will render the banner. If neither are available,
|
|
31
|
+
* `useSurfsideDynamicZone` will return an error of type {@link NoBidsError}.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* To handle the output of each creative, check the `type` field after checking the value of `loading` and `error`.
|
|
35
|
+
* It is recommended that you implement renderer components which you can pass creative responses to, rather than trying
|
|
36
|
+
* to render each creative in the same component as your `useSurfsideDynamicZone` call.
|
|
37
|
+
*
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const { data, error, loading, type } = useSurfsideDynamicZone({
|
|
40
|
+
* zoneId: 'my-zone'
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* if (loading) {
|
|
44
|
+
* return <div>Loading...</div>
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* if (error !== undefined) {
|
|
48
|
+
* throw error.error; // error.error is a Javascript Error type and can be safely thrown.
|
|
49
|
+
* }
|
|
50
|
+
*
|
|
51
|
+
* switch(type) {
|
|
52
|
+
* case 'banner': return <MyRenderBannerComponent banner={data} />;
|
|
53
|
+
* case 'video': return <MyRenderVideoComponent video={data} />;
|
|
54
|
+
* case 'products': return <MyRenderCarouselComponent products={data} />;
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* This pattern will allow you to re-use the renderer component across dynamic zones or pages where you call the other
|
|
59
|
+
* use hooks (i.e, `useSurfsideBanner`, `useSurfsideProducts`) directly.
|
|
60
|
+
* @param {UseSurfDynamicZoneOptions} props
|
|
61
|
+
*/
|
|
62
|
+
export function useSurfsideDynamicZone({ zoneId, pageSize, enabled = true, withProductInfo = true, category }) {
|
|
63
|
+
const { getDynamicZone, buildDynamicZoneRequest, buildDynamicResponse, isReady: apiIsReady, hasError: apiHasError, error: apiError, logger } = useSurfsideContext();
|
|
64
|
+
const log = Ctx(logger)?.with('useSurfsideDynamicZone');
|
|
65
|
+
const stableCategory = useMemo(() => category, [category?.join(',') ?? '']);
|
|
66
|
+
const [type, setType] = useState();
|
|
67
|
+
/* Products */
|
|
68
|
+
const [productsProps, setProductsProps] = useState();
|
|
69
|
+
const productsResponseState = useSurfsideProductsResponse(productsProps);
|
|
70
|
+
/* Banner */
|
|
71
|
+
const [bannerProps, setBannerProps] = useState();
|
|
72
|
+
const bannerResponseState = useSurfsideBannerResponse(bannerProps);
|
|
73
|
+
/* Video */
|
|
74
|
+
const [videoProps, setVideoProps] = useState();
|
|
75
|
+
const videoResponseState = useSurfsideVideoResponse(videoProps);
|
|
76
|
+
const [loading, setLoading] = useState(true);
|
|
77
|
+
const [error, setError] = useState();
|
|
78
|
+
const fetchDynamicZone = useCallback(async () => {
|
|
79
|
+
const localLog = log?.with('fetchDynamicZone');
|
|
80
|
+
if (!enabled || !apiIsReady) {
|
|
81
|
+
if (apiHasError) {
|
|
82
|
+
localLog?.debug('api has error', apiError);
|
|
83
|
+
setErrorState(apiError);
|
|
84
|
+
}
|
|
85
|
+
localLog?.debug('Not fetching dynamic zone yet');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setLoadingState();
|
|
89
|
+
// Get dynamic response
|
|
90
|
+
const result = await AsyncPipe(getDynamicZone(zoneId))
|
|
91
|
+
.then((zone) => buildDynamicZoneRequest(zoneId, zone, stableCategory ?? []))
|
|
92
|
+
.then(buildDynamicResponse)
|
|
93
|
+
.result();
|
|
94
|
+
/* If no creatives are available, this may return an error that should be handled explicitly */
|
|
95
|
+
if (!result.ok) {
|
|
96
|
+
localLog?.debug('No creatives available, setting error state');
|
|
97
|
+
setErrorState(result);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const dynamicZone = result.value;
|
|
101
|
+
if (dynamicZone.type === 'carousel') {
|
|
102
|
+
localLog?.debug('Got carousel back from dynamic zone');
|
|
103
|
+
setProductsSuccessState(Ok(dynamicZone)); // re-box for type purposes
|
|
104
|
+
}
|
|
105
|
+
else if (dynamicZone.type === 'banner') {
|
|
106
|
+
localLog?.debug('Got banner back from dynamic zone');
|
|
107
|
+
setBannerSuccessState(Ok(dynamicZone));
|
|
108
|
+
}
|
|
109
|
+
else if (dynamicZone.type === 'video') {
|
|
110
|
+
localLog?.debug('Got video back from dynamic zone');
|
|
111
|
+
setVideoSuccessState(Ok(dynamicZone));
|
|
112
|
+
}
|
|
113
|
+
}, [
|
|
114
|
+
enabled,
|
|
115
|
+
apiError,
|
|
116
|
+
apiIsReady,
|
|
117
|
+
apiHasError,
|
|
118
|
+
getDynamicZone,
|
|
119
|
+
zoneId,
|
|
120
|
+
stableCategory?.join(',') ?? '',
|
|
121
|
+
]);
|
|
122
|
+
// Fetch dynamic zone when dependencies change
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
log?.info('Fetching dynamic zone', apiIsReady);
|
|
125
|
+
fetchDynamicZone();
|
|
126
|
+
}, [fetchDynamicZone]);
|
|
127
|
+
const setLoadingState = () => {
|
|
128
|
+
log?.info('Setting loading state');
|
|
129
|
+
setLoading(true);
|
|
130
|
+
setError(undefined);
|
|
131
|
+
setBannerProps(undefined);
|
|
132
|
+
setProductsProps(undefined);
|
|
133
|
+
setType(undefined);
|
|
134
|
+
};
|
|
135
|
+
const setErrorState = (error) => {
|
|
136
|
+
log?.info('Setting error state');
|
|
137
|
+
setLoading(false);
|
|
138
|
+
setError(error);
|
|
139
|
+
};
|
|
140
|
+
const setProductsSuccessState = (products) => {
|
|
141
|
+
log?.info('Setting carousel success state');
|
|
142
|
+
setError(undefined);
|
|
143
|
+
setType('products');
|
|
144
|
+
setProductsProps({
|
|
145
|
+
zoneId,
|
|
146
|
+
category: stableCategory,
|
|
147
|
+
carousel: products,
|
|
148
|
+
pageSize,
|
|
149
|
+
strategy: products.value.dynamicCarouselRequest.strategy,
|
|
150
|
+
withProductInfo
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
const setBannerSuccessState = (banner) => {
|
|
154
|
+
log?.info('Setting banner success state');
|
|
155
|
+
setError(undefined);
|
|
156
|
+
setType('banner');
|
|
157
|
+
const { width, height } = banner.value.dynamicBannerRequest;
|
|
158
|
+
setBannerProps({
|
|
159
|
+
banner,
|
|
160
|
+
zoneId,
|
|
161
|
+
size: [width, height],
|
|
162
|
+
category: stableCategory
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
const setVideoSuccessState = (video) => {
|
|
166
|
+
log?.info('Setting video success state');
|
|
167
|
+
setError(undefined);
|
|
168
|
+
setType('video');
|
|
169
|
+
const request = video.value.dynamicVideoRequest;
|
|
170
|
+
setVideoProps({
|
|
171
|
+
video,
|
|
172
|
+
category: stableCategory,
|
|
173
|
+
mimes: ['video/mp4', 'video/webm'],
|
|
174
|
+
minDuration: request.minDuration,
|
|
175
|
+
maxDuration: request.maxDuration,
|
|
176
|
+
zoneId: request.zoneId,
|
|
177
|
+
size: [request.width, request.height],
|
|
178
|
+
enabled
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
// Set loading to false if an error occurs or all response states are not loading
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
// If there is an error, ensure loading is false
|
|
184
|
+
if (error !== undefined) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
// If all response states are not loading, set loading to false
|
|
188
|
+
const allResponsesLoaded = (type === 'banner' && bannerResponseState?.loading === false) ||
|
|
189
|
+
(type === 'products' && productsResponseState?.loading === false) ||
|
|
190
|
+
(type === 'video' && videoResponseState?.loading === false);
|
|
191
|
+
if (allResponsesLoaded) {
|
|
192
|
+
setLoading(false);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
setLoading(true);
|
|
196
|
+
}
|
|
197
|
+
}, [
|
|
198
|
+
error,
|
|
199
|
+
type,
|
|
200
|
+
bannerResponseState?.loading,
|
|
201
|
+
productsResponseState?.loading,
|
|
202
|
+
videoResponseState?.loading
|
|
203
|
+
]);
|
|
204
|
+
if (error !== undefined) {
|
|
205
|
+
return {
|
|
206
|
+
type: undefined,
|
|
207
|
+
loading: false,
|
|
208
|
+
refetchDynamicZone: fetchDynamicZone,
|
|
209
|
+
data: undefined,
|
|
210
|
+
error
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
else if (loading || !enabled) {
|
|
214
|
+
return {
|
|
215
|
+
type: undefined,
|
|
216
|
+
loading: true,
|
|
217
|
+
refetchDynamicZone: fetchDynamicZone,
|
|
218
|
+
data: undefined,
|
|
219
|
+
error
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
else if (type === 'banner' &&
|
|
223
|
+
bannerResponseState !== undefined &&
|
|
224
|
+
bannerResponseState.loading === false &&
|
|
225
|
+
bannerResponseState.error === undefined) {
|
|
226
|
+
return {
|
|
227
|
+
type: 'banner',
|
|
228
|
+
loading,
|
|
229
|
+
error,
|
|
230
|
+
data: bannerResponseState,
|
|
231
|
+
refetchDynamicZone: fetchDynamicZone
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
else if (type === 'products' && productsResponseState !== undefined) {
|
|
235
|
+
return {
|
|
236
|
+
type: 'products',
|
|
237
|
+
loading,
|
|
238
|
+
error,
|
|
239
|
+
data: productsResponseState,
|
|
240
|
+
refetchDynamicZone: fetchDynamicZone
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
else if (type === 'video' && videoResponseState !== undefined) {
|
|
244
|
+
return {
|
|
245
|
+
type: 'video',
|
|
246
|
+
loading,
|
|
247
|
+
error,
|
|
248
|
+
data: videoResponseState,
|
|
249
|
+
refetchDynamicZone: fetchDynamicZone
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
log?.debug('Invalid dynamic zone state', zoneId);
|
|
254
|
+
log?.debug('Type', type);
|
|
255
|
+
log?.debug('Loading', loading);
|
|
256
|
+
log?.debug('Banner response state', bannerResponseState);
|
|
257
|
+
log?.debug('Products response state', productsResponseState);
|
|
258
|
+
log?.debug('Video response state', videoResponseState);
|
|
259
|
+
log?.debug('Error', error);
|
|
260
|
+
return {
|
|
261
|
+
error: Err(new InvalidDynamicZoneState(zoneId)),
|
|
262
|
+
loading: false,
|
|
263
|
+
data: undefined,
|
|
264
|
+
refetchDynamicZone: fetchDynamicZone,
|
|
265
|
+
type: undefined
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
;
|
|
270
|
+
export class InvalidDynamicZoneState extends Error {
|
|
271
|
+
zoneId;
|
|
272
|
+
constructor(zoneId) {
|
|
273
|
+
super('useSurfsideDynamicZone was left in an invalid state. This is an internal error, please ' +
|
|
274
|
+
'contact Surfside');
|
|
275
|
+
this.zoneId = zoneId;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=useSurfsideDynamicZone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurfsideDynamicZone.js","sourceRoot":"src/","sources":["hooks/useSurfsideDynamicZone.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAOH,SAAS,EACT,GAAG,EACH,EAAE,EACF,GAAG,EACN,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAUH,2BAA2B,EAC3B,yBAAyB,EAEzB,wBAAwB,EAC3B,MAAM,UAAU,CAAC;AAqHjB,CAAC;AAWD,CAAC;AAUD,CAAC;AAoBD,CAAC;AAYD,CAAC;A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