@builder.io/sdk-qwik 0.14.21 → 0.14.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.qwik.cjs +403 -38
- package/lib/browser/index.qwik.mjs +403 -38
- package/lib/edge/index.qwik.cjs +403 -38
- package/lib/edge/index.qwik.mjs +403 -38
- package/lib/node/index.qwik.cjs +403 -38
- package/lib/node/index.qwik.mjs +403 -38
- package/package.json +1 -1
- package/types/src/blocks/accordion/accordion.d.ts +6 -0
- package/types/src/blocks/accordion/accordion.types.d.ts +12 -0
- package/types/src/blocks/accordion/component-info.d.ts +2 -0
- package/types/src/blocks/accordion/helpers.d.ts +1 -0
- package/types/src/blocks/accordion/index.d.ts +1 -0
- package/types/src/blocks/tabs/tabs.d.ts +1 -1
- package/types/src/components/block/animator.d.ts +0 -1
- package/types/src/components/content-variants/content-variants.types.d.ts +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/camel-to-kebab-case.d.ts +1 -1
|
@@ -365,6 +365,7 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
365
365
|
else
|
|
366
366
|
return transformedBlock;
|
|
367
367
|
}
|
|
368
|
+
const camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
368
369
|
function throttle(func, wait, options = {}) {
|
|
369
370
|
let context;
|
|
370
371
|
let args;
|
|
@@ -411,7 +412,6 @@ function assign(target, ..._args) {
|
|
|
411
412
|
}
|
|
412
413
|
return to;
|
|
413
414
|
}
|
|
414
|
-
const camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
415
415
|
function bindAnimations(animations) {
|
|
416
416
|
for (const animation of animations)
|
|
417
417
|
switch (animation.trigger) {
|
|
@@ -462,7 +462,7 @@ function triggerAnimation(animation) {
|
|
|
462
462
|
element.style.transitionDelay = "0";
|
|
463
463
|
assign(element.style, animation.steps[0].styles);
|
|
464
464
|
setTimeout(() => {
|
|
465
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
465
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
466
466
|
if (animation.delay)
|
|
467
467
|
element.style.transitionDelay = animation.delay + "s";
|
|
468
468
|
assign(element.style, animation.steps[1].styles);
|
|
@@ -520,7 +520,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
520
520
|
}
|
|
521
521
|
attachDefaultState();
|
|
522
522
|
setTimeout(() => {
|
|
523
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
523
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
524
524
|
if (animation.delay)
|
|
525
525
|
element.style.transitionDelay = animation.delay + "s";
|
|
526
526
|
});
|
|
@@ -531,7 +531,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
531
531
|
immediateOnScroll();
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
|
-
const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
535
534
|
const convertStyleMapToCSSArray = (style) => {
|
|
536
535
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
537
536
|
if (typeof value === "string")
|
|
@@ -635,7 +634,8 @@ const shouldPassLinkComponent = (block) => {
|
|
|
635
634
|
"Symbol",
|
|
636
635
|
"Columns",
|
|
637
636
|
"Form:Form",
|
|
638
|
-
"Builder: Tabs"
|
|
637
|
+
"Builder: Tabs",
|
|
638
|
+
"Builder:Accordion"
|
|
639
639
|
].includes(block.name));
|
|
640
640
|
};
|
|
641
641
|
const shouldPassRegisteredComponents = (block) => {
|
|
@@ -643,7 +643,8 @@ const shouldPassRegisteredComponents = (block) => {
|
|
|
643
643
|
"Symbol",
|
|
644
644
|
"Columns",
|
|
645
645
|
"Form:Form",
|
|
646
|
-
"Builder: Tabs"
|
|
646
|
+
"Builder: Tabs",
|
|
647
|
+
"Builder:Accordion"
|
|
647
648
|
].includes(block.name));
|
|
648
649
|
};
|
|
649
650
|
const SIZES = {
|
|
@@ -761,7 +762,7 @@ const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
761
762
|
className: `${className}:hover`,
|
|
762
763
|
styles: {
|
|
763
764
|
...hoverStyles,
|
|
764
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
765
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
765
766
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
766
767
|
}
|
|
767
768
|
}) || "";
|
|
@@ -1352,7 +1353,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1352
1353
|
}, 1, "jN_4") : null
|
|
1353
1354
|
}, 1, "jN_5");
|
|
1354
1355
|
}, "Block_component_nnPv0RY0U0k"));
|
|
1355
|
-
const onClick$
|
|
1356
|
+
const onClick$3 = function onClick2(props, state, className) {
|
|
1356
1357
|
var _a, _b;
|
|
1357
1358
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
1358
1359
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
@@ -1399,7 +1400,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
1399
1400
|
},
|
|
1400
1401
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
1401
1402
|
const [className2, props2, state2] = useLexicalScope();
|
|
1402
|
-
return onClick$
|
|
1403
|
+
return onClick$3(props2);
|
|
1403
1404
|
}, "BlocksWrapper_component_onClick_ufezvOupQrM", [
|
|
1404
1405
|
className,
|
|
1405
1406
|
props,
|
|
@@ -1407,7 +1408,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
1407
1408
|
]),
|
|
1408
1409
|
onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
1409
1410
|
const [className2, props2, state2] = useLexicalScope();
|
|
1410
|
-
return onClick$
|
|
1411
|
+
return onClick$3(props2);
|
|
1411
1412
|
}, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
|
|
1412
1413
|
className,
|
|
1413
1414
|
props,
|
|
@@ -2082,7 +2083,7 @@ const handleABTesting = async ({ item, canTrack }) => {
|
|
|
2082
2083
|
};
|
|
2083
2084
|
};
|
|
2084
2085
|
const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
2085
|
-
const componentInfo$
|
|
2086
|
+
const componentInfo$h = {
|
|
2086
2087
|
name: "Core:Button",
|
|
2087
2088
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
2088
2089
|
defaultStyles: {
|
|
@@ -2120,7 +2121,7 @@ const componentInfo$g = {
|
|
|
2120
2121
|
static: true,
|
|
2121
2122
|
noWrap: true
|
|
2122
2123
|
};
|
|
2123
|
-
const componentInfo$
|
|
2124
|
+
const componentInfo$g = {
|
|
2124
2125
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
2125
2126
|
name: "Columns",
|
|
2126
2127
|
isRSC: true,
|
|
@@ -2362,14 +2363,14 @@ const componentInfo$f = {
|
|
|
2362
2363
|
}
|
|
2363
2364
|
]
|
|
2364
2365
|
};
|
|
2365
|
-
const componentInfo$
|
|
2366
|
+
const componentInfo$f = {
|
|
2366
2367
|
name: "Fragment",
|
|
2367
2368
|
static: true,
|
|
2368
2369
|
hidden: true,
|
|
2369
2370
|
canHaveChildren: true,
|
|
2370
2371
|
noWrap: true
|
|
2371
2372
|
};
|
|
2372
|
-
const componentInfo$
|
|
2373
|
+
const componentInfo$e = {
|
|
2373
2374
|
name: "Image",
|
|
2374
2375
|
static: true,
|
|
2375
2376
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -2517,7 +2518,7 @@ const componentInfo$d = {
|
|
|
2517
2518
|
}
|
|
2518
2519
|
]
|
|
2519
2520
|
};
|
|
2520
|
-
const componentInfo$
|
|
2521
|
+
const componentInfo$d = {
|
|
2521
2522
|
name: "Core:Section",
|
|
2522
2523
|
static: true,
|
|
2523
2524
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -2562,7 +2563,7 @@ const componentInfo$c = {
|
|
|
2562
2563
|
}
|
|
2563
2564
|
]
|
|
2564
2565
|
};
|
|
2565
|
-
const componentInfo$
|
|
2566
|
+
const componentInfo$c = {
|
|
2566
2567
|
name: "Slot",
|
|
2567
2568
|
isRSC: true,
|
|
2568
2569
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -2617,7 +2618,7 @@ const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
2617
2618
|
}
|
|
2618
2619
|
}, 0, "B1_1");
|
|
2619
2620
|
}, "Slot_component_WWgWgfV0bb0"));
|
|
2620
|
-
const componentInfo$
|
|
2621
|
+
const componentInfo$b = {
|
|
2621
2622
|
name: "Symbol",
|
|
2622
2623
|
noWrap: true,
|
|
2623
2624
|
static: true,
|
|
@@ -2697,7 +2698,7 @@ const defaultElement = {
|
|
|
2697
2698
|
}
|
|
2698
2699
|
}
|
|
2699
2700
|
};
|
|
2700
|
-
const componentInfo$
|
|
2701
|
+
const componentInfo$a = {
|
|
2701
2702
|
name: "Builder: Tabs",
|
|
2702
2703
|
inputs: [
|
|
2703
2704
|
{
|
|
@@ -2828,8 +2829,11 @@ const componentInfo$9 = {
|
|
|
2828
2829
|
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
2829
2830
|
return props.tabs && props.tabs[active].content;
|
|
2830
2831
|
};
|
|
2831
|
-
const
|
|
2832
|
-
|
|
2832
|
+
const onClick$2 = function onClick22(props, state, index) {
|
|
2833
|
+
if (index === state.activeTab && props.collapsible)
|
|
2834
|
+
state.activeTab = -1;
|
|
2835
|
+
else
|
|
2836
|
+
state.activeTab = index;
|
|
2833
2837
|
};
|
|
2834
2838
|
const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2835
2839
|
_jsxBranch();
|
|
@@ -2852,16 +2856,15 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
2852
2856
|
class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
|
|
2853
2857
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
2854
2858
|
const [index2, props2, state2] = useLexicalScope();
|
|
2855
|
-
|
|
2856
|
-
state2.activeTab = -1;
|
|
2857
|
-
else
|
|
2858
|
-
state2.activeTab = index2;
|
|
2859
|
+
return onClick$2(props2, state2, index2);
|
|
2859
2860
|
}, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
|
|
2860
2861
|
index,
|
|
2861
2862
|
props,
|
|
2862
2863
|
state
|
|
2863
2864
|
]),
|
|
2864
|
-
style:
|
|
2865
|
+
style: {
|
|
2866
|
+
...state.activeTab === index ? props.activeTabStyle : {}
|
|
2867
|
+
}
|
|
2865
2868
|
}, null, /* @__PURE__ */ _jsxC(Blocks, {
|
|
2866
2869
|
get parent() {
|
|
2867
2870
|
return props.builderBlock.id;
|
|
@@ -2933,7 +2936,7 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
2933
2936
|
}, 3, "6k_1"), 1, "6k_2") : null
|
|
2934
2937
|
], 1, "6k_3");
|
|
2935
2938
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
2936
|
-
const componentInfo$
|
|
2939
|
+
const componentInfo$9 = {
|
|
2937
2940
|
name: "Text",
|
|
2938
2941
|
static: true,
|
|
2939
2942
|
isRSC: true,
|
|
@@ -2968,6 +2971,364 @@ const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
2968
2971
|
}
|
|
2969
2972
|
}, null, 3, "yO_0");
|
|
2970
2973
|
}, "Text_component_15p0cKUxgIE"));
|
|
2974
|
+
const convertOrderNumberToString = (order) => {
|
|
2975
|
+
return order.toString();
|
|
2976
|
+
};
|
|
2977
|
+
const getAccordionTitleClassName = function getAccordionTitleClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
2978
|
+
return `builder-accordion-title builder-accordion-title-${state.open.includes(index) ? "open" : "closed"}`;
|
|
2979
|
+
};
|
|
2980
|
+
const getAccordionDetailClassName = function getAccordionDetailClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
2981
|
+
return `builder-accordion-detail builder-accordion-detail-${state.open.includes(index) ? "open" : "closed"}`;
|
|
2982
|
+
};
|
|
2983
|
+
const onClick$1 = function onClick23(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
2984
|
+
if (state.open.includes(index))
|
|
2985
|
+
state.open = onlyOneAtATime.value ? [] : state.open.filter((item) => item !== index);
|
|
2986
|
+
else
|
|
2987
|
+
state.open = onlyOneAtATime.value ? [
|
|
2988
|
+
index
|
|
2989
|
+
] : state.open.concat(index);
|
|
2990
|
+
};
|
|
2991
|
+
const Accordion = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
2992
|
+
const state = useStore({
|
|
2993
|
+
open: []
|
|
2994
|
+
});
|
|
2995
|
+
const onlyOneAtATime = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
2996
|
+
const [props2] = useLexicalScope();
|
|
2997
|
+
return Boolean(props2.grid || props2.oneAtATime);
|
|
2998
|
+
}, "Accordion_component_onlyOneAtATime_useComputed_QYD7IoPU2HY", [
|
|
2999
|
+
props
|
|
3000
|
+
]));
|
|
3001
|
+
const accordionStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3002
|
+
const [props2] = useLexicalScope();
|
|
3003
|
+
const styles = {
|
|
3004
|
+
display: "flex",
|
|
3005
|
+
alignItems: "stretch",
|
|
3006
|
+
flexDirection: "column",
|
|
3007
|
+
...props2.grid && {
|
|
3008
|
+
flexDirection: "row",
|
|
3009
|
+
alignItems: "flex-start",
|
|
3010
|
+
flexWrap: "wrap"
|
|
3011
|
+
}
|
|
3012
|
+
};
|
|
3013
|
+
return styles;
|
|
3014
|
+
}, "Accordion_component_accordionStyles_useComputed_Jrd0cwGn25U", [
|
|
3015
|
+
props
|
|
3016
|
+
]));
|
|
3017
|
+
const accordionTitleStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3018
|
+
const shared = {
|
|
3019
|
+
display: "flex",
|
|
3020
|
+
flexDirection: "column"
|
|
3021
|
+
};
|
|
3022
|
+
const styles = {
|
|
3023
|
+
...shared,
|
|
3024
|
+
alignItems: "stretch",
|
|
3025
|
+
cursor: "pointer"
|
|
3026
|
+
};
|
|
3027
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
3028
|
+
}, "Accordion_component_accordionTitleStyles_useComputed_FopdBMH0V6U"));
|
|
3029
|
+
const openGridItemOrder = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3030
|
+
const [props2, state2] = useLexicalScope();
|
|
3031
|
+
let itemOrder = null;
|
|
3032
|
+
const getOpenGridItemPosition = props2.grid && state2.open.length;
|
|
3033
|
+
if (getOpenGridItemPosition && document) {
|
|
3034
|
+
const openItemIndex = state2.open[0];
|
|
3035
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
3036
|
+
let subjectItem = openItem;
|
|
3037
|
+
itemOrder = openItemIndex;
|
|
3038
|
+
if (subjectItem) {
|
|
3039
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
3040
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling)
|
|
3041
|
+
if (subjectItem) {
|
|
3042
|
+
if (subjectItem.classList.contains("builder-accordion-detail"))
|
|
3043
|
+
continue;
|
|
3044
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
3045
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
3046
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
3047
|
+
if (!isNaN(index)) {
|
|
3048
|
+
prevItemRect = subjectItemRect;
|
|
3049
|
+
itemOrder = index;
|
|
3050
|
+
}
|
|
3051
|
+
} else
|
|
3052
|
+
break;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
if (typeof itemOrder === "number")
|
|
3057
|
+
itemOrder = itemOrder + 1;
|
|
3058
|
+
return itemOrder;
|
|
3059
|
+
}, "Accordion_component_openGridItemOrder_useComputed_cCQY1Vnxll0", [
|
|
3060
|
+
props,
|
|
3061
|
+
state
|
|
3062
|
+
]));
|
|
3063
|
+
const accordionDetailStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3064
|
+
const [openGridItemOrder2, props2] = useLexicalScope();
|
|
3065
|
+
const styles = {
|
|
3066
|
+
order: typeof openGridItemOrder2.value === "number" ? openGridItemOrder2.value : void 0,
|
|
3067
|
+
...props2.grid && {
|
|
3068
|
+
width: "100%"
|
|
3069
|
+
}
|
|
3070
|
+
};
|
|
3071
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
3072
|
+
}, "Accordion_component_accordionDetailStyles_useComputed_S0QmQzGJoRo", [
|
|
3073
|
+
openGridItemOrder,
|
|
3074
|
+
props
|
|
3075
|
+
]));
|
|
3076
|
+
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
3077
|
+
class: "builder-accordion",
|
|
3078
|
+
style: _fnSignal((p0) => p0.value, [
|
|
3079
|
+
accordionStyles
|
|
3080
|
+
], "p0.value")
|
|
3081
|
+
}, (props.items || []).map((item, index) => {
|
|
3082
|
+
_jsxBranch();
|
|
3083
|
+
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
3084
|
+
children: [
|
|
3085
|
+
/* @__PURE__ */ _jsxQ("div", {
|
|
3086
|
+
class: getAccordionTitleClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index),
|
|
3087
|
+
"data-index": index,
|
|
3088
|
+
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
3089
|
+
const [accordionDetailStyles2, accordionStyles2, accordionTitleStyles2, index2, onlyOneAtATime2, openGridItemOrder2, props2, state2] = useLexicalScope();
|
|
3090
|
+
return onClick$1(props2, state2, onlyOneAtATime2, accordionStyles2, accordionTitleStyles2, openGridItemOrder2, accordionDetailStyles2, index2);
|
|
3091
|
+
}, "Accordion_component_div_Fragment_div_onClick_VtzhhJnK0XI", [
|
|
3092
|
+
accordionDetailStyles,
|
|
3093
|
+
accordionStyles,
|
|
3094
|
+
accordionTitleStyles,
|
|
3095
|
+
index,
|
|
3096
|
+
onlyOneAtATime,
|
|
3097
|
+
openGridItemOrder,
|
|
3098
|
+
props,
|
|
3099
|
+
state
|
|
3100
|
+
]),
|
|
3101
|
+
style: {
|
|
3102
|
+
...accordionTitleStyles.value,
|
|
3103
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
3104
|
+
order: openGridItemOrder.value !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
3105
|
+
}
|
|
3106
|
+
}, null, /* @__PURE__ */ _jsxC(Blocks, {
|
|
3107
|
+
get blocks() {
|
|
3108
|
+
return item.title;
|
|
3109
|
+
},
|
|
3110
|
+
path: `items.${index}.title`,
|
|
3111
|
+
get parent() {
|
|
3112
|
+
return props.builderBlock.id;
|
|
3113
|
+
},
|
|
3114
|
+
get context() {
|
|
3115
|
+
return props.builderContext;
|
|
3116
|
+
},
|
|
3117
|
+
get registeredComponents() {
|
|
3118
|
+
return props.builderComponents;
|
|
3119
|
+
},
|
|
3120
|
+
get linkComponent() {
|
|
3121
|
+
return props.builderLinkComponent;
|
|
3122
|
+
},
|
|
3123
|
+
[_IMMUTABLE]: {
|
|
3124
|
+
blocks: _wrapProp(item, "title"),
|
|
3125
|
+
context: _fnSignal((p0) => p0.builderContext, [
|
|
3126
|
+
props
|
|
3127
|
+
], "p0.builderContext"),
|
|
3128
|
+
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
3129
|
+
props
|
|
3130
|
+
], "p0.builderLinkComponent"),
|
|
3131
|
+
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
3132
|
+
props
|
|
3133
|
+
], "p0.builderBlock.id"),
|
|
3134
|
+
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
3135
|
+
props
|
|
3136
|
+
], "p0.builderComponents")
|
|
3137
|
+
}
|
|
3138
|
+
}, 3, "hf_0"), 0, null),
|
|
3139
|
+
state.open.includes(index) ? /* @__PURE__ */ _jsxQ("div", {
|
|
3140
|
+
class: getAccordionDetailClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index)
|
|
3141
|
+
}, {
|
|
3142
|
+
style: _fnSignal((p0) => p0.value, [
|
|
3143
|
+
accordionDetailStyles
|
|
3144
|
+
], "p0.value")
|
|
3145
|
+
}, /* @__PURE__ */ _jsxC(Blocks, {
|
|
3146
|
+
get blocks() {
|
|
3147
|
+
return item.detail;
|
|
3148
|
+
},
|
|
3149
|
+
path: `items.${index}.detail`,
|
|
3150
|
+
get parent() {
|
|
3151
|
+
return props.builderBlock.id;
|
|
3152
|
+
},
|
|
3153
|
+
get context() {
|
|
3154
|
+
return props.builderContext;
|
|
3155
|
+
},
|
|
3156
|
+
get registeredComponents() {
|
|
3157
|
+
return props.builderComponents;
|
|
3158
|
+
},
|
|
3159
|
+
get linkComponent() {
|
|
3160
|
+
return props.builderLinkComponent;
|
|
3161
|
+
},
|
|
3162
|
+
[_IMMUTABLE]: {
|
|
3163
|
+
blocks: _wrapProp(item, "detail"),
|
|
3164
|
+
context: _fnSignal((p0) => p0.builderContext, [
|
|
3165
|
+
props
|
|
3166
|
+
], "p0.builderContext"),
|
|
3167
|
+
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
3168
|
+
props
|
|
3169
|
+
], "p0.builderLinkComponent"),
|
|
3170
|
+
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
3171
|
+
props
|
|
3172
|
+
], "p0.builderBlock.id"),
|
|
3173
|
+
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
3174
|
+
props
|
|
3175
|
+
], "p0.builderComponents")
|
|
3176
|
+
}
|
|
3177
|
+
}, 3, "hf_1"), 1, "hf_2") : null
|
|
3178
|
+
]
|
|
3179
|
+
}, 1, "hf_3");
|
|
3180
|
+
}), 1, "hf_4");
|
|
3181
|
+
}, "Accordion_component_jkuUCHm0nt0"));
|
|
3182
|
+
const defaultTitle = {
|
|
3183
|
+
"@type": "@builder.io/sdk:Element",
|
|
3184
|
+
layerName: "Accordion item title",
|
|
3185
|
+
responsiveStyles: {
|
|
3186
|
+
large: {
|
|
3187
|
+
marginTop: "10px",
|
|
3188
|
+
position: "relative",
|
|
3189
|
+
display: "flex",
|
|
3190
|
+
alignItems: "stretch",
|
|
3191
|
+
flexDirection: "column",
|
|
3192
|
+
paddingBottom: "10px"
|
|
3193
|
+
}
|
|
3194
|
+
},
|
|
3195
|
+
children: [
|
|
3196
|
+
{
|
|
3197
|
+
"@type": "@builder.io/sdk:Element",
|
|
3198
|
+
responsiveStyles: {
|
|
3199
|
+
large: {
|
|
3200
|
+
textAlign: "left",
|
|
3201
|
+
display: "flex",
|
|
3202
|
+
flexDirection: "column"
|
|
3203
|
+
}
|
|
3204
|
+
},
|
|
3205
|
+
component: {
|
|
3206
|
+
name: "Text",
|
|
3207
|
+
options: {
|
|
3208
|
+
text: "I am an accordion title. Click me!"
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
]
|
|
3213
|
+
};
|
|
3214
|
+
const defaultDetail = {
|
|
3215
|
+
"@type": "@builder.io/sdk:Element",
|
|
3216
|
+
layerName: "Accordion item detail",
|
|
3217
|
+
responsiveStyles: {
|
|
3218
|
+
large: {
|
|
3219
|
+
position: "relative",
|
|
3220
|
+
display: "flex",
|
|
3221
|
+
alignItems: "stretch",
|
|
3222
|
+
flexDirection: "column",
|
|
3223
|
+
marginTop: "10px",
|
|
3224
|
+
paddingBottom: "10px"
|
|
3225
|
+
}
|
|
3226
|
+
},
|
|
3227
|
+
children: [
|
|
3228
|
+
{
|
|
3229
|
+
"@type": "@builder.io/sdk:Element",
|
|
3230
|
+
responsiveStyles: {
|
|
3231
|
+
large: {
|
|
3232
|
+
paddingTop: "50px",
|
|
3233
|
+
textAlign: "left",
|
|
3234
|
+
display: "flex",
|
|
3235
|
+
flexDirection: "column",
|
|
3236
|
+
paddingBottom: "50px"
|
|
3237
|
+
}
|
|
3238
|
+
},
|
|
3239
|
+
component: {
|
|
3240
|
+
name: "Text",
|
|
3241
|
+
options: {
|
|
3242
|
+
text: "I am an accordion detail, hello!"
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
]
|
|
3247
|
+
};
|
|
3248
|
+
const componentInfo$8 = {
|
|
3249
|
+
name: "Builder:Accordion",
|
|
3250
|
+
canHaveChildren: true,
|
|
3251
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
3252
|
+
defaultStyles: {
|
|
3253
|
+
display: "flex",
|
|
3254
|
+
flexDirection: "column",
|
|
3255
|
+
alignItems: "stretch"
|
|
3256
|
+
},
|
|
3257
|
+
inputs: [
|
|
3258
|
+
{
|
|
3259
|
+
name: "items",
|
|
3260
|
+
type: "list",
|
|
3261
|
+
broadcast: true,
|
|
3262
|
+
subFields: [
|
|
3263
|
+
{
|
|
3264
|
+
name: "title",
|
|
3265
|
+
type: "uiBlocks",
|
|
3266
|
+
hideFromUI: true,
|
|
3267
|
+
defaultValue: [
|
|
3268
|
+
defaultTitle
|
|
3269
|
+
]
|
|
3270
|
+
},
|
|
3271
|
+
{
|
|
3272
|
+
name: "detail",
|
|
3273
|
+
type: "uiBlocks",
|
|
3274
|
+
hideFromUI: true,
|
|
3275
|
+
defaultValue: [
|
|
3276
|
+
defaultDetail
|
|
3277
|
+
]
|
|
3278
|
+
}
|
|
3279
|
+
],
|
|
3280
|
+
defaultValue: [
|
|
3281
|
+
{
|
|
3282
|
+
title: [
|
|
3283
|
+
defaultTitle
|
|
3284
|
+
],
|
|
3285
|
+
detail: [
|
|
3286
|
+
defaultDetail
|
|
3287
|
+
]
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
title: [
|
|
3291
|
+
defaultTitle
|
|
3292
|
+
],
|
|
3293
|
+
detail: [
|
|
3294
|
+
defaultDetail
|
|
3295
|
+
]
|
|
3296
|
+
}
|
|
3297
|
+
],
|
|
3298
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
name: "oneAtATime",
|
|
3302
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
3303
|
+
type: "boolean",
|
|
3304
|
+
defaultValue: false
|
|
3305
|
+
},
|
|
3306
|
+
{
|
|
3307
|
+
name: "grid",
|
|
3308
|
+
helperText: "Display as a grid",
|
|
3309
|
+
type: "boolean",
|
|
3310
|
+
defaultValue: false
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
name: "gridRowWidth",
|
|
3314
|
+
helperText: "Display as a grid",
|
|
3315
|
+
type: "string",
|
|
3316
|
+
showIf: (options) => options.get("grid"),
|
|
3317
|
+
defaultValue: "25%"
|
|
3318
|
+
},
|
|
3319
|
+
{
|
|
3320
|
+
name: "useChildrenForItems",
|
|
3321
|
+
type: "boolean",
|
|
3322
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
3323
|
+
advanced: true,
|
|
3324
|
+
defaultValue: false,
|
|
3325
|
+
onChange: (options) => {
|
|
3326
|
+
if (options.get("useChildrenForItems") === true)
|
|
3327
|
+
options.set("items", []);
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
]
|
|
3331
|
+
};
|
|
2971
3332
|
const componentInfo$7 = {
|
|
2972
3333
|
name: "Custom Code",
|
|
2973
3334
|
static: true,
|
|
@@ -4212,40 +4573,44 @@ const getExtraComponents = () => [
|
|
|
4212
4573
|
const getDefaultRegisteredComponents = () => [
|
|
4213
4574
|
{
|
|
4214
4575
|
component: Button,
|
|
4215
|
-
...componentInfo$
|
|
4576
|
+
...componentInfo$h
|
|
4216
4577
|
},
|
|
4217
4578
|
{
|
|
4218
4579
|
component: Columns,
|
|
4219
|
-
...componentInfo$
|
|
4580
|
+
...componentInfo$g
|
|
4220
4581
|
},
|
|
4221
4582
|
{
|
|
4222
4583
|
component: FragmentComponent,
|
|
4223
|
-
...componentInfo$
|
|
4584
|
+
...componentInfo$f
|
|
4224
4585
|
},
|
|
4225
4586
|
{
|
|
4226
4587
|
component: Image,
|
|
4227
|
-
...componentInfo$
|
|
4588
|
+
...componentInfo$e
|
|
4228
4589
|
},
|
|
4229
4590
|
{
|
|
4230
4591
|
component: SectionComponent,
|
|
4231
|
-
...componentInfo$
|
|
4592
|
+
...componentInfo$d
|
|
4232
4593
|
},
|
|
4233
4594
|
{
|
|
4234
4595
|
component: Slot,
|
|
4235
|
-
...componentInfo$
|
|
4596
|
+
...componentInfo$c
|
|
4236
4597
|
},
|
|
4237
4598
|
{
|
|
4238
4599
|
component: Symbol$1,
|
|
4239
|
-
...componentInfo$
|
|
4600
|
+
...componentInfo$b
|
|
4240
4601
|
},
|
|
4241
4602
|
{
|
|
4242
4603
|
component: Text,
|
|
4243
|
-
...componentInfo$
|
|
4604
|
+
...componentInfo$9
|
|
4244
4605
|
},
|
|
4245
4606
|
...[
|
|
4246
4607
|
{
|
|
4247
4608
|
component: Tabs,
|
|
4248
|
-
...componentInfo$
|
|
4609
|
+
...componentInfo$a
|
|
4610
|
+
},
|
|
4611
|
+
{
|
|
4612
|
+
component: Accordion,
|
|
4613
|
+
...componentInfo$8
|
|
4249
4614
|
}
|
|
4250
4615
|
],
|
|
4251
4616
|
...getExtraComponents()
|
|
@@ -4704,7 +5069,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4704
5069
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4705
5070
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4706
5071
|
}
|
|
4707
|
-
const SDK_VERSION = "0.14.
|
|
5072
|
+
const SDK_VERSION = "0.14.22";
|
|
4708
5073
|
const registry = {};
|
|
4709
5074
|
function register(type, info) {
|
|
4710
5075
|
let typeList = registry[type];
|
|
@@ -5025,7 +5390,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps,
|
|
|
5025
5390
|
enableCache: false
|
|
5026
5391
|
});
|
|
5027
5392
|
};
|
|
5028
|
-
const onClick = function
|
|
5393
|
+
const onClick = function onClick24(props, state, showContentProps, elementRef, event) {
|
|
5029
5394
|
var _a, _b;
|
|
5030
5395
|
if (props.builderContextSignal.content) {
|
|
5031
5396
|
const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
@@ -5184,7 +5549,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
5184
5549
|
useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5185
5550
|
const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
|
|
5186
5551
|
if (!props2.apiKey)
|
|
5187
|
-
logger.error("No API key provided to `
|
|
5552
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
5188
5553
|
evaluateJsCode(props2);
|
|
5189
5554
|
runHttpRequests(props2, state2, showContentProps2, elementRef2);
|
|
5190
5555
|
emitStateUpdate(props2);
|