@uniformdev/context-react 19.135.0 → 19.135.1-alpha.11
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/index.d.mts +12 -15
- package/dist/index.d.ts +12 -15
- package/dist/index.esm.js +10 -10
- package/dist/index.js +10 -10
- package/dist/index.mjs +10 -10
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import react__default, { ReactNode, ReactElement, HTMLAttributes } from 'react';
|
|
|
6
6
|
* Provides reactive access to the Uniform Context's current visitor quirks values
|
|
7
7
|
* This can be used when you want to read current quirk values directly.
|
|
8
8
|
*/
|
|
9
|
-
declare function useQuirks(): Quirks;
|
|
9
|
+
declare function useQuirks(options?: Parameters<typeof useUniformContext>[0]): Quirks;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Provides reactive access to the Uniform Context's current visitor scores values.
|
|
@@ -113,7 +113,7 @@ interface TestComponentProps<TVariation extends TestVariant> {
|
|
|
113
113
|
/** A React component to use to render the test variant. */
|
|
114
114
|
component: react__default.ComponentType<TVariation>;
|
|
115
115
|
}
|
|
116
|
-
declare const Test: <
|
|
116
|
+
declare const Test: <TVariation extends TestVariant>(props: TestComponentProps<TVariation>) => ReactElement | null;
|
|
117
117
|
|
|
118
118
|
type TrackFragmentProps = {
|
|
119
119
|
/** Behavior that will be pushed when tracking occurs. */
|
|
@@ -176,7 +176,6 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
176
176
|
id?: string | undefined;
|
|
177
177
|
lang?: string | undefined;
|
|
178
178
|
nonce?: string | undefined;
|
|
179
|
-
placeholder?: string | undefined;
|
|
180
179
|
slot?: string | undefined;
|
|
181
180
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
182
181
|
style?: react.CSSProperties | undefined;
|
|
@@ -208,33 +207,33 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
208
207
|
results?: number | undefined;
|
|
209
208
|
security?: string | undefined;
|
|
210
209
|
unselectable?: "on" | "off" | undefined;
|
|
211
|
-
inputMode?: "
|
|
210
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
212
211
|
is?: string | undefined;
|
|
213
212
|
"aria-activedescendant"?: string | undefined;
|
|
214
213
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
215
|
-
"aria-autocomplete"?: "none" | "
|
|
214
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
216
215
|
"aria-braillelabel"?: string | undefined;
|
|
217
216
|
"aria-brailleroledescription"?: string | undefined;
|
|
218
217
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
219
|
-
"aria-checked"?: boolean | "
|
|
218
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
220
219
|
"aria-colcount"?: number | undefined;
|
|
221
220
|
"aria-colindex"?: number | undefined;
|
|
222
221
|
"aria-colindextext"?: string | undefined;
|
|
223
222
|
"aria-colspan"?: number | undefined;
|
|
224
223
|
"aria-controls"?: string | undefined;
|
|
225
|
-
"aria-current"?: boolean | "
|
|
224
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
226
225
|
"aria-describedby"?: string | undefined;
|
|
227
226
|
"aria-description"?: string | undefined;
|
|
228
227
|
"aria-details"?: string | undefined;
|
|
229
228
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
230
|
-
"aria-dropeffect"?: "
|
|
229
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
231
230
|
"aria-errormessage"?: string | undefined;
|
|
232
231
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
233
232
|
"aria-flowto"?: string | undefined;
|
|
234
233
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
235
|
-
"aria-haspopup"?: boolean | "
|
|
234
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
236
235
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
237
|
-
"aria-invalid"?: boolean | "
|
|
236
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
238
237
|
"aria-keyshortcuts"?: string | undefined;
|
|
239
238
|
"aria-label"?: string | undefined;
|
|
240
239
|
"aria-labelledby"?: string | undefined;
|
|
@@ -247,9 +246,9 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
247
246
|
"aria-owns"?: string | undefined;
|
|
248
247
|
"aria-placeholder"?: string | undefined;
|
|
249
248
|
"aria-posinset"?: number | undefined;
|
|
250
|
-
"aria-pressed"?: boolean | "
|
|
249
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
251
250
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
252
|
-
"aria-relevant"?: "
|
|
251
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
253
252
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
254
253
|
"aria-roledescription"?: string | undefined;
|
|
255
254
|
"aria-rowcount"?: number | undefined;
|
|
@@ -405,9 +404,7 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
405
404
|
onPointerCancel?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
406
405
|
onPointerCancelCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
407
406
|
onPointerEnter?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
408
|
-
onPointerEnterCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
409
407
|
onPointerLeave?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
410
|
-
onPointerLeaveCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
411
408
|
onPointerOver?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
412
409
|
onPointerOverCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
413
410
|
onPointerOut?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
@@ -428,7 +425,7 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
428
425
|
onAnimationIterationCapture?: react.AnimationEventHandler<HTMLElement> | undefined;
|
|
429
426
|
onTransitionEnd?: react.TransitionEventHandler<HTMLElement> | undefined;
|
|
430
427
|
onTransitionEndCapture?: react.TransitionEventHandler<HTMLElement> | undefined;
|
|
431
|
-
'data-track-on-view-wrapper'?: string
|
|
428
|
+
'data-track-on-view-wrapper'?: string;
|
|
432
429
|
}, HTMLElement>;
|
|
433
430
|
|
|
434
431
|
export { Personalize, type PersonalizeComponentProps, type PersonalizeWrapperComponent, type PersonalizedVariationComponent, type TVariation, Test, type TestComponentProps, Track, TrackFragment, type TrackFragmentProps, type TrackProps, UniformContext, type UniformContextProps$1 as UniformContextProps, type VariantOutputType, useQuirks, useScores, useUniformContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import react__default, { ReactNode, ReactElement, HTMLAttributes } from 'react';
|
|
|
6
6
|
* Provides reactive access to the Uniform Context's current visitor quirks values
|
|
7
7
|
* This can be used when you want to read current quirk values directly.
|
|
8
8
|
*/
|
|
9
|
-
declare function useQuirks(): Quirks;
|
|
9
|
+
declare function useQuirks(options?: Parameters<typeof useUniformContext>[0]): Quirks;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Provides reactive access to the Uniform Context's current visitor scores values.
|
|
@@ -113,7 +113,7 @@ interface TestComponentProps<TVariation extends TestVariant> {
|
|
|
113
113
|
/** A React component to use to render the test variant. */
|
|
114
114
|
component: react__default.ComponentType<TVariation>;
|
|
115
115
|
}
|
|
116
|
-
declare const Test: <
|
|
116
|
+
declare const Test: <TVariation extends TestVariant>(props: TestComponentProps<TVariation>) => ReactElement | null;
|
|
117
117
|
|
|
118
118
|
type TrackFragmentProps = {
|
|
119
119
|
/** Behavior that will be pushed when tracking occurs. */
|
|
@@ -176,7 +176,6 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
176
176
|
id?: string | undefined;
|
|
177
177
|
lang?: string | undefined;
|
|
178
178
|
nonce?: string | undefined;
|
|
179
|
-
placeholder?: string | undefined;
|
|
180
179
|
slot?: string | undefined;
|
|
181
180
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
182
181
|
style?: react.CSSProperties | undefined;
|
|
@@ -208,33 +207,33 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
208
207
|
results?: number | undefined;
|
|
209
208
|
security?: string | undefined;
|
|
210
209
|
unselectable?: "on" | "off" | undefined;
|
|
211
|
-
inputMode?: "
|
|
210
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
212
211
|
is?: string | undefined;
|
|
213
212
|
"aria-activedescendant"?: string | undefined;
|
|
214
213
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
215
|
-
"aria-autocomplete"?: "none" | "
|
|
214
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
216
215
|
"aria-braillelabel"?: string | undefined;
|
|
217
216
|
"aria-brailleroledescription"?: string | undefined;
|
|
218
217
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
219
|
-
"aria-checked"?: boolean | "
|
|
218
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
220
219
|
"aria-colcount"?: number | undefined;
|
|
221
220
|
"aria-colindex"?: number | undefined;
|
|
222
221
|
"aria-colindextext"?: string | undefined;
|
|
223
222
|
"aria-colspan"?: number | undefined;
|
|
224
223
|
"aria-controls"?: string | undefined;
|
|
225
|
-
"aria-current"?: boolean | "
|
|
224
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
226
225
|
"aria-describedby"?: string | undefined;
|
|
227
226
|
"aria-description"?: string | undefined;
|
|
228
227
|
"aria-details"?: string | undefined;
|
|
229
228
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
230
|
-
"aria-dropeffect"?: "
|
|
229
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
231
230
|
"aria-errormessage"?: string | undefined;
|
|
232
231
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
233
232
|
"aria-flowto"?: string | undefined;
|
|
234
233
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
235
|
-
"aria-haspopup"?: boolean | "
|
|
234
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
236
235
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
237
|
-
"aria-invalid"?: boolean | "
|
|
236
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
238
237
|
"aria-keyshortcuts"?: string | undefined;
|
|
239
238
|
"aria-label"?: string | undefined;
|
|
240
239
|
"aria-labelledby"?: string | undefined;
|
|
@@ -247,9 +246,9 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
247
246
|
"aria-owns"?: string | undefined;
|
|
248
247
|
"aria-placeholder"?: string | undefined;
|
|
249
248
|
"aria-posinset"?: number | undefined;
|
|
250
|
-
"aria-pressed"?: boolean | "
|
|
249
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
251
250
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
252
|
-
"aria-relevant"?: "
|
|
251
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
253
252
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
254
253
|
"aria-roledescription"?: string | undefined;
|
|
255
254
|
"aria-rowcount"?: number | undefined;
|
|
@@ -405,9 +404,7 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
405
404
|
onPointerCancel?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
406
405
|
onPointerCancelCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
407
406
|
onPointerEnter?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
408
|
-
onPointerEnterCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
409
407
|
onPointerLeave?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
410
|
-
onPointerLeaveCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
411
408
|
onPointerOver?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
412
409
|
onPointerOverCapture?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
413
410
|
onPointerOut?: react.PointerEventHandler<HTMLElement> | undefined;
|
|
@@ -428,7 +425,7 @@ declare const Track: ({ behavior, children, tagName, threshold, disableVisibilit
|
|
|
428
425
|
onAnimationIterationCapture?: react.AnimationEventHandler<HTMLElement> | undefined;
|
|
429
426
|
onTransitionEnd?: react.TransitionEventHandler<HTMLElement> | undefined;
|
|
430
427
|
onTransitionEndCapture?: react.TransitionEventHandler<HTMLElement> | undefined;
|
|
431
|
-
'data-track-on-view-wrapper'?: string
|
|
428
|
+
'data-track-on-view-wrapper'?: string;
|
|
432
429
|
}, HTMLElement>;
|
|
433
430
|
|
|
434
431
|
export { Personalize, type PersonalizeComponentProps, type PersonalizeWrapperComponent, type PersonalizedVariationComponent, type TVariation, Test, type TestComponentProps, Track, TrackFragment, type TrackFragmentProps, type TrackProps, UniformContext, type UniformContextProps$1 as UniformContextProps, type VariantOutputType, useQuirks, useScores, useUniformContext };
|
package/dist/index.esm.js
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
// src/hooks/useQuirks.ts
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
function useQuirks() {
|
|
6
|
-
|
|
7
|
-
const
|
|
5
|
+
function useQuirks(options) {
|
|
6
|
+
var _a;
|
|
7
|
+
const { context } = useUniformContext(options) || {};
|
|
8
|
+
const [quirks, setQuirks] = useState((_a = context == null ? void 0 : context.quirks) != null ? _a : {});
|
|
8
9
|
const quirkChangeListener = (updatedQuirks) => {
|
|
9
10
|
setQuirks(updatedQuirks);
|
|
10
11
|
};
|
|
11
12
|
useEffect(() => {
|
|
12
|
-
context.events.on("quirksUpdated", quirkChangeListener);
|
|
13
|
+
context == null ? void 0 : context.events.on("quirksUpdated", quirkChangeListener);
|
|
13
14
|
return () => {
|
|
14
|
-
context.events.off("quirksUpdated", quirkChangeListener);
|
|
15
|
+
context == null ? void 0 : context.events.off("quirksUpdated", quirkChangeListener);
|
|
15
16
|
};
|
|
16
17
|
}, [context]);
|
|
17
18
|
return quirks;
|
|
@@ -186,7 +187,8 @@ function TestEdge(props) {
|
|
|
186
187
|
"data-type": ScriptType2.ListItemSettings,
|
|
187
188
|
dangerouslySetInnerHTML: {
|
|
188
189
|
__html: JSON.stringify({
|
|
189
|
-
id: variation.id
|
|
190
|
+
id: variation.id,
|
|
191
|
+
testDistribution: variation.testDistribution
|
|
190
192
|
})
|
|
191
193
|
}
|
|
192
194
|
}
|
|
@@ -271,8 +273,7 @@ var Track = ({
|
|
|
271
273
|
var _a;
|
|
272
274
|
const hasNoBehaviorValue = !behavior || Array.isArray(behavior) && !behavior.length;
|
|
273
275
|
const cannotTrack = insidePersonalizeComponent || hasNoBehaviorValue;
|
|
274
|
-
if (cannotTrack || !wrapperEl.current)
|
|
275
|
-
return;
|
|
276
|
+
if (cannotTrack || !wrapperEl.current) return;
|
|
276
277
|
const enrichments = Array.isArray(behavior) ? behavior : [behavior];
|
|
277
278
|
const pushBehaviorEnrichment = () => {
|
|
278
279
|
var _a2;
|
|
@@ -346,8 +347,7 @@ var TrackFragment = ({ behavior, children }) => {
|
|
|
346
347
|
useEffect4(() => {
|
|
347
348
|
const hasNoBehaviorValue = !behavior || Array.isArray(behavior) && !behavior.length;
|
|
348
349
|
const cannotTrack = insidePersonalizeComponent || hasNoBehaviorValue;
|
|
349
|
-
if (cannotTrack)
|
|
350
|
-
return;
|
|
350
|
+
if (cannotTrack) return;
|
|
351
351
|
const pushBehaviorEnrichment = () => {
|
|
352
352
|
if (hasTracked) {
|
|
353
353
|
return;
|
package/dist/index.js
CHANGED
|
@@ -44,16 +44,17 @@ module.exports = __toCommonJS(src_exports);
|
|
|
44
44
|
|
|
45
45
|
// src/hooks/useQuirks.ts
|
|
46
46
|
var import_react = require("react");
|
|
47
|
-
function useQuirks() {
|
|
48
|
-
|
|
49
|
-
const
|
|
47
|
+
function useQuirks(options) {
|
|
48
|
+
var _a;
|
|
49
|
+
const { context } = useUniformContext(options) || {};
|
|
50
|
+
const [quirks, setQuirks] = (0, import_react.useState)((_a = context == null ? void 0 : context.quirks) != null ? _a : {});
|
|
50
51
|
const quirkChangeListener = (updatedQuirks) => {
|
|
51
52
|
setQuirks(updatedQuirks);
|
|
52
53
|
};
|
|
53
54
|
(0, import_react.useEffect)(() => {
|
|
54
|
-
context.events.on("quirksUpdated", quirkChangeListener);
|
|
55
|
+
context == null ? void 0 : context.events.on("quirksUpdated", quirkChangeListener);
|
|
55
56
|
return () => {
|
|
56
|
-
context.events.off("quirksUpdated", quirkChangeListener);
|
|
57
|
+
context == null ? void 0 : context.events.off("quirksUpdated", quirkChangeListener);
|
|
57
58
|
};
|
|
58
59
|
}, [context]);
|
|
59
60
|
return quirks;
|
|
@@ -228,7 +229,8 @@ function TestEdge(props) {
|
|
|
228
229
|
"data-type": import_context3.ScriptType.ListItemSettings,
|
|
229
230
|
dangerouslySetInnerHTML: {
|
|
230
231
|
__html: JSON.stringify({
|
|
231
|
-
id: variation.id
|
|
232
|
+
id: variation.id,
|
|
233
|
+
testDistribution: variation.testDistribution
|
|
232
234
|
})
|
|
233
235
|
}
|
|
234
236
|
}
|
|
@@ -313,8 +315,7 @@ var Track = ({
|
|
|
313
315
|
var _a;
|
|
314
316
|
const hasNoBehaviorValue = !behavior || Array.isArray(behavior) && !behavior.length;
|
|
315
317
|
const cannotTrack = insidePersonalizeComponent || hasNoBehaviorValue;
|
|
316
|
-
if (cannotTrack || !wrapperEl.current)
|
|
317
|
-
return;
|
|
318
|
+
if (cannotTrack || !wrapperEl.current) return;
|
|
318
319
|
const enrichments = Array.isArray(behavior) ? behavior : [behavior];
|
|
319
320
|
const pushBehaviorEnrichment = () => {
|
|
320
321
|
var _a2;
|
|
@@ -388,8 +389,7 @@ var TrackFragment = ({ behavior, children }) => {
|
|
|
388
389
|
(0, import_react15.useEffect)(() => {
|
|
389
390
|
const hasNoBehaviorValue = !behavior || Array.isArray(behavior) && !behavior.length;
|
|
390
391
|
const cannotTrack = insidePersonalizeComponent || hasNoBehaviorValue;
|
|
391
|
-
if (cannotTrack)
|
|
392
|
-
return;
|
|
392
|
+
if (cannotTrack) return;
|
|
393
393
|
const pushBehaviorEnrichment = () => {
|
|
394
394
|
if (hasTracked) {
|
|
395
395
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
// src/hooks/useQuirks.ts
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
function useQuirks() {
|
|
6
|
-
|
|
7
|
-
const
|
|
5
|
+
function useQuirks(options) {
|
|
6
|
+
var _a;
|
|
7
|
+
const { context } = useUniformContext(options) || {};
|
|
8
|
+
const [quirks, setQuirks] = useState((_a = context == null ? void 0 : context.quirks) != null ? _a : {});
|
|
8
9
|
const quirkChangeListener = (updatedQuirks) => {
|
|
9
10
|
setQuirks(updatedQuirks);
|
|
10
11
|
};
|
|
11
12
|
useEffect(() => {
|
|
12
|
-
context.events.on("quirksUpdated", quirkChangeListener);
|
|
13
|
+
context == null ? void 0 : context.events.on("quirksUpdated", quirkChangeListener);
|
|
13
14
|
return () => {
|
|
14
|
-
context.events.off("quirksUpdated", quirkChangeListener);
|
|
15
|
+
context == null ? void 0 : context.events.off("quirksUpdated", quirkChangeListener);
|
|
15
16
|
};
|
|
16
17
|
}, [context]);
|
|
17
18
|
return quirks;
|
|
@@ -186,7 +187,8 @@ function TestEdge(props) {
|
|
|
186
187
|
"data-type": ScriptType2.ListItemSettings,
|
|
187
188
|
dangerouslySetInnerHTML: {
|
|
188
189
|
__html: JSON.stringify({
|
|
189
|
-
id: variation.id
|
|
190
|
+
id: variation.id,
|
|
191
|
+
testDistribution: variation.testDistribution
|
|
190
192
|
})
|
|
191
193
|
}
|
|
192
194
|
}
|
|
@@ -271,8 +273,7 @@ var Track = ({
|
|
|
271
273
|
var _a;
|
|
272
274
|
const hasNoBehaviorValue = !behavior || Array.isArray(behavior) && !behavior.length;
|
|
273
275
|
const cannotTrack = insidePersonalizeComponent || hasNoBehaviorValue;
|
|
274
|
-
if (cannotTrack || !wrapperEl.current)
|
|
275
|
-
return;
|
|
276
|
+
if (cannotTrack || !wrapperEl.current) return;
|
|
276
277
|
const enrichments = Array.isArray(behavior) ? behavior : [behavior];
|
|
277
278
|
const pushBehaviorEnrichment = () => {
|
|
278
279
|
var _a2;
|
|
@@ -346,8 +347,7 @@ var TrackFragment = ({ behavior, children }) => {
|
|
|
346
347
|
useEffect4(() => {
|
|
347
348
|
const hasNoBehaviorValue = !behavior || Array.isArray(behavior) && !behavior.length;
|
|
348
349
|
const cannotTrack = insidePersonalizeComponent || hasNoBehaviorValue;
|
|
349
|
-
if (cannotTrack)
|
|
350
|
-
return;
|
|
350
|
+
if (cannotTrack) return;
|
|
351
351
|
const pushBehaviorEnrichment = () => {
|
|
352
352
|
if (hasTracked) {
|
|
353
353
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/context-react",
|
|
3
|
-
"version": "19.135.
|
|
3
|
+
"version": "19.135.1-alpha.11+9f52e6cfd6",
|
|
4
4
|
"description": "Uniform Context React integration package",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/cookie": "0.6.0",
|
|
29
|
-
"@types/react": "18.
|
|
30
|
-
"react": "18.
|
|
31
|
-
"react-dom": "18.
|
|
29
|
+
"@types/react": "18.3.3",
|
|
30
|
+
"react": "18.3.1",
|
|
31
|
+
"react-dom": "18.3.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@uniformdev/context": "19.135.
|
|
34
|
+
"@uniformdev/context": "19.135.1-alpha.11+9f52e6cfd6",
|
|
35
35
|
"cookie": "0.6.0",
|
|
36
36
|
"dequal": "2.0.3"
|
|
37
37
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9f52e6cfd6e562e9c759735ba2a44378388a2a82"
|
|
49
49
|
}
|