@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/dev.js
CHANGED
|
@@ -1521,7 +1521,7 @@ function Block(props) {
|
|
|
1521
1521
|
});
|
|
1522
1522
|
}
|
|
1523
1523
|
var block_default = Block;
|
|
1524
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-
|
|
1524
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-5b6a86b6 {
|
|
1525
1525
|
display: flex;
|
|
1526
1526
|
flex-direction: column;
|
|
1527
1527
|
align-items: stretch;
|
|
@@ -1530,13 +1530,20 @@ function BlocksWrapper(props) {
|
|
|
1530
1530
|
const className = createMemo(() => {
|
|
1531
1531
|
return ["builder-blocks", !props.blocks?.length ? "no-blocks" : "", props.classNameProp].filter(Boolean).join(" ");
|
|
1532
1532
|
});
|
|
1533
|
+
const dataPath = createMemo(() => {
|
|
1534
|
+
if (!props.path) {
|
|
1535
|
+
return void 0;
|
|
1536
|
+
}
|
|
1537
|
+
const pathPrefix = "component.options.";
|
|
1538
|
+
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1539
|
+
});
|
|
1533
1540
|
function onClick() {
|
|
1534
1541
|
if (isEditing() && !props.blocks?.length) {
|
|
1535
1542
|
window.parent?.postMessage({
|
|
1536
1543
|
type: "builder.clickEmptyBlocks",
|
|
1537
1544
|
data: {
|
|
1538
1545
|
parentElementId: props.parent,
|
|
1539
|
-
dataPath:
|
|
1546
|
+
dataPath: dataPath()
|
|
1540
1547
|
}
|
|
1541
1548
|
}, "*");
|
|
1542
1549
|
}
|
|
@@ -1547,7 +1554,7 @@ function BlocksWrapper(props) {
|
|
|
1547
1554
|
type: "builder.hoverEmptyBlocks",
|
|
1548
1555
|
data: {
|
|
1549
1556
|
parentElementId: props.parent,
|
|
1550
|
-
dataPath:
|
|
1557
|
+
dataPath: dataPath()
|
|
1551
1558
|
}
|
|
1552
1559
|
}, "*");
|
|
1553
1560
|
}
|
|
@@ -1557,14 +1564,14 @@ function BlocksWrapper(props) {
|
|
|
1557
1564
|
});
|
|
1558
1565
|
return [createComponent(Dynamic, mergeProps({
|
|
1559
1566
|
get ["class"]() {
|
|
1560
|
-
return className() + " dynamic-
|
|
1567
|
+
return className() + " dynamic-5b6a86b6";
|
|
1561
1568
|
},
|
|
1562
1569
|
ref(r$) {
|
|
1563
1570
|
const _ref$ = blocksWrapperRef;
|
|
1564
1571
|
typeof _ref$ === "function" ? _ref$(r$) : blocksWrapperRef = r$;
|
|
1565
1572
|
},
|
|
1566
1573
|
get ["builder-path"]() {
|
|
1567
|
-
return
|
|
1574
|
+
return dataPath();
|
|
1568
1575
|
},
|
|
1569
1576
|
get ["builder-parent-id"]() {
|
|
1570
1577
|
return props.parent;
|
|
@@ -1656,7 +1663,7 @@ var getColumnsClass = (id) => {
|
|
|
1656
1663
|
|
|
1657
1664
|
// src/blocks/columns/columns.tsx
|
|
1658
1665
|
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1659
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-
|
|
1666
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-2ac94efa {
|
|
1660
1667
|
display: flex;
|
|
1661
1668
|
line-height: normal;
|
|
1662
1669
|
}`);
|
|
@@ -1785,7 +1792,7 @@ function Columns(props) {
|
|
|
1785
1792
|
const _el$ = _tmpl$3();
|
|
1786
1793
|
spread(_el$, mergeProps({
|
|
1787
1794
|
get ["class"]() {
|
|
1788
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
1795
|
+
return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
|
|
1789
1796
|
},
|
|
1790
1797
|
get style() {
|
|
1791
1798
|
return columnsCssVars();
|
|
@@ -1822,7 +1829,7 @@ function Columns(props) {
|
|
|
1822
1829
|
},
|
|
1823
1830
|
get children() {
|
|
1824
1831
|
return createComponent(blocks_default, {
|
|
1825
|
-
path: `
|
|
1832
|
+
path: `columns.${index}.blocks`,
|
|
1826
1833
|
get parent() {
|
|
1827
1834
|
return props.builderBlock.id;
|
|
1828
1835
|
},
|
|
@@ -2516,9 +2523,11 @@ function Accordion(props) {
|
|
|
2516
2523
|
effect((_p$) => {
|
|
2517
2524
|
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
2518
2525
|
...accordionTitleStyles(),
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2526
|
+
...props.grid && {
|
|
2527
|
+
width: props.gridRowWidth,
|
|
2528
|
+
...{
|
|
2529
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2530
|
+
}
|
|
2522
2531
|
}
|
|
2523
2532
|
};
|
|
2524
2533
|
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
@@ -3291,7 +3300,7 @@ function Tabs(props) {
|
|
|
3291
3300
|
get parent() {
|
|
3292
3301
|
return props.builderBlock.id;
|
|
3293
3302
|
},
|
|
3294
|
-
path: `
|
|
3303
|
+
path: `tabs.${index}.label`,
|
|
3295
3304
|
get blocks() {
|
|
3296
3305
|
return tab.label;
|
|
3297
3306
|
},
|
|
@@ -3331,7 +3340,7 @@ function Tabs(props) {
|
|
|
3331
3340
|
return props.builderBlock.id;
|
|
3332
3341
|
},
|
|
3333
3342
|
get path() {
|
|
3334
|
-
return `
|
|
3343
|
+
return `tabs.${activeTab()}.content`;
|
|
3335
3344
|
},
|
|
3336
3345
|
get blocks() {
|
|
3337
3346
|
return activeTabContent(activeTab());
|
|
@@ -3800,10 +3809,19 @@ var getEnv = () => {
|
|
|
3800
3809
|
return validEnvList.includes(env) ? env : "production";
|
|
3801
3810
|
};
|
|
3802
3811
|
|
|
3812
|
+
// src/functions/log-fetch.ts
|
|
3813
|
+
function logFetch(url) {
|
|
3814
|
+
if (typeof process !== "undefined" && process.env?.DEBUG) {
|
|
3815
|
+
if (String(process.env.DEBUG) == "true") {
|
|
3816
|
+
logger.log(url);
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3803
3821
|
// src/blocks/form/form/form.tsx
|
|
3804
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-
|
|
3822
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-6210236e">`);
|
|
3805
3823
|
var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
|
|
3806
|
-
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-
|
|
3824
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-6210236e {
|
|
3807
3825
|
padding: 10px;
|
|
3808
3826
|
color: red;
|
|
3809
3827
|
text-align: center;
|
|
@@ -3916,7 +3934,9 @@ function FormComponent(props) {
|
|
|
3916
3934
|
}
|
|
3917
3935
|
setFormState("sending");
|
|
3918
3936
|
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 || "")}`;
|
|
3919
|
-
|
|
3937
|
+
const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
|
|
3938
|
+
logFetch(url);
|
|
3939
|
+
fetch(url, {
|
|
3920
3940
|
body,
|
|
3921
3941
|
headers,
|
|
3922
3942
|
method: props.method || "post"
|
|
@@ -4774,7 +4794,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4774
4794
|
}
|
|
4775
4795
|
|
|
4776
4796
|
// src/constants/sdk-version.ts
|
|
4777
|
-
var SDK_VERSION = "2.0.
|
|
4797
|
+
var SDK_VERSION = "2.0.30";
|
|
4778
4798
|
|
|
4779
4799
|
// src/helpers/sdk-headers.ts
|
|
4780
4800
|
var getSdkHeaders = () => ({
|
|
@@ -5203,7 +5223,9 @@ async function _track({
|
|
|
5203
5223
|
return;
|
|
5204
5224
|
}
|
|
5205
5225
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
5206
|
-
|
|
5226
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
5227
|
+
logFetch(url);
|
|
5228
|
+
return fetch(url, {
|
|
5207
5229
|
method: "POST",
|
|
5208
5230
|
body: JSON.stringify({
|
|
5209
5231
|
events: [await createEvent(eventProps)]
|
|
@@ -5678,6 +5700,7 @@ function EnableEditor(props) {
|
|
|
5678
5700
|
rootState: props.builderContextSignal.rootState,
|
|
5679
5701
|
rootSetState: props.builderContextSignal.rootSetState
|
|
5680
5702
|
})));
|
|
5703
|
+
logFetch(evaluatedUrl);
|
|
5681
5704
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
5682
5705
|
mergeNewRootState({
|
|
5683
5706
|
[key]: json
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -1363,6 +1363,13 @@ function BlocksWrapper(props) {
|
|
|
1363
1363
|
props.classNameProp
|
|
1364
1364
|
].filter(Boolean).join(" ");
|
|
1365
1365
|
});
|
|
1366
|
+
const dataPath = createMemo6(() => {
|
|
1367
|
+
if (!props.path) {
|
|
1368
|
+
return void 0;
|
|
1369
|
+
}
|
|
1370
|
+
const pathPrefix = "component.options.";
|
|
1371
|
+
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1372
|
+
});
|
|
1366
1373
|
function onClick() {
|
|
1367
1374
|
if (isEditing() && !props.blocks?.length) {
|
|
1368
1375
|
window.parent?.postMessage(
|
|
@@ -1370,7 +1377,7 @@ function BlocksWrapper(props) {
|
|
|
1370
1377
|
type: "builder.clickEmptyBlocks",
|
|
1371
1378
|
data: {
|
|
1372
1379
|
parentElementId: props.parent,
|
|
1373
|
-
dataPath:
|
|
1380
|
+
dataPath: dataPath()
|
|
1374
1381
|
}
|
|
1375
1382
|
},
|
|
1376
1383
|
"*"
|
|
@@ -1384,7 +1391,7 @@ function BlocksWrapper(props) {
|
|
|
1384
1391
|
type: "builder.hoverEmptyBlocks",
|
|
1385
1392
|
data: {
|
|
1386
1393
|
parentElementId: props.parent,
|
|
1387
|
-
dataPath:
|
|
1394
|
+
dataPath: dataPath()
|
|
1388
1395
|
}
|
|
1389
1396
|
},
|
|
1390
1397
|
"*"
|
|
@@ -1396,9 +1403,9 @@ function BlocksWrapper(props) {
|
|
|
1396
1403
|
});
|
|
1397
1404
|
return <>
|
|
1398
1405
|
<Dynamic4
|
|
1399
|
-
class={className() + " dynamic-
|
|
1406
|
+
class={className() + " dynamic-5b6a86b6"}
|
|
1400
1407
|
ref={blocksWrapperRef}
|
|
1401
|
-
builder-path={
|
|
1408
|
+
builder-path={dataPath()}
|
|
1402
1409
|
builder-parent-id={props.parent}
|
|
1403
1410
|
{...{}}
|
|
1404
1411
|
style={props.styleProp}
|
|
@@ -1408,7 +1415,7 @@ function BlocksWrapper(props) {
|
|
|
1408
1415
|
{...props.BlocksWrapperProps}
|
|
1409
1416
|
component={props.BlocksWrapper}
|
|
1410
1417
|
>{props.children}</Dynamic4>
|
|
1411
|
-
<style>{`.dynamic-
|
|
1418
|
+
<style>{`.dynamic-5b6a86b6 {
|
|
1412
1419
|
display: flex;
|
|
1413
1420
|
flex-direction: column;
|
|
1414
1421
|
align-items: stretch;
|
|
@@ -1573,7 +1580,7 @@ function Columns(props) {
|
|
|
1573
1580
|
}
|
|
1574
1581
|
return <>
|
|
1575
1582
|
<div
|
|
1576
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1583
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
|
|
1577
1584
|
style={columnsCssVars()}
|
|
1578
1585
|
{...{}}
|
|
1579
1586
|
>
|
|
@@ -1590,7 +1597,7 @@ function Columns(props) {
|
|
|
1590
1597
|
actionAttributes={{}}
|
|
1591
1598
|
attributes={getAttributes(column, index)}
|
|
1592
1599
|
><Blocks_default
|
|
1593
|
-
path={`
|
|
1600
|
+
path={`columns.${index}.blocks`}
|
|
1594
1601
|
parent={props.builderBlock.id}
|
|
1595
1602
|
styleProp={{
|
|
1596
1603
|
flexGrow: "1"
|
|
@@ -1602,7 +1609,7 @@ function Columns(props) {
|
|
|
1602
1609
|
/></Dynamic_renderer_default>;
|
|
1603
1610
|
}}</For4>
|
|
1604
1611
|
</div>
|
|
1605
|
-
<style>{`.div-
|
|
1612
|
+
<style>{`.div-2ac94efa {
|
|
1606
1613
|
display: flex;
|
|
1607
1614
|
line-height: normal;
|
|
1608
1615
|
}`}</style>
|
|
@@ -2233,9 +2240,11 @@ function Accordion(props) {
|
|
|
2233
2240
|
class={getAccordionTitleClassName(index)}
|
|
2234
2241
|
style={{
|
|
2235
2242
|
...accordionTitleStyles(),
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2243
|
+
...props.grid && {
|
|
2244
|
+
width: props.gridRowWidth,
|
|
2245
|
+
...{
|
|
2246
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2247
|
+
}
|
|
2239
2248
|
}
|
|
2240
2249
|
}}
|
|
2241
2250
|
data-index={index}
|
|
@@ -2974,7 +2983,7 @@ function Tabs(props) {
|
|
|
2974
2983
|
onClick={(event) => onClick(index)}
|
|
2975
2984
|
><Blocks_default
|
|
2976
2985
|
parent={props.builderBlock.id}
|
|
2977
|
-
path={`
|
|
2986
|
+
path={`tabs.${index}.label`}
|
|
2978
2987
|
blocks={tab.label}
|
|
2979
2988
|
context={props.builderContext}
|
|
2980
2989
|
registeredComponents={props.builderComponents}
|
|
@@ -2983,7 +2992,7 @@ function Tabs(props) {
|
|
|
2983
2992
|
}}</For6></div>
|
|
2984
2993
|
<Show10 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
2985
2994
|
parent={props.builderBlock.id}
|
|
2986
|
-
path={`
|
|
2995
|
+
path={`tabs.${activeTab()}.content`}
|
|
2987
2996
|
blocks={activeTabContent(activeTab())}
|
|
2988
2997
|
context={props.builderContext}
|
|
2989
2998
|
registeredComponents={props.builderComponents}
|
|
@@ -3440,6 +3449,15 @@ var getEnv = () => {
|
|
|
3440
3449
|
return validEnvList.includes(env) ? env : "production";
|
|
3441
3450
|
};
|
|
3442
3451
|
|
|
3452
|
+
// src/functions/log-fetch.ts
|
|
3453
|
+
function logFetch(url) {
|
|
3454
|
+
if (typeof process !== "undefined" && process.env?.DEBUG) {
|
|
3455
|
+
if (String(process.env.DEBUG) == "true") {
|
|
3456
|
+
logger.log(url);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3443
3461
|
// src/blocks/form/form/form.tsx
|
|
3444
3462
|
function FormComponent(props) {
|
|
3445
3463
|
const [formState, setFormState] = createSignal14("unsubmitted");
|
|
@@ -3546,14 +3564,13 @@ function FormComponent(props) {
|
|
|
3546
3564
|
const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(
|
|
3547
3565
|
props.sendSubmissionsToEmail || ""
|
|
3548
3566
|
)}&name=${encodeURIComponent(props.name || "")}`;
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
).then(
|
|
3567
|
+
const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
|
|
3568
|
+
logFetch(url);
|
|
3569
|
+
fetch(url, {
|
|
3570
|
+
body,
|
|
3571
|
+
headers,
|
|
3572
|
+
method: props.method || "post"
|
|
3573
|
+
}).then(
|
|
3557
3574
|
async (res) => {
|
|
3558
3575
|
let body2;
|
|
3559
3576
|
const contentType = res.headers.get("content-type");
|
|
@@ -3660,14 +3677,14 @@ function FormComponent(props) {
|
|
|
3660
3677
|
blocks={props.sendingMessage}
|
|
3661
3678
|
context={props.builderContext}
|
|
3662
3679
|
/></Show11>
|
|
3663
|
-
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-
|
|
3680
|
+
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-6210236e">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
|
|
3664
3681
|
<Show11 when={submissionState() === "success"}><Blocks_default
|
|
3665
3682
|
path="successMessage"
|
|
3666
3683
|
blocks={props.successMessage}
|
|
3667
3684
|
context={props.builderContext}
|
|
3668
3685
|
/></Show11>
|
|
3669
3686
|
</form>
|
|
3670
|
-
<style>{`.pre-
|
|
3687
|
+
<style>{`.pre-6210236e {
|
|
3671
3688
|
padding: 10px;
|
|
3672
3689
|
color: red;
|
|
3673
3690
|
text-align: center;
|
|
@@ -4258,7 +4275,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4258
4275
|
}
|
|
4259
4276
|
|
|
4260
4277
|
// src/constants/sdk-version.ts
|
|
4261
|
-
var SDK_VERSION = "2.0.
|
|
4278
|
+
var SDK_VERSION = "2.0.30";
|
|
4262
4279
|
|
|
4263
4280
|
// src/helpers/sdk-headers.ts
|
|
4264
4281
|
var getSdkHeaders = () => ({
|
|
@@ -4687,7 +4704,9 @@ async function _track({
|
|
|
4687
4704
|
return;
|
|
4688
4705
|
}
|
|
4689
4706
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
4690
|
-
|
|
4707
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
4708
|
+
logFetch(url);
|
|
4709
|
+
return fetch(url, {
|
|
4691
4710
|
method: "POST",
|
|
4692
4711
|
body: JSON.stringify({
|
|
4693
4712
|
events: [await createEvent(eventProps)]
|
|
@@ -5166,6 +5185,7 @@ function EnableEditor(props) {
|
|
|
5166
5185
|
})
|
|
5167
5186
|
)
|
|
5168
5187
|
);
|
|
5188
|
+
logFetch(evaluatedUrl);
|
|
5169
5189
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
5170
5190
|
mergeNewRootState({
|
|
5171
5191
|
[key]: json
|
package/lib/browser/index.js
CHANGED
|
@@ -1515,7 +1515,7 @@ function Block(props) {
|
|
|
1515
1515
|
});
|
|
1516
1516
|
}
|
|
1517
1517
|
var block_default = Block;
|
|
1518
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-
|
|
1518
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-5b6a86b6 {
|
|
1519
1519
|
display: flex;
|
|
1520
1520
|
flex-direction: column;
|
|
1521
1521
|
align-items: stretch;
|
|
@@ -1524,13 +1524,20 @@ function BlocksWrapper(props) {
|
|
|
1524
1524
|
const className = createMemo(() => {
|
|
1525
1525
|
return ["builder-blocks", !props.blocks?.length ? "no-blocks" : "", props.classNameProp].filter(Boolean).join(" ");
|
|
1526
1526
|
});
|
|
1527
|
+
const dataPath = createMemo(() => {
|
|
1528
|
+
if (!props.path) {
|
|
1529
|
+
return void 0;
|
|
1530
|
+
}
|
|
1531
|
+
const pathPrefix = "component.options.";
|
|
1532
|
+
return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
|
|
1533
|
+
});
|
|
1527
1534
|
function onClick() {
|
|
1528
1535
|
if (isEditing() && !props.blocks?.length) {
|
|
1529
1536
|
window.parent?.postMessage({
|
|
1530
1537
|
type: "builder.clickEmptyBlocks",
|
|
1531
1538
|
data: {
|
|
1532
1539
|
parentElementId: props.parent,
|
|
1533
|
-
dataPath:
|
|
1540
|
+
dataPath: dataPath()
|
|
1534
1541
|
}
|
|
1535
1542
|
}, "*");
|
|
1536
1543
|
}
|
|
@@ -1541,7 +1548,7 @@ function BlocksWrapper(props) {
|
|
|
1541
1548
|
type: "builder.hoverEmptyBlocks",
|
|
1542
1549
|
data: {
|
|
1543
1550
|
parentElementId: props.parent,
|
|
1544
|
-
dataPath:
|
|
1551
|
+
dataPath: dataPath()
|
|
1545
1552
|
}
|
|
1546
1553
|
}, "*");
|
|
1547
1554
|
}
|
|
@@ -1551,14 +1558,14 @@ function BlocksWrapper(props) {
|
|
|
1551
1558
|
});
|
|
1552
1559
|
return [createComponent(Dynamic, mergeProps({
|
|
1553
1560
|
get ["class"]() {
|
|
1554
|
-
return className() + " dynamic-
|
|
1561
|
+
return className() + " dynamic-5b6a86b6";
|
|
1555
1562
|
},
|
|
1556
1563
|
ref(r$) {
|
|
1557
1564
|
const _ref$ = blocksWrapperRef;
|
|
1558
1565
|
typeof _ref$ === "function" ? _ref$(r$) : blocksWrapperRef = r$;
|
|
1559
1566
|
},
|
|
1560
1567
|
get ["builder-path"]() {
|
|
1561
|
-
return
|
|
1568
|
+
return dataPath();
|
|
1562
1569
|
},
|
|
1563
1570
|
get ["builder-parent-id"]() {
|
|
1564
1571
|
return props.parent;
|
|
@@ -1650,7 +1657,7 @@ var getColumnsClass = (id) => {
|
|
|
1650
1657
|
|
|
1651
1658
|
// src/blocks/columns/columns.tsx
|
|
1652
1659
|
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
1653
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-
|
|
1660
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-2ac94efa {
|
|
1654
1661
|
display: flex;
|
|
1655
1662
|
line-height: normal;
|
|
1656
1663
|
}`);
|
|
@@ -1779,7 +1786,7 @@ function Columns(props) {
|
|
|
1779
1786
|
const _el$ = _tmpl$3();
|
|
1780
1787
|
spread(_el$, mergeProps({
|
|
1781
1788
|
get ["class"]() {
|
|
1782
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
1789
|
+
return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
|
|
1783
1790
|
},
|
|
1784
1791
|
get style() {
|
|
1785
1792
|
return columnsCssVars();
|
|
@@ -1816,7 +1823,7 @@ function Columns(props) {
|
|
|
1816
1823
|
},
|
|
1817
1824
|
get children() {
|
|
1818
1825
|
return createComponent(blocks_default, {
|
|
1819
|
-
path: `
|
|
1826
|
+
path: `columns.${index}.blocks`,
|
|
1820
1827
|
get parent() {
|
|
1821
1828
|
return props.builderBlock.id;
|
|
1822
1829
|
},
|
|
@@ -2509,9 +2516,11 @@ function Accordion(props) {
|
|
|
2509
2516
|
effect((_p$) => {
|
|
2510
2517
|
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
2511
2518
|
...accordionTitleStyles(),
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2519
|
+
...props.grid && {
|
|
2520
|
+
width: props.gridRowWidth,
|
|
2521
|
+
...{
|
|
2522
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2523
|
+
}
|
|
2515
2524
|
}
|
|
2516
2525
|
};
|
|
2517
2526
|
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
@@ -3283,7 +3292,7 @@ function Tabs(props) {
|
|
|
3283
3292
|
get parent() {
|
|
3284
3293
|
return props.builderBlock.id;
|
|
3285
3294
|
},
|
|
3286
|
-
path: `
|
|
3295
|
+
path: `tabs.${index}.label`,
|
|
3287
3296
|
get blocks() {
|
|
3288
3297
|
return tab.label;
|
|
3289
3298
|
},
|
|
@@ -3323,7 +3332,7 @@ function Tabs(props) {
|
|
|
3323
3332
|
return props.builderBlock.id;
|
|
3324
3333
|
},
|
|
3325
3334
|
get path() {
|
|
3326
|
-
return `
|
|
3335
|
+
return `tabs.${activeTab()}.content`;
|
|
3327
3336
|
},
|
|
3328
3337
|
get blocks() {
|
|
3329
3338
|
return activeTabContent(activeTab());
|
|
@@ -3790,10 +3799,19 @@ var getEnv = () => {
|
|
|
3790
3799
|
return validEnvList.includes(env) ? env : "production";
|
|
3791
3800
|
};
|
|
3792
3801
|
|
|
3802
|
+
// src/functions/log-fetch.ts
|
|
3803
|
+
function logFetch(url) {
|
|
3804
|
+
if (typeof process !== "undefined" && process.env?.DEBUG) {
|
|
3805
|
+
if (String(process.env.DEBUG) == "true") {
|
|
3806
|
+
logger.log(url);
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3793
3811
|
// src/blocks/form/form/form.tsx
|
|
3794
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-
|
|
3812
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-6210236e">`);
|
|
3795
3813
|
var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
|
|
3796
|
-
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-
|
|
3814
|
+
var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-6210236e {
|
|
3797
3815
|
padding: 10px;
|
|
3798
3816
|
color: red;
|
|
3799
3817
|
text-align: center;
|
|
@@ -3906,7 +3924,9 @@ function FormComponent(props) {
|
|
|
3906
3924
|
}
|
|
3907
3925
|
setFormState("sending");
|
|
3908
3926
|
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 || "")}`;
|
|
3909
|
-
|
|
3927
|
+
const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
|
|
3928
|
+
logFetch(url);
|
|
3929
|
+
fetch(url, {
|
|
3910
3930
|
body,
|
|
3911
3931
|
headers,
|
|
3912
3932
|
method: props.method || "post"
|
|
@@ -4764,7 +4784,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4764
4784
|
}
|
|
4765
4785
|
|
|
4766
4786
|
// src/constants/sdk-version.ts
|
|
4767
|
-
var SDK_VERSION = "2.0.
|
|
4787
|
+
var SDK_VERSION = "2.0.30";
|
|
4768
4788
|
|
|
4769
4789
|
// src/helpers/sdk-headers.ts
|
|
4770
4790
|
var getSdkHeaders = () => ({
|
|
@@ -5189,7 +5209,9 @@ async function _track({
|
|
|
5189
5209
|
return;
|
|
5190
5210
|
}
|
|
5191
5211
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
5192
|
-
|
|
5212
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
5213
|
+
logFetch(url);
|
|
5214
|
+
return fetch(url, {
|
|
5193
5215
|
method: "POST",
|
|
5194
5216
|
body: JSON.stringify({
|
|
5195
5217
|
events: [await createEvent(eventProps)]
|
|
@@ -5662,6 +5684,7 @@ function EnableEditor(props) {
|
|
|
5662
5684
|
rootState: props.builderContextSignal.rootState,
|
|
5663
5685
|
rootSetState: props.builderContextSignal.rootSetState
|
|
5664
5686
|
})));
|
|
5687
|
+
logFetch(evaluatedUrl);
|
|
5665
5688
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
5666
5689
|
mergeNewRootState({
|
|
5667
5690
|
[key]: json
|