@flamingo-stack/openframe-frontend-core 0.0.546 → 0.0.547
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-ERRD2KX7.cjs → chunk-2JFML4CT.cjs} +61 -61
- package/dist/{chunk-ERRD2KX7.cjs.map → chunk-2JFML4CT.cjs.map} +1 -1
- package/dist/{chunk-YVLIC36O.js → chunk-2XBUB2OM.js} +4 -4
- package/dist/{chunk-CKU7C2NQ.cjs → chunk-343RZD5C.cjs} +11 -11
- package/dist/{chunk-CKU7C2NQ.cjs.map → chunk-343RZD5C.cjs.map} +1 -1
- package/dist/{chunk-6MOD65VQ.cjs → chunk-4S6HEFR7.cjs} +87 -87
- package/dist/{chunk-6MOD65VQ.cjs.map → chunk-4S6HEFR7.cjs.map} +1 -1
- package/dist/{chunk-5W2OUL2H.cjs → chunk-4TPHYUPY.cjs} +9 -9
- package/dist/{chunk-5W2OUL2H.cjs.map → chunk-4TPHYUPY.cjs.map} +1 -1
- package/dist/{chunk-3DERWWWX.cjs → chunk-53WLIAKO.cjs} +37 -37
- package/dist/{chunk-3DERWWWX.cjs.map → chunk-53WLIAKO.cjs.map} +1 -1
- package/dist/{chunk-AFQZIKIC.cjs → chunk-57V3X73U.cjs} +27 -27
- package/dist/{chunk-AFQZIKIC.cjs.map → chunk-57V3X73U.cjs.map} +1 -1
- package/dist/{chunk-CHZ57UPO.js → chunk-5UBALP5G.js} +4 -4
- package/dist/{chunk-K3GU3GXP.js → chunk-64FJ5QLI.js} +2 -2
- package/dist/{chunk-RCEVUZEI.js → chunk-77C6Q622.js} +2 -2
- package/dist/{chunk-QZLWVIT4.cjs → chunk-77NHAQIC.cjs} +14 -14
- package/dist/{chunk-QZLWVIT4.cjs.map → chunk-77NHAQIC.cjs.map} +1 -1
- package/dist/{chunk-3MMSQ7SC.js → chunk-7NWFATGX.js} +2 -2
- package/dist/{chunk-HDDPE36K.js → chunk-APKL3K57.js} +2 -2
- package/dist/{chunk-YMXJJ4MY.cjs → chunk-CZGRFEDX.cjs} +31 -31
- package/dist/{chunk-YMXJJ4MY.cjs.map → chunk-CZGRFEDX.cjs.map} +1 -1
- package/dist/{chunk-CJ4KV7D2.js → chunk-DSOJBDJ2.js} +2 -2
- package/dist/{chunk-EOZBJY22.js → chunk-FORSAXLQ.js} +2 -2
- package/dist/{chunk-DCQN7QEU.js → chunk-HLJXBIQT.js} +5 -5
- package/dist/{chunk-5NZLZTUD.js → chunk-I5AVSFMX.js} +6 -6
- package/dist/{chunk-M4H6XBEL.js → chunk-KMOPF7BT.js} +3693 -3579
- package/dist/chunk-KMOPF7BT.js.map +1 -0
- package/dist/{chunk-CHQOAONB.cjs → chunk-NFUVR7OE.cjs} +5 -5
- package/dist/{chunk-CHQOAONB.cjs.map → chunk-NFUVR7OE.cjs.map} +1 -1
- package/dist/{chunk-TW6NP2IH.cjs → chunk-QUPQLQ4R.cjs} +776 -662
- package/dist/chunk-QUPQLQ4R.cjs.map +1 -0
- package/dist/{chunk-SDXCNTEC.cjs → chunk-UHP554ZG.cjs} +7 -7
- package/dist/{chunk-SDXCNTEC.cjs.map → chunk-UHP554ZG.cjs.map} +1 -1
- package/dist/{chunk-5CWG5JAO.cjs → chunk-UYH2NLM4.cjs} +4 -4
- package/dist/{chunk-5CWG5JAO.cjs.map → chunk-UYH2NLM4.cjs.map} +1 -1
- package/dist/{chunk-MEJDX5UP.cjs → chunk-V7WUMODL.cjs} +3 -3
- package/dist/{chunk-MEJDX5UP.cjs.map → chunk-V7WUMODL.cjs.map} +1 -1
- package/dist/{chunk-3UCQWXA3.cjs → chunk-WGJFHOU4.cjs} +26 -26
- package/dist/{chunk-3UCQWXA3.cjs.map → chunk-WGJFHOU4.cjs.map} +1 -1
- package/dist/{chunk-J6AT6PCW.js → chunk-WLDFAJDL.js} +2 -2
- package/dist/{chunk-OYNCKOLU.js → chunk-XCJPDYKU.js} +2 -2
- package/dist/{chunk-Q6I6XGMX.js → chunk-XDPVVHBF.js} +2 -2
- 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/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +134 -132
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- 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/admin-form-modal.d.ts +73 -0
- package/dist/components/ui/admin-form-modal.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +4 -2
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +3 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/components/ui/.admin-form-modal.md +18 -0
- package/src/components/ui/admin-form-modal.tsx +255 -0
- package/src/components/ui/index.ts +1 -0
- package/dist/chunk-M4H6XBEL.js.map +0 -1
- package/dist/chunk-TW6NP2IH.cjs.map +0 -1
- /package/dist/{chunk-YVLIC36O.js.map → chunk-2XBUB2OM.js.map} +0 -0
- /package/dist/{chunk-CHZ57UPO.js.map → chunk-5UBALP5G.js.map} +0 -0
- /package/dist/{chunk-K3GU3GXP.js.map → chunk-64FJ5QLI.js.map} +0 -0
- /package/dist/{chunk-RCEVUZEI.js.map → chunk-77C6Q622.js.map} +0 -0
- /package/dist/{chunk-3MMSQ7SC.js.map → chunk-7NWFATGX.js.map} +0 -0
- /package/dist/{chunk-HDDPE36K.js.map → chunk-APKL3K57.js.map} +0 -0
- /package/dist/{chunk-CJ4KV7D2.js.map → chunk-DSOJBDJ2.js.map} +0 -0
- /package/dist/{chunk-EOZBJY22.js.map → chunk-FORSAXLQ.js.map} +0 -0
- /package/dist/{chunk-DCQN7QEU.js.map → chunk-HLJXBIQT.js.map} +0 -0
- /package/dist/{chunk-5NZLZTUD.js.map → chunk-I5AVSFMX.js.map} +0 -0
- /package/dist/{chunk-J6AT6PCW.js.map → chunk-WLDFAJDL.js.map} +0 -0
- /package/dist/{chunk-OYNCKOLU.js.map → chunk-XCJPDYKU.js.map} +0 -0
- /package/dist/{chunk-Q6I6XGMX.js.map → chunk-XDPVVHBF.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkQUPQLQ4Rcjs = require('./chunk-QUPQLQ4R.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
|
+
_chunkQUPQLQ4Rcjs.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
|
+
_chunkQUPQLQ4Rcjs.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: _chunkQUPQLQ4Rcjs.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: _chunkQUPQLQ4Rcjs.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: _chunkQUPQLQ4Rcjs.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-UHP554ZG.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-UHP554ZG.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,S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AA,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-UHP554ZG.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 _chunkQUPQLQ4Rcjs = require('./chunk-QUPQLQ4R.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
|
+
_chunkQUPQLQ4Rcjs.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
|
+
_chunkQUPQLQ4Rcjs.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-UYH2NLM4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-5CWG5JAO.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;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACpBA,IAAA,2BAAA,EAAA,CAAA,CAAA;AAAA,wCAAA,0BAAA,EAAA;AAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,GAAA;AAAA,CAAA,CAAA;AAqDM,+CAAA;AAzCC,SAAS,iBAAA,CAAkB;AAAA,EAChC,WAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA,EAAY;AACd,CAAA,EAA2B;AACzB,EAAA,MAAM,OAAA,EAAS,yCAAA,CAAU;AACzB,EAAA,MAAM,aAAA,EAAe,+CAAA,CAAgB;AACrC,EAAA,MAAM,SAAA,EAAW,2CAAA,CAAY;AAE7B,EAAA,MAAM,iBAAA,EAAmB,CAAC,IAAA,EAAA,GAAiB;AAEzC,IAAA,MAAM,eAAA,EAAiB,MAAA,CAAO,OAAA;AAG9B,IAAA,GAAA,CAAI,YAAA,EAAc;AAChB,MAAA,YAAA,CAAa,IAAI,CAAA;AAAA,IACnB;AAGA,IAAA,MAAM,OAAA,EAAS,IAAI,eAAA,CAAgB,YAAA,CAAa,QAAA,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AA;AAEC,QAAA;AACK,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACS,QAAA;AACF,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACF,QAAA;AACO,QAAA;AACC,UAAA;AACE,UAAA;AACV,QAAA;AACG,MAAA;AAEC,QAAA;AACK,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACS,QAAA;AACF,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACF,QAAA;AACO,QAAA;AACC,UAAA;AACE,UAAA;AACV,QAAA;AACF,MAAA;AACS,QAAA;AACC,UAAA;AACE,UAAA;AACV,QAAA;AACJ,IAAA;AACF,EAAA;AAEM,EAAA;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-5CWG5JAO.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-UYH2NLM4.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;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACpBA,IAAA,2BAAA,EAAA,CAAA,CAAA;AAAA,wCAAA,0BAAA,EAAA;AAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,GAAA;AAAA,CAAA,CAAA;AAqDM,+CAAA;AAzCC,SAAS,iBAAA,CAAkB;AAAA,EAChC,WAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA,EAAY;AACd,CAAA,EAA2B;AACzB,EAAA,MAAM,OAAA,EAAS,yCAAA,CAAU;AACzB,EAAA,MAAM,aAAA,EAAe,+CAAA,CAAgB;AACrC,EAAA,MAAM,SAAA,EAAW,2CAAA,CAAY;AAE7B,EAAA,MAAM,iBAAA,EAAmB,CAAC,IAAA,EAAA,GAAiB;AAEzC,IAAA,MAAM,eAAA,EAAiB,MAAA,CAAO,OAAA;AAG9B,IAAA,GAAA,CAAI,YAAA,EAAc;AAChB,MAAA,YAAA,CAAa,IAAI,CAAA;AAAA,IACnB;AAGA,IAAA,MAAM,OAAA,EAAS,IAAI,eAAA,CAAgB,YAAA,CAAa,QAAA,CAAS,CAAC,CAAA;AAC1D,IAAA,MAAA,CAAO,GAAA,CAAI,MAAA,EA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QAAA;AACF,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACF,QAAA;AACO,QAAA;AACC,UAAA;AACE,UAAA;AACV,QAAA;AACG,MAAA;AAEC,QAAA;AACK,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACS,QAAA;AACF,UAAA;AACC,YAAA;AACE,YAAA;AACV,UAAA;AACF,QAAA;AACO,QAAA;AACC,UAAA;AACE,UAAA;AACV,QAAA;AACF,MAAA;AACS,QAAA;AACC,UAAA;AACE,UAAA;AACV,QAAA;AACJ,IAAA;AACF,EAAA;AAEM,EAAA;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-UYH2NLM4.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} "]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUYH2NLM4cjs = require('./chunk-UYH2NLM4.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -112,7 +112,7 @@ function PersistentPaginationWrapper({
|
|
|
112
112
|
const displayCurrentPage = hasResults ? currentPage : 1;
|
|
113
113
|
const isPaginationDisabled = isLoading;
|
|
114
114
|
const hasNoResults = !hasResults && !isLoading;
|
|
115
|
-
const PaginationComponent = (
|
|
115
|
+
const PaginationComponent = (_chunkUYH2NLM4cjs.init_unified_pagination.call(void 0, ), _chunkVRHGVLSLcjs.__toCommonJS.call(void 0, _chunkUYH2NLM4cjs.unified_pagination_exports)).UnifiedPagination;
|
|
116
116
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
@@ -172,4 +172,4 @@ function PersistentPaginationWrapper({
|
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
exports.PersistentPagination = PersistentPagination; exports.usePaginationLoading = usePaginationLoading; exports.PersistentPaginationWrapper = PersistentPaginationWrapper;
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-V7WUMODL.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-V7WUMODL.cjs","../src/components/persistent-pagination.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;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EAAA;AACL,IAAA;AACA,IAAA;AACA,IAAA;AACF,EAAA;AACF;AAcgB;AACd,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACU,EAAA;AACyB;AACT,EAAA;AACxB,IAAA;AACA,IAAA;AACA,IAAA;AACF,EAAA;AAImB,EAAA;AACO,EAAA;AACC,EAAA;AAErB,EAAA;AACgB,EAAA;AAIhB,EAAA;AAGJ,EAAA;AAAC,IAAA;AAAA,IAAA;AACY,MAAA;AACT,QAAA;AACC,QAAA;AACD,QAAA;AACF,MAAA;AACO,MAAA;AACI,QAAA;AACW,QAAA;AACtB,MAAA;AACK,MAAA;AACM,MAAA;AACA,MAAA;AACG,MAAA;AACI,MAAA;AAGhB,MAAA;AAAc,QAAA;AACb,UAAA;AAAA,UAAA;AACW,YAAA;AACL,YAAA;AACK,YAAA;AAET,YAAA;AAEG,UAAA;AAEN,QAAA;AAIF,wBAAA;AAAC,UAAA;AAAA,UAAA;AACY,YAAA;AACT,cAAA;AACA,cAAA;AACF,YAAA;AACO,YAAA;AACL,cAAA;AACF,YAAA;AACa,YAAA;AAEb,YAAA;AAAC,cAAA;AAAA,cAAA;AACc,gBAAA;AACD,gBAAA;AACZ,gBAAA;AAAiD,gBAAA;AAAA,cAAA;AACnD,YAAA;AAAA,UAAA;AACF,QAAA;AAAA,MAAA;AAAA,IAAA;AAGF,EAAA;AAEJ;AD9E6B;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-V7WUMODL.cjs","sourcesContent":[null,"\"use client\"\n\nimport { ReactNode } from \"react\"\nimport { cn } from \"../utils/cn\"\n\ninterface PersistentPaginationProps {\n /**\n * Whether pagination is currently in a loading state\n */\n isLoading: boolean\n /**\n * The pagination component\n */\n children: ReactNode\n /**\n * Current page number\n */\n currentPage: number\n /**\n * Total number of pages\n */\n totalPages: number\n /**\n * Additional CSS classes\n */\n className?: string\n /**\n * Disabled opacity (0-1)\n */\n disabledOpacity?: number\n /**\n * Transition duration in milliseconds\n */\n transitionDuration?: number\n /**\n * Whether to show loading state in pagination\n */\n showLoadingState?: boolean\n}\n\n/**\n * PersistentPagination\n * \n * A wrapper component that keeps pagination visible during loading states\n * but provides visual feedback that it's temporarily disabled.\n * \n * Features:\n * - Maintains pagination visibility during content loading\n * - Disables interaction but preserves layout\n * - Shows current page context even when loading\n * - Provides accessibility support for loading states\n * - Smooth transitions between enabled/disabled states\n * \n * Usage:\n * ```tsx\n * <PersistentPagination\n * isLoading={isLoadingVendors}\n * currentPage={currentPage}\n * totalPages={totalPages}\n * >\n * <Pagination currentPage={currentPage} totalPages={totalPages} />\n * </PersistentPagination>\n * ```\n */\nexport function PersistentPagination({\n isLoading,\n children,\n currentPage,\n totalPages,\n className,\n disabledOpacity = 0.5,\n transitionDuration = 300,\n showLoadingState = true,\n}: PersistentPaginationProps) {\n // ALWAYS show pagination for predictable layout - just gray it out when not needed\n // Removed condition that hides pagination completely\n\n return (\n <div \n className={cn(\n \"relative transition-all ease-in-out\",\n \"flex justify-center items-center\",\n isLoading && \"pointer-events-none\",\n className\n )}\n style={{\n opacity: isLoading ? disabledOpacity : 1,\n transitionDuration: `${transitionDuration}ms`\n }}\n role=\"navigation\"\n aria-label=\"Pagination\"\n aria-busy={isLoading}\n data-loading={isLoading}\n >\n {/* Loading state announcement for screen readers */}\n {isLoading && (\n <div \n className=\"sr-only\" \n role=\"status\" \n aria-live=\"polite\"\n >\n Pagination temporarily disabled while loading page {currentPage} of {totalPages}\n </div>\n )}\n\n {/* Pagination controls with disabled state */}\n <div \n className={cn(\n \"relative transition-all ease-in-out\",\n isLoading && \"cursor-not-allowed\"\n )}\n style={{\n transitionDuration: `${transitionDuration}ms`\n }}\n aria-hidden={isLoading}\n >\n {children}\n </div>\n\n {/* REMOVED: Loading overlay - only card skeletons should show during loading */}\n </div>\n )\n}\n\n/**\n * Hook for managing pagination loading states\n */\nexport function usePaginationLoading(\n isLoading: boolean,\n currentPage: number,\n totalPages: number\n) {\n const shouldShowPagination = totalPages > 1 || isLoading\n \n const paginationProps = {\n 'aria-busy': isLoading,\n 'data-loading': isLoading,\n 'data-current-page': currentPage,\n 'data-total-pages': totalPages,\n }\n\n const getLoadingMessage = () => {\n if (isLoading) {\n return `Loading page ${currentPage} of ${totalPages}`\n }\n return `Page ${currentPage} of ${totalPages}`\n }\n\n return {\n shouldShowPagination,\n paginationProps,\n getLoadingMessage,\n }\n}\n\n/**\n * Enhanced pagination component that includes loading states\n */\ninterface PersistentPaginationWrapperProps {\n isLoading: boolean\n currentPage: number\n totalPages: number\n onPageChange?: (page: number) => void\n className?: string\n variant?: 'vendor' | 'blog'\n}\n\nexport function PersistentPaginationWrapper({\n isLoading,\n currentPage,\n totalPages,\n onPageChange,\n className,\n variant = 'vendor'\n}: PersistentPaginationWrapperProps) {\n const { getLoadingMessage } = usePaginationLoading(\n isLoading,\n currentPage,\n totalPages\n )\n\n // ALWAYS show pagination for predictable layout\n // For no results (totalPages = 0), show grayed out pagination\n const hasResults = totalPages > 0\n const displayTotalPages = hasResults ? totalPages : 1\n const displayCurrentPage = hasResults ? currentPage : 1\n // Only disable during loading, but still show when no results (just grayed out)\n const isPaginationDisabled = isLoading\n const hasNoResults = !hasResults && !isLoading\n\n // Use UnifiedPagination directly from ui-kit instead of importing from consuming apps\n // Both Pagination and BlogPagination in multi-platform-hub are just wrappers around UnifiedPagination\n const PaginationComponent = require('./unified-pagination').UnifiedPagination\n\n return (\n <div \n className={cn(\n \"relative transition-all ease-in-out flex justify-center items-center\",\n (isPaginationDisabled || hasNoResults) && \"pointer-events-none\",\n className\n )}\n style={{\n opacity: isPaginationDisabled ? 0.3 : hasNoResults ? 0.5 : 1,\n transitionDuration: \"300ms\"\n }}\n role=\"navigation\"\n aria-label=\"Pagination\"\n aria-busy={isLoading}\n data-loading={isLoading}\n data-has-results={hasResults}\n >\n {/* Loading/no results state announcement for screen readers */}\n {(isLoading || !hasResults) && (\n <div \n className=\"sr-only\" \n role=\"status\" \n aria-live=\"polite\"\n >\n {isLoading \n ? `Pagination temporarily disabled while loading page ${displayCurrentPage} of ${displayTotalPages}`\n : `No results available - pagination disabled`\n }\n </div>\n )}\n\n {/* Pagination controls with disabled state */}\n <div \n className={cn(\n \"relative transition-all ease-in-out\",\n isPaginationDisabled && \"cursor-not-allowed\"\n )}\n style={{\n transitionDuration: \"300ms\"\n }}\n aria-hidden={isPaginationDisabled}\n >\n <PaginationComponent\n currentPage={displayCurrentPage}\n totalPages={displayTotalPages}\n onPageChange={hasResults ? onPageChange : () => {}} // Provide empty function instead of undefined\n />\n </div>\n\n {/* REMOVED: Loading overlays - only card skeletons should show during loading */}\n </div>\n )\n} "]}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkQUPQLQ4Rcjs = require('./chunk-QUPQLQ4R.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -111,7 +111,7 @@ function ContactForm({
|
|
|
111
111
|
successRedirectUrl = "/blog#community",
|
|
112
112
|
successToastMessage = "Redirecting you to join our community..."
|
|
113
113
|
} = {}) {
|
|
114
|
-
const attachments =
|
|
114
|
+
const attachments = _chunkQUPQLQ4Rcjs.useChatAttachments.call(void 0, );
|
|
115
115
|
const builtInSubmission = _chunk5RJUHUCIcjs.useContactSubmission.call(void 0, {
|
|
116
116
|
userId,
|
|
117
117
|
successRedirectUrl,
|
|
@@ -173,7 +173,7 @@ function ContactForm({
|
|
|
173
173
|
className: `h-full flex flex-col ${!noBorder ? "border border-ods-border rounded-2xl md:rounded-3xl" : ""} ${!noPadding ? "p-6 md:p-8 lg:p-10" : ""}`,
|
|
174
174
|
children: [
|
|
175
175
|
(title || subtitle) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-6 md:mb-8", children: [
|
|
176
|
-
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: `${
|
|
176
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: `${_chunkQUPQLQ4Rcjs.SECTION_HEADING_CLASS} mb-3 md:mb-4`, children: title }),
|
|
177
177
|
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-h4 text-ods-text-primary", children: subtitle })
|
|
178
178
|
] }),
|
|
179
179
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -193,11 +193,11 @@ function ContactForm({
|
|
|
193
193
|
!showEmail && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("email") }),
|
|
194
194
|
!showHelpCategory && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("helpCategory") }),
|
|
195
195
|
!showMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("message") }),
|
|
196
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
196
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.HoneypotField, { ...honeypotInputProps }),
|
|
197
197
|
extraTopField,
|
|
198
198
|
showNameEmailRow && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6", children: [
|
|
199
199
|
showName && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
200
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
200
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Label, { htmlFor: "name", children: [
|
|
201
201
|
"Your Name",
|
|
202
202
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
203
203
|
] }),
|
|
@@ -216,7 +216,7 @@ function ContactForm({
|
|
|
216
216
|
errors.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "name-error", className: "text-ods-error text-h6 mt-1", children: errors.name.message })
|
|
217
217
|
] }),
|
|
218
218
|
showEmail && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
219
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
219
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Label, { htmlFor: "email", children: [
|
|
220
220
|
"Email",
|
|
221
221
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
222
222
|
] }),
|
|
@@ -237,46 +237,46 @@ function ContactForm({
|
|
|
237
237
|
] }),
|
|
238
238
|
(showCompanySize || showReferralSource) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6", children: [
|
|
239
239
|
showCompanySize && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
240
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
240
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.Label, { htmlFor: "companySize", children: "Company Size" }),
|
|
241
241
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
242
242
|
_reacthookform.Controller,
|
|
243
243
|
{
|
|
244
244
|
control,
|
|
245
245
|
name: "companySize",
|
|
246
|
-
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
246
|
+
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
|
|
247
247
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
248
|
-
|
|
248
|
+
_chunkQUPQLQ4Rcjs.SelectTrigger,
|
|
249
249
|
{
|
|
250
250
|
id: "companySize",
|
|
251
251
|
"aria-label": "Company Size",
|
|
252
252
|
className: "bg-ods-card border-ods-border text-ods-text-primary h-12 px-3",
|
|
253
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
253
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectValue, { placeholder: "Select company size" })
|
|
254
254
|
}
|
|
255
255
|
),
|
|
256
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
256
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectContent, { children: companySizeOptions.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectItem, { value: opt, children: opt }, opt)) })
|
|
257
257
|
] })
|
|
258
258
|
}
|
|
259
259
|
),
|
|
260
260
|
errors.companySize && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "companySize-error", className: "text-ods-error text-h6 mt-1", children: errors.companySize.message })
|
|
261
261
|
] }),
|
|
262
262
|
showReferralSource && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
263
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
263
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.Label, { htmlFor: "referralSource", children: "How did you hear about us?" }),
|
|
264
264
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
265
265
|
_reacthookform.Controller,
|
|
266
266
|
{
|
|
267
267
|
control,
|
|
268
268
|
name: "referralSource",
|
|
269
|
-
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
269
|
+
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
|
|
270
270
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
271
|
-
|
|
271
|
+
_chunkQUPQLQ4Rcjs.SelectTrigger,
|
|
272
272
|
{
|
|
273
273
|
id: "referralSource",
|
|
274
274
|
"aria-label": "Referral Source",
|
|
275
275
|
className: "bg-ods-card border-ods-border text-ods-text-primary h-12 px-3",
|
|
276
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
276
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectValue, { placeholder: "Select an option" })
|
|
277
277
|
}
|
|
278
278
|
),
|
|
279
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
279
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectContent, { children: referralSourceOptions.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectItem, { value: opt, children: opt }, opt)) })
|
|
280
280
|
] })
|
|
281
281
|
}
|
|
282
282
|
),
|
|
@@ -284,7 +284,7 @@ function ContactForm({
|
|
|
284
284
|
] })
|
|
285
285
|
] }),
|
|
286
286
|
showHelpCategory && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
287
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
287
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Label, { htmlFor: "helpCategory", children: [
|
|
288
288
|
"Choose your main interest",
|
|
289
289
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
290
290
|
] }),
|
|
@@ -293,29 +293,29 @@ function ContactForm({
|
|
|
293
293
|
{
|
|
294
294
|
control,
|
|
295
295
|
name: "helpCategory",
|
|
296
|
-
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
296
|
+
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
|
|
297
297
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
298
|
-
|
|
298
|
+
_chunkQUPQLQ4Rcjs.SelectTrigger,
|
|
299
299
|
{
|
|
300
300
|
id: "helpCategory",
|
|
301
301
|
"aria-label": "Help Category",
|
|
302
302
|
className: "bg-ods-card border-ods-border text-ods-text-primary h-12 px-3",
|
|
303
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
303
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectValue, { placeholder: "Choose your main interest" })
|
|
304
304
|
}
|
|
305
305
|
),
|
|
306
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
306
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectContent, { children: helpCategoryOptions.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQUPQLQ4Rcjs.SelectItem, { value: opt, children: opt }, opt)) })
|
|
307
307
|
] })
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
310
|
errors.helpCategory && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "helpCategory-error", className: "text-ods-error text-h6 mt-1", children: errors.helpCategory.message })
|
|
311
311
|
] }),
|
|
312
312
|
showMessage && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col flex-grow", children: [
|
|
313
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
313
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQUPQLQ4Rcjs.Label, { htmlFor: "message", children: [
|
|
314
314
|
"Your Message",
|
|
315
315
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
316
316
|
] }),
|
|
317
317
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
318
|
-
|
|
318
|
+
_chunkQUPQLQ4Rcjs.Textarea,
|
|
319
319
|
{
|
|
320
320
|
id: "message",
|
|
321
321
|
...register("message"),
|
|
@@ -329,7 +329,7 @@ function ContactForm({
|
|
|
329
329
|
] }),
|
|
330
330
|
attachmentsEnabled && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
331
331
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
332
|
-
|
|
332
|
+
_chunkQUPQLQ4Rcjs.ChatAttachmentChipStrip,
|
|
333
333
|
{
|
|
334
334
|
attachments: attachments.attachments,
|
|
335
335
|
onRemove: attachments.removeAttachment,
|
|
@@ -338,7 +338,7 @@ function ContactForm({
|
|
|
338
338
|
),
|
|
339
339
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
340
340
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
341
|
-
|
|
341
|
+
_chunkQUPQLQ4Rcjs.ChatAttachmentAddButton,
|
|
342
342
|
{
|
|
343
343
|
attachmentsEnabled: true,
|
|
344
344
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -374,4 +374,4 @@ function ContactForm({
|
|
|
374
374
|
|
|
375
375
|
|
|
376
376
|
exports.ContactForm = ContactForm;
|
|
377
|
-
//# sourceMappingURL=chunk-
|
|
377
|
+
//# sourceMappingURL=chunk-WGJFHOU4.cjs.map
|