@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/index.jsx
CHANGED
|
@@ -1456,8 +1456,9 @@ function BlocksWrapper(props) {
|
|
|
1456
1456
|
if (!props.path) {
|
|
1457
1457
|
return void 0;
|
|
1458
1458
|
}
|
|
1459
|
+
const thisPrefix = "this.";
|
|
1459
1460
|
const pathPrefix = "component.options.";
|
|
1460
|
-
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1461
|
+
return props.path.startsWith(thisPrefix) ? props.path.replace(thisPrefix, "") : props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1461
1462
|
});
|
|
1462
1463
|
function onClick() {
|
|
1463
1464
|
if (isEditing() && !props.blocks?.length) {
|
|
@@ -1492,7 +1493,7 @@ function BlocksWrapper(props) {
|
|
|
1492
1493
|
});
|
|
1493
1494
|
return <>
|
|
1494
1495
|
<Dynamic4
|
|
1495
|
-
class={className() + " dynamic-
|
|
1496
|
+
class={className() + " dynamic-3d7ff108"}
|
|
1496
1497
|
ref={blocksWrapperRef}
|
|
1497
1498
|
builder-path={dataPath()}
|
|
1498
1499
|
builder-parent-id={props.parent}
|
|
@@ -1504,7 +1505,7 @@ function BlocksWrapper(props) {
|
|
|
1504
1505
|
{...props.BlocksWrapperProps}
|
|
1505
1506
|
component={props.BlocksWrapper}
|
|
1506
1507
|
>{props.children}</Dynamic4>
|
|
1507
|
-
<style>{`.dynamic-
|
|
1508
|
+
<style>{`.dynamic-3d7ff108 {
|
|
1508
1509
|
display: flex;
|
|
1509
1510
|
flex-direction: column;
|
|
1510
1511
|
align-items: stretch;
|
|
@@ -1669,7 +1670,7 @@ function Columns(props) {
|
|
|
1669
1670
|
}
|
|
1670
1671
|
return <>
|
|
1671
1672
|
<div
|
|
1672
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1673
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-6331dfc5"}
|
|
1673
1674
|
style={columnsCssVars()}
|
|
1674
1675
|
{...{}}
|
|
1675
1676
|
>
|
|
@@ -1688,17 +1689,17 @@ function Columns(props) {
|
|
|
1688
1689
|
><Blocks_default
|
|
1689
1690
|
path={`columns.${index}.blocks`}
|
|
1690
1691
|
parent={props.builderBlock.id}
|
|
1691
|
-
styleProp={{
|
|
1692
|
-
flexGrow: "1"
|
|
1693
|
-
}}
|
|
1694
1692
|
context={props.builderContext}
|
|
1695
1693
|
registeredComponents={props.builderComponents}
|
|
1696
1694
|
linkComponent={props.builderLinkComponent}
|
|
1697
1695
|
blocks={column.blocks}
|
|
1696
|
+
styleProp={{
|
|
1697
|
+
"flex-grow": "1"
|
|
1698
|
+
}}
|
|
1698
1699
|
/></Dynamic_renderer_default>;
|
|
1699
1700
|
}}</For4>
|
|
1700
1701
|
</div>
|
|
1701
|
-
<style>{`.div-
|
|
1702
|
+
<style>{`.div-6331dfc5 {
|
|
1702
1703
|
display: flex;
|
|
1703
1704
|
line-height: normal;
|
|
1704
1705
|
}`}</style>
|
|
@@ -1713,7 +1714,7 @@ function FragmentComponent(props) {
|
|
|
1713
1714
|
var fragment_default = FragmentComponent;
|
|
1714
1715
|
|
|
1715
1716
|
// src/blocks/image/image.tsx
|
|
1716
|
-
import { Show as Show8,
|
|
1717
|
+
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
1717
1718
|
|
|
1718
1719
|
// src/blocks/image/image.helpers.ts
|
|
1719
1720
|
function removeProtocol(path) {
|
|
@@ -1802,14 +1803,12 @@ function Image(props) {
|
|
|
1802
1803
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1803
1804
|
return out;
|
|
1804
1805
|
});
|
|
1805
|
-
onMount4(() => {
|
|
1806
|
-
});
|
|
1807
1806
|
return <>
|
|
1808
1807
|
<>
|
|
1809
1808
|
<picture>
|
|
1810
1809
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
1811
1810
|
<img
|
|
1812
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
1811
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-dc6700b4"}
|
|
1813
1812
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
1814
1813
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1815
1814
|
alt={props.altText}
|
|
@@ -1827,22 +1826,22 @@ function Image(props) {
|
|
|
1827
1826
|
<Show8
|
|
1828
1827
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
1829
1828
|
><div
|
|
1830
|
-
class="builder-image-sizer div-
|
|
1829
|
+
class="builder-image-sizer div-dc6700b4"
|
|
1831
1830
|
style={{
|
|
1832
1831
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
1833
1832
|
}}
|
|
1834
1833
|
/></Show8>
|
|
1835
1834
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
1836
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
1835
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-dc6700b4-2">{props.children}</div></Show8>
|
|
1837
1836
|
</>
|
|
1838
|
-
<style>{`.img-
|
|
1837
|
+
<style>{`.img-dc6700b4 {
|
|
1839
1838
|
opacity: 1;
|
|
1840
1839
|
transition: opacity 0.2s ease-in-out;
|
|
1841
|
-
}.div-
|
|
1840
|
+
}.div-dc6700b4 {
|
|
1842
1841
|
width: 100%;
|
|
1843
1842
|
pointer-events: none;
|
|
1844
1843
|
font-size: 0;
|
|
1845
|
-
}.div-
|
|
1844
|
+
}.div-dc6700b4-2 {
|
|
1846
1845
|
display: flex;
|
|
1847
1846
|
flex-direction: column;
|
|
1848
1847
|
align-items: stretch;
|
|
@@ -1878,10 +1877,10 @@ function SectionComponent(props) {
|
|
|
1878
1877
|
var section_default = SectionComponent;
|
|
1879
1878
|
|
|
1880
1879
|
// src/blocks/symbol/symbol.tsx
|
|
1881
|
-
import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as
|
|
1880
|
+
import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
1882
1881
|
|
|
1883
1882
|
// src/components/content-variants/content-variants.tsx
|
|
1884
|
-
import { Show as
|
|
1883
|
+
import { Show as Show16, For as For9, onMount as onMount7, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
1885
1884
|
|
|
1886
1885
|
// src/helpers/url.ts
|
|
1887
1886
|
var getTopLevelDomain = (host) => {
|
|
@@ -2071,11 +2070,61 @@ var handleABTesting = async ({
|
|
|
2071
2070
|
};
|
|
2072
2071
|
};
|
|
2073
2072
|
|
|
2073
|
+
// src/helpers/user-attributes.ts
|
|
2074
|
+
var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
|
|
2075
|
+
function createUserAttributesService() {
|
|
2076
|
+
let canTrack = true;
|
|
2077
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
2078
|
+
return {
|
|
2079
|
+
setUserAttributes(newAttrs) {
|
|
2080
|
+
if (!isBrowser()) {
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
const userAttributes = {
|
|
2084
|
+
...this.getUserAttributes(),
|
|
2085
|
+
...newAttrs
|
|
2086
|
+
};
|
|
2087
|
+
setCookie({
|
|
2088
|
+
name: USER_ATTRIBUTES_COOKIE_NAME,
|
|
2089
|
+
value: JSON.stringify(userAttributes),
|
|
2090
|
+
canTrack
|
|
2091
|
+
});
|
|
2092
|
+
subscribers.forEach((callback) => callback(userAttributes));
|
|
2093
|
+
},
|
|
2094
|
+
getUserAttributes() {
|
|
2095
|
+
if (!isBrowser()) {
|
|
2096
|
+
return {};
|
|
2097
|
+
}
|
|
2098
|
+
return JSON.parse(getCookieSync({
|
|
2099
|
+
name: USER_ATTRIBUTES_COOKIE_NAME,
|
|
2100
|
+
canTrack
|
|
2101
|
+
}) || "{}");
|
|
2102
|
+
},
|
|
2103
|
+
subscribeOnUserAttributesChange(callback) {
|
|
2104
|
+
subscribers.add(callback);
|
|
2105
|
+
return () => {
|
|
2106
|
+
subscribers.delete(callback);
|
|
2107
|
+
};
|
|
2108
|
+
},
|
|
2109
|
+
setCanTrack(value) {
|
|
2110
|
+
canTrack = value;
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
var userAttributesService = createUserAttributesService();
|
|
2115
|
+
var setClientUserAttributes = (attributes) => {
|
|
2116
|
+
userAttributesService.setUserAttributes(attributes);
|
|
2117
|
+
};
|
|
2118
|
+
|
|
2074
2119
|
// src/helpers/canTrack.ts
|
|
2075
|
-
var getDefaultCanTrack = (canTrack) =>
|
|
2120
|
+
var getDefaultCanTrack = (canTrack) => {
|
|
2121
|
+
const result = checkIsDefined(canTrack) ? canTrack : true;
|
|
2122
|
+
userAttributesService.setCanTrack(result);
|
|
2123
|
+
return result;
|
|
2124
|
+
};
|
|
2076
2125
|
|
|
2077
2126
|
// src/components/content/content.tsx
|
|
2078
|
-
import { Show as
|
|
2127
|
+
import { Show as Show15, createSignal as createSignal18 } from "solid-js";
|
|
2079
2128
|
|
|
2080
2129
|
// src/blocks/accordion/component-info.ts
|
|
2081
2130
|
var defaultTitle = {
|
|
@@ -2769,8 +2818,388 @@ var componentInfo5 = {
|
|
|
2769
2818
|
}
|
|
2770
2819
|
};
|
|
2771
2820
|
|
|
2772
|
-
// src/blocks/
|
|
2821
|
+
// src/blocks/personalization-container/component-info.ts
|
|
2773
2822
|
var componentInfo6 = {
|
|
2823
|
+
name: "PersonalizationContainer",
|
|
2824
|
+
shouldReceiveBuilderProps: {
|
|
2825
|
+
builderBlock: true,
|
|
2826
|
+
builderContext: true
|
|
2827
|
+
},
|
|
2828
|
+
noWrap: true,
|
|
2829
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
|
|
2830
|
+
canHaveChildren: true,
|
|
2831
|
+
inputs: [{
|
|
2832
|
+
name: "variants",
|
|
2833
|
+
defaultValue: [],
|
|
2834
|
+
behavior: "personalizationVariantList",
|
|
2835
|
+
type: "list",
|
|
2836
|
+
subFields: [{
|
|
2837
|
+
name: "name",
|
|
2838
|
+
type: "text"
|
|
2839
|
+
}, {
|
|
2840
|
+
name: "query",
|
|
2841
|
+
friendlyName: "Targeting rules",
|
|
2842
|
+
type: "BuilderQuery",
|
|
2843
|
+
defaultValue: []
|
|
2844
|
+
}, {
|
|
2845
|
+
name: "startDate",
|
|
2846
|
+
type: "date"
|
|
2847
|
+
}, {
|
|
2848
|
+
name: "endDate",
|
|
2849
|
+
type: "date"
|
|
2850
|
+
}, {
|
|
2851
|
+
name: "blocks",
|
|
2852
|
+
type: "uiBlocks",
|
|
2853
|
+
hideFromUI: true,
|
|
2854
|
+
defaultValue: []
|
|
2855
|
+
}]
|
|
2856
|
+
}]
|
|
2857
|
+
};
|
|
2858
|
+
|
|
2859
|
+
// src/blocks/personalization-container/personalization-container.tsx
|
|
2860
|
+
import { Show as Show10, For as For6, onMount as onMount4, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
2861
|
+
|
|
2862
|
+
// src/components/inlined-script.tsx
|
|
2863
|
+
function InlinedScript(props) {
|
|
2864
|
+
return <><script
|
|
2865
|
+
innerHTML={props.scriptStr}
|
|
2866
|
+
data-id={props.id}
|
|
2867
|
+
nonce={props.nonce || ""}
|
|
2868
|
+
/></>;
|
|
2869
|
+
}
|
|
2870
|
+
var Inlined_script_default = InlinedScript;
|
|
2871
|
+
|
|
2872
|
+
// src/functions/is-previewing.ts
|
|
2873
|
+
function isPreviewing(_search) {
|
|
2874
|
+
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
2875
|
+
if (!search) {
|
|
2876
|
+
return false;
|
|
2877
|
+
}
|
|
2878
|
+
const normalizedSearch = getSearchString(search);
|
|
2879
|
+
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// src/blocks/personalization-container/helpers/inlined-fns.ts
|
|
2883
|
+
function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
2884
|
+
function isString(val) {
|
|
2885
|
+
return typeof val === "string";
|
|
2886
|
+
}
|
|
2887
|
+
function isNumber(val) {
|
|
2888
|
+
return typeof val === "number";
|
|
2889
|
+
}
|
|
2890
|
+
function objectMatchesQuery(userattr, query2) {
|
|
2891
|
+
const result = (() => {
|
|
2892
|
+
const property = query2.property;
|
|
2893
|
+
const operator = query2.operator;
|
|
2894
|
+
let testValue = query2.value;
|
|
2895
|
+
if (query2 && query2.property === "urlPath" && query2.value && typeof query2.value === "string" && query2.value !== "/" && query2.value.endsWith("/")) {
|
|
2896
|
+
testValue = query2.value.slice(0, -1);
|
|
2897
|
+
}
|
|
2898
|
+
if (!(property && operator)) {
|
|
2899
|
+
return true;
|
|
2900
|
+
}
|
|
2901
|
+
if (Array.isArray(testValue)) {
|
|
2902
|
+
if (operator === "isNot") {
|
|
2903
|
+
return testValue.every((val) => objectMatchesQuery(userattr, {
|
|
2904
|
+
property,
|
|
2905
|
+
operator,
|
|
2906
|
+
value: val
|
|
2907
|
+
}));
|
|
2908
|
+
}
|
|
2909
|
+
return !!testValue.find((val) => objectMatchesQuery(userattr, {
|
|
2910
|
+
property,
|
|
2911
|
+
operator,
|
|
2912
|
+
value: val
|
|
2913
|
+
}));
|
|
2914
|
+
}
|
|
2915
|
+
const value = userattr[property];
|
|
2916
|
+
if (Array.isArray(value)) {
|
|
2917
|
+
return value.includes(testValue);
|
|
2918
|
+
}
|
|
2919
|
+
switch (operator) {
|
|
2920
|
+
case "is":
|
|
2921
|
+
return value === testValue;
|
|
2922
|
+
case "isNot":
|
|
2923
|
+
return value !== testValue;
|
|
2924
|
+
case "contains":
|
|
2925
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
2926
|
+
case "startsWith":
|
|
2927
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
2928
|
+
case "endsWith":
|
|
2929
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
2930
|
+
case "greaterThan":
|
|
2931
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
2932
|
+
case "lessThan":
|
|
2933
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
2934
|
+
case "greaterThanOrEqualTo":
|
|
2935
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
2936
|
+
case "lessThanOrEqualTo":
|
|
2937
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
2938
|
+
default:
|
|
2939
|
+
return false;
|
|
2940
|
+
}
|
|
2941
|
+
})();
|
|
2942
|
+
return result;
|
|
2943
|
+
}
|
|
2944
|
+
const item = {
|
|
2945
|
+
query,
|
|
2946
|
+
startDate,
|
|
2947
|
+
endDate
|
|
2948
|
+
};
|
|
2949
|
+
const now = userAttributes.date && new Date(userAttributes.date) || /* @__PURE__ */ new Date();
|
|
2950
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
2951
|
+
return false;
|
|
2952
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
2953
|
+
return false;
|
|
2954
|
+
}
|
|
2955
|
+
if (!item.query || !item.query.length) {
|
|
2956
|
+
return true;
|
|
2957
|
+
}
|
|
2958
|
+
return item.query.every((filter) => {
|
|
2959
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
2960
|
+
});
|
|
2961
|
+
}
|
|
2962
|
+
var PERSONALIZATION_SCRIPT = `function getPersonalizedVariant(variants, blockId, locale) {
|
|
2963
|
+
if (!navigator.cookieEnabled) {
|
|
2964
|
+
return;
|
|
2965
|
+
}
|
|
2966
|
+
function getCookie(name) {
|
|
2967
|
+
const nameEQ = name + '=';
|
|
2968
|
+
const ca = document.cookie.split(';');
|
|
2969
|
+
for (let i = 0; i < ca.length; i++) {
|
|
2970
|
+
let c = ca[i];
|
|
2971
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
2972
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
2973
|
+
}
|
|
2974
|
+
return null;
|
|
2975
|
+
}
|
|
2976
|
+
function removeVariants() {
|
|
2977
|
+
variants?.forEach(function (_, index) {
|
|
2978
|
+
document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
|
|
2979
|
+
});
|
|
2980
|
+
document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
|
|
2981
|
+
document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
|
|
2982
|
+
}
|
|
2983
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
2984
|
+
if (locale) {
|
|
2985
|
+
attributes.locale = locale;
|
|
2986
|
+
}
|
|
2987
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
2988
|
+
return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
2989
|
+
});
|
|
2990
|
+
const isDebug = location.href.includes('builder.debug=true');
|
|
2991
|
+
if (isDebug) {
|
|
2992
|
+
console.debug('PersonalizationContainer', {
|
|
2993
|
+
attributes,
|
|
2994
|
+
variants,
|
|
2995
|
+
winningVariantIndex
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
if (winningVariantIndex !== -1) {
|
|
2999
|
+
const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
|
|
3000
|
+
if (winningVariant) {
|
|
3001
|
+
const parentNode = winningVariant.parentNode;
|
|
3002
|
+
if (parentNode) {
|
|
3003
|
+
const newParent = parentNode.cloneNode(false);
|
|
3004
|
+
newParent.appendChild(winningVariant.content.firstChild);
|
|
3005
|
+
newParent.appendChild(winningVariant.content.lastChild);
|
|
3006
|
+
parentNode.parentNode?.replaceChild(newParent, parentNode);
|
|
3007
|
+
}
|
|
3008
|
+
if (isDebug) {
|
|
3009
|
+
console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
} else if (variants && variants.length > 0) {
|
|
3013
|
+
removeVariants();
|
|
3014
|
+
}
|
|
3015
|
+
}`;
|
|
3016
|
+
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}";
|
|
3017
|
+
|
|
3018
|
+
// src/blocks/personalization-container/helpers.ts
|
|
3019
|
+
function checkShouldRenderVariants(variants, canTrack) {
|
|
3020
|
+
const hasVariants = variants && variants.length > 0;
|
|
3021
|
+
if (TARGET === "reactNative")
|
|
3022
|
+
return false;
|
|
3023
|
+
if (!hasVariants)
|
|
3024
|
+
return false;
|
|
3025
|
+
if (!canTrack)
|
|
3026
|
+
return false;
|
|
3027
|
+
if (TARGET === "vue" || TARGET === "svelte")
|
|
3028
|
+
return true;
|
|
3029
|
+
if (isBrowser())
|
|
3030
|
+
return false;
|
|
3031
|
+
return true;
|
|
3032
|
+
}
|
|
3033
|
+
function getBlocksToRender({
|
|
3034
|
+
variants,
|
|
3035
|
+
previewingIndex,
|
|
3036
|
+
isHydrated,
|
|
3037
|
+
filteredVariants,
|
|
3038
|
+
fallbackBlocks
|
|
3039
|
+
}) {
|
|
3040
|
+
const fallback = {
|
|
3041
|
+
blocks: fallbackBlocks ?? [],
|
|
3042
|
+
path: "this.children"
|
|
3043
|
+
};
|
|
3044
|
+
if (isHydrated && isEditing()) {
|
|
3045
|
+
if (typeof previewingIndex === "number" && previewingIndex < (variants?.length ?? 0)) {
|
|
3046
|
+
const variant = variants[previewingIndex];
|
|
3047
|
+
return {
|
|
3048
|
+
blocks: variant.blocks,
|
|
3049
|
+
path: `component.options.variants.${previewingIndex}.blocks`
|
|
3050
|
+
};
|
|
3051
|
+
}
|
|
3052
|
+
return fallback;
|
|
3053
|
+
}
|
|
3054
|
+
if (isBrowser()) {
|
|
3055
|
+
const winningVariant = filteredVariants?.[0];
|
|
3056
|
+
if (winningVariant) {
|
|
3057
|
+
return {
|
|
3058
|
+
blocks: winningVariant.blocks,
|
|
3059
|
+
path: `component.options.variants.${variants?.indexOf(winningVariant)}.blocks`
|
|
3060
|
+
};
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
return fallback;
|
|
3064
|
+
}
|
|
3065
|
+
var getPersonalizationScript = (variants, blockId, locale) => {
|
|
3066
|
+
return `
|
|
3067
|
+
(function() {
|
|
3068
|
+
${FILTER_WITH_CUSTOM_TARGETING_SCRIPT}
|
|
3069
|
+
${PERSONALIZATION_SCRIPT}
|
|
3070
|
+
getPersonalizedVariant(${JSON.stringify(variants)}, "${blockId}"${locale ? `, "${locale}"` : ""})
|
|
3071
|
+
})();
|
|
3072
|
+
`;
|
|
3073
|
+
};
|
|
3074
|
+
|
|
3075
|
+
// src/blocks/personalization-container/personalization-container.tsx
|
|
3076
|
+
function PersonalizationContainer(props) {
|
|
3077
|
+
const [userAttributes, setUserAttributes] = createSignal10(
|
|
3078
|
+
userAttributesService.getUserAttributes()
|
|
3079
|
+
);
|
|
3080
|
+
const [scriptStr, setScriptStr] = createSignal10(
|
|
3081
|
+
getPersonalizationScript(
|
|
3082
|
+
props.variants,
|
|
3083
|
+
props.builderBlock?.id || "none",
|
|
3084
|
+
props.builderContext?.rootState?.locale
|
|
3085
|
+
)
|
|
3086
|
+
);
|
|
3087
|
+
const [unsubscribers, setUnsubscribers] = createSignal10([]);
|
|
3088
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal10(
|
|
3089
|
+
checkShouldRenderVariants(
|
|
3090
|
+
props.variants,
|
|
3091
|
+
getDefaultCanTrack(props.builderContext?.canTrack)
|
|
3092
|
+
)
|
|
3093
|
+
);
|
|
3094
|
+
const [isHydrated, setIsHydrated] = createSignal10(false);
|
|
3095
|
+
const filteredVariants = createMemo10(() => {
|
|
3096
|
+
return (props.variants || []).filter((variant) => {
|
|
3097
|
+
return filterWithCustomTargeting(
|
|
3098
|
+
{
|
|
3099
|
+
...props.builderContext?.rootState?.locale ? {
|
|
3100
|
+
locale: props.builderContext?.rootState?.locale
|
|
3101
|
+
} : {},
|
|
3102
|
+
...userAttributes()
|
|
3103
|
+
},
|
|
3104
|
+
variant.query,
|
|
3105
|
+
variant.startDate,
|
|
3106
|
+
variant.endDate
|
|
3107
|
+
);
|
|
3108
|
+
});
|
|
3109
|
+
});
|
|
3110
|
+
const blocksToRender = createMemo10(() => {
|
|
3111
|
+
return getBlocksToRender({
|
|
3112
|
+
variants: props.variants,
|
|
3113
|
+
fallbackBlocks: props.builderBlock?.children,
|
|
3114
|
+
isHydrated: isHydrated(),
|
|
3115
|
+
filteredVariants: filteredVariants(),
|
|
3116
|
+
previewingIndex: props.previewingIndex
|
|
3117
|
+
});
|
|
3118
|
+
});
|
|
3119
|
+
const hideVariantsStyleString = createMemo10(() => {
|
|
3120
|
+
return (props.variants || []).map(
|
|
3121
|
+
(_, index) => `[data-variant-id="${props.builderBlock?.id}-${index}"] { display: none; } `
|
|
3122
|
+
).join("");
|
|
3123
|
+
});
|
|
3124
|
+
let rootRef;
|
|
3125
|
+
onMount4(() => {
|
|
3126
|
+
setIsHydrated(true);
|
|
3127
|
+
const unsub = userAttributesService.subscribeOnUserAttributesChange(
|
|
3128
|
+
(attrs) => {
|
|
3129
|
+
setUserAttributes(attrs);
|
|
3130
|
+
}
|
|
3131
|
+
);
|
|
3132
|
+
if (!(isEditing() || isPreviewing())) {
|
|
3133
|
+
const variant = filteredVariants()[0];
|
|
3134
|
+
if (rootRef) {
|
|
3135
|
+
rootRef.dispatchEvent(
|
|
3136
|
+
new CustomEvent("builder.variantLoaded", {
|
|
3137
|
+
detail: {
|
|
3138
|
+
variant: variant || "default",
|
|
3139
|
+
content: props.builderContext?.content
|
|
3140
|
+
},
|
|
3141
|
+
bubbles: true
|
|
3142
|
+
})
|
|
3143
|
+
);
|
|
3144
|
+
const observer = new IntersectionObserver((entries) => {
|
|
3145
|
+
entries.forEach((entry) => {
|
|
3146
|
+
if (entry.isIntersecting && rootRef) {
|
|
3147
|
+
rootRef.dispatchEvent(
|
|
3148
|
+
new CustomEvent("builder.variantDisplayed", {
|
|
3149
|
+
detail: {
|
|
3150
|
+
variant: variant || "default",
|
|
3151
|
+
content: props.builderContext?.content
|
|
3152
|
+
},
|
|
3153
|
+
bubbles: true
|
|
3154
|
+
})
|
|
3155
|
+
);
|
|
3156
|
+
}
|
|
3157
|
+
});
|
|
3158
|
+
});
|
|
3159
|
+
observer.observe(rootRef);
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
unsubscribers().push(unsub);
|
|
3163
|
+
});
|
|
3164
|
+
return <><div
|
|
3165
|
+
class={`builder-personalization-container ${props.attributes?.className || ""}`}
|
|
3166
|
+
ref={rootRef}
|
|
3167
|
+
{...props.attributes}
|
|
3168
|
+
>
|
|
3169
|
+
<Show10 when={shouldRenderVariants()}>
|
|
3170
|
+
<For6 each={props.variants}>{(variant, _index) => {
|
|
3171
|
+
const index = _index();
|
|
3172
|
+
return <template
|
|
3173
|
+
key={index}
|
|
3174
|
+
data-variant-id={`${props.builderBlock?.id}-${index}`}
|
|
3175
|
+
><Blocks_default
|
|
3176
|
+
blocks={variant.blocks}
|
|
3177
|
+
parent={props.builderBlock?.id}
|
|
3178
|
+
path={`component.options.variants.${index}.blocks`}
|
|
3179
|
+
/></template>;
|
|
3180
|
+
}}</For6>
|
|
3181
|
+
<Inlined_styles_default
|
|
3182
|
+
nonce={props.builderContext?.nonce || ""}
|
|
3183
|
+
styles={hideVariantsStyleString()}
|
|
3184
|
+
id={`variants-styles-${props.builderBlock?.id}`}
|
|
3185
|
+
/>
|
|
3186
|
+
<Inlined_script_default
|
|
3187
|
+
nonce={props.builderContext?.nonce || ""}
|
|
3188
|
+
scriptStr={scriptStr()}
|
|
3189
|
+
id={`variants-script-${props.builderBlock?.id}`}
|
|
3190
|
+
/>
|
|
3191
|
+
</Show10>
|
|
3192
|
+
<Blocks_default
|
|
3193
|
+
blocks={blocksToRender().blocks}
|
|
3194
|
+
parent={props.builderBlock?.id}
|
|
3195
|
+
path={blocksToRender().path}
|
|
3196
|
+
/>
|
|
3197
|
+
</div></>;
|
|
3198
|
+
}
|
|
3199
|
+
var personalization_container_default = PersonalizationContainer;
|
|
3200
|
+
|
|
3201
|
+
// src/blocks/section/component-info.ts
|
|
3202
|
+
var componentInfo7 = {
|
|
2774
3203
|
name: "Core:Section",
|
|
2775
3204
|
static: true,
|
|
2776
3205
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2812,7 +3241,7 @@ var componentInfo6 = {
|
|
|
2812
3241
|
};
|
|
2813
3242
|
|
|
2814
3243
|
// src/blocks/slot/component-info.ts
|
|
2815
|
-
var
|
|
3244
|
+
var componentInfo8 = {
|
|
2816
3245
|
name: "Slot",
|
|
2817
3246
|
isRSC: true,
|
|
2818
3247
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2851,7 +3280,7 @@ function Slot(props) {
|
|
|
2851
3280
|
var slot_default = Slot;
|
|
2852
3281
|
|
|
2853
3282
|
// src/blocks/symbol/component-info.ts
|
|
2854
|
-
var
|
|
3283
|
+
var componentInfo9 = {
|
|
2855
3284
|
name: "Symbol",
|
|
2856
3285
|
noWrap: true,
|
|
2857
3286
|
static: true,
|
|
@@ -2933,7 +3362,7 @@ var defaultElement = {
|
|
|
2933
3362
|
}
|
|
2934
3363
|
}
|
|
2935
3364
|
};
|
|
2936
|
-
var
|
|
3365
|
+
var componentInfo10 = {
|
|
2937
3366
|
name: "Builder: Tabs",
|
|
2938
3367
|
inputs: [{
|
|
2939
3368
|
name: "tabs",
|
|
@@ -3039,9 +3468,9 @@ var componentInfo9 = {
|
|
|
3039
3468
|
};
|
|
3040
3469
|
|
|
3041
3470
|
// src/blocks/tabs/tabs.tsx
|
|
3042
|
-
import { Show as
|
|
3471
|
+
import { Show as Show11, For as For7, createSignal as createSignal11 } from "solid-js";
|
|
3043
3472
|
function Tabs(props) {
|
|
3044
|
-
const [activeTab, setActiveTab] =
|
|
3473
|
+
const [activeTab, setActiveTab] = createSignal11(
|
|
3045
3474
|
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
3046
3475
|
);
|
|
3047
3476
|
function activeTabContent(active) {
|
|
@@ -3063,7 +3492,7 @@ function Tabs(props) {
|
|
|
3063
3492
|
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
3064
3493
|
overflow: "auto"
|
|
3065
3494
|
}}
|
|
3066
|
-
><
|
|
3495
|
+
><For7 each={props.tabs}>{(tab, _index) => {
|
|
3067
3496
|
const index = _index();
|
|
3068
3497
|
return <span
|
|
3069
3498
|
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
@@ -3080,21 +3509,21 @@ function Tabs(props) {
|
|
|
3080
3509
|
registeredComponents={props.builderComponents}
|
|
3081
3510
|
linkComponent={props.builderLinkComponent}
|
|
3082
3511
|
/></span>;
|
|
3083
|
-
}}</
|
|
3084
|
-
<
|
|
3512
|
+
}}</For7></div>
|
|
3513
|
+
<Show11 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
3085
3514
|
parent={props.builderBlock.id}
|
|
3086
3515
|
path={`tabs.${activeTab()}.content`}
|
|
3087
3516
|
blocks={activeTabContent(activeTab())}
|
|
3088
3517
|
context={props.builderContext}
|
|
3089
3518
|
registeredComponents={props.builderComponents}
|
|
3090
3519
|
linkComponent={props.builderLinkComponent}
|
|
3091
|
-
/></div></
|
|
3520
|
+
/></div></Show11>
|
|
3092
3521
|
</div></>;
|
|
3093
3522
|
}
|
|
3094
3523
|
var tabs_default = Tabs;
|
|
3095
3524
|
|
|
3096
3525
|
// src/blocks/text/component-info.ts
|
|
3097
|
-
var
|
|
3526
|
+
var componentInfo11 = {
|
|
3098
3527
|
shouldReceiveBuilderProps: {
|
|
3099
3528
|
builderBlock: TARGET === "reactNative" ? true : false,
|
|
3100
3529
|
builderContext: true
|
|
@@ -3131,7 +3560,7 @@ function Text(props) {
|
|
|
3131
3560
|
var text_default = Text;
|
|
3132
3561
|
|
|
3133
3562
|
// src/blocks/custom-code/component-info.ts
|
|
3134
|
-
var
|
|
3563
|
+
var componentInfo12 = {
|
|
3135
3564
|
name: "Custom Code",
|
|
3136
3565
|
static: true,
|
|
3137
3566
|
requiredPermissions: ["editCode"],
|
|
@@ -3156,10 +3585,10 @@ var componentInfo11 = {
|
|
|
3156
3585
|
};
|
|
3157
3586
|
|
|
3158
3587
|
// src/blocks/custom-code/custom-code.tsx
|
|
3159
|
-
import { onMount as onMount5, createSignal as
|
|
3588
|
+
import { onMount as onMount5, createSignal as createSignal12 } from "solid-js";
|
|
3160
3589
|
function CustomCode(props) {
|
|
3161
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
3162
|
-
const [scriptsRun, setScriptsRun] =
|
|
3590
|
+
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
3591
|
+
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
3163
3592
|
let elementRef;
|
|
3164
3593
|
onMount5(() => {
|
|
3165
3594
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -3202,7 +3631,7 @@ function CustomCode(props) {
|
|
|
3202
3631
|
var custom_code_default = CustomCode;
|
|
3203
3632
|
|
|
3204
3633
|
// src/blocks/embed/component-info.ts
|
|
3205
|
-
var
|
|
3634
|
+
var componentInfo13 = {
|
|
3206
3635
|
name: "Embed",
|
|
3207
3636
|
static: true,
|
|
3208
3637
|
inputs: [{
|
|
@@ -3220,7 +3649,7 @@ var componentInfo12 = {
|
|
|
3220
3649
|
};
|
|
3221
3650
|
|
|
3222
3651
|
// src/blocks/embed/embed.tsx
|
|
3223
|
-
import { on as on2, createEffect as createEffect2, createMemo as
|
|
3652
|
+
import { on as on2, createEffect as createEffect2, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
3224
3653
|
|
|
3225
3654
|
// src/blocks/embed/helpers.ts
|
|
3226
3655
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -3228,9 +3657,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
3228
3657
|
|
|
3229
3658
|
// src/blocks/embed/embed.tsx
|
|
3230
3659
|
function Embed(props) {
|
|
3231
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
3232
|
-
const [scriptsRun, setScriptsRun] =
|
|
3233
|
-
const [ranInitFn, setRanInitFn] =
|
|
3660
|
+
const [scriptsInserted, setScriptsInserted] = createSignal13([]);
|
|
3661
|
+
const [scriptsRun, setScriptsRun] = createSignal13([]);
|
|
3662
|
+
const [ranInitFn, setRanInitFn] = createSignal13(false);
|
|
3234
3663
|
function findAndRunScripts() {
|
|
3235
3664
|
if (!elem || !elem.getElementsByTagName)
|
|
3236
3665
|
return;
|
|
@@ -3253,8 +3682,8 @@ function Embed(props) {
|
|
|
3253
3682
|
}
|
|
3254
3683
|
}
|
|
3255
3684
|
let elem;
|
|
3256
|
-
const onUpdateFn_0_elem =
|
|
3257
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
3685
|
+
const onUpdateFn_0_elem = createMemo13(() => elem);
|
|
3686
|
+
const onUpdateFn_0_ranInitFn__ = createMemo13(() => ranInitFn());
|
|
3258
3687
|
function onUpdateFn_0() {
|
|
3259
3688
|
if (elem && !ranInitFn()) {
|
|
3260
3689
|
setRanInitFn(true);
|
|
@@ -3269,7 +3698,7 @@ function Embed(props) {
|
|
|
3269
3698
|
var embed_default = Embed;
|
|
3270
3699
|
|
|
3271
3700
|
// src/blocks/form/form/component-info.ts
|
|
3272
|
-
var
|
|
3701
|
+
var componentInfo14 = {
|
|
3273
3702
|
name: "Form:Form",
|
|
3274
3703
|
// editableTags: ['builder-form-error']
|
|
3275
3704
|
defaults: {
|
|
@@ -3509,7 +3938,7 @@ var componentInfo13 = {
|
|
|
3509
3938
|
};
|
|
3510
3939
|
|
|
3511
3940
|
// src/blocks/form/form/form.tsx
|
|
3512
|
-
import { Show as
|
|
3941
|
+
import { Show as Show12, createSignal as createSignal14 } from "solid-js";
|
|
3513
3942
|
|
|
3514
3943
|
// src/functions/get-env.ts
|
|
3515
3944
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -3529,9 +3958,9 @@ function logFetch(url) {
|
|
|
3529
3958
|
|
|
3530
3959
|
// src/blocks/form/form/form.tsx
|
|
3531
3960
|
function FormComponent(props) {
|
|
3532
|
-
const [formState, setFormState] =
|
|
3533
|
-
const [responseData, setResponseData] =
|
|
3534
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
3961
|
+
const [formState, setFormState] = createSignal14("unsubmitted");
|
|
3962
|
+
const [responseData, setResponseData] = createSignal14(null);
|
|
3963
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal14("");
|
|
3535
3964
|
function mergeNewRootState(newData) {
|
|
3536
3965
|
const combinedState = {
|
|
3537
3966
|
...props.builderContext.rootState,
|
|
@@ -3726,34 +4155,25 @@ function FormComponent(props) {
|
|
|
3726
4155
|
{...{}}
|
|
3727
4156
|
{...props.attributes}
|
|
3728
4157
|
>
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
return <Block_default
|
|
3732
|
-
key={`form-block-${idx}`}
|
|
3733
|
-
block={block}
|
|
3734
|
-
context={props.builderContext}
|
|
3735
|
-
registeredComponents={props.builderComponents}
|
|
3736
|
-
linkComponent={props.builderLinkComponent}
|
|
3737
|
-
/>;
|
|
3738
|
-
}}</For7></Show11>
|
|
3739
|
-
<Show11 when={submissionState() === "error"}><Blocks_default
|
|
4158
|
+
{props.children}
|
|
4159
|
+
<Show12 when={submissionState() === "error"}><Blocks_default
|
|
3740
4160
|
path="errorMessage"
|
|
3741
4161
|
blocks={props.errorMessage}
|
|
3742
4162
|
context={props.builderContext}
|
|
3743
|
-
/></
|
|
3744
|
-
<
|
|
4163
|
+
/></Show12>
|
|
4164
|
+
<Show12 when={submissionState() === "sending"}><Blocks_default
|
|
3745
4165
|
path="sendingMessage"
|
|
3746
4166
|
blocks={props.sendingMessage}
|
|
3747
4167
|
context={props.builderContext}
|
|
3748
|
-
/></
|
|
3749
|
-
<
|
|
3750
|
-
<
|
|
4168
|
+
/></Show12>
|
|
4169
|
+
<Show12 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-04a43b72">{JSON.stringify(responseData(), null, 2)}</pre></Show12>
|
|
4170
|
+
<Show12 when={submissionState() === "success"}><Blocks_default
|
|
3751
4171
|
path="successMessage"
|
|
3752
4172
|
blocks={props.successMessage}
|
|
3753
4173
|
context={props.builderContext}
|
|
3754
|
-
/></
|
|
4174
|
+
/></Show12>
|
|
3755
4175
|
</form>
|
|
3756
|
-
<style>{`.pre-
|
|
4176
|
+
<style>{`.pre-04a43b72 {
|
|
3757
4177
|
padding: 10px;
|
|
3758
4178
|
color: red;
|
|
3759
4179
|
text-align: center;
|
|
@@ -3763,7 +4183,7 @@ function FormComponent(props) {
|
|
|
3763
4183
|
var form_default = FormComponent;
|
|
3764
4184
|
|
|
3765
4185
|
// src/blocks/form/input/component-info.ts
|
|
3766
|
-
var
|
|
4186
|
+
var componentInfo15 = {
|
|
3767
4187
|
name: "Form:Input",
|
|
3768
4188
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
3769
4189
|
inputs: [
|
|
@@ -3833,7 +4253,7 @@ function FormInputComponent(props) {
|
|
|
3833
4253
|
var input_default = FormInputComponent;
|
|
3834
4254
|
|
|
3835
4255
|
// src/blocks/form/select/component-info.ts
|
|
3836
|
-
var
|
|
4256
|
+
var componentInfo16 = {
|
|
3837
4257
|
name: "Form:Select",
|
|
3838
4258
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
3839
4259
|
defaultStyles: {
|
|
@@ -3896,7 +4316,7 @@ function SelectComponent(props) {
|
|
|
3896
4316
|
var select_default = SelectComponent;
|
|
3897
4317
|
|
|
3898
4318
|
// src/blocks/form/submit-button/component-info.ts
|
|
3899
|
-
var
|
|
4319
|
+
var componentInfo17 = {
|
|
3900
4320
|
name: "Form:SubmitButton",
|
|
3901
4321
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
3902
4322
|
defaultStyles: {
|
|
@@ -3930,7 +4350,7 @@ function SubmitButton(props) {
|
|
|
3930
4350
|
var submit_button_default = SubmitButton;
|
|
3931
4351
|
|
|
3932
4352
|
// src/blocks/form/textarea/component-info.ts
|
|
3933
|
-
var
|
|
4353
|
+
var componentInfo18 = {
|
|
3934
4354
|
name: "Form:TextArea",
|
|
3935
4355
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3936
4356
|
inputs: [{
|
|
@@ -3983,7 +4403,7 @@ function Textarea(props) {
|
|
|
3983
4403
|
var textarea_default = Textarea;
|
|
3984
4404
|
|
|
3985
4405
|
// src/blocks/img/component-info.ts
|
|
3986
|
-
var
|
|
4406
|
+
var componentInfo19 = {
|
|
3987
4407
|
// friendlyName?
|
|
3988
4408
|
name: "Raw:Img",
|
|
3989
4409
|
hideFromInsertMenu: true,
|
|
@@ -4016,7 +4436,7 @@ function ImgComponent(props) {
|
|
|
4016
4436
|
var img_default = ImgComponent;
|
|
4017
4437
|
|
|
4018
4438
|
// src/blocks/video/component-info.ts
|
|
4019
|
-
var
|
|
4439
|
+
var componentInfo20 = {
|
|
4020
4440
|
name: "Video",
|
|
4021
4441
|
canHaveChildren: true,
|
|
4022
4442
|
defaultStyles: {
|
|
@@ -4103,9 +4523,9 @@ var componentInfo19 = {
|
|
|
4103
4523
|
};
|
|
4104
4524
|
|
|
4105
4525
|
// src/blocks/video/video.tsx
|
|
4106
|
-
import { Show as
|
|
4526
|
+
import { Show as Show13, createMemo as createMemo15 } from "solid-js";
|
|
4107
4527
|
function Video(props) {
|
|
4108
|
-
const videoProps =
|
|
4528
|
+
const videoProps = createMemo15(() => {
|
|
4109
4529
|
return {
|
|
4110
4530
|
...props.autoPlay === true ? {
|
|
4111
4531
|
autoPlay: true
|
|
@@ -4124,7 +4544,7 @@ function Video(props) {
|
|
|
4124
4544
|
} : {}
|
|
4125
4545
|
};
|
|
4126
4546
|
});
|
|
4127
|
-
const spreadProps =
|
|
4547
|
+
const spreadProps = createMemo15(() => {
|
|
4128
4548
|
return {
|
|
4129
4549
|
...videoProps()
|
|
4130
4550
|
};
|
|
@@ -4146,7 +4566,6 @@ function Video(props) {
|
|
|
4146
4566
|
"object-position": props.position,
|
|
4147
4567
|
// Hack to get object fit to work as expected and
|
|
4148
4568
|
// not have the video overflow
|
|
4149
|
-
"z-index": 2,
|
|
4150
4569
|
"border-radius": "1px",
|
|
4151
4570
|
...props.aspectRatio ? {
|
|
4152
4571
|
position: "absolute"
|
|
@@ -4154,8 +4573,8 @@ function Video(props) {
|
|
|
4154
4573
|
}}
|
|
4155
4574
|
src={props.video || "no-src"}
|
|
4156
4575
|
poster={props.posterImage}
|
|
4157
|
-
><
|
|
4158
|
-
<
|
|
4576
|
+
><Show13 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show13></video>
|
|
4577
|
+
<Show13
|
|
4159
4578
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
4160
4579
|
><div
|
|
4161
4580
|
style={{
|
|
@@ -4164,15 +4583,15 @@ function Video(props) {
|
|
|
4164
4583
|
"pointer-events": "none",
|
|
4165
4584
|
"font-size": "0px"
|
|
4166
4585
|
}}
|
|
4167
|
-
/></
|
|
4168
|
-
<
|
|
4586
|
+
/></Show13>
|
|
4587
|
+
<Show13 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
4169
4588
|
style={{
|
|
4170
4589
|
display: "flex",
|
|
4171
4590
|
"flex-direction": "column",
|
|
4172
4591
|
"align-items": "stretch"
|
|
4173
4592
|
}}
|
|
4174
|
-
>{props.children}</div></
|
|
4175
|
-
<
|
|
4593
|
+
>{props.children}</div></Show13>
|
|
4594
|
+
<Show13 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
4176
4595
|
style={{
|
|
4177
4596
|
"pointer-events": "none",
|
|
4178
4597
|
display: "flex",
|
|
@@ -4184,7 +4603,7 @@ function Video(props) {
|
|
|
4184
4603
|
width: "100%",
|
|
4185
4604
|
height: "100%"
|
|
4186
4605
|
}}
|
|
4187
|
-
>{props.children}</div></
|
|
4606
|
+
>{props.children}</div></Show13>
|
|
4188
4607
|
</div></>;
|
|
4189
4608
|
}
|
|
4190
4609
|
var video_default = Video;
|
|
@@ -4192,31 +4611,31 @@ var video_default = Video;
|
|
|
4192
4611
|
// src/constants/extra-components.ts
|
|
4193
4612
|
var getExtraComponents = () => [{
|
|
4194
4613
|
component: custom_code_default,
|
|
4195
|
-
...
|
|
4614
|
+
...componentInfo12
|
|
4196
4615
|
}, {
|
|
4197
4616
|
component: embed_default,
|
|
4198
|
-
...
|
|
4617
|
+
...componentInfo13
|
|
4199
4618
|
}, ...TARGET === "rsc" ? [] : [{
|
|
4200
4619
|
component: form_default,
|
|
4201
|
-
...
|
|
4620
|
+
...componentInfo14
|
|
4202
4621
|
}, {
|
|
4203
4622
|
component: input_default,
|
|
4204
|
-
...
|
|
4623
|
+
...componentInfo15
|
|
4205
4624
|
}, {
|
|
4206
4625
|
component: submit_button_default,
|
|
4207
|
-
...
|
|
4626
|
+
...componentInfo17
|
|
4208
4627
|
}, {
|
|
4209
4628
|
component: select_default,
|
|
4210
|
-
...
|
|
4629
|
+
...componentInfo16
|
|
4211
4630
|
}, {
|
|
4212
4631
|
component: textarea_default,
|
|
4213
|
-
...
|
|
4632
|
+
...componentInfo18
|
|
4214
4633
|
}], {
|
|
4215
4634
|
component: img_default,
|
|
4216
|
-
...
|
|
4635
|
+
...componentInfo19
|
|
4217
4636
|
}, {
|
|
4218
4637
|
component: video_default,
|
|
4219
|
-
...
|
|
4638
|
+
...componentInfo20
|
|
4220
4639
|
}];
|
|
4221
4640
|
|
|
4222
4641
|
// src/constants/builder-registered-components.ts
|
|
@@ -4234,19 +4653,22 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
4234
4653
|
...componentInfo5
|
|
4235
4654
|
}, {
|
|
4236
4655
|
component: section_default,
|
|
4237
|
-
...
|
|
4656
|
+
...componentInfo7
|
|
4238
4657
|
}, {
|
|
4239
4658
|
component: slot_default,
|
|
4240
|
-
...
|
|
4659
|
+
...componentInfo8
|
|
4241
4660
|
}, {
|
|
4242
4661
|
component: symbol_default,
|
|
4243
|
-
...
|
|
4662
|
+
...componentInfo9
|
|
4244
4663
|
}, {
|
|
4245
4664
|
component: text_default,
|
|
4246
|
-
...
|
|
4247
|
-
}, ...TARGET === "
|
|
4665
|
+
...componentInfo11
|
|
4666
|
+
}, ...TARGET === "react" ? [{
|
|
4667
|
+
component: personalization_container_default,
|
|
4668
|
+
...componentInfo6
|
|
4669
|
+
}] : [], ...TARGET === "rsc" ? [] : [{
|
|
4248
4670
|
component: tabs_default,
|
|
4249
|
-
...
|
|
4671
|
+
...componentInfo10
|
|
4250
4672
|
}, {
|
|
4251
4673
|
component: accordion_default,
|
|
4252
4674
|
...componentInfo
|
|
@@ -4284,7 +4706,7 @@ var getVariants = (content) => Object.values(content?.variations || {}).map((var
|
|
|
4284
4706
|
testVariationId: variant.id,
|
|
4285
4707
|
id: content?.id
|
|
4286
4708
|
}));
|
|
4287
|
-
var
|
|
4709
|
+
var checkShouldRenderVariants2 = ({
|
|
4288
4710
|
canTrack,
|
|
4289
4711
|
content
|
|
4290
4712
|
}) => {
|
|
@@ -4318,24 +4740,14 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4318
4740
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
4319
4741
|
)`;
|
|
4320
4742
|
|
|
4321
|
-
// src/components/inlined-script.tsx
|
|
4322
|
-
function InlinedScript(props) {
|
|
4323
|
-
return <><script
|
|
4324
|
-
innerHTML={props.scriptStr}
|
|
4325
|
-
data-id={props.id}
|
|
4326
|
-
nonce={props.nonce || ""}
|
|
4327
|
-
/></>;
|
|
4328
|
-
}
|
|
4329
|
-
var Inlined_script_default = InlinedScript;
|
|
4330
|
-
|
|
4331
4743
|
// src/components/content/components/enable-editor.tsx
|
|
4332
4744
|
import {
|
|
4333
|
-
Show as
|
|
4745
|
+
Show as Show14,
|
|
4334
4746
|
onMount as onMount6,
|
|
4335
4747
|
on as on3,
|
|
4336
4748
|
createEffect as createEffect3,
|
|
4337
|
-
createMemo as
|
|
4338
|
-
createSignal as
|
|
4749
|
+
createMemo as createMemo16,
|
|
4750
|
+
createSignal as createSignal16
|
|
4339
4751
|
} from "solid-js";
|
|
4340
4752
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
4341
4753
|
|
|
@@ -4345,7 +4757,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4345
4757
|
}
|
|
4346
4758
|
|
|
4347
4759
|
// src/constants/sdk-version.ts
|
|
4348
|
-
var SDK_VERSION = "3.0.
|
|
4760
|
+
var SDK_VERSION = "3.0.6";
|
|
4349
4761
|
|
|
4350
4762
|
// src/helpers/sdk-headers.ts
|
|
4351
4763
|
var getSdkHeaders = () => ({
|
|
@@ -4640,16 +5052,6 @@ async function fetchEntries(options) {
|
|
|
4640
5052
|
return _processContentResult(options, content);
|
|
4641
5053
|
}
|
|
4642
5054
|
|
|
4643
|
-
// src/functions/is-previewing.ts
|
|
4644
|
-
function isPreviewing(_search) {
|
|
4645
|
-
const search = _search || (isBrowser() ? window.location.search : void 0);
|
|
4646
|
-
if (!search) {
|
|
4647
|
-
return false;
|
|
4648
|
-
}
|
|
4649
|
-
const normalizedSearch = getSearchString(search);
|
|
4650
|
-
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4651
|
-
}
|
|
4652
|
-
|
|
4653
5055
|
// src/helpers/uuid.ts
|
|
4654
5056
|
function uuidv4() {
|
|
4655
5057
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
@@ -4972,7 +5374,8 @@ var setupBrowserForEditing = (options = {}) => {
|
|
|
4972
5374
|
// Supports builder-model="..." attribute which is needed to
|
|
4973
5375
|
// scope our '+ add block' button styling
|
|
4974
5376
|
supportsAddBlockScoping: true,
|
|
4975
|
-
supportsCustomBreakpoints: true
|
|
5377
|
+
supportsCustomBreakpoints: true,
|
|
5378
|
+
blockLevelPersonalization: true
|
|
4976
5379
|
}
|
|
4977
5380
|
}, "*");
|
|
4978
5381
|
window.parent?.postMessage({
|
|
@@ -5187,12 +5590,12 @@ var getWrapperClassName = (variationId) => {
|
|
|
5187
5590
|
|
|
5188
5591
|
// src/components/content/components/enable-editor.tsx
|
|
5189
5592
|
function EnableEditor(props) {
|
|
5190
|
-
const [ContentWrapper, setContentWrapper] =
|
|
5593
|
+
const [ContentWrapper, setContentWrapper] = createSignal16(
|
|
5191
5594
|
props.contentWrapper || "div"
|
|
5192
5595
|
);
|
|
5193
|
-
const [httpReqsData, setHttpReqsData] =
|
|
5194
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
5195
|
-
const [clicked, setClicked] =
|
|
5596
|
+
const [httpReqsData, setHttpReqsData] = createSignal16({});
|
|
5597
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal16({});
|
|
5598
|
+
const [clicked, setClicked] = createSignal16(false);
|
|
5196
5599
|
function mergeNewRootState(newData) {
|
|
5197
5600
|
const combinedState = {
|
|
5198
5601
|
...props.builderContextSignal.rootState,
|
|
@@ -5226,7 +5629,7 @@ function EnableEditor(props) {
|
|
|
5226
5629
|
content: newContentValue
|
|
5227
5630
|
}));
|
|
5228
5631
|
}
|
|
5229
|
-
const showContentProps =
|
|
5632
|
+
const showContentProps = createMemo16(() => {
|
|
5230
5633
|
return props.showContent ? {} : {
|
|
5231
5634
|
hidden: true,
|
|
5232
5635
|
"aria-hidden": true
|
|
@@ -5401,14 +5804,14 @@ function EnableEditor(props) {
|
|
|
5401
5804
|
}
|
|
5402
5805
|
}
|
|
5403
5806
|
});
|
|
5404
|
-
const onUpdateFn_0_props_content =
|
|
5807
|
+
const onUpdateFn_0_props_content = createMemo16(() => props.content);
|
|
5405
5808
|
function onUpdateFn_0() {
|
|
5406
5809
|
if (props.content) {
|
|
5407
5810
|
mergeNewContent(props.content);
|
|
5408
5811
|
}
|
|
5409
5812
|
}
|
|
5410
5813
|
createEffect3(on3(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
5411
|
-
const onUpdateFn_1_props_builderContextSignal_rootState =
|
|
5814
|
+
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
5412
5815
|
() => props.builderContextSignal.rootState
|
|
5413
5816
|
);
|
|
5414
5817
|
function onUpdateFn_1() {
|
|
@@ -5420,14 +5823,14 @@ function EnableEditor(props) {
|
|
|
5420
5823
|
onUpdateFn_1
|
|
5421
5824
|
)
|
|
5422
5825
|
);
|
|
5423
|
-
const onUpdateFn_2_props_data =
|
|
5826
|
+
const onUpdateFn_2_props_data = createMemo16(() => props.data);
|
|
5424
5827
|
function onUpdateFn_2() {
|
|
5425
5828
|
if (props.data) {
|
|
5426
5829
|
mergeNewRootState(props.data);
|
|
5427
5830
|
}
|
|
5428
5831
|
}
|
|
5429
5832
|
createEffect3(on3(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
5430
|
-
const onUpdateFn_3_props_locale =
|
|
5833
|
+
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
5431
5834
|
function onUpdateFn_3() {
|
|
5432
5835
|
if (props.locale) {
|
|
5433
5836
|
mergeNewRootState({
|
|
@@ -5436,7 +5839,7 @@ function EnableEditor(props) {
|
|
|
5436
5839
|
}
|
|
5437
5840
|
}
|
|
5438
5841
|
createEffect3(on3(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
5439
|
-
return <><builder_context_default.Provider value={props.builderContextSignal}><
|
|
5842
|
+
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
5440
5843
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
5441
5844
|
><Dynamic5
|
|
5442
5845
|
class={getWrapperClassName(
|
|
@@ -5454,14 +5857,14 @@ function EnableEditor(props) {
|
|
|
5454
5857
|
{...showContentProps()}
|
|
5455
5858
|
{...props.contentWrapperProps}
|
|
5456
5859
|
component={ContentWrapper()}
|
|
5457
|
-
>{props.children}</Dynamic5></
|
|
5860
|
+
>{props.children}</Dynamic5></Show14></builder_context_default.Provider></>;
|
|
5458
5861
|
}
|
|
5459
5862
|
var Enable_editor_default = EnableEditor;
|
|
5460
5863
|
|
|
5461
5864
|
// src/components/content/components/styles.tsx
|
|
5462
|
-
import { createSignal as
|
|
5865
|
+
import { createSignal as createSignal17 } from "solid-js";
|
|
5463
5866
|
function ContentStyles(props) {
|
|
5464
|
-
const [injectedStyles, setInjectedStyles] =
|
|
5867
|
+
const [injectedStyles, setInjectedStyles] = createSignal17(
|
|
5465
5868
|
`
|
|
5466
5869
|
${getCss({
|
|
5467
5870
|
cssCode: props.cssCode,
|
|
@@ -5519,7 +5922,7 @@ var getContentInitialValue = ({
|
|
|
5519
5922
|
|
|
5520
5923
|
// src/components/content/content.tsx
|
|
5521
5924
|
function ContentComponent(props) {
|
|
5522
|
-
const [scriptStr, setScriptStr] =
|
|
5925
|
+
const [scriptStr, setScriptStr] = createSignal18(
|
|
5523
5926
|
getUpdateVariantVisibilityScript({
|
|
5524
5927
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
5525
5928
|
variationId: props.content?.testVariationId,
|
|
@@ -5527,7 +5930,7 @@ function ContentComponent(props) {
|
|
|
5527
5930
|
contentId: props.content?.id
|
|
5528
5931
|
})
|
|
5529
5932
|
);
|
|
5530
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
5933
|
+
const [registeredComponents, setRegisteredComponents] = createSignal18(
|
|
5531
5934
|
[
|
|
5532
5935
|
...getDefaultRegisteredComponents(),
|
|
5533
5936
|
...props.customComponents || []
|
|
@@ -5542,7 +5945,7 @@ function ContentComponent(props) {
|
|
|
5542
5945
|
{}
|
|
5543
5946
|
)
|
|
5544
5947
|
);
|
|
5545
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
5948
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal18({
|
|
5546
5949
|
content: getContentInitialValue({
|
|
5547
5950
|
content: props.content,
|
|
5548
5951
|
data: props.data
|
|
@@ -5626,18 +6029,18 @@ function ContentComponent(props) {
|
|
|
5626
6029
|
setBuilderContextSignal
|
|
5627
6030
|
}}
|
|
5628
6031
|
>
|
|
5629
|
-
<
|
|
6032
|
+
<Show15 when={props.isSsrAbTest}><Inlined_script_default
|
|
5630
6033
|
id="builderio-variant-visibility"
|
|
5631
6034
|
scriptStr={scriptStr()}
|
|
5632
6035
|
nonce={props.nonce || ""}
|
|
5633
|
-
/></
|
|
5634
|
-
<
|
|
6036
|
+
/></Show15>
|
|
6037
|
+
<Show15 when={TARGET !== "reactNative"}><Styles_default
|
|
5635
6038
|
nonce={props.nonce || ""}
|
|
5636
6039
|
isNestedRender={props.isNestedRender}
|
|
5637
6040
|
contentId={builderContextSignal().content?.id}
|
|
5638
6041
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
5639
6042
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
5640
|
-
/></
|
|
6043
|
+
/></Show15>
|
|
5641
6044
|
<Blocks_default
|
|
5642
6045
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
5643
6046
|
context={builderContextSignal()}
|
|
@@ -5650,13 +6053,13 @@ var Content_default = ContentComponent;
|
|
|
5650
6053
|
|
|
5651
6054
|
// src/components/content-variants/content-variants.tsx
|
|
5652
6055
|
function ContentVariants(props) {
|
|
5653
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
5654
|
-
|
|
6056
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal19(
|
|
6057
|
+
checkShouldRenderVariants2({
|
|
5655
6058
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
5656
6059
|
content: props.content
|
|
5657
6060
|
})
|
|
5658
6061
|
);
|
|
5659
|
-
const updateCookieAndStylesScriptStr =
|
|
6062
|
+
const updateCookieAndStylesScriptStr = createMemo19(() => {
|
|
5660
6063
|
return getUpdateCookieAndStylesScript(
|
|
5661
6064
|
getVariants(props.content).map((value) => ({
|
|
5662
6065
|
id: value.testVariationId,
|
|
@@ -5665,10 +6068,10 @@ function ContentVariants(props) {
|
|
|
5665
6068
|
props.content?.id || ""
|
|
5666
6069
|
);
|
|
5667
6070
|
});
|
|
5668
|
-
const hideVariantsStyleString =
|
|
6071
|
+
const hideVariantsStyleString = createMemo19(() => {
|
|
5669
6072
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
5670
6073
|
});
|
|
5671
|
-
const defaultContent =
|
|
6074
|
+
const defaultContent = createMemo19(() => {
|
|
5672
6075
|
return shouldRenderVariants() ? {
|
|
5673
6076
|
...props.content,
|
|
5674
6077
|
testVariationId: props.content?.id
|
|
@@ -5681,12 +6084,12 @@ function ContentVariants(props) {
|
|
|
5681
6084
|
setShouldRenderVariants(false);
|
|
5682
6085
|
});
|
|
5683
6086
|
return <><>
|
|
5684
|
-
<
|
|
6087
|
+
<Show16 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
5685
6088
|
id="builderio-init-variants-fns"
|
|
5686
6089
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
5687
6090
|
nonce={props.nonce || ""}
|
|
5688
|
-
/></
|
|
5689
|
-
<
|
|
6091
|
+
/></Show16>
|
|
6092
|
+
<Show16 when={shouldRenderVariants()}>
|
|
5690
6093
|
<Inlined_styles_default
|
|
5691
6094
|
id="builderio-variants"
|
|
5692
6095
|
styles={hideVariantsStyleString()}
|
|
@@ -5725,7 +6128,7 @@ function ContentVariants(props) {
|
|
|
5725
6128
|
{...{}}
|
|
5726
6129
|
/>;
|
|
5727
6130
|
}}</For9>
|
|
5728
|
-
</
|
|
6131
|
+
</Show16>
|
|
5729
6132
|
<Content_default
|
|
5730
6133
|
apiHost={props.apiHost}
|
|
5731
6134
|
nonce={props.nonce}
|
|
@@ -5780,14 +6183,14 @@ var fetchSymbolContent = async ({
|
|
|
5780
6183
|
|
|
5781
6184
|
// src/blocks/symbol/symbol.tsx
|
|
5782
6185
|
function Symbol(props) {
|
|
5783
|
-
const [contentToUse, setContentToUse] =
|
|
5784
|
-
const blocksWrapper =
|
|
6186
|
+
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
6187
|
+
const blocksWrapper = createMemo20(() => {
|
|
5785
6188
|
return "div";
|
|
5786
6189
|
});
|
|
5787
|
-
const contentWrapper =
|
|
6190
|
+
const contentWrapper = createMemo20(() => {
|
|
5788
6191
|
return "div";
|
|
5789
6192
|
});
|
|
5790
|
-
const className =
|
|
6193
|
+
const className = createMemo20(() => {
|
|
5791
6194
|
return [
|
|
5792
6195
|
...[props.attributes[getClassPropName()]],
|
|
5793
6196
|
"builder-symbol",
|
|
@@ -5809,7 +6212,7 @@ function Symbol(props) {
|
|
|
5809
6212
|
}
|
|
5810
6213
|
onMount8(() => {
|
|
5811
6214
|
});
|
|
5812
|
-
const onUpdateFn_0_props_symbol =
|
|
6215
|
+
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
5813
6216
|
function onUpdateFn_0() {
|
|
5814
6217
|
setContent();
|
|
5815
6218
|
}
|
|
@@ -5894,6 +6297,7 @@ export {
|
|
|
5894
6297
|
isEditing,
|
|
5895
6298
|
isPreviewing,
|
|
5896
6299
|
register,
|
|
6300
|
+
setClientUserAttributes,
|
|
5897
6301
|
setEditorSettings,
|
|
5898
6302
|
subscribeToEditor,
|
|
5899
6303
|
track
|