@builder.io/sdk-qwik 0.25.3 → 0.25.5
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/browser/components/content-variants/content-variants.qwik.cjs +23 -27
- package/lib/browser/components/content-variants/content-variants.qwik.mjs +23 -27
- package/lib/browser/components/content-variants/helpers.qwik.cjs +10 -2
- package/lib/browser/components/content-variants/helpers.qwik.mjs +10 -2
- package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
- package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
- package/lib/edge/components/content-variants/content-variants.qwik.cjs +23 -27
- package/lib/edge/components/content-variants/content-variants.qwik.mjs +23 -27
- package/lib/edge/components/content-variants/helpers.qwik.cjs +10 -2
- package/lib/edge/components/content-variants/helpers.qwik.mjs +10 -2
- package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
- package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
- package/lib/node/components/content-variants/content-variants.qwik.cjs +23 -27
- package/lib/node/components/content-variants/content-variants.qwik.mjs +23 -27
- package/lib/node/components/content-variants/helpers.qwik.cjs +10 -2
- package/lib/node/components/content-variants/helpers.qwik.mjs +10 -2
- package/lib/node/constants/sdk-version.qwik.cjs +1 -1
- package/lib/node/constants/sdk-version.qwik.mjs +1 -1
- package/package.json +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
|
@@ -50,7 +50,23 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
50
50
|
]));
|
|
51
51
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
52
52
|
children: [
|
|
53
|
-
!props.isNestedRender && target.TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(
|
|
53
|
+
!props.isNestedRender && target.TARGET !== "reactNative" ? helpers$1.SDKS_SUPPORTING_PERSONALIZATION.includes(target.TARGET) ? /* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
54
|
+
id: "builderio-init-personalization-variants-fns",
|
|
55
|
+
get nonce() {
|
|
56
|
+
return props.nonce || "";
|
|
57
|
+
},
|
|
58
|
+
get scriptStr() {
|
|
59
|
+
return helpers$1.getInitPersonalizationVariantsFnsScriptString();
|
|
60
|
+
},
|
|
61
|
+
[qwik._IMMUTABLE]: {
|
|
62
|
+
id: qwik._IMMUTABLE,
|
|
63
|
+
nonce: qwik._fnSignal((p0) => p0.nonce || "", [
|
|
64
|
+
props
|
|
65
|
+
], 'p0.nonce||""'),
|
|
66
|
+
scriptStr: qwik._IMMUTABLE
|
|
67
|
+
}
|
|
68
|
+
}, 3, "XM_0") : null : null,
|
|
69
|
+
state.shouldRenderVariants ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
54
70
|
children: [
|
|
55
71
|
/* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
56
72
|
id: "builderio-init-variants-fns",
|
|
@@ -67,27 +83,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
67
83
|
], 'p0.nonce||""'),
|
|
68
84
|
scriptStr: qwik._IMMUTABLE
|
|
69
85
|
}
|
|
70
|
-
}, 3, "
|
|
71
|
-
helpers$1.SDKS_SUPPORTING_PERSONALIZATION.includes(target.TARGET) ? /* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
72
|
-
id: "builderio-init-personalization-variants-fns",
|
|
73
|
-
get nonce() {
|
|
74
|
-
return props.nonce || "";
|
|
75
|
-
},
|
|
76
|
-
get scriptStr() {
|
|
77
|
-
return helpers$1.getInitPersonalizationVariantsFnsScriptString();
|
|
78
|
-
},
|
|
79
|
-
[qwik._IMMUTABLE]: {
|
|
80
|
-
id: qwik._IMMUTABLE,
|
|
81
|
-
nonce: qwik._fnSignal((p0) => p0.nonce || "", [
|
|
82
|
-
props
|
|
83
|
-
], 'p0.nonce||""'),
|
|
84
|
-
scriptStr: qwik._IMMUTABLE
|
|
85
|
-
}
|
|
86
|
-
}, 3, "XM_1") : null
|
|
87
|
-
]
|
|
88
|
-
}, 1, "XM_2") : null,
|
|
89
|
-
state.shouldRenderVariants ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
90
|
-
children: [
|
|
86
|
+
}, 3, "XM_1"),
|
|
91
87
|
/* @__PURE__ */ qwik._jsxC(inlinedStyles.InlinedStyles, {
|
|
92
88
|
id: "builderio-variants",
|
|
93
89
|
get styles() {
|
|
@@ -105,7 +101,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
105
101
|
hideVariantsStyleString
|
|
106
102
|
], "p0.value")
|
|
107
103
|
}
|
|
108
|
-
}, 3, "
|
|
104
|
+
}, 3, "XM_2"),
|
|
109
105
|
/* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
110
106
|
id: "builderio-variants-visibility",
|
|
111
107
|
get scriptStr() {
|
|
@@ -123,7 +119,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
123
119
|
updateCookieAndStylesScriptStr
|
|
124
120
|
], "p0.value")
|
|
125
121
|
}
|
|
126
|
-
}, 3, "
|
|
122
|
+
}, 3, "XM_3"),
|
|
127
123
|
(helpers.getVariants(props.content) || []).map((variant) => {
|
|
128
124
|
return /* @__PURE__ */ qwik._jsxC(content.ContentComponent, {
|
|
129
125
|
get apiHost() {
|
|
@@ -248,7 +244,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
248
244
|
}, 3, variant.testVariationId);
|
|
249
245
|
})
|
|
250
246
|
]
|
|
251
|
-
}, 1, "
|
|
247
|
+
}, 1, "XM_4") : null,
|
|
252
248
|
/* @__PURE__ */ qwik._jsxC(content.ContentComponent, {
|
|
253
249
|
get apiHost() {
|
|
254
250
|
return props.apiHost;
|
|
@@ -374,9 +370,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
374
370
|
props
|
|
375
371
|
], "p0.trustedHosts")
|
|
376
372
|
}
|
|
377
|
-
}, 3, "
|
|
373
|
+
}, 3, "XM_5")
|
|
378
374
|
]
|
|
379
|
-
}, 1, "
|
|
375
|
+
}, 1, "XM_6");
|
|
380
376
|
}, "ContentVariants_component_4tFRiQMMEfM"));
|
|
381
377
|
exports.ContentVariants = ContentVariants;
|
|
382
378
|
exports.default = ContentVariants;
|
|
@@ -48,7 +48,23 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
48
48
|
]));
|
|
49
49
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
50
50
|
children: [
|
|
51
|
-
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(
|
|
51
|
+
!props.isNestedRender && TARGET !== "reactNative" ? SDKS_SUPPORTING_PERSONALIZATION.includes(TARGET) ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
52
|
+
id: "builderio-init-personalization-variants-fns",
|
|
53
|
+
get nonce() {
|
|
54
|
+
return props.nonce || "";
|
|
55
|
+
},
|
|
56
|
+
get scriptStr() {
|
|
57
|
+
return getInitPersonalizationVariantsFnsScriptString();
|
|
58
|
+
},
|
|
59
|
+
[_IMMUTABLE]: {
|
|
60
|
+
id: _IMMUTABLE,
|
|
61
|
+
nonce: _fnSignal((p0) => p0.nonce || "", [
|
|
62
|
+
props
|
|
63
|
+
], 'p0.nonce||""'),
|
|
64
|
+
scriptStr: _IMMUTABLE
|
|
65
|
+
}
|
|
66
|
+
}, 3, "XM_0") : null : null,
|
|
67
|
+
state.shouldRenderVariants ? /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
52
68
|
children: [
|
|
53
69
|
/* @__PURE__ */ _jsxC(InlinedScript, {
|
|
54
70
|
id: "builderio-init-variants-fns",
|
|
@@ -65,27 +81,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
65
81
|
], 'p0.nonce||""'),
|
|
66
82
|
scriptStr: _IMMUTABLE
|
|
67
83
|
}
|
|
68
|
-
}, 3, "
|
|
69
|
-
SDKS_SUPPORTING_PERSONALIZATION.includes(TARGET) ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
70
|
-
id: "builderio-init-personalization-variants-fns",
|
|
71
|
-
get nonce() {
|
|
72
|
-
return props.nonce || "";
|
|
73
|
-
},
|
|
74
|
-
get scriptStr() {
|
|
75
|
-
return getInitPersonalizationVariantsFnsScriptString();
|
|
76
|
-
},
|
|
77
|
-
[_IMMUTABLE]: {
|
|
78
|
-
id: _IMMUTABLE,
|
|
79
|
-
nonce: _fnSignal((p0) => p0.nonce || "", [
|
|
80
|
-
props
|
|
81
|
-
], 'p0.nonce||""'),
|
|
82
|
-
scriptStr: _IMMUTABLE
|
|
83
|
-
}
|
|
84
|
-
}, 3, "XM_1") : null
|
|
85
|
-
]
|
|
86
|
-
}, 1, "XM_2") : null,
|
|
87
|
-
state.shouldRenderVariants ? /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
88
|
-
children: [
|
|
84
|
+
}, 3, "XM_1"),
|
|
89
85
|
/* @__PURE__ */ _jsxC(InlinedStyles, {
|
|
90
86
|
id: "builderio-variants",
|
|
91
87
|
get styles() {
|
|
@@ -103,7 +99,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
103
99
|
hideVariantsStyleString
|
|
104
100
|
], "p0.value")
|
|
105
101
|
}
|
|
106
|
-
}, 3, "
|
|
102
|
+
}, 3, "XM_2"),
|
|
107
103
|
/* @__PURE__ */ _jsxC(InlinedScript, {
|
|
108
104
|
id: "builderio-variants-visibility",
|
|
109
105
|
get scriptStr() {
|
|
@@ -121,7 +117,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
121
117
|
updateCookieAndStylesScriptStr
|
|
122
118
|
], "p0.value")
|
|
123
119
|
}
|
|
124
|
-
}, 3, "
|
|
120
|
+
}, 3, "XM_3"),
|
|
125
121
|
(getVariants(props.content) || []).map((variant) => {
|
|
126
122
|
return /* @__PURE__ */ _jsxC(ContentComponent, {
|
|
127
123
|
get apiHost() {
|
|
@@ -246,7 +242,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
246
242
|
}, 3, variant.testVariationId);
|
|
247
243
|
})
|
|
248
244
|
]
|
|
249
|
-
}, 1, "
|
|
245
|
+
}, 1, "XM_4") : null,
|
|
250
246
|
/* @__PURE__ */ _jsxC(ContentComponent, {
|
|
251
247
|
get apiHost() {
|
|
252
248
|
return props.apiHost;
|
|
@@ -372,9 +368,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
372
368
|
props
|
|
373
369
|
], "p0.trustedHosts")
|
|
374
370
|
}
|
|
375
|
-
}, 3, "
|
|
371
|
+
}, 3, "XM_5")
|
|
376
372
|
]
|
|
377
|
-
}, 1, "
|
|
373
|
+
}, 1, "XM_6");
|
|
378
374
|
}, "ContentVariants_component_4tFRiQMMEfM"));
|
|
379
375
|
export {
|
|
380
376
|
ContentVariants,
|
|
@@ -24,8 +24,16 @@ const getIsHydrationTarget = (target2) => target2 === "react" || target2 === "re
|
|
|
24
24
|
const isAngularSDK = target.TARGET === "angular";
|
|
25
25
|
const isHydrationTarget = getIsHydrationTarget(target.TARGET);
|
|
26
26
|
const getInitVariantsFnsScriptString = () => `
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
(function() {
|
|
28
|
+
if (!window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}) {
|
|
29
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${inlinedFns.UPDATE_COOKIES_AND_STYLES_SCRIPT};
|
|
30
|
+
}
|
|
31
|
+
if (!window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}) {
|
|
32
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${inlinedFns.UPDATE_VARIANT_VISIBILITY_SCRIPT};
|
|
33
|
+
}${isHydrationTarget ? `
|
|
34
|
+
var thisScriptEl = document.currentScript;
|
|
35
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
36
|
+
})();
|
|
29
37
|
`;
|
|
30
38
|
const getUpdateCookieAndStylesScript = (variants, contentId) => `
|
|
31
39
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
@@ -22,8 +22,16 @@ const getIsHydrationTarget = (target) => target === "react" || target === "react
|
|
|
22
22
|
const isAngularSDK = TARGET === "angular";
|
|
23
23
|
const isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
24
24
|
const getInitVariantsFnsScriptString = () => `
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
(function() {
|
|
26
|
+
if (!window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}) {
|
|
27
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT};
|
|
28
|
+
}
|
|
29
|
+
if (!window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}) {
|
|
30
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT};
|
|
31
|
+
}${isHydrationTarget ? `
|
|
32
|
+
var thisScriptEl = document.currentScript;
|
|
33
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
34
|
+
})();
|
|
27
35
|
`;
|
|
28
36
|
const getUpdateCookieAndStylesScript = (variants, contentId) => `
|
|
29
37
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
@@ -50,7 +50,23 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
50
50
|
]));
|
|
51
51
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
52
52
|
children: [
|
|
53
|
-
!props.isNestedRender && target.TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(
|
|
53
|
+
!props.isNestedRender && target.TARGET !== "reactNative" ? helpers$1.SDKS_SUPPORTING_PERSONALIZATION.includes(target.TARGET) ? /* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
54
|
+
id: "builderio-init-personalization-variants-fns",
|
|
55
|
+
get nonce() {
|
|
56
|
+
return props.nonce || "";
|
|
57
|
+
},
|
|
58
|
+
get scriptStr() {
|
|
59
|
+
return helpers$1.getInitPersonalizationVariantsFnsScriptString();
|
|
60
|
+
},
|
|
61
|
+
[qwik._IMMUTABLE]: {
|
|
62
|
+
id: qwik._IMMUTABLE,
|
|
63
|
+
nonce: qwik._fnSignal((p0) => p0.nonce || "", [
|
|
64
|
+
props
|
|
65
|
+
], 'p0.nonce||""'),
|
|
66
|
+
scriptStr: qwik._IMMUTABLE
|
|
67
|
+
}
|
|
68
|
+
}, 3, "XM_0") : null : null,
|
|
69
|
+
state.shouldRenderVariants ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
54
70
|
children: [
|
|
55
71
|
/* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
56
72
|
id: "builderio-init-variants-fns",
|
|
@@ -67,27 +83,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
67
83
|
], 'p0.nonce||""'),
|
|
68
84
|
scriptStr: qwik._IMMUTABLE
|
|
69
85
|
}
|
|
70
|
-
}, 3, "
|
|
71
|
-
helpers$1.SDKS_SUPPORTING_PERSONALIZATION.includes(target.TARGET) ? /* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
72
|
-
id: "builderio-init-personalization-variants-fns",
|
|
73
|
-
get nonce() {
|
|
74
|
-
return props.nonce || "";
|
|
75
|
-
},
|
|
76
|
-
get scriptStr() {
|
|
77
|
-
return helpers$1.getInitPersonalizationVariantsFnsScriptString();
|
|
78
|
-
},
|
|
79
|
-
[qwik._IMMUTABLE]: {
|
|
80
|
-
id: qwik._IMMUTABLE,
|
|
81
|
-
nonce: qwik._fnSignal((p0) => p0.nonce || "", [
|
|
82
|
-
props
|
|
83
|
-
], 'p0.nonce||""'),
|
|
84
|
-
scriptStr: qwik._IMMUTABLE
|
|
85
|
-
}
|
|
86
|
-
}, 3, "XM_1") : null
|
|
87
|
-
]
|
|
88
|
-
}, 1, "XM_2") : null,
|
|
89
|
-
state.shouldRenderVariants ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
90
|
-
children: [
|
|
86
|
+
}, 3, "XM_1"),
|
|
91
87
|
/* @__PURE__ */ qwik._jsxC(inlinedStyles.InlinedStyles, {
|
|
92
88
|
id: "builderio-variants",
|
|
93
89
|
get styles() {
|
|
@@ -105,7 +101,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
105
101
|
hideVariantsStyleString
|
|
106
102
|
], "p0.value")
|
|
107
103
|
}
|
|
108
|
-
}, 3, "
|
|
104
|
+
}, 3, "XM_2"),
|
|
109
105
|
/* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
110
106
|
id: "builderio-variants-visibility",
|
|
111
107
|
get scriptStr() {
|
|
@@ -123,7 +119,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
123
119
|
updateCookieAndStylesScriptStr
|
|
124
120
|
], "p0.value")
|
|
125
121
|
}
|
|
126
|
-
}, 3, "
|
|
122
|
+
}, 3, "XM_3"),
|
|
127
123
|
(helpers.getVariants(props.content) || []).map((variant) => {
|
|
128
124
|
return /* @__PURE__ */ qwik._jsxC(content.ContentComponent, {
|
|
129
125
|
get apiHost() {
|
|
@@ -248,7 +244,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
248
244
|
}, 3, variant.testVariationId);
|
|
249
245
|
})
|
|
250
246
|
]
|
|
251
|
-
}, 1, "
|
|
247
|
+
}, 1, "XM_4") : null,
|
|
252
248
|
/* @__PURE__ */ qwik._jsxC(content.ContentComponent, {
|
|
253
249
|
get apiHost() {
|
|
254
250
|
return props.apiHost;
|
|
@@ -374,9 +370,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
374
370
|
props
|
|
375
371
|
], "p0.trustedHosts")
|
|
376
372
|
}
|
|
377
|
-
}, 3, "
|
|
373
|
+
}, 3, "XM_5")
|
|
378
374
|
]
|
|
379
|
-
}, 1, "
|
|
375
|
+
}, 1, "XM_6");
|
|
380
376
|
}, "ContentVariants_component_4tFRiQMMEfM"));
|
|
381
377
|
exports.ContentVariants = ContentVariants;
|
|
382
378
|
exports.default = ContentVariants;
|
|
@@ -48,7 +48,23 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
48
48
|
]));
|
|
49
49
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
50
50
|
children: [
|
|
51
|
-
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(
|
|
51
|
+
!props.isNestedRender && TARGET !== "reactNative" ? SDKS_SUPPORTING_PERSONALIZATION.includes(TARGET) ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
52
|
+
id: "builderio-init-personalization-variants-fns",
|
|
53
|
+
get nonce() {
|
|
54
|
+
return props.nonce || "";
|
|
55
|
+
},
|
|
56
|
+
get scriptStr() {
|
|
57
|
+
return getInitPersonalizationVariantsFnsScriptString();
|
|
58
|
+
},
|
|
59
|
+
[_IMMUTABLE]: {
|
|
60
|
+
id: _IMMUTABLE,
|
|
61
|
+
nonce: _fnSignal((p0) => p0.nonce || "", [
|
|
62
|
+
props
|
|
63
|
+
], 'p0.nonce||""'),
|
|
64
|
+
scriptStr: _IMMUTABLE
|
|
65
|
+
}
|
|
66
|
+
}, 3, "XM_0") : null : null,
|
|
67
|
+
state.shouldRenderVariants ? /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
52
68
|
children: [
|
|
53
69
|
/* @__PURE__ */ _jsxC(InlinedScript, {
|
|
54
70
|
id: "builderio-init-variants-fns",
|
|
@@ -65,27 +81,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
65
81
|
], 'p0.nonce||""'),
|
|
66
82
|
scriptStr: _IMMUTABLE
|
|
67
83
|
}
|
|
68
|
-
}, 3, "
|
|
69
|
-
SDKS_SUPPORTING_PERSONALIZATION.includes(TARGET) ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
70
|
-
id: "builderio-init-personalization-variants-fns",
|
|
71
|
-
get nonce() {
|
|
72
|
-
return props.nonce || "";
|
|
73
|
-
},
|
|
74
|
-
get scriptStr() {
|
|
75
|
-
return getInitPersonalizationVariantsFnsScriptString();
|
|
76
|
-
},
|
|
77
|
-
[_IMMUTABLE]: {
|
|
78
|
-
id: _IMMUTABLE,
|
|
79
|
-
nonce: _fnSignal((p0) => p0.nonce || "", [
|
|
80
|
-
props
|
|
81
|
-
], 'p0.nonce||""'),
|
|
82
|
-
scriptStr: _IMMUTABLE
|
|
83
|
-
}
|
|
84
|
-
}, 3, "XM_1") : null
|
|
85
|
-
]
|
|
86
|
-
}, 1, "XM_2") : null,
|
|
87
|
-
state.shouldRenderVariants ? /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
88
|
-
children: [
|
|
84
|
+
}, 3, "XM_1"),
|
|
89
85
|
/* @__PURE__ */ _jsxC(InlinedStyles, {
|
|
90
86
|
id: "builderio-variants",
|
|
91
87
|
get styles() {
|
|
@@ -103,7 +99,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
103
99
|
hideVariantsStyleString
|
|
104
100
|
], "p0.value")
|
|
105
101
|
}
|
|
106
|
-
}, 3, "
|
|
102
|
+
}, 3, "XM_2"),
|
|
107
103
|
/* @__PURE__ */ _jsxC(InlinedScript, {
|
|
108
104
|
id: "builderio-variants-visibility",
|
|
109
105
|
get scriptStr() {
|
|
@@ -121,7 +117,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
121
117
|
updateCookieAndStylesScriptStr
|
|
122
118
|
], "p0.value")
|
|
123
119
|
}
|
|
124
|
-
}, 3, "
|
|
120
|
+
}, 3, "XM_3"),
|
|
125
121
|
(getVariants(props.content) || []).map((variant) => {
|
|
126
122
|
return /* @__PURE__ */ _jsxC(ContentComponent, {
|
|
127
123
|
get apiHost() {
|
|
@@ -246,7 +242,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
246
242
|
}, 3, variant.testVariationId);
|
|
247
243
|
})
|
|
248
244
|
]
|
|
249
|
-
}, 1, "
|
|
245
|
+
}, 1, "XM_4") : null,
|
|
250
246
|
/* @__PURE__ */ _jsxC(ContentComponent, {
|
|
251
247
|
get apiHost() {
|
|
252
248
|
return props.apiHost;
|
|
@@ -372,9 +368,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
372
368
|
props
|
|
373
369
|
], "p0.trustedHosts")
|
|
374
370
|
}
|
|
375
|
-
}, 3, "
|
|
371
|
+
}, 3, "XM_5")
|
|
376
372
|
]
|
|
377
|
-
}, 1, "
|
|
373
|
+
}, 1, "XM_6");
|
|
378
374
|
}, "ContentVariants_component_4tFRiQMMEfM"));
|
|
379
375
|
export {
|
|
380
376
|
ContentVariants,
|
|
@@ -24,8 +24,16 @@ const getIsHydrationTarget = (target2) => target2 === "react" || target2 === "re
|
|
|
24
24
|
const isAngularSDK = target.TARGET === "angular";
|
|
25
25
|
const isHydrationTarget = getIsHydrationTarget(target.TARGET);
|
|
26
26
|
const getInitVariantsFnsScriptString = () => `
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
(function() {
|
|
28
|
+
if (!window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}) {
|
|
29
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${inlinedFns.UPDATE_COOKIES_AND_STYLES_SCRIPT};
|
|
30
|
+
}
|
|
31
|
+
if (!window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}) {
|
|
32
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${inlinedFns.UPDATE_VARIANT_VISIBILITY_SCRIPT};
|
|
33
|
+
}${isHydrationTarget ? `
|
|
34
|
+
var thisScriptEl = document.currentScript;
|
|
35
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
36
|
+
})();
|
|
29
37
|
`;
|
|
30
38
|
const getUpdateCookieAndStylesScript = (variants, contentId) => `
|
|
31
39
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
@@ -22,8 +22,16 @@ const getIsHydrationTarget = (target) => target === "react" || target === "react
|
|
|
22
22
|
const isAngularSDK = TARGET === "angular";
|
|
23
23
|
const isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
24
24
|
const getInitVariantsFnsScriptString = () => `
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
(function() {
|
|
26
|
+
if (!window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}) {
|
|
27
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT};
|
|
28
|
+
}
|
|
29
|
+
if (!window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}) {
|
|
30
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT};
|
|
31
|
+
}${isHydrationTarget ? `
|
|
32
|
+
var thisScriptEl = document.currentScript;
|
|
33
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
34
|
+
})();
|
|
27
35
|
`;
|
|
28
36
|
const getUpdateCookieAndStylesScript = (variants, contentId) => `
|
|
29
37
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
@@ -50,7 +50,23 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
50
50
|
]));
|
|
51
51
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
52
52
|
children: [
|
|
53
|
-
!props.isNestedRender && target.TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(
|
|
53
|
+
!props.isNestedRender && target.TARGET !== "reactNative" ? helpers$1.SDKS_SUPPORTING_PERSONALIZATION.includes(target.TARGET) ? /* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
54
|
+
id: "builderio-init-personalization-variants-fns",
|
|
55
|
+
get nonce() {
|
|
56
|
+
return props.nonce || "";
|
|
57
|
+
},
|
|
58
|
+
get scriptStr() {
|
|
59
|
+
return helpers$1.getInitPersonalizationVariantsFnsScriptString();
|
|
60
|
+
},
|
|
61
|
+
[qwik._IMMUTABLE]: {
|
|
62
|
+
id: qwik._IMMUTABLE,
|
|
63
|
+
nonce: qwik._fnSignal((p0) => p0.nonce || "", [
|
|
64
|
+
props
|
|
65
|
+
], 'p0.nonce||""'),
|
|
66
|
+
scriptStr: qwik._IMMUTABLE
|
|
67
|
+
}
|
|
68
|
+
}, 3, "XM_0") : null : null,
|
|
69
|
+
state.shouldRenderVariants ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
54
70
|
children: [
|
|
55
71
|
/* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
56
72
|
id: "builderio-init-variants-fns",
|
|
@@ -67,27 +83,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
67
83
|
], 'p0.nonce||""'),
|
|
68
84
|
scriptStr: qwik._IMMUTABLE
|
|
69
85
|
}
|
|
70
|
-
}, 3, "
|
|
71
|
-
helpers$1.SDKS_SUPPORTING_PERSONALIZATION.includes(target.TARGET) ? /* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
72
|
-
id: "builderio-init-personalization-variants-fns",
|
|
73
|
-
get nonce() {
|
|
74
|
-
return props.nonce || "";
|
|
75
|
-
},
|
|
76
|
-
get scriptStr() {
|
|
77
|
-
return helpers$1.getInitPersonalizationVariantsFnsScriptString();
|
|
78
|
-
},
|
|
79
|
-
[qwik._IMMUTABLE]: {
|
|
80
|
-
id: qwik._IMMUTABLE,
|
|
81
|
-
nonce: qwik._fnSignal((p0) => p0.nonce || "", [
|
|
82
|
-
props
|
|
83
|
-
], 'p0.nonce||""'),
|
|
84
|
-
scriptStr: qwik._IMMUTABLE
|
|
85
|
-
}
|
|
86
|
-
}, 3, "XM_1") : null
|
|
87
|
-
]
|
|
88
|
-
}, 1, "XM_2") : null,
|
|
89
|
-
state.shouldRenderVariants ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
90
|
-
children: [
|
|
86
|
+
}, 3, "XM_1"),
|
|
91
87
|
/* @__PURE__ */ qwik._jsxC(inlinedStyles.InlinedStyles, {
|
|
92
88
|
id: "builderio-variants",
|
|
93
89
|
get styles() {
|
|
@@ -105,7 +101,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
105
101
|
hideVariantsStyleString
|
|
106
102
|
], "p0.value")
|
|
107
103
|
}
|
|
108
|
-
}, 3, "
|
|
104
|
+
}, 3, "XM_2"),
|
|
109
105
|
/* @__PURE__ */ qwik._jsxC(inlinedScript.InlinedScript, {
|
|
110
106
|
id: "builderio-variants-visibility",
|
|
111
107
|
get scriptStr() {
|
|
@@ -123,7 +119,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
123
119
|
updateCookieAndStylesScriptStr
|
|
124
120
|
], "p0.value")
|
|
125
121
|
}
|
|
126
|
-
}, 3, "
|
|
122
|
+
}, 3, "XM_3"),
|
|
127
123
|
(helpers.getVariants(props.content) || []).map((variant) => {
|
|
128
124
|
return /* @__PURE__ */ qwik._jsxC(content.ContentComponent, {
|
|
129
125
|
get apiHost() {
|
|
@@ -248,7 +244,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
248
244
|
}, 3, variant.testVariationId);
|
|
249
245
|
})
|
|
250
246
|
]
|
|
251
|
-
}, 1, "
|
|
247
|
+
}, 1, "XM_4") : null,
|
|
252
248
|
/* @__PURE__ */ qwik._jsxC(content.ContentComponent, {
|
|
253
249
|
get apiHost() {
|
|
254
250
|
return props.apiHost;
|
|
@@ -374,9 +370,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
374
370
|
props
|
|
375
371
|
], "p0.trustedHosts")
|
|
376
372
|
}
|
|
377
|
-
}, 3, "
|
|
373
|
+
}, 3, "XM_5")
|
|
378
374
|
]
|
|
379
|
-
}, 1, "
|
|
375
|
+
}, 1, "XM_6");
|
|
380
376
|
}, "ContentVariants_component_4tFRiQMMEfM"));
|
|
381
377
|
exports.ContentVariants = ContentVariants;
|
|
382
378
|
exports.default = ContentVariants;
|
|
@@ -48,7 +48,23 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
48
48
|
]));
|
|
49
49
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
50
50
|
children: [
|
|
51
|
-
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(
|
|
51
|
+
!props.isNestedRender && TARGET !== "reactNative" ? SDKS_SUPPORTING_PERSONALIZATION.includes(TARGET) ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
52
|
+
id: "builderio-init-personalization-variants-fns",
|
|
53
|
+
get nonce() {
|
|
54
|
+
return props.nonce || "";
|
|
55
|
+
},
|
|
56
|
+
get scriptStr() {
|
|
57
|
+
return getInitPersonalizationVariantsFnsScriptString();
|
|
58
|
+
},
|
|
59
|
+
[_IMMUTABLE]: {
|
|
60
|
+
id: _IMMUTABLE,
|
|
61
|
+
nonce: _fnSignal((p0) => p0.nonce || "", [
|
|
62
|
+
props
|
|
63
|
+
], 'p0.nonce||""'),
|
|
64
|
+
scriptStr: _IMMUTABLE
|
|
65
|
+
}
|
|
66
|
+
}, 3, "XM_0") : null : null,
|
|
67
|
+
state.shouldRenderVariants ? /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
52
68
|
children: [
|
|
53
69
|
/* @__PURE__ */ _jsxC(InlinedScript, {
|
|
54
70
|
id: "builderio-init-variants-fns",
|
|
@@ -65,27 +81,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
65
81
|
], 'p0.nonce||""'),
|
|
66
82
|
scriptStr: _IMMUTABLE
|
|
67
83
|
}
|
|
68
|
-
}, 3, "
|
|
69
|
-
SDKS_SUPPORTING_PERSONALIZATION.includes(TARGET) ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
|
70
|
-
id: "builderio-init-personalization-variants-fns",
|
|
71
|
-
get nonce() {
|
|
72
|
-
return props.nonce || "";
|
|
73
|
-
},
|
|
74
|
-
get scriptStr() {
|
|
75
|
-
return getInitPersonalizationVariantsFnsScriptString();
|
|
76
|
-
},
|
|
77
|
-
[_IMMUTABLE]: {
|
|
78
|
-
id: _IMMUTABLE,
|
|
79
|
-
nonce: _fnSignal((p0) => p0.nonce || "", [
|
|
80
|
-
props
|
|
81
|
-
], 'p0.nonce||""'),
|
|
82
|
-
scriptStr: _IMMUTABLE
|
|
83
|
-
}
|
|
84
|
-
}, 3, "XM_1") : null
|
|
85
|
-
]
|
|
86
|
-
}, 1, "XM_2") : null,
|
|
87
|
-
state.shouldRenderVariants ? /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
88
|
-
children: [
|
|
84
|
+
}, 3, "XM_1"),
|
|
89
85
|
/* @__PURE__ */ _jsxC(InlinedStyles, {
|
|
90
86
|
id: "builderio-variants",
|
|
91
87
|
get styles() {
|
|
@@ -103,7 +99,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
103
99
|
hideVariantsStyleString
|
|
104
100
|
], "p0.value")
|
|
105
101
|
}
|
|
106
|
-
}, 3, "
|
|
102
|
+
}, 3, "XM_2"),
|
|
107
103
|
/* @__PURE__ */ _jsxC(InlinedScript, {
|
|
108
104
|
id: "builderio-variants-visibility",
|
|
109
105
|
get scriptStr() {
|
|
@@ -121,7 +117,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
121
117
|
updateCookieAndStylesScriptStr
|
|
122
118
|
], "p0.value")
|
|
123
119
|
}
|
|
124
|
-
}, 3, "
|
|
120
|
+
}, 3, "XM_3"),
|
|
125
121
|
(getVariants(props.content) || []).map((variant) => {
|
|
126
122
|
return /* @__PURE__ */ _jsxC(ContentComponent, {
|
|
127
123
|
get apiHost() {
|
|
@@ -246,7 +242,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
246
242
|
}, 3, variant.testVariationId);
|
|
247
243
|
})
|
|
248
244
|
]
|
|
249
|
-
}, 1, "
|
|
245
|
+
}, 1, "XM_4") : null,
|
|
250
246
|
/* @__PURE__ */ _jsxC(ContentComponent, {
|
|
251
247
|
get apiHost() {
|
|
252
248
|
return props.apiHost;
|
|
@@ -372,9 +368,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
372
368
|
props
|
|
373
369
|
], "p0.trustedHosts")
|
|
374
370
|
}
|
|
375
|
-
}, 3, "
|
|
371
|
+
}, 3, "XM_5")
|
|
376
372
|
]
|
|
377
|
-
}, 1, "
|
|
373
|
+
}, 1, "XM_6");
|
|
378
374
|
}, "ContentVariants_component_4tFRiQMMEfM"));
|
|
379
375
|
export {
|
|
380
376
|
ContentVariants,
|
|
@@ -24,8 +24,16 @@ const getIsHydrationTarget = (target2) => target2 === "react" || target2 === "re
|
|
|
24
24
|
const isAngularSDK = target.TARGET === "angular";
|
|
25
25
|
const isHydrationTarget = getIsHydrationTarget(target.TARGET);
|
|
26
26
|
const getInitVariantsFnsScriptString = () => `
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
(function() {
|
|
28
|
+
if (!window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}) {
|
|
29
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${inlinedFns.UPDATE_COOKIES_AND_STYLES_SCRIPT};
|
|
30
|
+
}
|
|
31
|
+
if (!window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}) {
|
|
32
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${inlinedFns.UPDATE_VARIANT_VISIBILITY_SCRIPT};
|
|
33
|
+
}${isHydrationTarget ? `
|
|
34
|
+
var thisScriptEl = document.currentScript;
|
|
35
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
36
|
+
})();
|
|
29
37
|
`;
|
|
30
38
|
const getUpdateCookieAndStylesScript = (variants, contentId) => `
|
|
31
39
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
@@ -22,8 +22,16 @@ const getIsHydrationTarget = (target) => target === "react" || target === "react
|
|
|
22
22
|
const isAngularSDK = TARGET === "angular";
|
|
23
23
|
const isHydrationTarget = getIsHydrationTarget(TARGET);
|
|
24
24
|
const getInitVariantsFnsScriptString = () => `
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
(function() {
|
|
26
|
+
if (!window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}) {
|
|
27
|
+
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT};
|
|
28
|
+
}
|
|
29
|
+
if (!window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}) {
|
|
30
|
+
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT};
|
|
31
|
+
}${isHydrationTarget ? `
|
|
32
|
+
var thisScriptEl = document.currentScript;
|
|
33
|
+
if (thisScriptEl) { thisScriptEl.remove(); }` : ""}
|
|
34
|
+
})();
|
|
27
35
|
`;
|
|
28
36
|
const getUpdateCookieAndStylesScript = (variants, contentId) => `
|
|
29
37
|
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.25.
|
|
1
|
+
export declare const SDK_VERSION = "0.25.5";
|