@builder.io/sdk-solid 2.0.28 → 2.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/dev.js +41 -18
- package/lib/browser/dev.jsx +45 -25
- package/lib/browser/index.js +41 -18
- package/lib/browser/index.jsx +45 -25
- package/lib/edge/dev.js +41 -18
- package/lib/edge/dev.jsx +45 -25
- package/lib/edge/index.js +41 -18
- package/lib/edge/index.jsx +45 -25
- package/lib/node/dev.js +41 -18
- package/lib/node/dev.jsx +45 -25
- package/lib/node/index.js +41 -18
- package/lib/node/index.jsx +45 -25
- package/package.json +1 -1
package/lib/browser/index.jsx
CHANGED
|
@@ -1357,6 +1357,13 @@ function BlocksWrapper(props) {
|
|
|
1357
1357
|
props.classNameProp
|
|
1358
1358
|
].filter(Boolean).join(" ");
|
|
1359
1359
|
});
|
|
1360
|
+
const dataPath = createMemo6(() => {
|
|
1361
|
+
if (!props.path) {
|
|
1362
|
+
return void 0;
|
|
1363
|
+
}
|
|
1364
|
+
const pathPrefix = "component.options.";
|
|
1365
|
+
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1366
|
+
});
|
|
1360
1367
|
function onClick() {
|
|
1361
1368
|
if (isEditing() && !props.blocks?.length) {
|
|
1362
1369
|
window.parent?.postMessage(
|
|
@@ -1364,7 +1371,7 @@ function BlocksWrapper(props) {
|
|
|
1364
1371
|
type: "builder.clickEmptyBlocks",
|
|
1365
1372
|
data: {
|
|
1366
1373
|
parentElementId: props.parent,
|
|
1367
|
-
dataPath:
|
|
1374
|
+
dataPath: dataPath()
|
|
1368
1375
|
}
|
|
1369
1376
|
},
|
|
1370
1377
|
"*"
|
|
@@ -1378,7 +1385,7 @@ function BlocksWrapper(props) {
|
|
|
1378
1385
|
type: "builder.hoverEmptyBlocks",
|
|
1379
1386
|
data: {
|
|
1380
1387
|
parentElementId: props.parent,
|
|
1381
|
-
dataPath:
|
|
1388
|
+
dataPath: dataPath()
|
|
1382
1389
|
}
|
|
1383
1390
|
},
|
|
1384
1391
|
"*"
|
|
@@ -1390,9 +1397,9 @@ function BlocksWrapper(props) {
|
|
|
1390
1397
|
});
|
|
1391
1398
|
return <>
|
|
1392
1399
|
<Dynamic4
|
|
1393
|
-
class={className() + " dynamic-
|
|
1400
|
+
class={className() + " dynamic-5b6a86b6"}
|
|
1394
1401
|
ref={blocksWrapperRef}
|
|
1395
|
-
builder-path={
|
|
1402
|
+
builder-path={dataPath()}
|
|
1396
1403
|
builder-parent-id={props.parent}
|
|
1397
1404
|
{...{}}
|
|
1398
1405
|
style={props.styleProp}
|
|
@@ -1402,7 +1409,7 @@ function BlocksWrapper(props) {
|
|
|
1402
1409
|
{...props.BlocksWrapperProps}
|
|
1403
1410
|
component={props.BlocksWrapper}
|
|
1404
1411
|
>{props.children}</Dynamic4>
|
|
1405
|
-
<style>{`.dynamic-
|
|
1412
|
+
<style>{`.dynamic-5b6a86b6 {
|
|
1406
1413
|
display: flex;
|
|
1407
1414
|
flex-direction: column;
|
|
1408
1415
|
align-items: stretch;
|
|
@@ -1567,7 +1574,7 @@ function Columns(props) {
|
|
|
1567
1574
|
}
|
|
1568
1575
|
return <>
|
|
1569
1576
|
<div
|
|
1570
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1577
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
|
|
1571
1578
|
style={columnsCssVars()}
|
|
1572
1579
|
{...{}}
|
|
1573
1580
|
>
|
|
@@ -1584,7 +1591,7 @@ function Columns(props) {
|
|
|
1584
1591
|
actionAttributes={{}}
|
|
1585
1592
|
attributes={getAttributes(column, index)}
|
|
1586
1593
|
><Blocks_default
|
|
1587
|
-
path={`
|
|
1594
|
+
path={`columns.${index}.blocks`}
|
|
1588
1595
|
parent={props.builderBlock.id}
|
|
1589
1596
|
styleProp={{
|
|
1590
1597
|
flexGrow: "1"
|
|
@@ -1596,7 +1603,7 @@ function Columns(props) {
|
|
|
1596
1603
|
/></Dynamic_renderer_default>;
|
|
1597
1604
|
}}</For4>
|
|
1598
1605
|
</div>
|
|
1599
|
-
<style>{`.div-
|
|
1606
|
+
<style>{`.div-2ac94efa {
|
|
1600
1607
|
display: flex;
|
|
1601
1608
|
line-height: normal;
|
|
1602
1609
|
}`}</style>
|
|
@@ -2226,9 +2233,11 @@ function Accordion(props) {
|
|
|
2226
2233
|
class={getAccordionTitleClassName(index)}
|
|
2227
2234
|
style={{
|
|
2228
2235
|
...accordionTitleStyles(),
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2236
|
+
...props.grid && {
|
|
2237
|
+
width: props.gridRowWidth,
|
|
2238
|
+
...{
|
|
2239
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2240
|
+
}
|
|
2232
2241
|
}
|
|
2233
2242
|
}}
|
|
2234
2243
|
data-index={index}
|
|
@@ -2966,7 +2975,7 @@ function Tabs(props) {
|
|
|
2966
2975
|
onClick={(event) => onClick(index)}
|
|
2967
2976
|
><Blocks_default
|
|
2968
2977
|
parent={props.builderBlock.id}
|
|
2969
|
-
path={`
|
|
2978
|
+
path={`tabs.${index}.label`}
|
|
2970
2979
|
blocks={tab.label}
|
|
2971
2980
|
context={props.builderContext}
|
|
2972
2981
|
registeredComponents={props.builderComponents}
|
|
@@ -2975,7 +2984,7 @@ function Tabs(props) {
|
|
|
2975
2984
|
}}</For6></div>
|
|
2976
2985
|
<Show10 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
2977
2986
|
parent={props.builderBlock.id}
|
|
2978
|
-
path={`
|
|
2987
|
+
path={`tabs.${activeTab()}.content`}
|
|
2979
2988
|
blocks={activeTabContent(activeTab())}
|
|
2980
2989
|
context={props.builderContext}
|
|
2981
2990
|
registeredComponents={props.builderComponents}
|
|
@@ -3430,6 +3439,15 @@ var getEnv = () => {
|
|
|
3430
3439
|
return validEnvList.includes(env) ? env : "production";
|
|
3431
3440
|
};
|
|
3432
3441
|
|
|
3442
|
+
// src/functions/log-fetch.ts
|
|
3443
|
+
function logFetch(url) {
|
|
3444
|
+
if (typeof process !== "undefined" && process.env?.DEBUG) {
|
|
3445
|
+
if (String(process.env.DEBUG) == "true") {
|
|
3446
|
+
logger.log(url);
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3433
3451
|
// src/blocks/form/form/form.tsx
|
|
3434
3452
|
function FormComponent(props) {
|
|
3435
3453
|
const [formState, setFormState] = createSignal14("unsubmitted");
|
|
@@ -3536,14 +3554,13 @@ function FormComponent(props) {
|
|
|
3536
3554
|
const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(
|
|
3537
3555
|
props.sendSubmissionsToEmail || ""
|
|
3538
3556
|
)}&name=${encodeURIComponent(props.name || "")}`;
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
).then(
|
|
3557
|
+
const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
|
|
3558
|
+
logFetch(url);
|
|
3559
|
+
fetch(url, {
|
|
3560
|
+
body,
|
|
3561
|
+
headers,
|
|
3562
|
+
method: props.method || "post"
|
|
3563
|
+
}).then(
|
|
3547
3564
|
async (res) => {
|
|
3548
3565
|
let body2;
|
|
3549
3566
|
const contentType = res.headers.get("content-type");
|
|
@@ -3650,14 +3667,14 @@ function FormComponent(props) {
|
|
|
3650
3667
|
blocks={props.sendingMessage}
|
|
3651
3668
|
context={props.builderContext}
|
|
3652
3669
|
/></Show11>
|
|
3653
|
-
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-
|
|
3670
|
+
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-6210236e">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
|
|
3654
3671
|
<Show11 when={submissionState() === "success"}><Blocks_default
|
|
3655
3672
|
path="successMessage"
|
|
3656
3673
|
blocks={props.successMessage}
|
|
3657
3674
|
context={props.builderContext}
|
|
3658
3675
|
/></Show11>
|
|
3659
3676
|
</form>
|
|
3660
|
-
<style>{`.pre-
|
|
3677
|
+
<style>{`.pre-6210236e {
|
|
3661
3678
|
padding: 10px;
|
|
3662
3679
|
color: red;
|
|
3663
3680
|
text-align: center;
|
|
@@ -4248,7 +4265,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4248
4265
|
}
|
|
4249
4266
|
|
|
4250
4267
|
// src/constants/sdk-version.ts
|
|
4251
|
-
var SDK_VERSION = "2.0.
|
|
4268
|
+
var SDK_VERSION = "2.0.30";
|
|
4252
4269
|
|
|
4253
4270
|
// src/helpers/sdk-headers.ts
|
|
4254
4271
|
var getSdkHeaders = () => ({
|
|
@@ -4673,7 +4690,9 @@ async function _track({
|
|
|
4673
4690
|
return;
|
|
4674
4691
|
}
|
|
4675
4692
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
4676
|
-
|
|
4693
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
4694
|
+
logFetch(url);
|
|
4695
|
+
return fetch(url, {
|
|
4677
4696
|
method: "POST",
|
|
4678
4697
|
body: JSON.stringify({
|
|
4679
4698
|
events: [await createEvent(eventProps)]
|
|
@@ -5150,6 +5169,7 @@ function EnableEditor(props) {
|
|
|
5150
5169
|
})
|
|
5151
5170
|
)
|
|
5152
5171
|
);
|
|
5172
|
+
logFetch(evaluatedUrl);
|
|
5153
5173
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
5154
5174
|
mergeNewRootState({
|
|
5155
5175
|
[key]: json
|
package/lib/edge/dev.js
CHANGED
|
@@ -4704,7 +4704,7 @@ function Block(props) {
|
|
|
4704
4704
|
});
|
|
4705
4705
|
}
|
|
4706
4706
|
var block_default = Block;
|
|
4707
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-
|
|
4707
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-5b6a86b6 {
|
|
4708
4708
|
display: flex;
|
|
4709
4709
|
flex-direction: column;
|
|
4710
4710
|
align-items: stretch;
|
|
@@ -4713,13 +4713,20 @@ function BlocksWrapper(props) {
|
|
|
4713
4713
|
const className = createMemo(() => {
|
|
4714
4714
|
return ["builder-blocks", !props.blocks?.length ? "no-blocks" : "", props.classNameProp].filter(Boolean).join(" ");
|
|
4715
4715
|
});
|
|
4716
|
+
const dataPath = createMemo(() => {
|
|
4717
|
+
if (!props.path) {
|
|
4718
|
+
return void 0;
|
|
4719
|
+
}
|
|
4720
|
+
const pathPrefix = "component.options.";
|
|
4721
|
+
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
4722
|
+
});
|
|
4716
4723
|
function onClick() {
|
|
4717
4724
|
if (isEditing() && !props.blocks?.length) {
|
|
4718
4725
|
window.parent?.postMessage({
|
|
4719
4726
|
type: "builder.clickEmptyBlocks",
|
|
4720
4727
|
data: {
|
|
4721
4728
|
parentElementId: props.parent,
|
|
4722
|
-
dataPath:
|
|
4729
|
+
dataPath: dataPath()
|
|
4723
4730
|
}
|
|
4724
4731
|
}, "*");
|
|
4725
4732
|
}
|
|
@@ -4730,7 +4737,7 @@ function BlocksWrapper(props) {
|
|
|
4730
4737
|
type: "builder.hoverEmptyBlocks",
|
|
4731
4738
|
data: {
|
|
4732
4739
|
parentElementId: props.parent,
|
|
4733
|
-
dataPath:
|
|
4740
|
+
dataPath: dataPath()
|
|
4734
4741
|
}
|
|
4735
4742
|
}, "*");
|
|
4736
4743
|
}
|
|
@@ -4740,14 +4747,14 @@ function BlocksWrapper(props) {
|
|
|
4740
4747
|
});
|
|
4741
4748
|
return [createComponent(Dynamic, mergeProps({
|
|
4742
4749
|
get ["class"]() {
|
|
4743
|
-
return className() + " dynamic-
|
|
4750
|
+
return className() + " dynamic-5b6a86b6";
|
|
4744
4751
|
},
|
|
4745
4752
|
ref(r$) {
|
|
4746
4753
|
const _ref$ = blocksWrapperRef;
|
|
4747
4754
|
typeof _ref$ === "function" ? _ref$(r$) : blocksWrapperRef = r$;
|
|
4748
4755
|
},
|
|
4749
4756
|
get ["builder-path"]() {
|
|
4750
|
-
return
|
|
4757
|
+
return dataPath();
|
|
4751
4758
|
},
|
|
4752
4759
|
get ["builder-parent-id"]() {
|
|
4753
4760
|
return props.parent;
|
|
@@ -4839,7 +4846,7 @@ var getColumnsClass = (id2) => {
|
|
|
4839
4846
|
|
|
4840
4847
|
// src/blocks/columns/columns.tsx
|
|
4841
4848
|
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
4842
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-
|
|
4849
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-2ac94efa {
|
|
4843
4850
|
display: flex;
|
|
4844
4851
|
line-height: normal;
|
|
4845
4852
|
}`);
|
|
@@ -4968,7 +4975,7 @@ function Columns(props) {
|
|
|
4968
4975
|
const _el$ = _tmpl$3();
|
|
4969
4976
|
spread(_el$, mergeProps({
|
|
4970
4977
|
get ["class"]() {
|
|
4971
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
4978
|
+
return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
|
|
4972
4979
|
},
|
|
4973
4980
|
get style() {
|
|
4974
4981
|
return columnsCssVars();
|
|
@@ -5005,7 +5012,7 @@ function Columns(props) {
|
|
|
5005
5012
|
},
|
|
5006
5013
|
get children() {
|
|
5007
5014
|
return createComponent(blocks_default, {
|
|
5008
|
-
path: `
|
|
5015
|
+
path: `columns.${index}.blocks`,
|
|
5009
5016
|
get parent() {
|
|
5010
5017
|
return props.builderBlock.id;
|
|
5011
5018
|
},
|
|
@@ -5699,9 +5706,11 @@ function Accordion(props) {
|
|
|
5699
5706
|
effect((_p$) => {
|
|
5700
5707
|
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
5701
5708
|
...accordionTitleStyles(),
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5709
|
+
...props.grid && {
|
|
5710
|
+
width: props.gridRowWidth,
|
|
5711
|
+
...{
|
|
5712
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5713
|
+
}
|
|
5705
5714
|
}
|
|
5706
5715
|
};
|
|
5707
5716
|
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
@@ -6474,7 +6483,7 @@ function Tabs(props) {
|
|
|
6474
6483
|
get parent() {
|
|
6475
6484
|
return props.builderBlock.id;
|
|
6476
6485
|
},
|
|
6477
|
-
path: `
|
|
6486
|
+
path: `tabs.${index}.label`,
|
|
6478
6487
|
get blocks() {
|
|
6479
6488
|
return tab.label;
|
|
6480
6489
|
},
|
|
@@ -6514,7 +6523,7 @@ function Tabs(props) {
|
|
|
6514
6523
|
return props.builderBlock.id;
|
|
6515
6524
|
},
|
|
6516
6525
|
get path() {
|
|
6517
|
-
return `
|
|
6526
|
+
return `tabs.${activeTab()}.content`;
|
|
6518
6527
|
},
|
|
6519
6528
|
get blocks() {
|
|
6520
6529
|
return activeTabContent(activeTab());
|
|
@@ -6983,10 +6992,19 @@ var getEnv = () => {
|
|
|
6983
6992
|
return validEnvList.includes(env) ? env : "production";
|
|
6984
6993
|
};
|
|
6985
6994
|
|
|
6995
|
+
// src/functions/log-fetch.ts
|
|
6996
|
+
function logFetch(url) {
|
|
6997
|
+
if (typeof process !== "undefined" && process.env?.DEBUG) {
|
|
6998
|
+
if (String(process.env.DEBUG) == "true") {
|
|
6999
|
+
logger.log(url);
|
|
7000
|
+
}
|
|
7001
|
+
}
|
|
7002
|
+
}
|
|
7003
|
+
|
|
6986
7004
|
// src/blocks/form/form/form.tsx
|
|
6987
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-
|
|
7005
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-6210236e">`);
|
|
6988
7006
|
var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
|
|
6989
|
-
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-
|
|
7007
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-6210236e {
|
|
6990
7008
|
padding: 10px;
|
|
6991
7009
|
color: red;
|
|
6992
7010
|
text-align: center;
|
|
@@ -7099,7 +7117,9 @@ function FormComponent(props) {
|
|
|
7099
7117
|
}
|
|
7100
7118
|
setFormState("sending");
|
|
7101
7119
|
const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
|
|
7102
|
-
|
|
7120
|
+
const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
|
|
7121
|
+
logFetch(url);
|
|
7122
|
+
fetch(url, {
|
|
7103
7123
|
body,
|
|
7104
7124
|
headers,
|
|
7105
7125
|
method: props.method || "post"
|
|
@@ -7957,7 +7977,7 @@ function getPreviewContent(_searchParams) {
|
|
|
7957
7977
|
}
|
|
7958
7978
|
|
|
7959
7979
|
// src/constants/sdk-version.ts
|
|
7960
|
-
var SDK_VERSION = "2.0.
|
|
7980
|
+
var SDK_VERSION = "2.0.30";
|
|
7961
7981
|
|
|
7962
7982
|
// src/helpers/sdk-headers.ts
|
|
7963
7983
|
var getSdkHeaders = () => ({
|
|
@@ -8386,7 +8406,9 @@ async function _track({
|
|
|
8386
8406
|
return;
|
|
8387
8407
|
}
|
|
8388
8408
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
8389
|
-
|
|
8409
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
8410
|
+
logFetch(url);
|
|
8411
|
+
return fetch(url, {
|
|
8390
8412
|
method: "POST",
|
|
8391
8413
|
body: JSON.stringify({
|
|
8392
8414
|
events: [await createEvent(eventProps)]
|
|
@@ -8861,6 +8883,7 @@ function EnableEditor(props) {
|
|
|
8861
8883
|
rootState: props.builderContextSignal.rootState,
|
|
8862
8884
|
rootSetState: props.builderContextSignal.rootSetState
|
|
8863
8885
|
})));
|
|
8886
|
+
logFetch(evaluatedUrl);
|
|
8864
8887
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
8865
8888
|
mergeNewRootState({
|
|
8866
8889
|
[key]: json
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -4548,6 +4548,13 @@ function BlocksWrapper(props) {
|
|
|
4548
4548
|
props.classNameProp
|
|
4549
4549
|
].filter(Boolean).join(" ");
|
|
4550
4550
|
});
|
|
4551
|
+
const dataPath = createMemo6(() => {
|
|
4552
|
+
if (!props.path) {
|
|
4553
|
+
return void 0;
|
|
4554
|
+
}
|
|
4555
|
+
const pathPrefix = "component.options.";
|
|
4556
|
+
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
4557
|
+
});
|
|
4551
4558
|
function onClick() {
|
|
4552
4559
|
if (isEditing() && !props.blocks?.length) {
|
|
4553
4560
|
window.parent?.postMessage(
|
|
@@ -4555,7 +4562,7 @@ function BlocksWrapper(props) {
|
|
|
4555
4562
|
type: "builder.clickEmptyBlocks",
|
|
4556
4563
|
data: {
|
|
4557
4564
|
parentElementId: props.parent,
|
|
4558
|
-
dataPath:
|
|
4565
|
+
dataPath: dataPath()
|
|
4559
4566
|
}
|
|
4560
4567
|
},
|
|
4561
4568
|
"*"
|
|
@@ -4569,7 +4576,7 @@ function BlocksWrapper(props) {
|
|
|
4569
4576
|
type: "builder.hoverEmptyBlocks",
|
|
4570
4577
|
data: {
|
|
4571
4578
|
parentElementId: props.parent,
|
|
4572
|
-
dataPath:
|
|
4579
|
+
dataPath: dataPath()
|
|
4573
4580
|
}
|
|
4574
4581
|
},
|
|
4575
4582
|
"*"
|
|
@@ -4581,9 +4588,9 @@ function BlocksWrapper(props) {
|
|
|
4581
4588
|
});
|
|
4582
4589
|
return <>
|
|
4583
4590
|
<Dynamic4
|
|
4584
|
-
class={className() + " dynamic-
|
|
4591
|
+
class={className() + " dynamic-5b6a86b6"}
|
|
4585
4592
|
ref={blocksWrapperRef}
|
|
4586
|
-
builder-path={
|
|
4593
|
+
builder-path={dataPath()}
|
|
4587
4594
|
builder-parent-id={props.parent}
|
|
4588
4595
|
{...{}}
|
|
4589
4596
|
style={props.styleProp}
|
|
@@ -4593,7 +4600,7 @@ function BlocksWrapper(props) {
|
|
|
4593
4600
|
{...props.BlocksWrapperProps}
|
|
4594
4601
|
component={props.BlocksWrapper}
|
|
4595
4602
|
>{props.children}</Dynamic4>
|
|
4596
|
-
<style>{`.dynamic-
|
|
4603
|
+
<style>{`.dynamic-5b6a86b6 {
|
|
4597
4604
|
display: flex;
|
|
4598
4605
|
flex-direction: column;
|
|
4599
4606
|
align-items: stretch;
|
|
@@ -4758,7 +4765,7 @@ function Columns(props) {
|
|
|
4758
4765
|
}
|
|
4759
4766
|
return <>
|
|
4760
4767
|
<div
|
|
4761
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
4768
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
|
|
4762
4769
|
style={columnsCssVars()}
|
|
4763
4770
|
{...{}}
|
|
4764
4771
|
>
|
|
@@ -4775,7 +4782,7 @@ function Columns(props) {
|
|
|
4775
4782
|
actionAttributes={{}}
|
|
4776
4783
|
attributes={getAttributes(column, index)}
|
|
4777
4784
|
><Blocks_default
|
|
4778
|
-
path={`
|
|
4785
|
+
path={`columns.${index}.blocks`}
|
|
4779
4786
|
parent={props.builderBlock.id}
|
|
4780
4787
|
styleProp={{
|
|
4781
4788
|
flexGrow: "1"
|
|
@@ -4787,7 +4794,7 @@ function Columns(props) {
|
|
|
4787
4794
|
/></Dynamic_renderer_default>;
|
|
4788
4795
|
}}</For4>
|
|
4789
4796
|
</div>
|
|
4790
|
-
<style>{`.div-
|
|
4797
|
+
<style>{`.div-2ac94efa {
|
|
4791
4798
|
display: flex;
|
|
4792
4799
|
line-height: normal;
|
|
4793
4800
|
}`}</style>
|
|
@@ -5418,9 +5425,11 @@ function Accordion(props) {
|
|
|
5418
5425
|
class={getAccordionTitleClassName(index)}
|
|
5419
5426
|
style={{
|
|
5420
5427
|
...accordionTitleStyles(),
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5428
|
+
...props.grid && {
|
|
5429
|
+
width: props.gridRowWidth,
|
|
5430
|
+
...{
|
|
5431
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5432
|
+
}
|
|
5424
5433
|
}
|
|
5425
5434
|
}}
|
|
5426
5435
|
data-index={index}
|
|
@@ -6159,7 +6168,7 @@ function Tabs(props) {
|
|
|
6159
6168
|
onClick={(event) => onClick(index)}
|
|
6160
6169
|
><Blocks_default
|
|
6161
6170
|
parent={props.builderBlock.id}
|
|
6162
|
-
path={`
|
|
6171
|
+
path={`tabs.${index}.label`}
|
|
6163
6172
|
blocks={tab.label}
|
|
6164
6173
|
context={props.builderContext}
|
|
6165
6174
|
registeredComponents={props.builderComponents}
|
|
@@ -6168,7 +6177,7 @@ function Tabs(props) {
|
|
|
6168
6177
|
}}</For6></div>
|
|
6169
6178
|
<Show10 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
6170
6179
|
parent={props.builderBlock.id}
|
|
6171
|
-
path={`
|
|
6180
|
+
path={`tabs.${activeTab()}.content`}
|
|
6172
6181
|
blocks={activeTabContent(activeTab())}
|
|
6173
6182
|
context={props.builderContext}
|
|
6174
6183
|
registeredComponents={props.builderComponents}
|
|
@@ -6625,6 +6634,15 @@ var getEnv = () => {
|
|
|
6625
6634
|
return validEnvList.includes(env) ? env : "production";
|
|
6626
6635
|
};
|
|
6627
6636
|
|
|
6637
|
+
// src/functions/log-fetch.ts
|
|
6638
|
+
function logFetch(url) {
|
|
6639
|
+
if (typeof process !== "undefined" && process.env?.DEBUG) {
|
|
6640
|
+
if (String(process.env.DEBUG) == "true") {
|
|
6641
|
+
logger.log(url);
|
|
6642
|
+
}
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
|
|
6628
6646
|
// src/blocks/form/form/form.tsx
|
|
6629
6647
|
function FormComponent(props) {
|
|
6630
6648
|
const [formState, setFormState] = createSignal14("unsubmitted");
|
|
@@ -6731,14 +6749,13 @@ function FormComponent(props) {
|
|
|
6731
6749
|
const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(
|
|
6732
6750
|
props.sendSubmissionsToEmail || ""
|
|
6733
6751
|
)}&name=${encodeURIComponent(props.name || "")}`;
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
).then(
|
|
6752
|
+
const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
|
|
6753
|
+
logFetch(url);
|
|
6754
|
+
fetch(url, {
|
|
6755
|
+
body,
|
|
6756
|
+
headers,
|
|
6757
|
+
method: props.method || "post"
|
|
6758
|
+
}).then(
|
|
6742
6759
|
async (res) => {
|
|
6743
6760
|
let body2;
|
|
6744
6761
|
const contentType = res.headers.get("content-type");
|
|
@@ -6845,14 +6862,14 @@ function FormComponent(props) {
|
|
|
6845
6862
|
blocks={props.sendingMessage}
|
|
6846
6863
|
context={props.builderContext}
|
|
6847
6864
|
/></Show11>
|
|
6848
|
-
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-
|
|
6865
|
+
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-6210236e">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
|
|
6849
6866
|
<Show11 when={submissionState() === "success"}><Blocks_default
|
|
6850
6867
|
path="successMessage"
|
|
6851
6868
|
blocks={props.successMessage}
|
|
6852
6869
|
context={props.builderContext}
|
|
6853
6870
|
/></Show11>
|
|
6854
6871
|
</form>
|
|
6855
|
-
<style>{`.pre-
|
|
6872
|
+
<style>{`.pre-6210236e {
|
|
6856
6873
|
padding: 10px;
|
|
6857
6874
|
color: red;
|
|
6858
6875
|
text-align: center;
|
|
@@ -7443,7 +7460,7 @@ function getPreviewContent(_searchParams) {
|
|
|
7443
7460
|
}
|
|
7444
7461
|
|
|
7445
7462
|
// src/constants/sdk-version.ts
|
|
7446
|
-
var SDK_VERSION = "2.0.
|
|
7463
|
+
var SDK_VERSION = "2.0.30";
|
|
7447
7464
|
|
|
7448
7465
|
// src/helpers/sdk-headers.ts
|
|
7449
7466
|
var getSdkHeaders = () => ({
|
|
@@ -7872,7 +7889,9 @@ async function _track({
|
|
|
7872
7889
|
return;
|
|
7873
7890
|
}
|
|
7874
7891
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
7875
|
-
|
|
7892
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
7893
|
+
logFetch(url);
|
|
7894
|
+
return fetch(url, {
|
|
7876
7895
|
method: "POST",
|
|
7877
7896
|
body: JSON.stringify({
|
|
7878
7897
|
events: [await createEvent(eventProps)]
|
|
@@ -8351,6 +8370,7 @@ function EnableEditor(props) {
|
|
|
8351
8370
|
})
|
|
8352
8371
|
)
|
|
8353
8372
|
);
|
|
8373
|
+
logFetch(evaluatedUrl);
|
|
8354
8374
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
8355
8375
|
mergeNewRootState({
|
|
8356
8376
|
[key]: json
|