@flamingo-stack/openframe-frontend-core 0.0.551 → 0.0.552
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/{chunk-V5PDJFZS.js → chunk-4DD3223G.js} +6 -6
- package/dist/{chunk-MEY3PYOL.cjs → chunk-4XG7TG7B.cjs} +7 -7
- package/dist/{chunk-MEY3PYOL.cjs.map → chunk-4XG7TG7B.cjs.map} +1 -1
- package/dist/{chunk-ZYQAFJLF.cjs → chunk-6J6Q5QEM.cjs} +4 -4
- package/dist/{chunk-ZYQAFJLF.cjs.map → chunk-6J6Q5QEM.cjs.map} +1 -1
- package/dist/{chunk-AK4LW6PF.cjs → chunk-6MHMEF5W.cjs} +39 -39
- package/dist/{chunk-AK4LW6PF.cjs.map → chunk-6MHMEF5W.cjs.map} +1 -1
- package/dist/{chunk-2YLMNXLB.js → chunk-6XOJTTWY.js} +2 -2
- package/dist/{chunk-RJFD55SK.js → chunk-7MPOW46J.js} +2 -2
- package/dist/{chunk-SWDTM5O6.js → chunk-7TRIUG7Q.js} +5 -5
- package/dist/{chunk-TXFJFO4A.js → chunk-BFOXIIM4.js} +2 -2
- package/dist/{chunk-EFNDA2CG.js → chunk-CMDPARDV.js} +2 -2
- package/dist/{chunk-ZDWWXME5.cjs → chunk-DOPZ5LCH.cjs} +14 -14
- package/dist/{chunk-ZDWWXME5.cjs.map → chunk-DOPZ5LCH.cjs.map} +1 -1
- package/dist/{chunk-PPPIBTCO.cjs → chunk-HK5YRHEN.cjs} +9 -9
- package/dist/{chunk-PPPIBTCO.cjs.map → chunk-HK5YRHEN.cjs.map} +1 -1
- package/dist/{chunk-IFH47QXW.js → chunk-KSGQG6WU.js} +2 -2
- package/dist/{chunk-V3HNIPTE.cjs → chunk-MVE2YQVG.cjs} +20 -20
- package/dist/{chunk-V3HNIPTE.cjs.map → chunk-MVE2YQVG.cjs.map} +1 -1
- package/dist/{chunk-T2JKOG6K.cjs → chunk-OVQ3O66O.cjs} +5 -5
- package/dist/{chunk-T2JKOG6K.cjs.map → chunk-OVQ3O66O.cjs.map} +1 -1
- package/dist/{chunk-O24VSDVN.cjs → chunk-PVPXI5V6.cjs} +31 -31
- package/dist/{chunk-O24VSDVN.cjs.map → chunk-PVPXI5V6.cjs.map} +1 -1
- package/dist/{chunk-NVK7YZHN.js → chunk-RJEP74Z4.js} +2 -2
- package/dist/{chunk-H4RHXJHF.js → chunk-RJSDYOFD.js} +2 -2
- package/dist/{chunk-H4OIDXP4.cjs → chunk-RMTTW7LG.cjs} +27 -27
- package/dist/{chunk-H4OIDXP4.cjs.map → chunk-RMTTW7LG.cjs.map} +1 -1
- package/dist/{chunk-NRTKEPUX.cjs → chunk-RMWLUKTC.cjs} +11 -11
- package/dist/{chunk-NRTKEPUX.cjs.map → chunk-RMWLUKTC.cjs.map} +1 -1
- package/dist/{chunk-EZIKNMYV.js → chunk-SIXNMDYY.js} +2 -2
- package/dist/{chunk-YA5JDHWE.cjs → chunk-SXXIV7IL.cjs} +86 -86
- package/dist/{chunk-YA5JDHWE.cjs.map → chunk-SXXIV7IL.cjs.map} +1 -1
- package/dist/{chunk-JI4JR3KC.js → chunk-TI75367M.js} +234 -205
- package/dist/{chunk-JI4JR3KC.js.map → chunk-TI75367M.js.map} +1 -1
- package/dist/{chunk-YEXTFNVE.js → chunk-WXDDPK7T.js} +4 -4
- package/dist/{chunk-CPADTPX4.cjs → chunk-X4RCWYYF.cjs} +825 -796
- package/dist/chunk-X4RCWYYF.cjs.map +1 -0
- package/dist/{chunk-MKDL3S4U.cjs → chunk-XEOZB5DX.cjs} +3 -3
- package/dist/{chunk-MKDL3S4U.cjs.map → chunk-XEOZB5DX.cjs.map} +1 -1
- package/dist/{chunk-72ZPQTPN.cjs → chunk-Y64725GI.cjs} +61 -61
- package/dist/{chunk-72ZPQTPN.cjs.map → chunk-Y64725GI.cjs.map} +1 -1
- package/dist/{chunk-OMSEQDCU.js → chunk-Y6PD76R6.js} +2 -2
- package/dist/{chunk-MVK7SNVO.js → chunk-Z5UK7SKC.js} +4 -4
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/use-ios-native-video-fullscreen.d.ts +4 -0
- package/dist/components/features/use-ios-native-video-fullscreen.d.ts.map +1 -0
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +131 -131
- package/dist/components/index.js +11 -11
- package/dist/components/meeting-scheduler/index.cjs +28 -28
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/features/__tests__/use-ios-native-video-fullscreen.test.tsx +116 -0
- package/src/components/features/use-ios-native-video-fullscreen.ts +89 -0
- package/src/components/features/video.tsx +5 -0
- package/dist/chunk-CPADTPX4.cjs.map +0 -1
- /package/dist/{chunk-V5PDJFZS.js.map → chunk-4DD3223G.js.map} +0 -0
- /package/dist/{chunk-2YLMNXLB.js.map → chunk-6XOJTTWY.js.map} +0 -0
- /package/dist/{chunk-RJFD55SK.js.map → chunk-7MPOW46J.js.map} +0 -0
- /package/dist/{chunk-SWDTM5O6.js.map → chunk-7TRIUG7Q.js.map} +0 -0
- /package/dist/{chunk-TXFJFO4A.js.map → chunk-BFOXIIM4.js.map} +0 -0
- /package/dist/{chunk-EFNDA2CG.js.map → chunk-CMDPARDV.js.map} +0 -0
- /package/dist/{chunk-IFH47QXW.js.map → chunk-KSGQG6WU.js.map} +0 -0
- /package/dist/{chunk-NVK7YZHN.js.map → chunk-RJEP74Z4.js.map} +0 -0
- /package/dist/{chunk-H4RHXJHF.js.map → chunk-RJSDYOFD.js.map} +0 -0
- /package/dist/{chunk-EZIKNMYV.js.map → chunk-SIXNMDYY.js.map} +0 -0
- /package/dist/{chunk-YEXTFNVE.js.map → chunk-WXDDPK7T.js.map} +0 -0
- /package/dist/{chunk-OMSEQDCU.js.map → chunk-Y6PD76R6.js.map} +0 -0
- /package/dist/{chunk-MVK7SNVO.js.map → chunk-Z5UK7SKC.js.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PersistentPaginationWrapper
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RJSDYOFD.js";
|
|
5
5
|
import {
|
|
6
6
|
DeliveryRow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RJEP74Z4.js";
|
|
8
8
|
import {
|
|
9
9
|
EmptyState
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BFOXIIM4.js";
|
|
11
11
|
import {
|
|
12
12
|
DetailPageSkeleton
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CMDPARDV.js";
|
|
14
14
|
import {
|
|
15
15
|
useSelfFetch
|
|
16
16
|
} from "./chunk-LQPHB2YF.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
resolveContentHref,
|
|
46
46
|
toStripProfile,
|
|
47
47
|
useEntityCardLink
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-TI75367M.js";
|
|
49
49
|
import {
|
|
50
50
|
STICKY_HEADER_OFFSET_PX,
|
|
51
51
|
contentFetch,
|
|
@@ -1305,4 +1305,4 @@ export {
|
|
|
1305
1305
|
useLegalDocs,
|
|
1306
1306
|
LegalDocumentPage
|
|
1307
1307
|
};
|
|
1308
|
-
//# sourceMappingURL=chunk-
|
|
1308
|
+
//# sourceMappingURL=chunk-4DD3223G.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkX4RCWYYFcjs = require('./chunk-X4RCWYYF.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ function PdfViewer({ src, fileName, onPreview, onDownload, height }) {
|
|
|
25
25
|
] });
|
|
26
26
|
}
|
|
27
27
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
28
|
-
|
|
28
|
+
_chunkX4RCWYYFcjs.EmbedViewerFrame,
|
|
29
29
|
{
|
|
30
30
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUTVOBFXRcjs.AdobePdfIcon, { className: "w-5 h-5 shrink-0" }),
|
|
31
31
|
title: displayName,
|
|
@@ -75,7 +75,7 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
|
|
|
75
75
|
] });
|
|
76
76
|
}
|
|
77
77
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
78
|
-
|
|
78
|
+
_chunkX4RCWYYFcjs.EmbedViewerFrame,
|
|
79
79
|
{
|
|
80
80
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUTVOBFXRcjs.GoogleSheetsIcon, { className: "w-5 h-5 shrink-0" }),
|
|
81
81
|
title: displayName,
|
|
@@ -84,7 +84,7 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
|
|
|
84
84
|
{
|
|
85
85
|
variant: "outline",
|
|
86
86
|
size: "small-legacy",
|
|
87
|
-
href:
|
|
87
|
+
href: _chunkX4RCWYYFcjs.toGoogleSheetsOriginalUrl.call(void 0, externalUrl),
|
|
88
88
|
openInNewTab: true,
|
|
89
89
|
leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUTVOBFXRcjs.GoogleSheetsIcon, { className: "w-4 h-4" }),
|
|
90
90
|
rightIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "w-4 h-4" }),
|
|
@@ -92,7 +92,7 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
|
|
|
92
92
|
children: "Open in Google Sheets"
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
src:
|
|
95
|
+
src: _chunkX4RCWYYFcjs.toGoogleSheetsEmbedUrl.call(void 0, externalUrl),
|
|
96
96
|
height
|
|
97
97
|
}
|
|
98
98
|
);
|
|
@@ -113,7 +113,7 @@ function FileDownloadCard({
|
|
|
113
113
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-h3 text-ods-text-primary", children: fileName || "File" }),
|
|
114
114
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center gap-3 mt-2 text-h6 text-ods-text-secondary", children: [
|
|
115
115
|
mimeType && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: mimeType }),
|
|
116
|
-
typeof fileSize === "number" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children:
|
|
116
|
+
typeof fileSize === "number" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkX4RCWYYFcjs.formatFileSize.call(void 0, fileSize) })
|
|
117
117
|
] })
|
|
118
118
|
] }),
|
|
119
119
|
fileUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -134,4 +134,4 @@ function FileDownloadCard({
|
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
exports.PdfViewer = PdfViewer; exports.GoogleSheetsViewer = GoogleSheetsViewer; exports.FileDownloadCard = FileDownloadCard;
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-4XG7TG7B.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-4XG7TG7B.cjs","../src/components/embeds/pdf-viewer.tsx","../src/components/embeds/google-sheets-viewer.tsx","../src/components/embeds/file-download-card.tsx"],"names":["jsxs","jsx","Download"],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACXA,2CAA8B;AAkBxB,+CAAA;AANC,SAAS,SAAA,CAAU,EAAE,GAAA,EAAK,QAAA,EAAU,SAAA,EAAW,UAAA,EAAY,OAAO,CAAA,EAAmB;AAC1F,EAAA,MAAM,YAAA,EAAc,SAAA,GAAY,cAAA;AAGhC,EAAA,GAAA,CAAI,CAAC,GAAA,EAAK;AACR,IAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,6DAAA,EACb,QAAA,EAAA;AAAA,sBAAA,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,yCAAA,CAAyC,CAAA;AAAA,sBACjE,6BAAA,GAAC,EAAA,EAAE,SAAA,EAAU,yBAAA,EAA0B,QAAA,EAAA,yBAAA,CAAsB;AAAA,IAAA,EAAA,CAC/D,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,6BAAA;AAAA,IAAC,kCAAA;AAAA,IAAA;AAAA,MACC,IAAA,kBAAM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AA,EACb,QAAA,kBAAAD,8BAAAA,KAAC,EAAA,EAAI,SAAA,EAAU,2FAAA,EACb,QAAA,EAAA;AAAA,oBAAAC,6BAAAA,qBAAC,EAAA,EAAS,SAAA,EAAU,4CAAA,CAA4C,CAAA;AAAA,oBAChED,8BAAAA,KAAC,EAAA,EACC,QAAA,EAAA;AAAA,sBAAAC,6BAAAA,IAAC,EAAA,EAAG,SAAA,EAAU,+BAAA,EACX,QAAA,EAAA,SAAA,GAAY,OAAA,CACf,CAAA;AAAA,sBACAD,8BAAAA,KAAC,EAAA,EAAI,SAAA,EAAU,6EAAA,EACZ,QAAA,EAAA;AAAA,QAAA,SAAA,mBAAYC,6BAAAA,MAAC,EAAA,EAAM,QAAA,EAAA,SAAA,CAAS,CAAA;AAAA,QAC5B,OAAO,SAAA,IAAa,SAAA,mBAAYA,6BAAAA,MAAC,EAAA,EAAM,QAAA,EAAA,8CAAA,QAAuB,EAAA,CAAE;AAAA,MAAA,EAAA,CACnE;AAAA,IAAA,EAAA,CACF,CAAA;AAAA,IACC,QAAA,mBACCA,6BAAAA;AAAA,MAAC,wBAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,QAAA;AAAA,QACR,IAAA,EAAM,OAAA;AAAA,QACN,YAAA,EAAY,IAAA;AAAA,QACZ,QAAA,kBAAUA,6BAAAA,qBAACC,EAAA,EAAS,SAAA,EAAU,UAAA,CAAU,CAAA;AAAA,QACzC,QAAA,EAAA;AAAA,MAAA;AAAA,IAED;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF,CAAA;AAEJ;AH6EA;AACA;AACE;AACA;AACA;AACF,4HAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-4XG7TG7B.cjs","sourcesContent":[null,"\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { Download, Eye } from 'lucide-react'\nimport { AdobePdfIcon } from '../icons-v2-generated'\nimport { EmbedViewerFrame } from './embed-viewer-frame'\n\nexport interface PdfViewerProps {\n src: string\n fileName?: string\n onPreview?: () => void\n onDownload?: () => void\n height?: string\n}\n\nexport function PdfViewer({ src, fileName, onPreview, onDownload, height }: PdfViewerProps) {\n const displayName = fileName || 'PDF Document'\n\n // Historical shape: no src at all → standalone empty state with NO header.\n if (!src) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <AdobePdfIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">PDF file not available</p>\n </div>\n )\n }\n\n return (\n <EmbedViewerFrame\n icon={<AdobePdfIcon className=\"w-5 h-5 shrink-0\" />}\n title={displayName}\n actions={\n <div className=\"flex items-center gap-2 w-full sm:w-auto\">\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onPreview ? undefined : src}\n openInNewTab={!onPreview}\n onClick={onPreview}\n leftIcon={<Eye className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Preview\n </Button>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onDownload ? undefined : src}\n openInNewTab={!onDownload}\n onClick={onDownload}\n leftIcon={<Download className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Download\n </Button>\n </div>\n }\n src={src}\n height={height}\n />\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { ExternalLink } from 'lucide-react'\nimport { GoogleSheetsIcon } from '../icons-v2-generated'\nimport { EmbedViewerFrame } from './embed-viewer-frame'\nimport { toGoogleSheetsEmbedUrl, toGoogleSheetsOriginalUrl } from '../../utils/embed-url-converters'\n\nexport interface GoogleSheetsViewerProps {\n externalUrl: string\n fileName?: string\n height?: string\n}\n\nexport function GoogleSheetsViewer({ externalUrl, fileName, height }: GoogleSheetsViewerProps) {\n const displayName = fileName || 'Google Sheet'\n\n // Historical shape: no URL at all → standalone empty state with NO header\n // (the frame's empty body keeps the header — that's the figma behavior).\n if (!externalUrl) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <GoogleSheetsIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Google Sheet URL not configured</p>\n </div>\n )\n }\n\n return (\n <EmbedViewerFrame\n icon={<GoogleSheetsIcon className=\"w-5 h-5 shrink-0\" />}\n title={displayName}\n actions={\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={toGoogleSheetsOriginalUrl(externalUrl)}\n openInNewTab\n leftIcon={<GoogleSheetsIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Google Sheets\n </Button>\n }\n src={toGoogleSheetsEmbedUrl(externalUrl)}\n height={height}\n />\n )\n}\n","import React from 'react'\nimport { Button } from '../ui'\nimport { FileText, Download } from 'lucide-react'\nimport { formatFileSize } from '../../utils'\n\nexport interface FileDownloadCardProps {\n fileName?: string\n mimeType?: string\n fileSize?: number\n fileUrl?: string\n}\n\n/**\n * Generic downloadable-file card for the `file` document type. Used by\n * `<DocsHubPage>`'s default `documentTypeRenderers.file`. Embedders can\n * override the default by passing their own `file` renderer.\n *\n * When `fileUrl` is missing, the Download button is omitted (the card still\n * renders the filename + type + size so the user knows what they were\n * about to download).\n */\nexport function FileDownloadCard({\n fileName,\n mimeType,\n fileSize,\n fileUrl,\n}: FileDownloadCardProps) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16\">\n <div className=\"bg-ods-card border border-ods-border rounded-xl p-8 max-w-md w-full text-center space-y-4\">\n <FileText className=\"w-16 h-16 text-ods-text-secondary mx-auto\" />\n <div>\n <h3 className=\"text-h3 text-ods-text-primary\">\n {fileName || 'File'}\n </h3>\n <div className=\"flex items-center justify-center gap-3 mt-2 text-h6 text-ods-text-secondary\">\n {mimeType && <span>{mimeType}</span>}\n {typeof fileSize === 'number' && <span>{formatFileSize(fileSize)}</span>}\n </div>\n </div>\n {fileUrl && (\n <Button\n variant=\"accent\"\n href={fileUrl}\n openInNewTab\n leftIcon={<Download className=\"w-4 h-4\" />}\n >\n Download File\n </Button>\n )}\n </div>\n </div>\n )\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkX4RCWYYFcjs = require('./chunk-X4RCWYYF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -52,7 +52,7 @@ function UnifiedPagination({
|
|
|
52
52
|
};
|
|
53
53
|
if (totalPages <= 1) return null;
|
|
54
54
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
55
|
-
|
|
55
|
+
_chunkX4RCWYYFcjs.Pagination,
|
|
56
56
|
{
|
|
57
57
|
currentPage,
|
|
58
58
|
totalPages,
|
|
@@ -65,7 +65,7 @@ var init_unified_pagination = _chunkVRHGVLSLcjs.__esm.call(void 0, {
|
|
|
65
65
|
"use strict";
|
|
66
66
|
"use client";
|
|
67
67
|
_chunkSSJNN5BScjs.init_next_navigation.call(void 0, );
|
|
68
|
-
|
|
68
|
+
_chunkX4RCWYYFcjs.init_pagination.call(void 0, );
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
|
|
@@ -210,4 +210,4 @@ function EmptyState({
|
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
exports.EmptyState = EmptyState; exports.UnifiedPagination = UnifiedPagination; exports.unified_pagination_exports = unified_pagination_exports; exports.init_unified_pagination = init_unified_pagination;
|
|
213
|
-
//# sourceMappingURL=chunk-
|
|
213
|
+
//# sourceMappingURL=chunk-6J6Q5QEM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-ZYQAFJLF.cjs","../src/components/unified-pagination.tsx","../src/components/empty-state.tsx"],"names":[],"mappings":"AAAA,q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AACA,EAAA;AACA,EAAA;AAKW,EAAA;AACX,EAAA;AAKJ,EAAA;AAEE,oBAAA;AASA,oBAAA;AAKA,oBAAA;AAKY,IAAA;AASC,IAAA;AASZ,IAAA;AAEI,MAAA;AAAA,MAAA;AACU,QAAA;AACD,QAAA;AACE,QAAA;AAET,QAAA;AAAA,MAAA;AAEL,IAAA;AAEJ,EAAA;AAEJ;AFdoB;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-ZYQAFJLF.cjs","sourcesContent":[null,"\"use client\"\n\nimport { useRouter, useSearchParams, usePathname } from \"../embed-shims/next-navigation\"\nimport { Pagination } from \"./pagination\"\n\ninterface UnifiedPaginationProps {\n currentPage: number\n totalPages: number\n onPageChange?: (page: number) => void\n className?: string\n}\n\nexport function UnifiedPagination({ \n currentPage, \n totalPages, \n onPageChange,\n className = \"mt-8 flex justify-center w-full\"\n}: UnifiedPaginationProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const pathname = usePathname()\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY\n \n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page)\n }\n \n // Update URL for bookmarking without navigation\n const params = new URLSearchParams(searchParams.toString())\n params.set(\"page\", page.toString())\n \n // Update URL without navigation (for bookmarking support)\n const newUrl = `${pathname}?${params.toString()}`\n window.history.replaceState(null, '', newUrl)\n \n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant' // Instant to prevent any scroll animation\n })\n }, 0)\n }\n\n // Don't render pagination if there's only one page\n if (totalPages <= 1) return null\n\n return (\n <div className={className}>\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={handlePageChange}\n />\n </div>\n )\n} ","\"use client\";\n\nimport { Search, FileText, Package } from \"lucide-react\"\nimport { Button } from \"./ui/button\"\nimport { useRouter } from \"../embed-shims/next-navigation\"\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic'\n title?: string\n description?: string\n showBackButton?: boolean\n onGoBack?: () => void\n backButtonText?: string\n // New CTA properties\n showCTA?: boolean\n ctaText?: string\n onCtaClick?: () => void\n /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string\n ctaVariant?: 'primary' | 'secondary'\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = \"Go Back\",\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaHref,\n ctaVariant = 'primary'\n}: EmptyStateProps) {\n const router = useRouter()\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"w-full h-full\" />,\n title: \"No vendors found\",\n description: \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\"\n }\n case 'posts':\n return {\n icon: <FileText className=\"w-full h-full\" />,\n title: \"No articles found\",\n description: \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\"\n }\n case 'search':\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"No results found\",\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\"\n }\n default:\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"Nothing found\",\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\"\n }\n }\n }\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick\n }\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined'\n const currentPath = isClient ? window.location.pathname : ''\n\n // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return\n const params = new URLSearchParams(window.location.search)\n for (const p of paramsToDelete) params.delete(p)\n const queryString = params.toString()\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash\n router.replace(\n `${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`,\n { scroll: false },\n )\n }\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: \"Reset Filters\",\n action: () => resetParams(['search', 'page'])\n }\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: \"Reset Filters\",\n action: () => resetParams(['search', 'page', 'category', 'tags'])\n }\n } else if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n return {\n text: \"View All Posts\",\n action: () => router.push('/blog')\n }\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: \"Reset Filters\",\n action: () => resetParams(['search', 'page', 'category', 'subcategory'])\n }\n }\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n default:\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n }\n\n const defaultContent = getDefaultContent()\n const displayTitle = title || defaultContent.title\n const displayDescription = description || defaultContent.description\n // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA()\n const ctaClassName = ctaVariant === 'primary'\n ? \"w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium\"\n : \"w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-body font-medium\"\n\n return (\n <div className=\"flex flex-col items-center justify-center py-6 md:py-16 px-6 text-center\">\n {/* Icon */}\n <div className=\"mb-3 md:mb-6 flex items-center justify-center\">\n <div className=\"rounded-full bg-ods-card p-3 md:p-6 border border-ods-border\">\n <div className=\"w-8 h-8 md:w-16 md:h-16 text-ods-text-secondary flex items-center justify-center\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 md:mb-3 text-h3 text-ods-text-primary\">\n {displayTitle}\n </h2>\n\n {/* Description */}\n <p className=\"mb-4 md:mb-8 max-w-md text-h6 text-ods-text-secondary\">\n {displayDescription}\n </p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"w-full max-w-xs mb-3\">\n <Button href={ctaHref} className={ctaClassName}>\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"w-full max-w-xs mb-3\">\n <Button onClick={smartCTA.action} className={ctaClassName}>\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full transition-all duration-150 font-body font-medium\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n )\n} "]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6J6Q5QEM.cjs","../src/components/unified-pagination.tsx","../src/components/empty-state.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;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E,oBAAA;AASA,oBAAA;AAKA,oBAAA;AAKY,IAAA;AASC,IAAA;AASZ,IAAA;AAEI,MAAA;AAAA,MAAA;AACU,QAAA;AACD,QAAA;AACE,QAAA;AAET,QAAA;AAAA,MAAA;AAEL,IAAA;AAEJ,EAAA;AAEJ;AFdoB;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-6J6Q5QEM.cjs","sourcesContent":[null,"\"use client\"\n\nimport { useRouter, useSearchParams, usePathname } from \"../embed-shims/next-navigation\"\nimport { Pagination } from \"./pagination\"\n\ninterface UnifiedPaginationProps {\n currentPage: number\n totalPages: number\n onPageChange?: (page: number) => void\n className?: string\n}\n\nexport function UnifiedPagination({ \n currentPage, \n totalPages, \n onPageChange,\n className = \"mt-8 flex justify-center w-full\"\n}: UnifiedPaginationProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const pathname = usePathname()\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY\n \n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page)\n }\n \n // Update URL for bookmarking without navigation\n const params = new URLSearchParams(searchParams.toString())\n params.set(\"page\", page.toString())\n \n // Update URL without navigation (for bookmarking support)\n const newUrl = `${pathname}?${params.toString()}`\n window.history.replaceState(null, '', newUrl)\n \n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant' // Instant to prevent any scroll animation\n })\n }, 0)\n }\n\n // Don't render pagination if there's only one page\n if (totalPages <= 1) return null\n\n return (\n <div className={className}>\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={handlePageChange}\n />\n </div>\n )\n} ","\"use client\";\n\nimport { Search, FileText, Package } from \"lucide-react\"\nimport { Button } from \"./ui/button\"\nimport { useRouter } from \"../embed-shims/next-navigation\"\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic'\n title?: string\n description?: string\n showBackButton?: boolean\n onGoBack?: () => void\n backButtonText?: string\n // New CTA properties\n showCTA?: boolean\n ctaText?: string\n onCtaClick?: () => void\n /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string\n ctaVariant?: 'primary' | 'secondary'\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = \"Go Back\",\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaHref,\n ctaVariant = 'primary'\n}: EmptyStateProps) {\n const router = useRouter()\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"w-full h-full\" />,\n title: \"No vendors found\",\n description: \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\"\n }\n case 'posts':\n return {\n icon: <FileText className=\"w-full h-full\" />,\n title: \"No articles found\",\n description: \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\"\n }\n case 'search':\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"No results found\",\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\"\n }\n default:\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"Nothing found\",\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\"\n }\n }\n }\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick\n }\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined'\n const currentPath = isClient ? window.location.pathname : ''\n\n // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return\n const params = new URLSearchParams(window.location.search)\n for (const p of paramsToDelete) params.delete(p)\n const queryString = params.toString()\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash\n router.replace(\n `${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`,\n { scroll: false },\n )\n }\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: \"Reset Filters\",\n action: () => resetParams(['search', 'page'])\n }\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: \"Reset Filters\",\n action: () => resetParams(['search', 'page', 'category', 'tags'])\n }\n } else if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n return {\n text: \"View All Posts\",\n action: () => router.push('/blog')\n }\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: \"Reset Filters\",\n action: () => resetParams(['search', 'page', 'category', 'subcategory'])\n }\n }\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n default:\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n }\n\n const defaultContent = getDefaultContent()\n const displayTitle = title || defaultContent.title\n const displayDescription = description || defaultContent.description\n // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA()\n const ctaClassName = ctaVariant === 'primary'\n ? \"w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium\"\n : \"w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-body font-medium\"\n\n return (\n <div className=\"flex flex-col items-center justify-center py-6 md:py-16 px-6 text-center\">\n {/* Icon */}\n <div className=\"mb-3 md:mb-6 flex items-center justify-center\">\n <div className=\"rounded-full bg-ods-card p-3 md:p-6 border border-ods-border\">\n <div className=\"w-8 h-8 md:w-16 md:h-16 text-ods-text-secondary flex items-center justify-center\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 md:mb-3 text-h3 text-ods-text-primary\">\n {displayTitle}\n </h2>\n\n {/* Description */}\n <p className=\"mb-4 md:mb-8 max-w-md text-h6 text-ods-text-secondary\">\n {displayDescription}\n </p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"w-full max-w-xs mb-3\">\n <Button href={ctaHref} className={ctaClassName}>\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"w-full max-w-xs mb-3\">\n <Button onClick={smartCTA.action} className={ctaClassName}>\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full transition-all duration-150 font-body font-medium\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n )\n} "]}
|
|
@@ -35,15 +35,15 @@ var _chunk4QYUNDS3cjs = require('./chunk-4QYUNDS3.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkX4RCWYYFcjs = require('./chunk-X4RCWYYF.cjs');
|
|
39
39
|
|
|
40
40
|
// src/components/related-content/related-content-section.tsx
|
|
41
41
|
var _react = require('react');
|
|
42
|
-
|
|
42
|
+
_chunkX4RCWYYFcjs.init_pagination.call(void 0, );
|
|
43
43
|
var _jsxruntime = require('react/jsx-runtime');
|
|
44
44
|
function DefaultLinkPropsProvider({ href, targetPlatform, children }) {
|
|
45
45
|
if (!href) return children(null);
|
|
46
|
-
const newTab =
|
|
46
|
+
const newTab = _chunkX4RCWYYFcjs.decideNewTab.call(void 0, { href, targetPlatform, currentSource: "" });
|
|
47
47
|
return children(
|
|
48
48
|
newTab ? { href, target: "_blank", rel: "noopener noreferrer" } : { href }
|
|
49
49
|
);
|
|
@@ -55,31 +55,31 @@ function renderSkeletonForType(type, size, adminCampaignCard) {
|
|
|
55
55
|
const legacySize = size === "sm" ? "sm" : "default";
|
|
56
56
|
switch (type) {
|
|
57
57
|
case "blog_post_existing":
|
|
58
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
58
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.BlogCardSkeleton, { size: legacySize });
|
|
59
59
|
case "case_study":
|
|
60
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
60
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.CaseStudyCardSkeleton, { size: legacySize });
|
|
61
61
|
case "customer_interview":
|
|
62
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
62
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.CustomerInterviewCardSkeleton, { size: legacySize });
|
|
63
63
|
case "product_release":
|
|
64
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
64
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.ProductReleaseCardSkeleton, { size: size === "sm" ? "sm" : "lg" });
|
|
65
65
|
case "podcast":
|
|
66
66
|
case "webinar":
|
|
67
67
|
case "event":
|
|
68
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
68
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.ProgramCardSkeleton, { size: legacySize });
|
|
69
69
|
case "investor_update":
|
|
70
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
70
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.InvestorUpdateCardSkeleton, { size: legacySize });
|
|
71
71
|
case "onboarding_guide":
|
|
72
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
72
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.OnboardingGuideCardSkeleton, { size: size === "sm" ? "sm" : "catalog" });
|
|
73
73
|
case "what_i_shipped":
|
|
74
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
74
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.WhatIShippedCardSkeleton, {});
|
|
75
75
|
case "how_i_work":
|
|
76
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
76
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.HowIWorkCardSkeleton, {});
|
|
77
77
|
case "marketing_campaign":
|
|
78
78
|
return adminCampaignCard ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, adminCampaignCard.Skeleton, { size: legacySize }) : null;
|
|
79
79
|
case "roadmap_item":
|
|
80
80
|
case "delivery_item":
|
|
81
81
|
case "internal_task":
|
|
82
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.RoadmapCardSkeleton, { size: legacySize });
|
|
83
83
|
default:
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
@@ -99,17 +99,17 @@ function CardForType({
|
|
|
99
99
|
const anchorAttrs = linkProps ? { target: linkProps.target, rel: linkProps.rel } : {};
|
|
100
100
|
switch (type) {
|
|
101
101
|
case "blog_post_existing":
|
|
102
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
102
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.BlogCard, { post: item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs });
|
|
103
103
|
case "case_study":
|
|
104
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
104
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.CaseStudyCard, { study: item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs });
|
|
105
105
|
case "customer_interview":
|
|
106
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
106
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.CustomerInterviewCard, { interview: item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs });
|
|
107
107
|
case "product_release": {
|
|
108
108
|
const releaseSize = size === "sm" ? "sm" : "lg";
|
|
109
|
-
const buildReleaseProps = _nullishCoalesce(_optionalChain([extras, 'optionalAccess', _5 => _5.buildProductReleaseCardProps]), () => (
|
|
109
|
+
const buildReleaseProps = _nullishCoalesce(_optionalChain([extras, 'optionalAccess', _5 => _5.buildProductReleaseCardProps]), () => ( _chunkX4RCWYYFcjs.buildProductReleaseCardProps));
|
|
110
110
|
const releaseProps = buildReleaseProps(item);
|
|
111
111
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
112
|
-
|
|
112
|
+
_chunkX4RCWYYFcjs.ProductReleaseCard,
|
|
113
113
|
{
|
|
114
114
|
size: releaseSize,
|
|
115
115
|
title: item.title,
|
|
@@ -121,18 +121,18 @@ function CardForType({
|
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
case "podcast":
|
|
124
|
-
return _optionalChain([extras, 'optionalAccess', _6 => _6.programConfigs, 'optionalAccess', _7 => _7.podcast]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
124
|
+
return _optionalChain([extras, 'optionalAccess', _6 => _6.programConfigs, 'optionalAccess', _7 => _7.podcast]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.ProgramCard, { config: extras.programConfigs.podcast, item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs }) : null;
|
|
125
125
|
case "webinar":
|
|
126
|
-
return _optionalChain([extras, 'optionalAccess', _8 => _8.programConfigs, 'optionalAccess', _9 => _9.webinar]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
126
|
+
return _optionalChain([extras, 'optionalAccess', _8 => _8.programConfigs, 'optionalAccess', _9 => _9.webinar]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.ProgramCard, { config: extras.programConfigs.webinar, item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs }) : null;
|
|
127
127
|
case "event":
|
|
128
|
-
return _optionalChain([extras, 'optionalAccess', _10 => _10.programConfigs, 'optionalAccess', _11 => _11.event]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
128
|
+
return _optionalChain([extras, 'optionalAccess', _10 => _10.programConfigs, 'optionalAccess', _11 => _11.event]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.ProgramCard, { config: extras.programConfigs.event, item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs }) : null;
|
|
129
129
|
case "investor_update":
|
|
130
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
130
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.InvestorUpdateCard, { update: item, size: legacySize, href, targetPlatform, placeholderUrl, ...anchorAttrs });
|
|
131
131
|
case "onboarding_guide":
|
|
132
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
132
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.OnboardingGuideCard, { guide: item, size: size === "sm" ? "sm" : "catalog", href, targetPlatform, placeholderUrl, ...anchorAttrs });
|
|
133
133
|
case "what_i_shipped":
|
|
134
134
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
135
|
-
|
|
135
|
+
_chunkX4RCWYYFcjs.WhatIShippedCard,
|
|
136
136
|
{
|
|
137
137
|
entry: item,
|
|
138
138
|
placeholderUrl,
|
|
@@ -141,7 +141,7 @@ function CardForType({
|
|
|
141
141
|
);
|
|
142
142
|
case "how_i_work":
|
|
143
143
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
144
|
-
|
|
144
|
+
_chunkX4RCWYYFcjs.HowIWorkCard,
|
|
145
145
|
{
|
|
146
146
|
entry: item,
|
|
147
147
|
placeholderUrl,
|
|
@@ -154,7 +154,7 @@ function CardForType({
|
|
|
154
154
|
case "delivery_item":
|
|
155
155
|
case "internal_task":
|
|
156
156
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
157
|
-
|
|
157
|
+
_chunkX4RCWYYFcjs.RoadmapCard,
|
|
158
158
|
{
|
|
159
159
|
item,
|
|
160
160
|
href: _nullishCoalesce(href, () => ( "")),
|
|
@@ -175,14 +175,14 @@ function useGroupItems(type, refs, buildUrl) {
|
|
|
175
175
|
const ids = refs.map((r) => r.id);
|
|
176
176
|
const url = ids.length > 0 ? buildUrl(type, ids) : null;
|
|
177
177
|
const { data, isLoading } = _chunk4QYUNDS3cjs.useSelfFetch.call(void 0, url);
|
|
178
|
-
const items = data != null ?
|
|
178
|
+
const items = data != null ? _chunkX4RCWYYFcjs.extractItems.call(void 0, data) : null;
|
|
179
179
|
return { items, isLoading };
|
|
180
180
|
}
|
|
181
181
|
function gridClassFor(columns) {
|
|
182
182
|
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";
|
|
183
183
|
}
|
|
184
184
|
function resolveGroupConfig(type) {
|
|
185
|
-
return _nullishCoalesce(
|
|
185
|
+
return _nullishCoalesce(_chunkX4RCWYYFcjs.CONTENT_REF_GROUPS[type], () => ( {
|
|
186
186
|
label: type,
|
|
187
187
|
order: 999,
|
|
188
188
|
layout: "grid",
|
|
@@ -217,7 +217,7 @@ function ContentGroup({
|
|
|
217
217
|
const totalGroupPages = Math.max(1, Math.ceil(refs.length / GROUP_PAGE_SIZE));
|
|
218
218
|
const safePage = Math.min(page, totalGroupPages);
|
|
219
219
|
const visibleGroupRefs = refs.length > GROUP_PAGE_SIZE ? refs.slice((safePage - 1) * GROUP_PAGE_SIZE, safePage * GROUP_PAGE_SIZE) : refs;
|
|
220
|
-
const groupPagination = totalGroupPages > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
220
|
+
const groupPagination = totalGroupPages > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX4RCWYYFcjs.Pagination, { currentPage: safePage, totalPages: totalGroupPages, onPageChange: setPage }) : null;
|
|
221
221
|
if (isLoading && !items) {
|
|
222
222
|
const skeletons = visibleGroupRefs.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: renderSkeletonForType(type, cardSize, adminCampaignCard) }, r.id));
|
|
223
223
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
|
|
@@ -227,7 +227,7 @@ function ContentGroup({
|
|
|
227
227
|
}
|
|
228
228
|
if (!items || items.length === 0) return null;
|
|
229
229
|
const itemById = new Map(
|
|
230
|
-
items.map((it) => [_nullishCoalesce(
|
|
230
|
+
items.map((it) => [_nullishCoalesce(_chunkX4RCWYYFcjs.extractItemId.call(void 0, type, it), () => ( String(_optionalChain([it, 'optionalAccess', _12 => _12.id])))), it])
|
|
231
231
|
);
|
|
232
232
|
const cards = visibleGroupRefs.map((contentRef) => {
|
|
233
233
|
const itemId = String(contentRef.id);
|
|
@@ -292,11 +292,11 @@ function RelatedContentSection({
|
|
|
292
292
|
types: includeTypes !== void 0 ? includeTypes.join(",") : void 0,
|
|
293
293
|
excludeTypes: excludeTypes && excludeTypes.length > 0 ? excludeTypes.join(",") : void 0
|
|
294
294
|
};
|
|
295
|
-
const authorUrl = contentRefs === void 0 && authorId && !suggestionsDisabled ?
|
|
295
|
+
const authorUrl = contentRefs === void 0 && authorId && !suggestionsDisabled ? _chunkX4RCWYYFcjs.buildSuggestionUrl.call(void 0, "/api/related-content", {
|
|
296
296
|
apiBaseUrl,
|
|
297
297
|
extraParams: { authorId, ...typeFilterParams }
|
|
298
298
|
}) : null;
|
|
299
|
-
const suggestUrl = _nullishCoalesce(authorUrl, () => ( (contentRefs === void 0 && entityType && entityId !== void 0 && entityId !== null && entityId !== "" && !suggestionsDisabled ?
|
|
299
|
+
const suggestUrl = _nullishCoalesce(authorUrl, () => ( (contentRefs === void 0 && entityType && entityId !== void 0 && entityId !== null && entityId !== "" && !suggestionsDisabled ? _chunkX4RCWYYFcjs.buildSuggestionUrl.call(void 0, "/api/related-content", {
|
|
300
300
|
apiBaseUrl,
|
|
301
301
|
entityType,
|
|
302
302
|
entityId,
|
|
@@ -315,7 +315,7 @@ function RelatedContentSection({
|
|
|
315
315
|
);
|
|
316
316
|
const { data, isLoading } = _chunk4QYUNDS3cjs.useSelfFetch.call(void 0, suggestUrl, { initialData });
|
|
317
317
|
const effectiveBuildListUrl = _react.useMemo.call(void 0,
|
|
318
|
-
() => _nullishCoalesce(buildListUrl2, () => ( ((type, ids) =>
|
|
318
|
+
() => _nullishCoalesce(buildListUrl2, () => ( ((type, ids) => _chunkX4RCWYYFcjs.buildListUrl.call(void 0, type, ids, apiBaseUrl)))),
|
|
319
319
|
[buildListUrl2, apiBaseUrl]
|
|
320
320
|
);
|
|
321
321
|
const refs = _nullishCoalesce(_nullishCoalesce(contentRefs, () => ( _optionalChain([data, 'optionalAccess', _14 => _14.refs]))), () => ( []));
|
|
@@ -340,12 +340,12 @@ function RelatedContentSection({
|
|
|
340
340
|
if (!grouped[ref.type]) grouped[ref.type] = [];
|
|
341
341
|
grouped[ref.type].push(ref);
|
|
342
342
|
}
|
|
343
|
-
let orderedTypes =
|
|
343
|
+
let orderedTypes = _chunkX4RCWYYFcjs.orderContentRefTypes.call(void 0, Object.keys(grouped));
|
|
344
344
|
if (entityType) {
|
|
345
|
-
const canonicalEntityType =
|
|
346
|
-
const sameType = orderedTypes.filter((t) =>
|
|
345
|
+
const canonicalEntityType = _chunkX4RCWYYFcjs.canonicalContentRefType.call(void 0, entityType);
|
|
346
|
+
const sameType = orderedTypes.filter((t) => _chunkX4RCWYYFcjs.canonicalContentRefType.call(void 0, t) === canonicalEntityType);
|
|
347
347
|
if (sameType.length > 0) {
|
|
348
|
-
orderedTypes = [...sameType, ...orderedTypes.filter((t) =>
|
|
348
|
+
orderedTypes = [...sameType, ...orderedTypes.filter((t) => _chunkX4RCWYYFcjs.canonicalContentRefType.call(void 0, t) !== canonicalEntityType)];
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-8", children: [
|
|
@@ -361,7 +361,7 @@ function RelatedContentSection({
|
|
|
361
361
|
LinkProvider,
|
|
362
362
|
extras,
|
|
363
363
|
adminCampaignCard,
|
|
364
|
-
heading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-h5 font-semibold text-ods-text-secondary", children:
|
|
364
|
+
heading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-h5 font-semibold text-ods-text-secondary", children: _chunkX4RCWYYFcjs.getContentRefLabelOrTitleCase.call(void 0, type) })
|
|
365
365
|
},
|
|
366
366
|
type
|
|
367
367
|
))
|
|
@@ -372,4 +372,4 @@ function RelatedContentSection({
|
|
|
372
372
|
|
|
373
373
|
|
|
374
374
|
exports.GROUP_PAGE_SIZE = GROUP_PAGE_SIZE; exports.RelatedContentSection = RelatedContentSection;
|
|
375
|
-
//# sourceMappingURL=chunk-
|
|
375
|
+
//# sourceMappingURL=chunk-6MHMEF5W.cjs.map
|