@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/browser/dev.jsx
CHANGED
|
@@ -1463,8 +1463,9 @@ function BlocksWrapper(props) {
|
|
|
1463
1463
|
if (!props.path) {
|
|
1464
1464
|
return void 0;
|
|
1465
1465
|
}
|
|
1466
|
+
const thisPrefix = "this.";
|
|
1466
1467
|
const pathPrefix = "component.options.";
|
|
1467
|
-
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1468
|
+
return props.path.startsWith(thisPrefix) ? props.path.replace(thisPrefix, "") : props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1468
1469
|
});
|
|
1469
1470
|
function onClick() {
|
|
1470
1471
|
if (isEditing() && !props.blocks?.length) {
|
|
@@ -1499,7 +1500,7 @@ function BlocksWrapper(props) {
|
|
|
1499
1500
|
});
|
|
1500
1501
|
return <>
|
|
1501
1502
|
<Dynamic4
|
|
1502
|
-
class={className() + " dynamic-
|
|
1503
|
+
class={className() + " dynamic-3d7ff108"}
|
|
1503
1504
|
ref={blocksWrapperRef}
|
|
1504
1505
|
builder-path={dataPath()}
|
|
1505
1506
|
builder-parent-id={props.parent}
|
|
@@ -1511,7 +1512,7 @@ function BlocksWrapper(props) {
|
|
|
1511
1512
|
{...props.BlocksWrapperProps}
|
|
1512
1513
|
component={props.BlocksWrapper}
|
|
1513
1514
|
>{props.children}</Dynamic4>
|
|
1514
|
-
<style>{`.dynamic-
|
|
1515
|
+
<style>{`.dynamic-3d7ff108 {
|
|
1515
1516
|
display: flex;
|
|
1516
1517
|
flex-direction: column;
|
|
1517
1518
|
align-items: stretch;
|
|
@@ -1676,7 +1677,7 @@ function Columns(props) {
|
|
|
1676
1677
|
}
|
|
1677
1678
|
return <>
|
|
1678
1679
|
<div
|
|
1679
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1680
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-6331dfc5"}
|
|
1680
1681
|
style={columnsCssVars()}
|
|
1681
1682
|
{...{}}
|
|
1682
1683
|
>
|
|
@@ -1695,17 +1696,17 @@ function Columns(props) {
|
|
|
1695
1696
|
><Blocks_default
|
|
1696
1697
|
path={`columns.${index}.blocks`}
|
|
1697
1698
|
parent={props.builderBlock.id}
|
|
1698
|
-
styleProp={{
|
|
1699
|
-
flexGrow: "1"
|
|
1700
|
-
}}
|
|
1701
1699
|
context={props.builderContext}
|
|
1702
1700
|
registeredComponents={props.builderComponents}
|
|
1703
1701
|
linkComponent={props.builderLinkComponent}
|
|
1704
1702
|
blocks={column.blocks}
|
|
1703
|
+
styleProp={{
|
|
1704
|
+
"flex-grow": "1"
|
|
1705
|
+
}}
|
|
1705
1706
|
/></Dynamic_renderer_default>;
|
|
1706
1707
|
}}</For4>
|
|
1707
1708
|
</div>
|
|
1708
|
-
<style>{`.div-
|
|
1709
|
+
<style>{`.div-6331dfc5 {
|
|
1709
1710
|
display: flex;
|
|
1710
1711
|
line-height: normal;
|
|
1711
1712
|
}`}</style>
|
|
@@ -1720,7 +1721,7 @@ function FragmentComponent(props) {
|
|
|
1720
1721
|
var fragment_default = FragmentComponent;
|
|
1721
1722
|
|
|
1722
1723
|
// src/blocks/image/image.tsx
|
|
1723
|
-
import { Show as Show8,
|
|
1724
|
+
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
1724
1725
|
|
|
1725
1726
|
// src/blocks/image/image.helpers.ts
|
|
1726
1727
|
function removeProtocol(path) {
|
|
@@ -1810,14 +1811,12 @@ function Image(props) {
|
|
|
1810
1811
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1811
1812
|
return out;
|
|
1812
1813
|
});
|
|
1813
|
-
onMount4(() => {
|
|
1814
|
-
});
|
|
1815
1814
|
return <>
|
|
1816
1815
|
<>
|
|
1817
1816
|
<picture>
|
|
1818
1817
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
1819
1818
|
<img
|
|
1820
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
1819
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-dc6700b4"}
|
|
1821
1820
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
1822
1821
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1823
1822
|
alt={props.altText}
|
|
@@ -1835,22 +1834,22 @@ function Image(props) {
|
|
|
1835
1834
|
<Show8
|
|
1836
1835
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
1837
1836
|
><div
|
|
1838
|
-
class="builder-image-sizer div-
|
|
1837
|
+
class="builder-image-sizer div-dc6700b4"
|
|
1839
1838
|
style={{
|
|
1840
1839
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
1841
1840
|
}}
|
|
1842
1841
|
/></Show8>
|
|
1843
1842
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
1844
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
1843
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-dc6700b4-2">{props.children}</div></Show8>
|
|
1845
1844
|
</>
|
|
1846
|
-
<style>{`.img-
|
|
1845
|
+
<style>{`.img-dc6700b4 {
|
|
1847
1846
|
opacity: 1;
|
|
1848
1847
|
transition: opacity 0.2s ease-in-out;
|
|
1849
|
-
}.div-
|
|
1848
|
+
}.div-dc6700b4 {
|
|
1850
1849
|
width: 100%;
|
|
1851
1850
|
pointer-events: none;
|
|
1852
1851
|
font-size: 0;
|
|
1853
|
-
}.div-
|
|
1852
|
+
}.div-dc6700b4-2 {
|
|
1854
1853
|
display: flex;
|
|
1855
1854
|
flex-direction: column;
|
|
1856
1855
|
align-items: stretch;
|
|
@@ -1886,10 +1885,10 @@ function SectionComponent(props) {
|
|
|
1886
1885
|
var section_default = SectionComponent;
|
|
1887
1886
|
|
|
1888
1887
|
// src/blocks/symbol/symbol.tsx
|
|
1889
|
-
import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as
|
|
1888
|
+
import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1890
1889
|
|
|
1891
1890
|
// src/components/content-variants/content-variants.tsx
|
|
1892
|
-
import { Show as
|
|
1891
|
+
import { Show as Show16, For as For9, onMount as onMount7, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
1893
1892
|
|
|
1894
1893
|
// src/helpers/url.ts
|
|
1895
1894
|
var getTopLevelDomain = (host) => {
|
|
@@ -2079,11 +2078,61 @@ var handleABTesting = async ({
|
|
|
2079
2078
|
};
|
|
2080
2079
|
};
|
|
2081
2080
|
|
|
2081
|
+
// src/helpers/user-attributes.ts
|
|
2082
|
+
var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
|
|
2083
|
+
function createUserAttributesService() {
|
|
2084
|
+
let canTrack = true;
|
|
2085
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
2086
|
+
return {
|
|
2087
|
+
setUserAttributes(newAttrs) {
|
|
2088
|
+
if (!isBrowser()) {
|
|
2089
|
+
return;
|
|
2090
|
+
}
|
|
2091
|
+
const userAttributes = {
|
|
2092
|
+
...this.getUserAttributes(),
|
|
2093
|
+
...newAttrs
|
|
2094
|
+
};
|
|
2095
|
+
setCookie({
|
|
2096
|
+
name: USER_ATTRIBUTES_COOKIE_NAME,
|
|
2097
|
+
value: JSON.stringify(userAttributes),
|
|
2098
|
+
canTrack
|
|
2099
|
+
});
|
|
2100
|
+
subscribers.forEach((callback) => callback(userAttributes));
|
|
2101
|
+
},
|
|
2102
|
+
getUserAttributes() {
|
|
2103
|
+
if (!isBrowser()) {
|
|
2104
|
+
return {};
|
|
2105
|
+
}
|
|
2106
|
+
return JSON.parse(getCookieSync({
|
|
2107
|
+
name: USER_ATTRIBUTES_COOKIE_NAME,
|
|
2108
|
+
canTrack
|
|
2109
|
+
}) || "{}");
|
|
2110
|
+
},
|
|
2111
|
+
subscribeOnUserAttributesChange(callback) {
|
|
2112
|
+
subscribers.add(callback);
|
|
2113
|
+
return () => {
|
|
2114
|
+
subscribers.delete(callback);
|
|
2115
|
+
};
|
|
2116
|
+
},
|
|
2117
|
+
setCanTrack(value) {
|
|
2118
|
+
canTrack = value;
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
}
|
|
2122
|
+
var userAttributesService = createUserAttributesService();
|
|
2123
|
+
var setClientUserAttributes = (attributes) => {
|
|
2124
|
+
userAttributesService.setUserAttributes(attributes);
|
|
2125
|
+
};
|
|
2126
|
+
|
|
2082
2127
|
// src/helpers/canTrack.ts
|
|
2083
|
-
var getDefaultCanTrack = (canTrack) =>
|
|
2128
|
+
var getDefaultCanTrack = (canTrack) => {
|
|
2129
|
+
const result = checkIsDefined(canTrack) ? canTrack : true;
|
|
2130
|
+
userAttributesService.setCanTrack(result);
|
|
2131
|
+
return result;
|
|
2132
|
+
};
|
|
2084
2133
|
|
|
2085
2134
|
// src/components/content/content.tsx
|
|
2086
|
-
import { Show as
|
|
2135
|
+
import { Show as Show15, createSignal as createSignal18 } from "solid-js";
|
|
2087
2136
|
|
|
2088
2137
|
// src/blocks/accordion/component-info.ts
|
|
2089
2138
|
var defaultTitle = {
|
|
@@ -2778,8 +2827,388 @@ var componentInfo5 = {
|
|
|
2778
2827
|
}
|
|
2779
2828
|
};
|
|
2780
2829
|
|
|
2781
|
-
// src/blocks/
|
|
2830
|
+
// src/blocks/personalization-container/component-info.ts
|
|
2782
2831
|
var componentInfo6 = {
|
|
2832
|
+
name: "PersonalizationContainer",
|
|
2833
|
+
shouldReceiveBuilderProps: {
|
|
2834
|
+
builderBlock: true,
|
|
2835
|
+
builderContext: true
|
|
2836
|
+
},
|
|
2837
|
+
noWrap: true,
|
|
2838
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
|
|
2839
|
+
canHaveChildren: true,
|
|
2840
|
+
inputs: [{
|
|
2841
|
+
name: "variants",
|
|
2842
|
+
defaultValue: [],
|
|
2843
|
+
behavior: "personalizationVariantList",
|
|
2844
|
+
type: "list",
|
|
2845
|
+
subFields: [{
|
|
2846
|
+
name: "name",
|
|
2847
|
+
type: "text"
|
|
2848
|
+
}, {
|
|
2849
|
+
name: "query",
|
|
2850
|
+
friendlyName: "Targeting rules",
|
|
2851
|
+
type: "BuilderQuery",
|
|
2852
|
+
defaultValue: []
|
|
2853
|
+
}, {
|
|
2854
|
+
name: "startDate",
|
|
2855
|
+
type: "date"
|
|
2856
|
+
}, {
|
|
2857
|
+
name: "endDate",
|
|
2858
|
+
type: "date"
|
|
2859
|
+
}, {
|
|
2860
|
+
name: "blocks",
|
|
2861
|
+
type: "uiBlocks",
|
|
2862
|
+
hideFromUI: true,
|
|
2863
|
+
defaultValue: []
|
|
2864
|
+
}]
|
|
2865
|
+
}]
|
|
2866
|
+
};
|
|
2867
|
+
|
|
2868
|
+
// src/blocks/personalization-container/personalization-container.tsx
|
|
2869
|
+
import { Show as Show10, For as For6, onMount as onMount4, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
2870
|
+
|
|
2871
|
+
// src/components/inlined-script.tsx
|
|
2872
|
+
function InlinedScript(props) {
|
|
2873
|
+
return <><script
|
|
2874
|
+
innerHTML={props.scriptStr}
|
|
2875
|
+
data-id={props.id}
|
|
2876
|
+
nonce={props.nonce || ""}
|
|
2877
|
+
/></>;
|
|
2878
|
+
}
|
|
2879
|
+
var Inlined_script_default = InlinedScript;
|
|
2880
|
+
|
|
2881
|
+
// src/functions/is-previewing.ts
|
|
2882
|
+
function isPreviewing(_search) {
|
|
2883
|
+
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
2884
|
+
if (!search) {
|
|
2885
|
+
return false;
|
|
2886
|
+
}
|
|
2887
|
+
const normalizedSearch = getSearchString(search);
|
|
2888
|
+
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
// src/blocks/personalization-container/helpers/inlined-fns.ts
|
|
2892
|
+
function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
2893
|
+
function isString(val) {
|
|
2894
|
+
return typeof val === "string";
|
|
2895
|
+
}
|
|
2896
|
+
function isNumber(val) {
|
|
2897
|
+
return typeof val === "number";
|
|
2898
|
+
}
|
|
2899
|
+
function objectMatchesQuery(userattr, query2) {
|
|
2900
|
+
const result = (() => {
|
|
2901
|
+
const property = query2.property;
|
|
2902
|
+
const operator = query2.operator;
|
|
2903
|
+
let testValue = query2.value;
|
|
2904
|
+
if (query2 && query2.property === "urlPath" && query2.value && typeof query2.value === "string" && query2.value !== "/" && query2.value.endsWith("/")) {
|
|
2905
|
+
testValue = query2.value.slice(0, -1);
|
|
2906
|
+
}
|
|
2907
|
+
if (!(property && operator)) {
|
|
2908
|
+
return true;
|
|
2909
|
+
}
|
|
2910
|
+
if (Array.isArray(testValue)) {
|
|
2911
|
+
if (operator === "isNot") {
|
|
2912
|
+
return testValue.every((val) => objectMatchesQuery(userattr, {
|
|
2913
|
+
property,
|
|
2914
|
+
operator,
|
|
2915
|
+
value: val
|
|
2916
|
+
}));
|
|
2917
|
+
}
|
|
2918
|
+
return !!testValue.find((val) => objectMatchesQuery(userattr, {
|
|
2919
|
+
property,
|
|
2920
|
+
operator,
|
|
2921
|
+
value: val
|
|
2922
|
+
}));
|
|
2923
|
+
}
|
|
2924
|
+
const value = userattr[property];
|
|
2925
|
+
if (Array.isArray(value)) {
|
|
2926
|
+
return value.includes(testValue);
|
|
2927
|
+
}
|
|
2928
|
+
switch (operator) {
|
|
2929
|
+
case "is":
|
|
2930
|
+
return value === testValue;
|
|
2931
|
+
case "isNot":
|
|
2932
|
+
return value !== testValue;
|
|
2933
|
+
case "contains":
|
|
2934
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
2935
|
+
case "startsWith":
|
|
2936
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
2937
|
+
case "endsWith":
|
|
2938
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
2939
|
+
case "greaterThan":
|
|
2940
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
2941
|
+
case "lessThan":
|
|
2942
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
2943
|
+
case "greaterThanOrEqualTo":
|
|
2944
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
2945
|
+
case "lessThanOrEqualTo":
|
|
2946
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
2947
|
+
default:
|
|
2948
|
+
return false;
|
|
2949
|
+
}
|
|
2950
|
+
})();
|
|
2951
|
+
return result;
|
|
2952
|
+
}
|
|
2953
|
+
const item = {
|
|
2954
|
+
query,
|
|
2955
|
+
startDate,
|
|
2956
|
+
endDate
|
|
2957
|
+
};
|
|
2958
|
+
const now = userAttributes.date && new Date(userAttributes.date) || /* @__PURE__ */ new Date();
|
|
2959
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
2960
|
+
return false;
|
|
2961
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
2962
|
+
return false;
|
|
2963
|
+
}
|
|
2964
|
+
if (!item.query || !item.query.length) {
|
|
2965
|
+
return true;
|
|
2966
|
+
}
|
|
2967
|
+
return item.query.every((filter) => {
|
|
2968
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
2969
|
+
});
|
|
2970
|
+
}
|
|
2971
|
+
var PERSONALIZATION_SCRIPT = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
2972
|
+
if (!navigator.cookieEnabled) {
|
|
2973
|
+
return;
|
|
2974
|
+
}
|
|
2975
|
+
function getCookie(name) {
|
|
2976
|
+
const nameEQ = name + '=';
|
|
2977
|
+
const ca = document.cookie.split(';');
|
|
2978
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2979
|
+
let c = ca[i];
|
|
2980
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
2981
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
2982
|
+
}
|
|
2983
|
+
return null;
|
|
2984
|
+
}
|
|
2985
|
+
function removeVariants() {
|
|
2986
|
+
variants?.forEach(function (_, index) {
|
|
2987
|
+
document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
|
|
2988
|
+
});
|
|
2989
|
+
document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
|
|
2990
|
+
document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
|
|
2991
|
+
}
|
|
2992
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
2993
|
+
if (locale) {
|
|
2994
|
+
attributes.locale = locale;
|
|
2995
|
+
}
|
|
2996
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
2997
|
+
return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
2998
|
+
});
|
|
2999
|
+
const isDebug = location.href.includes('builder.debug=true');
|
|
3000
|
+
if (isDebug) {
|
|
3001
|
+
console.debug('PersonalizationContainer', {
|
|
3002
|
+
attributes,
|
|
3003
|
+
variants,
|
|
3004
|
+
winningVariantIndex
|
|
3005
|
+
});
|
|
3006
|
+
}
|
|
3007
|
+
if (winningVariantIndex !== -1) {
|
|
3008
|
+
const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
|
|
3009
|
+
if (winningVariant) {
|
|
3010
|
+
const parentNode = winningVariant.parentNode;
|
|
3011
|
+
if (parentNode) {
|
|
3012
|
+
const newParent = parentNode.cloneNode(false);
|
|
3013
|
+
newParent.appendChild(winningVariant.content.firstChild);
|
|
3014
|
+
newParent.appendChild(winningVariant.content.lastChild);
|
|
3015
|
+
parentNode.parentNode?.replaceChild(newParent, parentNode);
|
|
3016
|
+
}
|
|
3017
|
+
if (isDebug) {
|
|
3018
|
+
console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
} else if (variants && variants.length > 0) {
|
|
3022
|
+
removeVariants();
|
|
3023
|
+
}
|
|
3024
|
+
}`;
|
|
3025
|
+
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}";
|
|
3026
|
+
|
|
3027
|
+
// src/blocks/personalization-container/helpers.ts
|
|
3028
|
+
function checkShouldRenderVariants(variants, canTrack) {
|
|
3029
|
+
const hasVariants = variants && variants.length > 0;
|
|
3030
|
+
if (TARGET === "reactNative")
|
|
3031
|
+
return false;
|
|
3032
|
+
if (!hasVariants)
|
|
3033
|
+
return false;
|
|
3034
|
+
if (!canTrack)
|
|
3035
|
+
return false;
|
|
3036
|
+
if (TARGET === "vue" || TARGET === "svelte")
|
|
3037
|
+
return true;
|
|
3038
|
+
if (isBrowser())
|
|
3039
|
+
return false;
|
|
3040
|
+
return true;
|
|
3041
|
+
}
|
|
3042
|
+
function getBlocksToRender({
|
|
3043
|
+
variants,
|
|
3044
|
+
previewingIndex,
|
|
3045
|
+
isHydrated,
|
|
3046
|
+
filteredVariants,
|
|
3047
|
+
fallbackBlocks
|
|
3048
|
+
}) {
|
|
3049
|
+
const fallback = {
|
|
3050
|
+
blocks: fallbackBlocks ?? [],
|
|
3051
|
+
path: "this.children"
|
|
3052
|
+
};
|
|
3053
|
+
if (isHydrated && isEditing()) {
|
|
3054
|
+
if (typeof previewingIndex === "number" && previewingIndex < (variants?.length ?? 0)) {
|
|
3055
|
+
const variant = variants[previewingIndex];
|
|
3056
|
+
return {
|
|
3057
|
+
blocks: variant.blocks,
|
|
3058
|
+
path: `component.options.variants.${previewingIndex}.blocks`
|
|
3059
|
+
};
|
|
3060
|
+
}
|
|
3061
|
+
return fallback;
|
|
3062
|
+
}
|
|
3063
|
+
if (isBrowser()) {
|
|
3064
|
+
const winningVariant = filteredVariants?.[0];
|
|
3065
|
+
if (winningVariant) {
|
|
3066
|
+
return {
|
|
3067
|
+
blocks: winningVariant.blocks,
|
|
3068
|
+
path: `component.options.variants.${variants?.indexOf(winningVariant)}.blocks`
|
|
3069
|
+
};
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
return fallback;
|
|
3073
|
+
}
|
|
3074
|
+
var getPersonalizationScript = (variants, blockId, locale) => {
|
|
3075
|
+
return `
|
|
3076
|
+
(function() {
|
|
3077
|
+
${FILTER_WITH_CUSTOM_TARGETING_SCRIPT}
|
|
3078
|
+
${PERSONALIZATION_SCRIPT}
|
|
3079
|
+
getPersonalizedVariant(${JSON.stringify(variants)}, "${blockId}"${locale ? `, "${locale}"` : ""})
|
|
3080
|
+
})();
|
|
3081
|
+
`;
|
|
3082
|
+
};
|
|
3083
|
+
|
|
3084
|
+
// src/blocks/personalization-container/personalization-container.tsx
|
|
3085
|
+
function PersonalizationContainer(props) {
|
|
3086
|
+
const [userAttributes, setUserAttributes] = createSignal10(
|
|
3087
|
+
userAttributesService.getUserAttributes()
|
|
3088
|
+
);
|
|
3089
|
+
const [scriptStr, setScriptStr] = createSignal10(
|
|
3090
|
+
getPersonalizationScript(
|
|
3091
|
+
props.variants,
|
|
3092
|
+
props.builderBlock?.id || "none",
|
|
3093
|
+
props.builderContext?.rootState?.locale
|
|
3094
|
+
)
|
|
3095
|
+
);
|
|
3096
|
+
const [unsubscribers, setUnsubscribers] = createSignal10([]);
|
|
3097
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal10(
|
|
3098
|
+
checkShouldRenderVariants(
|
|
3099
|
+
props.variants,
|
|
3100
|
+
getDefaultCanTrack(props.builderContext?.canTrack)
|
|
3101
|
+
)
|
|
3102
|
+
);
|
|
3103
|
+
const [isHydrated, setIsHydrated] = createSignal10(false);
|
|
3104
|
+
const filteredVariants = createMemo10(() => {
|
|
3105
|
+
return (props.variants || []).filter((variant) => {
|
|
3106
|
+
return filterWithCustomTargeting(
|
|
3107
|
+
{
|
|
3108
|
+
...props.builderContext?.rootState?.locale ? {
|
|
3109
|
+
locale: props.builderContext?.rootState?.locale
|
|
3110
|
+
} : {},
|
|
3111
|
+
...userAttributes()
|
|
3112
|
+
},
|
|
3113
|
+
variant.query,
|
|
3114
|
+
variant.startDate,
|
|
3115
|
+
variant.endDate
|
|
3116
|
+
);
|
|
3117
|
+
});
|
|
3118
|
+
});
|
|
3119
|
+
const blocksToRender = createMemo10(() => {
|
|
3120
|
+
return getBlocksToRender({
|
|
3121
|
+
variants: props.variants,
|
|
3122
|
+
fallbackBlocks: props.builderBlock?.children,
|
|
3123
|
+
isHydrated: isHydrated(),
|
|
3124
|
+
filteredVariants: filteredVariants(),
|
|
3125
|
+
previewingIndex: props.previewingIndex
|
|
3126
|
+
});
|
|
3127
|
+
});
|
|
3128
|
+
const hideVariantsStyleString = createMemo10(() => {
|
|
3129
|
+
return (props.variants || []).map(
|
|
3130
|
+
(_, index) => `[data-variant-id="${props.builderBlock?.id}-${index}"] { display: none; } `
|
|
3131
|
+
).join("");
|
|
3132
|
+
});
|
|
3133
|
+
let rootRef;
|
|
3134
|
+
onMount4(() => {
|
|
3135
|
+
setIsHydrated(true);
|
|
3136
|
+
const unsub = userAttributesService.subscribeOnUserAttributesChange(
|
|
3137
|
+
(attrs) => {
|
|
3138
|
+
setUserAttributes(attrs);
|
|
3139
|
+
}
|
|
3140
|
+
);
|
|
3141
|
+
if (!(isEditing() || isPreviewing())) {
|
|
3142
|
+
const variant = filteredVariants()[0];
|
|
3143
|
+
if (rootRef) {
|
|
3144
|
+
rootRef.dispatchEvent(
|
|
3145
|
+
new CustomEvent("builder.variantLoaded", {
|
|
3146
|
+
detail: {
|
|
3147
|
+
variant: variant || "default",
|
|
3148
|
+
content: props.builderContext?.content
|
|
3149
|
+
},
|
|
3150
|
+
bubbles: true
|
|
3151
|
+
})
|
|
3152
|
+
);
|
|
3153
|
+
const observer = new IntersectionObserver((entries) => {
|
|
3154
|
+
entries.forEach((entry) => {
|
|
3155
|
+
if (entry.isIntersecting && rootRef) {
|
|
3156
|
+
rootRef.dispatchEvent(
|
|
3157
|
+
new CustomEvent("builder.variantDisplayed", {
|
|
3158
|
+
detail: {
|
|
3159
|
+
variant: variant || "default",
|
|
3160
|
+
content: props.builderContext?.content
|
|
3161
|
+
},
|
|
3162
|
+
bubbles: true
|
|
3163
|
+
})
|
|
3164
|
+
);
|
|
3165
|
+
}
|
|
3166
|
+
});
|
|
3167
|
+
});
|
|
3168
|
+
observer.observe(rootRef);
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
unsubscribers().push(unsub);
|
|
3172
|
+
});
|
|
3173
|
+
return <><div
|
|
3174
|
+
class={`builder-personalization-container ${props.attributes?.className || ""}`}
|
|
3175
|
+
ref={rootRef}
|
|
3176
|
+
{...props.attributes}
|
|
3177
|
+
>
|
|
3178
|
+
<Show10 when={shouldRenderVariants()}>
|
|
3179
|
+
<For6 each={props.variants}>{(variant, _index) => {
|
|
3180
|
+
const index = _index();
|
|
3181
|
+
return <template
|
|
3182
|
+
key={index}
|
|
3183
|
+
data-variant-id={`${props.builderBlock?.id}-${index}`}
|
|
3184
|
+
><Blocks_default
|
|
3185
|
+
blocks={variant.blocks}
|
|
3186
|
+
parent={props.builderBlock?.id}
|
|
3187
|
+
path={`component.options.variants.${index}.blocks`}
|
|
3188
|
+
/></template>;
|
|
3189
|
+
}}</For6>
|
|
3190
|
+
<Inlined_styles_default
|
|
3191
|
+
nonce={props.builderContext?.nonce || ""}
|
|
3192
|
+
styles={hideVariantsStyleString()}
|
|
3193
|
+
id={`variants-styles-${props.builderBlock?.id}`}
|
|
3194
|
+
/>
|
|
3195
|
+
<Inlined_script_default
|
|
3196
|
+
nonce={props.builderContext?.nonce || ""}
|
|
3197
|
+
scriptStr={scriptStr()}
|
|
3198
|
+
id={`variants-script-${props.builderBlock?.id}`}
|
|
3199
|
+
/>
|
|
3200
|
+
</Show10>
|
|
3201
|
+
<Blocks_default
|
|
3202
|
+
blocks={blocksToRender().blocks}
|
|
3203
|
+
parent={props.builderBlock?.id}
|
|
3204
|
+
path={blocksToRender().path}
|
|
3205
|
+
/>
|
|
3206
|
+
</div></>;
|
|
3207
|
+
}
|
|
3208
|
+
var personalization_container_default = PersonalizationContainer;
|
|
3209
|
+
|
|
3210
|
+
// src/blocks/section/component-info.ts
|
|
3211
|
+
var componentInfo7 = {
|
|
2783
3212
|
name: "Core:Section",
|
|
2784
3213
|
static: true,
|
|
2785
3214
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2821,7 +3250,7 @@ var componentInfo6 = {
|
|
|
2821
3250
|
};
|
|
2822
3251
|
|
|
2823
3252
|
// src/blocks/slot/component-info.ts
|
|
2824
|
-
var
|
|
3253
|
+
var componentInfo8 = {
|
|
2825
3254
|
name: "Slot",
|
|
2826
3255
|
isRSC: true,
|
|
2827
3256
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2860,7 +3289,7 @@ function Slot(props) {
|
|
|
2860
3289
|
var slot_default = Slot;
|
|
2861
3290
|
|
|
2862
3291
|
// src/blocks/symbol/component-info.ts
|
|
2863
|
-
var
|
|
3292
|
+
var componentInfo9 = {
|
|
2864
3293
|
name: "Symbol",
|
|
2865
3294
|
noWrap: true,
|
|
2866
3295
|
static: true,
|
|
@@ -2942,7 +3371,7 @@ var defaultElement = {
|
|
|
2942
3371
|
}
|
|
2943
3372
|
}
|
|
2944
3373
|
};
|
|
2945
|
-
var
|
|
3374
|
+
var componentInfo10 = {
|
|
2946
3375
|
name: "Builder: Tabs",
|
|
2947
3376
|
inputs: [{
|
|
2948
3377
|
name: "tabs",
|
|
@@ -3048,9 +3477,9 @@ var componentInfo9 = {
|
|
|
3048
3477
|
};
|
|
3049
3478
|
|
|
3050
3479
|
// src/blocks/tabs/tabs.tsx
|
|
3051
|
-
import { Show as
|
|
3480
|
+
import { Show as Show11, For as For7, createSignal as createSignal11 } from "solid-js";
|
|
3052
3481
|
function Tabs(props) {
|
|
3053
|
-
const [activeTab, setActiveTab] =
|
|
3482
|
+
const [activeTab, setActiveTab] = createSignal11(
|
|
3054
3483
|
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
3055
3484
|
);
|
|
3056
3485
|
function activeTabContent(active) {
|
|
@@ -3072,7 +3501,7 @@ function Tabs(props) {
|
|
|
3072
3501
|
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
3073
3502
|
overflow: "auto"
|
|
3074
3503
|
}}
|
|
3075
|
-
><
|
|
3504
|
+
><For7 each={props.tabs}>{(tab, _index) => {
|
|
3076
3505
|
const index = _index();
|
|
3077
3506
|
return <span
|
|
3078
3507
|
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
@@ -3089,21 +3518,21 @@ function Tabs(props) {
|
|
|
3089
3518
|
registeredComponents={props.builderComponents}
|
|
3090
3519
|
linkComponent={props.builderLinkComponent}
|
|
3091
3520
|
/></span>;
|
|
3092
|
-
}}</
|
|
3093
|
-
<
|
|
3521
|
+
}}</For7></div>
|
|
3522
|
+
<Show11 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
3094
3523
|
parent={props.builderBlock.id}
|
|
3095
3524
|
path={`tabs.${activeTab()}.content`}
|
|
3096
3525
|
blocks={activeTabContent(activeTab())}
|
|
3097
3526
|
context={props.builderContext}
|
|
3098
3527
|
registeredComponents={props.builderComponents}
|
|
3099
3528
|
linkComponent={props.builderLinkComponent}
|
|
3100
|
-
/></div></
|
|
3529
|
+
/></div></Show11>
|
|
3101
3530
|
</div></>;
|
|
3102
3531
|
}
|
|
3103
3532
|
var tabs_default = Tabs;
|
|
3104
3533
|
|
|
3105
3534
|
// src/blocks/text/component-info.ts
|
|
3106
|
-
var
|
|
3535
|
+
var componentInfo11 = {
|
|
3107
3536
|
shouldReceiveBuilderProps: {
|
|
3108
3537
|
builderBlock: TARGET === "reactNative" ? true : false,
|
|
3109
3538
|
builderContext: true
|
|
@@ -3140,7 +3569,7 @@ function Text(props) {
|
|
|
3140
3569
|
var text_default = Text;
|
|
3141
3570
|
|
|
3142
3571
|
// src/blocks/custom-code/component-info.ts
|
|
3143
|
-
var
|
|
3572
|
+
var componentInfo12 = {
|
|
3144
3573
|
name: "Custom Code",
|
|
3145
3574
|
static: true,
|
|
3146
3575
|
requiredPermissions: ["editCode"],
|
|
@@ -3165,10 +3594,10 @@ var componentInfo11 = {
|
|
|
3165
3594
|
};
|
|
3166
3595
|
|
|
3167
3596
|
// src/blocks/custom-code/custom-code.tsx
|
|
3168
|
-
import { onMount as onMount5, createSignal as
|
|
3597
|
+
import { onMount as onMount5, createSignal as createSignal12 } from "solid-js";
|
|
3169
3598
|
function CustomCode(props) {
|
|
3170
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
3171
|
-
const [scriptsRun, setScriptsRun] =
|
|
3599
|
+
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3600
|
+
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
3172
3601
|
let elementRef;
|
|
3173
3602
|
onMount5(() => {
|
|
3174
3603
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -3212,7 +3641,7 @@ function CustomCode(props) {
|
|
|
3212
3641
|
var custom_code_default = CustomCode;
|
|
3213
3642
|
|
|
3214
3643
|
// src/blocks/embed/component-info.ts
|
|
3215
|
-
var
|
|
3644
|
+
var componentInfo13 = {
|
|
3216
3645
|
name: "Embed",
|
|
3217
3646
|
static: true,
|
|
3218
3647
|
inputs: [{
|
|
@@ -3230,7 +3659,7 @@ var componentInfo12 = {
|
|
|
3230
3659
|
};
|
|
3231
3660
|
|
|
3232
3661
|
// src/blocks/embed/embed.tsx
|
|
3233
|
-
import { on as on2, createEffect as createEffect2, createMemo as
|
|
3662
|
+
import { on as on2, createEffect as createEffect2, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3234
3663
|
|
|
3235
3664
|
// src/blocks/embed/helpers.ts
|
|
3236
3665
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3238,9 +3667,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
3238
3667
|
|
|
3239
3668
|
// src/blocks/embed/embed.tsx
|
|
3240
3669
|
function Embed(props) {
|
|
3241
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
3242
|
-
const [scriptsRun, setScriptsRun] =
|
|
3243
|
-
const [ranInitFn, setRanInitFn] =
|
|
3670
|
+
const [scriptsInserted, setScriptsInserted] = createSignal13([]);
|
|
3671
|
+
const [scriptsRun, setScriptsRun] = createSignal13([]);
|
|
3672
|
+
const [ranInitFn, setRanInitFn] = createSignal13(false);
|
|
3244
3673
|
function findAndRunScripts() {
|
|
3245
3674
|
if (!elem || !elem.getElementsByTagName)
|
|
3246
3675
|
return;
|
|
@@ -3264,8 +3693,8 @@ function Embed(props) {
|
|
|
3264
3693
|
}
|
|
3265
3694
|
}
|
|
3266
3695
|
let elem;
|
|
3267
|
-
const onUpdateFn_0_elem =
|
|
3268
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
3696
|
+
const onUpdateFn_0_elem = createMemo13(() => elem);
|
|
3697
|
+
const onUpdateFn_0_ranInitFn__ = createMemo13(() => ranInitFn());
|
|
3269
3698
|
function onUpdateFn_0() {
|
|
3270
3699
|
if (elem && !ranInitFn()) {
|
|
3271
3700
|
setRanInitFn(true);
|
|
@@ -3280,7 +3709,7 @@ function Embed(props) {
|
|
|
3280
3709
|
var embed_default = Embed;
|
|
3281
3710
|
|
|
3282
3711
|
// src/blocks/form/form/component-info.ts
|
|
3283
|
-
var
|
|
3712
|
+
var componentInfo14 = {
|
|
3284
3713
|
name: "Form:Form",
|
|
3285
3714
|
// editableTags: ['builder-form-error']
|
|
3286
3715
|
defaults: {
|
|
@@ -3520,7 +3949,7 @@ var componentInfo13 = {
|
|
|
3520
3949
|
};
|
|
3521
3950
|
|
|
3522
3951
|
// src/blocks/form/form/form.tsx
|
|
3523
|
-
import { Show as
|
|
3952
|
+
import { Show as Show12, createSignal as createSignal14 } from "solid-js";
|
|
3524
3953
|
|
|
3525
3954
|
// src/functions/get-env.ts
|
|
3526
3955
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -3540,9 +3969,9 @@ function logFetch(url) {
|
|
|
3540
3969
|
|
|
3541
3970
|
// src/blocks/form/form/form.tsx
|
|
3542
3971
|
function FormComponent(props) {
|
|
3543
|
-
const [formState, setFormState] =
|
|
3544
|
-
const [responseData, setResponseData] =
|
|
3545
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
3972
|
+
const [formState, setFormState] = createSignal14("unsubmitted");
|
|
3973
|
+
const [responseData, setResponseData] = createSignal14(null);
|
|
3974
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal14("");
|
|
3546
3975
|
function mergeNewRootState(newData) {
|
|
3547
3976
|
const combinedState = {
|
|
3548
3977
|
...props.builderContext.rootState,
|
|
@@ -3737,34 +4166,25 @@ function FormComponent(props) {
|
|
|
3737
4166
|
{...{}}
|
|
3738
4167
|
{...props.attributes}
|
|
3739
4168
|
>
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
return <Block_default
|
|
3743
|
-
key={`form-block-${idx}`}
|
|
3744
|
-
block={block}
|
|
3745
|
-
context={props.builderContext}
|
|
3746
|
-
registeredComponents={props.builderComponents}
|
|
3747
|
-
linkComponent={props.builderLinkComponent}
|
|
3748
|
-
/>;
|
|
3749
|
-
}}</For7></Show11>
|
|
3750
|
-
<Show11 when={submissionState() === "error"}><Blocks_default
|
|
4169
|
+
{props.children}
|
|
4170
|
+
<Show12 when={submissionState() === "error"}><Blocks_default
|
|
3751
4171
|
path="errorMessage"
|
|
3752
4172
|
blocks={props.errorMessage}
|
|
3753
4173
|
context={props.builderContext}
|
|
3754
|
-
/></
|
|
3755
|
-
<
|
|
4174
|
+
/></Show12>
|
|
4175
|
+
<Show12 when={submissionState() === "sending"}><Blocks_default
|
|
3756
4176
|
path="sendingMessage"
|
|
3757
4177
|
blocks={props.sendingMessage}
|
|
3758
4178
|
context={props.builderContext}
|
|
3759
|
-
/></
|
|
3760
|
-
<
|
|
3761
|
-
<
|
|
4179
|
+
/></Show12>
|
|
4180
|
+
<Show12 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-04a43b72">{JSON.stringify(responseData(), null, 2)}</pre></Show12>
|
|
4181
|
+
<Show12 when={submissionState() === "success"}><Blocks_default
|
|
3762
4182
|
path="successMessage"
|
|
3763
4183
|
blocks={props.successMessage}
|
|
3764
4184
|
context={props.builderContext}
|
|
3765
|
-
/></
|
|
4185
|
+
/></Show12>
|
|
3766
4186
|
</form>
|
|
3767
|
-
<style>{`.pre-
|
|
4187
|
+
<style>{`.pre-04a43b72 {
|
|
3768
4188
|
padding: 10px;
|
|
3769
4189
|
color: red;
|
|
3770
4190
|
text-align: center;
|
|
@@ -3774,7 +4194,7 @@ function FormComponent(props) {
|
|
|
3774
4194
|
var form_default = FormComponent;
|
|
3775
4195
|
|
|
3776
4196
|
// src/blocks/form/input/component-info.ts
|
|
3777
|
-
var
|
|
4197
|
+
var componentInfo15 = {
|
|
3778
4198
|
name: "Form:Input",
|
|
3779
4199
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3780
4200
|
inputs: [
|
|
@@ -3844,7 +4264,7 @@ function FormInputComponent(props) {
|
|
|
3844
4264
|
var input_default = FormInputComponent;
|
|
3845
4265
|
|
|
3846
4266
|
// src/blocks/form/select/component-info.ts
|
|
3847
|
-
var
|
|
4267
|
+
var componentInfo16 = {
|
|
3848
4268
|
name: "Form:Select",
|
|
3849
4269
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3850
4270
|
defaultStyles: {
|
|
@@ -3907,7 +4327,7 @@ function SelectComponent(props) {
|
|
|
3907
4327
|
var select_default = SelectComponent;
|
|
3908
4328
|
|
|
3909
4329
|
// src/blocks/form/submit-button/component-info.ts
|
|
3910
|
-
var
|
|
4330
|
+
var componentInfo17 = {
|
|
3911
4331
|
name: "Form:SubmitButton",
|
|
3912
4332
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3913
4333
|
defaultStyles: {
|
|
@@ -3941,7 +4361,7 @@ function SubmitButton(props) {
|
|
|
3941
4361
|
var submit_button_default = SubmitButton;
|
|
3942
4362
|
|
|
3943
4363
|
// src/blocks/form/textarea/component-info.ts
|
|
3944
|
-
var
|
|
4364
|
+
var componentInfo18 = {
|
|
3945
4365
|
name: "Form:TextArea",
|
|
3946
4366
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3947
4367
|
inputs: [{
|
|
@@ -3994,7 +4414,7 @@ function Textarea(props) {
|
|
|
3994
4414
|
var textarea_default = Textarea;
|
|
3995
4415
|
|
|
3996
4416
|
// src/blocks/img/component-info.ts
|
|
3997
|
-
var
|
|
4417
|
+
var componentInfo19 = {
|
|
3998
4418
|
// friendlyName?
|
|
3999
4419
|
name: "Raw:Img",
|
|
4000
4420
|
hideFromInsertMenu: true,
|
|
@@ -4027,7 +4447,7 @@ function ImgComponent(props) {
|
|
|
4027
4447
|
var img_default = ImgComponent;
|
|
4028
4448
|
|
|
4029
4449
|
// src/blocks/video/component-info.ts
|
|
4030
|
-
var
|
|
4450
|
+
var componentInfo20 = {
|
|
4031
4451
|
name: "Video",
|
|
4032
4452
|
canHaveChildren: true,
|
|
4033
4453
|
defaultStyles: {
|
|
@@ -4114,9 +4534,9 @@ var componentInfo19 = {
|
|
|
4114
4534
|
};
|
|
4115
4535
|
|
|
4116
4536
|
// src/blocks/video/video.tsx
|
|
4117
|
-
import { Show as
|
|
4537
|
+
import { Show as Show13, createMemo as createMemo15 } from "solid-js";
|
|
4118
4538
|
function Video(props) {
|
|
4119
|
-
const videoProps =
|
|
4539
|
+
const videoProps = createMemo15(() => {
|
|
4120
4540
|
return {
|
|
4121
4541
|
...props.autoPlay === true ? {
|
|
4122
4542
|
autoPlay: true
|
|
@@ -4135,7 +4555,7 @@ function Video(props) {
|
|
|
4135
4555
|
} : {}
|
|
4136
4556
|
};
|
|
4137
4557
|
});
|
|
4138
|
-
const spreadProps =
|
|
4558
|
+
const spreadProps = createMemo15(() => {
|
|
4139
4559
|
return {
|
|
4140
4560
|
...videoProps()
|
|
4141
4561
|
};
|
|
@@ -4157,7 +4577,6 @@ function Video(props) {
|
|
|
4157
4577
|
"object-position": props.position,
|
|
4158
4578
|
// Hack to get object fit to work as expected and
|
|
4159
4579
|
// not have the video overflow
|
|
4160
|
-
"z-index": 2,
|
|
4161
4580
|
"border-radius": "1px",
|
|
4162
4581
|
...props.aspectRatio ? {
|
|
4163
4582
|
position: "absolute"
|
|
@@ -4165,8 +4584,8 @@ function Video(props) {
|
|
|
4165
4584
|
}}
|
|
4166
4585
|
src={props.video || "no-src"}
|
|
4167
4586
|
poster={props.posterImage}
|
|
4168
|
-
><
|
|
4169
|
-
<
|
|
4587
|
+
><Show13 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show13></video>
|
|
4588
|
+
<Show13
|
|
4170
4589
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
4171
4590
|
><div
|
|
4172
4591
|
style={{
|
|
@@ -4175,15 +4594,15 @@ function Video(props) {
|
|
|
4175
4594
|
"pointer-events": "none",
|
|
4176
4595
|
"font-size": "0px"
|
|
4177
4596
|
}}
|
|
4178
|
-
/></
|
|
4179
|
-
<
|
|
4597
|
+
/></Show13>
|
|
4598
|
+
<Show13 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
4180
4599
|
style={{
|
|
4181
4600
|
display: "flex",
|
|
4182
4601
|
"flex-direction": "column",
|
|
4183
4602
|
"align-items": "stretch"
|
|
4184
4603
|
}}
|
|
4185
|
-
>{props.children}</div></
|
|
4186
|
-
<
|
|
4604
|
+
>{props.children}</div></Show13>
|
|
4605
|
+
<Show13 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
4187
4606
|
style={{
|
|
4188
4607
|
"pointer-events": "none",
|
|
4189
4608
|
display: "flex",
|
|
@@ -4195,7 +4614,7 @@ function Video(props) {
|
|
|
4195
4614
|
width: "100%",
|
|
4196
4615
|
height: "100%"
|
|
4197
4616
|
}}
|
|
4198
|
-
>{props.children}</div></
|
|
4617
|
+
>{props.children}</div></Show13>
|
|
4199
4618
|
</div></>;
|
|
4200
4619
|
}
|
|
4201
4620
|
var video_default = Video;
|
|
@@ -4203,31 +4622,31 @@ var video_default = Video;
|
|
|
4203
4622
|
// src/constants/extra-components.ts
|
|
4204
4623
|
var getExtraComponents = () => [{
|
|
4205
4624
|
component: custom_code_default,
|
|
4206
|
-
...
|
|
4625
|
+
...componentInfo12
|
|
4207
4626
|
}, {
|
|
4208
4627
|
component: embed_default,
|
|
4209
|
-
...
|
|
4628
|
+
...componentInfo13
|
|
4210
4629
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4211
4630
|
component: form_default,
|
|
4212
|
-
...
|
|
4631
|
+
...componentInfo14
|
|
4213
4632
|
}, {
|
|
4214
4633
|
component: input_default,
|
|
4215
|
-
...
|
|
4634
|
+
...componentInfo15
|
|
4216
4635
|
}, {
|
|
4217
4636
|
component: submit_button_default,
|
|
4218
|
-
...
|
|
4637
|
+
...componentInfo17
|
|
4219
4638
|
}, {
|
|
4220
4639
|
component: select_default,
|
|
4221
|
-
...
|
|
4640
|
+
...componentInfo16
|
|
4222
4641
|
}, {
|
|
4223
4642
|
component: textarea_default,
|
|
4224
|
-
...
|
|
4643
|
+
...componentInfo18
|
|
4225
4644
|
}], {
|
|
4226
4645
|
component: img_default,
|
|
4227
|
-
...
|
|
4646
|
+
...componentInfo19
|
|
4228
4647
|
}, {
|
|
4229
4648
|
component: video_default,
|
|
4230
|
-
...
|
|
4649
|
+
...componentInfo20
|
|
4231
4650
|
}];
|
|
4232
4651
|
|
|
4233
4652
|
// src/constants/builder-registered-components.ts
|
|
@@ -4245,19 +4664,22 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
4245
4664
|
...componentInfo5
|
|
4246
4665
|
}, {
|
|
4247
4666
|
component: section_default,
|
|
4248
|
-
...
|
|
4667
|
+
...componentInfo7
|
|
4249
4668
|
}, {
|
|
4250
4669
|
component: slot_default,
|
|
4251
|
-
...
|
|
4670
|
+
...componentInfo8
|
|
4252
4671
|
}, {
|
|
4253
4672
|
component: symbol_default,
|
|
4254
|
-
...
|
|
4673
|
+
...componentInfo9
|
|
4255
4674
|
}, {
|
|
4256
4675
|
component: text_default,
|
|
4257
|
-
...
|
|
4258
|
-
}, ...TARGET === "
|
|
4676
|
+
...componentInfo11
|
|
4677
|
+
}, ...TARGET === "react" ? [{
|
|
4678
|
+
component: personalization_container_default,
|
|
4679
|
+
...componentInfo6
|
|
4680
|
+
}] : [], ...TARGET === "rsc" ? [] : [{
|
|
4259
4681
|
component: tabs_default,
|
|
4260
|
-
...
|
|
4682
|
+
...componentInfo10
|
|
4261
4683
|
}, {
|
|
4262
4684
|
component: accordion_default,
|
|
4263
4685
|
...componentInfo
|
|
@@ -4295,7 +4717,7 @@ var getVariants = (content) => Object.values(content?.variations || {}).map((var
|
|
|
4295
4717
|
testVariationId: variant.id,
|
|
4296
4718
|
id: content?.id
|
|
4297
4719
|
}));
|
|
4298
|
-
var
|
|
4720
|
+
var checkShouldRenderVariants2 = ({
|
|
4299
4721
|
canTrack,
|
|
4300
4722
|
content
|
|
4301
4723
|
}) => {
|
|
@@ -4329,24 +4751,14 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4329
4751
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4330
4752
|
)`;
|
|
4331
4753
|
|
|
4332
|
-
// src/components/inlined-script.tsx
|
|
4333
|
-
function InlinedScript(props) {
|
|
4334
|
-
return <><script
|
|
4335
|
-
innerHTML={props.scriptStr}
|
|
4336
|
-
data-id={props.id}
|
|
4337
|
-
nonce={props.nonce || ""}
|
|
4338
|
-
/></>;
|
|
4339
|
-
}
|
|
4340
|
-
var Inlined_script_default = InlinedScript;
|
|
4341
|
-
|
|
4342
4754
|
// src/components/content/components/enable-editor.tsx
|
|
4343
4755
|
import {
|
|
4344
|
-
Show as
|
|
4756
|
+
Show as Show14,
|
|
4345
4757
|
onMount as onMount6,
|
|
4346
4758
|
on as on3,
|
|
4347
4759
|
createEffect as createEffect3,
|
|
4348
|
-
createMemo as
|
|
4349
|
-
createSignal as
|
|
4760
|
+
createMemo as createMemo16,
|
|
4761
|
+
createSignal as createSignal16
|
|
4350
4762
|
} from "solid-js";
|
|
4351
4763
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
4352
4764
|
|
|
@@ -4356,7 +4768,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4356
4768
|
}
|
|
4357
4769
|
|
|
4358
4770
|
// src/constants/sdk-version.ts
|
|
4359
|
-
var SDK_VERSION = "3.0.
|
|
4771
|
+
var SDK_VERSION = "3.0.6";
|
|
4360
4772
|
|
|
4361
4773
|
// src/helpers/sdk-headers.ts
|
|
4362
4774
|
var getSdkHeaders = () => ({
|
|
@@ -4653,16 +5065,6 @@ async function fetchEntries(options) {
|
|
|
4653
5065
|
return _processContentResult(options, content);
|
|
4654
5066
|
}
|
|
4655
5067
|
|
|
4656
|
-
// src/functions/is-previewing.ts
|
|
4657
|
-
function isPreviewing(_search) {
|
|
4658
|
-
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
4659
|
-
if (!search) {
|
|
4660
|
-
return false;
|
|
4661
|
-
}
|
|
4662
|
-
const normalizedSearch = getSearchString(search);
|
|
4663
|
-
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4664
|
-
}
|
|
4665
|
-
|
|
4666
5068
|
// src/helpers/uuid.ts
|
|
4667
5069
|
function uuidv4() {
|
|
4668
5070
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
@@ -4989,7 +5391,8 @@ var setupBrowserForEditing = (options = {}) => {
|
|
|
4989
5391
|
// Supports builder-model="..." attribute which is needed to
|
|
4990
5392
|
// scope our '+ add block' button styling
|
|
4991
5393
|
supportsAddBlockScoping: true,
|
|
4992
|
-
supportsCustomBreakpoints: true
|
|
5394
|
+
supportsCustomBreakpoints: true,
|
|
5395
|
+
blockLevelPersonalization: true
|
|
4993
5396
|
}
|
|
4994
5397
|
}, "*");
|
|
4995
5398
|
window.parent?.postMessage({
|
|
@@ -5204,12 +5607,12 @@ var getWrapperClassName = (variationId) => {
|
|
|
5204
5607
|
|
|
5205
5608
|
// src/components/content/components/enable-editor.tsx
|
|
5206
5609
|
function EnableEditor(props) {
|
|
5207
|
-
const [ContentWrapper, setContentWrapper] =
|
|
5610
|
+
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5208
5611
|
props.contentWrapper || "div"
|
|
5209
5612
|
);
|
|
5210
|
-
const [httpReqsData, setHttpReqsData] =
|
|
5211
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
5212
|
-
const [clicked, setClicked] =
|
|
5613
|
+
const [httpReqsData, setHttpReqsData] = createSignal16({});
|
|
5614
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal16({});
|
|
5615
|
+
const [clicked, setClicked] = createSignal16(false);
|
|
5213
5616
|
function mergeNewRootState(newData) {
|
|
5214
5617
|
const combinedState = {
|
|
5215
5618
|
...props.builderContextSignal.rootState,
|
|
@@ -5243,7 +5646,7 @@ function EnableEditor(props) {
|
|
|
5243
5646
|
content: newContentValue
|
|
5244
5647
|
}));
|
|
5245
5648
|
}
|
|
5246
|
-
const showContentProps =
|
|
5649
|
+
const showContentProps = createMemo16(() => {
|
|
5247
5650
|
return props.showContent ? {} : {
|
|
5248
5651
|
hidden: true,
|
|
5249
5652
|
"aria-hidden": true
|
|
@@ -5419,14 +5822,14 @@ function EnableEditor(props) {
|
|
|
5419
5822
|
}
|
|
5420
5823
|
}
|
|
5421
5824
|
});
|
|
5422
|
-
const onUpdateFn_0_props_content =
|
|
5825
|
+
const onUpdateFn_0_props_content = createMemo16(() => props.content);
|
|
5423
5826
|
function onUpdateFn_0() {
|
|
5424
5827
|
if (props.content) {
|
|
5425
5828
|
mergeNewContent(props.content);
|
|
5426
5829
|
}
|
|
5427
5830
|
}
|
|
5428
5831
|
createEffect3(on3(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5429
|
-
const onUpdateFn_1_props_builderContextSignal_rootState =
|
|
5832
|
+
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
5430
5833
|
() => props.builderContextSignal.rootState
|
|
5431
5834
|
);
|
|
5432
5835
|
function onUpdateFn_1() {
|
|
@@ -5438,14 +5841,14 @@ function EnableEditor(props) {
|
|
|
5438
5841
|
onUpdateFn_1
|
|
5439
5842
|
)
|
|
5440
5843
|
);
|
|
5441
|
-
const onUpdateFn_2_props_data =
|
|
5844
|
+
const onUpdateFn_2_props_data = createMemo16(() => props.data);
|
|
5442
5845
|
function onUpdateFn_2() {
|
|
5443
5846
|
if (props.data) {
|
|
5444
5847
|
mergeNewRootState(props.data);
|
|
5445
5848
|
}
|
|
5446
5849
|
}
|
|
5447
5850
|
createEffect3(on3(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
5448
|
-
const onUpdateFn_3_props_locale =
|
|
5851
|
+
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
5449
5852
|
function onUpdateFn_3() {
|
|
5450
5853
|
if (props.locale) {
|
|
5451
5854
|
mergeNewRootState({
|
|
@@ -5454,7 +5857,7 @@ function EnableEditor(props) {
|
|
|
5454
5857
|
}
|
|
5455
5858
|
}
|
|
5456
5859
|
createEffect3(on3(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
5457
|
-
return <><builder_context_default.Provider value={props.builderContextSignal}><
|
|
5860
|
+
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
5458
5861
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
5459
5862
|
><Dynamic5
|
|
5460
5863
|
class={getWrapperClassName(
|
|
@@ -5472,14 +5875,14 @@ function EnableEditor(props) {
|
|
|
5472
5875
|
{...showContentProps()}
|
|
5473
5876
|
{...props.contentWrapperProps}
|
|
5474
5877
|
component={ContentWrapper()}
|
|
5475
|
-
>{props.children}</Dynamic5></
|
|
5878
|
+
>{props.children}</Dynamic5></Show14></builder_context_default.Provider></>;
|
|
5476
5879
|
}
|
|
5477
5880
|
var Enable_editor_default = EnableEditor;
|
|
5478
5881
|
|
|
5479
5882
|
// src/components/content/components/styles.tsx
|
|
5480
|
-
import { createSignal as
|
|
5883
|
+
import { createSignal as createSignal17 } from "solid-js";
|
|
5481
5884
|
function ContentStyles(props) {
|
|
5482
|
-
const [injectedStyles, setInjectedStyles] =
|
|
5885
|
+
const [injectedStyles, setInjectedStyles] = createSignal17(
|
|
5483
5886
|
`
|
|
5484
5887
|
${getCss({
|
|
5485
5888
|
cssCode: props.cssCode,
|
|
@@ -5537,7 +5940,7 @@ var getContentInitialValue = ({
|
|
|
5537
5940
|
|
|
5538
5941
|
// src/components/content/content.tsx
|
|
5539
5942
|
function ContentComponent(props) {
|
|
5540
|
-
const [scriptStr, setScriptStr] =
|
|
5943
|
+
const [scriptStr, setScriptStr] = createSignal18(
|
|
5541
5944
|
getUpdateVariantVisibilityScript({
|
|
5542
5945
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
5543
5946
|
variationId: props.content?.testVariationId,
|
|
@@ -5545,7 +5948,7 @@ function ContentComponent(props) {
|
|
|
5545
5948
|
contentId: props.content?.id
|
|
5546
5949
|
})
|
|
5547
5950
|
);
|
|
5548
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
5951
|
+
const [registeredComponents, setRegisteredComponents] = createSignal18(
|
|
5549
5952
|
[
|
|
5550
5953
|
...getDefaultRegisteredComponents(),
|
|
5551
5954
|
...props.customComponents || []
|
|
@@ -5560,7 +5963,7 @@ function ContentComponent(props) {
|
|
|
5560
5963
|
{}
|
|
5561
5964
|
)
|
|
5562
5965
|
);
|
|
5563
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
5966
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal18({
|
|
5564
5967
|
content: getContentInitialValue({
|
|
5565
5968
|
content: props.content,
|
|
5566
5969
|
data: props.data
|
|
@@ -5644,18 +6047,18 @@ function ContentComponent(props) {
|
|
|
5644
6047
|
setBuilderContextSignal
|
|
5645
6048
|
}}
|
|
5646
6049
|
>
|
|
5647
|
-
<
|
|
6050
|
+
<Show15 when={props.isSsrAbTest}><Inlined_script_default
|
|
5648
6051
|
id="builderio-variant-visibility"
|
|
5649
6052
|
scriptStr={scriptStr()}
|
|
5650
6053
|
nonce={props.nonce || ""}
|
|
5651
|
-
/></
|
|
5652
|
-
<
|
|
6054
|
+
/></Show15>
|
|
6055
|
+
<Show15 when={TARGET !== "reactNative"}><Styles_default
|
|
5653
6056
|
nonce={props.nonce || ""}
|
|
5654
6057
|
isNestedRender={props.isNestedRender}
|
|
5655
6058
|
contentId={builderContextSignal().content?.id}
|
|
5656
6059
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
5657
6060
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
5658
|
-
/></
|
|
6061
|
+
/></Show15>
|
|
5659
6062
|
<Blocks_default
|
|
5660
6063
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
5661
6064
|
context={builderContextSignal()}
|
|
@@ -5668,13 +6071,13 @@ var Content_default = ContentComponent;
|
|
|
5668
6071
|
|
|
5669
6072
|
// src/components/content-variants/content-variants.tsx
|
|
5670
6073
|
function ContentVariants(props) {
|
|
5671
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
5672
|
-
|
|
6074
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
|
|
6075
|
+
checkShouldRenderVariants2({
|
|
5673
6076
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
5674
6077
|
content: props.content
|
|
5675
6078
|
})
|
|
5676
6079
|
);
|
|
5677
|
-
const updateCookieAndStylesScriptStr =
|
|
6080
|
+
const updateCookieAndStylesScriptStr = createMemo19(() => {
|
|
5678
6081
|
return getUpdateCookieAndStylesScript(
|
|
5679
6082
|
getVariants(props.content).map((value) => ({
|
|
5680
6083
|
id: value.testVariationId,
|
|
@@ -5683,10 +6086,10 @@ function ContentVariants(props) {
|
|
|
5683
6086
|
props.content?.id || ""
|
|
5684
6087
|
);
|
|
5685
6088
|
});
|
|
5686
|
-
const hideVariantsStyleString =
|
|
6089
|
+
const hideVariantsStyleString = createMemo19(() => {
|
|
5687
6090
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
5688
6091
|
});
|
|
5689
|
-
const defaultContent =
|
|
6092
|
+
const defaultContent = createMemo19(() => {
|
|
5690
6093
|
return shouldRenderVariants() ? {
|
|
5691
6094
|
...props.content,
|
|
5692
6095
|
testVariationId: props.content?.id
|
|
@@ -5699,12 +6102,12 @@ function ContentVariants(props) {
|
|
|
5699
6102
|
setShouldRenderVariants(false);
|
|
5700
6103
|
});
|
|
5701
6104
|
return <><>
|
|
5702
|
-
<
|
|
6105
|
+
<Show16 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
5703
6106
|
id="builderio-init-variants-fns"
|
|
5704
6107
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
5705
6108
|
nonce={props.nonce || ""}
|
|
5706
|
-
/></
|
|
5707
|
-
<
|
|
6109
|
+
/></Show16>
|
|
6110
|
+
<Show16 when={shouldRenderVariants()}>
|
|
5708
6111
|
<Inlined_styles_default
|
|
5709
6112
|
id="builderio-variants"
|
|
5710
6113
|
styles={hideVariantsStyleString()}
|
|
@@ -5743,7 +6146,7 @@ function ContentVariants(props) {
|
|
|
5743
6146
|
{...{}}
|
|
5744
6147
|
/>;
|
|
5745
6148
|
}}</For9>
|
|
5746
|
-
</
|
|
6149
|
+
</Show16>
|
|
5747
6150
|
<Content_default
|
|
5748
6151
|
apiHost={props.apiHost}
|
|
5749
6152
|
nonce={props.nonce}
|
|
@@ -5798,14 +6201,14 @@ var fetchSymbolContent = async ({
|
|
|
5798
6201
|
|
|
5799
6202
|
// src/blocks/symbol/symbol.tsx
|
|
5800
6203
|
function Symbol(props) {
|
|
5801
|
-
const [contentToUse, setContentToUse] =
|
|
5802
|
-
const blocksWrapper =
|
|
6204
|
+
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
6205
|
+
const blocksWrapper = createMemo20(() => {
|
|
5803
6206
|
return "div";
|
|
5804
6207
|
});
|
|
5805
|
-
const contentWrapper =
|
|
6208
|
+
const contentWrapper = createMemo20(() => {
|
|
5806
6209
|
return "div";
|
|
5807
6210
|
});
|
|
5808
|
-
const className =
|
|
6211
|
+
const className = createMemo20(() => {
|
|
5809
6212
|
return [
|
|
5810
6213
|
...[props.attributes[getClassPropName()]],
|
|
5811
6214
|
"builder-symbol",
|
|
@@ -5827,7 +6230,7 @@ function Symbol(props) {
|
|
|
5827
6230
|
}
|
|
5828
6231
|
onMount8(() => {
|
|
5829
6232
|
});
|
|
5830
|
-
const onUpdateFn_0_props_symbol =
|
|
6233
|
+
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
5831
6234
|
function onUpdateFn_0() {
|
|
5832
6235
|
setContent();
|
|
5833
6236
|
}
|
|
@@ -5912,6 +6315,7 @@ export {
|
|
|
5912
6315
|
isEditing,
|
|
5913
6316
|
isPreviewing,
|
|
5914
6317
|
register,
|
|
6318
|
+
setClientUserAttributes,
|
|
5915
6319
|
setEditorSettings,
|
|
5916
6320
|
subscribeToEditor,
|
|
5917
6321
|
track
|