@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
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -3598,6 +3598,7 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
3598
3598
|
else
|
|
3599
3599
|
return transformedBlock;
|
|
3600
3600
|
}
|
|
3601
|
+
const camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
3601
3602
|
function throttle(func, wait, options = {}) {
|
|
3602
3603
|
let context;
|
|
3603
3604
|
let args;
|
|
@@ -3644,7 +3645,6 @@ function assign(target, ..._args) {
|
|
|
3644
3645
|
}
|
|
3645
3646
|
return to;
|
|
3646
3647
|
}
|
|
3647
|
-
const camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
3648
3648
|
function bindAnimations(animations) {
|
|
3649
3649
|
for (const animation of animations)
|
|
3650
3650
|
switch (animation.trigger) {
|
|
@@ -3695,7 +3695,7 @@ function triggerAnimation(animation) {
|
|
|
3695
3695
|
element.style.transitionDelay = "0";
|
|
3696
3696
|
assign(element.style, animation.steps[0].styles);
|
|
3697
3697
|
setTimeout(() => {
|
|
3698
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3698
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3699
3699
|
if (animation.delay)
|
|
3700
3700
|
element.style.transitionDelay = animation.delay + "s";
|
|
3701
3701
|
assign(element.style, animation.steps[1].styles);
|
|
@@ -3753,7 +3753,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3753
3753
|
}
|
|
3754
3754
|
attachDefaultState();
|
|
3755
3755
|
setTimeout(() => {
|
|
3756
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3756
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3757
3757
|
if (animation.delay)
|
|
3758
3758
|
element.style.transitionDelay = animation.delay + "s";
|
|
3759
3759
|
});
|
|
@@ -3764,7 +3764,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3764
3764
|
immediateOnScroll();
|
|
3765
3765
|
});
|
|
3766
3766
|
}
|
|
3767
|
-
const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
3768
3767
|
const convertStyleMapToCSSArray = (style) => {
|
|
3769
3768
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
3770
3769
|
if (typeof value === "string")
|
|
@@ -3868,7 +3867,8 @@ const shouldPassLinkComponent = (block) => {
|
|
|
3868
3867
|
"Symbol",
|
|
3869
3868
|
"Columns",
|
|
3870
3869
|
"Form:Form",
|
|
3871
|
-
"Builder: Tabs"
|
|
3870
|
+
"Builder: Tabs",
|
|
3871
|
+
"Builder:Accordion"
|
|
3872
3872
|
].includes(block.name));
|
|
3873
3873
|
};
|
|
3874
3874
|
const shouldPassRegisteredComponents = (block) => {
|
|
@@ -3876,7 +3876,8 @@ const shouldPassRegisteredComponents = (block) => {
|
|
|
3876
3876
|
"Symbol",
|
|
3877
3877
|
"Columns",
|
|
3878
3878
|
"Form:Form",
|
|
3879
|
-
"Builder: Tabs"
|
|
3879
|
+
"Builder: Tabs",
|
|
3880
|
+
"Builder:Accordion"
|
|
3880
3881
|
].includes(block.name));
|
|
3881
3882
|
};
|
|
3882
3883
|
const SIZES = {
|
|
@@ -3994,7 +3995,7 @@ const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
3994
3995
|
className: `${className}:hover`,
|
|
3995
3996
|
styles: {
|
|
3996
3997
|
...hoverStyles,
|
|
3997
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
3998
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
3998
3999
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
3999
4000
|
}
|
|
4000
4001
|
}) || "";
|
|
@@ -4585,7 +4586,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4585
4586
|
}, 1, "jN_4") : null
|
|
4586
4587
|
}, 1, "jN_5");
|
|
4587
4588
|
}, "Block_component_nnPv0RY0U0k"));
|
|
4588
|
-
const onClick$
|
|
4589
|
+
const onClick$3 = function onClick2(props, state, className) {
|
|
4589
4590
|
var _a, _b;
|
|
4590
4591
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
4591
4592
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
@@ -4632,7 +4633,7 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
4632
4633
|
},
|
|
4633
4634
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
4634
4635
|
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
4635
|
-
return onClick$
|
|
4636
|
+
return onClick$3(props2);
|
|
4636
4637
|
}, "BlocksWrapper_component_onClick_ufezvOupQrM", [
|
|
4637
4638
|
className,
|
|
4638
4639
|
props,
|
|
@@ -4640,7 +4641,7 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
4640
4641
|
]),
|
|
4641
4642
|
onKeyPress$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
4642
4643
|
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
4643
|
-
return onClick$
|
|
4644
|
+
return onClick$3(props2);
|
|
4644
4645
|
}, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
|
|
4645
4646
|
className,
|
|
4646
4647
|
props,
|
|
@@ -5315,7 +5316,7 @@ const handleABTesting = async ({ item, canTrack }) => {
|
|
|
5315
5316
|
};
|
|
5316
5317
|
};
|
|
5317
5318
|
const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
5318
|
-
const componentInfo$
|
|
5319
|
+
const componentInfo$h = {
|
|
5319
5320
|
name: "Core:Button",
|
|
5320
5321
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
5321
5322
|
defaultStyles: {
|
|
@@ -5353,7 +5354,7 @@ const componentInfo$g = {
|
|
|
5353
5354
|
static: true,
|
|
5354
5355
|
noWrap: true
|
|
5355
5356
|
};
|
|
5356
|
-
const componentInfo$
|
|
5357
|
+
const componentInfo$g = {
|
|
5357
5358
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
5358
5359
|
name: "Columns",
|
|
5359
5360
|
isRSC: true,
|
|
@@ -5595,14 +5596,14 @@ const componentInfo$f = {
|
|
|
5595
5596
|
}
|
|
5596
5597
|
]
|
|
5597
5598
|
};
|
|
5598
|
-
const componentInfo$
|
|
5599
|
+
const componentInfo$f = {
|
|
5599
5600
|
name: "Fragment",
|
|
5600
5601
|
static: true,
|
|
5601
5602
|
hidden: true,
|
|
5602
5603
|
canHaveChildren: true,
|
|
5603
5604
|
noWrap: true
|
|
5604
5605
|
};
|
|
5605
|
-
const componentInfo$
|
|
5606
|
+
const componentInfo$e = {
|
|
5606
5607
|
name: "Image",
|
|
5607
5608
|
static: true,
|
|
5608
5609
|
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",
|
|
@@ -5750,7 +5751,7 @@ const componentInfo$d = {
|
|
|
5750
5751
|
}
|
|
5751
5752
|
]
|
|
5752
5753
|
};
|
|
5753
|
-
const componentInfo$
|
|
5754
|
+
const componentInfo$d = {
|
|
5754
5755
|
name: "Core:Section",
|
|
5755
5756
|
static: true,
|
|
5756
5757
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -5795,7 +5796,7 @@ const componentInfo$c = {
|
|
|
5795
5796
|
}
|
|
5796
5797
|
]
|
|
5797
5798
|
};
|
|
5798
|
-
const componentInfo$
|
|
5799
|
+
const componentInfo$c = {
|
|
5799
5800
|
name: "Slot",
|
|
5800
5801
|
isRSC: true,
|
|
5801
5802
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -5850,7 +5851,7 @@ const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
5850
5851
|
}
|
|
5851
5852
|
}, 0, "B1_1");
|
|
5852
5853
|
}, "Slot_component_WWgWgfV0bb0"));
|
|
5853
|
-
const componentInfo$
|
|
5854
|
+
const componentInfo$b = {
|
|
5854
5855
|
name: "Symbol",
|
|
5855
5856
|
noWrap: true,
|
|
5856
5857
|
static: true,
|
|
@@ -5930,7 +5931,7 @@ const defaultElement = {
|
|
|
5930
5931
|
}
|
|
5931
5932
|
}
|
|
5932
5933
|
};
|
|
5933
|
-
const componentInfo$
|
|
5934
|
+
const componentInfo$a = {
|
|
5934
5935
|
name: "Builder: Tabs",
|
|
5935
5936
|
inputs: [
|
|
5936
5937
|
{
|
|
@@ -6061,8 +6062,11 @@ const componentInfo$9 = {
|
|
|
6061
6062
|
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
6062
6063
|
return props.tabs && props.tabs[active].content;
|
|
6063
6064
|
};
|
|
6064
|
-
const
|
|
6065
|
-
|
|
6065
|
+
const onClick$2 = function onClick22(props, state, index) {
|
|
6066
|
+
if (index === state.activeTab && props.collapsible)
|
|
6067
|
+
state.activeTab = -1;
|
|
6068
|
+
else
|
|
6069
|
+
state.activeTab = index;
|
|
6066
6070
|
};
|
|
6067
6071
|
const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
6068
6072
|
qwik._jsxBranch();
|
|
@@ -6085,16 +6089,15 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
6085
6089
|
class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
|
|
6086
6090
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
6087
6091
|
const [index2, props2, state2] = qwik.useLexicalScope();
|
|
6088
|
-
|
|
6089
|
-
state2.activeTab = -1;
|
|
6090
|
-
else
|
|
6091
|
-
state2.activeTab = index2;
|
|
6092
|
+
return onClick$2(props2, state2, index2);
|
|
6092
6093
|
}, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
|
|
6093
6094
|
index,
|
|
6094
6095
|
props,
|
|
6095
6096
|
state
|
|
6096
6097
|
]),
|
|
6097
|
-
style:
|
|
6098
|
+
style: {
|
|
6099
|
+
...state.activeTab === index ? props.activeTabStyle : {}
|
|
6100
|
+
}
|
|
6098
6101
|
}, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
6099
6102
|
get parent() {
|
|
6100
6103
|
return props.builderBlock.id;
|
|
@@ -6166,7 +6169,7 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
6166
6169
|
}, 3, "6k_1"), 1, "6k_2") : null
|
|
6167
6170
|
], 1, "6k_3");
|
|
6168
6171
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
6169
|
-
const componentInfo$
|
|
6172
|
+
const componentInfo$9 = {
|
|
6170
6173
|
name: "Text",
|
|
6171
6174
|
static: true,
|
|
6172
6175
|
isRSC: true,
|
|
@@ -6201,6 +6204,364 @@ const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
6201
6204
|
}
|
|
6202
6205
|
}, null, 3, "yO_0");
|
|
6203
6206
|
}, "Text_component_15p0cKUxgIE"));
|
|
6207
|
+
const convertOrderNumberToString = (order) => {
|
|
6208
|
+
return order.toString();
|
|
6209
|
+
};
|
|
6210
|
+
const getAccordionTitleClassName = function getAccordionTitleClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
6211
|
+
return `builder-accordion-title builder-accordion-title-${state.open.includes(index) ? "open" : "closed"}`;
|
|
6212
|
+
};
|
|
6213
|
+
const getAccordionDetailClassName = function getAccordionDetailClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
6214
|
+
return `builder-accordion-detail builder-accordion-detail-${state.open.includes(index) ? "open" : "closed"}`;
|
|
6215
|
+
};
|
|
6216
|
+
const onClick$1 = function onClick23(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
6217
|
+
if (state.open.includes(index))
|
|
6218
|
+
state.open = onlyOneAtATime.value ? [] : state.open.filter((item) => item !== index);
|
|
6219
|
+
else
|
|
6220
|
+
state.open = onlyOneAtATime.value ? [
|
|
6221
|
+
index
|
|
6222
|
+
] : state.open.concat(index);
|
|
6223
|
+
};
|
|
6224
|
+
const Accordion = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
6225
|
+
const state = qwik.useStore({
|
|
6226
|
+
open: []
|
|
6227
|
+
});
|
|
6228
|
+
const onlyOneAtATime = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6229
|
+
const [props2] = qwik.useLexicalScope();
|
|
6230
|
+
return Boolean(props2.grid || props2.oneAtATime);
|
|
6231
|
+
}, "Accordion_component_onlyOneAtATime_useComputed_QYD7IoPU2HY", [
|
|
6232
|
+
props
|
|
6233
|
+
]));
|
|
6234
|
+
const accordionStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6235
|
+
const [props2] = qwik.useLexicalScope();
|
|
6236
|
+
const styles = {
|
|
6237
|
+
display: "flex",
|
|
6238
|
+
alignItems: "stretch",
|
|
6239
|
+
flexDirection: "column",
|
|
6240
|
+
...props2.grid && {
|
|
6241
|
+
flexDirection: "row",
|
|
6242
|
+
alignItems: "flex-start",
|
|
6243
|
+
flexWrap: "wrap"
|
|
6244
|
+
}
|
|
6245
|
+
};
|
|
6246
|
+
return styles;
|
|
6247
|
+
}, "Accordion_component_accordionStyles_useComputed_Jrd0cwGn25U", [
|
|
6248
|
+
props
|
|
6249
|
+
]));
|
|
6250
|
+
const accordionTitleStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6251
|
+
const shared = {
|
|
6252
|
+
display: "flex",
|
|
6253
|
+
flexDirection: "column"
|
|
6254
|
+
};
|
|
6255
|
+
const styles = {
|
|
6256
|
+
...shared,
|
|
6257
|
+
alignItems: "stretch",
|
|
6258
|
+
cursor: "pointer"
|
|
6259
|
+
};
|
|
6260
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
6261
|
+
}, "Accordion_component_accordionTitleStyles_useComputed_FopdBMH0V6U"));
|
|
6262
|
+
const openGridItemOrder = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6263
|
+
const [props2, state2] = qwik.useLexicalScope();
|
|
6264
|
+
let itemOrder = null;
|
|
6265
|
+
const getOpenGridItemPosition = props2.grid && state2.open.length;
|
|
6266
|
+
if (getOpenGridItemPosition && document) {
|
|
6267
|
+
const openItemIndex = state2.open[0];
|
|
6268
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
6269
|
+
let subjectItem = openItem;
|
|
6270
|
+
itemOrder = openItemIndex;
|
|
6271
|
+
if (subjectItem) {
|
|
6272
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
6273
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling)
|
|
6274
|
+
if (subjectItem) {
|
|
6275
|
+
if (subjectItem.classList.contains("builder-accordion-detail"))
|
|
6276
|
+
continue;
|
|
6277
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
6278
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
6279
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
6280
|
+
if (!isNaN(index)) {
|
|
6281
|
+
prevItemRect = subjectItemRect;
|
|
6282
|
+
itemOrder = index;
|
|
6283
|
+
}
|
|
6284
|
+
} else
|
|
6285
|
+
break;
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
}
|
|
6289
|
+
if (typeof itemOrder === "number")
|
|
6290
|
+
itemOrder = itemOrder + 1;
|
|
6291
|
+
return itemOrder;
|
|
6292
|
+
}, "Accordion_component_openGridItemOrder_useComputed_cCQY1Vnxll0", [
|
|
6293
|
+
props,
|
|
6294
|
+
state
|
|
6295
|
+
]));
|
|
6296
|
+
const accordionDetailStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6297
|
+
const [openGridItemOrder2, props2] = qwik.useLexicalScope();
|
|
6298
|
+
const styles = {
|
|
6299
|
+
order: typeof openGridItemOrder2.value === "number" ? openGridItemOrder2.value : void 0,
|
|
6300
|
+
...props2.grid && {
|
|
6301
|
+
width: "100%"
|
|
6302
|
+
}
|
|
6303
|
+
};
|
|
6304
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
6305
|
+
}, "Accordion_component_accordionDetailStyles_useComputed_S0QmQzGJoRo", [
|
|
6306
|
+
openGridItemOrder,
|
|
6307
|
+
props
|
|
6308
|
+
]));
|
|
6309
|
+
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
6310
|
+
class: "builder-accordion",
|
|
6311
|
+
style: qwik._fnSignal((p0) => p0.value, [
|
|
6312
|
+
accordionStyles
|
|
6313
|
+
], "p0.value")
|
|
6314
|
+
}, (props.items || []).map((item, index) => {
|
|
6315
|
+
qwik._jsxBranch();
|
|
6316
|
+
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
6317
|
+
children: [
|
|
6318
|
+
/* @__PURE__ */ qwik._jsxQ("div", {
|
|
6319
|
+
class: getAccordionTitleClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index),
|
|
6320
|
+
"data-index": index,
|
|
6321
|
+
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
6322
|
+
const [accordionDetailStyles2, accordionStyles2, accordionTitleStyles2, index2, onlyOneAtATime2, openGridItemOrder2, props2, state2] = qwik.useLexicalScope();
|
|
6323
|
+
return onClick$1(props2, state2, onlyOneAtATime2, accordionStyles2, accordionTitleStyles2, openGridItemOrder2, accordionDetailStyles2, index2);
|
|
6324
|
+
}, "Accordion_component_div_Fragment_div_onClick_VtzhhJnK0XI", [
|
|
6325
|
+
accordionDetailStyles,
|
|
6326
|
+
accordionStyles,
|
|
6327
|
+
accordionTitleStyles,
|
|
6328
|
+
index,
|
|
6329
|
+
onlyOneAtATime,
|
|
6330
|
+
openGridItemOrder,
|
|
6331
|
+
props,
|
|
6332
|
+
state
|
|
6333
|
+
]),
|
|
6334
|
+
style: {
|
|
6335
|
+
...accordionTitleStyles.value,
|
|
6336
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
6337
|
+
order: openGridItemOrder.value !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
6338
|
+
}
|
|
6339
|
+
}, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
6340
|
+
get blocks() {
|
|
6341
|
+
return item.title;
|
|
6342
|
+
},
|
|
6343
|
+
path: `items.${index}.title`,
|
|
6344
|
+
get parent() {
|
|
6345
|
+
return props.builderBlock.id;
|
|
6346
|
+
},
|
|
6347
|
+
get context() {
|
|
6348
|
+
return props.builderContext;
|
|
6349
|
+
},
|
|
6350
|
+
get registeredComponents() {
|
|
6351
|
+
return props.builderComponents;
|
|
6352
|
+
},
|
|
6353
|
+
get linkComponent() {
|
|
6354
|
+
return props.builderLinkComponent;
|
|
6355
|
+
},
|
|
6356
|
+
[qwik._IMMUTABLE]: {
|
|
6357
|
+
blocks: qwik._wrapProp(item, "title"),
|
|
6358
|
+
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
6359
|
+
props
|
|
6360
|
+
], "p0.builderContext"),
|
|
6361
|
+
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
6362
|
+
props
|
|
6363
|
+
], "p0.builderLinkComponent"),
|
|
6364
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
6365
|
+
props
|
|
6366
|
+
], "p0.builderBlock.id"),
|
|
6367
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
6368
|
+
props
|
|
6369
|
+
], "p0.builderComponents")
|
|
6370
|
+
}
|
|
6371
|
+
}, 3, "hf_0"), 0, null),
|
|
6372
|
+
state.open.includes(index) ? /* @__PURE__ */ qwik._jsxQ("div", {
|
|
6373
|
+
class: getAccordionDetailClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index)
|
|
6374
|
+
}, {
|
|
6375
|
+
style: qwik._fnSignal((p0) => p0.value, [
|
|
6376
|
+
accordionDetailStyles
|
|
6377
|
+
], "p0.value")
|
|
6378
|
+
}, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
6379
|
+
get blocks() {
|
|
6380
|
+
return item.detail;
|
|
6381
|
+
},
|
|
6382
|
+
path: `items.${index}.detail`,
|
|
6383
|
+
get parent() {
|
|
6384
|
+
return props.builderBlock.id;
|
|
6385
|
+
},
|
|
6386
|
+
get context() {
|
|
6387
|
+
return props.builderContext;
|
|
6388
|
+
},
|
|
6389
|
+
get registeredComponents() {
|
|
6390
|
+
return props.builderComponents;
|
|
6391
|
+
},
|
|
6392
|
+
get linkComponent() {
|
|
6393
|
+
return props.builderLinkComponent;
|
|
6394
|
+
},
|
|
6395
|
+
[qwik._IMMUTABLE]: {
|
|
6396
|
+
blocks: qwik._wrapProp(item, "detail"),
|
|
6397
|
+
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
6398
|
+
props
|
|
6399
|
+
], "p0.builderContext"),
|
|
6400
|
+
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
6401
|
+
props
|
|
6402
|
+
], "p0.builderLinkComponent"),
|
|
6403
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
6404
|
+
props
|
|
6405
|
+
], "p0.builderBlock.id"),
|
|
6406
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
6407
|
+
props
|
|
6408
|
+
], "p0.builderComponents")
|
|
6409
|
+
}
|
|
6410
|
+
}, 3, "hf_1"), 1, "hf_2") : null
|
|
6411
|
+
]
|
|
6412
|
+
}, 1, "hf_3");
|
|
6413
|
+
}), 1, "hf_4");
|
|
6414
|
+
}, "Accordion_component_jkuUCHm0nt0"));
|
|
6415
|
+
const defaultTitle = {
|
|
6416
|
+
"@type": "@builder.io/sdk:Element",
|
|
6417
|
+
layerName: "Accordion item title",
|
|
6418
|
+
responsiveStyles: {
|
|
6419
|
+
large: {
|
|
6420
|
+
marginTop: "10px",
|
|
6421
|
+
position: "relative",
|
|
6422
|
+
display: "flex",
|
|
6423
|
+
alignItems: "stretch",
|
|
6424
|
+
flexDirection: "column",
|
|
6425
|
+
paddingBottom: "10px"
|
|
6426
|
+
}
|
|
6427
|
+
},
|
|
6428
|
+
children: [
|
|
6429
|
+
{
|
|
6430
|
+
"@type": "@builder.io/sdk:Element",
|
|
6431
|
+
responsiveStyles: {
|
|
6432
|
+
large: {
|
|
6433
|
+
textAlign: "left",
|
|
6434
|
+
display: "flex",
|
|
6435
|
+
flexDirection: "column"
|
|
6436
|
+
}
|
|
6437
|
+
},
|
|
6438
|
+
component: {
|
|
6439
|
+
name: "Text",
|
|
6440
|
+
options: {
|
|
6441
|
+
text: "I am an accordion title. Click me!"
|
|
6442
|
+
}
|
|
6443
|
+
}
|
|
6444
|
+
}
|
|
6445
|
+
]
|
|
6446
|
+
};
|
|
6447
|
+
const defaultDetail = {
|
|
6448
|
+
"@type": "@builder.io/sdk:Element",
|
|
6449
|
+
layerName: "Accordion item detail",
|
|
6450
|
+
responsiveStyles: {
|
|
6451
|
+
large: {
|
|
6452
|
+
position: "relative",
|
|
6453
|
+
display: "flex",
|
|
6454
|
+
alignItems: "stretch",
|
|
6455
|
+
flexDirection: "column",
|
|
6456
|
+
marginTop: "10px",
|
|
6457
|
+
paddingBottom: "10px"
|
|
6458
|
+
}
|
|
6459
|
+
},
|
|
6460
|
+
children: [
|
|
6461
|
+
{
|
|
6462
|
+
"@type": "@builder.io/sdk:Element",
|
|
6463
|
+
responsiveStyles: {
|
|
6464
|
+
large: {
|
|
6465
|
+
paddingTop: "50px",
|
|
6466
|
+
textAlign: "left",
|
|
6467
|
+
display: "flex",
|
|
6468
|
+
flexDirection: "column",
|
|
6469
|
+
paddingBottom: "50px"
|
|
6470
|
+
}
|
|
6471
|
+
},
|
|
6472
|
+
component: {
|
|
6473
|
+
name: "Text",
|
|
6474
|
+
options: {
|
|
6475
|
+
text: "I am an accordion detail, hello!"
|
|
6476
|
+
}
|
|
6477
|
+
}
|
|
6478
|
+
}
|
|
6479
|
+
]
|
|
6480
|
+
};
|
|
6481
|
+
const componentInfo$8 = {
|
|
6482
|
+
name: "Builder:Accordion",
|
|
6483
|
+
canHaveChildren: true,
|
|
6484
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
6485
|
+
defaultStyles: {
|
|
6486
|
+
display: "flex",
|
|
6487
|
+
flexDirection: "column",
|
|
6488
|
+
alignItems: "stretch"
|
|
6489
|
+
},
|
|
6490
|
+
inputs: [
|
|
6491
|
+
{
|
|
6492
|
+
name: "items",
|
|
6493
|
+
type: "list",
|
|
6494
|
+
broadcast: true,
|
|
6495
|
+
subFields: [
|
|
6496
|
+
{
|
|
6497
|
+
name: "title",
|
|
6498
|
+
type: "uiBlocks",
|
|
6499
|
+
hideFromUI: true,
|
|
6500
|
+
defaultValue: [
|
|
6501
|
+
defaultTitle
|
|
6502
|
+
]
|
|
6503
|
+
},
|
|
6504
|
+
{
|
|
6505
|
+
name: "detail",
|
|
6506
|
+
type: "uiBlocks",
|
|
6507
|
+
hideFromUI: true,
|
|
6508
|
+
defaultValue: [
|
|
6509
|
+
defaultDetail
|
|
6510
|
+
]
|
|
6511
|
+
}
|
|
6512
|
+
],
|
|
6513
|
+
defaultValue: [
|
|
6514
|
+
{
|
|
6515
|
+
title: [
|
|
6516
|
+
defaultTitle
|
|
6517
|
+
],
|
|
6518
|
+
detail: [
|
|
6519
|
+
defaultDetail
|
|
6520
|
+
]
|
|
6521
|
+
},
|
|
6522
|
+
{
|
|
6523
|
+
title: [
|
|
6524
|
+
defaultTitle
|
|
6525
|
+
],
|
|
6526
|
+
detail: [
|
|
6527
|
+
defaultDetail
|
|
6528
|
+
]
|
|
6529
|
+
}
|
|
6530
|
+
],
|
|
6531
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
6532
|
+
},
|
|
6533
|
+
{
|
|
6534
|
+
name: "oneAtATime",
|
|
6535
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
6536
|
+
type: "boolean",
|
|
6537
|
+
defaultValue: false
|
|
6538
|
+
},
|
|
6539
|
+
{
|
|
6540
|
+
name: "grid",
|
|
6541
|
+
helperText: "Display as a grid",
|
|
6542
|
+
type: "boolean",
|
|
6543
|
+
defaultValue: false
|
|
6544
|
+
},
|
|
6545
|
+
{
|
|
6546
|
+
name: "gridRowWidth",
|
|
6547
|
+
helperText: "Display as a grid",
|
|
6548
|
+
type: "string",
|
|
6549
|
+
showIf: (options) => options.get("grid"),
|
|
6550
|
+
defaultValue: "25%"
|
|
6551
|
+
},
|
|
6552
|
+
{
|
|
6553
|
+
name: "useChildrenForItems",
|
|
6554
|
+
type: "boolean",
|
|
6555
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
6556
|
+
advanced: true,
|
|
6557
|
+
defaultValue: false,
|
|
6558
|
+
onChange: (options) => {
|
|
6559
|
+
if (options.get("useChildrenForItems") === true)
|
|
6560
|
+
options.set("items", []);
|
|
6561
|
+
}
|
|
6562
|
+
}
|
|
6563
|
+
]
|
|
6564
|
+
};
|
|
6204
6565
|
const componentInfo$7 = {
|
|
6205
6566
|
name: "Custom Code",
|
|
6206
6567
|
static: true,
|
|
@@ -7445,40 +7806,44 @@ const getExtraComponents = () => [
|
|
|
7445
7806
|
const getDefaultRegisteredComponents = () => [
|
|
7446
7807
|
{
|
|
7447
7808
|
component: Button,
|
|
7448
|
-
...componentInfo$
|
|
7809
|
+
...componentInfo$h
|
|
7449
7810
|
},
|
|
7450
7811
|
{
|
|
7451
7812
|
component: Columns,
|
|
7452
|
-
...componentInfo$
|
|
7813
|
+
...componentInfo$g
|
|
7453
7814
|
},
|
|
7454
7815
|
{
|
|
7455
7816
|
component: FragmentComponent,
|
|
7456
|
-
...componentInfo$
|
|
7817
|
+
...componentInfo$f
|
|
7457
7818
|
},
|
|
7458
7819
|
{
|
|
7459
7820
|
component: Image,
|
|
7460
|
-
...componentInfo$
|
|
7821
|
+
...componentInfo$e
|
|
7461
7822
|
},
|
|
7462
7823
|
{
|
|
7463
7824
|
component: SectionComponent,
|
|
7464
|
-
...componentInfo$
|
|
7825
|
+
...componentInfo$d
|
|
7465
7826
|
},
|
|
7466
7827
|
{
|
|
7467
7828
|
component: Slot,
|
|
7468
|
-
...componentInfo$
|
|
7829
|
+
...componentInfo$c
|
|
7469
7830
|
},
|
|
7470
7831
|
{
|
|
7471
7832
|
component: Symbol$1,
|
|
7472
|
-
...componentInfo$
|
|
7833
|
+
...componentInfo$b
|
|
7473
7834
|
},
|
|
7474
7835
|
{
|
|
7475
7836
|
component: Text,
|
|
7476
|
-
...componentInfo$
|
|
7837
|
+
...componentInfo$9
|
|
7477
7838
|
},
|
|
7478
7839
|
...[
|
|
7479
7840
|
{
|
|
7480
7841
|
component: Tabs,
|
|
7481
|
-
...componentInfo$
|
|
7842
|
+
...componentInfo$a
|
|
7843
|
+
},
|
|
7844
|
+
{
|
|
7845
|
+
component: Accordion,
|
|
7846
|
+
...componentInfo$8
|
|
7482
7847
|
}
|
|
7483
7848
|
],
|
|
7484
7849
|
...getExtraComponents()
|
|
@@ -7937,7 +8302,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7937
8302
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7938
8303
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7939
8304
|
}
|
|
7940
|
-
const SDK_VERSION = "0.14.
|
|
8305
|
+
const SDK_VERSION = "0.14.22";
|
|
7941
8306
|
const registry = {};
|
|
7942
8307
|
function register(type, info) {
|
|
7943
8308
|
let typeList = registry[type];
|
|
@@ -8258,7 +8623,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps,
|
|
|
8258
8623
|
enableCache: false
|
|
8259
8624
|
});
|
|
8260
8625
|
};
|
|
8261
|
-
const onClick = function
|
|
8626
|
+
const onClick = function onClick24(props, state, showContentProps, elementRef, event) {
|
|
8262
8627
|
var _a, _b;
|
|
8263
8628
|
if (props.builderContextSignal.content) {
|
|
8264
8629
|
const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
@@ -8417,7 +8782,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8417
8782
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
8418
8783
|
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8419
8784
|
if (!props2.apiKey)
|
|
8420
|
-
logger.error("No API key provided to `
|
|
8785
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
8421
8786
|
evaluateJsCode(props2);
|
|
8422
8787
|
runHttpRequests(props2, state2, showContentProps2, elementRef2);
|
|
8423
8788
|
emitStateUpdate(props2);
|