@builder.io/sdk-solid 2.0.26 → 2.0.29
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 +36 -19
- package/lib/browser/dev.jsx +36 -23
- package/lib/browser/index.js +36 -19
- package/lib/browser/index.jsx +36 -23
- package/lib/edge/dev.js +36 -19
- package/lib/edge/dev.jsx +36 -23
- package/lib/edge/index.js +36 -19
- package/lib/edge/index.jsx +36 -23
- package/lib/node/dev.js +39 -23
- package/lib/node/dev.jsx +39 -27
- package/lib/node/index.js +39 -23
- package/lib/node/index.jsx +39 -27
- package/package.json +1 -1
package/lib/browser/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
|
|
2
|
-
import { createContext, useContext, Show, For,
|
|
2
|
+
import { createContext, useContext, Show, For, createMemo, onMount, createSignal, createEffect, on } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
// src/blocks/button/button.tsx
|
|
5
5
|
|
|
@@ -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,15 +1663,20 @@ 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
|
}`);
|
|
1663
1670
|
function Columns(props) {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
const
|
|
1671
|
+
const gutterSize = createMemo(() => {
|
|
1672
|
+
return typeof props.space === "number" ? props.space || 0 : 20;
|
|
1673
|
+
});
|
|
1674
|
+
const cols = createMemo(() => {
|
|
1675
|
+
return props.columns || [];
|
|
1676
|
+
});
|
|
1677
|
+
const stackAt = createMemo(() => {
|
|
1678
|
+
return props.stackColumnsAt || "tablet";
|
|
1679
|
+
});
|
|
1668
1680
|
function getTagName(column) {
|
|
1669
1681
|
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1670
1682
|
}
|
|
@@ -1688,6 +1700,9 @@ function Columns(props) {
|
|
|
1688
1700
|
}) {
|
|
1689
1701
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
1690
1702
|
}
|
|
1703
|
+
const flexDir = createMemo(() => {
|
|
1704
|
+
return props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
1705
|
+
});
|
|
1691
1706
|
function columnsCssVars() {
|
|
1692
1707
|
return {
|
|
1693
1708
|
"--flex-dir": flexDir(),
|
|
@@ -1777,7 +1792,7 @@ function Columns(props) {
|
|
|
1777
1792
|
const _el$ = _tmpl$3();
|
|
1778
1793
|
spread(_el$, mergeProps({
|
|
1779
1794
|
get ["class"]() {
|
|
1780
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
1795
|
+
return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
|
|
1781
1796
|
},
|
|
1782
1797
|
get style() {
|
|
1783
1798
|
return columnsCssVars();
|
|
@@ -1814,7 +1829,7 @@ function Columns(props) {
|
|
|
1814
1829
|
},
|
|
1815
1830
|
get children() {
|
|
1816
1831
|
return createComponent(blocks_default, {
|
|
1817
|
-
path: `
|
|
1832
|
+
path: `columns.${index}.blocks`,
|
|
1818
1833
|
get parent() {
|
|
1819
1834
|
return props.builderBlock.id;
|
|
1820
1835
|
},
|
|
@@ -2508,9 +2523,11 @@ function Accordion(props) {
|
|
|
2508
2523
|
effect((_p$) => {
|
|
2509
2524
|
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
2510
2525
|
...accordionTitleStyles(),
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2526
|
+
...props.grid && {
|
|
2527
|
+
width: props.gridRowWidth,
|
|
2528
|
+
...{
|
|
2529
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2530
|
+
}
|
|
2514
2531
|
}
|
|
2515
2532
|
};
|
|
2516
2533
|
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
@@ -3283,7 +3300,7 @@ function Tabs(props) {
|
|
|
3283
3300
|
get parent() {
|
|
3284
3301
|
return props.builderBlock.id;
|
|
3285
3302
|
},
|
|
3286
|
-
path: `
|
|
3303
|
+
path: `tabs.${index}.label`,
|
|
3287
3304
|
get blocks() {
|
|
3288
3305
|
return tab.label;
|
|
3289
3306
|
},
|
|
@@ -3323,7 +3340,7 @@ function Tabs(props) {
|
|
|
3323
3340
|
return props.builderBlock.id;
|
|
3324
3341
|
},
|
|
3325
3342
|
get path() {
|
|
3326
|
-
return `
|
|
3343
|
+
return `tabs.${activeTab()}.content`;
|
|
3327
3344
|
},
|
|
3328
3345
|
get blocks() {
|
|
3329
3346
|
return activeTabContent(activeTab());
|
|
@@ -4766,7 +4783,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4766
4783
|
}
|
|
4767
4784
|
|
|
4768
4785
|
// src/constants/sdk-version.ts
|
|
4769
|
-
var SDK_VERSION = "2.0.
|
|
4786
|
+
var SDK_VERSION = "2.0.29";
|
|
4770
4787
|
|
|
4771
4788
|
// src/helpers/sdk-headers.ts
|
|
4772
4789
|
var getSdkHeaders = () => ({
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -75,7 +75,7 @@ function Button(props) {
|
|
|
75
75
|
var button_default = Button;
|
|
76
76
|
|
|
77
77
|
// src/blocks/columns/columns.tsx
|
|
78
|
-
import { Show as Show7, For as For4,
|
|
78
|
+
import { Show as Show7, For as For4, createMemo as createMemo7 } from "solid-js";
|
|
79
79
|
|
|
80
80
|
// src/components/blocks/blocks.tsx
|
|
81
81
|
import { useContext, Show as Show6, For as For3 } from "solid-js";
|
|
@@ -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;
|
|
@@ -1449,14 +1456,15 @@ var getColumnsClass = (id) => {
|
|
|
1449
1456
|
|
|
1450
1457
|
// src/blocks/columns/columns.tsx
|
|
1451
1458
|
function Columns(props) {
|
|
1452
|
-
const
|
|
1453
|
-
typeof props.space === "number" ? props.space || 0 : 20
|
|
1454
|
-
);
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1459
|
+
const gutterSize = createMemo7(() => {
|
|
1460
|
+
return typeof props.space === "number" ? props.space || 0 : 20;
|
|
1461
|
+
});
|
|
1462
|
+
const cols = createMemo7(() => {
|
|
1463
|
+
return props.columns || [];
|
|
1464
|
+
});
|
|
1465
|
+
const stackAt = createMemo7(() => {
|
|
1466
|
+
return props.stackColumnsAt || "tablet";
|
|
1467
|
+
});
|
|
1460
1468
|
function getTagName(column) {
|
|
1461
1469
|
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1462
1470
|
}
|
|
@@ -1480,6 +1488,9 @@ function Columns(props) {
|
|
|
1480
1488
|
}) {
|
|
1481
1489
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
1482
1490
|
}
|
|
1491
|
+
const flexDir = createMemo7(() => {
|
|
1492
|
+
return props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
1493
|
+
});
|
|
1483
1494
|
function columnsCssVars() {
|
|
1484
1495
|
return {
|
|
1485
1496
|
"--flex-dir": flexDir(),
|
|
@@ -1569,7 +1580,7 @@ function Columns(props) {
|
|
|
1569
1580
|
}
|
|
1570
1581
|
return <>
|
|
1571
1582
|
<div
|
|
1572
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1583
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
|
|
1573
1584
|
style={columnsCssVars()}
|
|
1574
1585
|
{...{}}
|
|
1575
1586
|
>
|
|
@@ -1586,7 +1597,7 @@ function Columns(props) {
|
|
|
1586
1597
|
actionAttributes={{}}
|
|
1587
1598
|
attributes={getAttributes(column, index)}
|
|
1588
1599
|
><Blocks_default
|
|
1589
|
-
path={`
|
|
1600
|
+
path={`columns.${index}.blocks`}
|
|
1590
1601
|
parent={props.builderBlock.id}
|
|
1591
1602
|
styleProp={{
|
|
1592
1603
|
flexGrow: "1"
|
|
@@ -1598,7 +1609,7 @@ function Columns(props) {
|
|
|
1598
1609
|
/></Dynamic_renderer_default>;
|
|
1599
1610
|
}}</For4>
|
|
1600
1611
|
</div>
|
|
1601
|
-
<style>{`.div-
|
|
1612
|
+
<style>{`.div-2ac94efa {
|
|
1602
1613
|
display: flex;
|
|
1603
1614
|
line-height: normal;
|
|
1604
1615
|
}`}</style>
|
|
@@ -2229,9 +2240,11 @@ function Accordion(props) {
|
|
|
2229
2240
|
class={getAccordionTitleClassName(index)}
|
|
2230
2241
|
style={{
|
|
2231
2242
|
...accordionTitleStyles(),
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2243
|
+
...props.grid && {
|
|
2244
|
+
width: props.gridRowWidth,
|
|
2245
|
+
...{
|
|
2246
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2247
|
+
}
|
|
2235
2248
|
}
|
|
2236
2249
|
}}
|
|
2237
2250
|
data-index={index}
|
|
@@ -2970,7 +2983,7 @@ function Tabs(props) {
|
|
|
2970
2983
|
onClick={(event) => onClick(index)}
|
|
2971
2984
|
><Blocks_default
|
|
2972
2985
|
parent={props.builderBlock.id}
|
|
2973
|
-
path={`
|
|
2986
|
+
path={`tabs.${index}.label`}
|
|
2974
2987
|
blocks={tab.label}
|
|
2975
2988
|
context={props.builderContext}
|
|
2976
2989
|
registeredComponents={props.builderComponents}
|
|
@@ -2979,7 +2992,7 @@ function Tabs(props) {
|
|
|
2979
2992
|
}}</For6></div>
|
|
2980
2993
|
<Show10 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
2981
2994
|
parent={props.builderBlock.id}
|
|
2982
|
-
path={`
|
|
2995
|
+
path={`tabs.${activeTab()}.content`}
|
|
2983
2996
|
blocks={activeTabContent(activeTab())}
|
|
2984
2997
|
context={props.builderContext}
|
|
2985
2998
|
registeredComponents={props.builderComponents}
|
|
@@ -4254,7 +4267,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4254
4267
|
}
|
|
4255
4268
|
|
|
4256
4269
|
// src/constants/sdk-version.ts
|
|
4257
|
-
var SDK_VERSION = "2.0.
|
|
4270
|
+
var SDK_VERSION = "2.0.29";
|
|
4258
4271
|
|
|
4259
4272
|
// src/helpers/sdk-headers.ts
|
|
4260
4273
|
var getSdkHeaders = () => ({
|
package/lib/browser/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
|
|
2
|
-
import { createContext, useContext, Show, For,
|
|
2
|
+
import { createContext, useContext, Show, For, createMemo, onMount, createSignal, createEffect, on } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
// src/blocks/button/button.tsx
|
|
5
5
|
|
|
@@ -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,15 +1657,20 @@ 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
|
}`);
|
|
1657
1664
|
function Columns(props) {
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
const
|
|
1665
|
+
const gutterSize = createMemo(() => {
|
|
1666
|
+
return typeof props.space === "number" ? props.space || 0 : 20;
|
|
1667
|
+
});
|
|
1668
|
+
const cols = createMemo(() => {
|
|
1669
|
+
return props.columns || [];
|
|
1670
|
+
});
|
|
1671
|
+
const stackAt = createMemo(() => {
|
|
1672
|
+
return props.stackColumnsAt || "tablet";
|
|
1673
|
+
});
|
|
1662
1674
|
function getTagName(column) {
|
|
1663
1675
|
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1664
1676
|
}
|
|
@@ -1682,6 +1694,9 @@ function Columns(props) {
|
|
|
1682
1694
|
}) {
|
|
1683
1695
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
1684
1696
|
}
|
|
1697
|
+
const flexDir = createMemo(() => {
|
|
1698
|
+
return props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
1699
|
+
});
|
|
1685
1700
|
function columnsCssVars() {
|
|
1686
1701
|
return {
|
|
1687
1702
|
"--flex-dir": flexDir(),
|
|
@@ -1771,7 +1786,7 @@ function Columns(props) {
|
|
|
1771
1786
|
const _el$ = _tmpl$3();
|
|
1772
1787
|
spread(_el$, mergeProps({
|
|
1773
1788
|
get ["class"]() {
|
|
1774
|
-
return getColumnsClass(props.builderBlock?.id) + " div-
|
|
1789
|
+
return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
|
|
1775
1790
|
},
|
|
1776
1791
|
get style() {
|
|
1777
1792
|
return columnsCssVars();
|
|
@@ -1808,7 +1823,7 @@ function Columns(props) {
|
|
|
1808
1823
|
},
|
|
1809
1824
|
get children() {
|
|
1810
1825
|
return createComponent(blocks_default, {
|
|
1811
|
-
path: `
|
|
1826
|
+
path: `columns.${index}.blocks`,
|
|
1812
1827
|
get parent() {
|
|
1813
1828
|
return props.builderBlock.id;
|
|
1814
1829
|
},
|
|
@@ -2501,9 +2516,11 @@ function Accordion(props) {
|
|
|
2501
2516
|
effect((_p$) => {
|
|
2502
2517
|
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
2503
2518
|
...accordionTitleStyles(),
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2519
|
+
...props.grid && {
|
|
2520
|
+
width: props.gridRowWidth,
|
|
2521
|
+
...{
|
|
2522
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2523
|
+
}
|
|
2507
2524
|
}
|
|
2508
2525
|
};
|
|
2509
2526
|
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
@@ -3275,7 +3292,7 @@ function Tabs(props) {
|
|
|
3275
3292
|
get parent() {
|
|
3276
3293
|
return props.builderBlock.id;
|
|
3277
3294
|
},
|
|
3278
|
-
path: `
|
|
3295
|
+
path: `tabs.${index}.label`,
|
|
3279
3296
|
get blocks() {
|
|
3280
3297
|
return tab.label;
|
|
3281
3298
|
},
|
|
@@ -3315,7 +3332,7 @@ function Tabs(props) {
|
|
|
3315
3332
|
return props.builderBlock.id;
|
|
3316
3333
|
},
|
|
3317
3334
|
get path() {
|
|
3318
|
-
return `
|
|
3335
|
+
return `tabs.${activeTab()}.content`;
|
|
3319
3336
|
},
|
|
3320
3337
|
get blocks() {
|
|
3321
3338
|
return activeTabContent(activeTab());
|
|
@@ -4756,7 +4773,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4756
4773
|
}
|
|
4757
4774
|
|
|
4758
4775
|
// src/constants/sdk-version.ts
|
|
4759
|
-
var SDK_VERSION = "2.0.
|
|
4776
|
+
var SDK_VERSION = "2.0.29";
|
|
4760
4777
|
|
|
4761
4778
|
// src/helpers/sdk-headers.ts
|
|
4762
4779
|
var getSdkHeaders = () => ({
|
package/lib/browser/index.jsx
CHANGED
|
@@ -75,7 +75,7 @@ function Button(props) {
|
|
|
75
75
|
var button_default = Button;
|
|
76
76
|
|
|
77
77
|
// src/blocks/columns/columns.tsx
|
|
78
|
-
import { Show as Show7, For as For4,
|
|
78
|
+
import { Show as Show7, For as For4, createMemo as createMemo7 } from "solid-js";
|
|
79
79
|
|
|
80
80
|
// src/components/blocks/blocks.tsx
|
|
81
81
|
import { useContext, Show as Show6, For as For3 } from "solid-js";
|
|
@@ -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;
|
|
@@ -1443,14 +1450,15 @@ var getColumnsClass = (id) => {
|
|
|
1443
1450
|
|
|
1444
1451
|
// src/blocks/columns/columns.tsx
|
|
1445
1452
|
function Columns(props) {
|
|
1446
|
-
const
|
|
1447
|
-
typeof props.space === "number" ? props.space || 0 : 20
|
|
1448
|
-
);
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1453
|
+
const gutterSize = createMemo7(() => {
|
|
1454
|
+
return typeof props.space === "number" ? props.space || 0 : 20;
|
|
1455
|
+
});
|
|
1456
|
+
const cols = createMemo7(() => {
|
|
1457
|
+
return props.columns || [];
|
|
1458
|
+
});
|
|
1459
|
+
const stackAt = createMemo7(() => {
|
|
1460
|
+
return props.stackColumnsAt || "tablet";
|
|
1461
|
+
});
|
|
1454
1462
|
function getTagName(column) {
|
|
1455
1463
|
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
1456
1464
|
}
|
|
@@ -1474,6 +1482,9 @@ function Columns(props) {
|
|
|
1474
1482
|
}) {
|
|
1475
1483
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
1476
1484
|
}
|
|
1485
|
+
const flexDir = createMemo7(() => {
|
|
1486
|
+
return props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
1487
|
+
});
|
|
1477
1488
|
function columnsCssVars() {
|
|
1478
1489
|
return {
|
|
1479
1490
|
"--flex-dir": flexDir(),
|
|
@@ -1563,7 +1574,7 @@ function Columns(props) {
|
|
|
1563
1574
|
}
|
|
1564
1575
|
return <>
|
|
1565
1576
|
<div
|
|
1566
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1577
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
|
|
1567
1578
|
style={columnsCssVars()}
|
|
1568
1579
|
{...{}}
|
|
1569
1580
|
>
|
|
@@ -1580,7 +1591,7 @@ function Columns(props) {
|
|
|
1580
1591
|
actionAttributes={{}}
|
|
1581
1592
|
attributes={getAttributes(column, index)}
|
|
1582
1593
|
><Blocks_default
|
|
1583
|
-
path={`
|
|
1594
|
+
path={`columns.${index}.blocks`}
|
|
1584
1595
|
parent={props.builderBlock.id}
|
|
1585
1596
|
styleProp={{
|
|
1586
1597
|
flexGrow: "1"
|
|
@@ -1592,7 +1603,7 @@ function Columns(props) {
|
|
|
1592
1603
|
/></Dynamic_renderer_default>;
|
|
1593
1604
|
}}</For4>
|
|
1594
1605
|
</div>
|
|
1595
|
-
<style>{`.div-
|
|
1606
|
+
<style>{`.div-2ac94efa {
|
|
1596
1607
|
display: flex;
|
|
1597
1608
|
line-height: normal;
|
|
1598
1609
|
}`}</style>
|
|
@@ -2222,9 +2233,11 @@ function Accordion(props) {
|
|
|
2222
2233
|
class={getAccordionTitleClassName(index)}
|
|
2223
2234
|
style={{
|
|
2224
2235
|
...accordionTitleStyles(),
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2236
|
+
...props.grid && {
|
|
2237
|
+
width: props.gridRowWidth,
|
|
2238
|
+
...{
|
|
2239
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2240
|
+
}
|
|
2228
2241
|
}
|
|
2229
2242
|
}}
|
|
2230
2243
|
data-index={index}
|
|
@@ -2962,7 +2975,7 @@ function Tabs(props) {
|
|
|
2962
2975
|
onClick={(event) => onClick(index)}
|
|
2963
2976
|
><Blocks_default
|
|
2964
2977
|
parent={props.builderBlock.id}
|
|
2965
|
-
path={`
|
|
2978
|
+
path={`tabs.${index}.label`}
|
|
2966
2979
|
blocks={tab.label}
|
|
2967
2980
|
context={props.builderContext}
|
|
2968
2981
|
registeredComponents={props.builderComponents}
|
|
@@ -2971,7 +2984,7 @@ function Tabs(props) {
|
|
|
2971
2984
|
}}</For6></div>
|
|
2972
2985
|
<Show10 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
2973
2986
|
parent={props.builderBlock.id}
|
|
2974
|
-
path={`
|
|
2987
|
+
path={`tabs.${activeTab()}.content`}
|
|
2975
2988
|
blocks={activeTabContent(activeTab())}
|
|
2976
2989
|
context={props.builderContext}
|
|
2977
2990
|
registeredComponents={props.builderComponents}
|
|
@@ -4244,7 +4257,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4244
4257
|
}
|
|
4245
4258
|
|
|
4246
4259
|
// src/constants/sdk-version.ts
|
|
4247
|
-
var SDK_VERSION = "2.0.
|
|
4260
|
+
var SDK_VERSION = "2.0.29";
|
|
4248
4261
|
|
|
4249
4262
|
// src/helpers/sdk-headers.ts
|
|
4250
4263
|
var getSdkHeaders = () => ({
|