@builder.io/sdk-solid 3.0.3 → 3.0.6
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.ts +9 -3
- package/lib/browser/dev.js +543 -147
- package/lib/browser/dev.jsx +562 -158
- package/lib/browser/index.js +543 -147
- package/lib/browser/index.jsx +562 -158
- package/lib/edge/dev.js +543 -147
- package/lib/edge/dev.jsx +562 -158
- package/lib/edge/index.js +543 -147
- package/lib/edge/index.jsx +562 -158
- package/lib/node/dev.js +543 -147
- package/lib/node/dev.jsx +562 -158
- package/lib/node/index.js +543 -147
- package/lib/node/index.jsx +562 -158
- package/package.json +1 -1
package/lib/node/index.jsx
CHANGED
|
@@ -1627,8 +1627,9 @@ function BlocksWrapper(props) {
|
|
|
1627
1627
|
if (!props.path) {
|
|
1628
1628
|
return void 0;
|
|
1629
1629
|
}
|
|
1630
|
+
const thisPrefix = "this.";
|
|
1630
1631
|
const pathPrefix = "component.options.";
|
|
1631
|
-
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1632
|
+
return props.path.startsWith(thisPrefix) ? props.path.replace(thisPrefix, "") : props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1632
1633
|
});
|
|
1633
1634
|
function onClick() {
|
|
1634
1635
|
if (isEditing() && !props.blocks?.length) {
|
|
@@ -1663,7 +1664,7 @@ function BlocksWrapper(props) {
|
|
|
1663
1664
|
});
|
|
1664
1665
|
return <>
|
|
1665
1666
|
<Dynamic4
|
|
1666
|
-
class={className() + " dynamic-
|
|
1667
|
+
class={className() + " dynamic-3d7ff108"}
|
|
1667
1668
|
ref={blocksWrapperRef}
|
|
1668
1669
|
builder-path={dataPath()}
|
|
1669
1670
|
builder-parent-id={props.parent}
|
|
@@ -1675,7 +1676,7 @@ function BlocksWrapper(props) {
|
|
|
1675
1676
|
{...props.BlocksWrapperProps}
|
|
1676
1677
|
component={props.BlocksWrapper}
|
|
1677
1678
|
>{props.children}</Dynamic4>
|
|
1678
|
-
<style>{`.dynamic-
|
|
1679
|
+
<style>{`.dynamic-3d7ff108 {
|
|
1679
1680
|
display: flex;
|
|
1680
1681
|
flex-direction: column;
|
|
1681
1682
|
align-items: stretch;
|
|
@@ -1840,7 +1841,7 @@ function Columns(props) {
|
|
|
1840
1841
|
}
|
|
1841
1842
|
return <>
|
|
1842
1843
|
<div
|
|
1843
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1844
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-6331dfc5"}
|
|
1844
1845
|
style={columnsCssVars()}
|
|
1845
1846
|
{...{}}
|
|
1846
1847
|
>
|
|
@@ -1859,17 +1860,17 @@ function Columns(props) {
|
|
|
1859
1860
|
><Blocks_default
|
|
1860
1861
|
path={`columns.${index}.blocks`}
|
|
1861
1862
|
parent={props.builderBlock.id}
|
|
1862
|
-
styleProp={{
|
|
1863
|
-
flexGrow: "1"
|
|
1864
|
-
}}
|
|
1865
1863
|
context={props.builderContext}
|
|
1866
1864
|
registeredComponents={props.builderComponents}
|
|
1867
1865
|
linkComponent={props.builderLinkComponent}
|
|
1868
1866
|
blocks={column.blocks}
|
|
1867
|
+
styleProp={{
|
|
1868
|
+
"flex-grow": "1"
|
|
1869
|
+
}}
|
|
1869
1870
|
/></Dynamic_renderer_default>;
|
|
1870
1871
|
}}</For4>
|
|
1871
1872
|
</div>
|
|
1872
|
-
<style>{`.div-
|
|
1873
|
+
<style>{`.div-6331dfc5 {
|
|
1873
1874
|
display: flex;
|
|
1874
1875
|
line-height: normal;
|
|
1875
1876
|
}`}</style>
|
|
@@ -1884,7 +1885,7 @@ function FragmentComponent(props) {
|
|
|
1884
1885
|
var fragment_default = FragmentComponent;
|
|
1885
1886
|
|
|
1886
1887
|
// src/blocks/image/image.tsx
|
|
1887
|
-
import { Show as Show8,
|
|
1888
|
+
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
1888
1889
|
|
|
1889
1890
|
// src/blocks/image/image.helpers.ts
|
|
1890
1891
|
function removeProtocol(path) {
|
|
@@ -1973,14 +1974,12 @@ function Image(props) {
|
|
|
1973
1974
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1974
1975
|
return out;
|
|
1975
1976
|
});
|
|
1976
|
-
onMount4(() => {
|
|
1977
|
-
});
|
|
1978
1977
|
return <>
|
|
1979
1978
|
<>
|
|
1980
1979
|
<picture>
|
|
1981
1980
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
1982
1981
|
<img
|
|
1983
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
1982
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-dc6700b4"}
|
|
1984
1983
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
1985
1984
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1986
1985
|
alt={props.altText}
|
|
@@ -1998,22 +1997,22 @@ function Image(props) {
|
|
|
1998
1997
|
<Show8
|
|
1999
1998
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
2000
1999
|
><div
|
|
2001
|
-
class="builder-image-sizer div-
|
|
2000
|
+
class="builder-image-sizer div-dc6700b4"
|
|
2002
2001
|
style={{
|
|
2003
2002
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
2004
2003
|
}}
|
|
2005
2004
|
/></Show8>
|
|
2006
2005
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
2007
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
2006
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-dc6700b4-2">{props.children}</div></Show8>
|
|
2008
2007
|
</>
|
|
2009
|
-
<style>{`.img-
|
|
2008
|
+
<style>{`.img-dc6700b4 {
|
|
2010
2009
|
opacity: 1;
|
|
2011
2010
|
transition: opacity 0.2s ease-in-out;
|
|
2012
|
-
}.div-
|
|
2011
|
+
}.div-dc6700b4 {
|
|
2013
2012
|
width: 100%;
|
|
2014
2013
|
pointer-events: none;
|
|
2015
2014
|
font-size: 0;
|
|
2016
|
-
}.div-
|
|
2015
|
+
}.div-dc6700b4-2 {
|
|
2017
2016
|
display: flex;
|
|
2018
2017
|
flex-direction: column;
|
|
2019
2018
|
align-items: stretch;
|
|
@@ -2049,10 +2048,10 @@ function SectionComponent(props) {
|
|
|
2049
2048
|
var section_default = SectionComponent;
|
|
2050
2049
|
|
|
2051
2050
|
// src/blocks/symbol/symbol.tsx
|
|
2052
|
-
import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as
|
|
2051
|
+
import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
2053
2052
|
|
|
2054
2053
|
// src/components/content-variants/content-variants.tsx
|
|
2055
|
-
import { Show as
|
|
2054
|
+
import { Show as Show16, For as For9, onMount as onMount7, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
2056
2055
|
|
|
2057
2056
|
// src/helpers/url.ts
|
|
2058
2057
|
var getTopLevelDomain = (host) => {
|
|
@@ -2242,11 +2241,61 @@ var handleABTesting = async ({
|
|
|
2242
2241
|
};
|
|
2243
2242
|
};
|
|
2244
2243
|
|
|
2244
|
+
// src/helpers/user-attributes.ts
|
|
2245
|
+
var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
|
|
2246
|
+
function createUserAttributesService() {
|
|
2247
|
+
let canTrack = true;
|
|
2248
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
2249
|
+
return {
|
|
2250
|
+
setUserAttributes(newAttrs) {
|
|
2251
|
+
if (!isBrowser()) {
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
const userAttributes = {
|
|
2255
|
+
...this.getUserAttributes(),
|
|
2256
|
+
...newAttrs
|
|
2257
|
+
};
|
|
2258
|
+
setCookie({
|
|
2259
|
+
name: USER_ATTRIBUTES_COOKIE_NAME,
|
|
2260
|
+
value: JSON.stringify(userAttributes),
|
|
2261
|
+
canTrack
|
|
2262
|
+
});
|
|
2263
|
+
subscribers.forEach((callback) => callback(userAttributes));
|
|
2264
|
+
},
|
|
2265
|
+
getUserAttributes() {
|
|
2266
|
+
if (!isBrowser()) {
|
|
2267
|
+
return {};
|
|
2268
|
+
}
|
|
2269
|
+
return JSON.parse(getCookieSync({
|
|
2270
|
+
name: USER_ATTRIBUTES_COOKIE_NAME,
|
|
2271
|
+
canTrack
|
|
2272
|
+
}) || "{}");
|
|
2273
|
+
},
|
|
2274
|
+
subscribeOnUserAttributesChange(callback) {
|
|
2275
|
+
subscribers.add(callback);
|
|
2276
|
+
return () => {
|
|
2277
|
+
subscribers.delete(callback);
|
|
2278
|
+
};
|
|
2279
|
+
},
|
|
2280
|
+
setCanTrack(value) {
|
|
2281
|
+
canTrack = value;
|
|
2282
|
+
}
|
|
2283
|
+
};
|
|
2284
|
+
}
|
|
2285
|
+
var userAttributesService = createUserAttributesService();
|
|
2286
|
+
var setClientUserAttributes = (attributes) => {
|
|
2287
|
+
userAttributesService.setUserAttributes(attributes);
|
|
2288
|
+
};
|
|
2289
|
+
|
|
2245
2290
|
// src/helpers/canTrack.ts
|
|
2246
|
-
var getDefaultCanTrack = (canTrack) =>
|
|
2291
|
+
var getDefaultCanTrack = (canTrack) => {
|
|
2292
|
+
const result = checkIsDefined(canTrack) ? canTrack : true;
|
|
2293
|
+
userAttributesService.setCanTrack(result);
|
|
2294
|
+
return result;
|
|
2295
|
+
};
|
|
2247
2296
|
|
|
2248
2297
|
// src/components/content/content.tsx
|
|
2249
|
-
import { Show as
|
|
2298
|
+
import { Show as Show15, createSignal as createSignal18 } from "solid-js";
|
|
2250
2299
|
|
|
2251
2300
|
// src/blocks/accordion/component-info.ts
|
|
2252
2301
|
var defaultTitle = {
|
|
@@ -2940,8 +2989,388 @@ var componentInfo5 = {
|
|
|
2940
2989
|
}
|
|
2941
2990
|
};
|
|
2942
2991
|
|
|
2943
|
-
// src/blocks/
|
|
2992
|
+
// src/blocks/personalization-container/component-info.ts
|
|
2944
2993
|
var componentInfo6 = {
|
|
2994
|
+
name: "PersonalizationContainer",
|
|
2995
|
+
shouldReceiveBuilderProps: {
|
|
2996
|
+
builderBlock: true,
|
|
2997
|
+
builderContext: true
|
|
2998
|
+
},
|
|
2999
|
+
noWrap: true,
|
|
3000
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
|
|
3001
|
+
canHaveChildren: true,
|
|
3002
|
+
inputs: [{
|
|
3003
|
+
name: "variants",
|
|
3004
|
+
defaultValue: [],
|
|
3005
|
+
behavior: "personalizationVariantList",
|
|
3006
|
+
type: "list",
|
|
3007
|
+
subFields: [{
|
|
3008
|
+
name: "name",
|
|
3009
|
+
type: "text"
|
|
3010
|
+
}, {
|
|
3011
|
+
name: "query",
|
|
3012
|
+
friendlyName: "Targeting rules",
|
|
3013
|
+
type: "BuilderQuery",
|
|
3014
|
+
defaultValue: []
|
|
3015
|
+
}, {
|
|
3016
|
+
name: "startDate",
|
|
3017
|
+
type: "date"
|
|
3018
|
+
}, {
|
|
3019
|
+
name: "endDate",
|
|
3020
|
+
type: "date"
|
|
3021
|
+
}, {
|
|
3022
|
+
name: "blocks",
|
|
3023
|
+
type: "uiBlocks",
|
|
3024
|
+
hideFromUI: true,
|
|
3025
|
+
defaultValue: []
|
|
3026
|
+
}]
|
|
3027
|
+
}]
|
|
3028
|
+
};
|
|
3029
|
+
|
|
3030
|
+
// src/blocks/personalization-container/personalization-container.tsx
|
|
3031
|
+
import { Show as Show10, For as For6, onMount as onMount4, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
3032
|
+
|
|
3033
|
+
// src/components/inlined-script.tsx
|
|
3034
|
+
function InlinedScript(props) {
|
|
3035
|
+
return <><script
|
|
3036
|
+
innerHTML={props.scriptStr}
|
|
3037
|
+
data-id={props.id}
|
|
3038
|
+
nonce={props.nonce || ""}
|
|
3039
|
+
/></>;
|
|
3040
|
+
}
|
|
3041
|
+
var Inlined_script_default = InlinedScript;
|
|
3042
|
+
|
|
3043
|
+
// src/functions/is-previewing.ts
|
|
3044
|
+
function isPreviewing(_search) {
|
|
3045
|
+
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
3046
|
+
if (!search) {
|
|
3047
|
+
return false;
|
|
3048
|
+
}
|
|
3049
|
+
const normalizedSearch = getSearchString(search);
|
|
3050
|
+
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
// src/blocks/personalization-container/helpers/inlined-fns.ts
|
|
3054
|
+
function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
3055
|
+
function isString(val) {
|
|
3056
|
+
return typeof val === "string";
|
|
3057
|
+
}
|
|
3058
|
+
function isNumber(val) {
|
|
3059
|
+
return typeof val === "number";
|
|
3060
|
+
}
|
|
3061
|
+
function objectMatchesQuery(userattr, query2) {
|
|
3062
|
+
const result = (() => {
|
|
3063
|
+
const property = query2.property;
|
|
3064
|
+
const operator = query2.operator;
|
|
3065
|
+
let testValue = query2.value;
|
|
3066
|
+
if (query2 && query2.property === "urlPath" && query2.value && typeof query2.value === "string" && query2.value !== "/" && query2.value.endsWith("/")) {
|
|
3067
|
+
testValue = query2.value.slice(0, -1);
|
|
3068
|
+
}
|
|
3069
|
+
if (!(property && operator)) {
|
|
3070
|
+
return true;
|
|
3071
|
+
}
|
|
3072
|
+
if (Array.isArray(testValue)) {
|
|
3073
|
+
if (operator === "isNot") {
|
|
3074
|
+
return testValue.every((val) => objectMatchesQuery(userattr, {
|
|
3075
|
+
property,
|
|
3076
|
+
operator,
|
|
3077
|
+
value: val
|
|
3078
|
+
}));
|
|
3079
|
+
}
|
|
3080
|
+
return !!testValue.find((val) => objectMatchesQuery(userattr, {
|
|
3081
|
+
property,
|
|
3082
|
+
operator,
|
|
3083
|
+
value: val
|
|
3084
|
+
}));
|
|
3085
|
+
}
|
|
3086
|
+
const value = userattr[property];
|
|
3087
|
+
if (Array.isArray(value)) {
|
|
3088
|
+
return value.includes(testValue);
|
|
3089
|
+
}
|
|
3090
|
+
switch (operator) {
|
|
3091
|
+
case "is":
|
|
3092
|
+
return value === testValue;
|
|
3093
|
+
case "isNot":
|
|
3094
|
+
return value !== testValue;
|
|
3095
|
+
case "contains":
|
|
3096
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
3097
|
+
case "startsWith":
|
|
3098
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
3099
|
+
case "endsWith":
|
|
3100
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
3101
|
+
case "greaterThan":
|
|
3102
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
3103
|
+
case "lessThan":
|
|
3104
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
3105
|
+
case "greaterThanOrEqualTo":
|
|
3106
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
3107
|
+
case "lessThanOrEqualTo":
|
|
3108
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
3109
|
+
default:
|
|
3110
|
+
return false;
|
|
3111
|
+
}
|
|
3112
|
+
})();
|
|
3113
|
+
return result;
|
|
3114
|
+
}
|
|
3115
|
+
const item = {
|
|
3116
|
+
query,
|
|
3117
|
+
startDate,
|
|
3118
|
+
endDate
|
|
3119
|
+
};
|
|
3120
|
+
const now = userAttributes.date && new Date(userAttributes.date) || /* @__PURE__ */ new Date();
|
|
3121
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
3122
|
+
return false;
|
|
3123
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
3124
|
+
return false;
|
|
3125
|
+
}
|
|
3126
|
+
if (!item.query || !item.query.length) {
|
|
3127
|
+
return true;
|
|
3128
|
+
}
|
|
3129
|
+
return item.query.every((filter) => {
|
|
3130
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
3131
|
+
});
|
|
3132
|
+
}
|
|
3133
|
+
var PERSONALIZATION_SCRIPT = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
3134
|
+
if (!navigator.cookieEnabled) {
|
|
3135
|
+
return;
|
|
3136
|
+
}
|
|
3137
|
+
function getCookie(name) {
|
|
3138
|
+
const nameEQ = name + '=';
|
|
3139
|
+
const ca = document.cookie.split(';');
|
|
3140
|
+
for (let i = 0; i < ca.length; i++) {
|
|
3141
|
+
let c = ca[i];
|
|
3142
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
3143
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
3144
|
+
}
|
|
3145
|
+
return null;
|
|
3146
|
+
}
|
|
3147
|
+
function removeVariants() {
|
|
3148
|
+
variants?.forEach(function (_, index) {
|
|
3149
|
+
document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
|
|
3150
|
+
});
|
|
3151
|
+
document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
|
|
3152
|
+
document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
|
|
3153
|
+
}
|
|
3154
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
3155
|
+
if (locale) {
|
|
3156
|
+
attributes.locale = locale;
|
|
3157
|
+
}
|
|
3158
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
3159
|
+
return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
3160
|
+
});
|
|
3161
|
+
const isDebug = location.href.includes('builder.debug=true');
|
|
3162
|
+
if (isDebug) {
|
|
3163
|
+
console.debug('PersonalizationContainer', {
|
|
3164
|
+
attributes,
|
|
3165
|
+
variants,
|
|
3166
|
+
winningVariantIndex
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
if (winningVariantIndex !== -1) {
|
|
3170
|
+
const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
|
|
3171
|
+
if (winningVariant) {
|
|
3172
|
+
const parentNode = winningVariant.parentNode;
|
|
3173
|
+
if (parentNode) {
|
|
3174
|
+
const newParent = parentNode.cloneNode(false);
|
|
3175
|
+
newParent.appendChild(winningVariant.content.firstChild);
|
|
3176
|
+
newParent.appendChild(winningVariant.content.lastChild);
|
|
3177
|
+
parentNode.parentNode?.replaceChild(newParent, parentNode);
|
|
3178
|
+
}
|
|
3179
|
+
if (isDebug) {
|
|
3180
|
+
console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
} else if (variants && variants.length > 0) {
|
|
3184
|
+
removeVariants();
|
|
3185
|
+
}
|
|
3186
|
+
}`;
|
|
3187
|
+
var FILTER_WITH_CUSTOM_TARGETING_SCRIPT = "function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {\n function isString(val) {\n return typeof val === 'string';\n }\n function isNumber(val) {\n return typeof val === 'number';\n }\n function objectMatchesQuery(userattr, query) {\n const result = (() => {\n const property = query.property;\n const operator = query.operator;\n let testValue = query.value;\n if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {\n testValue = query.value.slice(0, -1);\n }\n if (!(property && operator)) {\n return true;\n }\n if (Array.isArray(testValue)) {\n if (operator === 'isNot') {\n return testValue.every(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n return !!testValue.find(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n const value = userattr[property];\n if (Array.isArray(value)) {\n return value.includes(testValue);\n }\n switch (operator) {\n case 'is':\n return value === testValue;\n case 'isNot':\n return value !== testValue;\n case 'contains':\n return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));\n case 'startsWith':\n return isString(value) && value.startsWith(String(testValue));\n case 'endsWith':\n return isString(value) && value.endsWith(String(testValue));\n case 'greaterThan':\n return isNumber(value) && isNumber(testValue) && value > testValue;\n case 'lessThan':\n return isNumber(value) && isNumber(testValue) && value < testValue;\n case 'greaterThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value >= testValue;\n case 'lessThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value <= testValue;\n default:\n return false;\n }\n })();\n return result;\n }\n const item = {\n query,\n startDate,\n endDate\n };\n const now = userAttributes.date && new Date(userAttributes.date) || new Date();\n if (item.startDate && new Date(item.startDate) > now) {\n return false;\n } else if (item.endDate && new Date(item.endDate) < now) {\n return false;\n }\n if (!item.query || !item.query.length) {\n return true;\n }\n return item.query.every(filter => {\n return objectMatchesQuery(userAttributes, filter);\n });\n}";
|
|
3188
|
+
|
|
3189
|
+
// src/blocks/personalization-container/helpers.ts
|
|
3190
|
+
function checkShouldRenderVariants(variants, canTrack) {
|
|
3191
|
+
const hasVariants = variants && variants.length > 0;
|
|
3192
|
+
if (TARGET === "reactNative")
|
|
3193
|
+
return false;
|
|
3194
|
+
if (!hasVariants)
|
|
3195
|
+
return false;
|
|
3196
|
+
if (!canTrack)
|
|
3197
|
+
return false;
|
|
3198
|
+
if (TARGET === "vue" || TARGET === "svelte")
|
|
3199
|
+
return true;
|
|
3200
|
+
if (isBrowser())
|
|
3201
|
+
return false;
|
|
3202
|
+
return true;
|
|
3203
|
+
}
|
|
3204
|
+
function getBlocksToRender({
|
|
3205
|
+
variants,
|
|
3206
|
+
previewingIndex,
|
|
3207
|
+
isHydrated,
|
|
3208
|
+
filteredVariants,
|
|
3209
|
+
fallbackBlocks
|
|
3210
|
+
}) {
|
|
3211
|
+
const fallback = {
|
|
3212
|
+
blocks: fallbackBlocks ?? [],
|
|
3213
|
+
path: "this.children"
|
|
3214
|
+
};
|
|
3215
|
+
if (isHydrated && isEditing()) {
|
|
3216
|
+
if (typeof previewingIndex === "number" && previewingIndex < (variants?.length ?? 0)) {
|
|
3217
|
+
const variant = variants[previewingIndex];
|
|
3218
|
+
return {
|
|
3219
|
+
blocks: variant.blocks,
|
|
3220
|
+
path: `component.options.variants.${previewingIndex}.blocks`
|
|
3221
|
+
};
|
|
3222
|
+
}
|
|
3223
|
+
return fallback;
|
|
3224
|
+
}
|
|
3225
|
+
if (isBrowser()) {
|
|
3226
|
+
const winningVariant = filteredVariants?.[0];
|
|
3227
|
+
if (winningVariant) {
|
|
3228
|
+
return {
|
|
3229
|
+
blocks: winningVariant.blocks,
|
|
3230
|
+
path: `component.options.variants.${variants?.indexOf(winningVariant)}.blocks`
|
|
3231
|
+
};
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
return fallback;
|
|
3235
|
+
}
|
|
3236
|
+
var getPersonalizationScript = (variants, blockId, locale) => {
|
|
3237
|
+
return `
|
|
3238
|
+
(function() {
|
|
3239
|
+
${FILTER_WITH_CUSTOM_TARGETING_SCRIPT}
|
|
3240
|
+
${PERSONALIZATION_SCRIPT}
|
|
3241
|
+
getPersonalizedVariant(${JSON.stringify(variants)}, "${blockId}"${locale ? `, "${locale}"` : ""})
|
|
3242
|
+
})();
|
|
3243
|
+
`;
|
|
3244
|
+
};
|
|
3245
|
+
|
|
3246
|
+
// src/blocks/personalization-container/personalization-container.tsx
|
|
3247
|
+
function PersonalizationContainer(props) {
|
|
3248
|
+
const [userAttributes, setUserAttributes] = createSignal10(
|
|
3249
|
+
userAttributesService.getUserAttributes()
|
|
3250
|
+
);
|
|
3251
|
+
const [scriptStr, setScriptStr] = createSignal10(
|
|
3252
|
+
getPersonalizationScript(
|
|
3253
|
+
props.variants,
|
|
3254
|
+
props.builderBlock?.id || "none",
|
|
3255
|
+
props.builderContext?.rootState?.locale
|
|
3256
|
+
)
|
|
3257
|
+
);
|
|
3258
|
+
const [unsubscribers, setUnsubscribers] = createSignal10([]);
|
|
3259
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal10(
|
|
3260
|
+
checkShouldRenderVariants(
|
|
3261
|
+
props.variants,
|
|
3262
|
+
getDefaultCanTrack(props.builderContext?.canTrack)
|
|
3263
|
+
)
|
|
3264
|
+
);
|
|
3265
|
+
const [isHydrated, setIsHydrated] = createSignal10(false);
|
|
3266
|
+
const filteredVariants = createMemo10(() => {
|
|
3267
|
+
return (props.variants || []).filter((variant) => {
|
|
3268
|
+
return filterWithCustomTargeting(
|
|
3269
|
+
{
|
|
3270
|
+
...props.builderContext?.rootState?.locale ? {
|
|
3271
|
+
locale: props.builderContext?.rootState?.locale
|
|
3272
|
+
} : {},
|
|
3273
|
+
...userAttributes()
|
|
3274
|
+
},
|
|
3275
|
+
variant.query,
|
|
3276
|
+
variant.startDate,
|
|
3277
|
+
variant.endDate
|
|
3278
|
+
);
|
|
3279
|
+
});
|
|
3280
|
+
});
|
|
3281
|
+
const blocksToRender = createMemo10(() => {
|
|
3282
|
+
return getBlocksToRender({
|
|
3283
|
+
variants: props.variants,
|
|
3284
|
+
fallbackBlocks: props.builderBlock?.children,
|
|
3285
|
+
isHydrated: isHydrated(),
|
|
3286
|
+
filteredVariants: filteredVariants(),
|
|
3287
|
+
previewingIndex: props.previewingIndex
|
|
3288
|
+
});
|
|
3289
|
+
});
|
|
3290
|
+
const hideVariantsStyleString = createMemo10(() => {
|
|
3291
|
+
return (props.variants || []).map(
|
|
3292
|
+
(_, index) => `[data-variant-id="${props.builderBlock?.id}-${index}"] { display: none; } `
|
|
3293
|
+
).join("");
|
|
3294
|
+
});
|
|
3295
|
+
let rootRef;
|
|
3296
|
+
onMount4(() => {
|
|
3297
|
+
setIsHydrated(true);
|
|
3298
|
+
const unsub = userAttributesService.subscribeOnUserAttributesChange(
|
|
3299
|
+
(attrs) => {
|
|
3300
|
+
setUserAttributes(attrs);
|
|
3301
|
+
}
|
|
3302
|
+
);
|
|
3303
|
+
if (!(isEditing() || isPreviewing())) {
|
|
3304
|
+
const variant = filteredVariants()[0];
|
|
3305
|
+
if (rootRef) {
|
|
3306
|
+
rootRef.dispatchEvent(
|
|
3307
|
+
new CustomEvent("builder.variantLoaded", {
|
|
3308
|
+
detail: {
|
|
3309
|
+
variant: variant || "default",
|
|
3310
|
+
content: props.builderContext?.content
|
|
3311
|
+
},
|
|
3312
|
+
bubbles: true
|
|
3313
|
+
})
|
|
3314
|
+
);
|
|
3315
|
+
const observer = new IntersectionObserver((entries) => {
|
|
3316
|
+
entries.forEach((entry) => {
|
|
3317
|
+
if (entry.isIntersecting && rootRef) {
|
|
3318
|
+
rootRef.dispatchEvent(
|
|
3319
|
+
new CustomEvent("builder.variantDisplayed", {
|
|
3320
|
+
detail: {
|
|
3321
|
+
variant: variant || "default",
|
|
3322
|
+
content: props.builderContext?.content
|
|
3323
|
+
},
|
|
3324
|
+
bubbles: true
|
|
3325
|
+
})
|
|
3326
|
+
);
|
|
3327
|
+
}
|
|
3328
|
+
});
|
|
3329
|
+
});
|
|
3330
|
+
observer.observe(rootRef);
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
unsubscribers().push(unsub);
|
|
3334
|
+
});
|
|
3335
|
+
return <><div
|
|
3336
|
+
class={`builder-personalization-container ${props.attributes?.className || ""}`}
|
|
3337
|
+
ref={rootRef}
|
|
3338
|
+
{...props.attributes}
|
|
3339
|
+
>
|
|
3340
|
+
<Show10 when={shouldRenderVariants()}>
|
|
3341
|
+
<For6 each={props.variants}>{(variant, _index) => {
|
|
3342
|
+
const index = _index();
|
|
3343
|
+
return <template
|
|
3344
|
+
key={index}
|
|
3345
|
+
data-variant-id={`${props.builderBlock?.id}-${index}`}
|
|
3346
|
+
><Blocks_default
|
|
3347
|
+
blocks={variant.blocks}
|
|
3348
|
+
parent={props.builderBlock?.id}
|
|
3349
|
+
path={`component.options.variants.${index}.blocks`}
|
|
3350
|
+
/></template>;
|
|
3351
|
+
}}</For6>
|
|
3352
|
+
<Inlined_styles_default
|
|
3353
|
+
nonce={props.builderContext?.nonce || ""}
|
|
3354
|
+
styles={hideVariantsStyleString()}
|
|
3355
|
+
id={`variants-styles-${props.builderBlock?.id}`}
|
|
3356
|
+
/>
|
|
3357
|
+
<Inlined_script_default
|
|
3358
|
+
nonce={props.builderContext?.nonce || ""}
|
|
3359
|
+
scriptStr={scriptStr()}
|
|
3360
|
+
id={`variants-script-${props.builderBlock?.id}`}
|
|
3361
|
+
/>
|
|
3362
|
+
</Show10>
|
|
3363
|
+
<Blocks_default
|
|
3364
|
+
blocks={blocksToRender().blocks}
|
|
3365
|
+
parent={props.builderBlock?.id}
|
|
3366
|
+
path={blocksToRender().path}
|
|
3367
|
+
/>
|
|
3368
|
+
</div></>;
|
|
3369
|
+
}
|
|
3370
|
+
var personalization_container_default = PersonalizationContainer;
|
|
3371
|
+
|
|
3372
|
+
// src/blocks/section/component-info.ts
|
|
3373
|
+
var componentInfo7 = {
|
|
2945
3374
|
name: "Core:Section",
|
|
2946
3375
|
static: true,
|
|
2947
3376
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2983,7 +3412,7 @@ var componentInfo6 = {
|
|
|
2983
3412
|
};
|
|
2984
3413
|
|
|
2985
3414
|
// src/blocks/slot/component-info.ts
|
|
2986
|
-
var
|
|
3415
|
+
var componentInfo8 = {
|
|
2987
3416
|
name: "Slot",
|
|
2988
3417
|
isRSC: true,
|
|
2989
3418
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -3022,7 +3451,7 @@ function Slot(props) {
|
|
|
3022
3451
|
var slot_default = Slot;
|
|
3023
3452
|
|
|
3024
3453
|
// src/blocks/symbol/component-info.ts
|
|
3025
|
-
var
|
|
3454
|
+
var componentInfo9 = {
|
|
3026
3455
|
name: "Symbol",
|
|
3027
3456
|
noWrap: true,
|
|
3028
3457
|
static: true,
|
|
@@ -3104,7 +3533,7 @@ var defaultElement = {
|
|
|
3104
3533
|
}
|
|
3105
3534
|
}
|
|
3106
3535
|
};
|
|
3107
|
-
var
|
|
3536
|
+
var componentInfo10 = {
|
|
3108
3537
|
name: "Builder: Tabs",
|
|
3109
3538
|
inputs: [{
|
|
3110
3539
|
name: "tabs",
|
|
@@ -3210,9 +3639,9 @@ var componentInfo9 = {
|
|
|
3210
3639
|
};
|
|
3211
3640
|
|
|
3212
3641
|
// src/blocks/tabs/tabs.tsx
|
|
3213
|
-
import { Show as
|
|
3642
|
+
import { Show as Show11, For as For7, createSignal as createSignal11 } from "solid-js";
|
|
3214
3643
|
function Tabs(props) {
|
|
3215
|
-
const [activeTab, setActiveTab] =
|
|
3644
|
+
const [activeTab, setActiveTab] = createSignal11(
|
|
3216
3645
|
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
3217
3646
|
);
|
|
3218
3647
|
function activeTabContent(active) {
|
|
@@ -3234,7 +3663,7 @@ function Tabs(props) {
|
|
|
3234
3663
|
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
3235
3664
|
overflow: "auto"
|
|
3236
3665
|
}}
|
|
3237
|
-
><
|
|
3666
|
+
><For7 each={props.tabs}>{(tab, _index) => {
|
|
3238
3667
|
const index = _index();
|
|
3239
3668
|
return <span
|
|
3240
3669
|
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
@@ -3251,21 +3680,21 @@ function Tabs(props) {
|
|
|
3251
3680
|
registeredComponents={props.builderComponents}
|
|
3252
3681
|
linkComponent={props.builderLinkComponent}
|
|
3253
3682
|
/></span>;
|
|
3254
|
-
}}</
|
|
3255
|
-
<
|
|
3683
|
+
}}</For7></div>
|
|
3684
|
+
<Show11 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
3256
3685
|
parent={props.builderBlock.id}
|
|
3257
3686
|
path={`tabs.${activeTab()}.content`}
|
|
3258
3687
|
blocks={activeTabContent(activeTab())}
|
|
3259
3688
|
context={props.builderContext}
|
|
3260
3689
|
registeredComponents={props.builderComponents}
|
|
3261
3690
|
linkComponent={props.builderLinkComponent}
|
|
3262
|
-
/></div></
|
|
3691
|
+
/></div></Show11>
|
|
3263
3692
|
</div></>;
|
|
3264
3693
|
}
|
|
3265
3694
|
var tabs_default = Tabs;
|
|
3266
3695
|
|
|
3267
3696
|
// src/blocks/text/component-info.ts
|
|
3268
|
-
var
|
|
3697
|
+
var componentInfo11 = {
|
|
3269
3698
|
shouldReceiveBuilderProps: {
|
|
3270
3699
|
builderBlock: TARGET === "reactNative" ? true : false,
|
|
3271
3700
|
builderContext: true
|
|
@@ -3302,7 +3731,7 @@ function Text(props) {
|
|
|
3302
3731
|
var text_default = Text;
|
|
3303
3732
|
|
|
3304
3733
|
// src/blocks/custom-code/component-info.ts
|
|
3305
|
-
var
|
|
3734
|
+
var componentInfo12 = {
|
|
3306
3735
|
name: "Custom Code",
|
|
3307
3736
|
static: true,
|
|
3308
3737
|
requiredPermissions: ["editCode"],
|
|
@@ -3327,10 +3756,10 @@ var componentInfo11 = {
|
|
|
3327
3756
|
};
|
|
3328
3757
|
|
|
3329
3758
|
// src/blocks/custom-code/custom-code.tsx
|
|
3330
|
-
import { onMount as onMount5, createSignal as
|
|
3759
|
+
import { onMount as onMount5, createSignal as createSignal12 } from "solid-js";
|
|
3331
3760
|
function CustomCode(props) {
|
|
3332
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
3333
|
-
const [scriptsRun, setScriptsRun] =
|
|
3761
|
+
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3762
|
+
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
3334
3763
|
let elementRef;
|
|
3335
3764
|
onMount5(() => {
|
|
3336
3765
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -3373,7 +3802,7 @@ function CustomCode(props) {
|
|
|
3373
3802
|
var custom_code_default = CustomCode;
|
|
3374
3803
|
|
|
3375
3804
|
// src/blocks/embed/component-info.ts
|
|
3376
|
-
var
|
|
3805
|
+
var componentInfo13 = {
|
|
3377
3806
|
name: "Embed",
|
|
3378
3807
|
static: true,
|
|
3379
3808
|
inputs: [{
|
|
@@ -3391,7 +3820,7 @@ var componentInfo12 = {
|
|
|
3391
3820
|
};
|
|
3392
3821
|
|
|
3393
3822
|
// src/blocks/embed/embed.tsx
|
|
3394
|
-
import { on as on2, createEffect as createEffect2, createMemo as
|
|
3823
|
+
import { on as on2, createEffect as createEffect2, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3395
3824
|
|
|
3396
3825
|
// src/blocks/embed/helpers.ts
|
|
3397
3826
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3399,9 +3828,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
3399
3828
|
|
|
3400
3829
|
// src/blocks/embed/embed.tsx
|
|
3401
3830
|
function Embed(props) {
|
|
3402
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
3403
|
-
const [scriptsRun, setScriptsRun] =
|
|
3404
|
-
const [ranInitFn, setRanInitFn] =
|
|
3831
|
+
const [scriptsInserted, setScriptsInserted] = createSignal13([]);
|
|
3832
|
+
const [scriptsRun, setScriptsRun] = createSignal13([]);
|
|
3833
|
+
const [ranInitFn, setRanInitFn] = createSignal13(false);
|
|
3405
3834
|
function findAndRunScripts() {
|
|
3406
3835
|
if (!elem || !elem.getElementsByTagName)
|
|
3407
3836
|
return;
|
|
@@ -3424,8 +3853,8 @@ function Embed(props) {
|
|
|
3424
3853
|
}
|
|
3425
3854
|
}
|
|
3426
3855
|
let elem;
|
|
3427
|
-
const onUpdateFn_0_elem =
|
|
3428
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
3856
|
+
const onUpdateFn_0_elem = createMemo13(() => elem);
|
|
3857
|
+
const onUpdateFn_0_ranInitFn__ = createMemo13(() => ranInitFn());
|
|
3429
3858
|
function onUpdateFn_0() {
|
|
3430
3859
|
if (elem && !ranInitFn()) {
|
|
3431
3860
|
setRanInitFn(true);
|
|
@@ -3440,7 +3869,7 @@ function Embed(props) {
|
|
|
3440
3869
|
var embed_default = Embed;
|
|
3441
3870
|
|
|
3442
3871
|
// src/blocks/form/form/component-info.ts
|
|
3443
|
-
var
|
|
3872
|
+
var componentInfo14 = {
|
|
3444
3873
|
name: "Form:Form",
|
|
3445
3874
|
// editableTags: ['builder-form-error']
|
|
3446
3875
|
defaults: {
|
|
@@ -3680,7 +4109,7 @@ var componentInfo13 = {
|
|
|
3680
4109
|
};
|
|
3681
4110
|
|
|
3682
4111
|
// src/blocks/form/form/form.tsx
|
|
3683
|
-
import { Show as
|
|
4112
|
+
import { Show as Show12, createSignal as createSignal14 } from "solid-js";
|
|
3684
4113
|
|
|
3685
4114
|
// src/functions/get-env.ts
|
|
3686
4115
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -3700,9 +4129,9 @@ function logFetch(url) {
|
|
|
3700
4129
|
|
|
3701
4130
|
// src/blocks/form/form/form.tsx
|
|
3702
4131
|
function FormComponent(props) {
|
|
3703
|
-
const [formState, setFormState] =
|
|
3704
|
-
const [responseData, setResponseData] =
|
|
3705
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
4132
|
+
const [formState, setFormState] = createSignal14("unsubmitted");
|
|
4133
|
+
const [responseData, setResponseData] = createSignal14(null);
|
|
4134
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal14("");
|
|
3706
4135
|
function mergeNewRootState(newData) {
|
|
3707
4136
|
const combinedState = {
|
|
3708
4137
|
...props.builderContext.rootState,
|
|
@@ -3897,34 +4326,25 @@ function FormComponent(props) {
|
|
|
3897
4326
|
{...{}}
|
|
3898
4327
|
{...props.attributes}
|
|
3899
4328
|
>
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
return <Block_default
|
|
3903
|
-
key={`form-block-${idx}`}
|
|
3904
|
-
block={block}
|
|
3905
|
-
context={props.builderContext}
|
|
3906
|
-
registeredComponents={props.builderComponents}
|
|
3907
|
-
linkComponent={props.builderLinkComponent}
|
|
3908
|
-
/>;
|
|
3909
|
-
}}</For7></Show11>
|
|
3910
|
-
<Show11 when={submissionState() === "error"}><Blocks_default
|
|
4329
|
+
{props.children}
|
|
4330
|
+
<Show12 when={submissionState() === "error"}><Blocks_default
|
|
3911
4331
|
path="errorMessage"
|
|
3912
4332
|
blocks={props.errorMessage}
|
|
3913
4333
|
context={props.builderContext}
|
|
3914
|
-
/></
|
|
3915
|
-
<
|
|
4334
|
+
/></Show12>
|
|
4335
|
+
<Show12 when={submissionState() === "sending"}><Blocks_default
|
|
3916
4336
|
path="sendingMessage"
|
|
3917
4337
|
blocks={props.sendingMessage}
|
|
3918
4338
|
context={props.builderContext}
|
|
3919
|
-
/></
|
|
3920
|
-
<
|
|
3921
|
-
<
|
|
4339
|
+
/></Show12>
|
|
4340
|
+
<Show12 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-04a43b72">{JSON.stringify(responseData(), null, 2)}</pre></Show12>
|
|
4341
|
+
<Show12 when={submissionState() === "success"}><Blocks_default
|
|
3922
4342
|
path="successMessage"
|
|
3923
4343
|
blocks={props.successMessage}
|
|
3924
4344
|
context={props.builderContext}
|
|
3925
|
-
/></
|
|
4345
|
+
/></Show12>
|
|
3926
4346
|
</form>
|
|
3927
|
-
<style>{`.pre-
|
|
4347
|
+
<style>{`.pre-04a43b72 {
|
|
3928
4348
|
padding: 10px;
|
|
3929
4349
|
color: red;
|
|
3930
4350
|
text-align: center;
|
|
@@ -3934,7 +4354,7 @@ function FormComponent(props) {
|
|
|
3934
4354
|
var form_default = FormComponent;
|
|
3935
4355
|
|
|
3936
4356
|
// src/blocks/form/input/component-info.ts
|
|
3937
|
-
var
|
|
4357
|
+
var componentInfo15 = {
|
|
3938
4358
|
name: "Form:Input",
|
|
3939
4359
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3940
4360
|
inputs: [
|
|
@@ -4004,7 +4424,7 @@ function FormInputComponent(props) {
|
|
|
4004
4424
|
var input_default = FormInputComponent;
|
|
4005
4425
|
|
|
4006
4426
|
// src/blocks/form/select/component-info.ts
|
|
4007
|
-
var
|
|
4427
|
+
var componentInfo16 = {
|
|
4008
4428
|
name: "Form:Select",
|
|
4009
4429
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
4010
4430
|
defaultStyles: {
|
|
@@ -4067,7 +4487,7 @@ function SelectComponent(props) {
|
|
|
4067
4487
|
var select_default = SelectComponent;
|
|
4068
4488
|
|
|
4069
4489
|
// src/blocks/form/submit-button/component-info.ts
|
|
4070
|
-
var
|
|
4490
|
+
var componentInfo17 = {
|
|
4071
4491
|
name: "Form:SubmitButton",
|
|
4072
4492
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
4073
4493
|
defaultStyles: {
|
|
@@ -4101,7 +4521,7 @@ function SubmitButton(props) {
|
|
|
4101
4521
|
var submit_button_default = SubmitButton;
|
|
4102
4522
|
|
|
4103
4523
|
// src/blocks/form/textarea/component-info.ts
|
|
4104
|
-
var
|
|
4524
|
+
var componentInfo18 = {
|
|
4105
4525
|
name: "Form:TextArea",
|
|
4106
4526
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
4107
4527
|
inputs: [{
|
|
@@ -4154,7 +4574,7 @@ function Textarea(props) {
|
|
|
4154
4574
|
var textarea_default = Textarea;
|
|
4155
4575
|
|
|
4156
4576
|
// src/blocks/img/component-info.ts
|
|
4157
|
-
var
|
|
4577
|
+
var componentInfo19 = {
|
|
4158
4578
|
// friendlyName?
|
|
4159
4579
|
name: "Raw:Img",
|
|
4160
4580
|
hideFromInsertMenu: true,
|
|
@@ -4187,7 +4607,7 @@ function ImgComponent(props) {
|
|
|
4187
4607
|
var img_default = ImgComponent;
|
|
4188
4608
|
|
|
4189
4609
|
// src/blocks/video/component-info.ts
|
|
4190
|
-
var
|
|
4610
|
+
var componentInfo20 = {
|
|
4191
4611
|
name: "Video",
|
|
4192
4612
|
canHaveChildren: true,
|
|
4193
4613
|
defaultStyles: {
|
|
@@ -4274,9 +4694,9 @@ var componentInfo19 = {
|
|
|
4274
4694
|
};
|
|
4275
4695
|
|
|
4276
4696
|
// src/blocks/video/video.tsx
|
|
4277
|
-
import { Show as
|
|
4697
|
+
import { Show as Show13, createMemo as createMemo15 } from "solid-js";
|
|
4278
4698
|
function Video(props) {
|
|
4279
|
-
const videoProps =
|
|
4699
|
+
const videoProps = createMemo15(() => {
|
|
4280
4700
|
return {
|
|
4281
4701
|
...props.autoPlay === true ? {
|
|
4282
4702
|
autoPlay: true
|
|
@@ -4295,7 +4715,7 @@ function Video(props) {
|
|
|
4295
4715
|
} : {}
|
|
4296
4716
|
};
|
|
4297
4717
|
});
|
|
4298
|
-
const spreadProps =
|
|
4718
|
+
const spreadProps = createMemo15(() => {
|
|
4299
4719
|
return {
|
|
4300
4720
|
...videoProps()
|
|
4301
4721
|
};
|
|
@@ -4317,7 +4737,6 @@ function Video(props) {
|
|
|
4317
4737
|
"object-position": props.position,
|
|
4318
4738
|
// Hack to get object fit to work as expected and
|
|
4319
4739
|
// not have the video overflow
|
|
4320
|
-
"z-index": 2,
|
|
4321
4740
|
"border-radius": "1px",
|
|
4322
4741
|
...props.aspectRatio ? {
|
|
4323
4742
|
position: "absolute"
|
|
@@ -4325,8 +4744,8 @@ function Video(props) {
|
|
|
4325
4744
|
}}
|
|
4326
4745
|
src={props.video || "no-src"}
|
|
4327
4746
|
poster={props.posterImage}
|
|
4328
|
-
><
|
|
4329
|
-
<
|
|
4747
|
+
><Show13 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show13></video>
|
|
4748
|
+
<Show13
|
|
4330
4749
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
4331
4750
|
><div
|
|
4332
4751
|
style={{
|
|
@@ -4335,15 +4754,15 @@ function Video(props) {
|
|
|
4335
4754
|
"pointer-events": "none",
|
|
4336
4755
|
"font-size": "0px"
|
|
4337
4756
|
}}
|
|
4338
|
-
/></
|
|
4339
|
-
<
|
|
4757
|
+
/></Show13>
|
|
4758
|
+
<Show13 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
4340
4759
|
style={{
|
|
4341
4760
|
display: "flex",
|
|
4342
4761
|
"flex-direction": "column",
|
|
4343
4762
|
"align-items": "stretch"
|
|
4344
4763
|
}}
|
|
4345
|
-
>{props.children}</div></
|
|
4346
|
-
<
|
|
4764
|
+
>{props.children}</div></Show13>
|
|
4765
|
+
<Show13 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
4347
4766
|
style={{
|
|
4348
4767
|
"pointer-events": "none",
|
|
4349
4768
|
display: "flex",
|
|
@@ -4355,7 +4774,7 @@ function Video(props) {
|
|
|
4355
4774
|
width: "100%",
|
|
4356
4775
|
height: "100%"
|
|
4357
4776
|
}}
|
|
4358
|
-
>{props.children}</div></
|
|
4777
|
+
>{props.children}</div></Show13>
|
|
4359
4778
|
</div></>;
|
|
4360
4779
|
}
|
|
4361
4780
|
var video_default = Video;
|
|
@@ -4363,31 +4782,31 @@ var video_default = Video;
|
|
|
4363
4782
|
// src/constants/extra-components.ts
|
|
4364
4783
|
var getExtraComponents = () => [{
|
|
4365
4784
|
component: custom_code_default,
|
|
4366
|
-
...
|
|
4785
|
+
...componentInfo12
|
|
4367
4786
|
}, {
|
|
4368
4787
|
component: embed_default,
|
|
4369
|
-
...
|
|
4788
|
+
...componentInfo13
|
|
4370
4789
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4371
4790
|
component: form_default,
|
|
4372
|
-
...
|
|
4791
|
+
...componentInfo14
|
|
4373
4792
|
}, {
|
|
4374
4793
|
component: input_default,
|
|
4375
|
-
...
|
|
4794
|
+
...componentInfo15
|
|
4376
4795
|
}, {
|
|
4377
4796
|
component: submit_button_default,
|
|
4378
|
-
...
|
|
4797
|
+
...componentInfo17
|
|
4379
4798
|
}, {
|
|
4380
4799
|
component: select_default,
|
|
4381
|
-
...
|
|
4800
|
+
...componentInfo16
|
|
4382
4801
|
}, {
|
|
4383
4802
|
component: textarea_default,
|
|
4384
|
-
...
|
|
4803
|
+
...componentInfo18
|
|
4385
4804
|
}], {
|
|
4386
4805
|
component: img_default,
|
|
4387
|
-
...
|
|
4806
|
+
...componentInfo19
|
|
4388
4807
|
}, {
|
|
4389
4808
|
component: video_default,
|
|
4390
|
-
...
|
|
4809
|
+
...componentInfo20
|
|
4391
4810
|
}];
|
|
4392
4811
|
|
|
4393
4812
|
// src/constants/builder-registered-components.ts
|
|
@@ -4405,19 +4824,22 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
4405
4824
|
...componentInfo5
|
|
4406
4825
|
}, {
|
|
4407
4826
|
component: section_default,
|
|
4408
|
-
...
|
|
4827
|
+
...componentInfo7
|
|
4409
4828
|
}, {
|
|
4410
4829
|
component: slot_default,
|
|
4411
|
-
...
|
|
4830
|
+
...componentInfo8
|
|
4412
4831
|
}, {
|
|
4413
4832
|
component: symbol_default,
|
|
4414
|
-
...
|
|
4833
|
+
...componentInfo9
|
|
4415
4834
|
}, {
|
|
4416
4835
|
component: text_default,
|
|
4417
|
-
...
|
|
4418
|
-
}, ...TARGET === "
|
|
4836
|
+
...componentInfo11
|
|
4837
|
+
}, ...TARGET === "react" ? [{
|
|
4838
|
+
component: personalization_container_default,
|
|
4839
|
+
...componentInfo6
|
|
4840
|
+
}] : [], ...TARGET === "rsc" ? [] : [{
|
|
4419
4841
|
component: tabs_default,
|
|
4420
|
-
...
|
|
4842
|
+
...componentInfo10
|
|
4421
4843
|
}, {
|
|
4422
4844
|
component: accordion_default,
|
|
4423
4845
|
...componentInfo
|
|
@@ -4455,7 +4877,7 @@ var getVariants = (content) => Object.values(content?.variations || {}).map((var
|
|
|
4455
4877
|
testVariationId: variant.id,
|
|
4456
4878
|
id: content?.id
|
|
4457
4879
|
}));
|
|
4458
|
-
var
|
|
4880
|
+
var checkShouldRenderVariants2 = ({
|
|
4459
4881
|
canTrack,
|
|
4460
4882
|
content
|
|
4461
4883
|
}) => {
|
|
@@ -4489,24 +4911,14 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4489
4911
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4490
4912
|
)`;
|
|
4491
4913
|
|
|
4492
|
-
// src/components/inlined-script.tsx
|
|
4493
|
-
function InlinedScript(props) {
|
|
4494
|
-
return <><script
|
|
4495
|
-
innerHTML={props.scriptStr}
|
|
4496
|
-
data-id={props.id}
|
|
4497
|
-
nonce={props.nonce || ""}
|
|
4498
|
-
/></>;
|
|
4499
|
-
}
|
|
4500
|
-
var Inlined_script_default = InlinedScript;
|
|
4501
|
-
|
|
4502
4914
|
// src/components/content/components/enable-editor.tsx
|
|
4503
4915
|
import {
|
|
4504
|
-
Show as
|
|
4916
|
+
Show as Show14,
|
|
4505
4917
|
onMount as onMount6,
|
|
4506
4918
|
on as on3,
|
|
4507
4919
|
createEffect as createEffect3,
|
|
4508
|
-
createMemo as
|
|
4509
|
-
createSignal as
|
|
4920
|
+
createMemo as createMemo16,
|
|
4921
|
+
createSignal as createSignal16
|
|
4510
4922
|
} from "solid-js";
|
|
4511
4923
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
4512
4924
|
|
|
@@ -4516,7 +4928,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4516
4928
|
}
|
|
4517
4929
|
|
|
4518
4930
|
// src/constants/sdk-version.ts
|
|
4519
|
-
var SDK_VERSION = "3.0.
|
|
4931
|
+
var SDK_VERSION = "3.0.6";
|
|
4520
4932
|
|
|
4521
4933
|
// src/helpers/sdk-headers.ts
|
|
4522
4934
|
var getSdkHeaders = () => ({
|
|
@@ -4811,16 +5223,6 @@ async function fetchEntries(options) {
|
|
|
4811
5223
|
return _processContentResult(options, content);
|
|
4812
5224
|
}
|
|
4813
5225
|
|
|
4814
|
-
// src/functions/is-previewing.ts
|
|
4815
|
-
function isPreviewing(_search) {
|
|
4816
|
-
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
4817
|
-
if (!search) {
|
|
4818
|
-
return false;
|
|
4819
|
-
}
|
|
4820
|
-
const normalizedSearch = getSearchString(search);
|
|
4821
|
-
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4822
|
-
}
|
|
4823
|
-
|
|
4824
5226
|
// src/helpers/uuid.ts
|
|
4825
5227
|
function uuidv4() {
|
|
4826
5228
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
@@ -5143,7 +5545,8 @@ var setupBrowserForEditing = (options = {}) => {
|
|
|
5143
5545
|
// Supports builder-model="..." attribute which is needed to
|
|
5144
5546
|
// scope our '+ add block' button styling
|
|
5145
5547
|
supportsAddBlockScoping: true,
|
|
5146
|
-
supportsCustomBreakpoints: true
|
|
5548
|
+
supportsCustomBreakpoints: true,
|
|
5549
|
+
blockLevelPersonalization: true
|
|
5147
5550
|
}
|
|
5148
5551
|
}, "*");
|
|
5149
5552
|
window.parent?.postMessage({
|
|
@@ -5358,12 +5761,12 @@ var getWrapperClassName = (variationId) => {
|
|
|
5358
5761
|
|
|
5359
5762
|
// src/components/content/components/enable-editor.tsx
|
|
5360
5763
|
function EnableEditor(props) {
|
|
5361
|
-
const [ContentWrapper, setContentWrapper] =
|
|
5764
|
+
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5362
5765
|
props.contentWrapper || "div"
|
|
5363
5766
|
);
|
|
5364
|
-
const [httpReqsData, setHttpReqsData] =
|
|
5365
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
5366
|
-
const [clicked, setClicked] =
|
|
5767
|
+
const [httpReqsData, setHttpReqsData] = createSignal16({});
|
|
5768
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal16({});
|
|
5769
|
+
const [clicked, setClicked] = createSignal16(false);
|
|
5367
5770
|
function mergeNewRootState(newData) {
|
|
5368
5771
|
const combinedState = {
|
|
5369
5772
|
...props.builderContextSignal.rootState,
|
|
@@ -5397,7 +5800,7 @@ function EnableEditor(props) {
|
|
|
5397
5800
|
content: newContentValue
|
|
5398
5801
|
}));
|
|
5399
5802
|
}
|
|
5400
|
-
const showContentProps =
|
|
5803
|
+
const showContentProps = createMemo16(() => {
|
|
5401
5804
|
return props.showContent ? {} : {
|
|
5402
5805
|
hidden: true,
|
|
5403
5806
|
"aria-hidden": true
|
|
@@ -5572,14 +5975,14 @@ function EnableEditor(props) {
|
|
|
5572
5975
|
}
|
|
5573
5976
|
}
|
|
5574
5977
|
});
|
|
5575
|
-
const onUpdateFn_0_props_content =
|
|
5978
|
+
const onUpdateFn_0_props_content = createMemo16(() => props.content);
|
|
5576
5979
|
function onUpdateFn_0() {
|
|
5577
5980
|
if (props.content) {
|
|
5578
5981
|
mergeNewContent(props.content);
|
|
5579
5982
|
}
|
|
5580
5983
|
}
|
|
5581
5984
|
createEffect3(on3(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5582
|
-
const onUpdateFn_1_props_builderContextSignal_rootState =
|
|
5985
|
+
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
5583
5986
|
() => props.builderContextSignal.rootState
|
|
5584
5987
|
);
|
|
5585
5988
|
function onUpdateFn_1() {
|
|
@@ -5591,14 +5994,14 @@ function EnableEditor(props) {
|
|
|
5591
5994
|
onUpdateFn_1
|
|
5592
5995
|
)
|
|
5593
5996
|
);
|
|
5594
|
-
const onUpdateFn_2_props_data =
|
|
5997
|
+
const onUpdateFn_2_props_data = createMemo16(() => props.data);
|
|
5595
5998
|
function onUpdateFn_2() {
|
|
5596
5999
|
if (props.data) {
|
|
5597
6000
|
mergeNewRootState(props.data);
|
|
5598
6001
|
}
|
|
5599
6002
|
}
|
|
5600
6003
|
createEffect3(on3(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
5601
|
-
const onUpdateFn_3_props_locale =
|
|
6004
|
+
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
5602
6005
|
function onUpdateFn_3() {
|
|
5603
6006
|
if (props.locale) {
|
|
5604
6007
|
mergeNewRootState({
|
|
@@ -5607,7 +6010,7 @@ function EnableEditor(props) {
|
|
|
5607
6010
|
}
|
|
5608
6011
|
}
|
|
5609
6012
|
createEffect3(on3(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
5610
|
-
return <><builder_context_default.Provider value={props.builderContextSignal}><
|
|
6013
|
+
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
5611
6014
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
5612
6015
|
><Dynamic5
|
|
5613
6016
|
class={getWrapperClassName(
|
|
@@ -5625,14 +6028,14 @@ function EnableEditor(props) {
|
|
|
5625
6028
|
{...showContentProps()}
|
|
5626
6029
|
{...props.contentWrapperProps}
|
|
5627
6030
|
component={ContentWrapper()}
|
|
5628
|
-
>{props.children}</Dynamic5></
|
|
6031
|
+
>{props.children}</Dynamic5></Show14></builder_context_default.Provider></>;
|
|
5629
6032
|
}
|
|
5630
6033
|
var Enable_editor_default = EnableEditor;
|
|
5631
6034
|
|
|
5632
6035
|
// src/components/content/components/styles.tsx
|
|
5633
|
-
import { createSignal as
|
|
6036
|
+
import { createSignal as createSignal17 } from "solid-js";
|
|
5634
6037
|
function ContentStyles(props) {
|
|
5635
|
-
const [injectedStyles, setInjectedStyles] =
|
|
6038
|
+
const [injectedStyles, setInjectedStyles] = createSignal17(
|
|
5636
6039
|
`
|
|
5637
6040
|
${getCss({
|
|
5638
6041
|
cssCode: props.cssCode,
|
|
@@ -5690,7 +6093,7 @@ var getContentInitialValue = ({
|
|
|
5690
6093
|
|
|
5691
6094
|
// src/components/content/content.tsx
|
|
5692
6095
|
function ContentComponent(props) {
|
|
5693
|
-
const [scriptStr, setScriptStr] =
|
|
6096
|
+
const [scriptStr, setScriptStr] = createSignal18(
|
|
5694
6097
|
getUpdateVariantVisibilityScript({
|
|
5695
6098
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
5696
6099
|
variationId: props.content?.testVariationId,
|
|
@@ -5698,7 +6101,7 @@ function ContentComponent(props) {
|
|
|
5698
6101
|
contentId: props.content?.id
|
|
5699
6102
|
})
|
|
5700
6103
|
);
|
|
5701
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
6104
|
+
const [registeredComponents, setRegisteredComponents] = createSignal18(
|
|
5702
6105
|
[
|
|
5703
6106
|
...getDefaultRegisteredComponents(),
|
|
5704
6107
|
...props.customComponents || []
|
|
@@ -5713,7 +6116,7 @@ function ContentComponent(props) {
|
|
|
5713
6116
|
{}
|
|
5714
6117
|
)
|
|
5715
6118
|
);
|
|
5716
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
6119
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal18({
|
|
5717
6120
|
content: getContentInitialValue({
|
|
5718
6121
|
content: props.content,
|
|
5719
6122
|
data: props.data
|
|
@@ -5797,18 +6200,18 @@ function ContentComponent(props) {
|
|
|
5797
6200
|
setBuilderContextSignal
|
|
5798
6201
|
}}
|
|
5799
6202
|
>
|
|
5800
|
-
<
|
|
6203
|
+
<Show15 when={props.isSsrAbTest}><Inlined_script_default
|
|
5801
6204
|
id="builderio-variant-visibility"
|
|
5802
6205
|
scriptStr={scriptStr()}
|
|
5803
6206
|
nonce={props.nonce || ""}
|
|
5804
|
-
/></
|
|
5805
|
-
<
|
|
6207
|
+
/></Show15>
|
|
6208
|
+
<Show15 when={TARGET !== "reactNative"}><Styles_default
|
|
5806
6209
|
nonce={props.nonce || ""}
|
|
5807
6210
|
isNestedRender={props.isNestedRender}
|
|
5808
6211
|
contentId={builderContextSignal().content?.id}
|
|
5809
6212
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
5810
6213
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
5811
|
-
/></
|
|
6214
|
+
/></Show15>
|
|
5812
6215
|
<Blocks_default
|
|
5813
6216
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
5814
6217
|
context={builderContextSignal()}
|
|
@@ -5821,13 +6224,13 @@ var Content_default = ContentComponent;
|
|
|
5821
6224
|
|
|
5822
6225
|
// src/components/content-variants/content-variants.tsx
|
|
5823
6226
|
function ContentVariants(props) {
|
|
5824
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
5825
|
-
|
|
6227
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
|
|
6228
|
+
checkShouldRenderVariants2({
|
|
5826
6229
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
5827
6230
|
content: props.content
|
|
5828
6231
|
})
|
|
5829
6232
|
);
|
|
5830
|
-
const updateCookieAndStylesScriptStr =
|
|
6233
|
+
const updateCookieAndStylesScriptStr = createMemo19(() => {
|
|
5831
6234
|
return getUpdateCookieAndStylesScript(
|
|
5832
6235
|
getVariants(props.content).map((value) => ({
|
|
5833
6236
|
id: value.testVariationId,
|
|
@@ -5836,10 +6239,10 @@ function ContentVariants(props) {
|
|
|
5836
6239
|
props.content?.id || ""
|
|
5837
6240
|
);
|
|
5838
6241
|
});
|
|
5839
|
-
const hideVariantsStyleString =
|
|
6242
|
+
const hideVariantsStyleString = createMemo19(() => {
|
|
5840
6243
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
5841
6244
|
});
|
|
5842
|
-
const defaultContent =
|
|
6245
|
+
const defaultContent = createMemo19(() => {
|
|
5843
6246
|
return shouldRenderVariants() ? {
|
|
5844
6247
|
...props.content,
|
|
5845
6248
|
testVariationId: props.content?.id
|
|
@@ -5852,12 +6255,12 @@ function ContentVariants(props) {
|
|
|
5852
6255
|
setShouldRenderVariants(false);
|
|
5853
6256
|
});
|
|
5854
6257
|
return <><>
|
|
5855
|
-
<
|
|
6258
|
+
<Show16 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
5856
6259
|
id="builderio-init-variants-fns"
|
|
5857
6260
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
5858
6261
|
nonce={props.nonce || ""}
|
|
5859
|
-
/></
|
|
5860
|
-
<
|
|
6262
|
+
/></Show16>
|
|
6263
|
+
<Show16 when={shouldRenderVariants()}>
|
|
5861
6264
|
<Inlined_styles_default
|
|
5862
6265
|
id="builderio-variants"
|
|
5863
6266
|
styles={hideVariantsStyleString()}
|
|
@@ -5896,7 +6299,7 @@ function ContentVariants(props) {
|
|
|
5896
6299
|
{...{}}
|
|
5897
6300
|
/>;
|
|
5898
6301
|
}}</For9>
|
|
5899
|
-
</
|
|
6302
|
+
</Show16>
|
|
5900
6303
|
<Content_default
|
|
5901
6304
|
apiHost={props.apiHost}
|
|
5902
6305
|
nonce={props.nonce}
|
|
@@ -5951,14 +6354,14 @@ var fetchSymbolContent = async ({
|
|
|
5951
6354
|
|
|
5952
6355
|
// src/blocks/symbol/symbol.tsx
|
|
5953
6356
|
function Symbol(props) {
|
|
5954
|
-
const [contentToUse, setContentToUse] =
|
|
5955
|
-
const blocksWrapper =
|
|
6357
|
+
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
6358
|
+
const blocksWrapper = createMemo20(() => {
|
|
5956
6359
|
return "div";
|
|
5957
6360
|
});
|
|
5958
|
-
const contentWrapper =
|
|
6361
|
+
const contentWrapper = createMemo20(() => {
|
|
5959
6362
|
return "div";
|
|
5960
6363
|
});
|
|
5961
|
-
const className =
|
|
6364
|
+
const className = createMemo20(() => {
|
|
5962
6365
|
return [
|
|
5963
6366
|
...[props.attributes[getClassPropName()]],
|
|
5964
6367
|
"builder-symbol",
|
|
@@ -5980,7 +6383,7 @@ function Symbol(props) {
|
|
|
5980
6383
|
}
|
|
5981
6384
|
onMount8(() => {
|
|
5982
6385
|
});
|
|
5983
|
-
const onUpdateFn_0_props_symbol =
|
|
6386
|
+
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
5984
6387
|
function onUpdateFn_0() {
|
|
5985
6388
|
setContent();
|
|
5986
6389
|
}
|
|
@@ -6065,6 +6468,7 @@ export {
|
|
|
6065
6468
|
isEditing,
|
|
6066
6469
|
isPreviewing,
|
|
6067
6470
|
register,
|
|
6471
|
+
setClientUserAttributes,
|
|
6068
6472
|
setEditorSettings,
|
|
6069
6473
|
subscribeToEditor,
|
|
6070
6474
|
track
|