@flamingo-stack/openframe-frontend-core 0.0.777 → 0.0.780
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/dist/{case-study-card-FMH622O5.cjs → case-study-card-WXMWYGSW.cjs} +2 -2
- package/dist/{chunk-JMFF3L3T.cjs → chunk-2JO5HNEF.cjs} +23 -23
- package/dist/{chunk-SDZG7VV7.cjs → chunk-2W3VDE4D.cjs} +2 -2
- package/dist/{chunk-4JZDJ34E.cjs → chunk-4BBOHZM3.cjs} +4 -4
- package/dist/{chunk-QIATO42V.cjs → chunk-4NRVV3KO.cjs} +3 -3
- package/dist/{chunk-BDDOC425.cjs → chunk-AQXEM7GI.cjs} +3 -3
- package/dist/{chunk-ALA4KHTE.cjs → chunk-DQALLDTZ.cjs} +4 -4
- package/dist/{chunk-LU2DGST4.cjs → chunk-F3BASIMT.cjs} +78 -78
- package/dist/{chunk-Y6MQBLTZ.cjs → chunk-HUPDPANN.cjs} +4 -4
- package/dist/{chunk-3PCSEZNZ.cjs → chunk-I4IC3BRC.cjs} +39 -39
- package/dist/{chunk-7LJSGOWS.cjs → chunk-IE3QCYBT.cjs} +13 -13
- package/dist/{chunk-VY3NGJRH.cjs → chunk-ILRQXZBA.cjs} +52 -52
- package/dist/{chunk-T47VAUYR.cjs → chunk-KA3VQ6X2.cjs} +69 -69
- package/dist/{chunk-WCSWWVPF.cjs → chunk-MLX6Z7TU.cjs} +2 -2
- package/dist/{chunk-MQPTOJMF.cjs → chunk-OH5LAH3X.cjs} +3 -51
- package/dist/{chunk-G2N7INFT.cjs → chunk-OMHQZXCD.cjs} +11 -11
- package/dist/{chunk-TZP7PSPG.cjs → chunk-OWQVDWTK.cjs} +109 -103
- package/dist/{chunk-XVAVQ4BK.cjs → chunk-PQBGSVZE.cjs} +38 -38
- package/dist/{chunk-LGNJTSKB.cjs → chunk-QEFDGI3Z.cjs} +29 -29
- package/dist/{chunk-WMZIBRTR.cjs → chunk-QIQYD75I.cjs} +2 -2
- package/dist/{chunk-T7NDPPLF.cjs → chunk-TVDQMG7I.cjs} +18 -18
- package/dist/{chunk-HXLOCZMG.cjs → chunk-UPAE4IV5.cjs} +167 -167
- package/dist/{chunk-DOM5CUEY.cjs → chunk-WR7KJML6.cjs} +30 -30
- package/dist/{chunk-CGQ7CL62.cjs → chunk-YG72MEHY.cjs} +98 -98
- package/dist/{chunk-U5VQFKRZ.cjs → chunk-YNECNYQF.cjs} +4 -4
- package/dist/{chunk-S3YDUX2I.cjs → chunk-YWQ3VXPL.cjs} +75 -75
- package/dist/{chunk-UW6AOF42.cjs → chunk-ZGWS3NJR.cjs} +13 -13
- package/dist/{cloud-tenants-EUH42CCL.cjs → cloud-tenants-2ZLGCSGK.cjs} +8 -8
- package/dist/components/case-studies/index.cjs +24 -24
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +8 -4
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.js +2 -0
- package/dist/components/chat/index.cjs +6 -6
- package/dist/components/chat/types/component.types.d.ts +9 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +9 -9
- package/dist/components/docs/index.cjs +12 -12
- package/dist/components/embeds/index.cjs +9 -9
- package/dist/components/faq/index.cjs +10 -10
- package/dist/components/features/index.cjs +8 -8
- package/dist/components/features/video-hover-preview.d.ts.map +1 -1
- package/dist/components/features/video-hover-preview.js +2 -5
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/features/video.js +1 -44
- package/dist/components/help-center-pages/index.cjs +84 -84
- package/dist/components/index.cjs +56 -56
- package/dist/components/meeting-scheduler/index.cjs +38 -38
- package/dist/components/navigation/index.cjs +11 -11
- package/dist/components/onboarding-guides/index.cjs +11 -11
- package/dist/components/product-demo/index.cjs +17 -17
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/tickets/index.cjs +14 -14
- package/dist/components/ui/index.cjs +8 -8
- package/dist/{devices-WL3I23EE.cjs → devices-UOBQFPV3.cjs} +9 -9
- package/dist/{embeddable-chat-KEWUGQIF.cjs → embeddable-chat-SFQWRUIV.cjs} +74 -74
- package/dist/index.cjs +12 -12
- package/dist/{knowledge-O3PXUX73.cjs → knowledge-5K3LTHGB.cjs} +9 -9
- package/dist/{logs-XODCXWYI.cjs → logs-WU3N6ESS.cjs} +16 -16
- package/dist/{policies-CQACBIKK.cjs → policies-2IYASCQO.cjs} +12 -12
- package/dist/{scripts-QMM6SEB5.cjs → scripts-IQBKOQEY.cjs} +13 -13
- package/dist/{software-update-CCCKS4ZE.cjs → software-update-GJLDO5X5.cjs} +11 -11
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +13 -4
- package/src/components/chat/chat-message-list.tsx +2 -0
- package/src/components/chat/types/component.types.ts +9 -0
- package/src/components/features/video-hover-preview.tsx +37 -46
- package/src/components/features/video.tsx +1 -61
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkMLX6Z7TUcjs = require('./chunk-MLX6Z7TU.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ var _chunkWCSWWVPFcjs = require('./chunk-WCSWWVPF.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkQEFDGI3Zcjs = require('./chunk-QEFDGI3Z.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -37,12 +37,12 @@ var _chunkLGNJTSKBcjs = require('./chunk-LGNJTSKB.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkYG72MEHYcjs = require('./chunk-YG72MEHY.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _chunkOH5LAH3Xcjs = require('./chunk-OH5LAH3X.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
var _chunkBLH2SFOOcjs = require('./chunk-BLH2SFOO.cjs');
|
|
@@ -455,7 +455,7 @@ function programEntry(configKey) {
|
|
|
455
455
|
// Hosts are drawn only for a type whose cards show them (its config's `cardShowsHosts`): elsewhere a record may
|
|
456
456
|
// have none.
|
|
457
457
|
skeleton: (size, extras) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
458
|
-
|
|
458
|
+
_chunkYG72MEHYcjs.ProgramCardSkeleton,
|
|
459
459
|
{
|
|
460
460
|
size: size === "sm" ? "sm" : "default",
|
|
461
461
|
media: configKey === "event" ? EVENT_CARD_SKELETON_MEDIA : 0,
|
|
@@ -467,7 +467,7 @@ function programEntry(configKey) {
|
|
|
467
467
|
const config = _optionalChain([ctx, 'access', _5 => _5.extras, 'optionalAccess', _6 => _6.programConfigs, 'optionalAccess', _7 => _7[configKey]]);
|
|
468
468
|
if (!config) return null;
|
|
469
469
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
470
|
-
|
|
470
|
+
_chunkYG72MEHYcjs.ProgramCard,
|
|
471
471
|
{
|
|
472
472
|
config,
|
|
473
473
|
item,
|
|
@@ -485,10 +485,10 @@ function programEntry(configKey) {
|
|
|
485
485
|
}
|
|
486
486
|
function roadmapEntry(cardType) {
|
|
487
487
|
return cardEntry({
|
|
488
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
488
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYG72MEHYcjs.RoadmapCardSkeleton, { size: size === "sm" ? "sm" : "default" }),
|
|
489
489
|
decode: decodeRoadmapRow,
|
|
490
490
|
render: (item, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
491
|
-
|
|
491
|
+
_chunkYG72MEHYcjs.RoadmapCard,
|
|
492
492
|
{
|
|
493
493
|
item,
|
|
494
494
|
href: ctx.href,
|
|
@@ -505,10 +505,10 @@ function roadmapEntry(cardType) {
|
|
|
505
505
|
}
|
|
506
506
|
var RELATED_CARD_REGISTRY = {
|
|
507
507
|
blog_post_existing: cardEntry({
|
|
508
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
508
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYG72MEHYcjs.BlogCardSkeleton, { size: size === "sm" ? "sm" : "default" }),
|
|
509
509
|
decode: decodeBlogRow,
|
|
510
510
|
render: (post, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
511
|
-
|
|
511
|
+
_chunkYG72MEHYcjs.BlogCard,
|
|
512
512
|
{
|
|
513
513
|
post,
|
|
514
514
|
size: ctx.legacySize,
|
|
@@ -521,10 +521,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
521
521
|
)
|
|
522
522
|
}),
|
|
523
523
|
case_study: cardEntry({
|
|
524
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
524
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOH5LAH3Xcjs.CaseStudyCardSkeleton, { size: size === "sm" ? "sm" : "default" }),
|
|
525
525
|
decode: decodeCaseStudyRow,
|
|
526
526
|
render: (study, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
527
|
-
|
|
527
|
+
_chunkOH5LAH3Xcjs.CaseStudyCard,
|
|
528
528
|
{
|
|
529
529
|
study,
|
|
530
530
|
size: ctx.legacySize,
|
|
@@ -536,10 +536,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
536
536
|
)
|
|
537
537
|
}),
|
|
538
538
|
customer_interview: cardEntry({
|
|
539
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
539
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYG72MEHYcjs.CustomerInterviewCardSkeleton, { size: size === "sm" ? "sm" : "default" }),
|
|
540
540
|
decode: decodeCustomerInterviewRow,
|
|
541
541
|
render: (interview, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
542
|
-
|
|
542
|
+
_chunkYG72MEHYcjs.CustomerInterviewCard,
|
|
543
543
|
{
|
|
544
544
|
interview,
|
|
545
545
|
size: ctx.legacySize,
|
|
@@ -557,13 +557,13 @@ var RELATED_CARD_REGISTRY = {
|
|
|
557
557
|
* record, and the three props the rail sets itself are read off it.
|
|
558
558
|
*/
|
|
559
559
|
product_release: cardEntry({
|
|
560
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
560
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYG72MEHYcjs.ProductReleaseCardSkeleton, { size: size === "sm" ? "sm" : "lg" }),
|
|
561
561
|
decode: asRecord,
|
|
562
562
|
render: (release, ctx) => {
|
|
563
|
-
const buildReleaseProps = _nullishCoalesce(_optionalChain([ctx, 'access', _8 => _8.extras, 'optionalAccess', _9 => _9.buildProductReleaseCardProps]), () => (
|
|
563
|
+
const buildReleaseProps = _nullishCoalesce(_optionalChain([ctx, 'access', _8 => _8.extras, 'optionalAccess', _9 => _9.buildProductReleaseCardProps]), () => ( _chunkYG72MEHYcjs.buildProductReleaseCardProps));
|
|
564
564
|
const releaseProps = buildReleaseProps(release);
|
|
565
565
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
566
|
-
|
|
566
|
+
_chunkQEFDGI3Zcjs.ProductReleaseCard,
|
|
567
567
|
{
|
|
568
568
|
size: ctx.size === "sm" ? "sm" : "lg",
|
|
569
569
|
title: str(release, "title"),
|
|
@@ -579,10 +579,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
579
579
|
webinar: programEntry("webinar"),
|
|
580
580
|
event: programEntry("event"),
|
|
581
581
|
investor_update: cardEntry({
|
|
582
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
582
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYG72MEHYcjs.InvestorUpdateCardSkeleton, { size: size === "sm" ? "sm" : "default" }),
|
|
583
583
|
decode: decodeInvestorUpdateRow,
|
|
584
584
|
render: (update, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
585
|
-
|
|
585
|
+
_chunkYG72MEHYcjs.InvestorUpdateCard,
|
|
586
586
|
{
|
|
587
587
|
update,
|
|
588
588
|
size: ctx.legacySize,
|
|
@@ -597,10 +597,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
597
597
|
* step-numbered 'default' variant is for the guide detail page's "More in
|
|
598
598
|
* section" rail, not this full-width row. */
|
|
599
599
|
onboarding_guide: cardEntry({
|
|
600
|
-
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
+
skeleton: (size) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYG72MEHYcjs.OnboardingGuideCardSkeleton, { size: size === "sm" ? "sm" : "catalog", published: false }),
|
|
601
601
|
decode: decodeOnboardingGuideRow,
|
|
602
602
|
render: (guide, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
603
|
-
|
|
603
|
+
_chunkYG72MEHYcjs.OnboardingGuideCard,
|
|
604
604
|
{
|
|
605
605
|
guide,
|
|
606
606
|
size: ctx.size === "sm" ? "sm" : "catalog",
|
|
@@ -617,10 +617,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
617
617
|
* href: an object with `href: undefined` is still truthy and would wrap the
|
|
618
618
|
* card in a dead <a>. */
|
|
619
619
|
what_i_shipped: cardEntry({
|
|
620
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
620
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQEFDGI3Zcjs.WhatIShippedCardSkeleton, {}),
|
|
621
621
|
decode: decodeEmployeeEntryRow,
|
|
622
622
|
render: (entry, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
623
|
-
|
|
623
|
+
_chunkQEFDGI3Zcjs.WhatIShippedCard,
|
|
624
624
|
{
|
|
625
625
|
entry,
|
|
626
626
|
placeholderUrl: ctx.placeholderUrl,
|
|
@@ -630,10 +630,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
630
630
|
}),
|
|
631
631
|
/** Same shared employee-entry shape + anchor contract as What I Shipped. */
|
|
632
632
|
how_i_work: cardEntry({
|
|
633
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
633
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQEFDGI3Zcjs.HowIWorkCardSkeleton, {}),
|
|
634
634
|
decode: decodeEmployeeEntryRow,
|
|
635
635
|
render: (entry, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
|
-
|
|
636
|
+
_chunkQEFDGI3Zcjs.HowIWorkCard,
|
|
637
637
|
{
|
|
638
638
|
entry,
|
|
639
639
|
placeholderUrl: ctx.placeholderUrl,
|
|
@@ -643,10 +643,10 @@ var RELATED_CARD_REGISTRY = {
|
|
|
643
643
|
}),
|
|
644
644
|
/** Same shared employee-entry shape + anchor contract as What I Shipped. */
|
|
645
645
|
ai_prompt: cardEntry({
|
|
646
|
-
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
646
|
+
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQEFDGI3Zcjs.AiPromptCardSkeleton, {}),
|
|
647
647
|
decode: decodeEmployeeEntryRow,
|
|
648
648
|
render: (entry, ctx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
649
|
-
|
|
649
|
+
_chunkQEFDGI3Zcjs.AiPromptCard,
|
|
650
650
|
{
|
|
651
651
|
entry,
|
|
652
652
|
placeholderUrl: ctx.placeholderUrl,
|
|
@@ -667,7 +667,7 @@ function DefaultLinkPropsProvider({
|
|
|
667
667
|
children
|
|
668
668
|
}) {
|
|
669
669
|
if (!href) return children(null);
|
|
670
|
-
const newTab =
|
|
670
|
+
const newTab = _chunkOH5LAH3Xcjs.decideNewTab.call(void 0, { href, targetPlatform, currentSource: "" });
|
|
671
671
|
return children(newTab ? { href, target: "_blank", rel: "noopener noreferrer" } : { href });
|
|
672
672
|
}
|
|
673
673
|
function defaultResolveHref(ref) {
|
|
@@ -729,9 +729,9 @@ function useGroupItems(type, refs, buildUrl, seedRows) {
|
|
|
729
729
|
() => seedRows && url !== null ? /* @__PURE__ */ new Map([[url, [...seedRows]]]) : /* @__PURE__ */ new Map()
|
|
730
730
|
);
|
|
731
731
|
const cached = url !== null ? pages.get(url) : void 0;
|
|
732
|
-
const { data, dataUrl, error } =
|
|
732
|
+
const { data, dataUrl, error } = _chunkQEFDGI3Zcjs.useSelfFetch.call(void 0, cached ? null : url);
|
|
733
733
|
if (data != null && dataUrl !== null && !pages.has(dataUrl)) {
|
|
734
|
-
setPages(new Map(pages).set(dataUrl,
|
|
734
|
+
setPages(new Map(pages).set(dataUrl, _chunkYG72MEHYcjs.extractItems.call(void 0, data)));
|
|
735
735
|
}
|
|
736
736
|
if (url === null) return { items: null, isLoading: false };
|
|
737
737
|
return { items: _nullishCoalesce(cached, () => ( (error ? [] : null))), isLoading: !cached && !error };
|
|
@@ -740,7 +740,7 @@ function gridClassFor(columns) {
|
|
|
740
740
|
return columns === 3 ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6" : "grid grid-cols-1 sm:grid-cols-2 gap-6";
|
|
741
741
|
}
|
|
742
742
|
function resolveGroupConfig(type) {
|
|
743
|
-
return _nullishCoalesce(
|
|
743
|
+
return _nullishCoalesce(_chunkQEFDGI3Zcjs.CONTENT_REF_GROUPS[type], () => ( {
|
|
744
744
|
label: type,
|
|
745
745
|
order: 999,
|
|
746
746
|
layout: "grid",
|
|
@@ -753,15 +753,15 @@ var GROUP_HEADING_CLASS = "font-semibold text-ods-text-secondary text-h5";
|
|
|
753
753
|
var RAIL_CLASS = "flex flex-col gap-8";
|
|
754
754
|
var UNKNOWN_TYPE_CARD = "blog_post_existing";
|
|
755
755
|
function GroupHeading({ type }) {
|
|
756
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: GROUP_HEADING_CLASS, children:
|
|
756
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: GROUP_HEADING_CLASS, children: _chunkQEFDGI3Zcjs.getContentRefLabelOrTitleCase.call(void 0, type) });
|
|
757
757
|
}
|
|
758
758
|
function orderRailTypes(types, entityType) {
|
|
759
|
-
let ordered =
|
|
759
|
+
let ordered = _chunkQEFDGI3Zcjs.orderContentRefTypes.call(void 0, types);
|
|
760
760
|
if (entityType) {
|
|
761
|
-
const canonicalEntityType =
|
|
762
|
-
const sameType = ordered.filter((t) =>
|
|
761
|
+
const canonicalEntityType = _chunkYG72MEHYcjs.canonicalContentRefType.call(void 0, entityType);
|
|
762
|
+
const sameType = ordered.filter((t) => _chunkYG72MEHYcjs.canonicalContentRefType.call(void 0, t) === canonicalEntityType);
|
|
763
763
|
if (sameType.length > 0) {
|
|
764
|
-
ordered = [...sameType, ...ordered.filter((t) =>
|
|
764
|
+
ordered = [...sameType, ...ordered.filter((t) => _chunkYG72MEHYcjs.canonicalContentRefType.call(void 0, t) !== canonicalEntityType)];
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
return ordered;
|
|
@@ -790,10 +790,10 @@ function ContentGroup({
|
|
|
790
790
|
setPagedRefsKey(refsKey);
|
|
791
791
|
setPage(1);
|
|
792
792
|
}
|
|
793
|
-
const totalGroupPages = _chunkBLH2SFOOcjs.pageCount.call(void 0, refs.length,
|
|
794
|
-
const pageRefs = refs.slice((page - 1) *
|
|
793
|
+
const totalGroupPages = _chunkBLH2SFOOcjs.pageCount.call(void 0, refs.length, _chunkQEFDGI3Zcjs.GROUP_PAGE_SIZE);
|
|
794
|
+
const pageRefs = refs.slice((page - 1) * _chunkQEFDGI3Zcjs.GROUP_PAGE_SIZE, page * _chunkQEFDGI3Zcjs.GROUP_PAGE_SIZE);
|
|
795
795
|
const { items, isLoading } = useGroupItems(type, pageRefs, buildUrl, seedRows);
|
|
796
|
-
const groupPagination = totalGroupPages > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
796
|
+
const groupPagination = totalGroupPages > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMLX6Z7TUcjs.Pagination, { currentPage: page, totalPages: totalGroupPages, onPageChange: setPage }) : null;
|
|
797
797
|
_react.useEffect.call(void 0, () => {
|
|
798
798
|
onLoadingChange(type, isLoading);
|
|
799
799
|
return () => onLoadingChange(type, false);
|
|
@@ -811,7 +811,7 @@ function ContentGroup({
|
|
|
811
811
|
}
|
|
812
812
|
if (!items) return null;
|
|
813
813
|
const rowKey = (it) => {
|
|
814
|
-
const extracted =
|
|
814
|
+
const extracted = _chunkYG72MEHYcjs.extractItemId.call(void 0, type, it);
|
|
815
815
|
if (extracted !== null) return extracted;
|
|
816
816
|
return String(typeof it === "object" && it !== null ? it.id : void 0);
|
|
817
817
|
};
|
|
@@ -882,11 +882,11 @@ function RelatedContentSection({
|
|
|
882
882
|
types: includeTypes !== void 0 ? includeTypes.join(",") : void 0,
|
|
883
883
|
excludeTypes: excludeTypes && excludeTypes.length > 0 ? excludeTypes.join(",") : void 0
|
|
884
884
|
};
|
|
885
|
-
const authorUrl = contentRefs === void 0 && authorId && !suggestionsDisabled ?
|
|
885
|
+
const authorUrl = contentRefs === void 0 && authorId && !suggestionsDisabled ? _chunkQEFDGI3Zcjs.buildSuggestionUrl.call(void 0, "/api/related-content", {
|
|
886
886
|
apiBaseUrl,
|
|
887
887
|
extraParams: { authorId, ...typeFilterParams }
|
|
888
888
|
}) : null;
|
|
889
|
-
const suggestUrl = _nullishCoalesce(authorUrl, () => ( (contentRefs === void 0 && entityType && entityId !== void 0 && entityId !== null && entityId !== "" && !suggestionsDisabled ?
|
|
889
|
+
const suggestUrl = _nullishCoalesce(authorUrl, () => ( (contentRefs === void 0 && entityType && entityId !== void 0 && entityId !== null && entityId !== "" && !suggestionsDisabled ? _chunkQEFDGI3Zcjs.buildSuggestionUrl.call(void 0, "/api/related-content", {
|
|
890
890
|
apiBaseUrl,
|
|
891
891
|
entityType,
|
|
892
892
|
entityId,
|
|
@@ -903,7 +903,7 @@ function RelatedContentSection({
|
|
|
903
903
|
() => !suggestionsDisabled && initialItems ? { refs: initialItems } : void 0,
|
|
904
904
|
[initialItems, suggestionsDisabled]
|
|
905
905
|
);
|
|
906
|
-
const { data, isLoading } =
|
|
906
|
+
const { data, isLoading } = _chunkQEFDGI3Zcjs.useSelfFetch.call(void 0, suggestUrl, { initialData });
|
|
907
907
|
const inScope = _chunkXFRBEXQNcjs.useLoadingScope.call(void 0, );
|
|
908
908
|
const [loadingTypes, setLoadingTypes] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
909
909
|
const onGroupLoadingChange = _react.useCallback.call(void 0, (type, loading) => {
|
|
@@ -916,7 +916,7 @@ function RelatedContentSection({
|
|
|
916
916
|
});
|
|
917
917
|
}, []);
|
|
918
918
|
const effectiveBuildListUrl = _react.useMemo.call(void 0,
|
|
919
|
-
() => _nullishCoalesce(buildListUrl2, () => ( ((type, ids) =>
|
|
919
|
+
() => _nullishCoalesce(buildListUrl2, () => ( ((type, ids) => _chunkYG72MEHYcjs.buildListUrl.call(void 0, type, ids, apiBaseUrl)))),
|
|
920
920
|
[buildListUrl2, apiBaseUrl]
|
|
921
921
|
);
|
|
922
922
|
const refs = _nullishCoalesce(_nullishCoalesce(contentRefs, () => ( _optionalChain([data, 'optionalAccess', _13 => _13.refs]))), () => ( []));
|
|
@@ -940,7 +940,7 @@ function RelatedContentSection({
|
|
|
940
940
|
}
|
|
941
941
|
if (!showWhenEmpty) return null;
|
|
942
942
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-8", children: [
|
|
943
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-bold text-ods-text-primary", children:
|
|
943
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-bold text-ods-text-primary", children: _chunkYG72MEHYcjs.accentSentenceMarks.call(void 0, title) }),
|
|
944
944
|
_nullishCoalesce(emptyState, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary", children: emptyStateText })))
|
|
945
945
|
] });
|
|
946
946
|
}
|
|
@@ -966,7 +966,7 @@ function RelatedContentSection({
|
|
|
966
966
|
);
|
|
967
967
|
}
|
|
968
968
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWEANWBJHcjs.LoadingRegion, { as: "section", label: "Loading related content", announce: loadingTypes.size > 0, className: RAIL_CLASS, children: [
|
|
969
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: RAIL_TITLE_CLASS, children:
|
|
969
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: RAIL_TITLE_CLASS, children: _chunkYG72MEHYcjs.accentSentenceMarks.call(void 0, title) }),
|
|
970
970
|
orderedTypes.map((type, groupIndex) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
971
971
|
ContentGroup,
|
|
972
972
|
{
|
|
@@ -997,24 +997,24 @@ function RelatedContentSectionSkeleton({
|
|
|
997
997
|
adminCampaignCard,
|
|
998
998
|
extras
|
|
999
999
|
}) {
|
|
1000
|
-
const canonicalEntityType = entityType ?
|
|
1000
|
+
const canonicalEntityType = entityType ? _chunkYG72MEHYcjs.canonicalContentRefType.call(void 0, entityType) : null;
|
|
1001
1001
|
const unknownGroup = types.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: GROUP_CLASS, "aria-hidden": true, "data-loading-item": true, children: [
|
|
1002
1002
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: GROUP_HEADING_CLASS, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXFRBEXQNcjs.TextLineSkeleton, { type: "inherit", as: "span", className: "w-24" }) }),
|
|
1003
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: gridClassFor(columns), children: Array.from({ length:
|
|
1003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: gridClassFor(columns), children: Array.from({ length: _chunkQEFDGI3Zcjs.GROUP_PAGE_SIZE }, (_, i) => (
|
|
1004
1004
|
// biome-ignore lint/suspicious/noArrayIndexKey: skeleton cards never reorder
|
|
1005
1005
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-loading-item": true, children: renderSkeletonForType(UNKNOWN_TYPE_CARD, "default", adminCampaignCard, extras) }, i)
|
|
1006
1006
|
)) })
|
|
1007
1007
|
] }) : null;
|
|
1008
1008
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWEANWBJHcjs.LoadingRegion, { as: "section", label: "Loading related content", className: RAIL_CLASS, children: [
|
|
1009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: RAIL_TITLE_CLASS, children: title ?
|
|
1009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: RAIL_TITLE_CLASS, children: title ? _chunkYG72MEHYcjs.accentSentenceMarks.call(void 0, title) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXFRBEXQNcjs.TextLineSkeleton, { type: "inherit", as: "span", className: "w-1/2" }) }),
|
|
1010
1010
|
unknownGroup,
|
|
1011
1011
|
orderRailTypes(new Set(types), entityType).map((type) => {
|
|
1012
1012
|
const config = resolveGroupConfig(type);
|
|
1013
|
-
const sameType = canonicalEntityType !== null &&
|
|
1013
|
+
const sameType = canonicalEntityType !== null && _chunkYG72MEHYcjs.canonicalContentRefType.call(void 0, type) === canonicalEntityType;
|
|
1014
1014
|
const isList = config.layout === "list";
|
|
1015
1015
|
const count = Math.min(
|
|
1016
|
-
|
|
1017
|
-
_nullishCoalesce((sameType ? _nullishCoalesce(sameTypeMinResults, () => ( minResults)) : minResults), () => (
|
|
1016
|
+
_chunkQEFDGI3Zcjs.GROUP_PAGE_SIZE,
|
|
1017
|
+
_nullishCoalesce((sameType ? _nullishCoalesce(sameTypeMinResults, () => ( minResults)) : minResults), () => ( _chunkQEFDGI3Zcjs.GROUP_PAGE_SIZE))
|
|
1018
1018
|
);
|
|
1019
1019
|
const cards = Array.from({ length: count }, (_, i) => (
|
|
1020
1020
|
// biome-ignore lint/suspicious/noArrayIndexKey: skeleton cards never reorder
|