@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
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -3596,6 +3596,7 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
3596
3596
|
else
|
|
3597
3597
|
return transformedBlock;
|
|
3598
3598
|
}
|
|
3599
|
+
const camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
3599
3600
|
function throttle(func, wait, options = {}) {
|
|
3600
3601
|
let context;
|
|
3601
3602
|
let args;
|
|
@@ -3642,7 +3643,6 @@ function assign(target, ..._args) {
|
|
|
3642
3643
|
}
|
|
3643
3644
|
return to;
|
|
3644
3645
|
}
|
|
3645
|
-
const camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
3646
3646
|
function bindAnimations(animations) {
|
|
3647
3647
|
for (const animation of animations)
|
|
3648
3648
|
switch (animation.trigger) {
|
|
@@ -3693,7 +3693,7 @@ function triggerAnimation(animation) {
|
|
|
3693
3693
|
element.style.transitionDelay = "0";
|
|
3694
3694
|
assign(element.style, animation.steps[0].styles);
|
|
3695
3695
|
setTimeout(() => {
|
|
3696
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3696
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3697
3697
|
if (animation.delay)
|
|
3698
3698
|
element.style.transitionDelay = animation.delay + "s";
|
|
3699
3699
|
assign(element.style, animation.steps[1].styles);
|
|
@@ -3751,7 +3751,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3751
3751
|
}
|
|
3752
3752
|
attachDefaultState();
|
|
3753
3753
|
setTimeout(() => {
|
|
3754
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3754
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3755
3755
|
if (animation.delay)
|
|
3756
3756
|
element.style.transitionDelay = animation.delay + "s";
|
|
3757
3757
|
});
|
|
@@ -3762,7 +3762,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3762
3762
|
immediateOnScroll();
|
|
3763
3763
|
});
|
|
3764
3764
|
}
|
|
3765
|
-
const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
3766
3765
|
const convertStyleMapToCSSArray = (style) => {
|
|
3767
3766
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
3768
3767
|
if (typeof value === "string")
|
|
@@ -3866,7 +3865,8 @@ const shouldPassLinkComponent = (block) => {
|
|
|
3866
3865
|
"Symbol",
|
|
3867
3866
|
"Columns",
|
|
3868
3867
|
"Form:Form",
|
|
3869
|
-
"Builder: Tabs"
|
|
3868
|
+
"Builder: Tabs",
|
|
3869
|
+
"Builder:Accordion"
|
|
3870
3870
|
].includes(block.name));
|
|
3871
3871
|
};
|
|
3872
3872
|
const shouldPassRegisteredComponents = (block) => {
|
|
@@ -3874,7 +3874,8 @@ const shouldPassRegisteredComponents = (block) => {
|
|
|
3874
3874
|
"Symbol",
|
|
3875
3875
|
"Columns",
|
|
3876
3876
|
"Form:Form",
|
|
3877
|
-
"Builder: Tabs"
|
|
3877
|
+
"Builder: Tabs",
|
|
3878
|
+
"Builder:Accordion"
|
|
3878
3879
|
].includes(block.name));
|
|
3879
3880
|
};
|
|
3880
3881
|
const SIZES = {
|
|
@@ -3992,7 +3993,7 @@ const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
3992
3993
|
className: `${className}:hover`,
|
|
3993
3994
|
styles: {
|
|
3994
3995
|
...hoverStyles,
|
|
3995
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
3996
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
3996
3997
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
3997
3998
|
}
|
|
3998
3999
|
}) || "";
|
|
@@ -4583,7 +4584,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
4583
4584
|
}, 1, "jN_4") : null
|
|
4584
4585
|
}, 1, "jN_5");
|
|
4585
4586
|
}, "Block_component_nnPv0RY0U0k"));
|
|
4586
|
-
const onClick$
|
|
4587
|
+
const onClick$3 = function onClick2(props, state, className) {
|
|
4587
4588
|
var _a, _b;
|
|
4588
4589
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
4589
4590
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
@@ -4630,7 +4631,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
4630
4631
|
},
|
|
4631
4632
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
4632
4633
|
const [className2, props2, state2] = useLexicalScope();
|
|
4633
|
-
return onClick$
|
|
4634
|
+
return onClick$3(props2);
|
|
4634
4635
|
}, "BlocksWrapper_component_onClick_ufezvOupQrM", [
|
|
4635
4636
|
className,
|
|
4636
4637
|
props,
|
|
@@ -4638,7 +4639,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
4638
4639
|
]),
|
|
4639
4640
|
onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
4640
4641
|
const [className2, props2, state2] = useLexicalScope();
|
|
4641
|
-
return onClick$
|
|
4642
|
+
return onClick$3(props2);
|
|
4642
4643
|
}, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
|
|
4643
4644
|
className,
|
|
4644
4645
|
props,
|
|
@@ -5313,6 +5314,364 @@ const handleABTesting = async ({ item, canTrack }) => {
|
|
|
5313
5314
|
};
|
|
5314
5315
|
};
|
|
5315
5316
|
const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
5317
|
+
const defaultTitle = {
|
|
5318
|
+
"@type": "@builder.io/sdk:Element",
|
|
5319
|
+
layerName: "Accordion item title",
|
|
5320
|
+
responsiveStyles: {
|
|
5321
|
+
large: {
|
|
5322
|
+
marginTop: "10px",
|
|
5323
|
+
position: "relative",
|
|
5324
|
+
display: "flex",
|
|
5325
|
+
alignItems: "stretch",
|
|
5326
|
+
flexDirection: "column",
|
|
5327
|
+
paddingBottom: "10px"
|
|
5328
|
+
}
|
|
5329
|
+
},
|
|
5330
|
+
children: [
|
|
5331
|
+
{
|
|
5332
|
+
"@type": "@builder.io/sdk:Element",
|
|
5333
|
+
responsiveStyles: {
|
|
5334
|
+
large: {
|
|
5335
|
+
textAlign: "left",
|
|
5336
|
+
display: "flex",
|
|
5337
|
+
flexDirection: "column"
|
|
5338
|
+
}
|
|
5339
|
+
},
|
|
5340
|
+
component: {
|
|
5341
|
+
name: "Text",
|
|
5342
|
+
options: {
|
|
5343
|
+
text: "I am an accordion title. Click me!"
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
]
|
|
5348
|
+
};
|
|
5349
|
+
const defaultDetail = {
|
|
5350
|
+
"@type": "@builder.io/sdk:Element",
|
|
5351
|
+
layerName: "Accordion item detail",
|
|
5352
|
+
responsiveStyles: {
|
|
5353
|
+
large: {
|
|
5354
|
+
position: "relative",
|
|
5355
|
+
display: "flex",
|
|
5356
|
+
alignItems: "stretch",
|
|
5357
|
+
flexDirection: "column",
|
|
5358
|
+
marginTop: "10px",
|
|
5359
|
+
paddingBottom: "10px"
|
|
5360
|
+
}
|
|
5361
|
+
},
|
|
5362
|
+
children: [
|
|
5363
|
+
{
|
|
5364
|
+
"@type": "@builder.io/sdk:Element",
|
|
5365
|
+
responsiveStyles: {
|
|
5366
|
+
large: {
|
|
5367
|
+
paddingTop: "50px",
|
|
5368
|
+
textAlign: "left",
|
|
5369
|
+
display: "flex",
|
|
5370
|
+
flexDirection: "column",
|
|
5371
|
+
paddingBottom: "50px"
|
|
5372
|
+
}
|
|
5373
|
+
},
|
|
5374
|
+
component: {
|
|
5375
|
+
name: "Text",
|
|
5376
|
+
options: {
|
|
5377
|
+
text: "I am an accordion detail, hello!"
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
}
|
|
5381
|
+
]
|
|
5382
|
+
};
|
|
5383
|
+
const componentInfo$h = {
|
|
5384
|
+
name: "Builder:Accordion",
|
|
5385
|
+
canHaveChildren: true,
|
|
5386
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
5387
|
+
defaultStyles: {
|
|
5388
|
+
display: "flex",
|
|
5389
|
+
flexDirection: "column",
|
|
5390
|
+
alignItems: "stretch"
|
|
5391
|
+
},
|
|
5392
|
+
inputs: [
|
|
5393
|
+
{
|
|
5394
|
+
name: "items",
|
|
5395
|
+
type: "list",
|
|
5396
|
+
broadcast: true,
|
|
5397
|
+
subFields: [
|
|
5398
|
+
{
|
|
5399
|
+
name: "title",
|
|
5400
|
+
type: "uiBlocks",
|
|
5401
|
+
hideFromUI: true,
|
|
5402
|
+
defaultValue: [
|
|
5403
|
+
defaultTitle
|
|
5404
|
+
]
|
|
5405
|
+
},
|
|
5406
|
+
{
|
|
5407
|
+
name: "detail",
|
|
5408
|
+
type: "uiBlocks",
|
|
5409
|
+
hideFromUI: true,
|
|
5410
|
+
defaultValue: [
|
|
5411
|
+
defaultDetail
|
|
5412
|
+
]
|
|
5413
|
+
}
|
|
5414
|
+
],
|
|
5415
|
+
defaultValue: [
|
|
5416
|
+
{
|
|
5417
|
+
title: [
|
|
5418
|
+
defaultTitle
|
|
5419
|
+
],
|
|
5420
|
+
detail: [
|
|
5421
|
+
defaultDetail
|
|
5422
|
+
]
|
|
5423
|
+
},
|
|
5424
|
+
{
|
|
5425
|
+
title: [
|
|
5426
|
+
defaultTitle
|
|
5427
|
+
],
|
|
5428
|
+
detail: [
|
|
5429
|
+
defaultDetail
|
|
5430
|
+
]
|
|
5431
|
+
}
|
|
5432
|
+
],
|
|
5433
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
5434
|
+
},
|
|
5435
|
+
{
|
|
5436
|
+
name: "oneAtATime",
|
|
5437
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
5438
|
+
type: "boolean",
|
|
5439
|
+
defaultValue: false
|
|
5440
|
+
},
|
|
5441
|
+
{
|
|
5442
|
+
name: "grid",
|
|
5443
|
+
helperText: "Display as a grid",
|
|
5444
|
+
type: "boolean",
|
|
5445
|
+
defaultValue: false
|
|
5446
|
+
},
|
|
5447
|
+
{
|
|
5448
|
+
name: "gridRowWidth",
|
|
5449
|
+
helperText: "Display as a grid",
|
|
5450
|
+
type: "string",
|
|
5451
|
+
showIf: (options) => options.get("grid"),
|
|
5452
|
+
defaultValue: "25%"
|
|
5453
|
+
},
|
|
5454
|
+
{
|
|
5455
|
+
name: "useChildrenForItems",
|
|
5456
|
+
type: "boolean",
|
|
5457
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
5458
|
+
advanced: true,
|
|
5459
|
+
defaultValue: false,
|
|
5460
|
+
onChange: (options) => {
|
|
5461
|
+
if (options.get("useChildrenForItems") === true)
|
|
5462
|
+
options.set("items", []);
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
]
|
|
5466
|
+
};
|
|
5467
|
+
const convertOrderNumberToString = (order) => {
|
|
5468
|
+
return order.toString();
|
|
5469
|
+
};
|
|
5470
|
+
const getAccordionTitleClassName = function getAccordionTitleClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
5471
|
+
return `builder-accordion-title builder-accordion-title-${state.open.includes(index) ? "open" : "closed"}`;
|
|
5472
|
+
};
|
|
5473
|
+
const getAccordionDetailClassName = function getAccordionDetailClassName2(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
5474
|
+
return `builder-accordion-detail builder-accordion-detail-${state.open.includes(index) ? "open" : "closed"}`;
|
|
5475
|
+
};
|
|
5476
|
+
const onClick$2 = function onClick22(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index) {
|
|
5477
|
+
if (state.open.includes(index))
|
|
5478
|
+
state.open = onlyOneAtATime.value ? [] : state.open.filter((item) => item !== index);
|
|
5479
|
+
else
|
|
5480
|
+
state.open = onlyOneAtATime.value ? [
|
|
5481
|
+
index
|
|
5482
|
+
] : state.open.concat(index);
|
|
5483
|
+
};
|
|
5484
|
+
const Accordion = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
5485
|
+
const state = useStore({
|
|
5486
|
+
open: []
|
|
5487
|
+
});
|
|
5488
|
+
const onlyOneAtATime = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5489
|
+
const [props2] = useLexicalScope();
|
|
5490
|
+
return Boolean(props2.grid || props2.oneAtATime);
|
|
5491
|
+
}, "Accordion_component_onlyOneAtATime_useComputed_QYD7IoPU2HY", [
|
|
5492
|
+
props
|
|
5493
|
+
]));
|
|
5494
|
+
const accordionStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5495
|
+
const [props2] = useLexicalScope();
|
|
5496
|
+
const styles = {
|
|
5497
|
+
display: "flex",
|
|
5498
|
+
alignItems: "stretch",
|
|
5499
|
+
flexDirection: "column",
|
|
5500
|
+
...props2.grid && {
|
|
5501
|
+
flexDirection: "row",
|
|
5502
|
+
alignItems: "flex-start",
|
|
5503
|
+
flexWrap: "wrap"
|
|
5504
|
+
}
|
|
5505
|
+
};
|
|
5506
|
+
return styles;
|
|
5507
|
+
}, "Accordion_component_accordionStyles_useComputed_Jrd0cwGn25U", [
|
|
5508
|
+
props
|
|
5509
|
+
]));
|
|
5510
|
+
const accordionTitleStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5511
|
+
const shared = {
|
|
5512
|
+
display: "flex",
|
|
5513
|
+
flexDirection: "column"
|
|
5514
|
+
};
|
|
5515
|
+
const styles = {
|
|
5516
|
+
...shared,
|
|
5517
|
+
alignItems: "stretch",
|
|
5518
|
+
cursor: "pointer"
|
|
5519
|
+
};
|
|
5520
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
5521
|
+
}, "Accordion_component_accordionTitleStyles_useComputed_FopdBMH0V6U"));
|
|
5522
|
+
const openGridItemOrder = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5523
|
+
const [props2, state2] = useLexicalScope();
|
|
5524
|
+
let itemOrder = null;
|
|
5525
|
+
const getOpenGridItemPosition = props2.grid && state2.open.length;
|
|
5526
|
+
if (getOpenGridItemPosition && document) {
|
|
5527
|
+
const openItemIndex = state2.open[0];
|
|
5528
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
5529
|
+
let subjectItem = openItem;
|
|
5530
|
+
itemOrder = openItemIndex;
|
|
5531
|
+
if (subjectItem) {
|
|
5532
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
5533
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling)
|
|
5534
|
+
if (subjectItem) {
|
|
5535
|
+
if (subjectItem.classList.contains("builder-accordion-detail"))
|
|
5536
|
+
continue;
|
|
5537
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
5538
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
5539
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
5540
|
+
if (!isNaN(index)) {
|
|
5541
|
+
prevItemRect = subjectItemRect;
|
|
5542
|
+
itemOrder = index;
|
|
5543
|
+
}
|
|
5544
|
+
} else
|
|
5545
|
+
break;
|
|
5546
|
+
}
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5549
|
+
if (typeof itemOrder === "number")
|
|
5550
|
+
itemOrder = itemOrder + 1;
|
|
5551
|
+
return itemOrder;
|
|
5552
|
+
}, "Accordion_component_openGridItemOrder_useComputed_cCQY1Vnxll0", [
|
|
5553
|
+
props,
|
|
5554
|
+
state
|
|
5555
|
+
]));
|
|
5556
|
+
const accordionDetailStyles = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5557
|
+
const [openGridItemOrder2, props2] = useLexicalScope();
|
|
5558
|
+
const styles = {
|
|
5559
|
+
order: typeof openGridItemOrder2.value === "number" ? openGridItemOrder2.value : void 0,
|
|
5560
|
+
...props2.grid && {
|
|
5561
|
+
width: "100%"
|
|
5562
|
+
}
|
|
5563
|
+
};
|
|
5564
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
5565
|
+
}, "Accordion_component_accordionDetailStyles_useComputed_S0QmQzGJoRo", [
|
|
5566
|
+
openGridItemOrder,
|
|
5567
|
+
props
|
|
5568
|
+
]));
|
|
5569
|
+
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
5570
|
+
class: "builder-accordion",
|
|
5571
|
+
style: _fnSignal((p0) => p0.value, [
|
|
5572
|
+
accordionStyles
|
|
5573
|
+
], "p0.value")
|
|
5574
|
+
}, (props.items || []).map((item, index) => {
|
|
5575
|
+
_jsxBranch();
|
|
5576
|
+
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
5577
|
+
children: [
|
|
5578
|
+
/* @__PURE__ */ _jsxQ("div", {
|
|
5579
|
+
class: getAccordionTitleClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index),
|
|
5580
|
+
"data-index": index,
|
|
5581
|
+
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
5582
|
+
const [accordionDetailStyles2, accordionStyles2, accordionTitleStyles2, index2, onlyOneAtATime2, openGridItemOrder2, props2, state2] = useLexicalScope();
|
|
5583
|
+
return onClick$2(props2, state2, onlyOneAtATime2, accordionStyles2, accordionTitleStyles2, openGridItemOrder2, accordionDetailStyles2, index2);
|
|
5584
|
+
}, "Accordion_component_div_Fragment_div_onClick_VtzhhJnK0XI", [
|
|
5585
|
+
accordionDetailStyles,
|
|
5586
|
+
accordionStyles,
|
|
5587
|
+
accordionTitleStyles,
|
|
5588
|
+
index,
|
|
5589
|
+
onlyOneAtATime,
|
|
5590
|
+
openGridItemOrder,
|
|
5591
|
+
props,
|
|
5592
|
+
state
|
|
5593
|
+
]),
|
|
5594
|
+
style: {
|
|
5595
|
+
...accordionTitleStyles.value,
|
|
5596
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
5597
|
+
order: openGridItemOrder.value !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5598
|
+
}
|
|
5599
|
+
}, null, /* @__PURE__ */ _jsxC(Blocks, {
|
|
5600
|
+
get blocks() {
|
|
5601
|
+
return item.title;
|
|
5602
|
+
},
|
|
5603
|
+
path: `items.${index}.title`,
|
|
5604
|
+
get parent() {
|
|
5605
|
+
return props.builderBlock.id;
|
|
5606
|
+
},
|
|
5607
|
+
get context() {
|
|
5608
|
+
return props.builderContext;
|
|
5609
|
+
},
|
|
5610
|
+
get registeredComponents() {
|
|
5611
|
+
return props.builderComponents;
|
|
5612
|
+
},
|
|
5613
|
+
get linkComponent() {
|
|
5614
|
+
return props.builderLinkComponent;
|
|
5615
|
+
},
|
|
5616
|
+
[_IMMUTABLE]: {
|
|
5617
|
+
blocks: _wrapProp(item, "title"),
|
|
5618
|
+
context: _fnSignal((p0) => p0.builderContext, [
|
|
5619
|
+
props
|
|
5620
|
+
], "p0.builderContext"),
|
|
5621
|
+
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
5622
|
+
props
|
|
5623
|
+
], "p0.builderLinkComponent"),
|
|
5624
|
+
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
5625
|
+
props
|
|
5626
|
+
], "p0.builderBlock.id"),
|
|
5627
|
+
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
5628
|
+
props
|
|
5629
|
+
], "p0.builderComponents")
|
|
5630
|
+
}
|
|
5631
|
+
}, 3, "hf_0"), 0, null),
|
|
5632
|
+
state.open.includes(index) ? /* @__PURE__ */ _jsxQ("div", {
|
|
5633
|
+
class: getAccordionDetailClassName(props, state, onlyOneAtATime, accordionStyles, accordionTitleStyles, openGridItemOrder, accordionDetailStyles, index)
|
|
5634
|
+
}, {
|
|
5635
|
+
style: _fnSignal((p0) => p0.value, [
|
|
5636
|
+
accordionDetailStyles
|
|
5637
|
+
], "p0.value")
|
|
5638
|
+
}, /* @__PURE__ */ _jsxC(Blocks, {
|
|
5639
|
+
get blocks() {
|
|
5640
|
+
return item.detail;
|
|
5641
|
+
},
|
|
5642
|
+
path: `items.${index}.detail`,
|
|
5643
|
+
get parent() {
|
|
5644
|
+
return props.builderBlock.id;
|
|
5645
|
+
},
|
|
5646
|
+
get context() {
|
|
5647
|
+
return props.builderContext;
|
|
5648
|
+
},
|
|
5649
|
+
get registeredComponents() {
|
|
5650
|
+
return props.builderComponents;
|
|
5651
|
+
},
|
|
5652
|
+
get linkComponent() {
|
|
5653
|
+
return props.builderLinkComponent;
|
|
5654
|
+
},
|
|
5655
|
+
[_IMMUTABLE]: {
|
|
5656
|
+
blocks: _wrapProp(item, "detail"),
|
|
5657
|
+
context: _fnSignal((p0) => p0.builderContext, [
|
|
5658
|
+
props
|
|
5659
|
+
], "p0.builderContext"),
|
|
5660
|
+
linkComponent: _fnSignal((p0) => p0.builderLinkComponent, [
|
|
5661
|
+
props
|
|
5662
|
+
], "p0.builderLinkComponent"),
|
|
5663
|
+
parent: _fnSignal((p0) => p0.builderBlock.id, [
|
|
5664
|
+
props
|
|
5665
|
+
], "p0.builderBlock.id"),
|
|
5666
|
+
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
5667
|
+
props
|
|
5668
|
+
], "p0.builderComponents")
|
|
5669
|
+
}
|
|
5670
|
+
}, 3, "hf_1"), 1, "hf_2") : null
|
|
5671
|
+
]
|
|
5672
|
+
}, 1, "hf_3");
|
|
5673
|
+
}), 1, "hf_4");
|
|
5674
|
+
}, "Accordion_component_jkuUCHm0nt0"));
|
|
5316
5675
|
const componentInfo$g = {
|
|
5317
5676
|
name: "Core:Button",
|
|
5318
5677
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -6059,8 +6418,11 @@ const componentInfo$9 = {
|
|
|
6059
6418
|
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
6060
6419
|
return props.tabs && props.tabs[active].content;
|
|
6061
6420
|
};
|
|
6062
|
-
const
|
|
6063
|
-
|
|
6421
|
+
const onClick$1 = function onClick23(props, state, index) {
|
|
6422
|
+
if (index === state.activeTab && props.collapsible)
|
|
6423
|
+
state.activeTab = -1;
|
|
6424
|
+
else
|
|
6425
|
+
state.activeTab = index;
|
|
6064
6426
|
};
|
|
6065
6427
|
const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
6066
6428
|
_jsxBranch();
|
|
@@ -6083,16 +6445,15 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
6083
6445
|
class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
|
|
6084
6446
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
6085
6447
|
const [index2, props2, state2] = useLexicalScope();
|
|
6086
|
-
|
|
6087
|
-
state2.activeTab = -1;
|
|
6088
|
-
else
|
|
6089
|
-
state2.activeTab = index2;
|
|
6448
|
+
return onClick$1(props2, state2, index2);
|
|
6090
6449
|
}, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
|
|
6091
6450
|
index,
|
|
6092
6451
|
props,
|
|
6093
6452
|
state
|
|
6094
6453
|
]),
|
|
6095
|
-
style:
|
|
6454
|
+
style: {
|
|
6455
|
+
...state.activeTab === index ? props.activeTabStyle : {}
|
|
6456
|
+
}
|
|
6096
6457
|
}, null, /* @__PURE__ */ _jsxC(Blocks, {
|
|
6097
6458
|
get parent() {
|
|
6098
6459
|
return props.builderBlock.id;
|
|
@@ -6688,11 +7049,11 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
|
|
|
6688
7049
|
return;
|
|
6689
7050
|
}
|
|
6690
7051
|
event.preventDefault();
|
|
6691
|
-
const el = event.currentTarget;
|
|
7052
|
+
const el = event.currentTarget || event.target;
|
|
6692
7053
|
const headers = props.customHeaders || {};
|
|
6693
7054
|
let body;
|
|
6694
7055
|
const formData = new FormData(el);
|
|
6695
|
-
const formPairs = Array.from(
|
|
7056
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
6696
7057
|
let value;
|
|
6697
7058
|
const key = el2.name;
|
|
6698
7059
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -6939,6 +7300,7 @@ const FormComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
6939
7300
|
name: _fnSignal((p0) => p0.name, [
|
|
6940
7301
|
props
|
|
6941
7302
|
], "p0.name"),
|
|
7303
|
+
"preventdefault:submit": true,
|
|
6942
7304
|
validate: _fnSignal((p0) => p0.validate, [
|
|
6943
7305
|
props
|
|
6944
7306
|
], "p0.validate")
|
|
@@ -7477,6 +7839,10 @@ const getDefaultRegisteredComponents = () => [
|
|
|
7477
7839
|
{
|
|
7478
7840
|
component: Tabs,
|
|
7479
7841
|
...componentInfo$9
|
|
7842
|
+
},
|
|
7843
|
+
{
|
|
7844
|
+
component: Accordion,
|
|
7845
|
+
...componentInfo$h
|
|
7480
7846
|
}
|
|
7481
7847
|
],
|
|
7482
7848
|
...getExtraComponents()
|
|
@@ -7935,7 +8301,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7935
8301
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7936
8302
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7937
8303
|
}
|
|
7938
|
-
const SDK_VERSION = "0.14.
|
|
8304
|
+
const SDK_VERSION = "0.14.23";
|
|
7939
8305
|
const registry = {};
|
|
7940
8306
|
function register(type, info) {
|
|
7941
8307
|
let typeList = registry[type];
|
|
@@ -8256,7 +8622,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps,
|
|
|
8256
8622
|
enableCache: false
|
|
8257
8623
|
});
|
|
8258
8624
|
};
|
|
8259
|
-
const onClick = function
|
|
8625
|
+
const onClick = function onClick24(props, state, showContentProps, elementRef, event) {
|
|
8260
8626
|
var _a, _b;
|
|
8261
8627
|
if (props.builderContextSignal.content) {
|
|
8262
8628
|
const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
@@ -8415,7 +8781,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8415
8781
|
useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
8416
8782
|
const [elementRef2, props2, showContentProps2, state2] = useLexicalScope();
|
|
8417
8783
|
if (!props2.apiKey)
|
|
8418
|
-
logger.error("No API key provided to `
|
|
8784
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
8419
8785
|
evaluateJsCode(props2);
|
|
8420
8786
|
runHttpRequests(props2, state2, showContentProps2, elementRef2);
|
|
8421
8787
|
emitStateUpdate(props2);
|