@flamingo-stack/openframe-frontend-core 0.0.735 → 0.0.737
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/build/export-map.json +1 -1
- package/dist/{chunk-F7STMHT7.cjs → chunk-4FJZ7RJD.cjs} +66 -66
- package/dist/{chunk-SZRZBCWC.cjs → chunk-4ISP3XP4.cjs} +75 -69
- package/dist/{chunk-EQ7OOK4B.cjs → chunk-4RMLAHU2.cjs} +24 -16
- package/dist/{chunk-XKB7YGQM.cjs → chunk-77SD7RXY.cjs} +18 -6
- package/dist/{chunk-NVCSVGNI.cjs → chunk-CM35DLKS.cjs} +33 -33
- package/dist/{chunk-T323E2Y6.cjs → chunk-DA4VS6TS.cjs} +4 -4
- package/dist/{chunk-36CCUJOE.cjs → chunk-E2JCZU36.cjs} +313 -313
- package/dist/{chunk-RH3AKULV.cjs → chunk-EJOXXJJB.cjs} +56 -4
- package/dist/{chunk-SHQZN5LF.cjs → chunk-EX2GYIGW.cjs} +6 -6
- package/dist/{chunk-EQH7BUNS.cjs → chunk-FA2LATDM.cjs} +4 -4
- package/dist/{chunk-3JP2OVH3.cjs → chunk-KVGBDWYV.cjs} +30 -30
- package/dist/{chunk-HBUUCLQM.cjs → chunk-L535OD7V.cjs} +2 -2
- package/dist/{chunk-3X4N3IT7.cjs → chunk-LW3QSP47.cjs} +16 -16
- package/dist/{chunk-OXJ57643.cjs → chunk-MGW5DO6P.cjs} +76 -17
- package/dist/{chunk-4F7V2MAC.cjs → chunk-N6YOOGCD.cjs} +14 -14
- package/dist/chunk-O4MG7FXW.cjs +57 -0
- package/dist/{chunk-TUMUT7CV.cjs → chunk-SGVQO5J6.cjs} +11 -11
- package/dist/{chunk-MRVZ56GT.cjs → chunk-TJQYX3QC.cjs} +81 -81
- package/dist/{chunk-7HT3VHLJ.cjs → chunk-URIJ6YUG.cjs} +43 -69
- package/dist/{chunk-JDXQ6T5P.cjs → chunk-VL4JKXU2.cjs} +253 -290
- package/dist/{chunk-HLBFTDUL.cjs → chunk-VRNNIV5Y.cjs} +2 -2
- package/dist/{chunk-W6E7XCBI.cjs → chunk-VYODTHMR.cjs} +31 -31
- package/dist/{chunk-3FZZPR76.cjs → chunk-XLSVQJBA.cjs} +44 -44
- package/dist/{chunk-6TTAILSV.cjs → chunk-XPP7VCNY.cjs} +3 -3
- package/dist/{cloud-tenants-H5D57P4U.cjs → cloud-tenants-IWQ5FFLY.cjs} +7 -7
- package/dist/components/case-studies/index.cjs +19 -19
- package/dist/components/chat/entity-cards/index.d.ts +1 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/index.js +2 -0
- package/dist/components/chat/hooks/use-ask-prompts.d.ts +1 -1
- package/dist/components/chat/hooks/use-ask-prompts.js +1 -1
- package/dist/components/chat/index.cjs +10 -8
- package/dist/components/chat/mingo-info-card.d.ts +17 -1
- package/dist/components/chat/mingo-info-card.d.ts.map +1 -1
- package/dist/components/chat/mingo-info-card.js +15 -3
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/docs/index.cjs +11 -11
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/faq/faq-ask-card.d.ts +5 -4
- package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
- package/dist/components/faq/faq-document-page.d.ts +3 -1
- package/dist/components/faq/faq-document-page.d.ts.map +1 -1
- package/dist/components/faq/faq-document-page.js +2 -0
- package/dist/components/faq/faq-section.d.ts +37 -5
- package/dist/components/faq/faq-section.d.ts.map +1 -1
- package/dist/components/faq/faq-section.js +31 -9
- package/dist/components/faq/index.cjs +14 -8
- package/dist/components/faq/index.d.ts +1 -1
- package/dist/components/faq/index.d.ts.map +1 -1
- package/dist/components/faq/index.js +4 -2
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/help-center-pages/delivery-page.d.ts +8 -1
- package/dist/components/help-center-pages/delivery-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/delivery-page.js +16 -4
- package/dist/components/help-center-pages/download-apps-page.d.ts +8 -1
- package/dist/components/help-center-pages/download-apps-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/download-apps-page.js +11 -6
- package/dist/components/help-center-pages/index.cjs +195 -140
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts +8 -1
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.js +26 -14
- package/dist/components/help-center-pages/product-releases-list-page.d.ts +8 -1
- package/dist/components/help-center-pages/product-releases-list-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/product-releases-list-page.js +24 -12
- package/dist/components/help-center-pages/roadmap-page.d.ts +8 -1
- package/dist/components/help-center-pages/roadmap-page.d.ts.map +1 -1
- package/dist/components/help-center-pages/roadmap-page.js +25 -13
- package/dist/components/index.cjs +67 -59
- package/dist/components/meeting-scheduler/index.cjs +29 -29
- package/dist/components/navigation/index.cjs +10 -10
- package/dist/components/onboarding-guides/index.cjs +10 -10
- package/dist/components/pagination.d.ts +9 -1
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +72 -17
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/shared/dev-section/dev-section-page.d.ts +8 -1
- package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
- package/dist/components/shared/dev-section/dev-section-page.js +8 -3
- package/dist/components/shared/legal-document/legal-document-page.d.ts +8 -1
- package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
- package/dist/components/shared/legal-document/legal-document-page.js +4 -1
- package/dist/components/tickets/index.cjs +13 -12
- package/dist/components/ui/index.cjs +12 -10
- package/dist/components/unified-pagination.d.ts.map +1 -1
- package/dist/components/unified-pagination.js +16 -4
- package/dist/contexts/assistant-runtime-context.d.ts +5 -5
- package/dist/{devices-SQTEXY2H.cjs → devices-OUHGWA6Y.cjs} +8 -8
- package/dist/{embeddable-chat-S5ODWE3L.cjs → embeddable-chat-U3C4WWB7.cjs} +72 -72
- package/dist/index.cjs +20 -14
- package/dist/{knowledge-FO3TPLFO.cjs → knowledge-3ZASPWMF.cjs} +8 -8
- package/dist/{logs-Y4WQB2YR.cjs → logs-E6Y54P6K.cjs} +15 -15
- package/dist/{policies-D6VY2ODF.cjs → policies-LAV75B5B.cjs} +11 -11
- package/dist/{software-update-7XN6U7HC.cjs → software-update-2CAL3AMJ.cjs} +10 -10
- package/dist/types/faq.d.ts +17 -0
- package/dist/types/faq.d.ts.map +1 -1
- package/dist/types/faq.js +4 -0
- package/dist/types/index.cjs +4 -0
- package/package.json +1 -1
- package/src/components/chat/entity-cards/index.ts +1 -0
- package/src/components/chat/hooks/use-ask-prompts.ts +2 -2
- package/src/components/chat/mingo-info-card.tsx +39 -4
- package/src/components/faq/faq-ask-card.tsx +5 -4
- package/src/components/faq/faq-document-page.tsx +4 -0
- package/src/components/faq/faq-section.tsx +83 -14
- package/src/components/faq/index.ts +1 -1
- package/src/components/help-center-pages/delivery-page.tsx +16 -1
- package/src/components/help-center-pages/download-apps-page.tsx +9 -0
- package/src/components/help-center-pages/onboarding-guides-catalog-page.tsx +16 -1
- package/src/components/help-center-pages/product-releases-list-page.tsx +16 -1
- package/src/components/help-center-pages/roadmap-page.tsx +16 -1
- package/src/components/pagination.tsx +117 -21
- package/src/components/shared/dev-section/dev-section-page.tsx +9 -0
- package/src/components/shared/legal-document/legal-document-page.tsx +9 -0
- package/src/components/unified-pagination.tsx +23 -7
- package/src/contexts/assistant-runtime-context.tsx +5 -5
- package/src/types/faq.ts +18 -0
|
@@ -33,6 +33,17 @@ export function UnifiedPagination({
|
|
|
33
33
|
const searchParams = useSearchParams();
|
|
34
34
|
const pathname = usePathname();
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* The address of a page of this list: the current URL with `page` set. Page 1
|
|
38
|
+
* is the list's own address (no `page`), so the first page has one URL.
|
|
39
|
+
*/
|
|
40
|
+
const pageHref = (page: number) => {
|
|
41
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
42
|
+
if (page <= 1) params.delete('page');
|
|
43
|
+
else params.set('page', page.toString());
|
|
44
|
+
return withQuery(pathname, params.toString());
|
|
45
|
+
};
|
|
46
|
+
|
|
36
47
|
const handlePageChange = (page: number) => {
|
|
37
48
|
// Preserve current scroll position
|
|
38
49
|
const currentScrollY = window.scrollY;
|
|
@@ -42,13 +53,12 @@ export function UnifiedPagination({
|
|
|
42
53
|
onPageChange(page);
|
|
43
54
|
}
|
|
44
55
|
|
|
45
|
-
// Update
|
|
46
|
-
// the URL (`syncUrl={false}`)
|
|
47
|
-
//
|
|
56
|
+
// Update the address bar in place (a bookmark, a shared link), unless the
|
|
57
|
+
// caller owns the URL (`syncUrl={false}`): a second writer here would race
|
|
58
|
+
// the caller's own param write. The address is the one the page's link
|
|
59
|
+
// carries (`pageHref`), so a click and a new-tab open land on the same URL.
|
|
48
60
|
if (syncUrl) {
|
|
49
|
-
|
|
50
|
-
params.set('page', page.toString());
|
|
51
|
-
window.history.replaceState(null, '', withQuery(pathname, params.toString()));
|
|
61
|
+
window.history.replaceState(null, '', pageHref(page));
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
// Restore scroll position after a brief delay to allow content to render
|
|
@@ -79,7 +89,13 @@ export function UnifiedPagination({
|
|
|
79
89
|
|
|
80
90
|
return (
|
|
81
91
|
<div className={className}>
|
|
82
|
-
|
|
92
|
+
{/* Real links only while this component owns `?page=`: a caller that owns the URL names its own parameter. */}
|
|
93
|
+
<Pagination
|
|
94
|
+
currentPage={currentPage}
|
|
95
|
+
totalPages={totalPages}
|
|
96
|
+
onPageChange={handlePageChange}
|
|
97
|
+
getPageHref={syncUrl ? pageHref : undefined}
|
|
98
|
+
/>
|
|
83
99
|
</div>
|
|
84
100
|
);
|
|
85
101
|
}
|
|
@@ -56,11 +56,11 @@ export interface AssistantRuntime {
|
|
|
56
56
|
source?: string;
|
|
57
57
|
/**
|
|
58
58
|
* GET endpoint the questions are read from:
|
|
59
|
-
* `<url>?count=<n>&
|
|
60
|
-
* `
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
59
|
+
* `<url>?count=<n>&topic=<topic>&exclude=<id,id>` → `{ prompts: AskPrompt[] }`
|
|
60
|
+
* `topic` is ANY string: the host decides what topics exist (the hub: the
|
|
61
|
+
* topics of its FAQs, set in the FAQ admin), so a new topic needs no change
|
|
62
|
+
* here. Hub: '/api/faqs/questions'. Absent: an "ask" surface shows its
|
|
63
|
+
* launcher with no questions.
|
|
64
64
|
*/
|
|
65
65
|
askPromptsUrl?: string;
|
|
66
66
|
/**
|
package/src/types/faq.ts
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two kinds of FAQ. An `answer` is a question with its written answer (the
|
|
3
|
+
* accordion, FAQPage JSON-LD). An `ask` is a question the assistant answers: it
|
|
4
|
+
* has a `prompt` (what is sent to the chat) and no written answer, and is what
|
|
5
|
+
* every "ask the assistant" surface offers.
|
|
6
|
+
*/
|
|
7
|
+
export const FAQ_KINDS = ['answer', 'ask'] as const;
|
|
8
|
+
export type FaqKind = (typeof FAQ_KINDS)[number];
|
|
9
|
+
|
|
1
10
|
export interface Faq {
|
|
2
11
|
id: number;
|
|
3
12
|
question: string;
|
|
4
13
|
answer: string;
|
|
5
14
|
section?: string | null;
|
|
15
|
+
/** Absent on a host that predates kinds: an `answer`. */
|
|
16
|
+
kind?: FaqKind;
|
|
17
|
+
/** An `ask` FAQ's prompt for the chat; null on an `answer`. */
|
|
18
|
+
prompt?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The places the FAQ is written for, shared by both kinds: a page's topic
|
|
21
|
+
* (`pricing`, `careers`, `home`) or a section's. Empty: written for no place.
|
|
22
|
+
*/
|
|
23
|
+
topics?: string[];
|
|
6
24
|
display_order: number;
|
|
7
25
|
is_active: boolean;
|
|
8
26
|
created_at: string;
|