@builder.io/sdk-qwik 0.14.21 → 0.14.23
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 +388 -22
- package/lib/browser/index.qwik.mjs +388 -22
- package/lib/edge/index.qwik.cjs +388 -22
- package/lib/edge/index.qwik.mjs +388 -22
- package/lib/node/index.qwik.cjs +388 -22
- package/lib/node/index.qwik.mjs +388 -22
- package/package.json +3 -3
- 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
|
@@ -367,6 +367,7 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
367
367
|
else
|
|
368
368
|
return transformedBlock;
|
|
369
369
|
}
|
|
370
|
+
const camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
370
371
|
function throttle(func, wait, options = {}) {
|
|
371
372
|
let context;
|
|
372
373
|
let args;
|
|
@@ -413,7 +414,6 @@ function assign(target, ..._args) {
|
|
|
413
414
|
}
|
|
414
415
|
return to;
|
|
415
416
|
}
|
|
416
|
-
const camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
417
417
|
function bindAnimations(animations) {
|
|
418
418
|
for (const animation of animations)
|
|
419
419
|
switch (animation.trigger) {
|
|
@@ -464,7 +464,7 @@ function triggerAnimation(animation) {
|
|
|
464
464
|
element.style.transitionDelay = "0";
|
|
465
465
|
assign(element.style, animation.steps[0].styles);
|
|
466
466
|
setTimeout(() => {
|
|
467
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
467
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
468
468
|
if (animation.delay)
|
|
469
469
|
element.style.transitionDelay = animation.delay + "s";
|
|
470
470
|
assign(element.style, animation.steps[1].styles);
|
|
@@ -522,7 +522,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
522
522
|
}
|
|
523
523
|
attachDefaultState();
|
|
524
524
|
setTimeout(() => {
|
|
525
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
525
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
526
526
|
if (animation.delay)
|
|
527
527
|
element.style.transitionDelay = animation.delay + "s";
|
|
528
528
|
});
|
|
@@ -533,7 +533,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
533
533
|
immediateOnScroll();
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
537
536
|
const convertStyleMapToCSSArray = (style) => {
|
|
538
537
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
539
538
|
if (typeof value === "string")
|
|
@@ -637,7 +636,8 @@ const shouldPassLinkComponent = (block) => {
|
|
|
637
636
|
"Symbol",
|
|
638
637
|
"Columns",
|
|
639
638
|
"Form:Form",
|
|
640
|
-
"Builder: Tabs"
|
|
639
|
+
"Builder: Tabs",
|
|
640
|
+
"Builder:Accordion"
|
|
641
641
|
].includes(block.name));
|
|
642
642
|
};
|
|
643
643
|
const shouldPassRegisteredComponents = (block) => {
|
|
@@ -645,7 +645,8 @@ const shouldPassRegisteredComponents = (block) => {
|
|
|
645
645
|
"Symbol",
|
|
646
646
|
"Columns",
|
|
647
647
|
"Form:Form",
|
|
648
|
-
"Builder: Tabs"
|
|
648
|
+
"Builder: Tabs",
|
|
649
|
+
"Builder:Accordion"
|
|
649
650
|
].includes(block.name));
|
|
650
651
|
};
|
|
651
652
|
const SIZES = {
|
|
@@ -763,7 +764,7 @@ const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
763
764
|
className: `${className}:hover`,
|
|
764
765
|
styles: {
|
|
765
766
|
...hoverStyles,
|
|
766
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
767
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
767
768
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
768
769
|
}
|
|
769
770
|
}) || "";
|
|
@@ -1354,7 +1355,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1354
1355
|
}, 1, "jN_4") : null
|
|
1355
1356
|
}, 1, "jN_5");
|
|
1356
1357
|
}, "Block_component_nnPv0RY0U0k"));
|
|
1357
|
-
const onClick$
|
|
1358
|
+
const onClick$3 = function onClick2(props, state, className) {
|
|
1358
1359
|
var _a, _b;
|
|
1359
1360
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
1360
1361
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
@@ -1401,7 +1402,7 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
1401
1402
|
},
|
|
1402
1403
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
1403
1404
|
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
1404
|
-
return onClick$
|
|
1405
|
+
return onClick$3(props2);
|
|
1405
1406
|
}, "BlocksWrapper_component_onClick_ufezvOupQrM", [
|
|
1406
1407
|
className,
|
|
1407
1408
|
props,
|
|
@@ -1409,7 +1410,7 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
1409
1410
|
]),
|
|
1410
1411
|
onKeyPress$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
1411
1412
|
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
1412
|
-
return onClick$
|
|
1413
|
+
return onClick$3(props2);
|
|
1413
1414
|
}, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
|
|
1414
1415
|
className,
|
|
1415
1416
|
props,
|
|
@@ -2084,6 +2085,364 @@ const handleABTesting = async ({ item, canTrack }) => {
|
|
|
2084
2085
|
};
|
|
2085
2086
|
};
|
|
2086
2087
|
const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
2088
|
+
const defaultTitle = {
|
|
2089
|
+
"@type": "@builder.io/sdk:Element",
|
|
2090
|
+
layerName: "Accordion item title",
|
|
2091
|
+
responsiveStyles: {
|
|
2092
|
+
large: {
|
|
2093
|
+
marginTop: "10px",
|
|
2094
|
+
position: "relative",
|
|
2095
|
+
display: "flex",
|
|
2096
|
+
alignItems: "stretch",
|
|
2097
|
+
flexDirection: "column",
|
|
2098
|
+
paddingBottom: "10px"
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
children: [
|
|
2102
|
+
{
|
|
2103
|
+
"@type": "@builder.io/sdk:Element",
|
|
2104
|
+
responsiveStyles: {
|
|
2105
|
+
large: {
|
|
2106
|
+
textAlign: "left",
|
|
2107
|
+
display: "flex",
|
|
2108
|
+
flexDirection: "column"
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
component: {
|
|
2112
|
+
name: "Text",
|
|
2113
|
+
options: {
|
|
2114
|
+
text: "I am an accordion title. Click me!"
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
]
|
|
2119
|
+
};
|
|
2120
|
+
const defaultDetail = {
|
|
2121
|
+
"@type": "@builder.io/sdk:Element",
|
|
2122
|
+
layerName: "Accordion item detail",
|
|
2123
|
+
responsiveStyles: {
|
|
2124
|
+
large: {
|
|
2125
|
+
position: "relative",
|
|
2126
|
+
display: "flex",
|
|
2127
|
+
alignItems: "stretch",
|
|
2128
|
+
flexDirection: "column",
|
|
2129
|
+
marginTop: "10px",
|
|
2130
|
+
paddingBottom: "10px"
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
children: [
|
|
2134
|
+
{
|
|
2135
|
+
"@type": "@builder.io/sdk:Element",
|
|
2136
|
+
responsiveStyles: {
|
|
2137
|
+
large: {
|
|
2138
|
+
paddingTop: "50px",
|
|
2139
|
+
textAlign: "left",
|
|
2140
|
+
display: "flex",
|
|
2141
|
+
flexDirection: "column",
|
|
2142
|
+
paddingBottom: "50px"
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
component: {
|
|
2146
|
+
name: "Text",
|
|
2147
|
+
options: {
|
|
2148
|
+
text: "I am an accordion detail, hello!"
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
]
|
|
2153
|
+
};
|
|
2154
|
+
const componentInfo$h = {
|
|
2155
|
+
name: "Builder:Accordion",
|
|
2156
|
+
canHaveChildren: true,
|
|
2157
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
2158
|
+
defaultStyles: {
|
|
2159
|
+
display: "flex",
|
|
2160
|
+
flexDirection: "column",
|
|
2161
|
+
alignItems: "stretch"
|
|
2162
|
+
},
|
|
2163
|
+
inputs: [
|
|
2164
|
+
{
|
|
2165
|
+
name: "items",
|
|
2166
|
+
type: "list",
|
|
2167
|
+
broadcast: true,
|
|
2168
|
+
subFields: [
|
|
2169
|
+
{
|
|
2170
|
+
name: "title",
|
|
2171
|
+
type: "uiBlocks",
|
|
2172
|
+
hideFromUI: true,
|
|
2173
|
+
defaultValue: [
|
|
2174
|
+
defaultTitle
|
|
2175
|
+
]
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
name: "detail",
|
|
2179
|
+
type: "uiBlocks",
|
|
2180
|
+
hideFromUI: true,
|
|
2181
|
+
defaultValue: [
|
|
2182
|
+
defaultDetail
|
|
2183
|
+
]
|
|
2184
|
+
}
|
|
2185
|
+
],
|
|
2186
|
+
defaultValue: [
|
|
2187
|
+
{
|
|
2188
|
+
title: [
|
|
2189
|
+
defaultTitle
|
|
2190
|
+
],
|
|
2191
|
+
detail: [
|
|
2192
|
+
defaultDetail
|
|
2193
|
+
]
|
|
2194
|
+
},
|
|
2195
|
+
{
|
|
2196
|
+
title: [
|
|
2197
|
+
defaultTitle
|
|
2198
|
+
],
|
|
2199
|
+
detail: [
|
|
2200
|
+
defaultDetail
|
|
2201
|
+
]
|
|
2202
|
+
}
|
|
2203
|
+
],
|
|
2204
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
name: "oneAtATime",
|
|
2208
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
2209
|
+
type: "boolean",
|
|
2210
|
+
defaultValue: false
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
name: "grid",
|
|
2214
|
+
helperText: "Display as a grid",
|
|
2215
|
+
type: "boolean",
|
|
2216
|
+
defaultValue: false
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
name: "gridRowWidth",
|
|
2220
|
+
helperText: "Display as a grid",
|
|
2221
|
+
type: "string",
|
|
2222
|
+
showIf: (options) => options.get("grid"),
|
|
2223
|
+
defaultValue: "25%"
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
name: "useChildrenForItems",
|
|
2227
|
+
type: "boolean",
|
|
2228
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
2229
|
+
advanced: true,
|
|
2230
|
+
defaultValue: false,
|
|
2231
|
+
onChange: (options) => {
|
|
2232
|
+
if (options.get("useChildrenForItems") === true)
|
|
2233
|
+
options.set("items", []);
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
]
|
|
2237
|
+
};
|
|
2238
|
+
const convertOrderNumberToString = (order) => {
|
|
2239
|
+
return order.toString();
|
|
2240
|
+
};
|
|
2241
|
+
const getAccordionTitleClassName = function getAccordionTitleClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
2242
|
+
return `builder-accordion-title builder-accordion-title-${state.open.includes(index) ? "open" : "closed"}`;
|
|
2243
|
+
};
|
|
2244
|
+
const getAccordionDetailClassName = function getAccordionDetailClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
2245
|
+
return `builder-accordion-detail builder-accordion-detail-${state.open.includes(index) ? "open" : "closed"}`;
|
|
2246
|
+
};
|
|
2247
|
+
const onClick$2 = function onClick22(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
2248
|
+
if (state.open.includes(index))
|
|
2249
|
+
state.open = onlyOneAtATime.value ? [] : state.open.filter((item) => item !== index);
|
|
2250
|
+
else
|
|
2251
|
+
state.open = onlyOneAtATime.value ? [
|
|
2252
|
+
index
|
|
2253
|
+
] : state.open.concat(index);
|
|
2254
|
+
};
|
|
2255
|
+
const Accordion = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2256
|
+
const state = qwik.useStore({
|
|
2257
|
+
open: []
|
|
2258
|
+
});
|
|
2259
|
+
const onlyOneAtATime = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2260
|
+
const [props2] = qwik.useLexicalScope();
|
|
2261
|
+
return Boolean(props2.grid || props2.oneAtATime);
|
|
2262
|
+
}, "Accordion_component_onlyOneAtATime_useComputed_QYD7IoPU2HY", [
|
|
2263
|
+
props
|
|
2264
|
+
]));
|
|
2265
|
+
const accordionStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2266
|
+
const [props2] = qwik.useLexicalScope();
|
|
2267
|
+
const styles = {
|
|
2268
|
+
display: "flex",
|
|
2269
|
+
alignItems: "stretch",
|
|
2270
|
+
flexDirection: "column",
|
|
2271
|
+
...props2.grid && {
|
|
2272
|
+
flexDirection: "row",
|
|
2273
|
+
alignItems: "flex-start",
|
|
2274
|
+
flexWrap: "wrap"
|
|
2275
|
+
}
|
|
2276
|
+
};
|
|
2277
|
+
return styles;
|
|
2278
|
+
}, "Accordion_component_accordionStyles_useComputed_Jrd0cwGn25U", [
|
|
2279
|
+
props
|
|
2280
|
+
]));
|
|
2281
|
+
const accordionTitleStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2282
|
+
const shared = {
|
|
2283
|
+
display: "flex",
|
|
2284
|
+
flexDirection: "column"
|
|
2285
|
+
};
|
|
2286
|
+
const styles = {
|
|
2287
|
+
...shared,
|
|
2288
|
+
alignItems: "stretch",
|
|
2289
|
+
cursor: "pointer"
|
|
2290
|
+
};
|
|
2291
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
2292
|
+
}, "Accordion_component_accordionTitleStyles_useComputed_FopdBMH0V6U"));
|
|
2293
|
+
const openGridItemOrder = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2294
|
+
const [props2, state2] = qwik.useLexicalScope();
|
|
2295
|
+
let itemOrder = null;
|
|
2296
|
+
const getOpenGridItemPosition = props2.grid && state2.open.length;
|
|
2297
|
+
if (getOpenGridItemPosition && document) {
|
|
2298
|
+
const openItemIndex = state2.open[0];
|
|
2299
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
2300
|
+
let subjectItem = openItem;
|
|
2301
|
+
itemOrder = openItemIndex;
|
|
2302
|
+
if (subjectItem) {
|
|
2303
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
2304
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling)
|
|
2305
|
+
if (subjectItem) {
|
|
2306
|
+
if (subjectItem.classList.contains("builder-accordion-detail"))
|
|
2307
|
+
continue;
|
|
2308
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
2309
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
2310
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
2311
|
+
if (!isNaN(index)) {
|
|
2312
|
+
prevItemRect = subjectItemRect;
|
|
2313
|
+
itemOrder = index;
|
|
2314
|
+
}
|
|
2315
|
+
} else
|
|
2316
|
+
break;
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
if (typeof itemOrder === "number")
|
|
2321
|
+
itemOrder = itemOrder + 1;
|
|
2322
|
+
return itemOrder;
|
|
2323
|
+
}, "Accordion_component_openGridItemOrder_useComputed_cCQY1Vnxll0", [
|
|
2324
|
+
props,
|
|
2325
|
+
state
|
|
2326
|
+
]));
|
|
2327
|
+
const accordionDetailStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
2328
|
+
const [openGridItemOrder2, props2] = qwik.useLexicalScope();
|
|
2329
|
+
const styles = {
|
|
2330
|
+
order: typeof openGridItemOrder2.value === "number" ? openGridItemOrder2.value : void 0,
|
|
2331
|
+
...props2.grid && {
|
|
2332
|
+
width: "100%"
|
|
2333
|
+
}
|
|
2334
|
+
};
|
|
2335
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
2336
|
+
}, "Accordion_component_accordionDetailStyles_useComputed_S0QmQzGJoRo", [
|
|
2337
|
+
openGridItemOrder,
|
|
2338
|
+
props
|
|
2339
|
+
]));
|
|
2340
|
+
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
2341
|
+
class: "builder-accordion",
|
|
2342
|
+
style: qwik._fnSignal((p0) => p0.value, [
|
|
2343
|
+
accordionStyles
|
|
2344
|
+
], "p0.value")
|
|
2345
|
+
}, (props.items || []).map((item, index) => {
|
|
2346
|
+
qwik._jsxBranch();
|
|
2347
|
+
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
2348
|
+
children: [
|
|
2349
|
+
/* @__PURE__ */ qwik._jsxQ("div", {
|
|
2350
|
+
class: getAccordionTitleClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index),
|
|
2351
|
+
"data-index": index,
|
|
2352
|
+
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
2353
|
+
const [accordionDetailStyles2, accordionStyles2, accordionTitleStyles2, index2, onlyOneAtATime2, openGridItemOrder2, props2, state2] = qwik.useLexicalScope();
|
|
2354
|
+
return onClick$2(props2, state2, onlyOneAtATime2, accordionStyles2, accordionTitleStyles2, openGridItemOrder2, accordionDetailStyles2, index2);
|
|
2355
|
+
}, "Accordion_component_div_Fragment_div_onClick_VtzhhJnK0XI", [
|
|
2356
|
+
accordionDetailStyles,
|
|
2357
|
+
accordionStyles,
|
|
2358
|
+
accordionTitleStyles,
|
|
2359
|
+
index,
|
|
2360
|
+
onlyOneAtATime,
|
|
2361
|
+
openGridItemOrder,
|
|
2362
|
+
props,
|
|
2363
|
+
state
|
|
2364
|
+
]),
|
|
2365
|
+
style: {
|
|
2366
|
+
...accordionTitleStyles.value,
|
|
2367
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
2368
|
+
order: openGridItemOrder.value !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
2369
|
+
}
|
|
2370
|
+
}, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
2371
|
+
get blocks() {
|
|
2372
|
+
return item.title;
|
|
2373
|
+
},
|
|
2374
|
+
path: `items.${index}.title`,
|
|
2375
|
+
get parent() {
|
|
2376
|
+
return props.builderBlock.id;
|
|
2377
|
+
},
|
|
2378
|
+
get context() {
|
|
2379
|
+
return props.builderContext;
|
|
2380
|
+
},
|
|
2381
|
+
get registeredComponents() {
|
|
2382
|
+
return props.builderComponents;
|
|
2383
|
+
},
|
|
2384
|
+
get linkComponent() {
|
|
2385
|
+
return props.builderLinkComponent;
|
|
2386
|
+
},
|
|
2387
|
+
[qwik._IMMUTABLE]: {
|
|
2388
|
+
blocks: qwik._wrapProp(item, "title"),
|
|
2389
|
+
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
2390
|
+
props
|
|
2391
|
+
], "p0.builderContext"),
|
|
2392
|
+
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
2393
|
+
props
|
|
2394
|
+
], "p0.builderLinkComponent"),
|
|
2395
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
2396
|
+
props
|
|
2397
|
+
], "p0.builderBlock.id"),
|
|
2398
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
2399
|
+
props
|
|
2400
|
+
], "p0.builderComponents")
|
|
2401
|
+
}
|
|
2402
|
+
}, 3, "hf_0"), 0, null),
|
|
2403
|
+
state.open.includes(index) ? /* @__PURE__ */ qwik._jsxQ("div", {
|
|
2404
|
+
class: getAccordionDetailClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index)
|
|
2405
|
+
}, {
|
|
2406
|
+
style: qwik._fnSignal((p0) => p0.value, [
|
|
2407
|
+
accordionDetailStyles
|
|
2408
|
+
], "p0.value")
|
|
2409
|
+
}, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
2410
|
+
get blocks() {
|
|
2411
|
+
return item.detail;
|
|
2412
|
+
},
|
|
2413
|
+
path: `items.${index}.detail`,
|
|
2414
|
+
get parent() {
|
|
2415
|
+
return props.builderBlock.id;
|
|
2416
|
+
},
|
|
2417
|
+
get context() {
|
|
2418
|
+
return props.builderContext;
|
|
2419
|
+
},
|
|
2420
|
+
get registeredComponents() {
|
|
2421
|
+
return props.builderComponents;
|
|
2422
|
+
},
|
|
2423
|
+
get linkComponent() {
|
|
2424
|
+
return props.builderLinkComponent;
|
|
2425
|
+
},
|
|
2426
|
+
[qwik._IMMUTABLE]: {
|
|
2427
|
+
blocks: qwik._wrapProp(item, "detail"),
|
|
2428
|
+
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
2429
|
+
props
|
|
2430
|
+
], "p0.builderContext"),
|
|
2431
|
+
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
2432
|
+
props
|
|
2433
|
+
], "p0.builderLinkComponent"),
|
|
2434
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
2435
|
+
props
|
|
2436
|
+
], "p0.builderBlock.id"),
|
|
2437
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
2438
|
+
props
|
|
2439
|
+
], "p0.builderComponents")
|
|
2440
|
+
}
|
|
2441
|
+
}, 3, "hf_1"), 1, "hf_2") : null
|
|
2442
|
+
]
|
|
2443
|
+
}, 1, "hf_3");
|
|
2444
|
+
}), 1, "hf_4");
|
|
2445
|
+
}, "Accordion_component_jkuUCHm0nt0"));
|
|
2087
2446
|
const componentInfo$g = {
|
|
2088
2447
|
name: "Core:Button",
|
|
2089
2448
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -2830,8 +3189,11 @@ const componentInfo$9 = {
|
|
|
2830
3189
|
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
2831
3190
|
return props.tabs && props.tabs[active].content;
|
|
2832
3191
|
};
|
|
2833
|
-
const
|
|
2834
|
-
|
|
3192
|
+
const onClick$1 = function onClick23(props, state, index) {
|
|
3193
|
+
if (index === state.activeTab && props.collapsible)
|
|
3194
|
+
state.activeTab = -1;
|
|
3195
|
+
else
|
|
3196
|
+
state.activeTab = index;
|
|
2835
3197
|
};
|
|
2836
3198
|
const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
2837
3199
|
qwik._jsxBranch();
|
|
@@ -2854,16 +3216,15 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
2854
3216
|
class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
|
|
2855
3217
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
2856
3218
|
const [index2, props2, state2] = qwik.useLexicalScope();
|
|
2857
|
-
|
|
2858
|
-
state2.activeTab = -1;
|
|
2859
|
-
else
|
|
2860
|
-
state2.activeTab = index2;
|
|
3219
|
+
return onClick$1(props2, state2, index2);
|
|
2861
3220
|
}, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
|
|
2862
3221
|
index,
|
|
2863
3222
|
props,
|
|
2864
3223
|
state
|
|
2865
3224
|
]),
|
|
2866
|
-
style:
|
|
3225
|
+
style: {
|
|
3226
|
+
...state.activeTab === index ? props.activeTabStyle : {}
|
|
3227
|
+
}
|
|
2867
3228
|
}, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
2868
3229
|
get parent() {
|
|
2869
3230
|
return props.builderBlock.id;
|
|
@@ -3459,11 +3820,11 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
|
|
|
3459
3820
|
return;
|
|
3460
3821
|
}
|
|
3461
3822
|
event.preventDefault();
|
|
3462
|
-
const el = event.currentTarget;
|
|
3823
|
+
const el = event.currentTarget || event.target;
|
|
3463
3824
|
const headers = props.customHeaders || {};
|
|
3464
3825
|
let body;
|
|
3465
3826
|
const formData = new FormData(el);
|
|
3466
|
-
const formPairs = Array.from(
|
|
3827
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
3467
3828
|
let value;
|
|
3468
3829
|
const key = el2.name;
|
|
3469
3830
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -3710,6 +4071,7 @@ const FormComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
3710
4071
|
name: qwik._fnSignal((p0) => p0.name, [
|
|
3711
4072
|
props
|
|
3712
4073
|
], "p0.name"),
|
|
4074
|
+
"preventdefault:submit": true,
|
|
3713
4075
|
validate: qwik._fnSignal((p0) => p0.validate, [
|
|
3714
4076
|
props
|
|
3715
4077
|
], "p0.validate")
|
|
@@ -4248,6 +4610,10 @@ const getDefaultRegisteredComponents = () => [
|
|
|
4248
4610
|
{
|
|
4249
4611
|
component: Tabs,
|
|
4250
4612
|
...componentInfo$9
|
|
4613
|
+
},
|
|
4614
|
+
{
|
|
4615
|
+
component: Accordion,
|
|
4616
|
+
...componentInfo$h
|
|
4251
4617
|
}
|
|
4252
4618
|
],
|
|
4253
4619
|
...getExtraComponents()
|
|
@@ -4706,7 +5072,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4706
5072
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4707
5073
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4708
5074
|
}
|
|
4709
|
-
const SDK_VERSION = "0.14.
|
|
5075
|
+
const SDK_VERSION = "0.14.23";
|
|
4710
5076
|
const registry = {};
|
|
4711
5077
|
function register(type, info) {
|
|
4712
5078
|
let typeList = registry[type];
|
|
@@ -5027,7 +5393,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps,
|
|
|
5027
5393
|
enableCache: false
|
|
5028
5394
|
});
|
|
5029
5395
|
};
|
|
5030
|
-
const onClick = function
|
|
5396
|
+
const onClick = function onClick24(props, state, showContentProps, elementRef, event) {
|
|
5031
5397
|
var _a, _b;
|
|
5032
5398
|
if (props.builderContextSignal.content) {
|
|
5033
5399
|
const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
@@ -5186,7 +5552,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
5186
5552
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
5187
5553
|
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
5188
5554
|
if (!props2.apiKey)
|
|
5189
|
-
logger.error("No API key provided to `
|
|
5555
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
5190
5556
|
evaluateJsCode(props2);
|
|
5191
5557
|
runHttpRequests(props2, state2, showContentProps2, elementRef2);
|
|
5192
5558
|
emitStateUpdate(props2);
|