@builder.io/sdk-qwik 0.0.9 → 0.0.12
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/README.md +13 -14
- package/lib/index.qwik.cjs +212 -229
- package/lib/index.qwik.mjs +213 -230
- package/package.json +4 -4
- package/src/blocks/button/button.jsx +0 -175
- package/src/blocks/columns/columns.jsx +27 -197
- package/src/blocks/custom-code/custom-code.jsx +16 -75
- package/src/blocks/embed/embed.jsx +20 -87
- package/src/blocks/form/builder-blocks.jsx +0 -75
- package/src/blocks/form/form.jsx +57 -536
- package/src/blocks/fragment/fragment.jsx +8 -56
- package/src/blocks/image/image.jsx +49 -493
- package/src/blocks/img/img.jsx +15 -72
- package/src/blocks/input/input.jsx +17 -83
- package/src/blocks/raw-text/raw-text.jsx +9 -50
- package/src/blocks/section/section.jsx +17 -94
- package/src/blocks/select/select.jsx +20 -145
- package/src/blocks/submit-button/submit-button.jsx +8 -84
- package/src/blocks/symbol/symbol.jsx +60 -194
- package/src/blocks/text/text.jsx +4 -43
- package/src/blocks/textarea/textarea.jsx +12 -62
- package/src/blocks/video/video.jsx +21 -71
- package/src/components/render-block/block-styles.jsx +0 -114
- package/src/components/render-block/render-block.jsx +2 -514
- package/src/components/render-block/render-component.jsx +0 -211
- package/src/components/render-block/render-repeated-block.jsx +0 -67
- package/src/components/render-blocks.jsx +40 -334
- package/src/components/render-content/components/render-styles.jsx +0 -50
- package/src/components/render-content/render-content.jsx +86 -385
- package/src/components/render-inlined-styles.jsx +0 -116
- package/src/constants/builder-registered-components.js +3 -0
package/lib/index.qwik.cjs
CHANGED
|
@@ -169,10 +169,7 @@ const set = (obj, _path, value) => {
|
|
|
169
169
|
if (Object(obj) !== obj)
|
|
170
170
|
return obj;
|
|
171
171
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
172
|
-
path.slice(0, -1).reduce(
|
|
173
|
-
(a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {},
|
|
174
|
-
obj
|
|
175
|
-
)[path[path.length - 1]] = value;
|
|
172
|
+
path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
|
|
176
173
|
return obj;
|
|
177
174
|
};
|
|
178
175
|
function transformBlock(block) {
|
|
@@ -490,7 +487,7 @@ const component = function component2(props, state) {
|
|
|
490
487
|
} else
|
|
491
488
|
return ref;
|
|
492
489
|
};
|
|
493
|
-
const componentInfo$
|
|
490
|
+
const componentInfo$a = function componentInfo(props, state) {
|
|
494
491
|
if (component(props)) {
|
|
495
492
|
const { component: _, ...info } = component(props);
|
|
496
493
|
return info;
|
|
@@ -523,7 +520,7 @@ const attributes = function attributes2(props, state) {
|
|
|
523
520
|
};
|
|
524
521
|
};
|
|
525
522
|
const shouldWrap = function shouldWrap2(props, state) {
|
|
526
|
-
return !componentInfo$
|
|
523
|
+
return !componentInfo$a(props)?.noWrap;
|
|
527
524
|
};
|
|
528
525
|
const componentOptions = function componentOptions2(props, state) {
|
|
529
526
|
return {
|
|
@@ -537,7 +534,8 @@ const renderComponentProps = function renderComponentProps2(props, state) {
|
|
|
537
534
|
return {
|
|
538
535
|
blockChildren: children(props),
|
|
539
536
|
componentRef: componentRef(props),
|
|
540
|
-
componentOptions: componentOptions(props)
|
|
537
|
+
componentOptions: componentOptions(props),
|
|
538
|
+
context: props.context
|
|
541
539
|
};
|
|
542
540
|
};
|
|
543
541
|
const children = function children2(props, state) {
|
|
@@ -560,21 +558,19 @@ const repeatItemData = function repeatItemData2(props, state) {
|
|
|
560
558
|
return void 0;
|
|
561
559
|
const collectionName = repeat.collection.split(".").pop();
|
|
562
560
|
const itemNameToUse = repeat.itemName || (collectionName ? collectionName + "Item" : "item");
|
|
563
|
-
const repeatArray = itemsArray.map(
|
|
564
|
-
|
|
565
|
-
context
|
|
566
|
-
|
|
567
|
-
state
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
})
|
|
577
|
-
);
|
|
561
|
+
const repeatArray = itemsArray.map((item, index) => ({
|
|
562
|
+
context: {
|
|
563
|
+
...props.context,
|
|
564
|
+
state: {
|
|
565
|
+
...props.context.state,
|
|
566
|
+
$index: index,
|
|
567
|
+
$item: item,
|
|
568
|
+
[itemNameToUse]: item,
|
|
569
|
+
[`$${itemNameToUse}Index`]: index
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
block: blockWithoutRepeat
|
|
573
|
+
}));
|
|
578
574
|
return repeatArray;
|
|
579
575
|
};
|
|
580
576
|
const RenderBlock = (props) => {
|
|
@@ -587,7 +583,8 @@ const RenderBlock = (props) => {
|
|
|
587
583
|
repeatItemData(props) ? (repeatItemData(props) || []).map((data, index) => {
|
|
588
584
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderRepeatedBlock$1, {
|
|
589
585
|
repeatContext: data.context,
|
|
590
|
-
block: data.block
|
|
586
|
+
block: data.block,
|
|
587
|
+
context: props.context
|
|
591
588
|
}, index);
|
|
592
589
|
}) : null,
|
|
593
590
|
!repeatItemData(props) ? /* @__PURE__ */ jsxRuntime.jsx(RenderComponent$1, {
|
|
@@ -642,7 +639,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
642
639
|
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
|
|
643
640
|
const builderContext = qwik.useContext(stdin_default);
|
|
644
641
|
const state = {};
|
|
645
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
642
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
646
643
|
class: className(props) + " div-RenderBlocks",
|
|
647
644
|
"builder-path": props.path,
|
|
648
645
|
"builder-parent-id": props.parent,
|
|
@@ -652,7 +649,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
652
649
|
onClick$: qwik.inlinedQrl((event) => {
|
|
653
650
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
654
651
|
return onClick$1(props2);
|
|
655
|
-
}, "
|
|
652
|
+
}, "RenderBlocks_component_div_onClick_IHSfVTIKyxE", [
|
|
656
653
|
builderContext,
|
|
657
654
|
props,
|
|
658
655
|
state
|
|
@@ -660,31 +657,27 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
660
657
|
onMouseEnter$: qwik.inlinedQrl((event) => {
|
|
661
658
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
662
659
|
return onMouseEnter(props2);
|
|
663
|
-
}, "
|
|
660
|
+
}, "RenderBlocks_component_div_onMouseEnter_qLiEh4n9ugw", [
|
|
664
661
|
builderContext,
|
|
665
662
|
props,
|
|
666
663
|
state
|
|
667
664
|
]),
|
|
668
|
-
children:
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
]
|
|
683
|
-
})
|
|
665
|
+
children: [
|
|
666
|
+
props.blocks ? (props.blocks || []).map((block) => {
|
|
667
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock$1, {
|
|
668
|
+
block,
|
|
669
|
+
context: builderContext
|
|
670
|
+
}, "render-block-" + block.id);
|
|
671
|
+
}) : null,
|
|
672
|
+
props.blocks ? (props.blocks || []).map((block) => {
|
|
673
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BlockStyles$1, {
|
|
674
|
+
block,
|
|
675
|
+
context: builderContext
|
|
676
|
+
}, "block-style-" + block.id);
|
|
677
|
+
}) : null
|
|
678
|
+
]
|
|
684
679
|
});
|
|
685
|
-
}, "RenderBlocks_component_SXGwmVyEM0s")
|
|
686
|
-
tagName: "div"
|
|
687
|
-
});
|
|
680
|
+
}, "RenderBlocks_component_SXGwmVyEM0s"));
|
|
688
681
|
const RenderBlocks$1 = RenderBlocks;
|
|
689
682
|
const STYLES$2 = `.div-RenderBlocks {
|
|
690
683
|
display: flex;
|
|
@@ -730,7 +723,7 @@ const columnCssVars = function columnCssVars2(props, state) {
|
|
|
730
723
|
const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
731
724
|
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_704fWXyHORo"));
|
|
732
725
|
const state = {};
|
|
733
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
726
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
734
727
|
class: "builder-columns div-Columns",
|
|
735
728
|
style: columnsCssVars(props, state),
|
|
736
729
|
children: (props.columns || []).map((column, index) => {
|
|
@@ -747,9 +740,7 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
747
740
|
}, index);
|
|
748
741
|
})
|
|
749
742
|
});
|
|
750
|
-
}, "Columns_component_0PeVQGTMczc")
|
|
751
|
-
tagName: "div"
|
|
752
|
-
});
|
|
743
|
+
}, "Columns_component_0PeVQGTMczc"));
|
|
753
744
|
const Columns$1 = Columns;
|
|
754
745
|
const STYLES$1 = `.div-Columns {
|
|
755
746
|
display: flex;
|
|
@@ -803,25 +794,15 @@ function getSrcSet(url) {
|
|
|
803
794
|
const widthInSrc = Number(url.split("?width=")[1]);
|
|
804
795
|
if (!isNaN(widthInSrc))
|
|
805
796
|
srcUrl = `${srcUrl} ${widthInSrc}w`;
|
|
806
|
-
return sizes.filter(
|
|
807
|
-
(size) => size !== widthInSrc
|
|
808
|
-
).map(
|
|
809
|
-
(size) => `${updateQueryParam(url, "width", size)} ${size}w`
|
|
810
|
-
).concat([
|
|
797
|
+
return sizes.filter((size) => size !== widthInSrc).map((size) => `${updateQueryParam(url, "width", size)} ${size}w`).concat([
|
|
811
798
|
srcUrl
|
|
812
799
|
]).join(", ");
|
|
813
800
|
}
|
|
814
801
|
if (url.match(/cdn\.shopify\.com/))
|
|
815
|
-
return sizes.map(
|
|
816
|
-
(size)
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
]
|
|
820
|
-
).filter(
|
|
821
|
-
([sizeUrl]) => !!sizeUrl
|
|
822
|
-
).map(
|
|
823
|
-
([sizeUrl, size]) => `${sizeUrl} ${size}w`
|
|
824
|
-
).concat([
|
|
802
|
+
return sizes.map((size) => [
|
|
803
|
+
getShopifyImageUrl(url, `${size}x${size}`),
|
|
804
|
+
size
|
|
805
|
+
]).filter(([sizeUrl]) => !!sizeUrl).map(([sizeUrl, size]) => `${sizeUrl} ${size}w`).concat([
|
|
825
806
|
url
|
|
826
807
|
]).join(", ");
|
|
827
808
|
return url;
|
|
@@ -848,51 +829,47 @@ const webpSrcSet = function webpSrcSet2(props, state) {
|
|
|
848
829
|
};
|
|
849
830
|
const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
850
831
|
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
851
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
832
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
852
833
|
class: "div-Image",
|
|
853
|
-
children:
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
]
|
|
891
|
-
})
|
|
834
|
+
children: [
|
|
835
|
+
/* @__PURE__ */ jsxRuntime.jsxs("picture", {
|
|
836
|
+
children: [
|
|
837
|
+
webpSrcSet(props) ? /* @__PURE__ */ jsxRuntime.jsx("source", {
|
|
838
|
+
type: "image/webp",
|
|
839
|
+
srcset: webpSrcSet(props)
|
|
840
|
+
}) : null,
|
|
841
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
842
|
+
loading: "lazy",
|
|
843
|
+
alt: props.altText,
|
|
844
|
+
role: props.altText ? "presentation" : void 0,
|
|
845
|
+
style: {
|
|
846
|
+
objectPosition: props.backgroundSize || "center",
|
|
847
|
+
objectFit: props.backgroundSize || "cover"
|
|
848
|
+
},
|
|
849
|
+
class: "builder-image" + (props.className ? " " + props.className : "") + " img-Image",
|
|
850
|
+
src: props.image,
|
|
851
|
+
srcset: srcSetToUse(props),
|
|
852
|
+
sizes: props.sizes
|
|
853
|
+
}),
|
|
854
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", {
|
|
855
|
+
srcset: srcSetToUse(props)
|
|
856
|
+
})
|
|
857
|
+
]
|
|
858
|
+
}),
|
|
859
|
+
props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length) ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
860
|
+
class: "builder-image-sizer div-Image-2",
|
|
861
|
+
style: {
|
|
862
|
+
paddingTop: props.aspectRatio * 100 + "%"
|
|
863
|
+
}
|
|
864
|
+
}) : null,
|
|
865
|
+
props.builderBlock?.children?.length && props.fitContent ? /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {}) : null,
|
|
866
|
+
!props.fitContent ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
867
|
+
class: "div-Image-3",
|
|
868
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
869
|
+
}) : null
|
|
870
|
+
]
|
|
892
871
|
});
|
|
893
|
-
}, "Image_component_y3S3Zox9wEo")
|
|
894
|
-
tagName: "div"
|
|
895
|
-
});
|
|
872
|
+
}, "Image_component_y3S3Zox9wEo"));
|
|
896
873
|
const Image$1 = Image;
|
|
897
874
|
const STYLES = `.div-Image {
|
|
898
875
|
position: relative; }.img-Image {
|
|
@@ -915,13 +892,11 @@ left: 0;
|
|
|
915
892
|
width: 100%;
|
|
916
893
|
height: 100%; }`;
|
|
917
894
|
const Text = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
918
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
895
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
919
896
|
class: "builder-text",
|
|
920
897
|
dangerouslySetInnerHTML: props.text
|
|
921
898
|
});
|
|
922
|
-
}, "Text_component_ci0NVEdoK0Q")
|
|
923
|
-
tagName: "div"
|
|
924
|
-
});
|
|
899
|
+
}, "Text_component_ci0NVEdoK0Q"));
|
|
925
900
|
const Text$1 = Text;
|
|
926
901
|
const videoProps = function videoProps2(props, state) {
|
|
927
902
|
return {
|
|
@@ -943,7 +918,7 @@ const videoProps = function videoProps2(props, state) {
|
|
|
943
918
|
};
|
|
944
919
|
};
|
|
945
920
|
const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
+
return /* @__PURE__ */ jsxRuntime.jsx("video", {
|
|
947
922
|
...videoProps(props),
|
|
948
923
|
style: {
|
|
949
924
|
width: "100%",
|
|
@@ -956,9 +931,7 @@ const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
956
931
|
src: props.video || "no-src",
|
|
957
932
|
poster: props.posterImage
|
|
958
933
|
});
|
|
959
|
-
}, "Video_component_O5sPuWlrTvk")
|
|
960
|
-
tagName: "video"
|
|
961
|
-
});
|
|
934
|
+
}, "Video_component_O5sPuWlrTvk"));
|
|
962
935
|
const Video$1 = Video;
|
|
963
936
|
const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
964
937
|
return /* @__PURE__ */ jsxRuntime.jsx(qwik.Fragment, {
|
|
@@ -975,7 +948,7 @@ const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
975
948
|
});
|
|
976
949
|
}, "Button_component_FtjCELjtKF4"));
|
|
977
950
|
const Button$1 = Button;
|
|
978
|
-
const componentInfo$
|
|
951
|
+
const componentInfo$9 = {
|
|
979
952
|
name: "Core:Button",
|
|
980
953
|
builtIn: true,
|
|
981
954
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -1017,7 +990,7 @@ function markSerializable(fn) {
|
|
|
1017
990
|
fn.__qwik_serializable__ = true;
|
|
1018
991
|
return fn;
|
|
1019
992
|
}
|
|
1020
|
-
const componentInfo$
|
|
993
|
+
const componentInfo$8 = {
|
|
1021
994
|
name: "Columns",
|
|
1022
995
|
builtIn: true,
|
|
1023
996
|
inputs: [
|
|
@@ -1213,13 +1186,9 @@ const componentInfo$7 = {
|
|
|
1213
1186
|
}
|
|
1214
1187
|
const columns = options.get("columns");
|
|
1215
1188
|
if (Array.isArray(columns)) {
|
|
1216
|
-
const containsColumnWithWidth = !!columns.find(
|
|
1217
|
-
(col) => col.get("width")
|
|
1218
|
-
);
|
|
1189
|
+
const containsColumnWithWidth = !!columns.find((col) => col.get("width"));
|
|
1219
1190
|
if (containsColumnWithWidth) {
|
|
1220
|
-
const containsColumnWithoutWidth = !!columns.find(
|
|
1221
|
-
(col) => !col.get("width")
|
|
1222
|
-
);
|
|
1191
|
+
const containsColumnWithoutWidth = !!columns.find((col) => !col.get("width"));
|
|
1223
1192
|
if (containsColumnWithoutWidth)
|
|
1224
1193
|
clearWidths();
|
|
1225
1194
|
else {
|
|
@@ -1262,7 +1231,7 @@ const componentInfo$7 = {
|
|
|
1262
1231
|
}
|
|
1263
1232
|
]
|
|
1264
1233
|
};
|
|
1265
|
-
const componentInfo$
|
|
1234
|
+
const componentInfo$7 = {
|
|
1266
1235
|
name: "Fragment",
|
|
1267
1236
|
static: true,
|
|
1268
1237
|
hidden: true,
|
|
@@ -1271,14 +1240,12 @@ const componentInfo$6 = {
|
|
|
1271
1240
|
noWrap: true
|
|
1272
1241
|
};
|
|
1273
1242
|
const FragmentComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1274
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1275
1244
|
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
1276
1245
|
});
|
|
1277
|
-
}, "FragmentComponent_component_FJmqlA66Rjg")
|
|
1278
|
-
tagName: "span"
|
|
1279
|
-
});
|
|
1246
|
+
}, "FragmentComponent_component_FJmqlA66Rjg"));
|
|
1280
1247
|
const Fragment = FragmentComponent;
|
|
1281
|
-
const componentInfo$
|
|
1248
|
+
const componentInfo$6 = {
|
|
1282
1249
|
name: "Image",
|
|
1283
1250
|
static: true,
|
|
1284
1251
|
builtIn: true,
|
|
@@ -1331,9 +1298,7 @@ const componentInfo$5 = {
|
|
|
1331
1298
|
}
|
|
1332
1299
|
const value = options.get("image");
|
|
1333
1300
|
const aspectRatio = options.get("aspectRatio");
|
|
1334
|
-
fetch(value).then(
|
|
1335
|
-
(res) => res.blob()
|
|
1336
|
-
).then((blob) => {
|
|
1301
|
+
fetch(value).then((res) => res.blob()).then((blob) => {
|
|
1337
1302
|
if (blob.type.includes("svg"))
|
|
1338
1303
|
options.set("noWebp", true);
|
|
1339
1304
|
});
|
|
@@ -1429,7 +1394,7 @@ const componentInfo$5 = {
|
|
|
1429
1394
|
}
|
|
1430
1395
|
]
|
|
1431
1396
|
};
|
|
1432
|
-
const componentInfo$
|
|
1397
|
+
const componentInfo$5 = {
|
|
1433
1398
|
name: "Core:Section",
|
|
1434
1399
|
static: true,
|
|
1435
1400
|
builtIn: true,
|
|
@@ -1476,18 +1441,16 @@ const componentInfo$4 = {
|
|
|
1476
1441
|
]
|
|
1477
1442
|
};
|
|
1478
1443
|
const SectionComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1479
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1444
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", {
|
|
1480
1445
|
...props.attributes,
|
|
1481
1446
|
style: (() => {
|
|
1482
1447
|
props.maxWidth && typeof props.maxWidth === "number" ? props.maxWidth : void 0;
|
|
1483
1448
|
})(),
|
|
1484
1449
|
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
1485
1450
|
});
|
|
1486
|
-
}, "SectionComponent_component_m1CcjCwgHug")
|
|
1487
|
-
tagName: "section"
|
|
1488
|
-
});
|
|
1451
|
+
}, "SectionComponent_component_m1CcjCwgHug"));
|
|
1489
1452
|
const Section = SectionComponent;
|
|
1490
|
-
const componentInfo$
|
|
1453
|
+
const componentInfo$4 = {
|
|
1491
1454
|
name: "Symbol",
|
|
1492
1455
|
noWrap: true,
|
|
1493
1456
|
static: true,
|
|
@@ -1527,7 +1490,7 @@ const componentInfo$3 = {
|
|
|
1527
1490
|
}
|
|
1528
1491
|
]
|
|
1529
1492
|
};
|
|
1530
|
-
const componentInfo$
|
|
1493
|
+
const componentInfo$3 = {
|
|
1531
1494
|
name: "Text",
|
|
1532
1495
|
static: true,
|
|
1533
1496
|
builtIn: true,
|
|
@@ -1548,7 +1511,7 @@ const componentInfo$2 = {
|
|
|
1548
1511
|
textAlign: "center"
|
|
1549
1512
|
}
|
|
1550
1513
|
};
|
|
1551
|
-
const componentInfo$
|
|
1514
|
+
const componentInfo$2 = {
|
|
1552
1515
|
name: "Video",
|
|
1553
1516
|
canHaveChildren: true,
|
|
1554
1517
|
builtIn: true,
|
|
@@ -1661,7 +1624,7 @@ const componentInfo$1 = {
|
|
|
1661
1624
|
}
|
|
1662
1625
|
]
|
|
1663
1626
|
};
|
|
1664
|
-
const
|
|
1627
|
+
const componentInfo$1 = {
|
|
1665
1628
|
name: "Embed",
|
|
1666
1629
|
static: true,
|
|
1667
1630
|
builtIn: true,
|
|
@@ -1677,9 +1640,7 @@ const componentInfo2 = {
|
|
|
1677
1640
|
if (url) {
|
|
1678
1641
|
options.set("content", "Loading...");
|
|
1679
1642
|
const apiKey = "ae0e60e78201a3f2b0de4b";
|
|
1680
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(
|
|
1681
|
-
(res) => res.json()
|
|
1682
|
-
).then((data) => {
|
|
1643
|
+
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
1683
1644
|
if (options.get("url") === url) {
|
|
1684
1645
|
if (data.html)
|
|
1685
1646
|
options.set("content", data.html);
|
|
@@ -1745,15 +1706,47 @@ const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
1745
1706
|
props,
|
|
1746
1707
|
state
|
|
1747
1708
|
]));
|
|
1748
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1709
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1749
1710
|
class: "builder-embed",
|
|
1750
1711
|
ref: elem,
|
|
1751
1712
|
dangerouslySetInnerHTML: props.content
|
|
1752
1713
|
});
|
|
1753
|
-
}, "Embed_component_CP6B8Y76ylw")
|
|
1754
|
-
tagName: "div"
|
|
1755
|
-
});
|
|
1714
|
+
}, "Embed_component_CP6B8Y76ylw"));
|
|
1756
1715
|
const embed = Embed;
|
|
1716
|
+
const ImgComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1717
|
+
return /* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
1718
|
+
style: {
|
|
1719
|
+
objectFit: props.backgroundSize || "cover",
|
|
1720
|
+
objectPosition: props.backgroundPosition || "center"
|
|
1721
|
+
},
|
|
1722
|
+
alt: props.altText,
|
|
1723
|
+
src: props.imgSrc || props.image,
|
|
1724
|
+
...props.attributes
|
|
1725
|
+
}, isEditing() && props.imgSrc || "default-key");
|
|
1726
|
+
}, "ImgComponent_component_b8FkE9OcVN8"));
|
|
1727
|
+
const Img = ImgComponent;
|
|
1728
|
+
const componentInfo2 = {
|
|
1729
|
+
name: "Raw:Img",
|
|
1730
|
+
hideFromInsertMenu: true,
|
|
1731
|
+
builtIn: true,
|
|
1732
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1733
|
+
inputs: [
|
|
1734
|
+
{
|
|
1735
|
+
name: "image",
|
|
1736
|
+
bubble: true,
|
|
1737
|
+
type: "file",
|
|
1738
|
+
allowedFileTypes: [
|
|
1739
|
+
"jpeg",
|
|
1740
|
+
"jpg",
|
|
1741
|
+
"png",
|
|
1742
|
+
"svg"
|
|
1743
|
+
],
|
|
1744
|
+
required: true
|
|
1745
|
+
}
|
|
1746
|
+
],
|
|
1747
|
+
noWrap: true,
|
|
1748
|
+
static: true
|
|
1749
|
+
};
|
|
1757
1750
|
var __defProp$3 = Object.defineProperty;
|
|
1758
1751
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
1759
1752
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
@@ -1778,31 +1771,34 @@ var __spreadValues$3 = (a, b) => {
|
|
|
1778
1771
|
const getDefaultRegisteredComponents = () => [
|
|
1779
1772
|
__spreadValues$3({
|
|
1780
1773
|
component: Columns$1
|
|
1781
|
-
}, componentInfo$
|
|
1774
|
+
}, componentInfo$8),
|
|
1782
1775
|
__spreadValues$3({
|
|
1783
1776
|
component: Image$1
|
|
1784
|
-
}, componentInfo$
|
|
1777
|
+
}, componentInfo$6),
|
|
1778
|
+
__spreadValues$3({
|
|
1779
|
+
component: Img
|
|
1780
|
+
}, componentInfo2),
|
|
1785
1781
|
__spreadValues$3({
|
|
1786
1782
|
component: Text$1
|
|
1787
|
-
}, componentInfo$
|
|
1783
|
+
}, componentInfo$3),
|
|
1788
1784
|
__spreadValues$3({
|
|
1789
1785
|
component: Video$1
|
|
1790
|
-
}, componentInfo$
|
|
1786
|
+
}, componentInfo$2),
|
|
1791
1787
|
__spreadValues$3({
|
|
1792
1788
|
component: Symbol$2
|
|
1793
|
-
}, componentInfo$
|
|
1789
|
+
}, componentInfo$4),
|
|
1794
1790
|
__spreadValues$3({
|
|
1795
1791
|
component: Button$1
|
|
1796
|
-
}, componentInfo$
|
|
1792
|
+
}, componentInfo$9),
|
|
1797
1793
|
__spreadValues$3({
|
|
1798
1794
|
component: Section
|
|
1799
|
-
}, componentInfo$
|
|
1795
|
+
}, componentInfo$5),
|
|
1800
1796
|
__spreadValues$3({
|
|
1801
1797
|
component: Fragment
|
|
1802
|
-
}, componentInfo$
|
|
1798
|
+
}, componentInfo$7),
|
|
1803
1799
|
__spreadValues$3({
|
|
1804
1800
|
component: embed
|
|
1805
|
-
},
|
|
1801
|
+
}, componentInfo$1)
|
|
1806
1802
|
];
|
|
1807
1803
|
var __defProp$2 = Object.defineProperty;
|
|
1808
1804
|
var __defProps$2 = Object.defineProperties;
|
|
@@ -1905,9 +1901,7 @@ function getFetch() {
|
|
|
1905
1901
|
return __async$1(this, null, function* () {
|
|
1906
1902
|
const globalFetch = getGlobalThis().fetch;
|
|
1907
1903
|
if (typeof globalFetch === "undefined" && typeof global !== "undefined") {
|
|
1908
|
-
const nodeFetch = Promise.resolve().then(() => require("./index.d8c1e37f.cjs")).then(
|
|
1909
|
-
(d) => d.default
|
|
1910
|
-
);
|
|
1904
|
+
const nodeFetch = Promise.resolve().then(() => require("./index.d8c1e37f.cjs")).then((d) => d.default);
|
|
1911
1905
|
return nodeFetch.default || nodeFetch;
|
|
1912
1906
|
}
|
|
1913
1907
|
return globalFetch.default || globalFetch;
|
|
@@ -2012,8 +2006,8 @@ const generateContentUrl = (options) => {
|
|
|
2012
2006
|
const flattened2 = flatten({
|
|
2013
2007
|
query
|
|
2014
2008
|
});
|
|
2015
|
-
for (const
|
|
2016
|
-
url.searchParams.set(
|
|
2009
|
+
for (const key1 in flattened2)
|
|
2010
|
+
url.searchParams.set(key1, JSON.stringify(flattened2[key1]));
|
|
2017
2011
|
}
|
|
2018
2012
|
return url;
|
|
2019
2013
|
};
|
|
@@ -2021,9 +2015,7 @@ function getAllContent(options) {
|
|
|
2021
2015
|
return __async(this, null, function* () {
|
|
2022
2016
|
const url = generateContentUrl(options);
|
|
2023
2017
|
const fetch2 = yield fetch$;
|
|
2024
|
-
const content = yield fetch2(url.href).then(
|
|
2025
|
-
(res) => res.json()
|
|
2026
|
-
);
|
|
2018
|
+
const content = yield fetch2(url.href).then((res) => res.json());
|
|
2027
2019
|
if (options.testGroups)
|
|
2028
2020
|
for (const item of content.results)
|
|
2029
2021
|
handleABTesting(item, options.testGroups);
|
|
@@ -2102,14 +2094,9 @@ const prepareComponentInfoToSend = (_c) => {
|
|
|
2102
2094
|
"inputs"
|
|
2103
2095
|
]);
|
|
2104
2096
|
return __spreadProps(__spreadValues({}, fastClone(info)), {
|
|
2105
|
-
inputs: inputs == null ? void 0 : inputs.map(
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
[key]: serializeValue(value)
|
|
2109
|
-
}),
|
|
2110
|
-
{}
|
|
2111
|
-
)
|
|
2112
|
-
)
|
|
2097
|
+
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
|
|
2098
|
+
[key]: serializeValue(value)
|
|
2099
|
+
}), {}))
|
|
2113
2100
|
});
|
|
2114
2101
|
};
|
|
2115
2102
|
function track(event, properties) {
|
|
@@ -2166,9 +2153,7 @@ const getCssFromFont = function getCssFromFont2(props, state, font) {
|
|
|
2166
2153
|
return str;
|
|
2167
2154
|
};
|
|
2168
2155
|
const getFontCss = function getFontCss2(props, state, { customFonts }) {
|
|
2169
|
-
return customFonts?.map(
|
|
2170
|
-
(font) => getCssFromFont(props, state, font)
|
|
2171
|
-
)?.join(" ") || "";
|
|
2156
|
+
return customFonts?.map((font) => getCssFromFont(props, state, font))?.join(" ") || "";
|
|
2172
2157
|
};
|
|
2173
2158
|
const injectedStyles = function injectedStyles2(props, state) {
|
|
2174
2159
|
return `
|
|
@@ -2184,7 +2169,7 @@ const RenderContentStyles = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
|
|
|
2184
2169
|
});
|
|
2185
2170
|
}, "RenderContentStyles_component_32XAr483K2o"));
|
|
2186
2171
|
const RenderContentStyles$1 = RenderContentStyles;
|
|
2187
|
-
const useContent = function useContent2(props, state) {
|
|
2172
|
+
const useContent = function useContent2(props, state, elementRef) {
|
|
2188
2173
|
const mergedContent = {
|
|
2189
2174
|
...props.content,
|
|
2190
2175
|
...state.overrideContent,
|
|
@@ -2196,32 +2181,29 @@ const useContent = function useContent2(props, state) {
|
|
|
2196
2181
|
};
|
|
2197
2182
|
return mergedContent;
|
|
2198
2183
|
};
|
|
2199
|
-
const contentState = function contentState2(props, state) {
|
|
2184
|
+
const contentState = function contentState2(props, state, elementRef) {
|
|
2200
2185
|
return {
|
|
2201
2186
|
...props.content?.data?.state,
|
|
2202
2187
|
...props.data,
|
|
2203
2188
|
...state.overrideState
|
|
2204
2189
|
};
|
|
2205
2190
|
};
|
|
2206
|
-
const contextContext = function contextContext2(props, state) {
|
|
2191
|
+
const contextContext = function contextContext2(props, state, elementRef) {
|
|
2207
2192
|
return props.context || {};
|
|
2208
2193
|
};
|
|
2209
|
-
const allRegisteredComponents = function allRegisteredComponents2(props, state) {
|
|
2194
|
+
const allRegisteredComponents = function allRegisteredComponents2(props, state, elementRef) {
|
|
2210
2195
|
const allComponentsArray = [
|
|
2211
2196
|
...getDefaultRegisteredComponents(),
|
|
2212
2197
|
...components,
|
|
2213
2198
|
...props.customComponents || []
|
|
2214
2199
|
];
|
|
2215
|
-
const allComponents = allComponentsArray.reduce(
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
}),
|
|
2220
|
-
{}
|
|
2221
|
-
);
|
|
2200
|
+
const allComponents = allComponentsArray.reduce((acc, curr) => ({
|
|
2201
|
+
...acc,
|
|
2202
|
+
[curr.name]: curr
|
|
2203
|
+
}), {});
|
|
2222
2204
|
return allComponents;
|
|
2223
2205
|
};
|
|
2224
|
-
const processMessage = function processMessage2(props, state, event) {
|
|
2206
|
+
const processMessage = function processMessage2(props, state, elementRef, event) {
|
|
2225
2207
|
const { data } = event;
|
|
2226
2208
|
if (data)
|
|
2227
2209
|
switch (data.type) {
|
|
@@ -2235,7 +2217,7 @@ const processMessage = function processMessage2(props, state, event) {
|
|
|
2235
2217
|
}
|
|
2236
2218
|
}
|
|
2237
2219
|
};
|
|
2238
|
-
const evaluateJsCode = function evaluateJsCode2(props, state) {
|
|
2220
|
+
const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
|
|
2239
2221
|
const jsCode = useContent(props, state)?.data?.jsCode;
|
|
2240
2222
|
if (jsCode)
|
|
2241
2223
|
evaluate({
|
|
@@ -2244,26 +2226,23 @@ const evaluateJsCode = function evaluateJsCode2(props, state) {
|
|
|
2244
2226
|
state: contentState(props, state)
|
|
2245
2227
|
});
|
|
2246
2228
|
};
|
|
2247
|
-
const httpReqsData = function httpReqsData2(props, state) {
|
|
2229
|
+
const httpReqsData = function httpReqsData2(props, state, elementRef) {
|
|
2248
2230
|
return {};
|
|
2249
2231
|
};
|
|
2250
|
-
const onClick2 = function onClick3(props, state, _event) {
|
|
2232
|
+
const onClick2 = function onClick3(props, state, elementRef, _event) {
|
|
2251
2233
|
if (useContent(props, state) && props.canTrack !== false)
|
|
2252
2234
|
track("click", {
|
|
2253
2235
|
contentId: useContent(props, state).id
|
|
2254
2236
|
});
|
|
2255
2237
|
};
|
|
2256
|
-
const evalExpression = function evalExpression2(props, state, expression) {
|
|
2257
|
-
return expression.replace(
|
|
2258
|
-
|
|
2259
|
-
(
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
state: contentState(props, state)
|
|
2263
|
-
})
|
|
2264
|
-
);
|
|
2238
|
+
const evalExpression = function evalExpression2(props, state, elementRef, expression) {
|
|
2239
|
+
return expression.replace(/{{([^}]+)}}/g, (_match, group) => evaluate({
|
|
2240
|
+
code: group,
|
|
2241
|
+
context: contextContext(props),
|
|
2242
|
+
state: contentState(props, state)
|
|
2243
|
+
}));
|
|
2265
2244
|
};
|
|
2266
|
-
const handleRequest = function handleRequest2(props, state, { url, key }) {
|
|
2245
|
+
const handleRequest = function handleRequest2(props, state, elementRef, { url, key }) {
|
|
2267
2246
|
const fetchAndSetState = async () => {
|
|
2268
2247
|
const fetch2 = await getFetch();
|
|
2269
2248
|
const response = await fetch2(url);
|
|
@@ -2276,19 +2255,19 @@ const handleRequest = function handleRequest2(props, state, { url, key }) {
|
|
|
2276
2255
|
};
|
|
2277
2256
|
fetchAndSetState();
|
|
2278
2257
|
};
|
|
2279
|
-
const runHttpRequests = function runHttpRequests2(props, state) {
|
|
2258
|
+
const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
2280
2259
|
const requests = useContent(props, state)?.data?.httpRequests ?? {};
|
|
2281
2260
|
Object.entries(requests).forEach(([key, url]) => {
|
|
2282
2261
|
if (url && (!httpReqsData()[key] || isEditing())) {
|
|
2283
|
-
const evaluatedUrl = evalExpression(props, state, url);
|
|
2284
|
-
handleRequest(props, state, {
|
|
2262
|
+
const evaluatedUrl = evalExpression(props, state, elementRef, url);
|
|
2263
|
+
handleRequest(props, state, elementRef, {
|
|
2285
2264
|
url: evaluatedUrl,
|
|
2286
2265
|
key
|
|
2287
2266
|
});
|
|
2288
2267
|
}
|
|
2289
2268
|
});
|
|
2290
2269
|
};
|
|
2291
|
-
const emitStateUpdate = function emitStateUpdate2(props, state) {
|
|
2270
|
+
const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
2292
2271
|
if (isEditing())
|
|
2293
2272
|
window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
|
|
2294
2273
|
detail: {
|
|
@@ -2299,11 +2278,11 @@ const emitStateUpdate = function emitStateUpdate2(props, state) {
|
|
|
2299
2278
|
}
|
|
2300
2279
|
}));
|
|
2301
2280
|
};
|
|
2302
|
-
const shouldRenderContentStyles = function shouldRenderContentStyles2(props, state) {
|
|
2281
|
+
const shouldRenderContentStyles = function shouldRenderContentStyles2(props, state, elementRef) {
|
|
2303
2282
|
return Boolean((useContent(props, state)?.data?.cssCode || useContent(props, state)?.data?.customFonts?.length) && TARGET !== "reactNative");
|
|
2304
2283
|
};
|
|
2305
2284
|
const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2306
|
-
const
|
|
2285
|
+
const elementRef = qwik.useRef();
|
|
2307
2286
|
const state = qwik.useStore({
|
|
2308
2287
|
forceReRenderCount: 0,
|
|
2309
2288
|
overrideContent: null,
|
|
@@ -2328,19 +2307,19 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2328
2307
|
})()
|
|
2329
2308
|
}));
|
|
2330
2309
|
qwik.useClientEffectQrl(qwik.inlinedQrl(() => {
|
|
2331
|
-
const [
|
|
2310
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2332
2311
|
if (isBrowser()) {
|
|
2333
2312
|
if (isEditing()) {
|
|
2334
2313
|
state2.forceReRenderCount++;
|
|
2335
|
-
qwik._useMutableProps(
|
|
2314
|
+
qwik._useMutableProps(elementRef2.current, true);
|
|
2336
2315
|
registerInsertMenu();
|
|
2337
2316
|
setupBrowserForEditing();
|
|
2338
2317
|
Object.values(allRegisteredComponents(props2)).forEach((registeredComponent) => {
|
|
2339
2318
|
const message = createRegisterComponentMessage(registeredComponent);
|
|
2340
2319
|
window.parent?.postMessage(message, "*");
|
|
2341
2320
|
});
|
|
2342
|
-
window.addEventListener("message", processMessage.bind(null, props2, state2));
|
|
2343
|
-
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2));
|
|
2321
|
+
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2322
|
+
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2344
2323
|
}
|
|
2345
2324
|
if (useContent(props2, state2) && props2.canTrack !== false)
|
|
2346
2325
|
track("impression", {
|
|
@@ -2361,54 +2340,60 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2361
2340
|
}
|
|
2362
2341
|
}
|
|
2363
2342
|
evaluateJsCode(props2, state2);
|
|
2364
|
-
runHttpRequests(props2, state2);
|
|
2343
|
+
runHttpRequests(props2, state2, elementRef2);
|
|
2365
2344
|
emitStateUpdate(props2, state2);
|
|
2366
2345
|
}
|
|
2367
2346
|
}, "RenderContent_component_useClientEffect_ntruwSC9lSo", [
|
|
2368
|
-
|
|
2347
|
+
elementRef,
|
|
2369
2348
|
props,
|
|
2370
2349
|
state
|
|
2371
2350
|
]));
|
|
2372
|
-
qwik.useWatchQrl(qwik.inlinedQrl(({ track:
|
|
2373
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2374
|
-
state2.useContent?.data &&
|
|
2351
|
+
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2352
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2353
|
+
state2.useContent?.data && track2(state2.useContent?.data, "jsCode");
|
|
2375
2354
|
evaluateJsCode(props2, state2);
|
|
2376
2355
|
}, "RenderContent_component_useWatch_1P0ujLQOmzc", [
|
|
2356
|
+
elementRef,
|
|
2377
2357
|
props,
|
|
2378
2358
|
state
|
|
2379
2359
|
]));
|
|
2380
2360
|
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2381
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2361
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2382
2362
|
state2.useContent?.data && track2(state2.useContent?.data, "httpRequests");
|
|
2383
|
-
runHttpRequests(props2, state2);
|
|
2363
|
+
runHttpRequests(props2, state2, elementRef2);
|
|
2384
2364
|
}, "RenderContent_component_useWatch_1_0hAcn4V2AZw", [
|
|
2365
|
+
elementRef,
|
|
2385
2366
|
props,
|
|
2386
2367
|
state
|
|
2387
2368
|
]));
|
|
2388
|
-
qwik.useWatchQrl(qwik.inlinedQrl(({ track:
|
|
2389
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2390
|
-
state2 &&
|
|
2369
|
+
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2370
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2371
|
+
state2 && track2(state2, "contentState");
|
|
2391
2372
|
emitStateUpdate(props2, state2);
|
|
2392
2373
|
}, "RenderContent_component_useWatch_2_t2n8zpl4mRs", [
|
|
2374
|
+
elementRef,
|
|
2393
2375
|
props,
|
|
2394
2376
|
state
|
|
2395
2377
|
]));
|
|
2396
2378
|
qwik.useCleanupQrl(qwik.inlinedQrl(() => {
|
|
2397
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2379
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2398
2380
|
if (isBrowser()) {
|
|
2399
|
-
window.removeEventListener("message", processMessage.bind(null, props2, state2));
|
|
2400
|
-
window.removeEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2));
|
|
2381
|
+
window.removeEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2382
|
+
window.removeEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2401
2383
|
}
|
|
2402
2384
|
}, "RenderContent_component_useCleanup_sGf1npb03WA", [
|
|
2385
|
+
elementRef,
|
|
2403
2386
|
props,
|
|
2404
2387
|
state
|
|
2405
2388
|
]));
|
|
2406
2389
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2407
2390
|
children: useContent(props, state) ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2391
|
+
ref: elementRef,
|
|
2408
2392
|
onClick$: qwik.inlinedQrl((event) => {
|
|
2409
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2393
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2410
2394
|
return onClick2(props2, state2);
|
|
2411
2395
|
}, "RenderContent_component__Fragment_div_onClick_76e3rL00UYE", [
|
|
2396
|
+
elementRef,
|
|
2412
2397
|
props,
|
|
2413
2398
|
state
|
|
2414
2399
|
]),
|
|
@@ -2461,7 +2446,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2461
2446
|
props,
|
|
2462
2447
|
state
|
|
2463
2448
|
]));
|
|
2464
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2449
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2465
2450
|
...props.attributes,
|
|
2466
2451
|
dataSet: {
|
|
2467
2452
|
class: state.className
|
|
@@ -2480,9 +2465,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2480
2465
|
content: state.content
|
|
2481
2466
|
})
|
|
2482
2467
|
});
|
|
2483
|
-
}, "Symbol_component_Dn8mGpai87I")
|
|
2484
|
-
tagName: "div"
|
|
2485
|
-
});
|
|
2468
|
+
}, "Symbol_component_Dn8mGpai87I"));
|
|
2486
2469
|
const Symbol$2 = Symbol$1;
|
|
2487
2470
|
const settings = {};
|
|
2488
2471
|
function setEditorSettings(newSettings) {
|