@builder.io/sdk-qwik 0.5.8 → 0.5.9
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/index.qwik.cjs +125 -135
- package/lib/index.qwik.mjs +126 -136
- package/package.json +1 -1
- package/types/components/content/content.types.d.ts +2 -2
- package/types/components/content-variants/content-variants.d.ts +2 -2
- package/types/components/content-variants/content-variants.types.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/browser-runtime/browser.d.ts +4 -0
- package/types/functions/evaluate/browser-runtime/index.d.ts +1 -0
- package/types/functions/evaluate/evaluate.d.ts +4 -8
- package/types/functions/evaluate/helpers.d.ts +18 -0
- package/types/functions/evaluate/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/index.d.ts +1 -0
- package/types/functions/evaluate/non-node-runtime/acorn-interpreter.d.ts +2 -0
- package/types/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
- package/types/functions/fetch-builder-props.d.ts +2 -2
- package/types/index-helpers/blocks-exports.d.ts +1 -1
- package/types/index.d.ts +5 -14
- package/types/server-index.d.ts +15 -0
- package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +1 -1
- package/types/src/components/blocks/blocks.d.ts +1 -1
- package/types/src/components/content/content.types.d.ts +2 -2
- package/types/src/components/content/index.d.ts +1 -1
- package/types/src/components/content-variants/content-variants.d.ts +2 -2
- package/types/src/components/content-variants/content-variants.types.d.ts +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/constants/target.d.ts +1 -1
- package/types/src/functions/evaluate/evaluate.d.ts +4 -8
- package/types/src/functions/evaluate/index.d.ts +1 -1
- package/types/src/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/types/src/functions/evaluate/non-node-runtime/index.d.ts +1 -1
- package/types/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +2 -2
- package/types/src/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/types/src/functions/fetch-builder-props.d.ts +4 -4
- package/types/src/helpers/preview-lru-cache/get.d.ts +1 -1
- package/types/src/helpers/preview-lru-cache/set.d.ts +1 -1
- package/types/src/index-helpers/blocks-exports.d.ts +12 -12
- package/types/src/index.d.ts +5 -14
- package/types/src/server-index.d.ts +15 -0
package/lib/index.qwik.cjs
CHANGED
|
@@ -68,12 +68,84 @@ function isIframe() {
|
|
|
68
68
|
function isEditing() {
|
|
69
69
|
return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
const getLocation = () => {
|
|
72
|
+
if (isBrowser()) {
|
|
73
|
+
const parsedLocation = new URL(location.href);
|
|
74
|
+
if (parsedLocation.pathname === "")
|
|
75
|
+
parsedLocation.pathname = "/";
|
|
76
|
+
return parsedLocation;
|
|
77
|
+
} else {
|
|
78
|
+
console.warn("Cannot get location for tracking in non-browser environment");
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const getUserAgent = () => typeof navigator === "object" && navigator.userAgent || "";
|
|
83
|
+
const getUserAttributes = () => {
|
|
84
|
+
const userAgent = getUserAgent();
|
|
85
|
+
const isMobile = {
|
|
86
|
+
Android() {
|
|
87
|
+
return userAgent.match(/Android/i);
|
|
88
|
+
},
|
|
89
|
+
BlackBerry() {
|
|
90
|
+
return userAgent.match(/BlackBerry/i);
|
|
91
|
+
},
|
|
92
|
+
iOS() {
|
|
93
|
+
return userAgent.match(/iPhone|iPod/i);
|
|
94
|
+
},
|
|
95
|
+
Opera() {
|
|
96
|
+
return userAgent.match(/Opera Mini/i);
|
|
97
|
+
},
|
|
98
|
+
Windows() {
|
|
99
|
+
return userAgent.match(/IEMobile/i) || userAgent.match(/WPDesktop/i);
|
|
100
|
+
},
|
|
101
|
+
any() {
|
|
102
|
+
return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows() || TARGET === "reactNative";
|
|
103
|
+
}
|
|
75
104
|
};
|
|
76
|
-
|
|
105
|
+
const isTablet = userAgent.match(/Tablet|iPad/i);
|
|
106
|
+
const url = getLocation();
|
|
107
|
+
return {
|
|
108
|
+
urlPath: url == null ? void 0 : url.pathname,
|
|
109
|
+
host: (url == null ? void 0 : url.host) || (url == null ? void 0 : url.hostname),
|
|
110
|
+
device: isTablet ? "tablet" : isMobile.any() ? "mobile" : "desktop"
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
const getFunctionArguments = ({ builder, context, event, state }) => {
|
|
114
|
+
return Object.entries({
|
|
115
|
+
state,
|
|
116
|
+
Builder: builder,
|
|
117
|
+
// legacy
|
|
118
|
+
builder,
|
|
119
|
+
context,
|
|
120
|
+
event
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
const runInBrowser = ({ code, builder, context, event, localState, rootSetState, rootState }) => {
|
|
124
|
+
const functionArgs = getFunctionArguments({
|
|
125
|
+
builder,
|
|
126
|
+
context,
|
|
127
|
+
event,
|
|
128
|
+
state: flattenState(rootState, localState, rootSetState)
|
|
129
|
+
});
|
|
130
|
+
return new Function(...functionArgs.map(([name]) => name), code)(...functionArgs.map(([, value]) => value));
|
|
131
|
+
};
|
|
132
|
+
function flattenState(rootState, localState, rootSetState) {
|
|
133
|
+
if (rootState === localState)
|
|
134
|
+
throw new Error("rootState === localState");
|
|
135
|
+
return new Proxy(rootState, {
|
|
136
|
+
get: (_, prop) => {
|
|
137
|
+
if (localState && prop in localState)
|
|
138
|
+
return localState[prop];
|
|
139
|
+
return rootState[prop];
|
|
140
|
+
},
|
|
141
|
+
set: (_, prop, value) => {
|
|
142
|
+
if (localState && prop in localState)
|
|
143
|
+
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
144
|
+
rootState[prop] = value;
|
|
145
|
+
rootSetState == null ? void 0 : rootSetState(rootState);
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
77
149
|
}
|
|
78
150
|
const set = (obj, _path, value) => {
|
|
79
151
|
if (Object(obj) !== obj)
|
|
@@ -3262,20 +3334,19 @@ const processCode = (code) => {
|
|
|
3262
3334
|
}).filter(Boolean).join("\n");
|
|
3263
3335
|
};
|
|
3264
3336
|
const getJSONValName = (val) => val + "JSON";
|
|
3265
|
-
const runInNonNode = ({ builder, context, event, rootState, localState, rootSetState,
|
|
3337
|
+
const runInNonNode = ({ builder, context, event, rootState, localState, rootSetState, code }) => {
|
|
3266
3338
|
const state = {
|
|
3267
3339
|
...rootState,
|
|
3268
3340
|
...localState
|
|
3269
3341
|
};
|
|
3270
|
-
const properties = {
|
|
3271
|
-
state,
|
|
3272
|
-
Builder: builder,
|
|
3342
|
+
const properties = getFunctionArguments({
|
|
3273
3343
|
builder,
|
|
3274
3344
|
context,
|
|
3275
|
-
event
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
const
|
|
3345
|
+
event,
|
|
3346
|
+
state
|
|
3347
|
+
});
|
|
3348
|
+
const prependedCode = properties.map(([key]) => `var ${key} = JSON.parse(${getJSONValName(key)});`).join("\n");
|
|
3349
|
+
const cleanedCode = processCode(code);
|
|
3279
3350
|
if (cleanedCode === "") {
|
|
3280
3351
|
logger.warn("Skipping evaluation of empty code block.");
|
|
3281
3352
|
return;
|
|
@@ -3293,8 +3364,7 @@ theFunction();
|
|
|
3293
3364
|
rootSetState == null ? void 0 : rootSetState(newState);
|
|
3294
3365
|
};
|
|
3295
3366
|
const initFunc = function(interpreter, globalObject) {
|
|
3296
|
-
|
|
3297
|
-
const val = properties[key] || {};
|
|
3367
|
+
properties.forEach(([key, val]) => {
|
|
3298
3368
|
const jsonVal = JSON.stringify(val);
|
|
3299
3369
|
interpreter.setProperty(globalObject, getJSONValName(key), jsonVal);
|
|
3300
3370
|
});
|
|
@@ -3312,6 +3382,13 @@ theFunction();
|
|
|
3312
3382
|
return;
|
|
3313
3383
|
}
|
|
3314
3384
|
};
|
|
3385
|
+
function isNonNodeServer() {
|
|
3386
|
+
const hasNode = () => {
|
|
3387
|
+
var _a;
|
|
3388
|
+
return typeof process !== "undefined" && ((_a = process == null ? void 0 : process.versions) == null ? void 0 : _a.node);
|
|
3389
|
+
};
|
|
3390
|
+
return !isBrowser() && !hasNode();
|
|
3391
|
+
}
|
|
3315
3392
|
function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true }) {
|
|
3316
3393
|
if (code === "") {
|
|
3317
3394
|
logger.warn("Skipping evaluation of empty code block.");
|
|
@@ -3320,7 +3397,8 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
3320
3397
|
const builder = {
|
|
3321
3398
|
isEditing: isEditing(),
|
|
3322
3399
|
isBrowser: isBrowser(),
|
|
3323
|
-
isServer: !isBrowser()
|
|
3400
|
+
isServer: !isBrowser(),
|
|
3401
|
+
getUserAttributes: () => getUserAttributes()
|
|
3324
3402
|
};
|
|
3325
3403
|
const useReturn = (
|
|
3326
3404
|
// we disable this for cases where we definitely don't want a return
|
|
@@ -3328,7 +3406,7 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
3328
3406
|
);
|
|
3329
3407
|
const useCode = useReturn ? `return (${code});` : code;
|
|
3330
3408
|
const args = {
|
|
3331
|
-
useCode,
|
|
3409
|
+
code: useCode,
|
|
3332
3410
|
builder,
|
|
3333
3411
|
context,
|
|
3334
3412
|
event,
|
|
@@ -3336,40 +3414,18 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
3336
3414
|
rootState,
|
|
3337
3415
|
localState
|
|
3338
3416
|
};
|
|
3339
|
-
if (isBrowser())
|
|
3340
|
-
return runInBrowser(args);
|
|
3341
|
-
if (isNonNodeServer())
|
|
3342
|
-
return runInNonNode(args);
|
|
3343
|
-
return runInNode(args);
|
|
3344
|
-
}
|
|
3345
|
-
const runInBrowser = ({ useCode, builder, context, event, localState, rootSetState, rootState }) => {
|
|
3346
|
-
const state = flattenState(rootState, localState, rootSetState);
|
|
3347
3417
|
try {
|
|
3348
|
-
|
|
3418
|
+
if (isBrowser())
|
|
3419
|
+
return runInBrowser(args);
|
|
3420
|
+
if (isNonNodeServer())
|
|
3421
|
+
return runInNonNode(args);
|
|
3422
|
+
return runInBrowser(args);
|
|
3349
3423
|
} catch (e) {
|
|
3350
|
-
logger.
|
|
3424
|
+
logger.error("Failed code evaluation: " + e.message, {
|
|
3425
|
+
code
|
|
3426
|
+
});
|
|
3427
|
+
return void 0;
|
|
3351
3428
|
}
|
|
3352
|
-
};
|
|
3353
|
-
const runInNode = (args) => {
|
|
3354
|
-
return runInBrowser(args);
|
|
3355
|
-
};
|
|
3356
|
-
function flattenState(rootState, localState, rootSetState) {
|
|
3357
|
-
if (rootState === localState)
|
|
3358
|
-
throw new Error("rootState === localState");
|
|
3359
|
-
return new Proxy(rootState, {
|
|
3360
|
-
get: (_, prop) => {
|
|
3361
|
-
if (localState && prop in localState)
|
|
3362
|
-
return localState[prop];
|
|
3363
|
-
return rootState[prop];
|
|
3364
|
-
},
|
|
3365
|
-
set: (_, prop, value) => {
|
|
3366
|
-
if (localState && prop in localState)
|
|
3367
|
-
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
3368
|
-
rootState[prop] = value;
|
|
3369
|
-
rootSetState == null ? void 0 : rootSetState(rootState);
|
|
3370
|
-
return true;
|
|
3371
|
-
}
|
|
3372
|
-
});
|
|
3373
3429
|
}
|
|
3374
3430
|
const fastClone = (obj) => JSON.parse(JSON.stringify(obj));
|
|
3375
3431
|
function transformBlock(block) {
|
|
@@ -3800,11 +3856,9 @@ const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
3800
3856
|
contextValue: props.context
|
|
3801
3857
|
}),
|
|
3802
3858
|
children: [
|
|
3803
|
-
(props.blockChildren || []).map(
|
|
3859
|
+
(props.blockChildren || []).map((child) => {
|
|
3804
3860
|
return /* @__PURE__ */ qwik._jsxC(Block, {
|
|
3805
|
-
|
|
3806
|
-
return child;
|
|
3807
|
-
},
|
|
3861
|
+
block: child,
|
|
3808
3862
|
get context() {
|
|
3809
3863
|
return props.context;
|
|
3810
3864
|
},
|
|
@@ -3812,7 +3866,6 @@ const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
3812
3866
|
return props.registeredComponents;
|
|
3813
3867
|
},
|
|
3814
3868
|
[qwik._IMMUTABLE]: {
|
|
3815
|
-
block: qwik._IMMUTABLE,
|
|
3816
3869
|
context: qwik._fnSignal((p0) => p0.context, [
|
|
3817
3870
|
props
|
|
3818
3871
|
], "p0.context"),
|
|
@@ -3822,16 +3875,13 @@ const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
3822
3875
|
}
|
|
3823
3876
|
}, 3, "block-" + child.id);
|
|
3824
3877
|
}),
|
|
3825
|
-
(props.blockChildren || []).map(
|
|
3878
|
+
(props.blockChildren || []).map((child) => {
|
|
3826
3879
|
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
3827
|
-
|
|
3828
|
-
return child;
|
|
3829
|
-
},
|
|
3880
|
+
block: child,
|
|
3830
3881
|
get context() {
|
|
3831
3882
|
return props.context;
|
|
3832
3883
|
},
|
|
3833
3884
|
[qwik._IMMUTABLE]: {
|
|
3834
|
-
block: qwik._IMMUTABLE,
|
|
3835
3885
|
context: qwik._fnSignal((p0) => p0.context, [
|
|
3836
3886
|
props
|
|
3837
3887
|
], "p0.context")
|
|
@@ -3987,7 +4037,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
3987
4037
|
hasChildren: qwik._IMMUTABLE
|
|
3988
4038
|
}
|
|
3989
4039
|
}, 3, "jN_0") : null,
|
|
3990
|
-
!isEmptyHtmlElement(Tag.value) && repeatItem.value ? (repeatItem.value || []).map(
|
|
4040
|
+
!isEmptyHtmlElement(Tag.value) && repeatItem.value ? (repeatItem.value || []).map((data, index) => {
|
|
3991
4041
|
return /* @__PURE__ */ qwik._jsxC(RepeatedBlock, {
|
|
3992
4042
|
get repeatContext() {
|
|
3993
4043
|
return data.context;
|
|
@@ -3999,11 +4049,11 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
3999
4049
|
return props.registeredComponents;
|
|
4000
4050
|
},
|
|
4001
4051
|
[qwik._IMMUTABLE]: {
|
|
4002
|
-
block: qwik.
|
|
4052
|
+
block: qwik._wrapProp(data, "block"),
|
|
4003
4053
|
registeredComponents: qwik._fnSignal((p0) => p0.registeredComponents, [
|
|
4004
4054
|
props
|
|
4005
4055
|
], "p0.registeredComponents"),
|
|
4006
|
-
repeatContext: qwik.
|
|
4056
|
+
repeatContext: qwik._wrapProp(data, "context")
|
|
4007
4057
|
}
|
|
4008
4058
|
}, 3, index);
|
|
4009
4059
|
}) : null,
|
|
@@ -4021,11 +4071,9 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4021
4071
|
/* @__PURE__ */ qwik._jsxC(ComponentRef, {
|
|
4022
4072
|
...componentRefProps.value
|
|
4023
4073
|
}, 0, "jN_1"),
|
|
4024
|
-
(childrenWithoutParentComponent.value || []).map(
|
|
4074
|
+
(childrenWithoutParentComponent.value || []).map((child) => {
|
|
4025
4075
|
return /* @__PURE__ */ qwik._jsxC(Block, {
|
|
4026
|
-
|
|
4027
|
-
return child;
|
|
4028
|
-
},
|
|
4076
|
+
block: child,
|
|
4029
4077
|
get context() {
|
|
4030
4078
|
return state.childrenContext;
|
|
4031
4079
|
},
|
|
@@ -4033,7 +4081,6 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4033
4081
|
return props.registeredComponents;
|
|
4034
4082
|
},
|
|
4035
4083
|
[qwik._IMMUTABLE]: {
|
|
4036
|
-
block: qwik._IMMUTABLE,
|
|
4037
4084
|
context: qwik._fnSignal((p0) => p0.childrenContext, [
|
|
4038
4085
|
state
|
|
4039
4086
|
], "p0.childrenContext"),
|
|
@@ -4043,16 +4090,13 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4043
4090
|
}
|
|
4044
4091
|
}, 3, "block-" + child.id);
|
|
4045
4092
|
}),
|
|
4046
|
-
(childrenWithoutParentComponent.value || []).map(
|
|
4093
|
+
(childrenWithoutParentComponent.value || []).map((child) => {
|
|
4047
4094
|
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
4048
|
-
|
|
4049
|
-
return child;
|
|
4050
|
-
},
|
|
4095
|
+
block: child,
|
|
4051
4096
|
get context() {
|
|
4052
4097
|
return state.childrenContext;
|
|
4053
4098
|
},
|
|
4054
4099
|
[qwik._IMMUTABLE]: {
|
|
4055
|
-
block: qwik._IMMUTABLE,
|
|
4056
4100
|
context: qwik._fnSignal((p0) => p0.childrenContext, [
|
|
4057
4101
|
state
|
|
4058
4102
|
], "p0.childrenContext")
|
|
@@ -4173,11 +4217,9 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
4173
4217
|
return props.styleProp;
|
|
4174
4218
|
},
|
|
4175
4219
|
children: [
|
|
4176
|
-
props.blocks ? (props.blocks || []).map(
|
|
4220
|
+
props.blocks ? (props.blocks || []).map((block) => {
|
|
4177
4221
|
return /* @__PURE__ */ qwik._jsxC(Block, {
|
|
4178
|
-
|
|
4179
|
-
return block;
|
|
4180
|
-
},
|
|
4222
|
+
block,
|
|
4181
4223
|
get context() {
|
|
4182
4224
|
return props.context || builderContext$1;
|
|
4183
4225
|
},
|
|
@@ -4185,7 +4227,6 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
4185
4227
|
return props.registeredComponents || componentsContext.registeredComponents;
|
|
4186
4228
|
},
|
|
4187
4229
|
[qwik._IMMUTABLE]: {
|
|
4188
|
-
block: qwik._IMMUTABLE,
|
|
4189
4230
|
context: qwik._fnSignal((p0, p1) => p1.context || p0, [
|
|
4190
4231
|
builderContext$1,
|
|
4191
4232
|
props
|
|
@@ -4197,16 +4238,13 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
4197
4238
|
}
|
|
4198
4239
|
}, 3, "render-block-" + block.id);
|
|
4199
4240
|
}) : null,
|
|
4200
|
-
props.blocks ? (props.blocks || []).map(
|
|
4241
|
+
props.blocks ? (props.blocks || []).map((block) => {
|
|
4201
4242
|
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
4202
|
-
|
|
4203
|
-
return block;
|
|
4204
|
-
},
|
|
4243
|
+
block,
|
|
4205
4244
|
get context() {
|
|
4206
4245
|
return props.context || builderContext$1;
|
|
4207
4246
|
},
|
|
4208
4247
|
[qwik._IMMUTABLE]: {
|
|
4209
|
-
block: qwik._IMMUTABLE,
|
|
4210
4248
|
context: qwik._fnSignal((p0, p1) => p1.context || p0, [
|
|
4211
4249
|
builderContext$1,
|
|
4212
4250
|
props
|
|
@@ -4349,7 +4387,7 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQr
|
|
|
4349
4387
|
], "p0.value")
|
|
4350
4388
|
}
|
|
4351
4389
|
}, 3, "c0_0"),
|
|
4352
|
-
(props.columns || []).map(
|
|
4390
|
+
(props.columns || []).map((column, index) => {
|
|
4353
4391
|
return /* @__PURE__ */ qwik.createElement("div", {
|
|
4354
4392
|
class: "builder-column div-Columns-2",
|
|
4355
4393
|
style: columnCssVars(props, state, index),
|
|
@@ -4358,9 +4396,7 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQr
|
|
|
4358
4396
|
get blocks() {
|
|
4359
4397
|
return column.blocks;
|
|
4360
4398
|
},
|
|
4361
|
-
|
|
4362
|
-
return `component.options.columns.${index}.blocks`;
|
|
4363
|
-
},
|
|
4399
|
+
path: `component.options.columns.${index}.blocks`,
|
|
4364
4400
|
get parent() {
|
|
4365
4401
|
return props.builderBlock.id;
|
|
4366
4402
|
},
|
|
@@ -4376,14 +4412,13 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQr
|
|
|
4376
4412
|
return props.builderComponents;
|
|
4377
4413
|
},
|
|
4378
4414
|
[qwik._IMMUTABLE]: {
|
|
4379
|
-
blocks: qwik.
|
|
4415
|
+
blocks: qwik._wrapProp(column, "blocks"),
|
|
4380
4416
|
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
4381
4417
|
props
|
|
4382
4418
|
], "p0.builderContext"),
|
|
4383
4419
|
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
4384
4420
|
props
|
|
4385
4421
|
], "p0.builderBlock.id"),
|
|
4386
|
-
path: qwik._IMMUTABLE,
|
|
4387
4422
|
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
4388
4423
|
props
|
|
4389
4424
|
], "p0.builderComponents"),
|
|
@@ -6184,48 +6219,6 @@ const setVisitorId = ({ id: id2, canTrack }) => setLocalStorageItem({
|
|
|
6184
6219
|
value: id2,
|
|
6185
6220
|
canTrack
|
|
6186
6221
|
});
|
|
6187
|
-
const getLocation = () => {
|
|
6188
|
-
if (isBrowser()) {
|
|
6189
|
-
const parsedLocation = new URL(location.href);
|
|
6190
|
-
if (parsedLocation.pathname === "")
|
|
6191
|
-
parsedLocation.pathname = "/";
|
|
6192
|
-
return parsedLocation;
|
|
6193
|
-
} else {
|
|
6194
|
-
console.warn("Cannot get location for tracking in non-browser environment");
|
|
6195
|
-
return null;
|
|
6196
|
-
}
|
|
6197
|
-
};
|
|
6198
|
-
const getUserAgent = () => typeof navigator === "object" && navigator.userAgent || "";
|
|
6199
|
-
const getUserAttributes = () => {
|
|
6200
|
-
const userAgent = getUserAgent();
|
|
6201
|
-
const isMobile = {
|
|
6202
|
-
Android() {
|
|
6203
|
-
return userAgent.match(/Android/i);
|
|
6204
|
-
},
|
|
6205
|
-
BlackBerry() {
|
|
6206
|
-
return userAgent.match(/BlackBerry/i);
|
|
6207
|
-
},
|
|
6208
|
-
iOS() {
|
|
6209
|
-
return userAgent.match(/iPhone|iPod/i);
|
|
6210
|
-
},
|
|
6211
|
-
Opera() {
|
|
6212
|
-
return userAgent.match(/Opera Mini/i);
|
|
6213
|
-
},
|
|
6214
|
-
Windows() {
|
|
6215
|
-
return userAgent.match(/IEMobile/i) || userAgent.match(/WPDesktop/i);
|
|
6216
|
-
},
|
|
6217
|
-
any() {
|
|
6218
|
-
return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows() || TARGET === "reactNative";
|
|
6219
|
-
}
|
|
6220
|
-
};
|
|
6221
|
-
const isTablet = userAgent.match(/Tablet|iPad/i);
|
|
6222
|
-
const url = getLocation();
|
|
6223
|
-
return {
|
|
6224
|
-
urlPath: url == null ? void 0 : url.pathname,
|
|
6225
|
-
host: (url == null ? void 0 : url.host) || (url == null ? void 0 : url.hostname),
|
|
6226
|
-
device: isTablet ? "tablet" : isMobile.any() ? "mobile" : "desktop"
|
|
6227
|
-
};
|
|
6228
|
-
};
|
|
6229
6222
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
6230
6223
|
if (!canTrack)
|
|
6231
6224
|
return {
|
|
@@ -6338,7 +6331,7 @@ const getInteractionPropertiesForEvent = (event) => {
|
|
|
6338
6331
|
}
|
|
6339
6332
|
};
|
|
6340
6333
|
};
|
|
6341
|
-
const SDK_VERSION = "0.5.
|
|
6334
|
+
const SDK_VERSION = "0.5.9";
|
|
6342
6335
|
const registry = {};
|
|
6343
6336
|
function register(type, info) {
|
|
6344
6337
|
let typeList = registry[type];
|
|
@@ -7151,11 +7144,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
7151
7144
|
], "p0.value")
|
|
7152
7145
|
}
|
|
7153
7146
|
}, 3, "XM_2"),
|
|
7154
|
-
(getVariants(props.content) || []).map(
|
|
7147
|
+
(getVariants(props.content) || []).map((variant) => {
|
|
7155
7148
|
return /* @__PURE__ */ qwik._jsxC(ContentComponent, {
|
|
7156
|
-
|
|
7157
|
-
return variant;
|
|
7158
|
-
},
|
|
7149
|
+
content: variant,
|
|
7159
7150
|
showContent: false,
|
|
7160
7151
|
get classNameProp() {
|
|
7161
7152
|
return void 0;
|
|
@@ -7204,7 +7195,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
7204
7195
|
props
|
|
7205
7196
|
], "p0.canTrack"),
|
|
7206
7197
|
classNameProp: qwik._IMMUTABLE,
|
|
7207
|
-
content: qwik._IMMUTABLE,
|
|
7208
7198
|
context: qwik._fnSignal((p0) => p0.context, [
|
|
7209
7199
|
props
|
|
7210
7200
|
], "p0.context"),
|