@builder.io/sdk-solid 4.2.3 → 5.0.0
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 +19 -3
- package/lib/browser/dev.js +11 -5
- package/lib/browser/dev.jsx +44 -8
- package/lib/browser/index.js +11 -5
- package/lib/browser/index.jsx +44 -8
- package/lib/edge/dev.js +11 -5
- package/lib/edge/dev.jsx +44 -8
- package/lib/edge/index.js +11 -5
- package/lib/edge/index.jsx +44 -8
- package/lib/node/dev.js +11 -5
- package/lib/node/dev.jsx +44 -8
- package/lib/node/index.js +11 -5
- package/lib/node/index.jsx +44 -8
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -803,7 +803,17 @@ type Search = URLSearchParams | string | QueryObject;
|
|
|
803
803
|
|
|
804
804
|
declare function isEditing(search?: Search): boolean;
|
|
805
805
|
|
|
806
|
-
|
|
806
|
+
/**
|
|
807
|
+
* Checks the current URL's search parameters to see if it is attempting to
|
|
808
|
+
* preview Builder Content.
|
|
809
|
+
*
|
|
810
|
+
* When called on the client, it uses `window.location.search`.
|
|
811
|
+
* When called on the server (SSR), it requires a `search` argument.
|
|
812
|
+
*
|
|
813
|
+
* @param search - The search parameters to check. Can be a URL string (containing the search parameters), `URLSearchParams`, or a key-value object containing the search parameters.
|
|
814
|
+
* @returns `true` if the current page is being previewed, `false` otherwise.
|
|
815
|
+
*/
|
|
816
|
+
declare function isPreviewing(search?: Search): boolean;
|
|
807
817
|
|
|
808
818
|
declare const createRegisterComponentMessage: (info: ComponentInfo) => {
|
|
809
819
|
type: string;
|
|
@@ -852,8 +862,14 @@ type Settings = {
|
|
|
852
862
|
declare function setEditorSettings(newSettings: Settings): void;
|
|
853
863
|
|
|
854
864
|
/**
|
|
855
|
-
* Receives a `URLSearchParams` object or a regular query object, and returns
|
|
856
|
-
* relevant to the Builder SDK.
|
|
865
|
+
* Receives a `URLSearchParams` object or a regular query object, and returns
|
|
866
|
+
* the subset of query params that are relevant to the Builder SDK.
|
|
867
|
+
*
|
|
868
|
+
* Outputs a key-value object to be passed to `fetchOneEntry` or `fetchEntries`
|
|
869
|
+
* functions as the `options` argument.
|
|
870
|
+
*
|
|
871
|
+
* NOTE: This function is generally not needed. Instead, it is recommended to use `isPreviewing()`
|
|
872
|
+
* to check if the current page requires previewed content.
|
|
857
873
|
*
|
|
858
874
|
* @returns
|
|
859
875
|
*/
|
package/lib/browser/dev.js
CHANGED
|
@@ -1047,12 +1047,12 @@ function BlockWrapper(props) {
|
|
|
1047
1047
|
var block_wrapper_default = BlockWrapper;
|
|
1048
1048
|
|
|
1049
1049
|
// src/functions/is-previewing.ts
|
|
1050
|
-
function isPreviewing(
|
|
1051
|
-
const
|
|
1052
|
-
if (!
|
|
1050
|
+
function isPreviewing(search) {
|
|
1051
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1052
|
+
if (!searchToUse) {
|
|
1053
1053
|
return false;
|
|
1054
1054
|
}
|
|
1055
|
-
const normalizedSearch = getSearchString(
|
|
1055
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1056
1056
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
@@ -1157,7 +1157,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1157
1157
|
};
|
|
1158
1158
|
|
|
1159
1159
|
// src/constants/sdk-version.ts
|
|
1160
|
-
var SDK_VERSION = "
|
|
1160
|
+
var SDK_VERSION = "5.0.0";
|
|
1161
1161
|
|
|
1162
1162
|
// src/helpers/sdk-headers.ts
|
|
1163
1163
|
var getSdkHeaders = () => ({
|
|
@@ -7108,6 +7108,12 @@ function ContentComponent(props) {
|
|
|
7108
7108
|
isExpression: false
|
|
7109
7109
|
});
|
|
7110
7110
|
}
|
|
7111
|
+
const onUpdateFn_0_props_content = createMemo(() => props.content);
|
|
7112
|
+
const onUpdateFn_0_props_data = createMemo(() => props.data);
|
|
7113
|
+
const onUpdateFn_0_props_locale = createMemo(() => props.locale);
|
|
7114
|
+
function onUpdateFn_0() {
|
|
7115
|
+
}
|
|
7116
|
+
createEffect(on(() => [onUpdateFn_0_props_content(), onUpdateFn_0_props_data(), onUpdateFn_0_props_locale()], onUpdateFn_0));
|
|
7111
7117
|
return createComponent(components_context_default.Provider, {
|
|
7112
7118
|
get value() {
|
|
7113
7119
|
return {
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -1039,12 +1039,12 @@ import { Show as Show2, on, createEffect, createMemo as createMemo2, createSigna
|
|
|
1039
1039
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1040
1040
|
|
|
1041
1041
|
// src/functions/is-previewing.ts
|
|
1042
|
-
function isPreviewing(
|
|
1043
|
-
const
|
|
1044
|
-
if (!
|
|
1042
|
+
function isPreviewing(search) {
|
|
1043
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1044
|
+
if (!searchToUse) {
|
|
1045
1045
|
return false;
|
|
1046
1046
|
}
|
|
1047
|
-
const normalizedSearch = getSearchString(
|
|
1047
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1048
1048
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
@@ -1149,7 +1149,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1149
1149
|
};
|
|
1150
1150
|
|
|
1151
1151
|
// src/constants/sdk-version.ts
|
|
1152
|
-
var SDK_VERSION = "
|
|
1152
|
+
var SDK_VERSION = "5.0.0";
|
|
1153
1153
|
|
|
1154
1154
|
// src/helpers/sdk-headers.ts
|
|
1155
1155
|
var getSdkHeaders = () => ({
|
|
@@ -3200,7 +3200,7 @@ function SectionComponent(props) {
|
|
|
3200
3200
|
var section_default = SectionComponent;
|
|
3201
3201
|
|
|
3202
3202
|
// src/blocks/symbol/symbol.tsx
|
|
3203
|
-
import { onMount as onMount11, on as
|
|
3203
|
+
import { onMount as onMount11, on as on9, createEffect as createEffect9, createMemo as createMemo24, createSignal as createSignal24 } from "solid-js";
|
|
3204
3204
|
|
|
3205
3205
|
// src/components/content-variants/content-variants.tsx
|
|
3206
3206
|
import { Show as Show18, For as For9, onMount as onMount10, createSignal as createSignal23, createMemo as createMemo23 } from "solid-js";
|
|
@@ -3366,7 +3366,7 @@ var getUpdateVisibilityStylesScript = (variants, blockId, locale) => {
|
|
|
3366
3366
|
};
|
|
3367
3367
|
|
|
3368
3368
|
// src/components/content/content.tsx
|
|
3369
|
-
import { Show as Show17, createSignal as createSignal22 } from "solid-js";
|
|
3369
|
+
import { Show as Show17, on as on8, createEffect as createEffect8, createMemo as createMemo22, createSignal as createSignal22 } from "solid-js";
|
|
3370
3370
|
|
|
3371
3371
|
// src/blocks/accordion/component-info.ts
|
|
3372
3372
|
var defaultTitle = {
|
|
@@ -6566,6 +6566,42 @@ function ContentComponent(props) {
|
|
|
6566
6566
|
isExpression: false
|
|
6567
6567
|
});
|
|
6568
6568
|
}
|
|
6569
|
+
const onUpdateFn_0_props_content = createMemo22(() => props.content);
|
|
6570
|
+
const onUpdateFn_0_props_data = createMemo22(() => props.data);
|
|
6571
|
+
const onUpdateFn_0_props_locale = createMemo22(() => props.locale);
|
|
6572
|
+
function onUpdateFn_0() {
|
|
6573
|
+
const updateContentAndRootState = () => {
|
|
6574
|
+
const nextId = props.content?.id;
|
|
6575
|
+
const currentId = builderContextSignal().content?.id;
|
|
6576
|
+
if (nextId && nextId !== currentId) {
|
|
6577
|
+
builderContextSignal().content = getContentInitialValue({
|
|
6578
|
+
content: props.content,
|
|
6579
|
+
data: props.data
|
|
6580
|
+
});
|
|
6581
|
+
builderContextSignal().rootState = getRootStateInitialValue({
|
|
6582
|
+
content: props.content,
|
|
6583
|
+
data: props.data,
|
|
6584
|
+
locale: props.locale
|
|
6585
|
+
});
|
|
6586
|
+
setScriptStr(
|
|
6587
|
+
getUpdateVariantVisibilityScript({
|
|
6588
|
+
variationId: props.content?.testVariationId || "",
|
|
6589
|
+
contentId: nextId
|
|
6590
|
+
})
|
|
6591
|
+
);
|
|
6592
|
+
}
|
|
6593
|
+
};
|
|
6594
|
+
}
|
|
6595
|
+
createEffect8(
|
|
6596
|
+
on8(
|
|
6597
|
+
() => [
|
|
6598
|
+
onUpdateFn_0_props_content(),
|
|
6599
|
+
onUpdateFn_0_props_data(),
|
|
6600
|
+
onUpdateFn_0_props_locale()
|
|
6601
|
+
],
|
|
6602
|
+
onUpdateFn_0
|
|
6603
|
+
)
|
|
6604
|
+
);
|
|
6569
6605
|
return <><components_context_default.Provider
|
|
6570
6606
|
value={{
|
|
6571
6607
|
registeredComponents: registeredComponents()
|
|
@@ -6790,7 +6826,7 @@ function Symbol(props) {
|
|
|
6790
6826
|
function onUpdateFn_0() {
|
|
6791
6827
|
setContent();
|
|
6792
6828
|
}
|
|
6793
|
-
|
|
6829
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6794
6830
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6795
6831
|
nonce={props.builderContext.nonce}
|
|
6796
6832
|
isNestedRender={true}
|
package/lib/browser/index.js
CHANGED
|
@@ -1038,12 +1038,12 @@ function BlockWrapper(props) {
|
|
|
1038
1038
|
var block_wrapper_default = BlockWrapper;
|
|
1039
1039
|
|
|
1040
1040
|
// src/functions/is-previewing.ts
|
|
1041
|
-
function isPreviewing(
|
|
1042
|
-
const
|
|
1043
|
-
if (!
|
|
1041
|
+
function isPreviewing(search) {
|
|
1042
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1043
|
+
if (!searchToUse) {
|
|
1044
1044
|
return false;
|
|
1045
1045
|
}
|
|
1046
|
-
const normalizedSearch = getSearchString(
|
|
1046
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1047
1047
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
@@ -1147,7 +1147,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1147
1147
|
};
|
|
1148
1148
|
|
|
1149
1149
|
// src/constants/sdk-version.ts
|
|
1150
|
-
var SDK_VERSION = "
|
|
1150
|
+
var SDK_VERSION = "5.0.0";
|
|
1151
1151
|
|
|
1152
1152
|
// src/helpers/sdk-headers.ts
|
|
1153
1153
|
var getSdkHeaders = () => ({
|
|
@@ -7088,6 +7088,12 @@ function ContentComponent(props) {
|
|
|
7088
7088
|
isExpression: false
|
|
7089
7089
|
});
|
|
7090
7090
|
}
|
|
7091
|
+
const onUpdateFn_0_props_content = createMemo(() => props.content);
|
|
7092
|
+
const onUpdateFn_0_props_data = createMemo(() => props.data);
|
|
7093
|
+
const onUpdateFn_0_props_locale = createMemo(() => props.locale);
|
|
7094
|
+
function onUpdateFn_0() {
|
|
7095
|
+
}
|
|
7096
|
+
createEffect(on(() => [onUpdateFn_0_props_content(), onUpdateFn_0_props_data(), onUpdateFn_0_props_locale()], onUpdateFn_0));
|
|
7091
7097
|
return createComponent(components_context_default.Provider, {
|
|
7092
7098
|
get value() {
|
|
7093
7099
|
return {
|
package/lib/browser/index.jsx
CHANGED
|
@@ -1032,12 +1032,12 @@ import { Show as Show2, on, createEffect, createMemo as createMemo2, createSigna
|
|
|
1032
1032
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1033
1033
|
|
|
1034
1034
|
// src/functions/is-previewing.ts
|
|
1035
|
-
function isPreviewing(
|
|
1036
|
-
const
|
|
1037
|
-
if (!
|
|
1035
|
+
function isPreviewing(search) {
|
|
1036
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1037
|
+
if (!searchToUse) {
|
|
1038
1038
|
return false;
|
|
1039
1039
|
}
|
|
1040
|
-
const normalizedSearch = getSearchString(
|
|
1040
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1041
1041
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
@@ -1141,7 +1141,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1141
1141
|
};
|
|
1142
1142
|
|
|
1143
1143
|
// src/constants/sdk-version.ts
|
|
1144
|
-
var SDK_VERSION = "
|
|
1144
|
+
var SDK_VERSION = "5.0.0";
|
|
1145
1145
|
|
|
1146
1146
|
// src/helpers/sdk-headers.ts
|
|
1147
1147
|
var getSdkHeaders = () => ({
|
|
@@ -3186,7 +3186,7 @@ function SectionComponent(props) {
|
|
|
3186
3186
|
var section_default = SectionComponent;
|
|
3187
3187
|
|
|
3188
3188
|
// src/blocks/symbol/symbol.tsx
|
|
3189
|
-
import { onMount as onMount11, on as
|
|
3189
|
+
import { onMount as onMount11, on as on9, createEffect as createEffect9, createMemo as createMemo24, createSignal as createSignal24 } from "solid-js";
|
|
3190
3190
|
|
|
3191
3191
|
// src/components/content-variants/content-variants.tsx
|
|
3192
3192
|
import { Show as Show18, For as For9, onMount as onMount10, createSignal as createSignal23, createMemo as createMemo23 } from "solid-js";
|
|
@@ -3352,7 +3352,7 @@ var getUpdateVisibilityStylesScript = (variants, blockId, locale) => {
|
|
|
3352
3352
|
};
|
|
3353
3353
|
|
|
3354
3354
|
// src/components/content/content.tsx
|
|
3355
|
-
import { Show as Show17, createSignal as createSignal22 } from "solid-js";
|
|
3355
|
+
import { Show as Show17, on as on8, createEffect as createEffect8, createMemo as createMemo22, createSignal as createSignal22 } from "solid-js";
|
|
3356
3356
|
|
|
3357
3357
|
// src/blocks/accordion/component-info.ts
|
|
3358
3358
|
var defaultTitle = {
|
|
@@ -6544,6 +6544,42 @@ function ContentComponent(props) {
|
|
|
6544
6544
|
isExpression: false
|
|
6545
6545
|
});
|
|
6546
6546
|
}
|
|
6547
|
+
const onUpdateFn_0_props_content = createMemo22(() => props.content);
|
|
6548
|
+
const onUpdateFn_0_props_data = createMemo22(() => props.data);
|
|
6549
|
+
const onUpdateFn_0_props_locale = createMemo22(() => props.locale);
|
|
6550
|
+
function onUpdateFn_0() {
|
|
6551
|
+
const updateContentAndRootState = () => {
|
|
6552
|
+
const nextId = props.content?.id;
|
|
6553
|
+
const currentId = builderContextSignal().content?.id;
|
|
6554
|
+
if (nextId && nextId !== currentId) {
|
|
6555
|
+
builderContextSignal().content = getContentInitialValue({
|
|
6556
|
+
content: props.content,
|
|
6557
|
+
data: props.data
|
|
6558
|
+
});
|
|
6559
|
+
builderContextSignal().rootState = getRootStateInitialValue({
|
|
6560
|
+
content: props.content,
|
|
6561
|
+
data: props.data,
|
|
6562
|
+
locale: props.locale
|
|
6563
|
+
});
|
|
6564
|
+
setScriptStr(
|
|
6565
|
+
getUpdateVariantVisibilityScript({
|
|
6566
|
+
variationId: props.content?.testVariationId || "",
|
|
6567
|
+
contentId: nextId
|
|
6568
|
+
})
|
|
6569
|
+
);
|
|
6570
|
+
}
|
|
6571
|
+
};
|
|
6572
|
+
}
|
|
6573
|
+
createEffect8(
|
|
6574
|
+
on8(
|
|
6575
|
+
() => [
|
|
6576
|
+
onUpdateFn_0_props_content(),
|
|
6577
|
+
onUpdateFn_0_props_data(),
|
|
6578
|
+
onUpdateFn_0_props_locale()
|
|
6579
|
+
],
|
|
6580
|
+
onUpdateFn_0
|
|
6581
|
+
)
|
|
6582
|
+
);
|
|
6547
6583
|
return <><components_context_default.Provider
|
|
6548
6584
|
value={{
|
|
6549
6585
|
registeredComponents: registeredComponents()
|
|
@@ -6768,7 +6804,7 @@ function Symbol(props) {
|
|
|
6768
6804
|
function onUpdateFn_0() {
|
|
6769
6805
|
setContent();
|
|
6770
6806
|
}
|
|
6771
|
-
|
|
6807
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6772
6808
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6773
6809
|
nonce={props.builderContext.nonce}
|
|
6774
6810
|
isNestedRender={true}
|
package/lib/edge/dev.js
CHANGED
|
@@ -4228,12 +4228,12 @@ function BlockWrapper(props) {
|
|
|
4228
4228
|
var block_wrapper_default = BlockWrapper;
|
|
4229
4229
|
|
|
4230
4230
|
// src/functions/is-previewing.ts
|
|
4231
|
-
function isPreviewing(
|
|
4232
|
-
const
|
|
4233
|
-
if (!
|
|
4231
|
+
function isPreviewing(search) {
|
|
4232
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
4233
|
+
if (!searchToUse) {
|
|
4234
4234
|
return false;
|
|
4235
4235
|
}
|
|
4236
|
-
const normalizedSearch = getSearchString(
|
|
4236
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
4237
4237
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4238
4238
|
}
|
|
4239
4239
|
|
|
@@ -4338,7 +4338,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
4338
4338
|
};
|
|
4339
4339
|
|
|
4340
4340
|
// src/constants/sdk-version.ts
|
|
4341
|
-
var SDK_VERSION = "
|
|
4341
|
+
var SDK_VERSION = "5.0.0";
|
|
4342
4342
|
|
|
4343
4343
|
// src/helpers/sdk-headers.ts
|
|
4344
4344
|
var getSdkHeaders = () => ({
|
|
@@ -10289,6 +10289,12 @@ function ContentComponent(props) {
|
|
|
10289
10289
|
isExpression: false
|
|
10290
10290
|
});
|
|
10291
10291
|
}
|
|
10292
|
+
const onUpdateFn_0_props_content = createMemo(() => props.content);
|
|
10293
|
+
const onUpdateFn_0_props_data = createMemo(() => props.data);
|
|
10294
|
+
const onUpdateFn_0_props_locale = createMemo(() => props.locale);
|
|
10295
|
+
function onUpdateFn_0() {
|
|
10296
|
+
}
|
|
10297
|
+
createEffect(on(() => [onUpdateFn_0_props_content(), onUpdateFn_0_props_data(), onUpdateFn_0_props_locale()], onUpdateFn_0));
|
|
10292
10298
|
return createComponent(components_context_default.Provider, {
|
|
10293
10299
|
get value() {
|
|
10294
10300
|
return {
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -4222,12 +4222,12 @@ import { Show as Show2, on, createEffect, createMemo as createMemo2, createSigna
|
|
|
4222
4222
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
4223
4223
|
|
|
4224
4224
|
// src/functions/is-previewing.ts
|
|
4225
|
-
function isPreviewing(
|
|
4226
|
-
const
|
|
4227
|
-
if (!
|
|
4225
|
+
function isPreviewing(search) {
|
|
4226
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
4227
|
+
if (!searchToUse) {
|
|
4228
4228
|
return false;
|
|
4229
4229
|
}
|
|
4230
|
-
const normalizedSearch = getSearchString(
|
|
4230
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
4231
4231
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4232
4232
|
}
|
|
4233
4233
|
|
|
@@ -4332,7 +4332,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
4332
4332
|
};
|
|
4333
4333
|
|
|
4334
4334
|
// src/constants/sdk-version.ts
|
|
4335
|
-
var SDK_VERSION = "
|
|
4335
|
+
var SDK_VERSION = "5.0.0";
|
|
4336
4336
|
|
|
4337
4337
|
// src/helpers/sdk-headers.ts
|
|
4338
4338
|
var getSdkHeaders = () => ({
|
|
@@ -6383,7 +6383,7 @@ function SectionComponent(props) {
|
|
|
6383
6383
|
var section_default = SectionComponent;
|
|
6384
6384
|
|
|
6385
6385
|
// src/blocks/symbol/symbol.tsx
|
|
6386
|
-
import { onMount as onMount11, on as
|
|
6386
|
+
import { onMount as onMount11, on as on9, createEffect as createEffect9, createMemo as createMemo24, createSignal as createSignal24 } from "solid-js";
|
|
6387
6387
|
|
|
6388
6388
|
// src/components/content-variants/content-variants.tsx
|
|
6389
6389
|
import { Show as Show18, For as For9, onMount as onMount10, createSignal as createSignal23, createMemo as createMemo23 } from "solid-js";
|
|
@@ -6549,7 +6549,7 @@ var getUpdateVisibilityStylesScript = (variants, blockId, locale) => {
|
|
|
6549
6549
|
};
|
|
6550
6550
|
|
|
6551
6551
|
// src/components/content/content.tsx
|
|
6552
|
-
import { Show as Show17, createSignal as createSignal22 } from "solid-js";
|
|
6552
|
+
import { Show as Show17, on as on8, createEffect as createEffect8, createMemo as createMemo22, createSignal as createSignal22 } from "solid-js";
|
|
6553
6553
|
|
|
6554
6554
|
// src/blocks/accordion/component-info.ts
|
|
6555
6555
|
var defaultTitle = {
|
|
@@ -9749,6 +9749,42 @@ function ContentComponent(props) {
|
|
|
9749
9749
|
isExpression: false
|
|
9750
9750
|
});
|
|
9751
9751
|
}
|
|
9752
|
+
const onUpdateFn_0_props_content = createMemo22(() => props.content);
|
|
9753
|
+
const onUpdateFn_0_props_data = createMemo22(() => props.data);
|
|
9754
|
+
const onUpdateFn_0_props_locale = createMemo22(() => props.locale);
|
|
9755
|
+
function onUpdateFn_0() {
|
|
9756
|
+
const updateContentAndRootState = () => {
|
|
9757
|
+
const nextId = props.content?.id;
|
|
9758
|
+
const currentId = builderContextSignal().content?.id;
|
|
9759
|
+
if (nextId && nextId !== currentId) {
|
|
9760
|
+
builderContextSignal().content = getContentInitialValue({
|
|
9761
|
+
content: props.content,
|
|
9762
|
+
data: props.data
|
|
9763
|
+
});
|
|
9764
|
+
builderContextSignal().rootState = getRootStateInitialValue({
|
|
9765
|
+
content: props.content,
|
|
9766
|
+
data: props.data,
|
|
9767
|
+
locale: props.locale
|
|
9768
|
+
});
|
|
9769
|
+
setScriptStr(
|
|
9770
|
+
getUpdateVariantVisibilityScript({
|
|
9771
|
+
variationId: props.content?.testVariationId || "",
|
|
9772
|
+
contentId: nextId
|
|
9773
|
+
})
|
|
9774
|
+
);
|
|
9775
|
+
}
|
|
9776
|
+
};
|
|
9777
|
+
}
|
|
9778
|
+
createEffect8(
|
|
9779
|
+
on8(
|
|
9780
|
+
() => [
|
|
9781
|
+
onUpdateFn_0_props_content(),
|
|
9782
|
+
onUpdateFn_0_props_data(),
|
|
9783
|
+
onUpdateFn_0_props_locale()
|
|
9784
|
+
],
|
|
9785
|
+
onUpdateFn_0
|
|
9786
|
+
)
|
|
9787
|
+
);
|
|
9752
9788
|
return <><components_context_default.Provider
|
|
9753
9789
|
value={{
|
|
9754
9790
|
registeredComponents: registeredComponents()
|
|
@@ -9973,7 +10009,7 @@ function Symbol2(props) {
|
|
|
9973
10009
|
function onUpdateFn_0() {
|
|
9974
10010
|
setContent();
|
|
9975
10011
|
}
|
|
9976
|
-
|
|
10012
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
9977
10013
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
9978
10014
|
nonce={props.builderContext.nonce}
|
|
9979
10015
|
isNestedRender={true}
|
package/lib/edge/index.js
CHANGED
|
@@ -4219,12 +4219,12 @@ function BlockWrapper(props) {
|
|
|
4219
4219
|
var block_wrapper_default = BlockWrapper;
|
|
4220
4220
|
|
|
4221
4221
|
// src/functions/is-previewing.ts
|
|
4222
|
-
function isPreviewing(
|
|
4223
|
-
const
|
|
4224
|
-
if (!
|
|
4222
|
+
function isPreviewing(search) {
|
|
4223
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
4224
|
+
if (!searchToUse) {
|
|
4225
4225
|
return false;
|
|
4226
4226
|
}
|
|
4227
|
-
const normalizedSearch = getSearchString(
|
|
4227
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
4228
4228
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4229
4229
|
}
|
|
4230
4230
|
|
|
@@ -4328,7 +4328,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
4328
4328
|
};
|
|
4329
4329
|
|
|
4330
4330
|
// src/constants/sdk-version.ts
|
|
4331
|
-
var SDK_VERSION = "
|
|
4331
|
+
var SDK_VERSION = "5.0.0";
|
|
4332
4332
|
|
|
4333
4333
|
// src/helpers/sdk-headers.ts
|
|
4334
4334
|
var getSdkHeaders = () => ({
|
|
@@ -10269,6 +10269,12 @@ function ContentComponent(props) {
|
|
|
10269
10269
|
isExpression: false
|
|
10270
10270
|
});
|
|
10271
10271
|
}
|
|
10272
|
+
const onUpdateFn_0_props_content = createMemo(() => props.content);
|
|
10273
|
+
const onUpdateFn_0_props_data = createMemo(() => props.data);
|
|
10274
|
+
const onUpdateFn_0_props_locale = createMemo(() => props.locale);
|
|
10275
|
+
function onUpdateFn_0() {
|
|
10276
|
+
}
|
|
10277
|
+
createEffect(on(() => [onUpdateFn_0_props_content(), onUpdateFn_0_props_data(), onUpdateFn_0_props_locale()], onUpdateFn_0));
|
|
10272
10278
|
return createComponent(components_context_default.Provider, {
|
|
10273
10279
|
get value() {
|
|
10274
10280
|
return {
|
package/lib/edge/index.jsx
CHANGED
|
@@ -4215,12 +4215,12 @@ import { Show as Show2, on, createEffect, createMemo as createMemo2, createSigna
|
|
|
4215
4215
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
4216
4216
|
|
|
4217
4217
|
// src/functions/is-previewing.ts
|
|
4218
|
-
function isPreviewing(
|
|
4219
|
-
const
|
|
4220
|
-
if (!
|
|
4218
|
+
function isPreviewing(search) {
|
|
4219
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
4220
|
+
if (!searchToUse) {
|
|
4221
4221
|
return false;
|
|
4222
4222
|
}
|
|
4223
|
-
const normalizedSearch = getSearchString(
|
|
4223
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
4224
4224
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
4225
4225
|
}
|
|
4226
4226
|
|
|
@@ -4324,7 +4324,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
4324
4324
|
};
|
|
4325
4325
|
|
|
4326
4326
|
// src/constants/sdk-version.ts
|
|
4327
|
-
var SDK_VERSION = "
|
|
4327
|
+
var SDK_VERSION = "5.0.0";
|
|
4328
4328
|
|
|
4329
4329
|
// src/helpers/sdk-headers.ts
|
|
4330
4330
|
var getSdkHeaders = () => ({
|
|
@@ -6369,7 +6369,7 @@ function SectionComponent(props) {
|
|
|
6369
6369
|
var section_default = SectionComponent;
|
|
6370
6370
|
|
|
6371
6371
|
// src/blocks/symbol/symbol.tsx
|
|
6372
|
-
import { onMount as onMount11, on as
|
|
6372
|
+
import { onMount as onMount11, on as on9, createEffect as createEffect9, createMemo as createMemo24, createSignal as createSignal24 } from "solid-js";
|
|
6373
6373
|
|
|
6374
6374
|
// src/components/content-variants/content-variants.tsx
|
|
6375
6375
|
import { Show as Show18, For as For9, onMount as onMount10, createSignal as createSignal23, createMemo as createMemo23 } from "solid-js";
|
|
@@ -6535,7 +6535,7 @@ var getUpdateVisibilityStylesScript = (variants, blockId, locale) => {
|
|
|
6535
6535
|
};
|
|
6536
6536
|
|
|
6537
6537
|
// src/components/content/content.tsx
|
|
6538
|
-
import { Show as Show17, createSignal as createSignal22 } from "solid-js";
|
|
6538
|
+
import { Show as Show17, on as on8, createEffect as createEffect8, createMemo as createMemo22, createSignal as createSignal22 } from "solid-js";
|
|
6539
6539
|
|
|
6540
6540
|
// src/blocks/accordion/component-info.ts
|
|
6541
6541
|
var defaultTitle = {
|
|
@@ -9727,6 +9727,42 @@ function ContentComponent(props) {
|
|
|
9727
9727
|
isExpression: false
|
|
9728
9728
|
});
|
|
9729
9729
|
}
|
|
9730
|
+
const onUpdateFn_0_props_content = createMemo22(() => props.content);
|
|
9731
|
+
const onUpdateFn_0_props_data = createMemo22(() => props.data);
|
|
9732
|
+
const onUpdateFn_0_props_locale = createMemo22(() => props.locale);
|
|
9733
|
+
function onUpdateFn_0() {
|
|
9734
|
+
const updateContentAndRootState = () => {
|
|
9735
|
+
const nextId = props.content?.id;
|
|
9736
|
+
const currentId = builderContextSignal().content?.id;
|
|
9737
|
+
if (nextId && nextId !== currentId) {
|
|
9738
|
+
builderContextSignal().content = getContentInitialValue({
|
|
9739
|
+
content: props.content,
|
|
9740
|
+
data: props.data
|
|
9741
|
+
});
|
|
9742
|
+
builderContextSignal().rootState = getRootStateInitialValue({
|
|
9743
|
+
content: props.content,
|
|
9744
|
+
data: props.data,
|
|
9745
|
+
locale: props.locale
|
|
9746
|
+
});
|
|
9747
|
+
setScriptStr(
|
|
9748
|
+
getUpdateVariantVisibilityScript({
|
|
9749
|
+
variationId: props.content?.testVariationId || "",
|
|
9750
|
+
contentId: nextId
|
|
9751
|
+
})
|
|
9752
|
+
);
|
|
9753
|
+
}
|
|
9754
|
+
};
|
|
9755
|
+
}
|
|
9756
|
+
createEffect8(
|
|
9757
|
+
on8(
|
|
9758
|
+
() => [
|
|
9759
|
+
onUpdateFn_0_props_content(),
|
|
9760
|
+
onUpdateFn_0_props_data(),
|
|
9761
|
+
onUpdateFn_0_props_locale()
|
|
9762
|
+
],
|
|
9763
|
+
onUpdateFn_0
|
|
9764
|
+
)
|
|
9765
|
+
);
|
|
9730
9766
|
return <><components_context_default.Provider
|
|
9731
9767
|
value={{
|
|
9732
9768
|
registeredComponents: registeredComponents()
|
|
@@ -9951,7 +9987,7 @@ function Symbol2(props) {
|
|
|
9951
9987
|
function onUpdateFn_0() {
|
|
9952
9988
|
setContent();
|
|
9953
9989
|
}
|
|
9954
|
-
|
|
9990
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
9955
9991
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
9956
9992
|
nonce={props.builderContext.nonce}
|
|
9957
9993
|
isNestedRender={true}
|
package/lib/node/dev.js
CHANGED
|
@@ -1216,12 +1216,12 @@ function BlockWrapper(props) {
|
|
|
1216
1216
|
var block_wrapper_default = BlockWrapper;
|
|
1217
1217
|
|
|
1218
1218
|
// src/functions/is-previewing.ts
|
|
1219
|
-
function isPreviewing(
|
|
1220
|
-
const
|
|
1221
|
-
if (!
|
|
1219
|
+
function isPreviewing(search) {
|
|
1220
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1221
|
+
if (!searchToUse) {
|
|
1222
1222
|
return false;
|
|
1223
1223
|
}
|
|
1224
|
-
const normalizedSearch = getSearchString(
|
|
1224
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1225
1225
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
@@ -1326,7 +1326,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1326
1326
|
};
|
|
1327
1327
|
|
|
1328
1328
|
// src/constants/sdk-version.ts
|
|
1329
|
-
var SDK_VERSION = "
|
|
1329
|
+
var SDK_VERSION = "5.0.0";
|
|
1330
1330
|
|
|
1331
1331
|
// src/helpers/sdk-headers.ts
|
|
1332
1332
|
var getSdkHeaders = () => ({
|
|
@@ -7277,6 +7277,12 @@ function ContentComponent(props) {
|
|
|
7277
7277
|
isExpression: false
|
|
7278
7278
|
});
|
|
7279
7279
|
}
|
|
7280
|
+
const onUpdateFn_0_props_content = createMemo(() => props.content);
|
|
7281
|
+
const onUpdateFn_0_props_data = createMemo(() => props.data);
|
|
7282
|
+
const onUpdateFn_0_props_locale = createMemo(() => props.locale);
|
|
7283
|
+
function onUpdateFn_0() {
|
|
7284
|
+
}
|
|
7285
|
+
createEffect(on(() => [onUpdateFn_0_props_content(), onUpdateFn_0_props_data(), onUpdateFn_0_props_locale()], onUpdateFn_0));
|
|
7280
7286
|
return createComponent(components_context_default.Provider, {
|
|
7281
7287
|
get value() {
|
|
7282
7288
|
return {
|
package/lib/node/dev.jsx
CHANGED
|
@@ -1210,12 +1210,12 @@ import { Show as Show2, on, createEffect, createMemo as createMemo2, createSigna
|
|
|
1210
1210
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1211
1211
|
|
|
1212
1212
|
// src/functions/is-previewing.ts
|
|
1213
|
-
function isPreviewing(
|
|
1214
|
-
const
|
|
1215
|
-
if (!
|
|
1213
|
+
function isPreviewing(search) {
|
|
1214
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1215
|
+
if (!searchToUse) {
|
|
1216
1216
|
return false;
|
|
1217
1217
|
}
|
|
1218
|
-
const normalizedSearch = getSearchString(
|
|
1218
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1219
1219
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1220
1220
|
}
|
|
1221
1221
|
|
|
@@ -1320,7 +1320,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1320
1320
|
};
|
|
1321
1321
|
|
|
1322
1322
|
// src/constants/sdk-version.ts
|
|
1323
|
-
var SDK_VERSION = "
|
|
1323
|
+
var SDK_VERSION = "5.0.0";
|
|
1324
1324
|
|
|
1325
1325
|
// src/helpers/sdk-headers.ts
|
|
1326
1326
|
var getSdkHeaders = () => ({
|
|
@@ -3371,7 +3371,7 @@ function SectionComponent(props) {
|
|
|
3371
3371
|
var section_default = SectionComponent;
|
|
3372
3372
|
|
|
3373
3373
|
// src/blocks/symbol/symbol.tsx
|
|
3374
|
-
import { onMount as onMount11, on as
|
|
3374
|
+
import { onMount as onMount11, on as on9, createEffect as createEffect9, createMemo as createMemo24, createSignal as createSignal24 } from "solid-js";
|
|
3375
3375
|
|
|
3376
3376
|
// src/components/content-variants/content-variants.tsx
|
|
3377
3377
|
import { Show as Show18, For as For9, onMount as onMount10, createSignal as createSignal23, createMemo as createMemo23 } from "solid-js";
|
|
@@ -3537,7 +3537,7 @@ var getUpdateVisibilityStylesScript = (variants, blockId, locale) => {
|
|
|
3537
3537
|
};
|
|
3538
3538
|
|
|
3539
3539
|
// src/components/content/content.tsx
|
|
3540
|
-
import { Show as Show17, createSignal as createSignal22 } from "solid-js";
|
|
3540
|
+
import { Show as Show17, on as on8, createEffect as createEffect8, createMemo as createMemo22, createSignal as createSignal22 } from "solid-js";
|
|
3541
3541
|
|
|
3542
3542
|
// src/blocks/accordion/component-info.ts
|
|
3543
3543
|
var defaultTitle = {
|
|
@@ -6737,6 +6737,42 @@ function ContentComponent(props) {
|
|
|
6737
6737
|
isExpression: false
|
|
6738
6738
|
});
|
|
6739
6739
|
}
|
|
6740
|
+
const onUpdateFn_0_props_content = createMemo22(() => props.content);
|
|
6741
|
+
const onUpdateFn_0_props_data = createMemo22(() => props.data);
|
|
6742
|
+
const onUpdateFn_0_props_locale = createMemo22(() => props.locale);
|
|
6743
|
+
function onUpdateFn_0() {
|
|
6744
|
+
const updateContentAndRootState = () => {
|
|
6745
|
+
const nextId = props.content?.id;
|
|
6746
|
+
const currentId = builderContextSignal().content?.id;
|
|
6747
|
+
if (nextId && nextId !== currentId) {
|
|
6748
|
+
builderContextSignal().content = getContentInitialValue({
|
|
6749
|
+
content: props.content,
|
|
6750
|
+
data: props.data
|
|
6751
|
+
});
|
|
6752
|
+
builderContextSignal().rootState = getRootStateInitialValue({
|
|
6753
|
+
content: props.content,
|
|
6754
|
+
data: props.data,
|
|
6755
|
+
locale: props.locale
|
|
6756
|
+
});
|
|
6757
|
+
setScriptStr(
|
|
6758
|
+
getUpdateVariantVisibilityScript({
|
|
6759
|
+
variationId: props.content?.testVariationId || "",
|
|
6760
|
+
contentId: nextId
|
|
6761
|
+
})
|
|
6762
|
+
);
|
|
6763
|
+
}
|
|
6764
|
+
};
|
|
6765
|
+
}
|
|
6766
|
+
createEffect8(
|
|
6767
|
+
on8(
|
|
6768
|
+
() => [
|
|
6769
|
+
onUpdateFn_0_props_content(),
|
|
6770
|
+
onUpdateFn_0_props_data(),
|
|
6771
|
+
onUpdateFn_0_props_locale()
|
|
6772
|
+
],
|
|
6773
|
+
onUpdateFn_0
|
|
6774
|
+
)
|
|
6775
|
+
);
|
|
6740
6776
|
return <><components_context_default.Provider
|
|
6741
6777
|
value={{
|
|
6742
6778
|
registeredComponents: registeredComponents()
|
|
@@ -6961,7 +6997,7 @@ function Symbol(props) {
|
|
|
6961
6997
|
function onUpdateFn_0() {
|
|
6962
6998
|
setContent();
|
|
6963
6999
|
}
|
|
6964
|
-
|
|
7000
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6965
7001
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6966
7002
|
nonce={props.builderContext.nonce}
|
|
6967
7003
|
isNestedRender={true}
|
package/lib/node/index.js
CHANGED
|
@@ -1207,12 +1207,12 @@ function BlockWrapper(props) {
|
|
|
1207
1207
|
var block_wrapper_default = BlockWrapper;
|
|
1208
1208
|
|
|
1209
1209
|
// src/functions/is-previewing.ts
|
|
1210
|
-
function isPreviewing(
|
|
1211
|
-
const
|
|
1212
|
-
if (!
|
|
1210
|
+
function isPreviewing(search) {
|
|
1211
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1212
|
+
if (!searchToUse) {
|
|
1213
1213
|
return false;
|
|
1214
1214
|
}
|
|
1215
|
-
const normalizedSearch = getSearchString(
|
|
1215
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1216
1216
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1217
1217
|
}
|
|
1218
1218
|
|
|
@@ -1316,7 +1316,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1316
1316
|
};
|
|
1317
1317
|
|
|
1318
1318
|
// src/constants/sdk-version.ts
|
|
1319
|
-
var SDK_VERSION = "
|
|
1319
|
+
var SDK_VERSION = "5.0.0";
|
|
1320
1320
|
|
|
1321
1321
|
// src/helpers/sdk-headers.ts
|
|
1322
1322
|
var getSdkHeaders = () => ({
|
|
@@ -7257,6 +7257,12 @@ function ContentComponent(props) {
|
|
|
7257
7257
|
isExpression: false
|
|
7258
7258
|
});
|
|
7259
7259
|
}
|
|
7260
|
+
const onUpdateFn_0_props_content = createMemo(() => props.content);
|
|
7261
|
+
const onUpdateFn_0_props_data = createMemo(() => props.data);
|
|
7262
|
+
const onUpdateFn_0_props_locale = createMemo(() => props.locale);
|
|
7263
|
+
function onUpdateFn_0() {
|
|
7264
|
+
}
|
|
7265
|
+
createEffect(on(() => [onUpdateFn_0_props_content(), onUpdateFn_0_props_data(), onUpdateFn_0_props_locale()], onUpdateFn_0));
|
|
7260
7266
|
return createComponent(components_context_default.Provider, {
|
|
7261
7267
|
get value() {
|
|
7262
7268
|
return {
|
package/lib/node/index.jsx
CHANGED
|
@@ -1203,12 +1203,12 @@ import { Show as Show2, on, createEffect, createMemo as createMemo2, createSigna
|
|
|
1203
1203
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
1204
1204
|
|
|
1205
1205
|
// src/functions/is-previewing.ts
|
|
1206
|
-
function isPreviewing(
|
|
1207
|
-
const
|
|
1208
|
-
if (!
|
|
1206
|
+
function isPreviewing(search) {
|
|
1207
|
+
const searchToUse = search || (isBrowser() ? window.location.search : void 0);
|
|
1208
|
+
if (!searchToUse) {
|
|
1209
1209
|
return false;
|
|
1210
1210
|
}
|
|
1211
|
-
const normalizedSearch = getSearchString(
|
|
1211
|
+
const normalizedSearch = getSearchString(searchToUse);
|
|
1212
1212
|
return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
@@ -1312,7 +1312,7 @@ var getBuilderSearchParamsFromWindow = () => {
|
|
|
1312
1312
|
};
|
|
1313
1313
|
|
|
1314
1314
|
// src/constants/sdk-version.ts
|
|
1315
|
-
var SDK_VERSION = "
|
|
1315
|
+
var SDK_VERSION = "5.0.0";
|
|
1316
1316
|
|
|
1317
1317
|
// src/helpers/sdk-headers.ts
|
|
1318
1318
|
var getSdkHeaders = () => ({
|
|
@@ -3357,7 +3357,7 @@ function SectionComponent(props) {
|
|
|
3357
3357
|
var section_default = SectionComponent;
|
|
3358
3358
|
|
|
3359
3359
|
// src/blocks/symbol/symbol.tsx
|
|
3360
|
-
import { onMount as onMount11, on as
|
|
3360
|
+
import { onMount as onMount11, on as on9, createEffect as createEffect9, createMemo as createMemo24, createSignal as createSignal24 } from "solid-js";
|
|
3361
3361
|
|
|
3362
3362
|
// src/components/content-variants/content-variants.tsx
|
|
3363
3363
|
import { Show as Show18, For as For9, onMount as onMount10, createSignal as createSignal23, createMemo as createMemo23 } from "solid-js";
|
|
@@ -3523,7 +3523,7 @@ var getUpdateVisibilityStylesScript = (variants, blockId, locale) => {
|
|
|
3523
3523
|
};
|
|
3524
3524
|
|
|
3525
3525
|
// src/components/content/content.tsx
|
|
3526
|
-
import { Show as Show17, createSignal as createSignal22 } from "solid-js";
|
|
3526
|
+
import { Show as Show17, on as on8, createEffect as createEffect8, createMemo as createMemo22, createSignal as createSignal22 } from "solid-js";
|
|
3527
3527
|
|
|
3528
3528
|
// src/blocks/accordion/component-info.ts
|
|
3529
3529
|
var defaultTitle = {
|
|
@@ -6715,6 +6715,42 @@ function ContentComponent(props) {
|
|
|
6715
6715
|
isExpression: false
|
|
6716
6716
|
});
|
|
6717
6717
|
}
|
|
6718
|
+
const onUpdateFn_0_props_content = createMemo22(() => props.content);
|
|
6719
|
+
const onUpdateFn_0_props_data = createMemo22(() => props.data);
|
|
6720
|
+
const onUpdateFn_0_props_locale = createMemo22(() => props.locale);
|
|
6721
|
+
function onUpdateFn_0() {
|
|
6722
|
+
const updateContentAndRootState = () => {
|
|
6723
|
+
const nextId = props.content?.id;
|
|
6724
|
+
const currentId = builderContextSignal().content?.id;
|
|
6725
|
+
if (nextId && nextId !== currentId) {
|
|
6726
|
+
builderContextSignal().content = getContentInitialValue({
|
|
6727
|
+
content: props.content,
|
|
6728
|
+
data: props.data
|
|
6729
|
+
});
|
|
6730
|
+
builderContextSignal().rootState = getRootStateInitialValue({
|
|
6731
|
+
content: props.content,
|
|
6732
|
+
data: props.data,
|
|
6733
|
+
locale: props.locale
|
|
6734
|
+
});
|
|
6735
|
+
setScriptStr(
|
|
6736
|
+
getUpdateVariantVisibilityScript({
|
|
6737
|
+
variationId: props.content?.testVariationId || "",
|
|
6738
|
+
contentId: nextId
|
|
6739
|
+
})
|
|
6740
|
+
);
|
|
6741
|
+
}
|
|
6742
|
+
};
|
|
6743
|
+
}
|
|
6744
|
+
createEffect8(
|
|
6745
|
+
on8(
|
|
6746
|
+
() => [
|
|
6747
|
+
onUpdateFn_0_props_content(),
|
|
6748
|
+
onUpdateFn_0_props_data(),
|
|
6749
|
+
onUpdateFn_0_props_locale()
|
|
6750
|
+
],
|
|
6751
|
+
onUpdateFn_0
|
|
6752
|
+
)
|
|
6753
|
+
);
|
|
6718
6754
|
return <><components_context_default.Provider
|
|
6719
6755
|
value={{
|
|
6720
6756
|
registeredComponents: registeredComponents()
|
|
@@ -6939,7 +6975,7 @@ function Symbol(props) {
|
|
|
6939
6975
|
function onUpdateFn_0() {
|
|
6940
6976
|
setContent();
|
|
6941
6977
|
}
|
|
6942
|
-
|
|
6978
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
6943
6979
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
6944
6980
|
nonce={props.builderContext.nonce}
|
|
6945
6981
|
isNestedRender={true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-solid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"build:browser": "SDK_ENV=browser yarn build:one"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"isolated-vm": "^
|
|
90
|
+
"isolated-vm": "^6.0.0",
|
|
91
91
|
"solid-styled-components": "^0.27.6"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|