@builder.io/sdk-solid 1.0.33 → 1.0.36
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 +179 -115
- package/lib/browser/dev.jsx +260 -199
- package/lib/browser/index.js +179 -115
- package/lib/browser/index.jsx +260 -199
- package/lib/edge/dev.js +179 -115
- package/lib/edge/dev.jsx +260 -199
- package/lib/edge/index.js +179 -115
- package/lib/edge/index.jsx +260 -199
- package/lib/node/dev.js +200 -121
- package/lib/node/dev.jsx +281 -205
- package/lib/node/index.js +200 -121
- package/lib/node/index.jsx +281 -205
- package/package.json +1 -1
package/lib/browser/dev.jsx
CHANGED
|
@@ -10,7 +10,7 @@ var isEmptyElement = (tagName) => {
|
|
|
10
10
|
|
|
11
11
|
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
12
12
|
function DynamicRenderer(props) {
|
|
13
|
-
return
|
|
13
|
+
return <><Show
|
|
14
14
|
fallback={<Dynamic
|
|
15
15
|
{...props.attributes}
|
|
16
16
|
{...props.actionAttributes}
|
|
@@ -28,7 +28,7 @@ function DynamicRenderer(props) {
|
|
|
28
28
|
{...props.attributes}
|
|
29
29
|
{...props.actionAttributes}
|
|
30
30
|
component={props.TagName}
|
|
31
|
-
>{props.children}</Dynamic></Show></Show
|
|
31
|
+
>{props.children}</Dynamic></Show></Show></>;
|
|
32
32
|
}
|
|
33
33
|
var Dynamic_renderer_default = DynamicRenderer;
|
|
34
34
|
|
|
@@ -66,17 +66,16 @@ function Button(props) {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return <><Dynamic_renderer_default
|
|
70
70
|
attributes={attrs()}
|
|
71
71
|
TagName={props.link ? props.builderLinkComponent || "a" : "button"}
|
|
72
72
|
actionAttributes={{}}
|
|
73
|
-
>{props.text}</Dynamic_renderer_default
|
|
73
|
+
>{props.text}</Dynamic_renderer_default></>;
|
|
74
74
|
}
|
|
75
75
|
var button_default = Button;
|
|
76
76
|
|
|
77
77
|
// src/blocks/columns/columns.tsx
|
|
78
78
|
import { Show as Show6, For as For4, createSignal as createSignal7 } from "solid-js";
|
|
79
|
-
import { css as css2 } from "solid-styled-components";
|
|
80
79
|
|
|
81
80
|
// src/components/blocks/blocks.tsx
|
|
82
81
|
import { useContext, Show as Show5, For as For3 } from "solid-js";
|
|
@@ -847,7 +846,7 @@ var getSizesForBreakpoints = ({
|
|
|
847
846
|
|
|
848
847
|
// src/components/inlined-styles.tsx
|
|
849
848
|
function InlinedStyles(props) {
|
|
850
|
-
return
|
|
849
|
+
return <><style innerHTML={props.styles} data-id={props.id} /></>;
|
|
851
850
|
}
|
|
852
851
|
var Inlined_styles_default = InlinedStyles;
|
|
853
852
|
|
|
@@ -870,7 +869,7 @@ function BlockStyles(props) {
|
|
|
870
869
|
}
|
|
871
870
|
return true;
|
|
872
871
|
});
|
|
873
|
-
const
|
|
872
|
+
const css = createMemo(() => {
|
|
874
873
|
const processedBlock = getProcessedBlock({
|
|
875
874
|
block: props.block,
|
|
876
875
|
localState: props.context.localState,
|
|
@@ -933,7 +932,7 @@ function BlockStyles(props) {
|
|
|
933
932
|
hoverStylesClass
|
|
934
933
|
].join(" ");
|
|
935
934
|
});
|
|
936
|
-
return
|
|
935
|
+
return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css()} /></Show2></>;
|
|
937
936
|
}
|
|
938
937
|
var Block_styles_default = BlockStyles;
|
|
939
938
|
|
|
@@ -1016,7 +1015,7 @@ function getBlockProperties({
|
|
|
1016
1015
|
|
|
1017
1016
|
// src/components/block/components/block-wrapper.tsx
|
|
1018
1017
|
function BlockWrapper(props) {
|
|
1019
|
-
return
|
|
1018
|
+
return <><Dynamic_renderer_default
|
|
1020
1019
|
TagName={props.Wrapper}
|
|
1021
1020
|
attributes={getBlockProperties({
|
|
1022
1021
|
block: props.block,
|
|
@@ -1030,7 +1029,7 @@ function BlockWrapper(props) {
|
|
|
1030
1029
|
context: props.context.context,
|
|
1031
1030
|
stripPrefix: true
|
|
1032
1031
|
})}
|
|
1033
|
-
>{props.children}</Dynamic_renderer_default
|
|
1032
|
+
>{props.children}</Dynamic_renderer_default></>;
|
|
1034
1033
|
}
|
|
1035
1034
|
var Block_wrapper_default = BlockWrapper;
|
|
1036
1035
|
|
|
@@ -1057,11 +1056,11 @@ function InteractiveElement(props) {
|
|
|
1057
1056
|
})
|
|
1058
1057
|
} : {};
|
|
1059
1058
|
});
|
|
1060
|
-
return
|
|
1059
|
+
return <><Dynamic2
|
|
1061
1060
|
{...props.wrapperProps}
|
|
1062
1061
|
attributes={attributes()}
|
|
1063
1062
|
component={props.Wrapper}
|
|
1064
|
-
>{props.children}</Dynamic2
|
|
1063
|
+
>{props.children}</Dynamic2></>;
|
|
1065
1064
|
}
|
|
1066
1065
|
var interactive_element_default = InteractiveElement;
|
|
1067
1066
|
|
|
@@ -1103,7 +1102,7 @@ function ComponentRef(props) {
|
|
|
1103
1102
|
const [Wrapper, setWrapper] = createSignal3(
|
|
1104
1103
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
1105
1104
|
);
|
|
1106
|
-
return
|
|
1105
|
+
return <><Show3 when={props.componentRef}><Dynamic3
|
|
1107
1106
|
{...getWrapperProps({
|
|
1108
1107
|
componentOptions: props.componentOptions,
|
|
1109
1108
|
builderBlock: props.builderBlock,
|
|
@@ -1124,7 +1123,7 @@ function ComponentRef(props) {
|
|
|
1124
1123
|
registeredComponents={props.registeredComponents}
|
|
1125
1124
|
linkComponent={props.linkComponent}
|
|
1126
1125
|
/>;
|
|
1127
|
-
}}</For></Dynamic3></Show3
|
|
1126
|
+
}}</For></Dynamic3></Show3></>;
|
|
1128
1127
|
}
|
|
1129
1128
|
var Component_ref_default = ComponentRef;
|
|
1130
1129
|
|
|
@@ -1132,12 +1131,12 @@ var Component_ref_default = ComponentRef;
|
|
|
1132
1131
|
import { createSignal as createSignal4 } from "solid-js";
|
|
1133
1132
|
function RepeatedBlock(props) {
|
|
1134
1133
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
1135
|
-
return
|
|
1134
|
+
return <><builder_context_default.Provider value={store()}><Block_default
|
|
1136
1135
|
block={props.block}
|
|
1137
1136
|
context={store()}
|
|
1138
1137
|
registeredComponents={props.registeredComponents}
|
|
1139
1138
|
linkComponent={props.linkComponent}
|
|
1140
|
-
/></builder_context_default.Provider
|
|
1139
|
+
/></builder_context_default.Provider></>;
|
|
1141
1140
|
}
|
|
1142
1141
|
var Repeated_block_default = RepeatedBlock;
|
|
1143
1142
|
|
|
@@ -1221,7 +1220,7 @@ function Block(props) {
|
|
|
1221
1220
|
);
|
|
1222
1221
|
}
|
|
1223
1222
|
});
|
|
1224
|
-
return
|
|
1223
|
+
return <><Show4 when={canShowBlock()}>
|
|
1225
1224
|
<Block_styles_default block={props.block} context={props.context} />
|
|
1226
1225
|
<Show4
|
|
1227
1226
|
fallback={<Component_ref_default
|
|
@@ -1275,14 +1274,13 @@ function Block(props) {
|
|
|
1275
1274
|
/>;
|
|
1276
1275
|
}}</For2>
|
|
1277
1276
|
</Block_wrapper_default></Show4></Show4>
|
|
1278
|
-
</Show4
|
|
1277
|
+
</Show4></>;
|
|
1279
1278
|
}
|
|
1280
1279
|
var Block_default = Block;
|
|
1281
1280
|
|
|
1282
1281
|
// src/components/blocks/blocks-wrapper.tsx
|
|
1283
1282
|
import { createMemo as createMemo6 } from "solid-js";
|
|
1284
1283
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
1285
|
-
import { css } from "solid-styled-components";
|
|
1286
1284
|
function BlocksWrapper(props) {
|
|
1287
1285
|
const className = createMemo6(() => {
|
|
1288
1286
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -1315,22 +1313,25 @@ function BlocksWrapper(props) {
|
|
|
1315
1313
|
);
|
|
1316
1314
|
}
|
|
1317
1315
|
}
|
|
1318
|
-
return
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
{
|
|
1332
|
-
|
|
1333
|
-
|
|
1316
|
+
return <>
|
|
1317
|
+
<Dynamic4
|
|
1318
|
+
class={className() + " dynamic-1bb6a3a2"}
|
|
1319
|
+
builder-path={props.path}
|
|
1320
|
+
builder-parent-id={props.parent}
|
|
1321
|
+
{...{}}
|
|
1322
|
+
style={props.styleProp}
|
|
1323
|
+
onClick={(event) => onClick()}
|
|
1324
|
+
onMouseEnter={(event) => onMouseEnter()}
|
|
1325
|
+
onKeyPress={(event) => onClick()}
|
|
1326
|
+
{...props.BlocksWrapperProps}
|
|
1327
|
+
component={props.BlocksWrapper}
|
|
1328
|
+
>{props.children}</Dynamic4>
|
|
1329
|
+
<style>{`.dynamic-1bb6a3a2 {
|
|
1330
|
+
display: flex;
|
|
1331
|
+
flex-direction: column;
|
|
1332
|
+
align-items: stretch;
|
|
1333
|
+
}`}</style>
|
|
1334
|
+
</>;
|
|
1334
1335
|
}
|
|
1335
1336
|
var Blocks_wrapper_default = BlocksWrapper;
|
|
1336
1337
|
|
|
@@ -1338,7 +1339,7 @@ var Blocks_wrapper_default = BlocksWrapper;
|
|
|
1338
1339
|
function Blocks(props) {
|
|
1339
1340
|
const builderContext = useContext(builder_context_default);
|
|
1340
1341
|
const componentsContext = useContext(components_context_default);
|
|
1341
|
-
return
|
|
1342
|
+
return <><Blocks_wrapper_default
|
|
1342
1343
|
blocks={props.blocks}
|
|
1343
1344
|
parent={props.parent}
|
|
1344
1345
|
path={props.path}
|
|
@@ -1354,7 +1355,7 @@ function Blocks(props) {
|
|
|
1354
1355
|
context={props.context || builderContext}
|
|
1355
1356
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
1356
1357
|
/>;
|
|
1357
|
-
}}</For3></Show5></Blocks_wrapper_default
|
|
1358
|
+
}}</For3></Show5></Blocks_wrapper_default></>;
|
|
1358
1359
|
}
|
|
1359
1360
|
var Blocks_default = Blocks;
|
|
1360
1361
|
|
|
@@ -1481,50 +1482,52 @@ function Columns(props) {
|
|
|
1481
1482
|
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
1482
1483
|
};
|
|
1483
1484
|
}
|
|
1484
|
-
return
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1485
|
+
return <>
|
|
1486
|
+
<div
|
|
1487
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-f2f53158"}
|
|
1488
|
+
style={columnsCssVars()}
|
|
1489
|
+
{...{}}
|
|
1490
|
+
>
|
|
1491
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
1492
|
+
id="builderio-columns"
|
|
1493
|
+
styles={columnsStyles()}
|
|
1494
|
+
/></Show6>
|
|
1495
|
+
<For4 each={props.columns}>{(column, _index) => {
|
|
1496
|
+
const index = _index();
|
|
1497
|
+
return <Dynamic_renderer_default
|
|
1498
|
+
key={index}
|
|
1499
|
+
TagName={getTagName(column)}
|
|
1500
|
+
actionAttributes={{}}
|
|
1501
|
+
attributes={getAttributes(column, index)}
|
|
1502
|
+
><Blocks_default
|
|
1503
|
+
path={`component.options.columns.${index}.blocks`}
|
|
1504
|
+
parent={props.builderBlock.id}
|
|
1505
|
+
styleProp={{
|
|
1506
|
+
flexGrow: "1"
|
|
1507
|
+
}}
|
|
1508
|
+
context={props.builderContext}
|
|
1509
|
+
registeredComponents={props.builderComponents}
|
|
1510
|
+
linkComponent={props.builderLinkComponent}
|
|
1511
|
+
blocks={column.blocks}
|
|
1512
|
+
/></Dynamic_renderer_default>;
|
|
1513
|
+
}}</For4>
|
|
1514
|
+
</div>
|
|
1515
|
+
<style>{`.div-f2f53158 {
|
|
1516
|
+
display: flex;
|
|
1517
|
+
line-height: normal;
|
|
1518
|
+
}`}</style>
|
|
1519
|
+
</>;
|
|
1516
1520
|
}
|
|
1517
1521
|
var columns_default = Columns;
|
|
1518
1522
|
|
|
1519
1523
|
// src/blocks/fragment/fragment.tsx
|
|
1520
1524
|
function FragmentComponent(props) {
|
|
1521
|
-
return
|
|
1525
|
+
return <><span>{props.children}</span></>;
|
|
1522
1526
|
}
|
|
1523
1527
|
var fragment_default = FragmentComponent;
|
|
1524
1528
|
|
|
1525
1529
|
// src/blocks/image/image.tsx
|
|
1526
1530
|
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
1527
|
-
import { css as css3 } from "solid-styled-components";
|
|
1528
1531
|
|
|
1529
1532
|
// src/blocks/image/image.helpers.ts
|
|
1530
1533
|
function removeProtocol(path) {
|
|
@@ -1612,59 +1615,60 @@ function Image(props) {
|
|
|
1612
1615
|
return out;
|
|
1613
1616
|
});
|
|
1614
1617
|
return <>
|
|
1615
|
-
|
|
1616
|
-
<
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1618
|
+
<>
|
|
1619
|
+
<picture>
|
|
1620
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
1621
|
+
<img
|
|
1622
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-54b38751"}
|
|
1623
|
+
loading={props.highPriority ? "eager" : "lazy"}
|
|
1624
|
+
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1625
|
+
alt={props.altText}
|
|
1626
|
+
role={props.altText ? void 0 : "presentation"}
|
|
1627
|
+
style={{
|
|
1628
|
+
"object-position": props.backgroundPosition || "center",
|
|
1629
|
+
"object-fit": props.backgroundSize || "cover",
|
|
1630
|
+
...aspectRatioCss()
|
|
1631
|
+
}}
|
|
1632
|
+
src={props.image}
|
|
1633
|
+
srcset={srcSetToUse()}
|
|
1634
|
+
sizes={props.sizes}
|
|
1635
|
+
/>
|
|
1636
|
+
</picture>
|
|
1637
|
+
<Show7
|
|
1638
|
+
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
1639
|
+
><div
|
|
1640
|
+
class="builder-image-sizer div-54b38751"
|
|
1626
1641
|
style={{
|
|
1627
|
-
"
|
|
1628
|
-
"object-fit": props.backgroundSize || "cover",
|
|
1629
|
-
...aspectRatioCss()
|
|
1642
|
+
"padding-top": props.aspectRatio * 100 + "%"
|
|
1630
1643
|
}}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
flexDirection: "column",
|
|
1653
|
-
alignItems: "stretch",
|
|
1654
|
-
position: "absolute",
|
|
1655
|
-
top: "0",
|
|
1656
|
-
left: "0",
|
|
1657
|
-
width: "100%",
|
|
1658
|
-
height: "100%"
|
|
1659
|
-
})}
|
|
1660
|
-
>{props.children}</div></Show7>
|
|
1644
|
+
/></Show7>
|
|
1645
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
1646
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-54b38751-2">{props.children}</div></Show7>
|
|
1647
|
+
</>
|
|
1648
|
+
<style>{`.img-54b38751 {
|
|
1649
|
+
opacity: 1;
|
|
1650
|
+
transition: opacity 0.2s ease-in-out;
|
|
1651
|
+
}.div-54b38751 {
|
|
1652
|
+
width: 100%;
|
|
1653
|
+
pointer-events: none;
|
|
1654
|
+
font-size: 0;
|
|
1655
|
+
}.div-54b38751-2 {
|
|
1656
|
+
display: flex;
|
|
1657
|
+
flex-direction: column;
|
|
1658
|
+
align-items: stretch;
|
|
1659
|
+
position: absolute;
|
|
1660
|
+
top: 0;
|
|
1661
|
+
left: 0;
|
|
1662
|
+
width: 100%;
|
|
1663
|
+
height: 100%;
|
|
1664
|
+
}`}</style>
|
|
1661
1665
|
</>;
|
|
1662
1666
|
}
|
|
1663
1667
|
var image_default = Image;
|
|
1664
1668
|
|
|
1665
1669
|
// src/blocks/section/section.tsx
|
|
1666
1670
|
function SectionComponent(props) {
|
|
1667
|
-
return
|
|
1671
|
+
return <><section
|
|
1668
1672
|
{...{}}
|
|
1669
1673
|
{...props.attributes}
|
|
1670
1674
|
style={{
|
|
@@ -1679,7 +1683,7 @@ function SectionComponent(props) {
|
|
|
1679
1683
|
"margin-left": "auto",
|
|
1680
1684
|
"margin-right": "auto"
|
|
1681
1685
|
}}
|
|
1682
|
-
>{props.children}</section
|
|
1686
|
+
>{props.children}</section></>;
|
|
1683
1687
|
}
|
|
1684
1688
|
var section_default = SectionComponent;
|
|
1685
1689
|
|
|
@@ -2121,7 +2125,7 @@ function Accordion(props) {
|
|
|
2121
2125
|
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
2122
2126
|
}
|
|
2123
2127
|
}
|
|
2124
|
-
return
|
|
2128
|
+
return <><div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
|
|
2125
2129
|
const index = _index();
|
|
2126
2130
|
return <>
|
|
2127
2131
|
<div
|
|
@@ -2155,7 +2159,7 @@ function Accordion(props) {
|
|
|
2155
2159
|
linkComponent={props.builderLinkComponent}
|
|
2156
2160
|
/></div></Show8>
|
|
2157
2161
|
</>;
|
|
2158
|
-
}}</For5></div
|
|
2162
|
+
}}</For5></div></>;
|
|
2159
2163
|
}
|
|
2160
2164
|
var accordion_default = Accordion;
|
|
2161
2165
|
|
|
@@ -2440,7 +2444,7 @@ var componentInfo5 = {
|
|
|
2440
2444
|
name: "image",
|
|
2441
2445
|
type: "file",
|
|
2442
2446
|
bubble: true,
|
|
2443
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
2447
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
|
|
2444
2448
|
required: true,
|
|
2445
2449
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
2446
2450
|
onChange: (options) => {
|
|
@@ -2612,7 +2616,7 @@ var componentInfo7 = {
|
|
|
2612
2616
|
|
|
2613
2617
|
// src/blocks/slot/slot.tsx
|
|
2614
2618
|
function Slot(props) {
|
|
2615
|
-
return
|
|
2619
|
+
return <><div
|
|
2616
2620
|
style={{
|
|
2617
2621
|
"pointer-events": "auto"
|
|
2618
2622
|
}}
|
|
@@ -2624,7 +2628,7 @@ function Slot(props) {
|
|
|
2624
2628
|
path={`symbol.data.${props.name}`}
|
|
2625
2629
|
context={props.builderContext}
|
|
2626
2630
|
blocks={props.builderContext.rootState?.[props.name]}
|
|
2627
|
-
/></div
|
|
2631
|
+
/></div></>;
|
|
2628
2632
|
}
|
|
2629
2633
|
var slot_default = Slot;
|
|
2630
2634
|
|
|
@@ -2820,7 +2824,7 @@ function Tabs(props) {
|
|
|
2820
2824
|
setActiveTab(index);
|
|
2821
2825
|
}
|
|
2822
2826
|
}
|
|
2823
|
-
return
|
|
2827
|
+
return <><div>
|
|
2824
2828
|
<div
|
|
2825
2829
|
class="builder-tabs-wrap"
|
|
2826
2830
|
style={{
|
|
@@ -2855,7 +2859,7 @@ function Tabs(props) {
|
|
|
2855
2859
|
registeredComponents={props.builderComponents}
|
|
2856
2860
|
linkComponent={props.builderLinkComponent}
|
|
2857
2861
|
/></div></Show9>
|
|
2858
|
-
</div
|
|
2862
|
+
</div></>;
|
|
2859
2863
|
}
|
|
2860
2864
|
var tabs_default = Tabs;
|
|
2861
2865
|
|
|
@@ -2882,13 +2886,13 @@ var componentInfo10 = {
|
|
|
2882
2886
|
|
|
2883
2887
|
// src/blocks/text/text.tsx
|
|
2884
2888
|
function Text(props) {
|
|
2885
|
-
return
|
|
2889
|
+
return <><div
|
|
2886
2890
|
class="builder-text"
|
|
2887
2891
|
innerHTML={props.text?.toString() || ""}
|
|
2888
2892
|
style={{
|
|
2889
2893
|
outline: "none"
|
|
2890
2894
|
}}
|
|
2891
|
-
|
|
2895
|
+
/></>;
|
|
2892
2896
|
}
|
|
2893
2897
|
var text_default = Text;
|
|
2894
2898
|
|
|
@@ -2956,11 +2960,11 @@ function CustomCode(props) {
|
|
|
2956
2960
|
}
|
|
2957
2961
|
}
|
|
2958
2962
|
});
|
|
2959
|
-
return
|
|
2963
|
+
return <><div
|
|
2960
2964
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
2961
2965
|
ref={elementRef}
|
|
2962
2966
|
innerHTML={props.code}
|
|
2963
|
-
|
|
2967
|
+
/></>;
|
|
2964
2968
|
}
|
|
2965
2969
|
var custom_code_default = CustomCode;
|
|
2966
2970
|
|
|
@@ -2978,7 +2982,7 @@ var componentInfo12 = {
|
|
|
2978
2982
|
const url = options.get("url");
|
|
2979
2983
|
if (url) {
|
|
2980
2984
|
options.set("content", "Loading...");
|
|
2981
|
-
const apiKey =
|
|
2985
|
+
const apiKey = _iframelyApiKey;
|
|
2982
2986
|
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
2983
2987
|
if (options.get("url") === url) {
|
|
2984
2988
|
if (data.html) {
|
|
@@ -3048,7 +3052,7 @@ function Embed(props) {
|
|
|
3048
3052
|
createEffect(
|
|
3049
3053
|
on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
3050
3054
|
);
|
|
3051
|
-
return
|
|
3055
|
+
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
3052
3056
|
}
|
|
3053
3057
|
var embed_default = Embed;
|
|
3054
3058
|
|
|
@@ -3288,7 +3292,6 @@ var componentInfo13 = {
|
|
|
3288
3292
|
|
|
3289
3293
|
// src/blocks/form/form/form.tsx
|
|
3290
3294
|
import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
|
|
3291
|
-
import { css as css4 } from "solid-styled-components";
|
|
3292
3295
|
|
|
3293
3296
|
// src/functions/get-env.ts
|
|
3294
3297
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -3491,50 +3494,51 @@ function FormComponent(props) {
|
|
|
3491
3494
|
}
|
|
3492
3495
|
}
|
|
3493
3496
|
let formRef;
|
|
3494
|
-
return
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3497
|
+
return <>
|
|
3498
|
+
<form
|
|
3499
|
+
validate={props.validate}
|
|
3500
|
+
ref={formRef}
|
|
3501
|
+
action={!props.sendWithJs && props.action}
|
|
3502
|
+
method={props.method}
|
|
3503
|
+
name={props.name}
|
|
3504
|
+
onSubmit={(event) => onSubmit(event)}
|
|
3505
|
+
{...{}}
|
|
3506
|
+
{...{}}
|
|
3507
|
+
{...props.attributes}
|
|
3508
|
+
>
|
|
3509
|
+
<Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
|
|
3510
|
+
const idx = _index();
|
|
3511
|
+
return <Block_default
|
|
3512
|
+
key={`form-block-${idx}`}
|
|
3513
|
+
block={block}
|
|
3514
|
+
context={props.builderContext}
|
|
3515
|
+
registeredComponents={props.builderComponents}
|
|
3516
|
+
linkComponent={props.builderLinkComponent}
|
|
3517
|
+
/>;
|
|
3518
|
+
}}</For7></Show10>
|
|
3519
|
+
<Show10 when={submissionState() === "error"}><Blocks_default
|
|
3520
|
+
path="errorMessage"
|
|
3521
|
+
blocks={props.errorMessage}
|
|
3510
3522
|
context={props.builderContext}
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
})}
|
|
3531
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></Show10>
|
|
3532
|
-
<Show10 when={submissionState() === "success"}><Blocks_default
|
|
3533
|
-
path="successMessage"
|
|
3534
|
-
blocks={props.successMessage}
|
|
3535
|
-
context={props.builderContext}
|
|
3536
|
-
/></Show10>
|
|
3537
|
-
</form>;
|
|
3523
|
+
/></Show10>
|
|
3524
|
+
<Show10 when={submissionState() === "sending"}><Blocks_default
|
|
3525
|
+
path="sendingMessage"
|
|
3526
|
+
blocks={props.sendingMessage}
|
|
3527
|
+
context={props.builderContext}
|
|
3528
|
+
/></Show10>
|
|
3529
|
+
<Show10 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show10>
|
|
3530
|
+
<Show10 when={submissionState() === "success"}><Blocks_default
|
|
3531
|
+
path="successMessage"
|
|
3532
|
+
blocks={props.successMessage}
|
|
3533
|
+
context={props.builderContext}
|
|
3534
|
+
/></Show10>
|
|
3535
|
+
</form>
|
|
3536
|
+
<style>{`.pre-2e825338 {
|
|
3537
|
+
padding: 10px;
|
|
3538
|
+
color: red;
|
|
3539
|
+
text-align: center;
|
|
3540
|
+
}`}</style>
|
|
3541
|
+
</>;
|
|
3538
3542
|
}
|
|
3539
3543
|
var form_default = FormComponent;
|
|
3540
3544
|
|
|
@@ -3594,7 +3598,7 @@ var componentInfo14 = {
|
|
|
3594
3598
|
|
|
3595
3599
|
// src/blocks/form/input/input.tsx
|
|
3596
3600
|
function FormInputComponent(props) {
|
|
3597
|
-
return
|
|
3601
|
+
return <><input
|
|
3598
3602
|
{...{}}
|
|
3599
3603
|
{...props.attributes}
|
|
3600
3604
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
@@ -3604,7 +3608,7 @@ function FormInputComponent(props) {
|
|
|
3604
3608
|
value={props.value}
|
|
3605
3609
|
defaultValue={props.defaultValue}
|
|
3606
3610
|
required={props.required}
|
|
3607
|
-
|
|
3611
|
+
/></>;
|
|
3608
3612
|
}
|
|
3609
3613
|
var input_default = FormInputComponent;
|
|
3610
3614
|
|
|
@@ -3656,17 +3660,18 @@ var componentInfo15 = {
|
|
|
3656
3660
|
// src/blocks/form/select/select.tsx
|
|
3657
3661
|
import { For as For8 } from "solid-js";
|
|
3658
3662
|
function SelectComponent(props) {
|
|
3659
|
-
return
|
|
3663
|
+
return <><select
|
|
3660
3664
|
{...{}}
|
|
3661
3665
|
{...props.attributes}
|
|
3662
3666
|
value={props.value}
|
|
3663
3667
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
3664
3668
|
defaultValue={props.defaultValue}
|
|
3665
3669
|
name={props.name}
|
|
3670
|
+
required={props.required}
|
|
3666
3671
|
><For8 each={props.options}>{(option, _index) => {
|
|
3667
3672
|
const index = _index();
|
|
3668
3673
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
3669
|
-
}}</For8></select
|
|
3674
|
+
}}</For8></select></>;
|
|
3670
3675
|
}
|
|
3671
3676
|
var select_default = SelectComponent;
|
|
3672
3677
|
|
|
@@ -3700,12 +3705,65 @@ var componentInfo16 = {
|
|
|
3700
3705
|
|
|
3701
3706
|
// src/blocks/form/submit-button/submit-button.tsx
|
|
3702
3707
|
function SubmitButton(props) {
|
|
3703
|
-
return
|
|
3708
|
+
return <><button type="submit" {...{}} {...props.attributes}>{props.text}</button></>;
|
|
3704
3709
|
}
|
|
3705
3710
|
var submit_button_default = SubmitButton;
|
|
3706
3711
|
|
|
3707
|
-
// src/blocks/
|
|
3712
|
+
// src/blocks/form/textarea/component-info.ts
|
|
3708
3713
|
var componentInfo17 = {
|
|
3714
|
+
name: "Form:TextArea",
|
|
3715
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
3716
|
+
inputs: [{
|
|
3717
|
+
advanced: true,
|
|
3718
|
+
name: "value",
|
|
3719
|
+
type: "string"
|
|
3720
|
+
}, {
|
|
3721
|
+
name: "name",
|
|
3722
|
+
type: "string",
|
|
3723
|
+
required: true,
|
|
3724
|
+
helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
|
|
3725
|
+
}, {
|
|
3726
|
+
name: "defaultValue",
|
|
3727
|
+
type: "string"
|
|
3728
|
+
}, {
|
|
3729
|
+
name: "placeholder",
|
|
3730
|
+
type: "string",
|
|
3731
|
+
defaultValue: "Hello there"
|
|
3732
|
+
}, {
|
|
3733
|
+
name: "required",
|
|
3734
|
+
type: "boolean",
|
|
3735
|
+
defaultValue: false
|
|
3736
|
+
}],
|
|
3737
|
+
defaultStyles: {
|
|
3738
|
+
paddingTop: "10px",
|
|
3739
|
+
paddingBottom: "10px",
|
|
3740
|
+
paddingLeft: "10px",
|
|
3741
|
+
paddingRight: "10px",
|
|
3742
|
+
borderRadius: "3px",
|
|
3743
|
+
borderWidth: "1px",
|
|
3744
|
+
borderStyle: "solid",
|
|
3745
|
+
borderColor: "#ccc"
|
|
3746
|
+
},
|
|
3747
|
+
static: true,
|
|
3748
|
+
noWrap: true
|
|
3749
|
+
};
|
|
3750
|
+
|
|
3751
|
+
// src/blocks/form/textarea/textarea.tsx
|
|
3752
|
+
function Textarea(props) {
|
|
3753
|
+
return <><textarea
|
|
3754
|
+
{...{}}
|
|
3755
|
+
{...props.attributes}
|
|
3756
|
+
placeholder={props.placeholder}
|
|
3757
|
+
name={props.name}
|
|
3758
|
+
value={props.value}
|
|
3759
|
+
defaultValue={props.defaultValue}
|
|
3760
|
+
required={props.required}
|
|
3761
|
+
/></>;
|
|
3762
|
+
}
|
|
3763
|
+
var textarea_default = Textarea;
|
|
3764
|
+
|
|
3765
|
+
// src/blocks/img/component-info.ts
|
|
3766
|
+
var componentInfo18 = {
|
|
3709
3767
|
// friendlyName?
|
|
3710
3768
|
name: "Raw:Img",
|
|
3711
3769
|
hideFromInsertMenu: true,
|
|
@@ -3723,7 +3781,7 @@ var componentInfo17 = {
|
|
|
3723
3781
|
|
|
3724
3782
|
// src/blocks/img/img.tsx
|
|
3725
3783
|
function ImgComponent(props) {
|
|
3726
|
-
return
|
|
3784
|
+
return <><img
|
|
3727
3785
|
style={{
|
|
3728
3786
|
"object-fit": props.backgroundSize || "cover",
|
|
3729
3787
|
"object-position": props.backgroundPosition || "center"
|
|
@@ -3733,12 +3791,12 @@ function ImgComponent(props) {
|
|
|
3733
3791
|
src={props.imgSrc || props.image}
|
|
3734
3792
|
{...{}}
|
|
3735
3793
|
{...props.attributes}
|
|
3736
|
-
|
|
3794
|
+
/></>;
|
|
3737
3795
|
}
|
|
3738
3796
|
var img_default = ImgComponent;
|
|
3739
3797
|
|
|
3740
3798
|
// src/blocks/video/component-info.ts
|
|
3741
|
-
var
|
|
3799
|
+
var componentInfo19 = {
|
|
3742
3800
|
name: "Video",
|
|
3743
3801
|
canHaveChildren: true,
|
|
3744
3802
|
defaultStyles: {
|
|
@@ -3848,7 +3906,7 @@ function Video(props) {
|
|
|
3848
3906
|
...videoProps()
|
|
3849
3907
|
};
|
|
3850
3908
|
});
|
|
3851
|
-
return
|
|
3909
|
+
return <><div
|
|
3852
3910
|
style={{
|
|
3853
3911
|
position: "relative"
|
|
3854
3912
|
}}
|
|
@@ -3904,7 +3962,7 @@ function Video(props) {
|
|
|
3904
3962
|
height: "100%"
|
|
3905
3963
|
}}
|
|
3906
3964
|
>{props.children}</div></Show11>
|
|
3907
|
-
</div
|
|
3965
|
+
</div></>;
|
|
3908
3966
|
}
|
|
3909
3967
|
var video_default = Video;
|
|
3910
3968
|
|
|
@@ -3927,12 +3985,15 @@ var getExtraComponents = () => [{
|
|
|
3927
3985
|
}, {
|
|
3928
3986
|
component: select_default,
|
|
3929
3987
|
...componentInfo15
|
|
3988
|
+
}, {
|
|
3989
|
+
component: textarea_default,
|
|
3990
|
+
...componentInfo17
|
|
3930
3991
|
}], {
|
|
3931
3992
|
component: img_default,
|
|
3932
|
-
...
|
|
3993
|
+
...componentInfo18
|
|
3933
3994
|
}, {
|
|
3934
3995
|
component: video_default,
|
|
3935
|
-
...
|
|
3996
|
+
...componentInfo19
|
|
3936
3997
|
}];
|
|
3937
3998
|
|
|
3938
3999
|
// src/constants/builder-registered-components.ts
|
|
@@ -4038,7 +4099,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
4038
4099
|
|
|
4039
4100
|
// src/components/inlined-script.tsx
|
|
4040
4101
|
function InlinedScript(props) {
|
|
4041
|
-
return
|
|
4102
|
+
return <><script innerHTML={props.scriptStr} data-id={props.id} /></>;
|
|
4042
4103
|
}
|
|
4043
4104
|
var Inlined_script_default = InlinedScript;
|
|
4044
4105
|
|
|
@@ -4552,7 +4613,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4552
4613
|
}
|
|
4553
4614
|
|
|
4554
4615
|
// src/constants/sdk-version.ts
|
|
4555
|
-
var SDK_VERSION = "1.0.
|
|
4616
|
+
var SDK_VERSION = "1.0.36";
|
|
4556
4617
|
|
|
4557
4618
|
// src/functions/register.ts
|
|
4558
4619
|
var registry = {};
|
|
@@ -5117,7 +5178,7 @@ function EnableEditor(props) {
|
|
|
5117
5178
|
}
|
|
5118
5179
|
}
|
|
5119
5180
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
5120
|
-
return
|
|
5181
|
+
return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
|
|
5121
5182
|
class={getWrapperClassName(
|
|
5122
5183
|
props.content?.testVariationId || props.content?.id
|
|
5123
5184
|
)}
|
|
@@ -5130,7 +5191,7 @@ function EnableEditor(props) {
|
|
|
5130
5191
|
{...showContentProps()}
|
|
5131
5192
|
{...props.contentWrapperProps}
|
|
5132
5193
|
component={ContentWrapper()}
|
|
5133
|
-
>{props.children}</Dynamic5></Show12></builder_context_default.Provider
|
|
5194
|
+
>{props.children}</Dynamic5></Show12></builder_context_default.Provider></>;
|
|
5134
5195
|
}
|
|
5135
5196
|
var Enable_editor_default = EnableEditor;
|
|
5136
5197
|
|
|
@@ -5149,10 +5210,10 @@ ${getFontCss({
|
|
|
5149
5210
|
${getDefaultStyles(props.isNestedRender)}
|
|
5150
5211
|
`.trim()
|
|
5151
5212
|
);
|
|
5152
|
-
return
|
|
5213
|
+
return <><Inlined_styles_default
|
|
5153
5214
|
id="builderio-content"
|
|
5154
5215
|
styles={injectedStyles()}
|
|
5155
|
-
|
|
5216
|
+
/></>;
|
|
5156
5217
|
}
|
|
5157
5218
|
var Styles_default = ContentStyles;
|
|
5158
5219
|
|
|
@@ -5253,7 +5314,7 @@ function ContentComponent(props) {
|
|
|
5253
5314
|
rootState: newRootState
|
|
5254
5315
|
}));
|
|
5255
5316
|
}
|
|
5256
|
-
return
|
|
5317
|
+
return <><components_context_default.Provider
|
|
5257
5318
|
value={{
|
|
5258
5319
|
registeredComponents: registeredComponents()
|
|
5259
5320
|
}}
|
|
@@ -5291,7 +5352,7 @@ function ContentComponent(props) {
|
|
|
5291
5352
|
registeredComponents={registeredComponents()}
|
|
5292
5353
|
linkComponent={props.linkComponent}
|
|
5293
5354
|
/>
|
|
5294
|
-
</Enable_editor_default></components_context_default.Provider
|
|
5355
|
+
</Enable_editor_default></components_context_default.Provider></>;
|
|
5295
5356
|
}
|
|
5296
5357
|
var Content_default = ContentComponent;
|
|
5297
5358
|
|
|
@@ -5327,7 +5388,7 @@ function ContentVariants(props) {
|
|
|
5327
5388
|
onMount4(() => {
|
|
5328
5389
|
setShouldRenderVariants(false);
|
|
5329
5390
|
});
|
|
5330
|
-
return
|
|
5391
|
+
return <><>
|
|
5331
5392
|
<Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
5332
5393
|
id="builderio-init-variants-fns"
|
|
5333
5394
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
@@ -5389,7 +5450,7 @@ function ContentVariants(props) {
|
|
|
5389
5450
|
contentWrapperProps={props.contentWrapperProps}
|
|
5390
5451
|
trustedHosts={props.trustedHosts}
|
|
5391
5452
|
/>
|
|
5392
|
-
|
|
5453
|
+
</></>;
|
|
5393
5454
|
}
|
|
5394
5455
|
var Content_variants_default = ContentVariants;
|
|
5395
5456
|
|
|
@@ -5453,7 +5514,7 @@ function Symbol(props) {
|
|
|
5453
5514
|
setContent();
|
|
5454
5515
|
}
|
|
5455
5516
|
createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
5456
|
-
return
|
|
5517
|
+
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
5457
5518
|
isNestedRender={true}
|
|
5458
5519
|
apiVersion={props.builderContext.apiVersion}
|
|
5459
5520
|
apiKey={props.builderContext.apiKey}
|
|
@@ -5473,7 +5534,7 @@ function Symbol(props) {
|
|
|
5473
5534
|
linkComponent={props.builderLinkComponent}
|
|
5474
5535
|
blocksWrapper={blocksWrapper()}
|
|
5475
5536
|
contentWrapper={contentWrapper()}
|
|
5476
|
-
/></div
|
|
5537
|
+
/></div></>;
|
|
5477
5538
|
}
|
|
5478
5539
|
var symbol_default = Symbol;
|
|
5479
5540
|
|