@builder.io/sdk-qwik 0.1.15 → 0.2.0
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 +57 -0
- package/lib/index.qwik.cjs +450 -431
- package/lib/index.qwik.mjs +452 -433
- package/package.json +2 -2
- package/types/blocks/columns/columns.d.ts +3 -3
- package/types/blocks/image/image.d.ts +2 -2
- package/types/blocks/symbol/symbol.d.ts +2 -2
- package/types/components/render-block/block-styles.d.ts +2 -2
- package/types/components/render-block/render-block.d.ts +4 -2
- package/types/components/render-block/render-component.d.ts +2 -2
- package/types/components/render-block/render-repeated-block.d.ts +2 -2
- package/types/components/render-blocks.d.ts +1 -1
- package/types/components/render-content/components/render-styles.d.ts +1 -1
- package/types/components/render-content/render-content.d.ts +3 -3
- package/types/context/builder.context.d.ts +1 -1
- package/types/context/types.d.ts +1 -1
- package/types/functions/get-content/index.d.ts +5 -5
- package/types/functions/get-content/types.d.ts +1 -1
- package/types/functions/get-global-this.d.ts +4 -2
- package/types/types/api-version.d.ts +1 -0
package/lib/index.qwik.cjs
CHANGED
|
@@ -2,36 +2,37 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const qwik = require("@builder.io/qwik");
|
|
4
4
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
5
|
-
const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
6
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
children: props.link ? /* @__PURE__ */
|
|
5
|
+
const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
6
|
+
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$3, "Button_component_useStylesScoped_a1JZ0Q0Q2Oc"));
|
|
7
|
+
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
8
|
+
children: props.link ? /* @__PURE__ */ qwik._jsxQ("a", {
|
|
9
|
+
...props.attributes
|
|
10
|
+
}, {
|
|
9
11
|
role: "button",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, "jc_0");
|
|
12
|
+
href: qwik._fnSignal((p0) => p0.link, [
|
|
13
|
+
props
|
|
14
|
+
], "p0.link"),
|
|
15
|
+
target: qwik._fnSignal((p0) => p0.openLinkInNewTab ? "_blank" : void 0, [
|
|
16
|
+
props
|
|
17
|
+
], 'p0.openLinkInNewTab?"_blank":undefined')
|
|
18
|
+
}, qwik._fnSignal((p0) => p0.text, [
|
|
19
|
+
props
|
|
20
|
+
], "p0.text"), 2, "jc_0") : /* @__PURE__ */ qwik._jsxQ("button", {
|
|
21
|
+
class: (() => {
|
|
22
|
+
props.attributes.class;
|
|
23
|
+
})(),
|
|
24
|
+
...props.attributes
|
|
25
|
+
}, null, qwik._fnSignal((p0) => p0.text, [
|
|
26
|
+
props
|
|
27
|
+
], "p0.text"), 2, null)
|
|
28
|
+
}, 1, "jc_1");
|
|
28
29
|
}, "Button_component_gJoMUICXoUQ"));
|
|
29
30
|
const STYLES$3 = `
|
|
30
31
|
.button-Button {
|
|
31
32
|
all: unset;
|
|
32
33
|
}
|
|
33
34
|
`;
|
|
34
|
-
const builderContext = qwik.
|
|
35
|
+
const builderContext = qwik.createContextId("Builder");
|
|
35
36
|
const TARGET = "qwik";
|
|
36
37
|
function isBrowser() {
|
|
37
38
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
@@ -177,19 +178,11 @@ const tag$1 = function tag2(props, state) {
|
|
|
177
178
|
const RenderInlinedStyles = (props) => {
|
|
178
179
|
const state = {};
|
|
179
180
|
state.tag = tag$1();
|
|
180
|
-
return /* @__PURE__ */
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
[qwik._IMMUTABLE]: {
|
|
186
|
-
dangerouslySetInnerHTML: qwik._wrapSignal(props, "styles")
|
|
187
|
-
}
|
|
188
|
-
}),
|
|
189
|
-
[qwik._IMMUTABLE]: {
|
|
190
|
-
children: false
|
|
191
|
-
}
|
|
192
|
-
}, "zz_0");
|
|
181
|
+
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
182
|
+
children: /* @__PURE__ */ qwik._jsxQ("style", {
|
|
183
|
+
dangerouslySetInnerHTML: qwik._wrapSignal(props, "styles")
|
|
184
|
+
}, null, null, 3, "zz_0")
|
|
185
|
+
}, 1, "zz_2");
|
|
193
186
|
};
|
|
194
187
|
const useBlock$1 = function useBlock2(props, state) {
|
|
195
188
|
return getProcessedBlock({
|
|
@@ -235,21 +228,19 @@ const css = function css2(props, state) {
|
|
|
235
228
|
].join(" ");
|
|
236
229
|
};
|
|
237
230
|
const BlockStyles = (props) => {
|
|
238
|
-
|
|
239
|
-
|
|
231
|
+
qwik._jsxBranch();
|
|
232
|
+
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
233
|
+
children: css(props) && canShowBlock$1(props) ? /* @__PURE__ */ qwik._jsxC(RenderInlinedStyles, {
|
|
240
234
|
styles: css(props)
|
|
241
|
-
}, "LQ_0") : null
|
|
242
|
-
|
|
243
|
-
children: false
|
|
244
|
-
}
|
|
245
|
-
}, "LQ_1");
|
|
235
|
+
}, 3, "LQ_0") : null
|
|
236
|
+
}, 1, "LQ_1");
|
|
246
237
|
};
|
|
247
238
|
function capitalizeFirstLetter(string) {
|
|
248
239
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
249
240
|
}
|
|
250
241
|
const getEventHandlerName = (key) => `on${capitalizeFirstLetter(key)}$`;
|
|
251
242
|
function createEventHandler(value, options) {
|
|
252
|
-
return qwik.inlinedQrl((event) => {
|
|
243
|
+
return /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
253
244
|
const [options2, value2] = qwik.useLexicalScope();
|
|
254
245
|
return evaluate({
|
|
255
246
|
code: value2,
|
|
@@ -382,40 +373,37 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
382
373
|
return repeatArray;
|
|
383
374
|
};
|
|
384
375
|
const RenderComponent = (props) => {
|
|
385
|
-
return /* @__PURE__ */
|
|
386
|
-
children: props.componentRef ? /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
377
|
+
children: props.componentRef ? /* @__PURE__ */ qwik._jsxC(props.componentRef, {
|
|
387
378
|
...props.componentOptions,
|
|
388
379
|
children: [
|
|
389
380
|
(props.blockChildren || []).map(function(child) {
|
|
390
|
-
return /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ qwik._jsxC(RenderBlock, {
|
|
391
382
|
block: child,
|
|
392
383
|
get context() {
|
|
393
384
|
return props.context;
|
|
394
385
|
},
|
|
395
386
|
[qwik._IMMUTABLE]: {
|
|
396
|
-
context: qwik.
|
|
387
|
+
context: qwik._wrapProp(props, "context")
|
|
397
388
|
}
|
|
398
|
-
}, "render-block-" + child.id);
|
|
389
|
+
}, 3, "render-block-" + child.id);
|
|
399
390
|
}),
|
|
400
391
|
(props.blockChildren || []).map(function(child) {
|
|
401
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
402
393
|
block: child,
|
|
403
394
|
get context() {
|
|
404
395
|
return props.context;
|
|
405
396
|
},
|
|
406
397
|
[qwik._IMMUTABLE]: {
|
|
407
|
-
context: qwik.
|
|
398
|
+
context: qwik._wrapProp(props, "context")
|
|
408
399
|
}
|
|
409
|
-
}, "block-style-" + child.id);
|
|
400
|
+
}, 3, "block-style-" + child.id);
|
|
410
401
|
})
|
|
411
402
|
]
|
|
412
|
-
}) : null
|
|
413
|
-
|
|
414
|
-
children: false
|
|
415
|
-
}
|
|
416
|
-
}, "R9_0");
|
|
403
|
+
}, 0, "R9_0") : null
|
|
404
|
+
}, 1, "R9_1");
|
|
417
405
|
};
|
|
418
|
-
const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
406
|
+
const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
419
407
|
qwik.useContextProvider(builderContext, qwik.useStore({
|
|
420
408
|
content: props.repeatContext.content,
|
|
421
409
|
state: props.repeatContext.state,
|
|
@@ -424,7 +412,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
|
|
|
424
412
|
registeredComponents: props.repeatContext.registeredComponents,
|
|
425
413
|
inheritedStyles: props.repeatContext.inheritedStyles
|
|
426
414
|
}));
|
|
427
|
-
return /* @__PURE__ */
|
|
415
|
+
return /* @__PURE__ */ qwik._jsxC(RenderBlock, {
|
|
428
416
|
get block() {
|
|
429
417
|
return props.block;
|
|
430
418
|
},
|
|
@@ -432,10 +420,14 @@ const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
|
|
|
432
420
|
return props.repeatContext;
|
|
433
421
|
},
|
|
434
422
|
[qwik._IMMUTABLE]: {
|
|
435
|
-
block: qwik.
|
|
436
|
-
|
|
423
|
+
block: qwik._fnSignal((p0) => p0.block, [
|
|
424
|
+
props
|
|
425
|
+
], "p0.block"),
|
|
426
|
+
context: qwik._fnSignal((p0) => p0.repeatContext, [
|
|
427
|
+
props
|
|
428
|
+
], "p0.repeatContext")
|
|
437
429
|
}
|
|
438
|
-
}, "K5_0");
|
|
430
|
+
}, 3, "K5_0");
|
|
439
431
|
}, "RenderRepeatedBlock_component_nRyVBtbGKc8"));
|
|
440
432
|
const component = function component2(props, state) {
|
|
441
433
|
return getComponent({
|
|
@@ -521,6 +513,7 @@ const childrenContext = function childrenContext2(props, state) {
|
|
|
521
513
|
};
|
|
522
514
|
return {
|
|
523
515
|
apiKey: props.context.apiKey,
|
|
516
|
+
apiVersion: props.context.apiVersion,
|
|
524
517
|
state: props.context.state,
|
|
525
518
|
content: props.context.content,
|
|
526
519
|
context: props.context.context,
|
|
@@ -530,17 +523,18 @@ const childrenContext = function childrenContext2(props, state) {
|
|
|
530
523
|
};
|
|
531
524
|
};
|
|
532
525
|
const RenderBlock = (props) => {
|
|
526
|
+
qwik._jsxBranch();
|
|
533
527
|
const state = {};
|
|
534
528
|
state.tag = tag(props);
|
|
535
|
-
return /* @__PURE__ */
|
|
536
|
-
children: canShowBlock(props) ? !component(props)?.noWrap ? /* @__PURE__ */
|
|
529
|
+
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
530
|
+
children: canShowBlock(props) ? !component(props)?.noWrap ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
537
531
|
children: [
|
|
538
|
-
isEmptyHtmlElement(tag(props)) ? /* @__PURE__ */
|
|
532
|
+
isEmptyHtmlElement(tag(props)) ? /* @__PURE__ */ qwik._jsxC(state.tag, {
|
|
539
533
|
...attributes(props),
|
|
540
534
|
...actions(props)
|
|
541
|
-
}) : null,
|
|
535
|
+
}, 2, "9d_0") : null,
|
|
542
536
|
!isEmptyHtmlElement(tag(props)) && repeatItemData(props) ? (repeatItemData(props) || []).map(function(data, index) {
|
|
543
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ qwik._jsxC(RenderRepeatedBlock, {
|
|
544
538
|
get repeatContext() {
|
|
545
539
|
return data.context;
|
|
546
540
|
},
|
|
@@ -548,45 +542,38 @@ const RenderBlock = (props) => {
|
|
|
548
542
|
return data.block;
|
|
549
543
|
},
|
|
550
544
|
[qwik._IMMUTABLE]: {
|
|
551
|
-
repeatContext: qwik.
|
|
552
|
-
block: qwik.
|
|
545
|
+
repeatContext: qwik._wrapProp(data, "context"),
|
|
546
|
+
block: qwik._wrapProp(data, "block")
|
|
553
547
|
}
|
|
554
|
-
}, index);
|
|
548
|
+
}, 3, index);
|
|
555
549
|
}) : null,
|
|
556
|
-
!isEmptyHtmlElement(tag(props)) && !repeatItemData(props) ? /* @__PURE__ */
|
|
550
|
+
!isEmptyHtmlElement(tag(props)) && !repeatItemData(props) ? /* @__PURE__ */ qwik._jsxC(state.tag, {
|
|
557
551
|
...attributes(props),
|
|
558
552
|
...actions(props),
|
|
559
553
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ qwik._jsxC(RenderComponent, {
|
|
561
555
|
...renderComponentProps(props)
|
|
562
|
-
}, "
|
|
556
|
+
}, 2, "9d_1"),
|
|
563
557
|
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
564
|
-
return /* @__PURE__ */
|
|
558
|
+
return /* @__PURE__ */ qwik._jsxC(RenderBlock, {
|
|
565
559
|
block: child,
|
|
566
560
|
context: childrenContext(props)
|
|
567
|
-
}, "render-block-" + child.id);
|
|
561
|
+
}, 3, "render-block-" + child.id);
|
|
568
562
|
}),
|
|
569
563
|
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
570
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
571
565
|
block: child,
|
|
572
566
|
context: childrenContext(props)
|
|
573
|
-
}, "block-style-" + child.id);
|
|
567
|
+
}, 3, "block-style-" + child.id);
|
|
574
568
|
})
|
|
575
569
|
]
|
|
576
|
-
}) : null
|
|
577
|
-
]
|
|
578
|
-
|
|
579
|
-
children: false
|
|
580
|
-
}
|
|
581
|
-
}, "9d_1") : /* @__PURE__ */ jsxRuntime.jsx(RenderComponent, {
|
|
570
|
+
}, 0, "9d_2") : null
|
|
571
|
+
]
|
|
572
|
+
}, 1, "9d_3") : /* @__PURE__ */ qwik._jsxC(RenderComponent, {
|
|
582
573
|
...renderComponentProps(props)
|
|
583
|
-
}, "
|
|
584
|
-
|
|
585
|
-
children: false
|
|
586
|
-
}
|
|
587
|
-
}, "9d_3");
|
|
574
|
+
}, 2, "9d_4") : null
|
|
575
|
+
}, 1, "9d_5");
|
|
588
576
|
};
|
|
589
|
-
const RenderBlock$1 = RenderBlock;
|
|
590
577
|
const className = function className2(props, state, builderContext2) {
|
|
591
578
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
592
579
|
};
|
|
@@ -610,22 +597,13 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext2) {
|
|
|
610
597
|
}
|
|
611
598
|
}, "*");
|
|
612
599
|
};
|
|
613
|
-
const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
614
|
-
qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_0XKYzaR059E"));
|
|
600
|
+
const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
601
|
+
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_0XKYzaR059E"));
|
|
615
602
|
const builderContext$1 = qwik.useContext(builderContext);
|
|
616
603
|
const state = {};
|
|
617
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
618
605
|
class: className(props) + " div-RenderBlocks",
|
|
619
|
-
|
|
620
|
-
return props.path;
|
|
621
|
-
},
|
|
622
|
-
get "builder-parent-id"() {
|
|
623
|
-
return props.parent;
|
|
624
|
-
},
|
|
625
|
-
get style() {
|
|
626
|
-
return props.styleProp;
|
|
627
|
-
},
|
|
628
|
-
onClick$: qwik.inlinedQrl((event) => {
|
|
606
|
+
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
629
607
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
630
608
|
return onClick$1(props2);
|
|
631
609
|
}, "RenderBlocks_component_div_onClick_RzhhZa265Yg", [
|
|
@@ -633,35 +611,44 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
|
|
|
633
611
|
props,
|
|
634
612
|
state
|
|
635
613
|
]),
|
|
636
|
-
onMouseEnter$: qwik.inlinedQrl((event) => {
|
|
614
|
+
onMouseEnter$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
637
615
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
638
616
|
return onMouseEnter(props2);
|
|
639
617
|
}, "RenderBlocks_component_div_onMouseEnter_nG7I7RYG3JQ", [
|
|
640
618
|
builderContext$1,
|
|
641
619
|
props,
|
|
642
620
|
state
|
|
643
|
-
])
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
}
|
|
664
|
-
|
|
621
|
+
])
|
|
622
|
+
}, {
|
|
623
|
+
"builder-path": qwik._fnSignal((p0) => p0.path, [
|
|
624
|
+
props
|
|
625
|
+
], "p0.path"),
|
|
626
|
+
"builder-parent-id": qwik._fnSignal((p0) => p0.parent, [
|
|
627
|
+
props
|
|
628
|
+
], "p0.parent"),
|
|
629
|
+
style: qwik._fnSignal((p0) => p0.styleProp, [
|
|
630
|
+
props
|
|
631
|
+
], "p0.styleProp")
|
|
632
|
+
}, [
|
|
633
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
634
|
+
return /* @__PURE__ */ qwik._jsxC(RenderBlock, {
|
|
635
|
+
block,
|
|
636
|
+
context: builderContext$1,
|
|
637
|
+
[qwik._IMMUTABLE]: {
|
|
638
|
+
context: qwik._IMMUTABLE
|
|
639
|
+
}
|
|
640
|
+
}, 3, "render-block-" + block.id);
|
|
641
|
+
}) : null,
|
|
642
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
643
|
+
return /* @__PURE__ */ qwik._jsxC(BlockStyles, {
|
|
644
|
+
block,
|
|
645
|
+
context: builderContext$1,
|
|
646
|
+
[qwik._IMMUTABLE]: {
|
|
647
|
+
context: qwik._IMMUTABLE
|
|
648
|
+
}
|
|
649
|
+
}, 3, "block-style-" + block.id);
|
|
650
|
+
}) : null
|
|
651
|
+
], 0, "9R_0");
|
|
665
652
|
}, "RenderBlocks_component_MYUZ0j1uLsw"));
|
|
666
653
|
const STYLES$2 = `
|
|
667
654
|
.div-RenderBlocks {
|
|
@@ -696,25 +683,23 @@ const columnCssVars = function columnCssVars2(props, state, builderContext2, ind
|
|
|
696
683
|
index === 0 ? 0 : state.gutterSize;
|
|
697
684
|
const width = getColumnCssWidth(props, state, builderContext2, index);
|
|
698
685
|
const gutterPixels = `${state.gutterSize}px`;
|
|
699
|
-
const mobileWidth = "100%";
|
|
700
|
-
const mobileMarginLeft = 0;
|
|
701
686
|
return {
|
|
702
687
|
width,
|
|
703
688
|
"margin-left": gutterPixels,
|
|
704
689
|
"--column-width-mobile": getMobileStyle(props, state, builderContext2, {
|
|
705
|
-
stackedStyle:
|
|
690
|
+
stackedStyle: "100%",
|
|
706
691
|
desktopStyle: width
|
|
707
692
|
}),
|
|
708
693
|
"--column-margin-left-mobile": getMobileStyle(props, state, builderContext2, {
|
|
709
|
-
stackedStyle:
|
|
694
|
+
stackedStyle: 0,
|
|
710
695
|
desktopStyle: gutterPixels
|
|
711
696
|
}),
|
|
712
697
|
"--column-width-tablet": getTabletStyle(props, state, builderContext2, {
|
|
713
|
-
stackedStyle:
|
|
698
|
+
stackedStyle: "100%",
|
|
714
699
|
desktopStyle: width
|
|
715
700
|
}),
|
|
716
701
|
"--column-margin-left-tablet": getTabletStyle(props, state, builderContext2, {
|
|
717
|
-
stackedStyle:
|
|
702
|
+
stackedStyle: 0,
|
|
718
703
|
desktopStyle: gutterPixels
|
|
719
704
|
})
|
|
720
705
|
};
|
|
@@ -750,8 +735,9 @@ const columnsStyles = function columnsStyles2(props, state, builderContext2) {
|
|
|
750
735
|
},
|
|
751
736
|
`;
|
|
752
737
|
};
|
|
753
|
-
const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
754
|
-
qwik.
|
|
738
|
+
const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
739
|
+
qwik._jsxBranch();
|
|
740
|
+
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
|
|
755
741
|
const builderContext$1 = qwik.useContext(builderContext);
|
|
756
742
|
const state = qwik.useStore({
|
|
757
743
|
cols: props.columns || [],
|
|
@@ -759,40 +745,41 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
759
745
|
gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
|
|
760
746
|
stackAt: props.stackColumnsAt || "tablet"
|
|
761
747
|
});
|
|
762
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
748
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
749
|
+
style: columnsCssVars(props, state, builderContext$1)
|
|
750
|
+
}, {
|
|
751
|
+
class: qwik._fnSignal((p0) => `builder-columns ${p0.builderBlock.id}-breakpoints div-Columns`, [
|
|
752
|
+
props
|
|
753
|
+
], '`builder-columns ${p0.builderBlock.id}-breakpoints`+" div-Columns"')
|
|
754
|
+
}, [
|
|
755
|
+
/* @__PURE__ */ qwik._jsxC(RenderInlinedStyles, {
|
|
756
|
+
styles: columnsStyles(props, state, builderContext$1)
|
|
757
|
+
}, 3, "c0_0"),
|
|
758
|
+
(props.columns || []).map(function(column, index) {
|
|
759
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
760
|
+
style: columnCssVars(props, state, builderContext$1, index)
|
|
761
|
+
}, {
|
|
762
|
+
class: "builder-column div-Columns-2"
|
|
763
|
+
}, /* @__PURE__ */ qwik._jsxC(RenderBlocks, {
|
|
764
|
+
get blocks() {
|
|
765
|
+
return column.blocks;
|
|
766
|
+
},
|
|
767
|
+
path: `component.options.columns.${index}.blocks`,
|
|
768
|
+
get parent() {
|
|
769
|
+
return props.builderBlock.id;
|
|
770
|
+
},
|
|
771
|
+
styleProp: {
|
|
772
|
+
flexGrow: "1"
|
|
773
|
+
},
|
|
774
|
+
[qwik._IMMUTABLE]: {
|
|
775
|
+
blocks: qwik._wrapProp(column, "blocks"),
|
|
776
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
777
|
+
props
|
|
778
|
+
], "p0.builderBlock.id")
|
|
779
|
+
}
|
|
780
|
+
}, 3, "c0_1"), 1, index);
|
|
781
|
+
})
|
|
782
|
+
], 1, "c0_2");
|
|
796
783
|
}, "Columns_component_7yLj4bxdI6c"));
|
|
797
784
|
const STYLES$1 = `
|
|
798
785
|
.div-Columns {
|
|
@@ -805,10 +792,8 @@ const STYLES$1 = `
|
|
|
805
792
|
align-items: stretch;
|
|
806
793
|
}
|
|
807
794
|
`;
|
|
808
|
-
const FragmentComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
809
|
-
return /* @__PURE__ */
|
|
810
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {}, "oj_0")
|
|
811
|
-
});
|
|
795
|
+
const FragmentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
796
|
+
return /* @__PURE__ */ qwik._jsxQ("span", null, null, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "oj_0"), 1, "oj_1");
|
|
812
797
|
}, "FragmentComponent_component_T0AypnadAK0"));
|
|
813
798
|
function removeProtocol(path) {
|
|
814
799
|
return path.replace(/http(s)?:/, "");
|
|
@@ -866,17 +851,16 @@ function getSrcSet(url) {
|
|
|
866
851
|
}
|
|
867
852
|
const srcSetToUse = function srcSetToUse2(props, state) {
|
|
868
853
|
const imageToUse = props.image || props.src;
|
|
869
|
-
|
|
870
|
-
if (!url || !(url.match(/builder\.io/) || url.match(/cdn\.shopify\.com/)))
|
|
854
|
+
if (!imageToUse || !(imageToUse.match(/builder\.io/) || imageToUse.match(/cdn\.shopify\.com/)))
|
|
871
855
|
return props.srcset;
|
|
872
856
|
if (props.srcset && props.image?.includes("builder.io/api/v1/image")) {
|
|
873
857
|
if (!props.srcset.includes(props.image.split("?")[0])) {
|
|
874
858
|
console.debug("Removed given srcset");
|
|
875
|
-
return getSrcSet(
|
|
859
|
+
return getSrcSet(imageToUse);
|
|
876
860
|
}
|
|
877
861
|
} else if (props.image && !props.srcset)
|
|
878
|
-
return getSrcSet(
|
|
879
|
-
return getSrcSet(
|
|
862
|
+
return getSrcSet(imageToUse);
|
|
863
|
+
return getSrcSet(imageToUse);
|
|
880
864
|
};
|
|
881
865
|
const webpSrcSet = function webpSrcSet2(props, state) {
|
|
882
866
|
if (srcSetToUse(props)?.match(/builder\.io/) && !props.noWebp)
|
|
@@ -895,62 +879,57 @@ const aspectRatioCss = function aspectRatioCss2(props, state) {
|
|
|
895
879
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
896
880
|
return out;
|
|
897
881
|
};
|
|
898
|
-
const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
899
|
-
qwik.
|
|
900
|
-
|
|
882
|
+
const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
883
|
+
qwik._jsxBranch();
|
|
884
|
+
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES, "Image_component_useStylesScoped_fBMYiVf9fuU"));
|
|
885
|
+
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
901
886
|
children: [
|
|
902
|
-
/* @__PURE__ */
|
|
903
|
-
|
|
904
|
-
webpSrcSet(props)
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
children: false
|
|
936
|
-
}
|
|
937
|
-
}),
|
|
938
|
-
props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent) ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
887
|
+
/* @__PURE__ */ qwik._jsxQ("picture", null, null, [
|
|
888
|
+
webpSrcSet(props) ? /* @__PURE__ */ qwik._jsxQ("source", {
|
|
889
|
+
srcSet: webpSrcSet(props)
|
|
890
|
+
}, {
|
|
891
|
+
type: "image/webp"
|
|
892
|
+
}, null, 3, "0A_0") : null,
|
|
893
|
+
/* @__PURE__ */ qwik._jsxQ("img", {
|
|
894
|
+
style: {
|
|
895
|
+
objectPosition: props.backgroundPosition || "center",
|
|
896
|
+
objectFit: props.backgroundSize || "cover",
|
|
897
|
+
...aspectRatioCss(props)
|
|
898
|
+
},
|
|
899
|
+
srcSet: srcSetToUse(props)
|
|
900
|
+
}, {
|
|
901
|
+
loading: "lazy",
|
|
902
|
+
alt: qwik._fnSignal((p0) => p0.altText, [
|
|
903
|
+
props
|
|
904
|
+
], "p0.altText"),
|
|
905
|
+
role: qwik._fnSignal((p0) => p0.altText ? "presentation" : void 0, [
|
|
906
|
+
props
|
|
907
|
+
], 'p0.altText?"presentation":undefined'),
|
|
908
|
+
class: qwik._fnSignal((p0) => "builder-image" + (p0.className ? " " + p0.className : "") + " img-Image", [
|
|
909
|
+
props
|
|
910
|
+
], '"builder-image"+(p0.className?" "+p0.className:"")+" img-Image"'),
|
|
911
|
+
src: qwik._fnSignal((p0) => p0.image, [
|
|
912
|
+
props
|
|
913
|
+
], "p0.image"),
|
|
914
|
+
sizes: qwik._fnSignal((p0) => p0.sizes, [
|
|
915
|
+
props
|
|
916
|
+
], "p0.sizes")
|
|
917
|
+
}, null, 3, null)
|
|
918
|
+
], 1, null),
|
|
919
|
+
props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent) ? /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
939
920
|
class: "builder-image-sizer div-Image",
|
|
940
|
-
style: {
|
|
941
|
-
paddingTop:
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
}
|
|
953
|
-
}, "0A_2");
|
|
921
|
+
style: qwik._fnSignal((p0) => ({
|
|
922
|
+
paddingTop: p0.aspectRatio * 100 + "%"
|
|
923
|
+
}), [
|
|
924
|
+
props
|
|
925
|
+
], '{paddingTop:p0.aspectRatio*100+"%"}')
|
|
926
|
+
}, null, 3, "0A_1") : null,
|
|
927
|
+
props.builderBlock?.children?.length && props.fitContent ? /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0A_2") : null,
|
|
928
|
+
!props.fitContent && props.children ? /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
929
|
+
class: "div-Image-2"
|
|
930
|
+
}, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0A_3"), 1, "0A_4") : null
|
|
931
|
+
]
|
|
932
|
+
}, 1, "0A_5");
|
|
954
933
|
}, "Image_component_LRxDkFa1EfU"));
|
|
955
934
|
const STYLES = `
|
|
956
935
|
.img-Image {
|
|
@@ -1287,7 +1266,6 @@ const componentInfo$7 = {
|
|
|
1287
1266
|
required: true,
|
|
1288
1267
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1289
1268
|
onChange: serializeFn((options) => {
|
|
1290
|
-
const DEFAULT_ASPECT_RATIO = 0.7041;
|
|
1291
1269
|
options.delete("srcset");
|
|
1292
1270
|
options.delete("noWebp");
|
|
1293
1271
|
function loadImage(url, timeout = 6e4) {
|
|
@@ -1318,10 +1296,10 @@ const componentInfo$7 = {
|
|
|
1318
1296
|
if (blob.type.includes("svg"))
|
|
1319
1297
|
options.set("noWebp", true);
|
|
1320
1298
|
});
|
|
1321
|
-
if (value && (!aspectRatio || aspectRatio ===
|
|
1299
|
+
if (value && (!aspectRatio || aspectRatio === 0.7041))
|
|
1322
1300
|
return loadImage(value).then((img) => {
|
|
1323
1301
|
const possiblyUpdatedAspectRatio = options.get("aspectRatio");
|
|
1324
|
-
if (options.get("image") === value && (!possiblyUpdatedAspectRatio || possiblyUpdatedAspectRatio ===
|
|
1302
|
+
if (options.get("image") === value && (!possiblyUpdatedAspectRatio || possiblyUpdatedAspectRatio === 0.7041)) {
|
|
1325
1303
|
if (img.width && img.height) {
|
|
1326
1304
|
options.set("aspectRatio", round2(img.height / img.width));
|
|
1327
1305
|
options.set("height", img.height);
|
|
@@ -1455,8 +1433,8 @@ const componentInfo$6 = {
|
|
|
1455
1433
|
}
|
|
1456
1434
|
]
|
|
1457
1435
|
};
|
|
1458
|
-
const SectionComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1459
|
-
return /* @__PURE__ */
|
|
1436
|
+
const SectionComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
1437
|
+
return /* @__PURE__ */ qwik._jsxQ("section", {
|
|
1460
1438
|
...props.attributes,
|
|
1461
1439
|
style: {
|
|
1462
1440
|
width: "100%",
|
|
@@ -1469,9 +1447,8 @@ const SectionComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((prop
|
|
|
1469
1447
|
alignItems: "stretch",
|
|
1470
1448
|
marginLeft: "auto",
|
|
1471
1449
|
marginRight: "auto"
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
});
|
|
1450
|
+
}
|
|
1451
|
+
}, null, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "2Y_0"), 0, "2Y_1");
|
|
1475
1452
|
}, "SectionComponent_component_ZWF9iD5WeLg"));
|
|
1476
1453
|
const componentInfo$5 = {
|
|
1477
1454
|
name: "Symbol",
|
|
@@ -1608,8 +1585,7 @@ const setCookie = async ({ name, value, expires, canTrack }) => {
|
|
|
1608
1585
|
console.warn("[COOKIE] SET error: ", err);
|
|
1609
1586
|
}
|
|
1610
1587
|
};
|
|
1611
|
-
const
|
|
1612
|
-
const getContentTestKey = (id) => `${BUILDER_STORE_PREFIX}.${id}`;
|
|
1588
|
+
const getContentTestKey = (id) => `${"builderio.variations"}.${id}`;
|
|
1613
1589
|
const getContentVariationCookie = ({ contentId, canTrack }) => getCookie({
|
|
1614
1590
|
name: getContentTestKey(contentId),
|
|
1615
1591
|
canTrack
|
|
@@ -1623,11 +1599,11 @@ const checkIsBuilderContentWithVariations = (item) => checkIsDefined(item.id) &&
|
|
|
1623
1599
|
const getRandomVariationId = ({ id, variations }) => {
|
|
1624
1600
|
let n = 0;
|
|
1625
1601
|
const random = Math.random();
|
|
1626
|
-
for (const
|
|
1627
|
-
const testRatio = variations[
|
|
1602
|
+
for (const id2 in variations) {
|
|
1603
|
+
const testRatio = variations[id2]?.testRatio;
|
|
1628
1604
|
n += testRatio;
|
|
1629
1605
|
if (random < n)
|
|
1630
|
-
return
|
|
1606
|
+
return id2;
|
|
1631
1607
|
}
|
|
1632
1608
|
return id;
|
|
1633
1609
|
};
|
|
@@ -1704,8 +1680,6 @@ function flatten(object, path = null, separator = ".") {
|
|
|
1704
1680
|
};
|
|
1705
1681
|
}, {});
|
|
1706
1682
|
}
|
|
1707
|
-
const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
|
|
1708
|
-
const BUILDER_OPTIONS_PREFIX = "options.";
|
|
1709
1683
|
const convertSearchParamsToQueryObject = (searchParams) => {
|
|
1710
1684
|
const options = {};
|
|
1711
1685
|
searchParams.forEach((value, key) => {
|
|
@@ -1719,8 +1693,8 @@ const getBuilderSearchParams = (_options) => {
|
|
|
1719
1693
|
const options = normalizeSearchParams(_options);
|
|
1720
1694
|
const newOptions = {};
|
|
1721
1695
|
Object.keys(options).forEach((key) => {
|
|
1722
|
-
if (key.startsWith(
|
|
1723
|
-
const trimmedKey = key.replace(
|
|
1696
|
+
if (key.startsWith("builder.")) {
|
|
1697
|
+
const trimmedKey = key.replace("builder.", "").replace("options.", "");
|
|
1724
1698
|
newOptions[trimmedKey] = options[key];
|
|
1725
1699
|
}
|
|
1726
1700
|
});
|
|
@@ -1733,8 +1707,9 @@ const getBuilderSearchParamsFromWindow = () => {
|
|
|
1733
1707
|
return getBuilderSearchParams(searchParams);
|
|
1734
1708
|
};
|
|
1735
1709
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
1710
|
+
const DEFAULT_API_VERSION = "v3";
|
|
1736
1711
|
const generateContentUrl = (options) => {
|
|
1737
|
-
const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, includeRefs = true, locale, apiVersion =
|
|
1712
|
+
const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, includeRefs = true, locale, apiVersion = DEFAULT_API_VERSION } = options;
|
|
1738
1713
|
if (!apiKey)
|
|
1739
1714
|
throw new Error("Missing API key");
|
|
1740
1715
|
if (![
|
|
@@ -1753,31 +1728,42 @@ const generateContentUrl = (options) => {
|
|
|
1753
1728
|
if (userAttributes)
|
|
1754
1729
|
url.searchParams.set("userAttributes", JSON.stringify(userAttributes));
|
|
1755
1730
|
if (query) {
|
|
1756
|
-
const
|
|
1731
|
+
const flattened2 = flatten({
|
|
1757
1732
|
query
|
|
1758
1733
|
});
|
|
1759
|
-
for (const
|
|
1760
|
-
url.searchParams.set(
|
|
1734
|
+
for (const key in flattened2)
|
|
1735
|
+
url.searchParams.set(key, JSON.stringify(flattened2[key]));
|
|
1761
1736
|
}
|
|
1762
1737
|
return url;
|
|
1763
1738
|
};
|
|
1764
1739
|
async function getContent(options) {
|
|
1765
|
-
|
|
1740
|
+
const allContent = await getAllContent({
|
|
1766
1741
|
...options,
|
|
1767
1742
|
limit: 1
|
|
1768
|
-
})
|
|
1743
|
+
});
|
|
1744
|
+
if ("results" in allContent)
|
|
1745
|
+
return allContent?.results[0] || null;
|
|
1746
|
+
return null;
|
|
1769
1747
|
}
|
|
1770
1748
|
async function getAllContent(options) {
|
|
1771
1749
|
const url = generateContentUrl(options);
|
|
1772
1750
|
const res = await fetch$1(url.href);
|
|
1773
1751
|
const content = await res.json();
|
|
1752
|
+
if ("status" in content && !("results" in content)) {
|
|
1753
|
+
console.error("[Builder.io]: Error fetching data. ", content, options);
|
|
1754
|
+
return content;
|
|
1755
|
+
}
|
|
1774
1756
|
const canTrack = options.canTrack !== false;
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1757
|
+
try {
|
|
1758
|
+
if (canTrack && Array.isArray(content.results))
|
|
1759
|
+
for (const item of content.results)
|
|
1760
|
+
await handleABTesting({
|
|
1761
|
+
item,
|
|
1762
|
+
canTrack
|
|
1763
|
+
});
|
|
1764
|
+
} catch (e) {
|
|
1765
|
+
console.error("[Builder.io]: Could not setup A/B testing. ", e);
|
|
1766
|
+
}
|
|
1781
1767
|
return content;
|
|
1782
1768
|
}
|
|
1783
1769
|
const fetchContent = function fetchContent2(props, state, builderContext2) {
|
|
@@ -1796,7 +1782,7 @@ const fetchContent = function fetchContent2(props, state, builderContext2) {
|
|
|
1796
1782
|
console.error("[Builder.io]: Could not fetch symbol content: ", err);
|
|
1797
1783
|
});
|
|
1798
1784
|
};
|
|
1799
|
-
const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1785
|
+
const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
1800
1786
|
const builderContext$1 = qwik.useContext(builderContext);
|
|
1801
1787
|
const state = qwik.useStore({
|
|
1802
1788
|
className: [
|
|
@@ -1809,15 +1795,15 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
1809
1795
|
].filter(Boolean).join(" "),
|
|
1810
1796
|
contentToUse: props.symbol?.content
|
|
1811
1797
|
});
|
|
1812
|
-
qwik.
|
|
1798
|
+
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
1813
1799
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
1814
1800
|
fetchContent(props2, state2, builderContext2);
|
|
1815
|
-
}, "
|
|
1801
|
+
}, "Symbol_component_useVisibleTask_oMPs8W5ZhwE", [
|
|
1816
1802
|
builderContext$1,
|
|
1817
1803
|
props,
|
|
1818
1804
|
state
|
|
1819
1805
|
]));
|
|
1820
|
-
qwik.useTaskQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
1806
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
1821
1807
|
const [builderContext2, props2, state2] = qwik.useLexicalScope();
|
|
1822
1808
|
track2(() => props2.symbol);
|
|
1823
1809
|
fetchContent(props2, state2, builderContext2);
|
|
@@ -1826,42 +1812,68 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
1826
1812
|
props,
|
|
1827
1813
|
state
|
|
1828
1814
|
]));
|
|
1829
|
-
return /* @__PURE__ */
|
|
1830
|
-
...props.attributes
|
|
1831
|
-
|
|
1832
|
-
|
|
1815
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
1816
|
+
...props.attributes
|
|
1817
|
+
}, {
|
|
1818
|
+
class: qwik._fnSignal((p0) => p0.className, [
|
|
1819
|
+
state
|
|
1820
|
+
], "p0.className")
|
|
1821
|
+
}, /* @__PURE__ */ qwik._jsxC(RenderContent, {
|
|
1822
|
+
get apiVersion() {
|
|
1823
|
+
return builderContext$1.apiVersion;
|
|
1833
1824
|
},
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
data: {
|
|
1825
|
+
get apiKey() {
|
|
1826
|
+
return builderContext$1.apiKey;
|
|
1827
|
+
},
|
|
1828
|
+
get context() {
|
|
1829
|
+
return builderContext$1.context;
|
|
1830
|
+
},
|
|
1831
|
+
get customComponents() {
|
|
1832
|
+
return Object.values(builderContext$1.registeredComponents);
|
|
1833
|
+
},
|
|
1834
|
+
get data() {
|
|
1835
|
+
return {
|
|
1846
1836
|
...props.symbol?.data,
|
|
1847
1837
|
...builderContext$1.state,
|
|
1848
1838
|
...state.contentToUse?.data?.state
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
context: qwik._wrapSignal(builderContext$1, "context"),
|
|
1858
|
-
content: qwik._wrapSignal(state, "contentToUse")
|
|
1859
|
-
}
|
|
1860
|
-
}, "Wt_0"),
|
|
1839
|
+
};
|
|
1840
|
+
},
|
|
1841
|
+
get model() {
|
|
1842
|
+
return props.symbol?.model;
|
|
1843
|
+
},
|
|
1844
|
+
get content() {
|
|
1845
|
+
return state.contentToUse;
|
|
1846
|
+
},
|
|
1861
1847
|
[qwik._IMMUTABLE]: {
|
|
1862
|
-
|
|
1848
|
+
apiVersion: qwik._fnSignal((p0) => p0.apiVersion, [
|
|
1849
|
+
builderContext$1
|
|
1850
|
+
], "p0.apiVersion"),
|
|
1851
|
+
apiKey: qwik._fnSignal((p0) => p0.apiKey, [
|
|
1852
|
+
builderContext$1
|
|
1853
|
+
], "p0.apiKey"),
|
|
1854
|
+
context: qwik._fnSignal((p0) => p0.context, [
|
|
1855
|
+
builderContext$1
|
|
1856
|
+
], "p0.context"),
|
|
1857
|
+
customComponents: qwik._fnSignal((p0) => Object.values(p0.registeredComponents), [
|
|
1858
|
+
builderContext$1
|
|
1859
|
+
], "Object.values(p0.registeredComponents)"),
|
|
1860
|
+
data: qwik._fnSignal((p0, p1, p2) => ({
|
|
1861
|
+
...p1.symbol?.data,
|
|
1862
|
+
...p0.state,
|
|
1863
|
+
...p2.contentToUse?.data?.state
|
|
1864
|
+
}), [
|
|
1865
|
+
builderContext$1,
|
|
1866
|
+
props,
|
|
1867
|
+
state
|
|
1868
|
+
], "{...p1.symbol?.data,...p0.state,...p2.contentToUse?.data?.state}"),
|
|
1869
|
+
model: qwik._fnSignal((p0) => p0.symbol?.model, [
|
|
1870
|
+
props
|
|
1871
|
+
], "p0.symbol?.model"),
|
|
1872
|
+
content: qwik._fnSignal((p0) => p0.contentToUse, [
|
|
1873
|
+
state
|
|
1874
|
+
], "p0.contentToUse")
|
|
1863
1875
|
}
|
|
1864
|
-
});
|
|
1876
|
+
}, 3, "Wt_0"), 0, "Wt_1");
|
|
1865
1877
|
}, "Symbol_component_WVvggdkUPdk"));
|
|
1866
1878
|
const componentInfo$4 = {
|
|
1867
1879
|
name: "Text",
|
|
@@ -1883,19 +1895,17 @@ const componentInfo$4 = {
|
|
|
1883
1895
|
textAlign: "center"
|
|
1884
1896
|
}
|
|
1885
1897
|
};
|
|
1886
|
-
const Text = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
1887
|
-
return /* @__PURE__ */
|
|
1888
|
-
class: "builder-text",
|
|
1889
|
-
get dangerouslySetInnerHTML() {
|
|
1890
|
-
return props.text;
|
|
1891
|
-
},
|
|
1898
|
+
const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
1899
|
+
return /* @__PURE__ */ qwik._jsxQ("span", {
|
|
1892
1900
|
style: {
|
|
1893
1901
|
outline: "none"
|
|
1894
|
-
},
|
|
1895
|
-
[qwik._IMMUTABLE]: {
|
|
1896
|
-
dangerouslySetInnerHTML: qwik._wrapSignal(props, "text")
|
|
1897
1902
|
}
|
|
1898
|
-
}
|
|
1903
|
+
}, {
|
|
1904
|
+
class: "builder-text",
|
|
1905
|
+
dangerouslySetInnerHTML: qwik._fnSignal((p0) => p0.text, [
|
|
1906
|
+
props
|
|
1907
|
+
], "p0.text")
|
|
1908
|
+
}, null, 3, "yO_0");
|
|
1899
1909
|
}, "Text_component_15p0cKUxgIE"));
|
|
1900
1910
|
const componentInfo$3 = {
|
|
1901
1911
|
name: "Video",
|
|
@@ -2034,25 +2044,27 @@ const spreadProps = function spreadProps2(props, state) {
|
|
|
2034
2044
|
...videoProps(props)
|
|
2035
2045
|
};
|
|
2036
2046
|
};
|
|
2037
|
-
const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2038
|
-
return /* @__PURE__ */
|
|
2039
|
-
...spreadProps(props)
|
|
2040
|
-
|
|
2047
|
+
const Video = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2048
|
+
return /* @__PURE__ */ qwik._jsxQ("video", {
|
|
2049
|
+
...spreadProps(props)
|
|
2050
|
+
}, {
|
|
2051
|
+
style: qwik._fnSignal((p0) => ({
|
|
2041
2052
|
width: "100%",
|
|
2042
2053
|
height: "100%",
|
|
2043
|
-
...
|
|
2044
|
-
objectFit:
|
|
2045
|
-
objectPosition:
|
|
2054
|
+
...p0.attributes?.style,
|
|
2055
|
+
objectFit: p0.fit,
|
|
2056
|
+
objectPosition: p0.position,
|
|
2046
2057
|
borderRadius: 1
|
|
2047
|
-
},
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2058
|
+
}), [
|
|
2059
|
+
props
|
|
2060
|
+
], '{width:"100%",height:"100%",...p0.attributes?.style,objectFit:p0.fit,objectPosition:p0.position,borderRadius:1}'),
|
|
2061
|
+
src: qwik._fnSignal((p0) => p0.video || "no-src", [
|
|
2062
|
+
props
|
|
2063
|
+
], 'p0.video||"no-src"'),
|
|
2064
|
+
poster: qwik._fnSignal((p0) => p0.posterImage, [
|
|
2065
|
+
props
|
|
2066
|
+
], "p0.posterImage")
|
|
2067
|
+
}, null, 2, "j7_0");
|
|
2056
2068
|
}, "Video_component_qdcTZflYyoQ"));
|
|
2057
2069
|
const componentInfo$2 = {
|
|
2058
2070
|
name: "Embed",
|
|
@@ -2068,8 +2080,7 @@ const componentInfo$2 = {
|
|
|
2068
2080
|
const url = options.get("url");
|
|
2069
2081
|
if (url) {
|
|
2070
2082
|
options.set("content", "Loading...");
|
|
2071
|
-
|
|
2072
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then((res) => res.json()).then((data) => {
|
|
2083
|
+
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${"ae0e60e78201a3f2b0de4b"}`).then((res) => res.json()).then((data) => {
|
|
2073
2084
|
if (options.get("url") === url) {
|
|
2074
2085
|
if (data.html)
|
|
2075
2086
|
options.set("content", data.html);
|
|
@@ -2098,9 +2109,9 @@ const SCRIPT_MIME_TYPES = [
|
|
|
2098
2109
|
];
|
|
2099
2110
|
const isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
2100
2111
|
const findAndRunScripts$1 = function findAndRunScripts2(props, state, elem) {
|
|
2101
|
-
if (!elem || !elem.getElementsByTagName)
|
|
2112
|
+
if (!elem.value || !elem.value.getElementsByTagName)
|
|
2102
2113
|
return;
|
|
2103
|
-
const scripts = elem.getElementsByTagName("script");
|
|
2114
|
+
const scripts = elem.value.getElementsByTagName("script");
|
|
2104
2115
|
for (let i = 0; i < scripts.length; i++) {
|
|
2105
2116
|
const script = scripts[i];
|
|
2106
2117
|
if (script.src && !state.scriptsInserted.includes(script.src)) {
|
|
@@ -2118,18 +2129,18 @@ const findAndRunScripts$1 = function findAndRunScripts2(props, state, elem) {
|
|
|
2118
2129
|
}
|
|
2119
2130
|
}
|
|
2120
2131
|
};
|
|
2121
|
-
const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2122
|
-
const elem = qwik.
|
|
2132
|
+
const Embed = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2133
|
+
const elem = qwik.useSignal();
|
|
2123
2134
|
const state = qwik.useStore({
|
|
2124
2135
|
ranInitFn: false,
|
|
2125
2136
|
scriptsInserted: [],
|
|
2126
2137
|
scriptsRun: []
|
|
2127
2138
|
});
|
|
2128
|
-
qwik.useTaskQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
2139
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
2129
2140
|
const [elem2, props2, state2] = qwik.useLexicalScope();
|
|
2130
|
-
track2(() => elem2);
|
|
2141
|
+
track2(() => elem2.value);
|
|
2131
2142
|
track2(() => state2.ranInitFn);
|
|
2132
|
-
if (elem2 && !state2.ranInitFn) {
|
|
2143
|
+
if (elem2.value && !state2.ranInitFn) {
|
|
2133
2144
|
state2.ranInitFn = true;
|
|
2134
2145
|
findAndRunScripts$1(props2, state2, elem2);
|
|
2135
2146
|
}
|
|
@@ -2138,32 +2149,32 @@ const Embed = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
|
2138
2149
|
props,
|
|
2139
2150
|
state
|
|
2140
2151
|
]));
|
|
2141
|
-
return /* @__PURE__ */
|
|
2152
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
2153
|
+
ref: elem
|
|
2154
|
+
}, {
|
|
2142
2155
|
class: "builder-embed",
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
[qwik._IMMUTABLE]: {
|
|
2148
|
-
dangerouslySetInnerHTML: qwik._wrapSignal(props, "content")
|
|
2149
|
-
}
|
|
2150
|
-
});
|
|
2156
|
+
dangerouslySetInnerHTML: qwik._fnSignal((p0) => p0.content, [
|
|
2157
|
+
props
|
|
2158
|
+
], "p0.content")
|
|
2159
|
+
}, null, 3, "9r_0");
|
|
2151
2160
|
}, "Embed_component_Uji08ORjXbE"));
|
|
2152
|
-
const ImgComponent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2153
|
-
return /* @__PURE__ */
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2161
|
+
const ImgComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2162
|
+
return /* @__PURE__ */ qwik._jsxQ("img", {
|
|
2163
|
+
...props.attributes
|
|
2164
|
+
}, {
|
|
2165
|
+
style: qwik._fnSignal((p0) => ({
|
|
2166
|
+
objectFit: p0.backgroundSize || "cover",
|
|
2167
|
+
objectPosition: p0.backgroundPosition || "center"
|
|
2168
|
+
}), [
|
|
2169
|
+
props
|
|
2170
|
+
], '{objectFit:p0.backgroundSize||"cover",objectPosition:p0.backgroundPosition||"center"}'),
|
|
2171
|
+
alt: qwik._fnSignal((p0) => p0.altText, [
|
|
2172
|
+
props
|
|
2173
|
+
], "p0.altText"),
|
|
2174
|
+
src: qwik._fnSignal((p0) => p0.imgSrc || p0.image, [
|
|
2175
|
+
props
|
|
2176
|
+
], "p0.imgSrc||p0.image")
|
|
2177
|
+
}, null, 2, isEditing() && props.imgSrc || "default-key");
|
|
2167
2178
|
}, "ImgComponent_component_FXvIDBSffO8"));
|
|
2168
2179
|
const componentInfo$1 = {
|
|
2169
2180
|
name: "Raw:Img",
|
|
@@ -2187,8 +2198,8 @@ const componentInfo$1 = {
|
|
|
2187
2198
|
static: true
|
|
2188
2199
|
};
|
|
2189
2200
|
const findAndRunScripts = function findAndRunScripts22(props, state, elem) {
|
|
2190
|
-
if (elem && elem.getElementsByTagName && typeof window !== "undefined") {
|
|
2191
|
-
const scripts = elem.getElementsByTagName("script");
|
|
2201
|
+
if (elem.value && elem.value.getElementsByTagName && typeof window !== "undefined") {
|
|
2202
|
+
const scripts = elem.value.getElementsByTagName("script");
|
|
2192
2203
|
for (let i = 0; i < scripts.length; i++) {
|
|
2193
2204
|
const script = scripts[i];
|
|
2194
2205
|
if (script.src) {
|
|
@@ -2216,30 +2227,30 @@ const findAndRunScripts = function findAndRunScripts22(props, state, elem) {
|
|
|
2216
2227
|
}
|
|
2217
2228
|
}
|
|
2218
2229
|
};
|
|
2219
|
-
const CustomCode = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2220
|
-
const elem = qwik.
|
|
2230
|
+
const CustomCode = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2231
|
+
const elem = qwik.useSignal();
|
|
2221
2232
|
const state = qwik.useStore({
|
|
2222
2233
|
scriptsInserted: [],
|
|
2223
2234
|
scriptsRun: []
|
|
2224
2235
|
});
|
|
2225
|
-
qwik.
|
|
2236
|
+
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2226
2237
|
const [elem2, props2, state2] = qwik.useLexicalScope();
|
|
2227
2238
|
findAndRunScripts(props2, state2, elem2);
|
|
2228
|
-
}, "
|
|
2239
|
+
}, "CustomCode_component_useVisibleTask_S5QgEQZj6YE", [
|
|
2229
2240
|
elem,
|
|
2230
2241
|
props,
|
|
2231
2242
|
state
|
|
2232
2243
|
]));
|
|
2233
|
-
return /* @__PURE__ */
|
|
2234
|
-
ref: elem
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
});
|
|
2244
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
2245
|
+
ref: elem
|
|
2246
|
+
}, {
|
|
2247
|
+
class: qwik._fnSignal((p0) => "builder-custom-code" + (p0.replaceNodes ? " replace-nodes" : ""), [
|
|
2248
|
+
props
|
|
2249
|
+
], '"builder-custom-code"+(p0.replaceNodes?" replace-nodes":"")'),
|
|
2250
|
+
dangerouslySetInnerHTML: qwik._fnSignal((p0) => p0.code, [
|
|
2251
|
+
props
|
|
2252
|
+
], "p0.code")
|
|
2253
|
+
}, null, 3, "bY_0");
|
|
2243
2254
|
}, "CustomCode_component_uYOSy7w7Zqw"));
|
|
2244
2255
|
const componentInfo = {
|
|
2245
2256
|
name: "Custom Code",
|
|
@@ -2353,12 +2364,11 @@ function uuidv4() {
|
|
|
2353
2364
|
function uuid() {
|
|
2354
2365
|
return uuidv4().replace(/-/g, "");
|
|
2355
2366
|
}
|
|
2356
|
-
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
2357
2367
|
const getSessionId = async ({ canTrack }) => {
|
|
2358
2368
|
if (!canTrack)
|
|
2359
2369
|
return void 0;
|
|
2360
2370
|
const sessionId = await getCookie({
|
|
2361
|
-
name:
|
|
2371
|
+
name: "builderSessionId",
|
|
2362
2372
|
canTrack
|
|
2363
2373
|
});
|
|
2364
2374
|
if (checkIsDefined(sessionId))
|
|
@@ -2374,7 +2384,7 @@ const getSessionId = async ({ canTrack }) => {
|
|
|
2374
2384
|
};
|
|
2375
2385
|
const createSessionId = () => uuid();
|
|
2376
2386
|
const setSessionId = ({ id, canTrack }) => setCookie({
|
|
2377
|
-
name:
|
|
2387
|
+
name: "builderSessionId",
|
|
2378
2388
|
value: id,
|
|
2379
2389
|
canTrack
|
|
2380
2390
|
});
|
|
@@ -2397,12 +2407,11 @@ const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
|
2397
2407
|
console.debug("[LocalStorage] SET error: ", err);
|
|
2398
2408
|
}
|
|
2399
2409
|
};
|
|
2400
|
-
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
2401
2410
|
const getVisitorId = ({ canTrack }) => {
|
|
2402
2411
|
if (!canTrack)
|
|
2403
2412
|
return void 0;
|
|
2404
2413
|
const visitorId = getLocalStorageItem({
|
|
2405
|
-
key:
|
|
2414
|
+
key: "builderVisitorId",
|
|
2406
2415
|
canTrack
|
|
2407
2416
|
});
|
|
2408
2417
|
if (checkIsDefined(visitorId))
|
|
@@ -2418,7 +2427,7 @@ const getVisitorId = ({ canTrack }) => {
|
|
|
2418
2427
|
};
|
|
2419
2428
|
const createVisitorId = () => uuid();
|
|
2420
2429
|
const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
|
|
2421
|
-
key:
|
|
2430
|
+
key: "builderVisitorId",
|
|
2422
2431
|
value: id,
|
|
2423
2432
|
canTrack
|
|
2424
2433
|
});
|
|
@@ -2744,7 +2753,7 @@ const getCss = ({ cssCode, contentId }) => {
|
|
|
2744
2753
|
return cssCode;
|
|
2745
2754
|
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
2746
2755
|
};
|
|
2747
|
-
const RenderContentStyles = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2756
|
+
const RenderContentStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2748
2757
|
const state = qwik.useStore({
|
|
2749
2758
|
injectedStyles: `
|
|
2750
2759
|
${getCss({
|
|
@@ -2769,14 +2778,16 @@ ${getFontCss({
|
|
|
2769
2778
|
}
|
|
2770
2779
|
`
|
|
2771
2780
|
});
|
|
2772
|
-
return /* @__PURE__ */
|
|
2781
|
+
return /* @__PURE__ */ qwik._jsxC(RenderInlinedStyles, {
|
|
2773
2782
|
get styles() {
|
|
2774
2783
|
return state.injectedStyles;
|
|
2775
2784
|
},
|
|
2776
2785
|
[qwik._IMMUTABLE]: {
|
|
2777
|
-
styles: qwik.
|
|
2786
|
+
styles: qwik._fnSignal((p0) => p0.injectedStyles, [
|
|
2787
|
+
state
|
|
2788
|
+
], "p0.injectedStyles")
|
|
2778
2789
|
}
|
|
2779
|
-
}, "V0_0");
|
|
2790
|
+
}, 3, "V0_0");
|
|
2780
2791
|
}, "RenderContentStyles_component_Og0xL34Zbvc"));
|
|
2781
2792
|
const getContextStateInitialValue = ({ content, data, locale }) => {
|
|
2782
2793
|
const defaultValues = {};
|
|
@@ -2848,9 +2859,9 @@ const processMessage = function processMessage2(props, state, elementRef, event)
|
|
|
2848
2859
|
break;
|
|
2849
2860
|
}
|
|
2850
2861
|
case "builder.contentUpdate": {
|
|
2851
|
-
const
|
|
2852
|
-
const key =
|
|
2853
|
-
const contentData =
|
|
2862
|
+
const messageContent = data.data;
|
|
2863
|
+
const key = messageContent.key || messageContent.alias || messageContent.entry || messageContent.modelName;
|
|
2864
|
+
const contentData = messageContent.data;
|
|
2854
2865
|
if (key === props.model) {
|
|
2855
2866
|
mergeNewContent(props, state, elementRef, contentData);
|
|
2856
2867
|
state.forceReRenderCount = state.forceReRenderCount + 1;
|
|
@@ -2900,7 +2911,7 @@ const handleRequest = function handleRequest2(props, state, elementRef, { url, k
|
|
|
2900
2911
|
};
|
|
2901
2912
|
setContextState(props, state, elementRef, newState);
|
|
2902
2913
|
}).catch((err) => {
|
|
2903
|
-
console.
|
|
2914
|
+
console.error("error fetching dynamic data", url, err);
|
|
2904
2915
|
});
|
|
2905
2916
|
};
|
|
2906
2917
|
const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
@@ -2926,8 +2937,9 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
|
2926
2937
|
}
|
|
2927
2938
|
}));
|
|
2928
2939
|
};
|
|
2929
|
-
const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
|
|
2930
|
-
|
|
2940
|
+
const RenderContent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2941
|
+
qwik._jsxBranch();
|
|
2942
|
+
const elementRef = qwik.useSignal();
|
|
2931
2943
|
const state = qwik.useStore({
|
|
2932
2944
|
allRegisteredComponents: [
|
|
2933
2945
|
...getDefaultRegisteredComponents(),
|
|
@@ -2961,7 +2973,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
2961
2973
|
apiVersion: props.apiVersion,
|
|
2962
2974
|
registeredComponents: state.allRegisteredComponents
|
|
2963
2975
|
}));
|
|
2964
|
-
qwik.
|
|
2976
|
+
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2965
2977
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
2966
2978
|
if (!props2.apiKey)
|
|
2967
2979
|
console.error("[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
@@ -3013,12 +3025,12 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
3013
3025
|
runHttpRequests(props2, state2, elementRef2);
|
|
3014
3026
|
emitStateUpdate(props2, state2);
|
|
3015
3027
|
}
|
|
3016
|
-
}, "
|
|
3028
|
+
}, "RenderContent_component_useVisibleTask_n50dgqWW6pY", [
|
|
3017
3029
|
elementRef,
|
|
3018
3030
|
props,
|
|
3019
3031
|
state
|
|
3020
3032
|
]));
|
|
3021
|
-
qwik.useTaskQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
3033
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
3022
3034
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
3023
3035
|
track2(() => props2.content);
|
|
3024
3036
|
if (props2.content)
|
|
@@ -3028,7 +3040,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
3028
3040
|
props,
|
|
3029
3041
|
state
|
|
3030
3042
|
]));
|
|
3031
|
-
qwik.useTaskQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
3043
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
3032
3044
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
3033
3045
|
track2(() => state2.useContent?.data?.jsCode);
|
|
3034
3046
|
track2(() => state2.contentState);
|
|
@@ -3038,7 +3050,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
3038
3050
|
props,
|
|
3039
3051
|
state
|
|
3040
3052
|
]));
|
|
3041
|
-
qwik.useTaskQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
3053
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
3042
3054
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
3043
3055
|
track2(() => state2.useContent?.data?.httpRequests);
|
|
3044
3056
|
runHttpRequests(props2, state2, elementRef2);
|
|
@@ -3047,7 +3059,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
3047
3059
|
props,
|
|
3048
3060
|
state
|
|
3049
3061
|
]));
|
|
3050
|
-
qwik.useTaskQrl(qwik.inlinedQrl(({ track: track2 }) => {
|
|
3062
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
3051
3063
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
3052
3064
|
track2(() => state2.contentState);
|
|
3053
3065
|
emitStateUpdate(props2, state2);
|
|
@@ -3056,53 +3068,60 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
|
|
|
3056
3068
|
props,
|
|
3057
3069
|
state
|
|
3058
3070
|
]));
|
|
3059
|
-
qwik.
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
3071
|
-
children: state.useContent ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
3072
|
-
ref: elementRef,
|
|
3073
|
-
onClick$: qwik.inlinedQrl((event) => {
|
|
3071
|
+
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
3072
|
+
children: state.useContent ? /* @__PURE__ */ qwik._jsxQ("div", {
|
|
3073
|
+
ref: elementRef
|
|
3074
|
+
}, {
|
|
3075
|
+
"builder-content-id": qwik._fnSignal((p0) => p0.useContent?.id, [
|
|
3076
|
+
state
|
|
3077
|
+
], "p0.useContent?.id"),
|
|
3078
|
+
"builder-model": qwik._fnSignal((p0) => p0.model, [
|
|
3079
|
+
props
|
|
3080
|
+
], "p0.model"),
|
|
3081
|
+
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
3074
3082
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
3075
3083
|
return onClick(props2, state2, elementRef2, event);
|
|
3076
3084
|
}, "RenderContent_component__Fragment_div_onClick_wLg5o3ZkpC0", [
|
|
3077
3085
|
elementRef,
|
|
3078
3086
|
props,
|
|
3079
3087
|
state
|
|
3080
|
-
])
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3088
|
+
])
|
|
3089
|
+
}, [
|
|
3090
|
+
/* @__PURE__ */ qwik._jsxC(RenderContentStyles, {
|
|
3091
|
+
get contentId() {
|
|
3092
|
+
return state.useContent?.id;
|
|
3093
|
+
},
|
|
3094
|
+
get cssCode() {
|
|
3095
|
+
return state.useContent?.data?.cssCode;
|
|
3096
|
+
},
|
|
3097
|
+
get customFonts() {
|
|
3098
|
+
return state.useContent?.data?.customFonts;
|
|
3099
|
+
},
|
|
3100
|
+
[qwik._IMMUTABLE]: {
|
|
3101
|
+
contentId: qwik._fnSignal((p0) => p0.useContent?.id, [
|
|
3102
|
+
state
|
|
3103
|
+
], "p0.useContent?.id"),
|
|
3104
|
+
cssCode: qwik._fnSignal((p0) => p0.useContent?.data?.cssCode, [
|
|
3105
|
+
state
|
|
3106
|
+
], "p0.useContent?.data?.cssCode"),
|
|
3107
|
+
customFonts: qwik._fnSignal((p0) => p0.useContent?.data?.customFonts, [
|
|
3108
|
+
state
|
|
3109
|
+
], "p0.useContent?.data?.customFonts")
|
|
3110
|
+
}
|
|
3111
|
+
}, 3, "03_0"),
|
|
3112
|
+
/* @__PURE__ */ qwik._jsxC(RenderBlocks, {
|
|
3113
|
+
get blocks() {
|
|
3114
|
+
return state.useContent?.data?.blocks;
|
|
3115
|
+
},
|
|
3116
|
+
[qwik._IMMUTABLE]: {
|
|
3117
|
+
blocks: qwik._fnSignal((p0) => p0.useContent?.data?.blocks, [
|
|
3118
|
+
state
|
|
3119
|
+
], "p0.useContent?.data?.blocks")
|
|
3120
|
+
}
|
|
3121
|
+
}, 3, state.forceReRenderCount)
|
|
3122
|
+
], 1, "03_1") : null
|
|
3123
|
+
}, 1, "03_2");
|
|
3104
3124
|
}, "RenderContent_component_hEAI0ahViXM"));
|
|
3105
|
-
const RenderContent$1 = RenderContent;
|
|
3106
3125
|
const settings = {};
|
|
3107
3126
|
function setEditorSettings(newSettings) {
|
|
3108
3127
|
if (isBrowser()) {
|
|
@@ -3119,7 +3138,7 @@ exports.Columns = Columns;
|
|
|
3119
3138
|
exports.Fragment = FragmentComponent;
|
|
3120
3139
|
exports.Image = Image;
|
|
3121
3140
|
exports.RenderBlocks = RenderBlocks;
|
|
3122
|
-
exports.RenderContent = RenderContent
|
|
3141
|
+
exports.RenderContent = RenderContent;
|
|
3123
3142
|
exports.Section = SectionComponent;
|
|
3124
3143
|
exports.Symbol = Symbol$1;
|
|
3125
3144
|
exports.Text = Text;
|