@builder.io/sdk-solid 4.0.1 → 4.0.2
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/dev.js +9 -4
- package/lib/browser/dev.jsx +9 -4
- package/lib/browser/index.js +9 -4
- package/lib/browser/index.jsx +9 -4
- package/lib/edge/dev.js +9 -4
- package/lib/edge/dev.jsx +9 -4
- package/lib/edge/index.js +9 -4
- package/lib/edge/index.jsx +9 -4
- package/lib/node/dev.js +9 -4
- package/lib/node/dev.jsx +9 -4
- package/lib/node/index.js +9 -4
- package/lib/node/index.jsx +9 -4
- package/package.json +1 -1
package/lib/browser/dev.js
CHANGED
|
@@ -5330,7 +5330,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5330
5330
|
}
|
|
5331
5331
|
|
|
5332
5332
|
// src/constants/sdk-version.ts
|
|
5333
|
-
var SDK_VERSION = "4.0.
|
|
5333
|
+
var SDK_VERSION = "4.0.2";
|
|
5334
5334
|
|
|
5335
5335
|
// src/helpers/sdk-headers.ts
|
|
5336
5336
|
var getSdkHeaders = () => ({
|
|
@@ -6191,6 +6191,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
6191
6191
|
|
|
6192
6192
|
// src/components/content/components/enable-editor.tsx
|
|
6193
6193
|
function EnableEditor(props) {
|
|
6194
|
+
createSignal(false);
|
|
6194
6195
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
6195
6196
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
6196
6197
|
const [httpReqsPending, setHttpReqsPending] = createSignal({});
|
|
@@ -6358,8 +6359,12 @@ function EnableEditor(props) {
|
|
|
6358
6359
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
|
|
6359
6360
|
}
|
|
6360
6361
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
6361
|
-
|
|
6362
|
-
|
|
6362
|
+
const winningVariantId = getCookieSync({
|
|
6363
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
6364
|
+
canTrack: true
|
|
6365
|
+
});
|
|
6366
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
6367
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
6363
6368
|
const contentId = props.builderContextSignal.content?.id;
|
|
6364
6369
|
const apiKeyProp = props.apiKey;
|
|
6365
6370
|
_track({
|
|
@@ -6368,7 +6373,7 @@ function EnableEditor(props) {
|
|
|
6368
6373
|
canTrack: true,
|
|
6369
6374
|
contentId,
|
|
6370
6375
|
apiKey: apiKeyProp,
|
|
6371
|
-
variationId:
|
|
6376
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
6372
6377
|
});
|
|
6373
6378
|
}
|
|
6374
6379
|
if (isPreviewing() && !isEditing()) {
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -4837,7 +4837,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4837
4837
|
}
|
|
4838
4838
|
|
|
4839
4839
|
// src/constants/sdk-version.ts
|
|
4840
|
-
var SDK_VERSION = "4.0.
|
|
4840
|
+
var SDK_VERSION = "4.0.2";
|
|
4841
4841
|
|
|
4842
4842
|
// src/helpers/sdk-headers.ts
|
|
4843
4843
|
var getSdkHeaders = () => ({
|
|
@@ -5698,6 +5698,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
5698
5698
|
|
|
5699
5699
|
// src/components/content/components/enable-editor.tsx
|
|
5700
5700
|
function EnableEditor(props) {
|
|
5701
|
+
const [hasExecuted, setHasExecuted] = createSignal16(false);
|
|
5701
5702
|
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5702
5703
|
props.contentWrapper || "div"
|
|
5703
5704
|
);
|
|
@@ -5879,8 +5880,12 @@ function EnableEditor(props) {
|
|
|
5879
5880
|
);
|
|
5880
5881
|
}
|
|
5881
5882
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
5882
|
-
|
|
5883
|
-
|
|
5883
|
+
const winningVariantId = getCookieSync({
|
|
5884
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
5885
|
+
canTrack: true
|
|
5886
|
+
});
|
|
5887
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
5888
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
5884
5889
|
const contentId = props.builderContextSignal.content?.id;
|
|
5885
5890
|
const apiKeyProp = props.apiKey;
|
|
5886
5891
|
_track({
|
|
@@ -5889,7 +5894,7 @@ function EnableEditor(props) {
|
|
|
5889
5894
|
canTrack: true,
|
|
5890
5895
|
contentId,
|
|
5891
5896
|
apiKey: apiKeyProp,
|
|
5892
|
-
variationId:
|
|
5897
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
5893
5898
|
});
|
|
5894
5899
|
}
|
|
5895
5900
|
if (isPreviewing() && !isEditing()) {
|
package/lib/browser/index.js
CHANGED
|
@@ -5316,7 +5316,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5316
5316
|
}
|
|
5317
5317
|
|
|
5318
5318
|
// src/constants/sdk-version.ts
|
|
5319
|
-
var SDK_VERSION = "4.0.
|
|
5319
|
+
var SDK_VERSION = "4.0.2";
|
|
5320
5320
|
|
|
5321
5321
|
// src/helpers/sdk-headers.ts
|
|
5322
5322
|
var getSdkHeaders = () => ({
|
|
@@ -6171,6 +6171,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
6171
6171
|
|
|
6172
6172
|
// src/components/content/components/enable-editor.tsx
|
|
6173
6173
|
function EnableEditor(props) {
|
|
6174
|
+
createSignal(false);
|
|
6174
6175
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
6175
6176
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
6176
6177
|
const [httpReqsPending, setHttpReqsPending] = createSignal({});
|
|
@@ -6337,8 +6338,12 @@ function EnableEditor(props) {
|
|
|
6337
6338
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
|
|
6338
6339
|
}
|
|
6339
6340
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
6340
|
-
|
|
6341
|
-
|
|
6341
|
+
const winningVariantId = getCookieSync({
|
|
6342
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
6343
|
+
canTrack: true
|
|
6344
|
+
});
|
|
6345
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
6346
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
6342
6347
|
const contentId = props.builderContextSignal.content?.id;
|
|
6343
6348
|
const apiKeyProp = props.apiKey;
|
|
6344
6349
|
_track({
|
|
@@ -6347,7 +6352,7 @@ function EnableEditor(props) {
|
|
|
6347
6352
|
canTrack: true,
|
|
6348
6353
|
contentId,
|
|
6349
6354
|
apiKey: apiKeyProp,
|
|
6350
|
-
variationId:
|
|
6355
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
6351
6356
|
});
|
|
6352
6357
|
}
|
|
6353
6358
|
if (isPreviewing() && !isEditing()) {
|
package/lib/browser/index.jsx
CHANGED
|
@@ -4825,7 +4825,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4825
4825
|
}
|
|
4826
4826
|
|
|
4827
4827
|
// src/constants/sdk-version.ts
|
|
4828
|
-
var SDK_VERSION = "4.0.
|
|
4828
|
+
var SDK_VERSION = "4.0.2";
|
|
4829
4829
|
|
|
4830
4830
|
// src/helpers/sdk-headers.ts
|
|
4831
4831
|
var getSdkHeaders = () => ({
|
|
@@ -5680,6 +5680,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
5680
5680
|
|
|
5681
5681
|
// src/components/content/components/enable-editor.tsx
|
|
5682
5682
|
function EnableEditor(props) {
|
|
5683
|
+
const [hasExecuted, setHasExecuted] = createSignal16(false);
|
|
5683
5684
|
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5684
5685
|
props.contentWrapper || "div"
|
|
5685
5686
|
);
|
|
@@ -5860,8 +5861,12 @@ function EnableEditor(props) {
|
|
|
5860
5861
|
);
|
|
5861
5862
|
}
|
|
5862
5863
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
5863
|
-
|
|
5864
|
-
|
|
5864
|
+
const winningVariantId = getCookieSync({
|
|
5865
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
5866
|
+
canTrack: true
|
|
5867
|
+
});
|
|
5868
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
5869
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
5865
5870
|
const contentId = props.builderContextSignal.content?.id;
|
|
5866
5871
|
const apiKeyProp = props.apiKey;
|
|
5867
5872
|
_track({
|
|
@@ -5870,7 +5875,7 @@ function EnableEditor(props) {
|
|
|
5870
5875
|
canTrack: true,
|
|
5871
5876
|
contentId,
|
|
5872
5877
|
apiKey: apiKeyProp,
|
|
5873
|
-
variationId:
|
|
5878
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
5874
5879
|
});
|
|
5875
5880
|
}
|
|
5876
5881
|
if (isPreviewing() && !isEditing()) {
|
package/lib/edge/dev.js
CHANGED
|
@@ -8511,7 +8511,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8511
8511
|
}
|
|
8512
8512
|
|
|
8513
8513
|
// src/constants/sdk-version.ts
|
|
8514
|
-
var SDK_VERSION = "4.0.
|
|
8514
|
+
var SDK_VERSION = "4.0.2";
|
|
8515
8515
|
|
|
8516
8516
|
// src/helpers/sdk-headers.ts
|
|
8517
8517
|
var getSdkHeaders = () => ({
|
|
@@ -9372,6 +9372,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
9372
9372
|
|
|
9373
9373
|
// src/components/content/components/enable-editor.tsx
|
|
9374
9374
|
function EnableEditor(props) {
|
|
9375
|
+
createSignal(false);
|
|
9375
9376
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
9376
9377
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
9377
9378
|
const [httpReqsPending, setHttpReqsPending] = createSignal({});
|
|
@@ -9539,8 +9540,12 @@ function EnableEditor(props) {
|
|
|
9539
9540
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
|
|
9540
9541
|
}
|
|
9541
9542
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
9542
|
-
|
|
9543
|
-
|
|
9543
|
+
const winningVariantId = getCookieSync({
|
|
9544
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
9545
|
+
canTrack: true
|
|
9546
|
+
});
|
|
9547
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
9548
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
9544
9549
|
const contentId = props.builderContextSignal.content?.id;
|
|
9545
9550
|
const apiKeyProp = props.apiKey;
|
|
9546
9551
|
_track({
|
|
@@ -9549,7 +9554,7 @@ function EnableEditor(props) {
|
|
|
9549
9554
|
canTrack: true,
|
|
9550
9555
|
contentId,
|
|
9551
9556
|
apiKey: apiKeyProp,
|
|
9552
|
-
variationId:
|
|
9557
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
9553
9558
|
});
|
|
9554
9559
|
}
|
|
9555
9560
|
if (isPreviewing() && !isEditing()) {
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -8020,7 +8020,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8020
8020
|
}
|
|
8021
8021
|
|
|
8022
8022
|
// src/constants/sdk-version.ts
|
|
8023
|
-
var SDK_VERSION = "4.0.
|
|
8023
|
+
var SDK_VERSION = "4.0.2";
|
|
8024
8024
|
|
|
8025
8025
|
// src/helpers/sdk-headers.ts
|
|
8026
8026
|
var getSdkHeaders = () => ({
|
|
@@ -8881,6 +8881,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
8881
8881
|
|
|
8882
8882
|
// src/components/content/components/enable-editor.tsx
|
|
8883
8883
|
function EnableEditor(props) {
|
|
8884
|
+
const [hasExecuted, setHasExecuted] = createSignal16(false);
|
|
8884
8885
|
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
8885
8886
|
props.contentWrapper || "div"
|
|
8886
8887
|
);
|
|
@@ -9062,8 +9063,12 @@ function EnableEditor(props) {
|
|
|
9062
9063
|
);
|
|
9063
9064
|
}
|
|
9064
9065
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
9065
|
-
|
|
9066
|
-
|
|
9066
|
+
const winningVariantId = getCookieSync({
|
|
9067
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
9068
|
+
canTrack: true
|
|
9069
|
+
});
|
|
9070
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
9071
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
9067
9072
|
const contentId = props.builderContextSignal.content?.id;
|
|
9068
9073
|
const apiKeyProp = props.apiKey;
|
|
9069
9074
|
_track({
|
|
@@ -9072,7 +9077,7 @@ function EnableEditor(props) {
|
|
|
9072
9077
|
canTrack: true,
|
|
9073
9078
|
contentId,
|
|
9074
9079
|
apiKey: apiKeyProp,
|
|
9075
|
-
variationId:
|
|
9080
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
9076
9081
|
});
|
|
9077
9082
|
}
|
|
9078
9083
|
if (isPreviewing() && !isEditing()) {
|
package/lib/edge/index.js
CHANGED
|
@@ -8497,7 +8497,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8497
8497
|
}
|
|
8498
8498
|
|
|
8499
8499
|
// src/constants/sdk-version.ts
|
|
8500
|
-
var SDK_VERSION = "4.0.
|
|
8500
|
+
var SDK_VERSION = "4.0.2";
|
|
8501
8501
|
|
|
8502
8502
|
// src/helpers/sdk-headers.ts
|
|
8503
8503
|
var getSdkHeaders = () => ({
|
|
@@ -9352,6 +9352,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
9352
9352
|
|
|
9353
9353
|
// src/components/content/components/enable-editor.tsx
|
|
9354
9354
|
function EnableEditor(props) {
|
|
9355
|
+
createSignal(false);
|
|
9355
9356
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
9356
9357
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
9357
9358
|
const [httpReqsPending, setHttpReqsPending] = createSignal({});
|
|
@@ -9518,8 +9519,12 @@ function EnableEditor(props) {
|
|
|
9518
9519
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
|
|
9519
9520
|
}
|
|
9520
9521
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
9521
|
-
|
|
9522
|
-
|
|
9522
|
+
const winningVariantId = getCookieSync({
|
|
9523
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
9524
|
+
canTrack: true
|
|
9525
|
+
});
|
|
9526
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
9527
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
9523
9528
|
const contentId = props.builderContextSignal.content?.id;
|
|
9524
9529
|
const apiKeyProp = props.apiKey;
|
|
9525
9530
|
_track({
|
|
@@ -9528,7 +9533,7 @@ function EnableEditor(props) {
|
|
|
9528
9533
|
canTrack: true,
|
|
9529
9534
|
contentId,
|
|
9530
9535
|
apiKey: apiKeyProp,
|
|
9531
|
-
variationId:
|
|
9536
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
9532
9537
|
});
|
|
9533
9538
|
}
|
|
9534
9539
|
if (isPreviewing() && !isEditing()) {
|
package/lib/edge/index.jsx
CHANGED
|
@@ -8008,7 +8008,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8008
8008
|
}
|
|
8009
8009
|
|
|
8010
8010
|
// src/constants/sdk-version.ts
|
|
8011
|
-
var SDK_VERSION = "4.0.
|
|
8011
|
+
var SDK_VERSION = "4.0.2";
|
|
8012
8012
|
|
|
8013
8013
|
// src/helpers/sdk-headers.ts
|
|
8014
8014
|
var getSdkHeaders = () => ({
|
|
@@ -8863,6 +8863,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
8863
8863
|
|
|
8864
8864
|
// src/components/content/components/enable-editor.tsx
|
|
8865
8865
|
function EnableEditor(props) {
|
|
8866
|
+
const [hasExecuted, setHasExecuted] = createSignal16(false);
|
|
8866
8867
|
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
8867
8868
|
props.contentWrapper || "div"
|
|
8868
8869
|
);
|
|
@@ -9043,8 +9044,12 @@ function EnableEditor(props) {
|
|
|
9043
9044
|
);
|
|
9044
9045
|
}
|
|
9045
9046
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
9046
|
-
|
|
9047
|
-
|
|
9047
|
+
const winningVariantId = getCookieSync({
|
|
9048
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
9049
|
+
canTrack: true
|
|
9050
|
+
});
|
|
9051
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
9052
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
9048
9053
|
const contentId = props.builderContextSignal.content?.id;
|
|
9049
9054
|
const apiKeyProp = props.apiKey;
|
|
9050
9055
|
_track({
|
|
@@ -9053,7 +9058,7 @@ function EnableEditor(props) {
|
|
|
9053
9058
|
canTrack: true,
|
|
9054
9059
|
contentId,
|
|
9055
9060
|
apiKey: apiKeyProp,
|
|
9056
|
-
variationId:
|
|
9061
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
9057
9062
|
});
|
|
9058
9063
|
}
|
|
9059
9064
|
if (isPreviewing() && !isEditing()) {
|
package/lib/node/dev.js
CHANGED
|
@@ -5499,7 +5499,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5499
5499
|
}
|
|
5500
5500
|
|
|
5501
5501
|
// src/constants/sdk-version.ts
|
|
5502
|
-
var SDK_VERSION = "4.0.
|
|
5502
|
+
var SDK_VERSION = "4.0.2";
|
|
5503
5503
|
|
|
5504
5504
|
// src/helpers/sdk-headers.ts
|
|
5505
5505
|
var getSdkHeaders = () => ({
|
|
@@ -6360,6 +6360,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
6360
6360
|
|
|
6361
6361
|
// src/components/content/components/enable-editor.tsx
|
|
6362
6362
|
function EnableEditor(props) {
|
|
6363
|
+
createSignal(false);
|
|
6363
6364
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
6364
6365
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
6365
6366
|
const [httpReqsPending, setHttpReqsPending] = createSignal({});
|
|
@@ -6527,8 +6528,12 @@ function EnableEditor(props) {
|
|
|
6527
6528
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
|
|
6528
6529
|
}
|
|
6529
6530
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
6530
|
-
|
|
6531
|
-
|
|
6531
|
+
const winningVariantId = getCookieSync({
|
|
6532
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
6533
|
+
canTrack: true
|
|
6534
|
+
});
|
|
6535
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
6536
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
6532
6537
|
const contentId = props.builderContextSignal.content?.id;
|
|
6533
6538
|
const apiKeyProp = props.apiKey;
|
|
6534
6539
|
_track({
|
|
@@ -6537,7 +6542,7 @@ function EnableEditor(props) {
|
|
|
6537
6542
|
canTrack: true,
|
|
6538
6543
|
contentId,
|
|
6539
6544
|
apiKey: apiKeyProp,
|
|
6540
|
-
variationId:
|
|
6545
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
6541
6546
|
});
|
|
6542
6547
|
}
|
|
6543
6548
|
if (isPreviewing() && !isEditing()) {
|
package/lib/node/dev.jsx
CHANGED
|
@@ -5008,7 +5008,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5008
5008
|
}
|
|
5009
5009
|
|
|
5010
5010
|
// src/constants/sdk-version.ts
|
|
5011
|
-
var SDK_VERSION = "4.0.
|
|
5011
|
+
var SDK_VERSION = "4.0.2";
|
|
5012
5012
|
|
|
5013
5013
|
// src/helpers/sdk-headers.ts
|
|
5014
5014
|
var getSdkHeaders = () => ({
|
|
@@ -5869,6 +5869,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
5869
5869
|
|
|
5870
5870
|
// src/components/content/components/enable-editor.tsx
|
|
5871
5871
|
function EnableEditor(props) {
|
|
5872
|
+
const [hasExecuted, setHasExecuted] = createSignal16(false);
|
|
5872
5873
|
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5873
5874
|
props.contentWrapper || "div"
|
|
5874
5875
|
);
|
|
@@ -6050,8 +6051,12 @@ function EnableEditor(props) {
|
|
|
6050
6051
|
);
|
|
6051
6052
|
}
|
|
6052
6053
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
6053
|
-
|
|
6054
|
-
|
|
6054
|
+
const winningVariantId = getCookieSync({
|
|
6055
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
6056
|
+
canTrack: true
|
|
6057
|
+
});
|
|
6058
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
6059
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
6055
6060
|
const contentId = props.builderContextSignal.content?.id;
|
|
6056
6061
|
const apiKeyProp = props.apiKey;
|
|
6057
6062
|
_track({
|
|
@@ -6060,7 +6065,7 @@ function EnableEditor(props) {
|
|
|
6060
6065
|
canTrack: true,
|
|
6061
6066
|
contentId,
|
|
6062
6067
|
apiKey: apiKeyProp,
|
|
6063
|
-
variationId:
|
|
6068
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
6064
6069
|
});
|
|
6065
6070
|
}
|
|
6066
6071
|
if (isPreviewing() && !isEditing()) {
|
package/lib/node/index.js
CHANGED
|
@@ -5485,7 +5485,7 @@ function getPreviewContent(_searchParams) {
|
|
|
5485
5485
|
}
|
|
5486
5486
|
|
|
5487
5487
|
// src/constants/sdk-version.ts
|
|
5488
|
-
var SDK_VERSION = "4.0.
|
|
5488
|
+
var SDK_VERSION = "4.0.2";
|
|
5489
5489
|
|
|
5490
5490
|
// src/helpers/sdk-headers.ts
|
|
5491
5491
|
var getSdkHeaders = () => ({
|
|
@@ -6340,6 +6340,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
6340
6340
|
|
|
6341
6341
|
// src/components/content/components/enable-editor.tsx
|
|
6342
6342
|
function EnableEditor(props) {
|
|
6343
|
+
createSignal(false);
|
|
6343
6344
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
6344
6345
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
6345
6346
|
const [httpReqsPending, setHttpReqsPending] = createSignal({});
|
|
@@ -6506,8 +6507,12 @@ function EnableEditor(props) {
|
|
|
6506
6507
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate);
|
|
6507
6508
|
}
|
|
6508
6509
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
6509
|
-
|
|
6510
|
-
|
|
6510
|
+
const winningVariantId = getCookieSync({
|
|
6511
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
6512
|
+
canTrack: true
|
|
6513
|
+
});
|
|
6514
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
6515
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
6511
6516
|
const contentId = props.builderContextSignal.content?.id;
|
|
6512
6517
|
const apiKeyProp = props.apiKey;
|
|
6513
6518
|
_track({
|
|
@@ -6516,7 +6521,7 @@ function EnableEditor(props) {
|
|
|
6516
6521
|
canTrack: true,
|
|
6517
6522
|
contentId,
|
|
6518
6523
|
apiKey: apiKeyProp,
|
|
6519
|
-
variationId:
|
|
6524
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
6520
6525
|
});
|
|
6521
6526
|
}
|
|
6522
6527
|
if (isPreviewing() && !isEditing()) {
|
package/lib/node/index.jsx
CHANGED
|
@@ -4996,7 +4996,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4996
4996
|
}
|
|
4997
4997
|
|
|
4998
4998
|
// src/constants/sdk-version.ts
|
|
4999
|
-
var SDK_VERSION = "4.0.
|
|
4999
|
+
var SDK_VERSION = "4.0.2";
|
|
5000
5000
|
|
|
5001
5001
|
// src/helpers/sdk-headers.ts
|
|
5002
5002
|
var getSdkHeaders = () => ({
|
|
@@ -5851,6 +5851,7 @@ var getWrapperClassName = (variationId) => {
|
|
|
5851
5851
|
|
|
5852
5852
|
// src/components/content/components/enable-editor.tsx
|
|
5853
5853
|
function EnableEditor(props) {
|
|
5854
|
+
const [hasExecuted, setHasExecuted] = createSignal16(false);
|
|
5854
5855
|
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5855
5856
|
props.contentWrapper || "div"
|
|
5856
5857
|
);
|
|
@@ -6031,8 +6032,12 @@ function EnableEditor(props) {
|
|
|
6031
6032
|
);
|
|
6032
6033
|
}
|
|
6033
6034
|
const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
|
|
6034
|
-
|
|
6035
|
-
|
|
6035
|
+
const winningVariantId = getCookieSync({
|
|
6036
|
+
name: `builder.tests.${props.builderContextSignal.content?.id}`,
|
|
6037
|
+
canTrack: true
|
|
6038
|
+
});
|
|
6039
|
+
const variationId = props.builderContextSignal.content?.testVariationId;
|
|
6040
|
+
if (shouldTrackImpression && variationId === winningVariantId) {
|
|
6036
6041
|
const contentId = props.builderContextSignal.content?.id;
|
|
6037
6042
|
const apiKeyProp = props.apiKey;
|
|
6038
6043
|
_track({
|
|
@@ -6041,7 +6046,7 @@ function EnableEditor(props) {
|
|
|
6041
6046
|
canTrack: true,
|
|
6042
6047
|
contentId,
|
|
6043
6048
|
apiKey: apiKeyProp,
|
|
6044
|
-
variationId:
|
|
6049
|
+
variationId: winningVariantId !== contentId ? winningVariantId : void 0
|
|
6045
6050
|
});
|
|
6046
6051
|
}
|
|
6047
6052
|
if (isPreviewing() && !isEditing()) {
|