@builder.io/sdk-qwik 0.0.8 → 0.0.11
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 +65 -2
- package/lib/index.qwik.cjs +259 -216
- package/lib/index.qwik.mjs +260 -217
- package/package.json +4 -4
- package/src/blocks/button/button.jsx +22 -0
- package/src/blocks/button/component-info.js +41 -0
- package/src/blocks/columns/columns.jsx +97 -0
- package/src/blocks/columns/component-info.js +242 -0
- package/src/blocks/custom-code/component-info.js +31 -0
- package/src/blocks/custom-code/custom-code.jsx +71 -0
- package/src/blocks/embed/component-info.js +44 -0
- package/src/blocks/embed/embed.jsx +63 -0
- package/src/blocks/embed/helpers.js +9 -0
- package/src/blocks/form/builder-blocks.jsx +11 -0
- package/src/blocks/form/component-info.js +262 -0
- package/src/blocks/form/form.jsx +303 -0
- package/src/blocks/fragment/component-info.js +11 -0
- package/src/blocks/fragment/fragment.jsx +11 -0
- package/src/blocks/image/component-info.js +151 -0
- package/src/blocks/image/image.helpers.js +48 -0
- package/src/blocks/image/image.jsx +110 -0
- package/src/blocks/img/component-info.js +20 -0
- package/src/blocks/img/img.jsx +19 -0
- package/src/blocks/input/component-info.js +74 -0
- package/src/blocks/input/input.jsx +21 -0
- package/src/blocks/raw-text/component-info.js +16 -0
- package/src/blocks/raw-text/raw-text.jsx +12 -0
- package/src/blocks/section/component-info.js +49 -0
- package/src/blocks/section/section.jsx +20 -0
- package/src/blocks/select/component-info.js +59 -0
- package/src/blocks/select/select.jsx +24 -0
- package/src/blocks/submit-button/component-info.js +28 -0
- package/src/blocks/submit-button/submit-button.jsx +11 -0
- package/src/blocks/symbol/component-info.js +43 -0
- package/src/blocks/symbol/symbol.jsx +77 -0
- package/src/blocks/text/component-info.js +24 -0
- package/src/blocks/text/text.jsx +7 -0
- package/src/blocks/textarea/component-info.js +47 -0
- package/src/blocks/textarea/textarea.jsx +15 -0
- package/src/blocks/util.js +7 -0
- package/src/blocks/video/component-info.js +106 -0
- package/src/blocks/video/video.jsx +53 -0
- package/src/components/render-block/block-styles.jsx +60 -0
- package/src/components/render-block/render-block.helpers.js +23 -0
- package/src/components/render-block/render-block.jsx +221 -0
- package/src/components/render-block/render-component.jsx +34 -0
- package/src/components/render-block/render-repeated-block.jsx +37 -0
- package/src/components/render-block/types.js +0 -0
- package/src/components/render-blocks.jsx +93 -0
- package/src/components/render-content/components/render-styles.jsx +76 -0
- package/src/components/render-content/index.js +4 -0
- package/src/components/render-content/render-content.jsx +351 -0
- package/src/components/render-inlined-styles.jsx +25 -0
- package/src/constants/builder-registered-components.js +48 -0
- package/src/constants/device-sizes.js +21 -0
- package/src/constants/target.js +4 -0
- package/src/context/builder.context.js +5 -0
- package/src/functions/camel-to-kebab-case.js +4 -0
- package/src/functions/convert-style-object.js +6 -0
- package/src/functions/evaluate.js +28 -0
- package/src/functions/event-handler-name.js +7 -0
- package/src/functions/get-block-actions.js +23 -0
- package/src/functions/get-block-component-options.js +28 -0
- package/src/functions/get-block-properties.js +29 -0
- package/src/functions/get-block-styles.js +34 -0
- package/src/functions/get-block-tag.js +6 -0
- package/src/functions/get-builder-search-params/fn.test.js +13 -0
- package/src/functions/get-builder-search-params/index.js +33 -0
- package/src/functions/get-content/ab-testing.js +38 -0
- package/src/functions/get-content/fn.test.js +31 -0
- package/src/functions/get-content/index.js +96 -0
- package/src/functions/get-content/types.js +0 -0
- package/src/functions/get-fetch.js +34 -0
- package/src/functions/get-global-this.js +18 -0
- package/src/functions/get-processed-block.js +53 -0
- package/src/functions/get-processed-block.test.js +32 -0
- package/src/functions/if-target.js +15 -0
- package/src/functions/is-browser.js +6 -0
- package/src/functions/is-editing.js +7 -0
- package/src/functions/is-iframe.js +7 -0
- package/src/functions/is-previewing.js +14 -0
- package/src/functions/on-change.js +27 -0
- package/src/functions/on-change.test.js +19 -0
- package/src/functions/register-component.js +72 -0
- package/src/functions/register.js +29 -0
- package/src/functions/sanitize-styles.js +5 -0
- package/src/functions/set-editor-settings.js +15 -0
- package/src/functions/set.js +11 -0
- package/src/functions/set.test.js +16 -0
- package/src/functions/track.js +22 -0
- package/src/functions/transform-block.js +6 -0
- package/src/helpers/css.js +12 -0
- package/src/helpers/flatten.js +34 -0
- package/src/index-helpers/blocks-exports.js +22 -0
- package/src/index-helpers/top-of-file.js +4 -0
- package/src/index.js +10 -0
- package/src/scripts/init-editing.js +79 -0
- package/src/types/builder-block.js +0 -0
- package/src/types/builder-content.js +0 -0
- package/src/types/components.js +0 -0
- package/src/types/deep-partial.js +0 -0
- package/src/types/element.js +0 -0
- package/src/types/targets.js +0 -0
- package/src/types/typescript.js +0 -0
- package/types.d.ts +7 -12
- package/root.json +0 -1176
package/lib/index.qwik.cjs
CHANGED
|
@@ -6,12 +6,6 @@ const TARGET = "qwik";
|
|
|
6
6
|
function isBrowser() {
|
|
7
7
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
8
8
|
}
|
|
9
|
-
function isIframe() {
|
|
10
|
-
return isBrowser() && window.self !== window.top;
|
|
11
|
-
}
|
|
12
|
-
function isEditing() {
|
|
13
|
-
return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
14
|
-
}
|
|
15
9
|
const registry = {};
|
|
16
10
|
function register(type, info) {
|
|
17
11
|
let typeList = registry[type];
|
|
@@ -35,7 +29,106 @@ function register(type, info) {
|
|
|
35
29
|
}
|
|
36
30
|
}
|
|
37
31
|
}
|
|
32
|
+
const registerInsertMenu = () => {
|
|
33
|
+
register("insertMenu", {
|
|
34
|
+
name: "_default",
|
|
35
|
+
default: true,
|
|
36
|
+
items: [
|
|
37
|
+
{
|
|
38
|
+
name: "Box"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "Text"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "Image"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "Columns"
|
|
48
|
+
},
|
|
49
|
+
...TARGET === "reactNative" ? [] : [
|
|
50
|
+
{
|
|
51
|
+
name: "Core:Section"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "Core:Button"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Embed"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "Custom Code"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const setupBrowserForEditing = () => {
|
|
67
|
+
var _a;
|
|
68
|
+
if (isBrowser()) {
|
|
69
|
+
(_a = window.parent) == null || _a.postMessage({
|
|
70
|
+
type: "builder.sdkInfo",
|
|
71
|
+
data: {
|
|
72
|
+
target: TARGET,
|
|
73
|
+
supportsPatchUpdates: false
|
|
74
|
+
}
|
|
75
|
+
}, "*");
|
|
76
|
+
window.addEventListener("message", ({ data }) => {
|
|
77
|
+
var _a2, _b;
|
|
78
|
+
if (data)
|
|
79
|
+
switch (data.type) {
|
|
80
|
+
case "builder.evaluate": {
|
|
81
|
+
const text = data.data.text;
|
|
82
|
+
const args = data.data.arguments || [];
|
|
83
|
+
const id = data.data.id;
|
|
84
|
+
const fn = new Function(text);
|
|
85
|
+
let result;
|
|
86
|
+
let error = null;
|
|
87
|
+
try {
|
|
88
|
+
result = fn.apply(null, args);
|
|
89
|
+
} catch (err) {
|
|
90
|
+
error = err;
|
|
91
|
+
}
|
|
92
|
+
if (error)
|
|
93
|
+
(_a2 = window.parent) == null || _a2.postMessage({
|
|
94
|
+
type: "builder.evaluateError",
|
|
95
|
+
data: {
|
|
96
|
+
id,
|
|
97
|
+
error: error.message
|
|
98
|
+
}
|
|
99
|
+
}, "*");
|
|
100
|
+
else if (result && typeof result.then === "function")
|
|
101
|
+
result.then((finalResult) => {
|
|
102
|
+
var _a3;
|
|
103
|
+
(_a3 = window.parent) == null || _a3.postMessage({
|
|
104
|
+
type: "builder.evaluateResult",
|
|
105
|
+
data: {
|
|
106
|
+
id,
|
|
107
|
+
result: finalResult
|
|
108
|
+
}
|
|
109
|
+
}, "*");
|
|
110
|
+
}).catch(console.error);
|
|
111
|
+
else
|
|
112
|
+
(_b = window.parent) == null || _b.postMessage({
|
|
113
|
+
type: "builder.evaluateResult",
|
|
114
|
+
data: {
|
|
115
|
+
result,
|
|
116
|
+
id
|
|
117
|
+
}
|
|
118
|
+
}, "*");
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
};
|
|
38
125
|
var stdin_default = qwik.createContext("Builder");
|
|
126
|
+
function isIframe() {
|
|
127
|
+
return isBrowser() && window.self !== window.top;
|
|
128
|
+
}
|
|
129
|
+
function isEditing() {
|
|
130
|
+
return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
131
|
+
}
|
|
39
132
|
const SIZES = {
|
|
40
133
|
small: {
|
|
41
134
|
min: 320,
|
|
@@ -76,10 +169,7 @@ const set = (obj, _path, value) => {
|
|
|
76
169
|
if (Object(obj) !== obj)
|
|
77
170
|
return obj;
|
|
78
171
|
const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
|
|
79
|
-
path.slice(0, -1).reduce(
|
|
80
|
-
(a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {},
|
|
81
|
-
obj
|
|
82
|
-
)[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;
|
|
83
173
|
return obj;
|
|
84
174
|
};
|
|
85
175
|
function transformBlock(block) {
|
|
@@ -444,7 +534,8 @@ const renderComponentProps = function renderComponentProps2(props, state) {
|
|
|
444
534
|
return {
|
|
445
535
|
blockChildren: children(props),
|
|
446
536
|
componentRef: componentRef(props),
|
|
447
|
-
componentOptions: componentOptions(props)
|
|
537
|
+
componentOptions: componentOptions(props),
|
|
538
|
+
context: props.context
|
|
448
539
|
};
|
|
449
540
|
};
|
|
450
541
|
const children = function children2(props, state) {
|
|
@@ -467,21 +558,19 @@ const repeatItemData = function repeatItemData2(props, state) {
|
|
|
467
558
|
return void 0;
|
|
468
559
|
const collectionName = repeat.collection.split(".").pop();
|
|
469
560
|
const itemNameToUse = repeat.itemName || (collectionName ? collectionName + "Item" : "item");
|
|
470
|
-
const repeatArray = itemsArray.map(
|
|
471
|
-
|
|
472
|
-
context
|
|
473
|
-
|
|
474
|
-
state
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
})
|
|
484
|
-
);
|
|
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
|
+
}));
|
|
485
574
|
return repeatArray;
|
|
486
575
|
};
|
|
487
576
|
const RenderBlock = (props) => {
|
|
@@ -494,7 +583,8 @@ const RenderBlock = (props) => {
|
|
|
494
583
|
repeatItemData(props) ? (repeatItemData(props) || []).map((data, index) => {
|
|
495
584
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderRepeatedBlock$1, {
|
|
496
585
|
repeatContext: data.context,
|
|
497
|
-
block: data.block
|
|
586
|
+
block: data.block,
|
|
587
|
+
context: props.context
|
|
498
588
|
}, index);
|
|
499
589
|
}) : null,
|
|
500
590
|
!repeatItemData(props) ? /* @__PURE__ */ jsxRuntime.jsx(RenderComponent$1, {
|
|
@@ -549,7 +639,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
549
639
|
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
|
|
550
640
|
const builderContext = qwik.useContext(stdin_default);
|
|
551
641
|
const state = {};
|
|
552
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
642
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
553
643
|
class: className(props) + " div-RenderBlocks",
|
|
554
644
|
"builder-path": props.path,
|
|
555
645
|
"builder-parent-id": props.parent,
|
|
@@ -559,7 +649,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
559
649
|
onClick$: qwik.inlinedQrl((event) => {
|
|
560
650
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
561
651
|
return onClick$1(props2);
|
|
562
|
-
}, "
|
|
652
|
+
}, "RenderBlocks_component_div_onClick_IHSfVTIKyxE", [
|
|
563
653
|
builderContext,
|
|
564
654
|
props,
|
|
565
655
|
state
|
|
@@ -567,31 +657,27 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
567
657
|
onMouseEnter$: qwik.inlinedQrl((event) => {
|
|
568
658
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
569
659
|
return onMouseEnter(props2);
|
|
570
|
-
}, "
|
|
660
|
+
}, "RenderBlocks_component_div_onMouseEnter_qLiEh4n9ugw", [
|
|
571
661
|
builderContext,
|
|
572
662
|
props,
|
|
573
663
|
state
|
|
574
664
|
]),
|
|
575
|
-
children:
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
]
|
|
590
|
-
})
|
|
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
|
+
]
|
|
591
679
|
});
|
|
592
|
-
}, "RenderBlocks_component_SXGwmVyEM0s")
|
|
593
|
-
tagName: "div"
|
|
594
|
-
});
|
|
680
|
+
}, "RenderBlocks_component_SXGwmVyEM0s"));
|
|
595
681
|
const RenderBlocks$1 = RenderBlocks;
|
|
596
682
|
const STYLES$2 = `.div-RenderBlocks {
|
|
597
683
|
display: flex;
|
|
@@ -637,7 +723,7 @@ const columnCssVars = function columnCssVars2(props, state) {
|
|
|
637
723
|
const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
638
724
|
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_704fWXyHORo"));
|
|
639
725
|
const state = {};
|
|
640
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
726
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
641
727
|
class: "builder-columns div-Columns",
|
|
642
728
|
style: columnsCssVars(props, state),
|
|
643
729
|
children: (props.columns || []).map((column, index) => {
|
|
@@ -654,9 +740,7 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
654
740
|
}, index);
|
|
655
741
|
})
|
|
656
742
|
});
|
|
657
|
-
}, "Columns_component_0PeVQGTMczc")
|
|
658
|
-
tagName: "div"
|
|
659
|
-
});
|
|
743
|
+
}, "Columns_component_0PeVQGTMczc"));
|
|
660
744
|
const Columns$1 = Columns;
|
|
661
745
|
const STYLES$1 = `.div-Columns {
|
|
662
746
|
display: flex;
|
|
@@ -710,25 +794,15 @@ function getSrcSet(url) {
|
|
|
710
794
|
const widthInSrc = Number(url.split("?width=")[1]);
|
|
711
795
|
if (!isNaN(widthInSrc))
|
|
712
796
|
srcUrl = `${srcUrl} ${widthInSrc}w`;
|
|
713
|
-
return sizes.filter(
|
|
714
|
-
(size) => size !== widthInSrc
|
|
715
|
-
).map(
|
|
716
|
-
(size) => `${updateQueryParam(url, "width", size)} ${size}w`
|
|
717
|
-
).concat([
|
|
797
|
+
return sizes.filter((size) => size !== widthInSrc).map((size) => `${updateQueryParam(url, "width", size)} ${size}w`).concat([
|
|
718
798
|
srcUrl
|
|
719
799
|
]).join(", ");
|
|
720
800
|
}
|
|
721
801
|
if (url.match(/cdn\.shopify\.com/))
|
|
722
|
-
return sizes.map(
|
|
723
|
-
(size)
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
]
|
|
727
|
-
).filter(
|
|
728
|
-
([sizeUrl]) => !!sizeUrl
|
|
729
|
-
).map(
|
|
730
|
-
([sizeUrl, size]) => `${sizeUrl} ${size}w`
|
|
731
|
-
).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([
|
|
732
806
|
url
|
|
733
807
|
]).join(", ");
|
|
734
808
|
return url;
|
|
@@ -755,51 +829,47 @@ const webpSrcSet = function webpSrcSet2(props, state) {
|
|
|
755
829
|
};
|
|
756
830
|
const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
757
831
|
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
758
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
832
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
759
833
|
class: "div-Image",
|
|
760
|
-
children:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
]
|
|
798
|
-
})
|
|
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
|
+
]
|
|
799
871
|
});
|
|
800
|
-
}, "Image_component_y3S3Zox9wEo")
|
|
801
|
-
tagName: "div"
|
|
802
|
-
});
|
|
872
|
+
}, "Image_component_y3S3Zox9wEo"));
|
|
803
873
|
const Image$1 = Image;
|
|
804
874
|
const STYLES = `.div-Image {
|
|
805
875
|
position: relative; }.img-Image {
|
|
@@ -822,13 +892,11 @@ left: 0;
|
|
|
822
892
|
width: 100%;
|
|
823
893
|
height: 100%; }`;
|
|
824
894
|
const Text = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
825
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
895
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
826
896
|
class: "builder-text",
|
|
827
897
|
dangerouslySetInnerHTML: props.text
|
|
828
898
|
});
|
|
829
|
-
}, "Text_component_ci0NVEdoK0Q")
|
|
830
|
-
tagName: "div"
|
|
831
|
-
});
|
|
899
|
+
}, "Text_component_ci0NVEdoK0Q"));
|
|
832
900
|
const Text$1 = Text;
|
|
833
901
|
const videoProps = function videoProps2(props, state) {
|
|
834
902
|
return {
|
|
@@ -850,7 +918,7 @@ const videoProps = function videoProps2(props, state) {
|
|
|
850
918
|
};
|
|
851
919
|
};
|
|
852
920
|
const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
853
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
+
return /* @__PURE__ */ jsxRuntime.jsx("video", {
|
|
854
922
|
...videoProps(props),
|
|
855
923
|
style: {
|
|
856
924
|
width: "100%",
|
|
@@ -863,9 +931,7 @@ const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
863
931
|
src: props.video || "no-src",
|
|
864
932
|
poster: props.posterImage
|
|
865
933
|
});
|
|
866
|
-
}, "Video_component_O5sPuWlrTvk")
|
|
867
|
-
tagName: "video"
|
|
868
|
-
});
|
|
934
|
+
}, "Video_component_O5sPuWlrTvk"));
|
|
869
935
|
const Video$1 = Video;
|
|
870
936
|
const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
871
937
|
return /* @__PURE__ */ jsxRuntime.jsx(qwik.Fragment, {
|
|
@@ -1120,13 +1186,9 @@ const componentInfo$7 = {
|
|
|
1120
1186
|
}
|
|
1121
1187
|
const columns = options.get("columns");
|
|
1122
1188
|
if (Array.isArray(columns)) {
|
|
1123
|
-
const containsColumnWithWidth = !!columns.find(
|
|
1124
|
-
(col) => col.get("width")
|
|
1125
|
-
);
|
|
1189
|
+
const containsColumnWithWidth = !!columns.find((col) => col.get("width"));
|
|
1126
1190
|
if (containsColumnWithWidth) {
|
|
1127
|
-
const containsColumnWithoutWidth = !!columns.find(
|
|
1128
|
-
(col) => !col.get("width")
|
|
1129
|
-
);
|
|
1191
|
+
const containsColumnWithoutWidth = !!columns.find((col) => !col.get("width"));
|
|
1130
1192
|
if (containsColumnWithoutWidth)
|
|
1131
1193
|
clearWidths();
|
|
1132
1194
|
else {
|
|
@@ -1178,12 +1240,10 @@ const componentInfo$6 = {
|
|
|
1178
1240
|
noWrap: true
|
|
1179
1241
|
};
|
|
1180
1242
|
const FragmentComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1181
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1182
1244
|
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
1183
1245
|
});
|
|
1184
|
-
}, "FragmentComponent_component_FJmqlA66Rjg")
|
|
1185
|
-
tagName: "span"
|
|
1186
|
-
});
|
|
1246
|
+
}, "FragmentComponent_component_FJmqlA66Rjg"));
|
|
1187
1247
|
const Fragment = FragmentComponent;
|
|
1188
1248
|
const componentInfo$5 = {
|
|
1189
1249
|
name: "Image",
|
|
@@ -1238,9 +1298,7 @@ const componentInfo$5 = {
|
|
|
1238
1298
|
}
|
|
1239
1299
|
const value = options.get("image");
|
|
1240
1300
|
const aspectRatio = options.get("aspectRatio");
|
|
1241
|
-
fetch(value).then(
|
|
1242
|
-
(res) => res.blob()
|
|
1243
|
-
).then((blob) => {
|
|
1301
|
+
fetch(value).then((res) => res.blob()).then((blob) => {
|
|
1244
1302
|
if (blob.type.includes("svg"))
|
|
1245
1303
|
options.set("noWebp", true);
|
|
1246
1304
|
});
|
|
@@ -1383,16 +1441,14 @@ const componentInfo$4 = {
|
|
|
1383
1441
|
]
|
|
1384
1442
|
};
|
|
1385
1443
|
const SectionComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1386
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1444
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", {
|
|
1387
1445
|
...props.attributes,
|
|
1388
1446
|
style: (() => {
|
|
1389
1447
|
props.maxWidth && typeof props.maxWidth === "number" ? props.maxWidth : void 0;
|
|
1390
1448
|
})(),
|
|
1391
1449
|
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
1392
1450
|
});
|
|
1393
|
-
}, "SectionComponent_component_m1CcjCwgHug")
|
|
1394
|
-
tagName: "section"
|
|
1395
|
-
});
|
|
1451
|
+
}, "SectionComponent_component_m1CcjCwgHug"));
|
|
1396
1452
|
const Section = SectionComponent;
|
|
1397
1453
|
const componentInfo$3 = {
|
|
1398
1454
|
name: "Symbol",
|
|
@@ -1584,9 +1640,7 @@ const componentInfo2 = {
|
|
|
1584
1640
|
if (url) {
|
|
1585
1641
|
options.set("content", "Loading...");
|
|
1586
1642
|
const apiKey = "ae0e60e78201a3f2b0de4b";
|
|
1587
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(
|
|
1588
|
-
(res) => res.json()
|
|
1589
|
-
).then((data) => {
|
|
1643
|
+
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
1590
1644
|
if (options.get("url") === url) {
|
|
1591
1645
|
if (data.html)
|
|
1592
1646
|
options.set("content", data.html);
|
|
@@ -1652,14 +1706,12 @@ const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
1652
1706
|
props,
|
|
1653
1707
|
state
|
|
1654
1708
|
]));
|
|
1655
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1709
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1656
1710
|
class: "builder-embed",
|
|
1657
1711
|
ref: elem,
|
|
1658
1712
|
dangerouslySetInnerHTML: props.content
|
|
1659
1713
|
});
|
|
1660
|
-
}, "Embed_component_CP6B8Y76ylw")
|
|
1661
|
-
tagName: "div"
|
|
1662
|
-
});
|
|
1714
|
+
}, "Embed_component_CP6B8Y76ylw"));
|
|
1663
1715
|
const embed = Embed;
|
|
1664
1716
|
var __defProp$3 = Object.defineProperty;
|
|
1665
1717
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
@@ -1812,9 +1864,7 @@ function getFetch() {
|
|
|
1812
1864
|
return __async$1(this, null, function* () {
|
|
1813
1865
|
const globalFetch = getGlobalThis().fetch;
|
|
1814
1866
|
if (typeof globalFetch === "undefined" && typeof global !== "undefined") {
|
|
1815
|
-
const nodeFetch = Promise.resolve().then(() => require("./index.d8c1e37f.cjs")).then(
|
|
1816
|
-
(d) => d.default
|
|
1817
|
-
);
|
|
1867
|
+
const nodeFetch = Promise.resolve().then(() => require("./index.d8c1e37f.cjs")).then((d) => d.default);
|
|
1818
1868
|
return nodeFetch.default || nodeFetch;
|
|
1819
1869
|
}
|
|
1820
1870
|
return globalFetch.default || globalFetch;
|
|
@@ -1919,8 +1969,8 @@ const generateContentUrl = (options) => {
|
|
|
1919
1969
|
const flattened2 = flatten({
|
|
1920
1970
|
query
|
|
1921
1971
|
});
|
|
1922
|
-
for (const
|
|
1923
|
-
url.searchParams.set(
|
|
1972
|
+
for (const key1 in flattened2)
|
|
1973
|
+
url.searchParams.set(key1, JSON.stringify(flattened2[key1]));
|
|
1924
1974
|
}
|
|
1925
1975
|
return url;
|
|
1926
1976
|
};
|
|
@@ -1928,9 +1978,7 @@ function getAllContent(options) {
|
|
|
1928
1978
|
return __async(this, null, function* () {
|
|
1929
1979
|
const url = generateContentUrl(options);
|
|
1930
1980
|
const fetch2 = yield fetch$;
|
|
1931
|
-
const content = yield fetch2(url.href).then(
|
|
1932
|
-
(res) => res.json()
|
|
1933
|
-
);
|
|
1981
|
+
const content = yield fetch2(url.href).then((res) => res.json());
|
|
1934
1982
|
if (options.testGroups)
|
|
1935
1983
|
for (const item of content.results)
|
|
1936
1984
|
handleABTesting(item, options.testGroups);
|
|
@@ -2009,14 +2057,9 @@ const prepareComponentInfoToSend = (_c) => {
|
|
|
2009
2057
|
"inputs"
|
|
2010
2058
|
]);
|
|
2011
2059
|
return __spreadProps(__spreadValues({}, fastClone(info)), {
|
|
2012
|
-
inputs: inputs == null ? void 0 : inputs.map(
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
[key]: serializeValue(value)
|
|
2016
|
-
}),
|
|
2017
|
-
{}
|
|
2018
|
-
)
|
|
2019
|
-
)
|
|
2060
|
+
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
|
|
2061
|
+
[key]: serializeValue(value)
|
|
2062
|
+
}), {}))
|
|
2020
2063
|
});
|
|
2021
2064
|
};
|
|
2022
2065
|
function track(event, properties) {
|
|
@@ -2073,9 +2116,7 @@ const getCssFromFont = function getCssFromFont2(props, state, font) {
|
|
|
2073
2116
|
return str;
|
|
2074
2117
|
};
|
|
2075
2118
|
const getFontCss = function getFontCss2(props, state, { customFonts }) {
|
|
2076
|
-
return customFonts?.map(
|
|
2077
|
-
(font) => getCssFromFont(props, state, font)
|
|
2078
|
-
)?.join(" ") || "";
|
|
2119
|
+
return customFonts?.map((font) => getCssFromFont(props, state, font))?.join(" ") || "";
|
|
2079
2120
|
};
|
|
2080
2121
|
const injectedStyles = function injectedStyles2(props, state) {
|
|
2081
2122
|
return `
|
|
@@ -2091,7 +2132,7 @@ const RenderContentStyles = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
|
|
|
2091
2132
|
});
|
|
2092
2133
|
}, "RenderContentStyles_component_32XAr483K2o"));
|
|
2093
2134
|
const RenderContentStyles$1 = RenderContentStyles;
|
|
2094
|
-
const useContent = function useContent2(props, state) {
|
|
2135
|
+
const useContent = function useContent2(props, state, elementRef) {
|
|
2095
2136
|
const mergedContent = {
|
|
2096
2137
|
...props.content,
|
|
2097
2138
|
...state.overrideContent,
|
|
@@ -2103,32 +2144,29 @@ const useContent = function useContent2(props, state) {
|
|
|
2103
2144
|
};
|
|
2104
2145
|
return mergedContent;
|
|
2105
2146
|
};
|
|
2106
|
-
const contentState = function contentState2(props, state) {
|
|
2147
|
+
const contentState = function contentState2(props, state, elementRef) {
|
|
2107
2148
|
return {
|
|
2108
2149
|
...props.content?.data?.state,
|
|
2109
2150
|
...props.data,
|
|
2110
2151
|
...state.overrideState
|
|
2111
2152
|
};
|
|
2112
2153
|
};
|
|
2113
|
-
const contextContext = function contextContext2(props, state) {
|
|
2154
|
+
const contextContext = function contextContext2(props, state, elementRef) {
|
|
2114
2155
|
return props.context || {};
|
|
2115
2156
|
};
|
|
2116
|
-
const allRegisteredComponents = function allRegisteredComponents2(props, state) {
|
|
2157
|
+
const allRegisteredComponents = function allRegisteredComponents2(props, state, elementRef) {
|
|
2117
2158
|
const allComponentsArray = [
|
|
2118
2159
|
...getDefaultRegisteredComponents(),
|
|
2119
2160
|
...components,
|
|
2120
2161
|
...props.customComponents || []
|
|
2121
2162
|
];
|
|
2122
|
-
const allComponents = allComponentsArray.reduce(
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
}),
|
|
2127
|
-
{}
|
|
2128
|
-
);
|
|
2163
|
+
const allComponents = allComponentsArray.reduce((acc, curr) => ({
|
|
2164
|
+
...acc,
|
|
2165
|
+
[curr.name]: curr
|
|
2166
|
+
}), {});
|
|
2129
2167
|
return allComponents;
|
|
2130
2168
|
};
|
|
2131
|
-
const processMessage = function processMessage2(props, state, event) {
|
|
2169
|
+
const processMessage = function processMessage2(props, state, elementRef, event) {
|
|
2132
2170
|
const { data } = event;
|
|
2133
2171
|
if (data)
|
|
2134
2172
|
switch (data.type) {
|
|
@@ -2142,7 +2180,7 @@ const processMessage = function processMessage2(props, state, event) {
|
|
|
2142
2180
|
}
|
|
2143
2181
|
}
|
|
2144
2182
|
};
|
|
2145
|
-
const evaluateJsCode = function evaluateJsCode2(props, state) {
|
|
2183
|
+
const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
|
|
2146
2184
|
const jsCode = useContent(props, state)?.data?.jsCode;
|
|
2147
2185
|
if (jsCode)
|
|
2148
2186
|
evaluate({
|
|
@@ -2151,26 +2189,23 @@ const evaluateJsCode = function evaluateJsCode2(props, state) {
|
|
|
2151
2189
|
state: contentState(props, state)
|
|
2152
2190
|
});
|
|
2153
2191
|
};
|
|
2154
|
-
const httpReqsData = function httpReqsData2(props, state) {
|
|
2192
|
+
const httpReqsData = function httpReqsData2(props, state, elementRef) {
|
|
2155
2193
|
return {};
|
|
2156
2194
|
};
|
|
2157
|
-
const onClick2 = function onClick3(props, state, _event) {
|
|
2195
|
+
const onClick2 = function onClick3(props, state, elementRef, _event) {
|
|
2158
2196
|
if (useContent(props, state) && props.canTrack !== false)
|
|
2159
2197
|
track("click", {
|
|
2160
2198
|
contentId: useContent(props, state).id
|
|
2161
2199
|
});
|
|
2162
2200
|
};
|
|
2163
|
-
const evalExpression = function evalExpression2(props, state, expression) {
|
|
2164
|
-
return expression.replace(
|
|
2165
|
-
|
|
2166
|
-
(
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
state: contentState(props, state)
|
|
2170
|
-
})
|
|
2171
|
-
);
|
|
2201
|
+
const evalExpression = function evalExpression2(props, state, elementRef, expression) {
|
|
2202
|
+
return expression.replace(/{{([^}]+)}}/g, (_match, group) => evaluate({
|
|
2203
|
+
code: group,
|
|
2204
|
+
context: contextContext(props),
|
|
2205
|
+
state: contentState(props, state)
|
|
2206
|
+
}));
|
|
2172
2207
|
};
|
|
2173
|
-
const handleRequest = function handleRequest2(props, state, { url, key }) {
|
|
2208
|
+
const handleRequest = function handleRequest2(props, state, elementRef, { url, key }) {
|
|
2174
2209
|
const fetchAndSetState = async () => {
|
|
2175
2210
|
const fetch2 = await getFetch();
|
|
2176
2211
|
const response = await fetch2(url);
|
|
@@ -2183,19 +2218,19 @@ const handleRequest = function handleRequest2(props, state, { url, key }) {
|
|
|
2183
2218
|
};
|
|
2184
2219
|
fetchAndSetState();
|
|
2185
2220
|
};
|
|
2186
|
-
const runHttpRequests = function runHttpRequests2(props, state) {
|
|
2221
|
+
const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
2187
2222
|
const requests = useContent(props, state)?.data?.httpRequests ?? {};
|
|
2188
2223
|
Object.entries(requests).forEach(([key, url]) => {
|
|
2189
2224
|
if (url && (!httpReqsData()[key] || isEditing())) {
|
|
2190
|
-
const evaluatedUrl = evalExpression(props, state, url);
|
|
2191
|
-
handleRequest(props, state, {
|
|
2225
|
+
const evaluatedUrl = evalExpression(props, state, elementRef, url);
|
|
2226
|
+
handleRequest(props, state, elementRef, {
|
|
2192
2227
|
url: evaluatedUrl,
|
|
2193
2228
|
key
|
|
2194
2229
|
});
|
|
2195
2230
|
}
|
|
2196
2231
|
});
|
|
2197
2232
|
};
|
|
2198
|
-
const emitStateUpdate = function emitStateUpdate2(props, state) {
|
|
2233
|
+
const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
2199
2234
|
if (isEditing())
|
|
2200
2235
|
window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
|
|
2201
2236
|
detail: {
|
|
@@ -2206,12 +2241,13 @@ const emitStateUpdate = function emitStateUpdate2(props, state) {
|
|
|
2206
2241
|
}
|
|
2207
2242
|
}));
|
|
2208
2243
|
};
|
|
2209
|
-
const shouldRenderContentStyles = function shouldRenderContentStyles2(props, state) {
|
|
2244
|
+
const shouldRenderContentStyles = function shouldRenderContentStyles2(props, state, elementRef) {
|
|
2210
2245
|
return Boolean((useContent(props, state)?.data?.cssCode || useContent(props, state)?.data?.customFonts?.length) && TARGET !== "reactNative");
|
|
2211
2246
|
};
|
|
2212
2247
|
const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2213
|
-
const
|
|
2248
|
+
const elementRef = qwik.useRef();
|
|
2214
2249
|
const state = qwik.useStore({
|
|
2250
|
+
forceReRenderCount: 0,
|
|
2215
2251
|
overrideContent: null,
|
|
2216
2252
|
update: 0,
|
|
2217
2253
|
overrideState: {}
|
|
@@ -2234,16 +2270,19 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2234
2270
|
})()
|
|
2235
2271
|
}));
|
|
2236
2272
|
qwik.useClientEffectQrl(qwik.inlinedQrl(() => {
|
|
2237
|
-
const [
|
|
2273
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2238
2274
|
if (isBrowser()) {
|
|
2239
2275
|
if (isEditing()) {
|
|
2240
|
-
|
|
2276
|
+
state2.forceReRenderCount++;
|
|
2277
|
+
qwik._useMutableProps(elementRef2.current, true);
|
|
2278
|
+
registerInsertMenu();
|
|
2279
|
+
setupBrowserForEditing();
|
|
2241
2280
|
Object.values(allRegisteredComponents(props2)).forEach((registeredComponent) => {
|
|
2242
2281
|
const message = createRegisterComponentMessage(registeredComponent);
|
|
2243
2282
|
window.parent?.postMessage(message, "*");
|
|
2244
2283
|
});
|
|
2245
|
-
window.addEventListener("message", processMessage.bind(null, props2, state2));
|
|
2246
|
-
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2));
|
|
2284
|
+
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2285
|
+
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2247
2286
|
}
|
|
2248
2287
|
if (useContent(props2, state2) && props2.canTrack !== false)
|
|
2249
2288
|
track("impression", {
|
|
@@ -2264,54 +2303,60 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2264
2303
|
}
|
|
2265
2304
|
}
|
|
2266
2305
|
evaluateJsCode(props2, state2);
|
|
2267
|
-
runHttpRequests(props2, state2);
|
|
2306
|
+
runHttpRequests(props2, state2, elementRef2);
|
|
2268
2307
|
emitStateUpdate(props2, state2);
|
|
2269
2308
|
}
|
|
2270
2309
|
}, "RenderContent_component_useClientEffect_ntruwSC9lSo", [
|
|
2271
|
-
|
|
2310
|
+
elementRef,
|
|
2272
2311
|
props,
|
|
2273
2312
|
state
|
|
2274
2313
|
]));
|
|
2275
|
-
qwik.useWatchQrl(qwik.inlinedQrl(({ track:
|
|
2276
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2277
|
-
state2.useContent?.data &&
|
|
2314
|
+
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2315
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2316
|
+
state2.useContent?.data && track2(state2.useContent?.data, "jsCode");
|
|
2278
2317
|
evaluateJsCode(props2, state2);
|
|
2279
2318
|
}, "RenderContent_component_useWatch_1P0ujLQOmzc", [
|
|
2319
|
+
elementRef,
|
|
2280
2320
|
props,
|
|
2281
2321
|
state
|
|
2282
2322
|
]));
|
|
2283
2323
|
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2284
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2324
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2285
2325
|
state2.useContent?.data && track2(state2.useContent?.data, "httpRequests");
|
|
2286
|
-
runHttpRequests(props2, state2);
|
|
2326
|
+
runHttpRequests(props2, state2, elementRef2);
|
|
2287
2327
|
}, "RenderContent_component_useWatch_1_0hAcn4V2AZw", [
|
|
2328
|
+
elementRef,
|
|
2288
2329
|
props,
|
|
2289
2330
|
state
|
|
2290
2331
|
]));
|
|
2291
|
-
qwik.useWatchQrl(qwik.inlinedQrl(({ track:
|
|
2292
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2293
|
-
state2 &&
|
|
2332
|
+
qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2333
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2334
|
+
state2 && track2(state2, "contentState");
|
|
2294
2335
|
emitStateUpdate(props2, state2);
|
|
2295
2336
|
}, "RenderContent_component_useWatch_2_t2n8zpl4mRs", [
|
|
2337
|
+
elementRef,
|
|
2296
2338
|
props,
|
|
2297
2339
|
state
|
|
2298
2340
|
]));
|
|
2299
2341
|
qwik.useCleanupQrl(qwik.inlinedQrl(() => {
|
|
2300
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2342
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2301
2343
|
if (isBrowser()) {
|
|
2302
|
-
window.removeEventListener("message", processMessage.bind(null, props2, state2));
|
|
2303
|
-
window.removeEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2));
|
|
2344
|
+
window.removeEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2345
|
+
window.removeEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2304
2346
|
}
|
|
2305
2347
|
}, "RenderContent_component_useCleanup_sGf1npb03WA", [
|
|
2348
|
+
elementRef,
|
|
2306
2349
|
props,
|
|
2307
2350
|
state
|
|
2308
2351
|
]));
|
|
2309
2352
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2310
2353
|
children: useContent(props, state) ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2354
|
+
ref: elementRef,
|
|
2311
2355
|
onClick$: qwik.inlinedQrl((event) => {
|
|
2312
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
2356
|
+
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2313
2357
|
return onClick2(props2, state2);
|
|
2314
2358
|
}, "RenderContent_component__Fragment_div_onClick_76e3rL00UYE", [
|
|
2359
|
+
elementRef,
|
|
2315
2360
|
props,
|
|
2316
2361
|
state
|
|
2317
2362
|
]),
|
|
@@ -2323,7 +2368,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2323
2368
|
}) : null,
|
|
2324
2369
|
/* @__PURE__ */ jsxRuntime.jsx(RenderBlocks$1, {
|
|
2325
2370
|
blocks: useContent(props, state)?.data?.blocks
|
|
2326
|
-
})
|
|
2371
|
+
}, state.forceReRenderCount)
|
|
2327
2372
|
]
|
|
2328
2373
|
}) : null
|
|
2329
2374
|
});
|
|
@@ -2364,7 +2409,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2364
2409
|
props,
|
|
2365
2410
|
state
|
|
2366
2411
|
]));
|
|
2367
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2412
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2368
2413
|
...props.attributes,
|
|
2369
2414
|
dataSet: {
|
|
2370
2415
|
class: state.className
|
|
@@ -2383,9 +2428,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2383
2428
|
content: state.content
|
|
2384
2429
|
})
|
|
2385
2430
|
});
|
|
2386
|
-
}, "Symbol_component_Dn8mGpai87I")
|
|
2387
|
-
tagName: "div"
|
|
2388
|
-
});
|
|
2431
|
+
}, "Symbol_component_Dn8mGpai87I"));
|
|
2389
2432
|
const Symbol$2 = Symbol$1;
|
|
2390
2433
|
const settings = {};
|
|
2391
2434
|
function setEditorSettings(newSettings) {
|