@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/edge/index.jsx
CHANGED
|
@@ -18,7 +18,7 @@ var isEmptyElement = (tagName) => {
|
|
|
18
18
|
|
|
19
19
|
// src/components/dynamic-renderer/dynamic-renderer.tsx
|
|
20
20
|
function DynamicRenderer(props) {
|
|
21
|
-
return
|
|
21
|
+
return <><Show
|
|
22
22
|
fallback={<Dynamic
|
|
23
23
|
{...props.attributes}
|
|
24
24
|
{...props.actionAttributes}
|
|
@@ -36,7 +36,7 @@ function DynamicRenderer(props) {
|
|
|
36
36
|
{...props.attributes}
|
|
37
37
|
{...props.actionAttributes}
|
|
38
38
|
component={props.TagName}
|
|
39
|
-
>{props.children}</Dynamic></Show></Show
|
|
39
|
+
>{props.children}</Dynamic></Show></Show></>;
|
|
40
40
|
}
|
|
41
41
|
var Dynamic_renderer_default = DynamicRenderer;
|
|
42
42
|
|
|
@@ -74,17 +74,16 @@ function Button(props) {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return <><Dynamic_renderer_default
|
|
78
78
|
attributes={attrs()}
|
|
79
79
|
TagName={props.link ? props.builderLinkComponent || "a" : "button"}
|
|
80
80
|
actionAttributes={{}}
|
|
81
|
-
>{props.text}</Dynamic_renderer_default
|
|
81
|
+
>{props.text}</Dynamic_renderer_default></>;
|
|
82
82
|
}
|
|
83
83
|
var button_default = Button;
|
|
84
84
|
|
|
85
85
|
// src/blocks/columns/columns.tsx
|
|
86
86
|
import { Show as Show6, For as For4, createSignal as createSignal7 } from "solid-js";
|
|
87
|
-
import { css as css2 } from "solid-styled-components";
|
|
88
87
|
|
|
89
88
|
// src/components/blocks/blocks.tsx
|
|
90
89
|
import { useContext, Show as Show5, For as For3 } from "solid-js";
|
|
@@ -3989,7 +3988,7 @@ var getSizesForBreakpoints = ({
|
|
|
3989
3988
|
|
|
3990
3989
|
// src/components/inlined-styles.tsx
|
|
3991
3990
|
function InlinedStyles(props) {
|
|
3992
|
-
return
|
|
3991
|
+
return <><style innerHTML={props.styles} data-id={props.id} /></>;
|
|
3993
3992
|
}
|
|
3994
3993
|
var Inlined_styles_default = InlinedStyles;
|
|
3995
3994
|
|
|
@@ -4012,7 +4011,7 @@ function BlockStyles(props) {
|
|
|
4012
4011
|
}
|
|
4013
4012
|
return true;
|
|
4014
4013
|
});
|
|
4015
|
-
const
|
|
4014
|
+
const css = createMemo(() => {
|
|
4016
4015
|
const processedBlock = getProcessedBlock({
|
|
4017
4016
|
block: props.block,
|
|
4018
4017
|
localState: props.context.localState,
|
|
@@ -4075,7 +4074,7 @@ function BlockStyles(props) {
|
|
|
4075
4074
|
hoverStylesClass
|
|
4076
4075
|
].join(" ");
|
|
4077
4076
|
});
|
|
4078
|
-
return
|
|
4077
|
+
return <><Show2 when={TARGET !== "reactNative" && css() && canShowBlock()}><Inlined_styles_default id="builderio-block" styles={css()} /></Show2></>;
|
|
4079
4078
|
}
|
|
4080
4079
|
var Block_styles_default = BlockStyles;
|
|
4081
4080
|
|
|
@@ -4158,7 +4157,7 @@ function getBlockProperties({
|
|
|
4158
4157
|
|
|
4159
4158
|
// src/components/block/components/block-wrapper.tsx
|
|
4160
4159
|
function BlockWrapper(props) {
|
|
4161
|
-
return
|
|
4160
|
+
return <><Dynamic_renderer_default
|
|
4162
4161
|
TagName={props.Wrapper}
|
|
4163
4162
|
attributes={getBlockProperties({
|
|
4164
4163
|
block: props.block,
|
|
@@ -4172,7 +4171,7 @@ function BlockWrapper(props) {
|
|
|
4172
4171
|
context: props.context.context,
|
|
4173
4172
|
stripPrefix: true
|
|
4174
4173
|
})}
|
|
4175
|
-
>{props.children}</Dynamic_renderer_default
|
|
4174
|
+
>{props.children}</Dynamic_renderer_default></>;
|
|
4176
4175
|
}
|
|
4177
4176
|
var Block_wrapper_default = BlockWrapper;
|
|
4178
4177
|
|
|
@@ -4199,11 +4198,11 @@ function InteractiveElement(props) {
|
|
|
4199
4198
|
})
|
|
4200
4199
|
} : {};
|
|
4201
4200
|
});
|
|
4202
|
-
return
|
|
4201
|
+
return <><Dynamic2
|
|
4203
4202
|
{...props.wrapperProps}
|
|
4204
4203
|
attributes={attributes()}
|
|
4205
4204
|
component={props.Wrapper}
|
|
4206
|
-
>{props.children}</Dynamic2
|
|
4205
|
+
>{props.children}</Dynamic2></>;
|
|
4207
4206
|
}
|
|
4208
4207
|
var interactive_element_default = InteractiveElement;
|
|
4209
4208
|
|
|
@@ -4245,7 +4244,7 @@ function ComponentRef(props) {
|
|
|
4245
4244
|
const [Wrapper, setWrapper] = createSignal3(
|
|
4246
4245
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
4247
4246
|
);
|
|
4248
|
-
return
|
|
4247
|
+
return <><Show3 when={props.componentRef}><Dynamic3
|
|
4249
4248
|
{...getWrapperProps({
|
|
4250
4249
|
componentOptions: props.componentOptions,
|
|
4251
4250
|
builderBlock: props.builderBlock,
|
|
@@ -4266,7 +4265,7 @@ function ComponentRef(props) {
|
|
|
4266
4265
|
registeredComponents={props.registeredComponents}
|
|
4267
4266
|
linkComponent={props.linkComponent}
|
|
4268
4267
|
/>;
|
|
4269
|
-
}}</For></Dynamic3></Show3
|
|
4268
|
+
}}</For></Dynamic3></Show3></>;
|
|
4270
4269
|
}
|
|
4271
4270
|
var Component_ref_default = ComponentRef;
|
|
4272
4271
|
|
|
@@ -4274,12 +4273,12 @@ var Component_ref_default = ComponentRef;
|
|
|
4274
4273
|
import { createSignal as createSignal4 } from "solid-js";
|
|
4275
4274
|
function RepeatedBlock(props) {
|
|
4276
4275
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
4277
|
-
return
|
|
4276
|
+
return <><builder_context_default.Provider value={store()}><Block_default
|
|
4278
4277
|
block={props.block}
|
|
4279
4278
|
context={store()}
|
|
4280
4279
|
registeredComponents={props.registeredComponents}
|
|
4281
4280
|
linkComponent={props.linkComponent}
|
|
4282
|
-
/></builder_context_default.Provider
|
|
4281
|
+
/></builder_context_default.Provider></>;
|
|
4283
4282
|
}
|
|
4284
4283
|
var Repeated_block_default = RepeatedBlock;
|
|
4285
4284
|
|
|
@@ -4363,7 +4362,7 @@ function Block(props) {
|
|
|
4363
4362
|
);
|
|
4364
4363
|
}
|
|
4365
4364
|
});
|
|
4366
|
-
return
|
|
4365
|
+
return <><Show4 when={canShowBlock()}>
|
|
4367
4366
|
<Block_styles_default block={props.block} context={props.context} />
|
|
4368
4367
|
<Show4
|
|
4369
4368
|
fallback={<Component_ref_default
|
|
@@ -4417,14 +4416,13 @@ function Block(props) {
|
|
|
4417
4416
|
/>;
|
|
4418
4417
|
}}</For2>
|
|
4419
4418
|
</Block_wrapper_default></Show4></Show4>
|
|
4420
|
-
</Show4
|
|
4419
|
+
</Show4></>;
|
|
4421
4420
|
}
|
|
4422
4421
|
var Block_default = Block;
|
|
4423
4422
|
|
|
4424
4423
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4425
4424
|
import { createMemo as createMemo6 } from "solid-js";
|
|
4426
4425
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4427
|
-
import { css } from "solid-styled-components";
|
|
4428
4426
|
function BlocksWrapper(props) {
|
|
4429
4427
|
const className = createMemo6(() => {
|
|
4430
4428
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
@@ -4457,22 +4455,25 @@ function BlocksWrapper(props) {
|
|
|
4457
4455
|
);
|
|
4458
4456
|
}
|
|
4459
4457
|
}
|
|
4460
|
-
return
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
{
|
|
4474
|
-
|
|
4475
|
-
|
|
4458
|
+
return <>
|
|
4459
|
+
<Dynamic4
|
|
4460
|
+
class={className() + " dynamic-1bb6a3a2"}
|
|
4461
|
+
builder-path={props.path}
|
|
4462
|
+
builder-parent-id={props.parent}
|
|
4463
|
+
{...{}}
|
|
4464
|
+
style={props.styleProp}
|
|
4465
|
+
onClick={(event) => onClick()}
|
|
4466
|
+
onMouseEnter={(event) => onMouseEnter()}
|
|
4467
|
+
onKeyPress={(event) => onClick()}
|
|
4468
|
+
{...props.BlocksWrapperProps}
|
|
4469
|
+
component={props.BlocksWrapper}
|
|
4470
|
+
>{props.children}</Dynamic4>
|
|
4471
|
+
<style>{`.dynamic-1bb6a3a2 {
|
|
4472
|
+
display: flex;
|
|
4473
|
+
flex-direction: column;
|
|
4474
|
+
align-items: stretch;
|
|
4475
|
+
}`}</style>
|
|
4476
|
+
</>;
|
|
4476
4477
|
}
|
|
4477
4478
|
var Blocks_wrapper_default = BlocksWrapper;
|
|
4478
4479
|
|
|
@@ -4480,7 +4481,7 @@ var Blocks_wrapper_default = BlocksWrapper;
|
|
|
4480
4481
|
function Blocks(props) {
|
|
4481
4482
|
const builderContext = useContext(builder_context_default);
|
|
4482
4483
|
const componentsContext = useContext(components_context_default);
|
|
4483
|
-
return
|
|
4484
|
+
return <><Blocks_wrapper_default
|
|
4484
4485
|
blocks={props.blocks}
|
|
4485
4486
|
parent={props.parent}
|
|
4486
4487
|
path={props.path}
|
|
@@ -4496,7 +4497,7 @@ function Blocks(props) {
|
|
|
4496
4497
|
context={props.context || builderContext}
|
|
4497
4498
|
registeredComponents={props.registeredComponents || componentsContext.registeredComponents}
|
|
4498
4499
|
/>;
|
|
4499
|
-
}}</For3></Show5></Blocks_wrapper_default
|
|
4500
|
+
}}</For3></Show5></Blocks_wrapper_default></>;
|
|
4500
4501
|
}
|
|
4501
4502
|
var Blocks_default = Blocks;
|
|
4502
4503
|
|
|
@@ -4623,50 +4624,52 @@ function Columns(props) {
|
|
|
4623
4624
|
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4624
4625
|
};
|
|
4625
4626
|
}
|
|
4626
|
-
return
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4627
|
+
return <>
|
|
4628
|
+
<div
|
|
4629
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-f2f53158"}
|
|
4630
|
+
style={columnsCssVars()}
|
|
4631
|
+
{...{}}
|
|
4632
|
+
>
|
|
4633
|
+
<Show6 when={TARGET !== "reactNative"}><Inlined_styles_default
|
|
4634
|
+
id="builderio-columns"
|
|
4635
|
+
styles={columnsStyles()}
|
|
4636
|
+
/></Show6>
|
|
4637
|
+
<For4 each={props.columns}>{(column, _index) => {
|
|
4638
|
+
const index = _index();
|
|
4639
|
+
return <Dynamic_renderer_default
|
|
4640
|
+
key={index}
|
|
4641
|
+
TagName={getTagName(column)}
|
|
4642
|
+
actionAttributes={{}}
|
|
4643
|
+
attributes={getAttributes(column, index)}
|
|
4644
|
+
><Blocks_default
|
|
4645
|
+
path={`component.options.columns.${index}.blocks`}
|
|
4646
|
+
parent={props.builderBlock.id}
|
|
4647
|
+
styleProp={{
|
|
4648
|
+
flexGrow: "1"
|
|
4649
|
+
}}
|
|
4650
|
+
context={props.builderContext}
|
|
4651
|
+
registeredComponents={props.builderComponents}
|
|
4652
|
+
linkComponent={props.builderLinkComponent}
|
|
4653
|
+
blocks={column.blocks}
|
|
4654
|
+
/></Dynamic_renderer_default>;
|
|
4655
|
+
}}</For4>
|
|
4656
|
+
</div>
|
|
4657
|
+
<style>{`.div-f2f53158 {
|
|
4658
|
+
display: flex;
|
|
4659
|
+
line-height: normal;
|
|
4660
|
+
}`}</style>
|
|
4661
|
+
</>;
|
|
4658
4662
|
}
|
|
4659
4663
|
var columns_default = Columns;
|
|
4660
4664
|
|
|
4661
4665
|
// src/blocks/fragment/fragment.tsx
|
|
4662
4666
|
function FragmentComponent(props) {
|
|
4663
|
-
return
|
|
4667
|
+
return <><span>{props.children}</span></>;
|
|
4664
4668
|
}
|
|
4665
4669
|
var fragment_default = FragmentComponent;
|
|
4666
4670
|
|
|
4667
4671
|
// src/blocks/image/image.tsx
|
|
4668
4672
|
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
4669
|
-
import { css as css3 } from "solid-styled-components";
|
|
4670
4673
|
|
|
4671
4674
|
// src/blocks/image/image.helpers.ts
|
|
4672
4675
|
function removeProtocol(path) {
|
|
@@ -4753,59 +4756,60 @@ function Image(props) {
|
|
|
4753
4756
|
return out;
|
|
4754
4757
|
});
|
|
4755
4758
|
return <>
|
|
4756
|
-
|
|
4757
|
-
<
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4759
|
+
<>
|
|
4760
|
+
<picture>
|
|
4761
|
+
<Show7 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show7>
|
|
4762
|
+
<img
|
|
4763
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-54b38751"}
|
|
4764
|
+
loading={props.highPriority ? "eager" : "lazy"}
|
|
4765
|
+
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
4766
|
+
alt={props.altText}
|
|
4767
|
+
role={props.altText ? void 0 : "presentation"}
|
|
4768
|
+
style={{
|
|
4769
|
+
"object-position": props.backgroundPosition || "center",
|
|
4770
|
+
"object-fit": props.backgroundSize || "cover",
|
|
4771
|
+
...aspectRatioCss()
|
|
4772
|
+
}}
|
|
4773
|
+
src={props.image}
|
|
4774
|
+
srcset={srcSetToUse()}
|
|
4775
|
+
sizes={props.sizes}
|
|
4776
|
+
/>
|
|
4777
|
+
</picture>
|
|
4778
|
+
<Show7
|
|
4779
|
+
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
4780
|
+
><div
|
|
4781
|
+
class="builder-image-sizer div-54b38751"
|
|
4767
4782
|
style={{
|
|
4768
|
-
"
|
|
4769
|
-
"object-fit": props.backgroundSize || "cover",
|
|
4770
|
-
...aspectRatioCss()
|
|
4783
|
+
"padding-top": props.aspectRatio * 100 + "%"
|
|
4771
4784
|
}}
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
flexDirection: "column",
|
|
4794
|
-
alignItems: "stretch",
|
|
4795
|
-
position: "absolute",
|
|
4796
|
-
top: "0",
|
|
4797
|
-
left: "0",
|
|
4798
|
-
width: "100%",
|
|
4799
|
-
height: "100%"
|
|
4800
|
-
})}
|
|
4801
|
-
>{props.children}</div></Show7>
|
|
4785
|
+
/></Show7>
|
|
4786
|
+
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4787
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-54b38751-2">{props.children}</div></Show7>
|
|
4788
|
+
</>
|
|
4789
|
+
<style>{`.img-54b38751 {
|
|
4790
|
+
opacity: 1;
|
|
4791
|
+
transition: opacity 0.2s ease-in-out;
|
|
4792
|
+
}.div-54b38751 {
|
|
4793
|
+
width: 100%;
|
|
4794
|
+
pointer-events: none;
|
|
4795
|
+
font-size: 0;
|
|
4796
|
+
}.div-54b38751-2 {
|
|
4797
|
+
display: flex;
|
|
4798
|
+
flex-direction: column;
|
|
4799
|
+
align-items: stretch;
|
|
4800
|
+
position: absolute;
|
|
4801
|
+
top: 0;
|
|
4802
|
+
left: 0;
|
|
4803
|
+
width: 100%;
|
|
4804
|
+
height: 100%;
|
|
4805
|
+
}`}</style>
|
|
4802
4806
|
</>;
|
|
4803
4807
|
}
|
|
4804
4808
|
var image_default = Image;
|
|
4805
4809
|
|
|
4806
4810
|
// src/blocks/section/section.tsx
|
|
4807
4811
|
function SectionComponent(props) {
|
|
4808
|
-
return
|
|
4812
|
+
return <><section
|
|
4809
4813
|
{...{}}
|
|
4810
4814
|
{...props.attributes}
|
|
4811
4815
|
style={{
|
|
@@ -4820,7 +4824,7 @@ function SectionComponent(props) {
|
|
|
4820
4824
|
"margin-left": "auto",
|
|
4821
4825
|
"margin-right": "auto"
|
|
4822
4826
|
}}
|
|
4823
|
-
>{props.children}</section
|
|
4827
|
+
>{props.children}</section></>;
|
|
4824
4828
|
}
|
|
4825
4829
|
var section_default = SectionComponent;
|
|
4826
4830
|
|
|
@@ -5262,7 +5266,7 @@ function Accordion(props) {
|
|
|
5262
5266
|
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
5263
5267
|
}
|
|
5264
5268
|
}
|
|
5265
|
-
return
|
|
5269
|
+
return <><div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
|
|
5266
5270
|
const index = _index();
|
|
5267
5271
|
return <>
|
|
5268
5272
|
<div
|
|
@@ -5296,7 +5300,7 @@ function Accordion(props) {
|
|
|
5296
5300
|
linkComponent={props.builderLinkComponent}
|
|
5297
5301
|
/></div></Show8>
|
|
5298
5302
|
</>;
|
|
5299
|
-
}}</For5></div
|
|
5303
|
+
}}</For5></div></>;
|
|
5300
5304
|
}
|
|
5301
5305
|
var accordion_default = Accordion;
|
|
5302
5306
|
|
|
@@ -5581,7 +5585,7 @@ var componentInfo5 = {
|
|
|
5581
5585
|
name: "image",
|
|
5582
5586
|
type: "file",
|
|
5583
5587
|
bubble: true,
|
|
5584
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
5588
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "webp"],
|
|
5585
5589
|
required: true,
|
|
5586
5590
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
5587
5591
|
onChange: (options) => {
|
|
@@ -5752,7 +5756,7 @@ var componentInfo7 = {
|
|
|
5752
5756
|
|
|
5753
5757
|
// src/blocks/slot/slot.tsx
|
|
5754
5758
|
function Slot(props) {
|
|
5755
|
-
return
|
|
5759
|
+
return <><div
|
|
5756
5760
|
style={{
|
|
5757
5761
|
"pointer-events": "auto"
|
|
5758
5762
|
}}
|
|
@@ -5764,7 +5768,7 @@ function Slot(props) {
|
|
|
5764
5768
|
path={`symbol.data.${props.name}`}
|
|
5765
5769
|
context={props.builderContext}
|
|
5766
5770
|
blocks={props.builderContext.rootState?.[props.name]}
|
|
5767
|
-
/></div
|
|
5771
|
+
/></div></>;
|
|
5768
5772
|
}
|
|
5769
5773
|
var slot_default = Slot;
|
|
5770
5774
|
|
|
@@ -5960,7 +5964,7 @@ function Tabs(props) {
|
|
|
5960
5964
|
setActiveTab(index);
|
|
5961
5965
|
}
|
|
5962
5966
|
}
|
|
5963
|
-
return
|
|
5967
|
+
return <><div>
|
|
5964
5968
|
<div
|
|
5965
5969
|
class="builder-tabs-wrap"
|
|
5966
5970
|
style={{
|
|
@@ -5995,7 +5999,7 @@ function Tabs(props) {
|
|
|
5995
5999
|
registeredComponents={props.builderComponents}
|
|
5996
6000
|
linkComponent={props.builderLinkComponent}
|
|
5997
6001
|
/></div></Show9>
|
|
5998
|
-
</div
|
|
6002
|
+
</div></>;
|
|
5999
6003
|
}
|
|
6000
6004
|
var tabs_default = Tabs;
|
|
6001
6005
|
|
|
@@ -6022,13 +6026,13 @@ var componentInfo10 = {
|
|
|
6022
6026
|
|
|
6023
6027
|
// src/blocks/text/text.tsx
|
|
6024
6028
|
function Text(props) {
|
|
6025
|
-
return
|
|
6029
|
+
return <><div
|
|
6026
6030
|
class="builder-text"
|
|
6027
6031
|
innerHTML={props.text?.toString() || ""}
|
|
6028
6032
|
style={{
|
|
6029
6033
|
outline: "none"
|
|
6030
6034
|
}}
|
|
6031
|
-
|
|
6035
|
+
/></>;
|
|
6032
6036
|
}
|
|
6033
6037
|
var text_default = Text;
|
|
6034
6038
|
|
|
@@ -6095,11 +6099,11 @@ function CustomCode(props) {
|
|
|
6095
6099
|
}
|
|
6096
6100
|
}
|
|
6097
6101
|
});
|
|
6098
|
-
return
|
|
6102
|
+
return <><div
|
|
6099
6103
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
6100
6104
|
ref={elementRef}
|
|
6101
6105
|
innerHTML={props.code}
|
|
6102
|
-
|
|
6106
|
+
/></>;
|
|
6103
6107
|
}
|
|
6104
6108
|
var custom_code_default = CustomCode;
|
|
6105
6109
|
|
|
@@ -6117,7 +6121,7 @@ var componentInfo12 = {
|
|
|
6117
6121
|
const url = options.get("url");
|
|
6118
6122
|
if (url) {
|
|
6119
6123
|
options.set("content", "Loading...");
|
|
6120
|
-
const apiKey =
|
|
6124
|
+
const apiKey = _iframelyApiKey;
|
|
6121
6125
|
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
6122
6126
|
if (options.get("url") === url) {
|
|
6123
6127
|
if (data.html) {
|
|
@@ -6186,7 +6190,7 @@ function Embed(props) {
|
|
|
6186
6190
|
createEffect(
|
|
6187
6191
|
on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
6188
6192
|
);
|
|
6189
|
-
return
|
|
6193
|
+
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
6190
6194
|
}
|
|
6191
6195
|
var embed_default = Embed;
|
|
6192
6196
|
|
|
@@ -6426,7 +6430,6 @@ var componentInfo13 = {
|
|
|
6426
6430
|
|
|
6427
6431
|
// src/blocks/form/form/form.tsx
|
|
6428
6432
|
import { Show as Show10, For as For7, createSignal as createSignal13 } from "solid-js";
|
|
6429
|
-
import { css as css4 } from "solid-styled-components";
|
|
6430
6433
|
|
|
6431
6434
|
// src/functions/get-env.ts
|
|
6432
6435
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -6629,50 +6632,51 @@ function FormComponent(props) {
|
|
|
6629
6632
|
}
|
|
6630
6633
|
}
|
|
6631
6634
|
let formRef;
|
|
6632
|
-
return
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6635
|
+
return <>
|
|
6636
|
+
<form
|
|
6637
|
+
validate={props.validate}
|
|
6638
|
+
ref={formRef}
|
|
6639
|
+
action={!props.sendWithJs && props.action}
|
|
6640
|
+
method={props.method}
|
|
6641
|
+
name={props.name}
|
|
6642
|
+
onSubmit={(event) => onSubmit(event)}
|
|
6643
|
+
{...{}}
|
|
6644
|
+
{...{}}
|
|
6645
|
+
{...props.attributes}
|
|
6646
|
+
>
|
|
6647
|
+
<Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
|
|
6648
|
+
const idx = _index();
|
|
6649
|
+
return <Block_default
|
|
6650
|
+
key={`form-block-${idx}`}
|
|
6651
|
+
block={block}
|
|
6652
|
+
context={props.builderContext}
|
|
6653
|
+
registeredComponents={props.builderComponents}
|
|
6654
|
+
linkComponent={props.builderLinkComponent}
|
|
6655
|
+
/>;
|
|
6656
|
+
}}</For7></Show10>
|
|
6657
|
+
<Show10 when={submissionState() === "error"}><Blocks_default
|
|
6658
|
+
path="errorMessage"
|
|
6659
|
+
blocks={props.errorMessage}
|
|
6648
6660
|
context={props.builderContext}
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
})}
|
|
6669
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></Show10>
|
|
6670
|
-
<Show10 when={submissionState() === "success"}><Blocks_default
|
|
6671
|
-
path="successMessage"
|
|
6672
|
-
blocks={props.successMessage}
|
|
6673
|
-
context={props.builderContext}
|
|
6674
|
-
/></Show10>
|
|
6675
|
-
</form>;
|
|
6661
|
+
/></Show10>
|
|
6662
|
+
<Show10 when={submissionState() === "sending"}><Blocks_default
|
|
6663
|
+
path="sendingMessage"
|
|
6664
|
+
blocks={props.sendingMessage}
|
|
6665
|
+
context={props.builderContext}
|
|
6666
|
+
/></Show10>
|
|
6667
|
+
<Show10 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-2e825338">{JSON.stringify(responseData(), null, 2)}</pre></Show10>
|
|
6668
|
+
<Show10 when={submissionState() === "success"}><Blocks_default
|
|
6669
|
+
path="successMessage"
|
|
6670
|
+
blocks={props.successMessage}
|
|
6671
|
+
context={props.builderContext}
|
|
6672
|
+
/></Show10>
|
|
6673
|
+
</form>
|
|
6674
|
+
<style>{`.pre-2e825338 {
|
|
6675
|
+
padding: 10px;
|
|
6676
|
+
color: red;
|
|
6677
|
+
text-align: center;
|
|
6678
|
+
}`}</style>
|
|
6679
|
+
</>;
|
|
6676
6680
|
}
|
|
6677
6681
|
var form_default = FormComponent;
|
|
6678
6682
|
|
|
@@ -6732,7 +6736,7 @@ var componentInfo14 = {
|
|
|
6732
6736
|
|
|
6733
6737
|
// src/blocks/form/input/input.tsx
|
|
6734
6738
|
function FormInputComponent(props) {
|
|
6735
|
-
return
|
|
6739
|
+
return <><input
|
|
6736
6740
|
{...{}}
|
|
6737
6741
|
{...props.attributes}
|
|
6738
6742
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
@@ -6742,7 +6746,7 @@ function FormInputComponent(props) {
|
|
|
6742
6746
|
value={props.value}
|
|
6743
6747
|
defaultValue={props.defaultValue}
|
|
6744
6748
|
required={props.required}
|
|
6745
|
-
|
|
6749
|
+
/></>;
|
|
6746
6750
|
}
|
|
6747
6751
|
var input_default = FormInputComponent;
|
|
6748
6752
|
|
|
@@ -6794,17 +6798,18 @@ var componentInfo15 = {
|
|
|
6794
6798
|
// src/blocks/form/select/select.tsx
|
|
6795
6799
|
import { For as For8 } from "solid-js";
|
|
6796
6800
|
function SelectComponent(props) {
|
|
6797
|
-
return
|
|
6801
|
+
return <><select
|
|
6798
6802
|
{...{}}
|
|
6799
6803
|
{...props.attributes}
|
|
6800
6804
|
value={props.value}
|
|
6801
6805
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
6802
6806
|
defaultValue={props.defaultValue}
|
|
6803
6807
|
name={props.name}
|
|
6808
|
+
required={props.required}
|
|
6804
6809
|
><For8 each={props.options}>{(option, _index) => {
|
|
6805
6810
|
const index = _index();
|
|
6806
6811
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
6807
|
-
}}</For8></select
|
|
6812
|
+
}}</For8></select></>;
|
|
6808
6813
|
}
|
|
6809
6814
|
var select_default = SelectComponent;
|
|
6810
6815
|
|
|
@@ -6838,12 +6843,65 @@ var componentInfo16 = {
|
|
|
6838
6843
|
|
|
6839
6844
|
// src/blocks/form/submit-button/submit-button.tsx
|
|
6840
6845
|
function SubmitButton(props) {
|
|
6841
|
-
return
|
|
6846
|
+
return <><button type="submit" {...{}} {...props.attributes}>{props.text}</button></>;
|
|
6842
6847
|
}
|
|
6843
6848
|
var submit_button_default = SubmitButton;
|
|
6844
6849
|
|
|
6845
|
-
// src/blocks/
|
|
6850
|
+
// src/blocks/form/textarea/component-info.ts
|
|
6846
6851
|
var componentInfo17 = {
|
|
6852
|
+
name: "Form:TextArea",
|
|
6853
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
6854
|
+
inputs: [{
|
|
6855
|
+
advanced: true,
|
|
6856
|
+
name: "value",
|
|
6857
|
+
type: "string"
|
|
6858
|
+
}, {
|
|
6859
|
+
name: "name",
|
|
6860
|
+
type: "string",
|
|
6861
|
+
required: true,
|
|
6862
|
+
helperText: 'Every input in a form needs a unique name describing what it gets, e.g. "email"'
|
|
6863
|
+
}, {
|
|
6864
|
+
name: "defaultValue",
|
|
6865
|
+
type: "string"
|
|
6866
|
+
}, {
|
|
6867
|
+
name: "placeholder",
|
|
6868
|
+
type: "string",
|
|
6869
|
+
defaultValue: "Hello there"
|
|
6870
|
+
}, {
|
|
6871
|
+
name: "required",
|
|
6872
|
+
type: "boolean",
|
|
6873
|
+
defaultValue: false
|
|
6874
|
+
}],
|
|
6875
|
+
defaultStyles: {
|
|
6876
|
+
paddingTop: "10px",
|
|
6877
|
+
paddingBottom: "10px",
|
|
6878
|
+
paddingLeft: "10px",
|
|
6879
|
+
paddingRight: "10px",
|
|
6880
|
+
borderRadius: "3px",
|
|
6881
|
+
borderWidth: "1px",
|
|
6882
|
+
borderStyle: "solid",
|
|
6883
|
+
borderColor: "#ccc"
|
|
6884
|
+
},
|
|
6885
|
+
static: true,
|
|
6886
|
+
noWrap: true
|
|
6887
|
+
};
|
|
6888
|
+
|
|
6889
|
+
// src/blocks/form/textarea/textarea.tsx
|
|
6890
|
+
function Textarea(props) {
|
|
6891
|
+
return <><textarea
|
|
6892
|
+
{...{}}
|
|
6893
|
+
{...props.attributes}
|
|
6894
|
+
placeholder={props.placeholder}
|
|
6895
|
+
name={props.name}
|
|
6896
|
+
value={props.value}
|
|
6897
|
+
defaultValue={props.defaultValue}
|
|
6898
|
+
required={props.required}
|
|
6899
|
+
/></>;
|
|
6900
|
+
}
|
|
6901
|
+
var textarea_default = Textarea;
|
|
6902
|
+
|
|
6903
|
+
// src/blocks/img/component-info.ts
|
|
6904
|
+
var componentInfo18 = {
|
|
6847
6905
|
// friendlyName?
|
|
6848
6906
|
name: "Raw:Img",
|
|
6849
6907
|
hideFromInsertMenu: true,
|
|
@@ -6861,7 +6919,7 @@ var componentInfo17 = {
|
|
|
6861
6919
|
|
|
6862
6920
|
// src/blocks/img/img.tsx
|
|
6863
6921
|
function ImgComponent(props) {
|
|
6864
|
-
return
|
|
6922
|
+
return <><img
|
|
6865
6923
|
style={{
|
|
6866
6924
|
"object-fit": props.backgroundSize || "cover",
|
|
6867
6925
|
"object-position": props.backgroundPosition || "center"
|
|
@@ -6871,12 +6929,12 @@ function ImgComponent(props) {
|
|
|
6871
6929
|
src={props.imgSrc || props.image}
|
|
6872
6930
|
{...{}}
|
|
6873
6931
|
{...props.attributes}
|
|
6874
|
-
|
|
6932
|
+
/></>;
|
|
6875
6933
|
}
|
|
6876
6934
|
var img_default = ImgComponent;
|
|
6877
6935
|
|
|
6878
6936
|
// src/blocks/video/component-info.ts
|
|
6879
|
-
var
|
|
6937
|
+
var componentInfo19 = {
|
|
6880
6938
|
name: "Video",
|
|
6881
6939
|
canHaveChildren: true,
|
|
6882
6940
|
defaultStyles: {
|
|
@@ -6986,7 +7044,7 @@ function Video(props) {
|
|
|
6986
7044
|
...videoProps()
|
|
6987
7045
|
};
|
|
6988
7046
|
});
|
|
6989
|
-
return
|
|
7047
|
+
return <><div
|
|
6990
7048
|
style={{
|
|
6991
7049
|
position: "relative"
|
|
6992
7050
|
}}
|
|
@@ -7042,7 +7100,7 @@ function Video(props) {
|
|
|
7042
7100
|
height: "100%"
|
|
7043
7101
|
}}
|
|
7044
7102
|
>{props.children}</div></Show11>
|
|
7045
|
-
</div
|
|
7103
|
+
</div></>;
|
|
7046
7104
|
}
|
|
7047
7105
|
var video_default = Video;
|
|
7048
7106
|
|
|
@@ -7065,12 +7123,15 @@ var getExtraComponents = () => [{
|
|
|
7065
7123
|
}, {
|
|
7066
7124
|
component: select_default,
|
|
7067
7125
|
...componentInfo15
|
|
7126
|
+
}, {
|
|
7127
|
+
component: textarea_default,
|
|
7128
|
+
...componentInfo17
|
|
7068
7129
|
}], {
|
|
7069
7130
|
component: img_default,
|
|
7070
|
-
...
|
|
7131
|
+
...componentInfo18
|
|
7071
7132
|
}, {
|
|
7072
7133
|
component: video_default,
|
|
7073
|
-
...
|
|
7134
|
+
...componentInfo19
|
|
7074
7135
|
}];
|
|
7075
7136
|
|
|
7076
7137
|
// src/constants/builder-registered-components.ts
|
|
@@ -7176,7 +7237,7 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
7176
7237
|
|
|
7177
7238
|
// src/components/inlined-script.tsx
|
|
7178
7239
|
function InlinedScript(props) {
|
|
7179
|
-
return
|
|
7240
|
+
return <><script innerHTML={props.scriptStr} data-id={props.id} /></>;
|
|
7180
7241
|
}
|
|
7181
7242
|
var Inlined_script_default = InlinedScript;
|
|
7182
7243
|
|
|
@@ -7685,7 +7746,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7685
7746
|
}
|
|
7686
7747
|
|
|
7687
7748
|
// src/constants/sdk-version.ts
|
|
7688
|
-
var SDK_VERSION = "1.0.
|
|
7749
|
+
var SDK_VERSION = "1.0.36";
|
|
7689
7750
|
|
|
7690
7751
|
// src/functions/register.ts
|
|
7691
7752
|
var registry = {};
|
|
@@ -8248,7 +8309,7 @@ function EnableEditor(props) {
|
|
|
8248
8309
|
}
|
|
8249
8310
|
}
|
|
8250
8311
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
8251
|
-
return
|
|
8312
|
+
return <><builder_context_default.Provider value={props.builderContextSignal}><Show12 when={props.builderContextSignal.content}><Dynamic5
|
|
8252
8313
|
class={getWrapperClassName(
|
|
8253
8314
|
props.content?.testVariationId || props.content?.id
|
|
8254
8315
|
)}
|
|
@@ -8261,7 +8322,7 @@ function EnableEditor(props) {
|
|
|
8261
8322
|
{...showContentProps()}
|
|
8262
8323
|
{...props.contentWrapperProps}
|
|
8263
8324
|
component={ContentWrapper()}
|
|
8264
|
-
>{props.children}</Dynamic5></Show12></builder_context_default.Provider
|
|
8325
|
+
>{props.children}</Dynamic5></Show12></builder_context_default.Provider></>;
|
|
8265
8326
|
}
|
|
8266
8327
|
var Enable_editor_default = EnableEditor;
|
|
8267
8328
|
|
|
@@ -8280,10 +8341,10 @@ ${getFontCss({
|
|
|
8280
8341
|
${getDefaultStyles(props.isNestedRender)}
|
|
8281
8342
|
`.trim()
|
|
8282
8343
|
);
|
|
8283
|
-
return
|
|
8344
|
+
return <><Inlined_styles_default
|
|
8284
8345
|
id="builderio-content"
|
|
8285
8346
|
styles={injectedStyles()}
|
|
8286
|
-
|
|
8347
|
+
/></>;
|
|
8287
8348
|
}
|
|
8288
8349
|
var Styles_default = ContentStyles;
|
|
8289
8350
|
|
|
@@ -8384,7 +8445,7 @@ function ContentComponent(props) {
|
|
|
8384
8445
|
rootState: newRootState
|
|
8385
8446
|
}));
|
|
8386
8447
|
}
|
|
8387
|
-
return
|
|
8448
|
+
return <><components_context_default.Provider
|
|
8388
8449
|
value={{
|
|
8389
8450
|
registeredComponents: registeredComponents()
|
|
8390
8451
|
}}
|
|
@@ -8422,7 +8483,7 @@ function ContentComponent(props) {
|
|
|
8422
8483
|
registeredComponents={registeredComponents()}
|
|
8423
8484
|
linkComponent={props.linkComponent}
|
|
8424
8485
|
/>
|
|
8425
|
-
</Enable_editor_default></components_context_default.Provider
|
|
8486
|
+
</Enable_editor_default></components_context_default.Provider></>;
|
|
8426
8487
|
}
|
|
8427
8488
|
var Content_default = ContentComponent;
|
|
8428
8489
|
|
|
@@ -8458,7 +8519,7 @@ function ContentVariants(props) {
|
|
|
8458
8519
|
onMount4(() => {
|
|
8459
8520
|
setShouldRenderVariants(false);
|
|
8460
8521
|
});
|
|
8461
|
-
return
|
|
8522
|
+
return <><>
|
|
8462
8523
|
<Show14 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
8463
8524
|
id="builderio-init-variants-fns"
|
|
8464
8525
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
@@ -8520,7 +8581,7 @@ function ContentVariants(props) {
|
|
|
8520
8581
|
contentWrapperProps={props.contentWrapperProps}
|
|
8521
8582
|
trustedHosts={props.trustedHosts}
|
|
8522
8583
|
/>
|
|
8523
|
-
|
|
8584
|
+
</></>;
|
|
8524
8585
|
}
|
|
8525
8586
|
var Content_variants_default = ContentVariants;
|
|
8526
8587
|
|
|
@@ -8584,7 +8645,7 @@ function Symbol2(props) {
|
|
|
8584
8645
|
setContent();
|
|
8585
8646
|
}
|
|
8586
8647
|
createEffect3(on3(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
8587
|
-
return
|
|
8648
|
+
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
8588
8649
|
isNestedRender={true}
|
|
8589
8650
|
apiVersion={props.builderContext.apiVersion}
|
|
8590
8651
|
apiKey={props.builderContext.apiKey}
|
|
@@ -8604,7 +8665,7 @@ function Symbol2(props) {
|
|
|
8604
8665
|
linkComponent={props.builderLinkComponent}
|
|
8605
8666
|
blocksWrapper={blocksWrapper()}
|
|
8606
8667
|
contentWrapper={contentWrapper()}
|
|
8607
|
-
/></div
|
|
8668
|
+
/></div></>;
|
|
8608
8669
|
}
|
|
8609
8670
|
var symbol_default = Symbol2;
|
|
8610
8671
|
|