@factorialco/f0-react 12.15.0 → 12.17.0
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/{ArchiveThumbnail-BxhEauws.js → ArchiveThumbnail-dGuKclaw.js} +5 -5
- package/dist/{ArchiveViewer-Cl_-VWzT.js → ArchiveViewer-D4fZ2Zko.js} +12 -12
- package/dist/{ChatPostComposerDialog-CZlNr9ba.js → ChatPostComposerDialog-ZUy4oL4n.js} +2 -2
- package/dist/{CoachmarkProvider-CEw78dgS.js → CoachmarkProvider-Bui0J43V.js} +17676 -17676
- package/dist/{CodeThumbnail-DDo9lfco.js → CodeThumbnail-BN74kiZ4.js} +1 -1
- package/dist/{CodeViewer-BrTpF20r.js → CodeViewer-DAISBEVU.js} +5 -5
- package/dist/{DocumentToolbar-C9ddjrjJ.js → DocumentToolbar-DY0Zl0N_.js} +1 -1
- package/dist/{DocxViewer-A6yOGoqC.js → DocxViewer-CU-h8JZo.js} +1 -1
- package/dist/{F0AiProcessingOverlay-BMFIt7Ru.js → F0AiProcessingOverlay-1sgWr47b.js} +1103 -1024
- package/dist/{F0Alert-D5hs2XZm.js → F0Alert--45qrdm9.js} +10 -10
- package/dist/F0AudioPlayer-ZqghWPaS.js +2 -0
- package/dist/{F0CanvasPanel-BDuYWQcq.js → F0CanvasPanel-B07KPl9L.js} +9696 -9582
- package/dist/{F0DocumentViewer-C6o-c1aq.js → F0DocumentViewer-CPu9X2o1.js} +2 -2
- package/dist/{F0DocumentViewer-D8Ylnw3M.js → F0DocumentViewer-gfD2E9-m.js} +1 -1
- package/dist/{F0Map-BHihj_0n.js → F0Map-CpggFT94.js} +129 -142
- package/dist/F0VideoPlayer-BqAcQLm4.js +1 -0
- package/dist/{F0VideoPlayer-Dz9QSCFp.js → F0VideoPlayer-C1JRJ63P.js} +22 -22
- package/dist/{HtmlViewer-Cf5lw2RH.js → HtmlViewer-D6_vKugG.js} +3 -3
- package/dist/{Map-B8_F4AIJ.js → Map-BSvthUb7.js} +5 -5
- package/dist/{PdfThumbnail-CpLZEOJu.js → PdfThumbnail-CXumcn98.js} +1 -1
- package/dist/{PdfViewer-CMsX7rCn.js → PdfViewer-Pdk37Dts.js} +4 -4
- package/dist/{SheetViewer-CQpNmizK.js → SheetViewer-BvAA9h38.js} +2 -2
- package/dist/{TextViewer-w65gdt5z.js → TextViewer-D9CCbblP.js} +1 -1
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +3 -3
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +48 -7
- package/dist/experimental.js +5060 -4856
- package/dist/{exports-BGemf1WM.d.ts → exports-4R3tYgiD.d.ts} +9 -1
- package/dist/f0.d.ts +4 -4
- package/dist/f0.js +171 -171
- package/dist/{highlight-D-PODccV.js → highlight-cuPZlWw_.js} +5 -5
- package/dist/{index-BkCnaiJG.d.ts → index-MOV0Rv_v.d.ts} +857 -845
- package/dist/{maplibre-B7vlGgUT.js → maplibre-D0TBtDi0.js} +1 -1
- package/dist/{pdfWorker-C-Auu3EX.js → pdfWorker-B3PnBrSO.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-C2gKTwyT.d.ts → types-BdObZULx.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/F0AudioPlayer-BAEmgv7O.js +0 -2
- package/dist/F0VideoPlayer-Ik-2vnL4.js +0 -1
|
@@ -527,956 +527,968 @@ type F0AvatarModuleProps = VariantProps<typeof moduleAvatarVariants> & {
|
|
|
527
527
|
declare function F0AvatarModuleBase({ size, module, ...props }: F0AvatarModuleProps): import("react").JSX.Element;
|
|
528
528
|
declare const F0AvatarModule: WithDataTestIdReturnType<typeof F0AvatarModuleBase>;
|
|
529
529
|
//#endregion
|
|
530
|
-
//#region src/
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
* Every entity adds its own fields on top of this.
|
|
534
|
-
*/
|
|
535
|
-
interface CanvasContentBase {
|
|
536
|
-
type: string;
|
|
537
|
-
title: string;
|
|
538
|
-
description?: string;
|
|
539
|
-
toolCallId?: string;
|
|
540
|
-
/**
|
|
541
|
-
* Render this content across the whole frame, covering the docked chat
|
|
542
|
-
* instead of hugging a seam beside it. For content that is a step of its own
|
|
543
|
-
* rather than something you work through while talking — picking a template,
|
|
544
|
-
* say. The chat is only covered, never closed, so the conversation is exactly
|
|
545
|
-
* where it was when the canvas is dismissed.
|
|
546
|
-
*
|
|
547
|
-
* Deliberately NOT called `fullscreen`: the chat's own
|
|
548
|
-
* `visualizationMode: "fullscreen"` means the opposite arrangement (chat full
|
|
549
|
-
* width, no canvas), and going back to it is how a covering canvas is
|
|
550
|
-
* dismissed.
|
|
551
|
-
*
|
|
552
|
-
* Defaults to the docked split.
|
|
553
|
-
*/
|
|
554
|
-
coversChat?: boolean;
|
|
555
|
-
/**
|
|
556
|
-
* Keep this docked content mounted, out of view, while the chat is
|
|
557
|
-
* fullscreen, and bring it back as it was when the chat docks again. For
|
|
558
|
-
* content the reader works on and would lose by expanding the chat, such as
|
|
559
|
-
* an editor with unsaved changes.
|
|
560
|
-
*
|
|
561
|
-
* Defaults to dropping the content when the chat goes fullscreen. Ignored
|
|
562
|
-
* with `coversChat`, which fullscreen always dismisses.
|
|
563
|
-
*/
|
|
564
|
-
keepsUnderFullscreen?: boolean;
|
|
530
|
+
//#region src/elements/lib/global.types.d.ts
|
|
531
|
+
interface DataAttributes {
|
|
532
|
+
[key: `data-${string}`]: string | undefined;
|
|
565
533
|
}
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region src/addons/documents/F0DocumentViewer/types.d.ts
|
|
536
|
+
declare const pdfScales: readonly ["page-width", "page-fit", "0.5", "0.75", "1", "1.25", "1.5", "2", "3", "4"];
|
|
537
|
+
type F0PdfScale = (typeof pdfScales)[number];
|
|
538
|
+
type F0PdfRotation = 0 | 90 | 180 | 270;
|
|
566
539
|
/**
|
|
567
|
-
*
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
headers: Record<string, string>;
|
|
575
|
-
runtimeFetch?: typeof fetch;
|
|
576
|
-
};
|
|
577
|
-
/** Present when the dashboard is a pre-saved dashboard */
|
|
578
|
-
savedDashboardId?: string;
|
|
579
|
-
/** Category of the saved dashboard */
|
|
580
|
-
savedDashboardCategory?: string;
|
|
581
|
-
/** Description of the saved dashboard */
|
|
582
|
-
savedDashboardDescription?: string;
|
|
583
|
-
/** True when the agent has iterated on a saved dashboard but the user hasn't saved yet */
|
|
584
|
-
savedDashboardUnsaved?: boolean;
|
|
585
|
-
};
|
|
586
|
-
/**
|
|
587
|
-
* Form canvas content — renders an interactive F0Form in the canvas panel.
|
|
588
|
-
*/
|
|
589
|
-
type FormCanvasContent = CanvasContentBase & {
|
|
590
|
-
type: "form";
|
|
591
|
-
formName: string;
|
|
592
|
-
formDescription?: string;
|
|
593
|
-
formModule?: ModuleId;
|
|
594
|
-
};
|
|
595
|
-
/**
|
|
596
|
-
* Data download canvas content — renders a full data table with download options.
|
|
597
|
-
*/
|
|
598
|
-
type DataDownloadCanvasContent = CanvasContentBase & {
|
|
599
|
-
type: "dataDownload";
|
|
600
|
-
dataset: DataDownloadDataset;
|
|
601
|
-
filename?: string;
|
|
602
|
-
markdown?: string;
|
|
603
|
-
};
|
|
604
|
-
/**
|
|
605
|
-
* Autofill-timesheet canvas content — renders an editable timesheet proposal
|
|
606
|
-
* (day-grouped shift blocks the user can adjust and confirm) in the canvas panel.
|
|
607
|
-
*/
|
|
608
|
-
type AutofillTimesheetCanvasContent = CanvasContentBase & {
|
|
609
|
-
type: "autofillTimesheet";
|
|
610
|
-
employeeId: string;
|
|
611
|
-
startOn: string;
|
|
612
|
-
endOn: string;
|
|
613
|
-
shifts: AutofillTimesheetShift[];
|
|
614
|
-
};
|
|
615
|
-
/**
|
|
616
|
-
* Bulk-resolve-inconsistencies canvas content — renders an AI-grouped proposal
|
|
617
|
-
* for resolving open time-tracking inconsistencies (a reviewable collection of
|
|
618
|
-
* employees/rows the user can trim and apply). Carries scope identity only:
|
|
619
|
-
* the proposal rows live in host state, keyed by this scope.
|
|
620
|
-
*/
|
|
621
|
-
type BulkResolveInconsistenciesCanvasContent = CanvasContentBase & {
|
|
622
|
-
type: "bulkResolveInconsistencies";
|
|
623
|
-
/** Analysed period, YYYY-MM-DD. */
|
|
624
|
-
periodStart: string;
|
|
625
|
-
periodEnd: string;
|
|
626
|
-
/** Exact row ids the proposal was scoped to; null when the whole period was analysed. */
|
|
627
|
-
scopeInconsistencyIds?: string[] | null;
|
|
628
|
-
};
|
|
629
|
-
/**
|
|
630
|
-
* Discriminated union for canvas panel content.
|
|
631
|
-
* Add new entity types to this union as they are implemented.
|
|
540
|
+
* Document families the viewer can render. "pdf" is the default and keeps the
|
|
541
|
+
* full toolbar (paging, zoom, print, download); the other kinds render a
|
|
542
|
+
* lazy-loaded, read-only preview: "sheet" (xlsx/csv) as an Excel-style
|
|
543
|
+
* grid with one tab per sheet, "docx" through docx-preview with page layout,
|
|
544
|
+
* "text" as a rendered markdown document (`.md`) or monospaced source,
|
|
545
|
+
* "code" as syntax-highlighted source, "html" as a sandboxed page running its
|
|
546
|
+
* scripts and "archive" as the file listing of a zip (never extracted).
|
|
632
547
|
*/
|
|
633
|
-
type
|
|
548
|
+
type F0DocumentKind = "pdf" | "sheet" | "docx" | "text" | "code" | "html" | "archive";
|
|
634
549
|
/**
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
550
|
+
* When an HTML document's scripts may run. "auto" runs them on open, in the
|
|
551
|
+
* isolated `htmlSandbox` origin when there is one, else in an opaque-origin
|
|
552
|
+
* srcdoc frame. "ask" opens static with a "Run content" button. "never" keeps
|
|
553
|
+
* it static.
|
|
638
554
|
*/
|
|
639
|
-
|
|
640
|
-
|
|
555
|
+
type F0DocumentHtmlExecution = "auto" | "ask" | "never";
|
|
556
|
+
/** A separate registrable domain serving `f0-html-host/` (see its README). */
|
|
557
|
+
interface F0DocumentHtmlSandbox {
|
|
558
|
+
/** Exact origin, e.g. "https://usercontent.example.com". */
|
|
559
|
+
origin: string;
|
|
641
560
|
}
|
|
642
561
|
/**
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
562
|
+
* Where the toolbar sits. "top" (default) is a bar across the top of the
|
|
563
|
+
* surface. "floating" is a dark pill that floats over the bottom of the
|
|
564
|
+
* document, like an action bar — for hosts whose own header already carries
|
|
565
|
+
* the title and the primary action (the AI chat canvas), so the controls stay
|
|
566
|
+
* close to the content instead of competing with that header. "none" draws
|
|
567
|
+
* no toolbar at all, for a host that already provides every control (the
|
|
568
|
+
* chat attachment viewer on an HTML page).
|
|
647
569
|
*/
|
|
648
|
-
|
|
649
|
-
/** Must match the `type` discriminant on the content object */
|
|
650
|
-
type: T["type"];
|
|
651
|
-
/** Renders the main body of the canvas panel */
|
|
652
|
-
renderContent: (props: {
|
|
653
|
-
content: T;
|
|
654
|
-
refreshKey: number;
|
|
655
|
-
}) => ReactNode;
|
|
656
|
-
/** Renders the full header (title, actions, close button) */
|
|
657
|
-
renderHeader: (props: {
|
|
658
|
-
content: T;
|
|
659
|
-
onClose: () => void;
|
|
660
|
-
}) => ReactNode;
|
|
661
|
-
/**
|
|
662
|
-
* Optional wrapper providing entity-scoped context around
|
|
663
|
-
* both header and body (e.g. shared edit-mode state).
|
|
664
|
-
*/
|
|
665
|
-
wrapper?: (props: {
|
|
666
|
-
content: T;
|
|
667
|
-
children: ReactNode;
|
|
668
|
-
}) => ReactNode;
|
|
669
|
-
/**
|
|
670
|
-
* When true the content area uses `overflow-hidden` instead of
|
|
671
|
-
* `overflow-auto`, letting the entity manage its own scrolling.
|
|
672
|
-
*/
|
|
673
|
-
overflowHidden?: boolean;
|
|
674
|
-
}
|
|
570
|
+
type F0DocumentViewerToolbarPlacement = "top" | "floating" | "none";
|
|
675
571
|
/**
|
|
676
|
-
*
|
|
677
|
-
*
|
|
572
|
+
* Host-provided toolbar action, appended after the built-in controls in every
|
|
573
|
+
* kind — e.g. a Close button when the viewer lives inside a fullscreen overlay.
|
|
678
574
|
*/
|
|
679
|
-
interface
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
575
|
+
interface F0DocumentViewerAction {
|
|
576
|
+
icon: IconType;
|
|
577
|
+
label: string;
|
|
578
|
+
onClick: () => void;
|
|
579
|
+
}
|
|
580
|
+
interface F0DocumentViewerProps extends WithDataTestIdProps, DataAttributes {
|
|
581
|
+
/** Source URL of the document. */
|
|
582
|
+
url: string;
|
|
583
|
+
/** File name used when downloading the document. Defaults to "document.pdf". */
|
|
584
|
+
filename?: string;
|
|
684
585
|
/**
|
|
685
|
-
*
|
|
686
|
-
*
|
|
586
|
+
* Document family to render. Defaults to "pdf" (unchanged behavior). For the
|
|
587
|
+
* other kinds the PDF-only props below (page, scale, rotation, print…) are
|
|
588
|
+
* ignored.
|
|
687
589
|
*/
|
|
688
|
-
|
|
590
|
+
kind?: F0DocumentKind;
|
|
591
|
+
/** MIME type of the document — used by kind "text" to detect markdown. */
|
|
592
|
+
mimeType?: string;
|
|
689
593
|
/**
|
|
690
|
-
*
|
|
691
|
-
*
|
|
594
|
+
* Language for kind="code" (e.g. "typescript", "py"). Derived from the
|
|
595
|
+
* file name when omitted; unknown languages show as plain source.
|
|
692
596
|
*/
|
|
693
|
-
|
|
597
|
+
language?: string;
|
|
598
|
+
/** Hide the built-in Download button, in every kind. */
|
|
599
|
+
hideDownload?: boolean;
|
|
600
|
+
/** kind="html": when scripts may run. Defaults to "auto". */
|
|
601
|
+
htmlExecution?: F0DocumentHtmlExecution;
|
|
602
|
+
/** kind="html": isolated origin where scripts run like a Claude artifact. */
|
|
603
|
+
htmlSandbox?: F0DocumentHtmlSandbox;
|
|
604
|
+
/** kind="html": who sent the file, shown as "Content from {sender}". */
|
|
605
|
+
sender?: string;
|
|
606
|
+
/** Toolbar placement, in every kind. Defaults to "top". */
|
|
607
|
+
toolbar?: F0DocumentViewerToolbarPlacement;
|
|
694
608
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
609
|
+
* Custom actions appended to the toolbar (after the built-in controls), in
|
|
610
|
+
* every kind — e.g. a Close button when the viewer fills an overlay.
|
|
697
611
|
*/
|
|
698
|
-
|
|
612
|
+
actions?: F0DocumentViewerAction[];
|
|
613
|
+
/** Zero-based page index to scroll to initially (and on change). */
|
|
614
|
+
page?: number;
|
|
615
|
+
/** Restrict rendering to a subset of pages (zero-based indexes). */
|
|
616
|
+
pagesToDisplay?: number[];
|
|
617
|
+
/** Initial zoom level. Defaults to "page-width". */
|
|
618
|
+
initialScale?: F0PdfScale;
|
|
619
|
+
/** Send credentials with the document request. Defaults to true. */
|
|
620
|
+
withCredentials?: boolean;
|
|
621
|
+
/** Show a toolbar control to rotate the document in 90° steps. */
|
|
622
|
+
rotatable?: boolean;
|
|
623
|
+
/** Initial rotation in degrees. Defaults to 0. */
|
|
624
|
+
initialRotation?: F0PdfRotation;
|
|
625
|
+
/** Called with the new rotation in degrees whenever the user rotates. */
|
|
626
|
+
onRotationChange?: (rotation: F0PdfRotation) => void;
|
|
627
|
+
/** Called once the document has loaded, with the pdf.js document proxy. */
|
|
628
|
+
onPdfLoaded?: (pdf: PDFDocumentProxy) => void;
|
|
629
|
+
/** Called with the 1-based page number when the visible page changes. */
|
|
630
|
+
onPageChange?: (page: number) => void;
|
|
699
631
|
}
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewerSkeleton.d.ts
|
|
634
|
+
declare const F0DocumentViewerSkeleton: () => import("react").JSX.Element;
|
|
635
|
+
//#endregion
|
|
636
|
+
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewer.d.ts
|
|
700
637
|
/**
|
|
701
|
-
*
|
|
702
|
-
* block carries concrete employee-local clock times (ISO datetime or "HH:MM");
|
|
703
|
-
* days that cannot be proposed are omitted rather than emitted with empty bounds.
|
|
638
|
+
* @experimental This is an experimental component, use it at your own risk.
|
|
704
639
|
*/
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
640
|
+
declare const F0DocumentViewer: WithDataTestIdReturnType<import("react").ForwardRefExoticComponent<F0DocumentViewerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
641
|
+
Skeleton: typeof F0DocumentViewerSkeleton;
|
|
642
|
+
}>;
|
|
643
|
+
/** @deprecated Renamed to `F0DocumentViewer`: it previews PDF, Word, Excel and text. */
|
|
644
|
+
declare const F0PdfViewer: WithDataTestIdReturnType<import("react").ForwardRefExoticComponent<F0DocumentViewerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
645
|
+
Skeleton: typeof F0DocumentViewerSkeleton;
|
|
646
|
+
}>;
|
|
647
|
+
/** @deprecated Renamed to `F0DocumentViewerProps`. */
|
|
648
|
+
type F0PdfViewerProps = F0DocumentViewerProps;
|
|
649
|
+
/** @deprecated Renamed to `F0DocumentViewerToolbarPlacement`. */
|
|
650
|
+
type F0PdfViewerToolbarPlacement = F0DocumentViewerToolbarPlacement;
|
|
651
|
+
/** @deprecated Renamed to `F0DocumentViewerAction`. */
|
|
652
|
+
type F0PdfViewerAction = F0DocumentViewerAction;
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region src/elements/lib/localized.d.ts
|
|
655
|
+
/**
|
|
656
|
+
* Shared helpers for content that can be provided in one language (a plain
|
|
657
|
+
* value) or several (a list of per-locale entries) — used by the media players
|
|
658
|
+
* for captions, descriptions, transcriptions and summaries.
|
|
659
|
+
*/
|
|
660
|
+
interface LocalizedOption<T> {
|
|
661
|
+
/** BCP-47 language tag, e.g. `"en"`, `"es"`, `"en-US"`. */
|
|
662
|
+
locale: string;
|
|
663
|
+
/**
|
|
664
|
+
* Display label for the language picker. Defaults to the language name for
|
|
665
|
+
* `locale` (via `Intl.DisplayNames`), so this is only needed to override it.
|
|
716
666
|
*/
|
|
717
|
-
|
|
667
|
+
label?: string;
|
|
668
|
+
/** The value for this locale. */
|
|
669
|
+
value: T;
|
|
718
670
|
}
|
|
671
|
+
/** A single value, or the same value provided in multiple languages. */
|
|
672
|
+
type Localized<T> = T | LocalizedOption<T>[];
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/blocks/F0VideoPlayer/types.d.ts
|
|
719
675
|
/**
|
|
720
|
-
*
|
|
721
|
-
*
|
|
722
|
-
*
|
|
676
|
+
* Structured content for the video player.
|
|
677
|
+
*
|
|
678
|
+
* Every field accepts either a single value or a localized list
|
|
679
|
+
* (`[{ locale, label?, value }]`) — pass several languages and a language
|
|
680
|
+
* selector appears in the controls. A single shared selection drives captions,
|
|
681
|
+
* descriptions and the described source together (each falls back to its first
|
|
682
|
+
* entry for languages it doesn't provide). See `F0VideoPlayerProps.defaultLanguage`.
|
|
683
|
+
*
|
|
684
|
+
* `captions` are timed text shown over the video during playback (WCAG 2.1
|
|
685
|
+
* SC 1.2.2, Captions). Pass either a WebVTT resource URL or a raw WebVTT string
|
|
686
|
+
* (the player turns raw VTT into a blob track, so no CORS setup is needed); a
|
|
687
|
+
* remote URL requires the video host to allow cross-origin reads. When omitted,
|
|
688
|
+
* the player uses any caption/subtitle track embedded in the video file. A
|
|
689
|
+
* captions toggle in the controls shows/hides them (a filled glyph when on, a
|
|
690
|
+
* line glyph when off).
|
|
691
|
+
*
|
|
692
|
+
* Audio description (WCAG 2.1 SC 1.2.5) conveys on-screen visual information as
|
|
693
|
+
* audio, complementary to captions — both are independent and can be on at
|
|
694
|
+
* once. Provide it in one of two ways, toggled with the audio-description
|
|
695
|
+
* control (a filled "AD" badge when on, a line badge when off):
|
|
696
|
+
* - `describedSrc`: a pre-produced media rendition with description mixed into
|
|
697
|
+
* the audio. Toggling swaps the source, preserving position and play state.
|
|
698
|
+
* Highest quality; assumed the same length as `src`.
|
|
699
|
+
* - `descriptions`: a WebVTT `kind="descriptions"` script (URL or raw VTT),
|
|
700
|
+
* delivered at runtime — the video pauses on each cue so the description can
|
|
701
|
+
* be spoken (extended audio description), then resumes. Used only when
|
|
702
|
+
* `describedSrc` is absent.
|
|
723
703
|
*/
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
stacked?: boolean;
|
|
744
|
-
}
|
|
745
|
-
interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
746
|
-
type: "line";
|
|
747
|
-
lineType?: "linear" | "smooth" | "step";
|
|
748
|
-
showArea?: boolean;
|
|
749
|
-
showDots?: boolean;
|
|
750
|
-
}
|
|
751
|
-
interface ChatDashboardFunnelChartConfig {
|
|
752
|
-
type: "funnel";
|
|
753
|
-
sort?: "descending" | "ascending" | "none";
|
|
754
|
-
orient?: "horizontal" | "vertical";
|
|
755
|
-
labelPosition?: "inside" | "outside";
|
|
756
|
-
showLegend?: boolean;
|
|
757
|
-
showLabels?: boolean;
|
|
758
|
-
showConversion?: boolean;
|
|
759
|
-
valueFormat?: FormatPreset;
|
|
760
|
-
}
|
|
761
|
-
interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
762
|
-
type: "radar";
|
|
763
|
-
showArea?: boolean;
|
|
764
|
-
}
|
|
765
|
-
interface ChatDashboardPieChartConfig {
|
|
766
|
-
type: "pie";
|
|
767
|
-
innerRadius?: number;
|
|
768
|
-
showLegend?: boolean;
|
|
769
|
-
showLabels?: boolean;
|
|
770
|
-
showPercentage?: boolean;
|
|
771
|
-
valueFormat?: FormatPreset;
|
|
772
|
-
}
|
|
773
|
-
interface ChatDashboardGaugeChartConfig {
|
|
774
|
-
type: "gauge";
|
|
775
|
-
min?: number;
|
|
776
|
-
max?: number;
|
|
777
|
-
showValue?: boolean;
|
|
778
|
-
valueFormat?: FormatPreset;
|
|
779
|
-
}
|
|
780
|
-
interface ChatDashboardHeatmapChartConfig {
|
|
781
|
-
type: "heatmap";
|
|
782
|
-
min?: number;
|
|
783
|
-
max?: number;
|
|
784
|
-
showLabels?: boolean;
|
|
785
|
-
showVisualMap?: boolean;
|
|
786
|
-
valueFormat?: FormatPreset;
|
|
787
|
-
}
|
|
788
|
-
interface ChatDashboardScatterChartConfig {
|
|
789
|
-
type: "scatter";
|
|
790
|
-
pointSize?: number;
|
|
791
|
-
scaleAxes?: boolean;
|
|
792
|
-
showGrid?: boolean;
|
|
793
|
-
/** Only rendered with 2+ series, but still needed so a skeleton can reserve for it. */
|
|
794
|
-
showLegend?: boolean;
|
|
795
|
-
/** What the X measure is, e.g. "salary" — labels the x row in the tooltip */
|
|
796
|
-
xAxisName?: string;
|
|
797
|
-
/** What the Y measure is, e.g. "tenure" — labels the y row in the tooltip */
|
|
798
|
-
yAxisName?: string;
|
|
799
|
-
/** Pin the X axis bounds, e.g. 0 and 100 for a percentage */
|
|
800
|
-
xAxisMin?: number;
|
|
801
|
-
xAxisMax?: number;
|
|
802
|
-
/** Pin the Y axis bounds, e.g. 1 and 5 for a rating */
|
|
803
|
-
yAxisMin?: number;
|
|
804
|
-
yAxisMax?: number;
|
|
805
|
-
/** Print each point's label next to it. @default false */
|
|
806
|
-
showPointLabels?: boolean;
|
|
807
|
-
/** Merge points on nearly the same spot; hover lists them. @default false */
|
|
808
|
-
groupNearbyPoints?: boolean;
|
|
809
|
-
/** Render the axis names as axis titles. @default false */
|
|
810
|
-
showAxisNames?: boolean;
|
|
811
|
-
/** Formats the Y measure */
|
|
812
|
-
valueFormat?: FormatPreset;
|
|
813
|
-
/** Formats the X measure, which is a second measure rather than a category */
|
|
814
|
-
xValueFormat?: FormatPreset;
|
|
815
|
-
}
|
|
816
|
-
type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig | ChatDashboardScatterChartConfig;
|
|
817
|
-
type ChatDashboardMetricFormat = {
|
|
818
|
-
type: "number";
|
|
819
|
-
} | {
|
|
820
|
-
type: "currency";
|
|
821
|
-
currency?: string;
|
|
822
|
-
} | {
|
|
823
|
-
type: "percent";
|
|
824
|
-
} | {
|
|
825
|
-
type: "custom";
|
|
826
|
-
suffix?: string;
|
|
827
|
-
prefix?: string;
|
|
828
|
-
};
|
|
829
|
-
interface DashboardFetchSpec {
|
|
830
|
-
fetch: {
|
|
831
|
-
toolId: string;
|
|
832
|
-
args: Record<string, unknown>;
|
|
833
|
-
}[];
|
|
834
|
-
query: string | null;
|
|
835
|
-
columnLabels?: Record<string, string>;
|
|
836
|
-
}
|
|
837
|
-
type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
838
|
-
interface ChartComputation {
|
|
839
|
-
datasetId: string;
|
|
840
|
-
xAxis: string;
|
|
841
|
-
yAxis: string;
|
|
842
|
-
aggregation: AggregationType;
|
|
843
|
-
series?: string;
|
|
844
|
-
sortBy?: "value" | "category";
|
|
845
|
-
sortOrder?: "asc" | "desc";
|
|
846
|
-
limit?: number;
|
|
847
|
-
}
|
|
848
|
-
interface MetricComputation {
|
|
849
|
-
datasetId: string;
|
|
850
|
-
aggregation: AggregationType;
|
|
851
|
-
column?: string;
|
|
704
|
+
interface VideoPlayerContent {
|
|
705
|
+
/**
|
|
706
|
+
* WebVTT URL, or raw WebVTT content, for captions shown during playback.
|
|
707
|
+
* Localizable — pass a per-locale list to offer captions in several languages.
|
|
708
|
+
*/
|
|
709
|
+
captions?: Localized<string>;
|
|
710
|
+
/**
|
|
711
|
+
* A pre-produced described media source (description mixed into the audio),
|
|
712
|
+
* swapped in when audio description is enabled. Takes precedence over
|
|
713
|
+
* `descriptions`. Should match `src`'s duration so the position carries
|
|
714
|
+
* across the swap. Localizable.
|
|
715
|
+
*/
|
|
716
|
+
describedSrc?: Localized<string>;
|
|
717
|
+
/**
|
|
718
|
+
* WebVTT URL, or raw WebVTT content, of a `kind="descriptions"` script.
|
|
719
|
+
* Delivered at runtime with extended (pausing) audio description when no
|
|
720
|
+
* `describedSrc` is provided. Localizable.
|
|
721
|
+
*/
|
|
722
|
+
descriptions?: Localized<string>;
|
|
852
723
|
}
|
|
853
|
-
interface
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
724
|
+
interface F0VideoPlayerProps extends DataAttributes {
|
|
725
|
+
/** Accessible name for this player region. Defaults to "Video player". */
|
|
726
|
+
ariaLabel?: string;
|
|
727
|
+
/**
|
|
728
|
+
* Video source URL. Localizable — pass a per-locale list of dubbed renditions
|
|
729
|
+
* to offer selectable audio languages; an "Audio" selector then appears,
|
|
730
|
+
* independent of the subtitle/caption language.
|
|
731
|
+
*/
|
|
732
|
+
src: Localized<string>;
|
|
733
|
+
/**
|
|
734
|
+
* Initial language for localized content, matched against the provided
|
|
735
|
+
* locales exactly or by primary subtag, then the viewer's browser language,
|
|
736
|
+
* then the first provided. Applies to both the audio (`src`) and the text
|
|
737
|
+
* (`content`) language selections. Only relevant when more than one language
|
|
738
|
+
* is available.
|
|
739
|
+
*/
|
|
740
|
+
defaultLanguage?: string;
|
|
741
|
+
/**
|
|
742
|
+
* Image URL shown while the video loads and before playback starts (the
|
|
743
|
+
* native `<video>` poster). Cleared by the browser once playback begins.
|
|
744
|
+
*/
|
|
745
|
+
poster?: string;
|
|
746
|
+
/**
|
|
747
|
+
* Marks the video as having no audio (video-only). Captions (WCAG 2.1
|
|
748
|
+
* SC 1.2.2) don't apply to silent media, so this exempts the player from the
|
|
749
|
+
* captions requirement — `data-video-captions` is set to `"no-audio"` instead
|
|
750
|
+
* of `"missing"`. Note video-only content may still need a text/audio
|
|
751
|
+
* alternative for its visual information (SC 1.2.1) — audio description still
|
|
752
|
+
* works over a silent video (its description audio plays even though the video
|
|
753
|
+
* itself is muted). Browsers can't reliably detect the absence of audio before
|
|
754
|
+
* playback, so this is declared explicitly.
|
|
755
|
+
* @default false
|
|
756
|
+
*/
|
|
757
|
+
silent?: boolean;
|
|
758
|
+
/**
|
|
759
|
+
* Structured content for the player. Currently carries `captions` (a WebVTT
|
|
760
|
+
* URL or raw WebVTT string) shown over the video during playback and
|
|
761
|
+
* toggled with the "CC" control. When `captions` is omitted, captions
|
|
762
|
+
* embedded in the video file are used instead.
|
|
763
|
+
*/
|
|
764
|
+
content?: VideoPlayerContent;
|
|
765
|
+
/**
|
|
766
|
+
* Keep the controls bar visible during playback instead of auto-hiding it.
|
|
767
|
+
* By default the controls show while the video is paused and auto-hide while
|
|
768
|
+
* it plays (revealing on hover or keyboard focus); set this to keep them
|
|
769
|
+
* visible the whole time. Default `false`.
|
|
770
|
+
*/
|
|
771
|
+
persistControls?: boolean;
|
|
772
|
+
/** Start playing on mount. Default `false`. */
|
|
773
|
+
autoPlay?: boolean;
|
|
774
|
+
/** Focus the player on mount so keyboard shortcuts work immediately. Default `false`. */
|
|
775
|
+
autoFocus?: boolean;
|
|
776
|
+
/**
|
|
777
|
+
* Optional download action rendered inside the player controls. Native media
|
|
778
|
+
* downloads remain disabled, so embedded surfaces that allow saving the
|
|
779
|
+
* source can expose an explicit, keyboard-accessible action here.
|
|
780
|
+
*/
|
|
781
|
+
download?: {
|
|
858
782
|
label: string;
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
min?: number;
|
|
879
|
-
max?: number;
|
|
880
|
-
name?: string;
|
|
881
|
-
}
|
|
882
|
-
interface HeatmapComputation {
|
|
883
|
-
datasetId: string;
|
|
884
|
-
xAxis: string;
|
|
885
|
-
yAxis: string;
|
|
886
|
-
valueColumn: string;
|
|
887
|
-
aggregation: AggregationType;
|
|
783
|
+
onClick: () => void;
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* Prevent seeking past the furthest point already watched. Renders a marker at
|
|
787
|
+
* that position and blocks the cursor beyond it. Default `false`.
|
|
788
|
+
*/
|
|
789
|
+
restrictForwardSeek?: boolean;
|
|
790
|
+
/** Called on play, on pause and on a recurring heartbeat during playback. */
|
|
791
|
+
onTrackAction?: () => void;
|
|
792
|
+
/**
|
|
793
|
+
* Called once when each watched-% milestone (`25`, `50`, `75`) is first
|
|
794
|
+
* reached. For progress analytics; completion is reported via `onComplete`.
|
|
795
|
+
*/
|
|
796
|
+
onMilestone?: (milestone: number, video: HTMLVideoElement) => void;
|
|
797
|
+
/**
|
|
798
|
+
* Called once when the video is "watched enough": the remaining time drops to
|
|
799
|
+
* `min(10s, 3% of duration)` (the later of "last 10s" and "97%").
|
|
800
|
+
*/
|
|
801
|
+
onComplete?: (video: HTMLVideoElement) => void;
|
|
888
802
|
}
|
|
803
|
+
//#endregion
|
|
804
|
+
//#region src/blocks/F0VideoPlayer/internal.d.ts
|
|
889
805
|
/**
|
|
890
|
-
*
|
|
891
|
-
*
|
|
892
|
-
*
|
|
893
|
-
* the
|
|
806
|
+
* Video player built on a native `<video>` element.
|
|
807
|
+
*
|
|
808
|
+
* useVideoState → element ref, native listeners, derived state.
|
|
809
|
+
* useFullscreen → toggles fullscreen on the wrapper (keeps controls visible).
|
|
810
|
+
* useKeyboardShortcuts → Space, ←/→, ↑/↓, M, F.
|
|
811
|
+
* useVideoTracking → analytics callback on play/pause + interval.
|
|
812
|
+
* useVideoMilestones → watched-% milestone callbacks (25/50/75).
|
|
813
|
+
* useVideoCompletion → "watched enough" callback (min(10s, 3%)).
|
|
814
|
+
* useRestrictForwardSeek → blocks seeking past the furthest-watched point.
|
|
815
|
+
* <Controls> → presentation only; interactions delegated back here.
|
|
894
816
|
*/
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
yAxis: string;
|
|
899
|
-
label?: string;
|
|
900
|
-
series?: string;
|
|
901
|
-
limit?: number;
|
|
902
|
-
}
|
|
903
|
-
interface CollectionComputation {
|
|
904
|
-
datasetId: string;
|
|
905
|
-
sortBy?: string;
|
|
906
|
-
sortOrder?: "asc" | "desc";
|
|
907
|
-
limit?: number;
|
|
908
|
-
}
|
|
909
|
-
interface ChatDashboardFilterDefinition {
|
|
910
|
-
type: "in";
|
|
911
|
-
label: string;
|
|
912
|
-
column: string;
|
|
913
|
-
datasetId: string;
|
|
914
|
-
}
|
|
915
|
-
/** Granularity options exposed by F0's `OneDateNavigator`. */
|
|
916
|
-
type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
817
|
+
declare function F0VideoPlayerInternal({ src, poster, ariaLabel, silent, persistControls, content, defaultLanguage, autoPlay, autoFocus, download, restrictForwardSeek, onTrackAction, onMilestone, onComplete, ...dataAttributes }: F0VideoPlayerProps): import("react").JSX.Element;
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region src/blocks/F0VideoPlayer/F0VideoPlayer.d.ts
|
|
917
820
|
/**
|
|
918
|
-
*
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
*
|
|
821
|
+
* @experimental This is an experimental component, use it at your own risk.
|
|
822
|
+
*
|
|
823
|
+
* Video player built on a native `<video>` element with f0-styled controls
|
|
824
|
+
* (play/pause, seekbar, volume, playback speed, fullscreen) plus keyboard
|
|
825
|
+
* shortcuts. Analytics, watch-% milestones, completion and forward-seek
|
|
826
|
+
* restriction are built in and enabled via props (`onTrackAction`,
|
|
827
|
+
* `onMilestone`, `onComplete`, `restrictForwardSeek`).
|
|
923
828
|
*/
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
829
|
+
declare const F0VideoPlayer: WithDataTestIdReturnType<typeof F0VideoPlayerInternal>;
|
|
830
|
+
//#endregion
|
|
831
|
+
//#region src/elements/primitives/_primitives/F0Attachments/types.d.ts
|
|
832
|
+
type AttachmentDocumentKind = F0DocumentKind;
|
|
833
|
+
//#endregion
|
|
834
|
+
//#region src/addons/ai/ai/F0AiFileAttachments/types.d.ts
|
|
835
|
+
/**
|
|
836
|
+
* A file shown in the AI chat: something the person sent, or something the
|
|
837
|
+
* assistant produced. Built from the host's message parts with the adapters in
|
|
838
|
+
* `./adapters`.
|
|
839
|
+
*/
|
|
840
|
+
interface AiChatFile {
|
|
841
|
+
url: string;
|
|
842
|
+
name: string;
|
|
843
|
+
/**
|
|
844
|
+
* Declared type. Placeholder types (`application/octet-stream`,
|
|
845
|
+
* `application/vnd.factorial.*`) are ignored and the extension decides.
|
|
846
|
+
*/
|
|
847
|
+
mimeType?: string;
|
|
848
|
+
/** Size in bytes, when known. */
|
|
849
|
+
size?: number;
|
|
939
850
|
/**
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
* table column's `info` prop. Omit when the label is self-explanatory.
|
|
851
|
+
* PDF rendering of a file the browser can't preview (docx, pptx, xlsx made
|
|
852
|
+
* by the agent). The card and viewer show it; downloads keep `url`.
|
|
943
853
|
*/
|
|
944
|
-
|
|
854
|
+
previewUrl?: string;
|
|
855
|
+
/** Smaller image for the transcript, or a video poster. */
|
|
856
|
+
thumbnailUrl?: string;
|
|
857
|
+
/** Intrinsic photo size; reserves the box before the photo loads. */
|
|
858
|
+
width?: number;
|
|
859
|
+
height?: number;
|
|
945
860
|
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
861
|
+
/**
|
|
862
|
+
* Which kind of preview a file opened. `document` covers everything the
|
|
863
|
+
* document viewer shows (pdf, sheets, Word, text, code, HTML); the exact
|
|
864
|
+
* family comes in `onOpenFile`'s third argument. Zips never open: their card
|
|
865
|
+
* downloads them.
|
|
866
|
+
*/
|
|
867
|
+
type AiChatFileKind = "image" | "video" | "audio" | "document" | "file";
|
|
868
|
+
/**
|
|
869
|
+
* Makes a file URL loadable by the browser. Needed when files sit behind
|
|
870
|
+
* authentication headers that `<img>`, video and the PDF reader can't send.
|
|
871
|
+
*
|
|
872
|
+
* - Return a `Blob`: F0 creates the object URL, shares it between the card,
|
|
873
|
+
* the lightbox and the download, and revokes it when nothing uses it.
|
|
874
|
+
* - Return a string: used as is (for example a signed URL).
|
|
875
|
+
* - Return null or undefined: the original URL is used.
|
|
876
|
+
*
|
|
877
|
+
* Results are shared while in use, so a URL is normally resolved once; it is
|
|
878
|
+
* resolved again after a failure or once nothing has shown it for a while.
|
|
879
|
+
* Must not throw for URLs it doesn't recognise.
|
|
880
|
+
*/
|
|
881
|
+
type AiChatFileUrlResolver = (url: string, context: {
|
|
882
|
+
signal: AbortSignal;
|
|
883
|
+
}) => Promise<string | Blob | null | undefined> | string | Blob | null | undefined;
|
|
884
|
+
interface AiChatFilePreviewConfig {
|
|
952
885
|
/**
|
|
953
|
-
*
|
|
954
|
-
*
|
|
955
|
-
*
|
|
956
|
-
* entry — backwards compatible with persisted dashboards.
|
|
886
|
+
* Resolve file URLs before showing them. Without it, only files the browser
|
|
887
|
+
* already holds (`blob:` and `data:` URLs) get rich previews; anything else
|
|
888
|
+
* stays a download card, since the chat can't know the URL is loadable.
|
|
957
889
|
*/
|
|
958
|
-
|
|
890
|
+
resolveUrl?: AiChatFileUrlResolver;
|
|
959
891
|
/**
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
*
|
|
892
|
+
* Show rich previews for remote URLs without a resolver, when they load
|
|
893
|
+
* directly (public or cookie-authenticated files).
|
|
894
|
+
* @default false
|
|
963
895
|
*/
|
|
964
|
-
|
|
896
|
+
directUrls?: boolean;
|
|
965
897
|
/**
|
|
966
|
-
*
|
|
967
|
-
*
|
|
968
|
-
*
|
|
898
|
+
* Separate registrable domain serving `f0-html-host/` (see its README).
|
|
899
|
+
* With it, HTML files run in that isolated origin; without it they run in
|
|
900
|
+
* an opaque-origin srcdoc frame inside this tab.
|
|
969
901
|
*/
|
|
970
|
-
|
|
902
|
+
htmlSandbox?: F0DocumentHtmlSandbox;
|
|
971
903
|
/**
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
*
|
|
975
|
-
* dashboards should pick from a constrained set of values that match the
|
|
976
|
-
* data shape (more rows / more categories → taller).
|
|
904
|
+
* When HTML files run their scripts: "auto" on open, "ask" behind a "Run
|
|
905
|
+
* content" button, "never" static.
|
|
906
|
+
* @default "auto"
|
|
977
907
|
*/
|
|
978
|
-
|
|
979
|
-
x?: number;
|
|
980
|
-
y?: number;
|
|
908
|
+
htmlExecution?: F0DocumentHtmlExecution;
|
|
981
909
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
910
|
+
/** One file published by an agent's `showFiles` tool. */
|
|
911
|
+
interface AiChatShowFilesItem {
|
|
912
|
+
path: string;
|
|
913
|
+
displayName?: string;
|
|
914
|
+
mimeType?: string;
|
|
915
|
+
bytes?: number;
|
|
916
|
+
/** Download URL, when the tool already built one. */
|
|
917
|
+
url?: string;
|
|
918
|
+
/** A PDF rendering of the file, written next to it by the agent. */
|
|
919
|
+
preview?: {
|
|
920
|
+
path: string;
|
|
921
|
+
url?: string;
|
|
922
|
+
};
|
|
986
923
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
924
|
+
//#endregion
|
|
925
|
+
//#region src/addons/ai/ai/canvas/types.d.ts
|
|
926
|
+
/**
|
|
927
|
+
* Base shape shared by all canvas content types.
|
|
928
|
+
* Every entity adds its own fields on top of this.
|
|
929
|
+
*/
|
|
930
|
+
interface CanvasContentBase {
|
|
931
|
+
type: string;
|
|
932
|
+
title: string;
|
|
933
|
+
description?: string;
|
|
934
|
+
toolCallId?: string;
|
|
935
|
+
/**
|
|
936
|
+
* Render this content across the whole frame, covering the docked chat
|
|
937
|
+
* instead of hugging a seam beside it. For content that is a step of its own
|
|
938
|
+
* rather than something you work through while talking — picking a template,
|
|
939
|
+
* say. The chat is only covered, never closed, so the conversation is exactly
|
|
940
|
+
* where it was when the canvas is dismissed.
|
|
941
|
+
*
|
|
942
|
+
* Deliberately NOT called `fullscreen`: the chat's own
|
|
943
|
+
* `visualizationMode: "fullscreen"` means the opposite arrangement (chat full
|
|
944
|
+
* width, no canvas), and going back to it is how a covering canvas is
|
|
945
|
+
* dismissed.
|
|
946
|
+
*
|
|
947
|
+
* Defaults to the docked split.
|
|
948
|
+
*/
|
|
949
|
+
coversChat?: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* Keep this docked content mounted, out of view, while the chat is
|
|
952
|
+
* fullscreen, and bring it back as it was when the chat docks again. For
|
|
953
|
+
* content the reader works on and would lose by expanding the chat, such as
|
|
954
|
+
* an editor with unsaved changes.
|
|
955
|
+
*
|
|
956
|
+
* Defaults to dropping the content when the chat goes fullscreen. Ignored
|
|
957
|
+
* with `coversChat`, which fullscreen always dismisses.
|
|
958
|
+
*/
|
|
959
|
+
keepsUnderFullscreen?: boolean;
|
|
992
960
|
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
961
|
+
/**
|
|
962
|
+
* Dashboard canvas content — renders an analytics dashboard.
|
|
963
|
+
*/
|
|
964
|
+
type DashboardCanvasContent = CanvasContentBase & {
|
|
965
|
+
type: "dashboard";
|
|
966
|
+
config: ChatDashboardConfig;
|
|
967
|
+
apiConfig: {
|
|
968
|
+
baseUrl: string;
|
|
969
|
+
headers: Record<string, string>;
|
|
970
|
+
runtimeFetch?: typeof fetch;
|
|
971
|
+
};
|
|
972
|
+
/** Present when the dashboard is a pre-saved dashboard */
|
|
973
|
+
savedDashboardId?: string;
|
|
974
|
+
/** Category of the saved dashboard */
|
|
975
|
+
savedDashboardCategory?: string;
|
|
976
|
+
/** Description of the saved dashboard */
|
|
977
|
+
savedDashboardDescription?: string;
|
|
978
|
+
/** True when the agent has iterated on a saved dashboard but the user hasn't saved yet */
|
|
979
|
+
savedDashboardUnsaved?: boolean;
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* Form canvas content — renders an interactive F0Form in the canvas panel.
|
|
983
|
+
*/
|
|
984
|
+
type FormCanvasContent = CanvasContentBase & {
|
|
985
|
+
type: "form";
|
|
986
|
+
formName: string;
|
|
987
|
+
formDescription?: string;
|
|
988
|
+
formModule?: ModuleId;
|
|
989
|
+
};
|
|
990
|
+
/**
|
|
991
|
+
* Data download canvas content — renders a full data table with download options.
|
|
992
|
+
*/
|
|
993
|
+
type DataDownloadCanvasContent = CanvasContentBase & {
|
|
994
|
+
type: "dataDownload";
|
|
995
|
+
dataset: DataDownloadDataset;
|
|
996
|
+
filename?: string;
|
|
997
|
+
markdown?: string;
|
|
998
|
+
};
|
|
999
|
+
/**
|
|
1000
|
+
* Autofill-timesheet canvas content — renders an editable timesheet proposal
|
|
1001
|
+
* (day-grouped shift blocks the user can adjust and confirm) in the canvas panel.
|
|
1002
|
+
*/
|
|
1003
|
+
type AutofillTimesheetCanvasContent = CanvasContentBase & {
|
|
1004
|
+
type: "autofillTimesheet";
|
|
1005
|
+
employeeId: string;
|
|
1006
|
+
startOn: string;
|
|
1007
|
+
endOn: string;
|
|
1008
|
+
shifts: AutofillTimesheetShift[];
|
|
1009
|
+
};
|
|
1010
|
+
/**
|
|
1011
|
+
* Bulk-resolve-inconsistencies canvas content — renders an AI-grouped proposal
|
|
1012
|
+
* for resolving open time-tracking inconsistencies (a reviewable collection of
|
|
1013
|
+
* employees/rows the user can trim and apply). Carries scope identity only:
|
|
1014
|
+
* the proposal rows live in host state, keyed by this scope.
|
|
1015
|
+
*/
|
|
1016
|
+
type BulkResolveInconsistenciesCanvasContent = CanvasContentBase & {
|
|
1017
|
+
type: "bulkResolveInconsistencies";
|
|
1018
|
+
/** Analysed period, YYYY-MM-DD. */
|
|
1019
|
+
periodStart: string;
|
|
1020
|
+
periodEnd: string;
|
|
1021
|
+
/** Exact row ids the proposal was scoped to; null when the whole period was analysed. */
|
|
1022
|
+
scopeInconsistencyIds?: string[] | null;
|
|
1023
|
+
};
|
|
1024
|
+
/**
|
|
1025
|
+
* File canvas content: files the assistant sent, previewed beside the chat.
|
|
1026
|
+
* Built into the chat (no host entity needed); `F0AiFileAttachments` opens it
|
|
1027
|
+
* for assistant files that have a preview.
|
|
1028
|
+
*/
|
|
1029
|
+
type FileCanvasContent = CanvasContentBase & {
|
|
1030
|
+
type: "file";
|
|
1031
|
+
/** The files the canvas pages through, in the message's order. */
|
|
1032
|
+
files: AiChatFile[];
|
|
1033
|
+
/** The file on screen. */
|
|
1034
|
+
index: number;
|
|
1035
|
+
};
|
|
1036
|
+
/**
|
|
1037
|
+
* Discriminated union for canvas panel content.
|
|
1038
|
+
* Add new entity types to this union as they are implemented.
|
|
1039
|
+
*/
|
|
1040
|
+
type CanvasContent = DashboardCanvasContent | FormCanvasContent | DataDownloadCanvasContent | AutofillTimesheetCanvasContent | BulkResolveInconsistenciesCanvasContent | FileCanvasContent;
|
|
1041
|
+
/**
|
|
1042
|
+
* Canvas-level action callbacks grouped by entity type.
|
|
1043
|
+
* Each entity defines its own actions type; this aggregates them.
|
|
1044
|
+
* Passed by the host app to F0AiChatProvider via `canvasActions`.
|
|
1045
|
+
*/
|
|
1046
|
+
interface CanvasActions {
|
|
1047
|
+
dashboard?: DashboardCanvasActions;
|
|
997
1048
|
}
|
|
998
|
-
type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
999
1049
|
/**
|
|
1000
|
-
*
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1050
|
+
* Contract for a canvas entity type.
|
|
1051
|
+
*
|
|
1052
|
+
* Each entity (dashboard, survey, goal, job-posting…) implements this
|
|
1053
|
+
* interface and is added to the `canvasEntities` record passed to F0AiChat.
|
|
1003
1054
|
*/
|
|
1004
|
-
interface
|
|
1005
|
-
/**
|
|
1006
|
-
|
|
1055
|
+
interface CanvasEntityDefinition<T extends CanvasContentBase = CanvasContentBase> {
|
|
1056
|
+
/** Must match the `type` discriminant on the content object */
|
|
1057
|
+
type: T["type"];
|
|
1058
|
+
/** Renders the main body of the canvas panel */
|
|
1059
|
+
renderContent: (props: {
|
|
1060
|
+
content: T;
|
|
1061
|
+
refreshKey: number;
|
|
1062
|
+
}) => ReactNode;
|
|
1063
|
+
/** Renders the full header (title, actions, close button) */
|
|
1064
|
+
renderHeader: (props: {
|
|
1065
|
+
content: T;
|
|
1066
|
+
onClose: () => void;
|
|
1067
|
+
}) => ReactNode;
|
|
1007
1068
|
/**
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
1010
|
-
* legacy persisted dashboards (before the agent started emitting it) still
|
|
1011
|
-
* parse; the agent schema makes it required going forward.
|
|
1069
|
+
* Optional wrapper providing entity-scoped context around
|
|
1070
|
+
* both header and body (e.g. shared edit-mode state).
|
|
1012
1071
|
*/
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1072
|
+
wrapper?: (props: {
|
|
1073
|
+
content: T;
|
|
1074
|
+
children: ReactNode;
|
|
1075
|
+
}) => ReactNode;
|
|
1016
1076
|
/**
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
* `navigationFilters` slot.
|
|
1077
|
+
* When true the content area uses `overflow-hidden` instead of
|
|
1078
|
+
* `overflow-auto`, letting the entity manage its own scrolling.
|
|
1020
1079
|
*/
|
|
1021
|
-
|
|
1022
|
-
/** Ordered list of dashboard items with computation specs */
|
|
1023
|
-
items: ChatDashboardItem[];
|
|
1024
|
-
/** Fetch specs for server-side data retrieval, keyed by datasetId */
|
|
1025
|
-
fetchSpecs: Record<string, DashboardFetchSpec>;
|
|
1080
|
+
overflowHidden?: boolean;
|
|
1026
1081
|
}
|
|
1027
1082
|
/**
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
1030
|
-
* avatar and the freshness signal only once a dashboard has been persisted.
|
|
1031
|
-
*
|
|
1032
|
-
* `title` and `description` are also returned: once a dashboard has an id
|
|
1033
|
-
* the backend is the source of truth and may diverge from what's stored in
|
|
1034
|
-
* the chat history (e.g. someone renamed the dashboard from the Analytics
|
|
1035
|
-
* list page since this conversation was first opened). The header prefers
|
|
1036
|
-
* these values over the ones baked into `content` / `config`.
|
|
1083
|
+
* Inline dataset for client-side file generation (Excel / CSV).
|
|
1084
|
+
* Sent by the agent with the raw query results.
|
|
1037
1085
|
*/
|
|
1038
|
-
interface
|
|
1086
|
+
interface DataDownloadDataset {
|
|
1087
|
+
/** Column headers in display order. */
|
|
1088
|
+
columns: string[];
|
|
1089
|
+
/** Array of row objects keyed by column name. */
|
|
1090
|
+
rows: Record<string, unknown>[];
|
|
1039
1091
|
/**
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1042
|
-
* authoritative backend copy.
|
|
1092
|
+
* Total number of rows returned by the query (before truncation).
|
|
1093
|
+
* Used together with previewCount to render the preview note.
|
|
1043
1094
|
*/
|
|
1044
|
-
|
|
1095
|
+
totalCount?: number;
|
|
1045
1096
|
/**
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1097
|
+
* Number of rows shown in the markdown preview table.
|
|
1098
|
+
* Used together with totalCount to render the preview note.
|
|
1048
1099
|
*/
|
|
1049
|
-
|
|
1050
|
-
creator: {
|
|
1051
|
-
firstName: string;
|
|
1052
|
-
lastName: string;
|
|
1053
|
-
/** Optional avatar image URL. Falls back to initials when omitted. */
|
|
1054
|
-
src?: string;
|
|
1055
|
-
};
|
|
1100
|
+
previewCount?: number;
|
|
1056
1101
|
/**
|
|
1057
|
-
*
|
|
1058
|
-
*
|
|
1102
|
+
* Map of raw column names to human-readable labels in the user's language.
|
|
1103
|
+
* Used for Excel/CSV headers. Falls back to the raw column name when absent.
|
|
1059
1104
|
*/
|
|
1060
|
-
|
|
1105
|
+
columnLabels?: Record<string, string>;
|
|
1061
1106
|
}
|
|
1062
1107
|
/**
|
|
1063
|
-
*
|
|
1108
|
+
* A single proposed shift block in a timesheet-autofill preview. Every proposed
|
|
1109
|
+
* block carries concrete employee-local clock times (ISO datetime or "HH:MM");
|
|
1110
|
+
* days that cannot be proposed are omitted rather than emitted with empty bounds.
|
|
1064
1111
|
*/
|
|
1065
|
-
interface
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
*/
|
|
1073
|
-
create: (title: string, description: string, config: ChatDashboardConfig, category?: string) => Promise<{
|
|
1074
|
-
id: string;
|
|
1075
|
-
category: string;
|
|
1076
|
-
} | void>;
|
|
1112
|
+
interface AutofillTimesheetShift {
|
|
1113
|
+
date: string;
|
|
1114
|
+
clockIn: string;
|
|
1115
|
+
clockOut: string;
|
|
1116
|
+
workable: boolean;
|
|
1117
|
+
workplaceId?: string | null;
|
|
1118
|
+
workAreaId?: string | null;
|
|
1077
1119
|
/**
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1081
|
-
* the header will skip rendering the avatar and the last-edited row
|
|
1082
|
-
* instead of showing a placeholder.
|
|
1120
|
+
* Host-defined work-location kind. Left as a loose string to keep the kit
|
|
1121
|
+
* host-agnostic; the factorial consumer narrows it to its attendance
|
|
1122
|
+
* location-type enum (today: "office" | "work_from_home" | "business_trip").
|
|
1083
1123
|
*/
|
|
1084
|
-
|
|
1085
|
-
}
|
|
1086
|
-
//#endregion
|
|
1087
|
-
//#region src/elements/lib/global.types.d.ts
|
|
1088
|
-
interface DataAttributes {
|
|
1089
|
-
[key: `data-${string}`]: string | undefined;
|
|
1124
|
+
locationType?: string | null;
|
|
1090
1125
|
}
|
|
1091
|
-
//#endregion
|
|
1092
|
-
//#region src/addons/documents/F0DocumentViewer/types.d.ts
|
|
1093
|
-
declare const pdfScales: readonly ["page-width", "page-fit", "0.5", "0.75", "1", "1.25", "1.5", "2", "3", "4"];
|
|
1094
|
-
type F0PdfScale = (typeof pdfScales)[number];
|
|
1095
|
-
type F0PdfRotation = 0 | 90 | 180 | 270;
|
|
1096
|
-
/**
|
|
1097
|
-
* Document families the viewer can render. "pdf" is the default and keeps the
|
|
1098
|
-
* full toolbar (paging, zoom, print, download); the other kinds render a
|
|
1099
|
-
* lazy-loaded, read-only preview: "sheet" (xlsx/csv) as an Excel-style
|
|
1100
|
-
* grid with one tab per sheet, "docx" through docx-preview with page layout,
|
|
1101
|
-
* "text" as a rendered markdown document (`.md`) or monospaced source,
|
|
1102
|
-
* "code" as syntax-highlighted source, "html" as a sandboxed page running its
|
|
1103
|
-
* scripts and "archive" as the file listing of a zip (never extracted).
|
|
1104
|
-
*/
|
|
1105
|
-
type F0DocumentKind = "pdf" | "sheet" | "docx" | "text" | "code" | "html" | "archive";
|
|
1106
1126
|
/**
|
|
1107
|
-
*
|
|
1108
|
-
*
|
|
1109
|
-
*
|
|
1110
|
-
* it static.
|
|
1127
|
+
* A preset formatting instruction the LLM can specify instead of a
|
|
1128
|
+
* real formatter function. The wrapper component maps these to actual
|
|
1129
|
+
* `(value: number) => string` functions at render time.
|
|
1111
1130
|
*/
|
|
1112
|
-
type
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1131
|
+
type FormatPreset = {
|
|
1132
|
+
type: "number";
|
|
1133
|
+
} | {
|
|
1134
|
+
type: "currency";
|
|
1135
|
+
currency?: string;
|
|
1136
|
+
} | {
|
|
1137
|
+
type: "percent";
|
|
1138
|
+
} | {
|
|
1139
|
+
type: "compact";
|
|
1140
|
+
};
|
|
1141
|
+
interface ChatDashboardChartConfigBase {
|
|
1142
|
+
showLegend?: boolean;
|
|
1143
|
+
showGrid?: boolean;
|
|
1144
|
+
showLabels?: boolean;
|
|
1145
|
+
valueFormat?: FormatPreset;
|
|
1146
|
+
}
|
|
1147
|
+
interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
1148
|
+
type: "bar";
|
|
1149
|
+
orientation?: "vertical" | "horizontal";
|
|
1150
|
+
stacked?: boolean;
|
|
1151
|
+
}
|
|
1152
|
+
interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
1153
|
+
type: "line";
|
|
1154
|
+
lineType?: "linear" | "smooth" | "step";
|
|
1155
|
+
showArea?: boolean;
|
|
1156
|
+
showDots?: boolean;
|
|
1157
|
+
}
|
|
1158
|
+
interface ChatDashboardFunnelChartConfig {
|
|
1159
|
+
type: "funnel";
|
|
1160
|
+
sort?: "descending" | "ascending" | "none";
|
|
1161
|
+
orient?: "horizontal" | "vertical";
|
|
1162
|
+
labelPosition?: "inside" | "outside";
|
|
1163
|
+
showLegend?: boolean;
|
|
1164
|
+
showLabels?: boolean;
|
|
1165
|
+
showConversion?: boolean;
|
|
1166
|
+
valueFormat?: FormatPreset;
|
|
1167
|
+
}
|
|
1168
|
+
interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
1169
|
+
type: "radar";
|
|
1170
|
+
showArea?: boolean;
|
|
1171
|
+
}
|
|
1172
|
+
interface ChatDashboardPieChartConfig {
|
|
1173
|
+
type: "pie";
|
|
1174
|
+
innerRadius?: number;
|
|
1175
|
+
showLegend?: boolean;
|
|
1176
|
+
showLabels?: boolean;
|
|
1177
|
+
showPercentage?: boolean;
|
|
1178
|
+
valueFormat?: FormatPreset;
|
|
1179
|
+
}
|
|
1180
|
+
interface ChatDashboardGaugeChartConfig {
|
|
1181
|
+
type: "gauge";
|
|
1182
|
+
min?: number;
|
|
1183
|
+
max?: number;
|
|
1184
|
+
showValue?: boolean;
|
|
1185
|
+
valueFormat?: FormatPreset;
|
|
1186
|
+
}
|
|
1187
|
+
interface ChatDashboardHeatmapChartConfig {
|
|
1188
|
+
type: "heatmap";
|
|
1189
|
+
min?: number;
|
|
1190
|
+
max?: number;
|
|
1191
|
+
showLabels?: boolean;
|
|
1192
|
+
showVisualMap?: boolean;
|
|
1193
|
+
valueFormat?: FormatPreset;
|
|
1194
|
+
}
|
|
1195
|
+
interface ChatDashboardScatterChartConfig {
|
|
1196
|
+
type: "scatter";
|
|
1197
|
+
pointSize?: number;
|
|
1198
|
+
scaleAxes?: boolean;
|
|
1199
|
+
showGrid?: boolean;
|
|
1200
|
+
/** Only rendered with 2+ series, but still needed so a skeleton can reserve for it. */
|
|
1201
|
+
showLegend?: boolean;
|
|
1202
|
+
/** What the X measure is, e.g. "salary" — labels the x row in the tooltip */
|
|
1203
|
+
xAxisName?: string;
|
|
1204
|
+
/** What the Y measure is, e.g. "tenure" — labels the y row in the tooltip */
|
|
1205
|
+
yAxisName?: string;
|
|
1206
|
+
/** Pin the X axis bounds, e.g. 0 and 100 for a percentage */
|
|
1207
|
+
xAxisMin?: number;
|
|
1208
|
+
xAxisMax?: number;
|
|
1209
|
+
/** Pin the Y axis bounds, e.g. 1 and 5 for a rating */
|
|
1210
|
+
yAxisMin?: number;
|
|
1211
|
+
yAxisMax?: number;
|
|
1212
|
+
/** Print each point's label next to it. @default false */
|
|
1213
|
+
showPointLabels?: boolean;
|
|
1214
|
+
/** Merge points on nearly the same spot; hover lists them. @default false */
|
|
1215
|
+
groupNearbyPoints?: boolean;
|
|
1216
|
+
/** Render the axis names as axis titles. @default false */
|
|
1217
|
+
showAxisNames?: boolean;
|
|
1218
|
+
/** Formats the Y measure */
|
|
1219
|
+
valueFormat?: FormatPreset;
|
|
1220
|
+
/** Formats the X measure, which is a second measure rather than a category */
|
|
1221
|
+
xValueFormat?: FormatPreset;
|
|
1222
|
+
}
|
|
1223
|
+
type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig | ChatDashboardScatterChartConfig;
|
|
1224
|
+
type ChatDashboardMetricFormat = {
|
|
1225
|
+
type: "number";
|
|
1226
|
+
} | {
|
|
1227
|
+
type: "currency";
|
|
1228
|
+
currency?: string;
|
|
1229
|
+
} | {
|
|
1230
|
+
type: "percent";
|
|
1231
|
+
} | {
|
|
1232
|
+
type: "custom";
|
|
1233
|
+
suffix?: string;
|
|
1234
|
+
prefix?: string;
|
|
1235
|
+
};
|
|
1236
|
+
interface DashboardFetchSpec {
|
|
1237
|
+
fetch: {
|
|
1238
|
+
toolId: string;
|
|
1239
|
+
args: Record<string, unknown>;
|
|
1240
|
+
}[];
|
|
1241
|
+
query: string | null;
|
|
1242
|
+
columnLabels?: Record<string, string>;
|
|
1243
|
+
}
|
|
1244
|
+
type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
1245
|
+
interface ChartComputation {
|
|
1246
|
+
datasetId: string;
|
|
1247
|
+
xAxis: string;
|
|
1248
|
+
yAxis: string;
|
|
1249
|
+
aggregation: AggregationType;
|
|
1250
|
+
series?: string;
|
|
1251
|
+
sortBy?: "value" | "category";
|
|
1252
|
+
sortOrder?: "asc" | "desc";
|
|
1253
|
+
limit?: number;
|
|
1254
|
+
}
|
|
1255
|
+
interface MetricComputation {
|
|
1256
|
+
datasetId: string;
|
|
1257
|
+
aggregation: AggregationType;
|
|
1258
|
+
column?: string;
|
|
1259
|
+
}
|
|
1260
|
+
interface RadarComputation {
|
|
1261
|
+
datasetId: string;
|
|
1262
|
+
seriesColumn: string;
|
|
1263
|
+
indicators: {
|
|
1264
|
+
column: string;
|
|
1265
|
+
label: string;
|
|
1266
|
+
max?: number;
|
|
1267
|
+
}[];
|
|
1268
|
+
limit?: number;
|
|
1269
|
+
sortBy?: string;
|
|
1270
|
+
sortOrder?: "asc" | "desc";
|
|
1117
1271
|
}
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
*/
|
|
1127
|
-
type F0DocumentViewerToolbarPlacement = "top" | "floating" | "none";
|
|
1128
|
-
/**
|
|
1129
|
-
* Host-provided toolbar action, appended after the built-in controls in every
|
|
1130
|
-
* kind — e.g. a Close button when the viewer lives inside a fullscreen overlay.
|
|
1131
|
-
*/
|
|
1132
|
-
interface F0DocumentViewerAction {
|
|
1133
|
-
icon: IconType;
|
|
1134
|
-
label: string;
|
|
1135
|
-
onClick: () => void;
|
|
1272
|
+
interface PieComputation {
|
|
1273
|
+
datasetId: string;
|
|
1274
|
+
nameColumn: string;
|
|
1275
|
+
valueColumn: string;
|
|
1276
|
+
aggregation: AggregationType;
|
|
1277
|
+
sortBy?: "value" | "name";
|
|
1278
|
+
sortOrder?: "asc" | "desc";
|
|
1279
|
+
limit?: number;
|
|
1136
1280
|
}
|
|
1137
|
-
interface
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
* Language for kind="code" (e.g. "typescript", "py"). Derived from the
|
|
1152
|
-
* file name when omitted; unknown languages show as plain source.
|
|
1153
|
-
*/
|
|
1154
|
-
language?: string;
|
|
1155
|
-
/** Hide the built-in Download button, in every kind. */
|
|
1156
|
-
hideDownload?: boolean;
|
|
1157
|
-
/** kind="html": when scripts may run. Defaults to "auto". */
|
|
1158
|
-
htmlExecution?: F0DocumentHtmlExecution;
|
|
1159
|
-
/** kind="html": isolated origin where scripts run like a Claude artifact. */
|
|
1160
|
-
htmlSandbox?: F0DocumentHtmlSandbox;
|
|
1161
|
-
/** kind="html": who sent the file, shown as "Content from {sender}". */
|
|
1162
|
-
sender?: string;
|
|
1163
|
-
/** Toolbar placement, in every kind. Defaults to "top". */
|
|
1164
|
-
toolbar?: F0DocumentViewerToolbarPlacement;
|
|
1165
|
-
/**
|
|
1166
|
-
* Custom actions appended to the toolbar (after the built-in controls), in
|
|
1167
|
-
* every kind — e.g. a Close button when the viewer fills an overlay.
|
|
1168
|
-
*/
|
|
1169
|
-
actions?: F0DocumentViewerAction[];
|
|
1170
|
-
/** Zero-based page index to scroll to initially (and on change). */
|
|
1171
|
-
page?: number;
|
|
1172
|
-
/** Restrict rendering to a subset of pages (zero-based indexes). */
|
|
1173
|
-
pagesToDisplay?: number[];
|
|
1174
|
-
/** Initial zoom level. Defaults to "page-width". */
|
|
1175
|
-
initialScale?: F0PdfScale;
|
|
1176
|
-
/** Send credentials with the document request. Defaults to true. */
|
|
1177
|
-
withCredentials?: boolean;
|
|
1178
|
-
/** Show a toolbar control to rotate the document in 90° steps. */
|
|
1179
|
-
rotatable?: boolean;
|
|
1180
|
-
/** Initial rotation in degrees. Defaults to 0. */
|
|
1181
|
-
initialRotation?: F0PdfRotation;
|
|
1182
|
-
/** Called with the new rotation in degrees whenever the user rotates. */
|
|
1183
|
-
onRotationChange?: (rotation: F0PdfRotation) => void;
|
|
1184
|
-
/** Called once the document has loaded, with the pdf.js document proxy. */
|
|
1185
|
-
onPdfLoaded?: (pdf: PDFDocumentProxy) => void;
|
|
1186
|
-
/** Called with the 1-based page number when the visible page changes. */
|
|
1187
|
-
onPageChange?: (page: number) => void;
|
|
1281
|
+
interface GaugeComputation {
|
|
1282
|
+
datasetId: string;
|
|
1283
|
+
aggregation: AggregationType;
|
|
1284
|
+
column?: string;
|
|
1285
|
+
min?: number;
|
|
1286
|
+
max?: number;
|
|
1287
|
+
name?: string;
|
|
1288
|
+
}
|
|
1289
|
+
interface HeatmapComputation {
|
|
1290
|
+
datasetId: string;
|
|
1291
|
+
xAxis: string;
|
|
1292
|
+
yAxis: string;
|
|
1293
|
+
valueColumn: string;
|
|
1294
|
+
aggregation: AggregationType;
|
|
1188
1295
|
}
|
|
1189
|
-
//#endregion
|
|
1190
|
-
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewerSkeleton.d.ts
|
|
1191
|
-
declare const F0DocumentViewerSkeleton: () => import("react").JSX.Element;
|
|
1192
|
-
//#endregion
|
|
1193
|
-
//#region src/addons/documents/F0DocumentViewer/F0DocumentViewer.d.ts
|
|
1194
|
-
/**
|
|
1195
|
-
* @experimental This is an experimental component, use it at your own risk.
|
|
1196
|
-
*/
|
|
1197
|
-
declare const F0DocumentViewer: WithDataTestIdReturnType<import("react").ForwardRefExoticComponent<F0DocumentViewerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
1198
|
-
Skeleton: typeof F0DocumentViewerSkeleton;
|
|
1199
|
-
}>;
|
|
1200
|
-
/** @deprecated Renamed to `F0DocumentViewer`: it previews PDF, Word, Excel and text. */
|
|
1201
|
-
declare const F0PdfViewer: WithDataTestIdReturnType<import("react").ForwardRefExoticComponent<F0DocumentViewerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
1202
|
-
Skeleton: typeof F0DocumentViewerSkeleton;
|
|
1203
|
-
}>;
|
|
1204
|
-
/** @deprecated Renamed to `F0DocumentViewerProps`. */
|
|
1205
|
-
type F0PdfViewerProps = F0DocumentViewerProps;
|
|
1206
|
-
/** @deprecated Renamed to `F0DocumentViewerToolbarPlacement`. */
|
|
1207
|
-
type F0PdfViewerToolbarPlacement = F0DocumentViewerToolbarPlacement;
|
|
1208
|
-
/** @deprecated Renamed to `F0DocumentViewerAction`. */
|
|
1209
|
-
type F0PdfViewerAction = F0DocumentViewerAction;
|
|
1210
|
-
//#endregion
|
|
1211
|
-
//#region src/elements/lib/localized.d.ts
|
|
1212
1296
|
/**
|
|
1213
|
-
*
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
1297
|
+
* Both axes are measures, so there is no aggregation: a scatter plots one
|
|
1298
|
+
* point per row rather than grouping rows into categories. `label` names the
|
|
1299
|
+
* column identifying each point, and `series` the optional column that splits
|
|
1300
|
+
* the points into colour groups.
|
|
1216
1301
|
*/
|
|
1217
|
-
interface
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
* Display label for the language picker. Defaults to the language name for
|
|
1222
|
-
* `locale` (via `Intl.DisplayNames`), so this is only needed to override it.
|
|
1223
|
-
*/
|
|
1302
|
+
interface ScatterComputation {
|
|
1303
|
+
datasetId: string;
|
|
1304
|
+
xAxis: string;
|
|
1305
|
+
yAxis: string;
|
|
1224
1306
|
label?: string;
|
|
1225
|
-
|
|
1226
|
-
|
|
1307
|
+
series?: string;
|
|
1308
|
+
limit?: number;
|
|
1227
1309
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1310
|
+
interface CollectionComputation {
|
|
1311
|
+
datasetId: string;
|
|
1312
|
+
sortBy?: string;
|
|
1313
|
+
sortOrder?: "asc" | "desc";
|
|
1314
|
+
limit?: number;
|
|
1315
|
+
}
|
|
1316
|
+
interface ChatDashboardFilterDefinition {
|
|
1317
|
+
type: "in";
|
|
1318
|
+
label: string;
|
|
1319
|
+
column: string;
|
|
1320
|
+
datasetId: string;
|
|
1321
|
+
}
|
|
1322
|
+
/** Granularity options exposed by F0's `OneDateNavigator`. */
|
|
1323
|
+
type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
1232
1324
|
/**
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
* descriptions and the described source together (each falls back to its first
|
|
1239
|
-
* entry for languages it doesn't provide). See `F0VideoPlayerProps.defaultLanguage`.
|
|
1240
|
-
*
|
|
1241
|
-
* `captions` are timed text shown over the video during playback (WCAG 2.1
|
|
1242
|
-
* SC 1.2.2, Captions). Pass either a WebVTT resource URL or a raw WebVTT string
|
|
1243
|
-
* (the player turns raw VTT into a blob track, so no CORS setup is needed); a
|
|
1244
|
-
* remote URL requires the video host to allow cross-origin reads. When omitted,
|
|
1245
|
-
* the player uses any caption/subtitle track embedded in the video file. A
|
|
1246
|
-
* captions toggle in the controls shows/hides them (a filled glyph when on, a
|
|
1247
|
-
* line glyph when off).
|
|
1248
|
-
*
|
|
1249
|
-
* Audio description (WCAG 2.1 SC 1.2.5) conveys on-screen visual information as
|
|
1250
|
-
* audio, complementary to captions — both are independent and can be on at
|
|
1251
|
-
* once. Provide it in one of two ways, toggled with the audio-description
|
|
1252
|
-
* control (a filled "AD" badge when on, a line badge when off):
|
|
1253
|
-
* - `describedSrc`: a pre-produced media rendition with description mixed into
|
|
1254
|
-
* the audio. Toggling swaps the source, preserving position and play state.
|
|
1255
|
-
* Highest quality; assumed the same length as `src`.
|
|
1256
|
-
* - `descriptions`: a WebVTT `kind="descriptions"` script (URL or raw VTT),
|
|
1257
|
-
* delivered at runtime — the video pauses on each cue so the description can
|
|
1258
|
-
* be spoken (extended audio description), then resumes. Used only when
|
|
1259
|
-
* `describedSrc` is absent.
|
|
1325
|
+
* Navigation filter definitions emitted by the LLM via `displayDashboard`.
|
|
1326
|
+
* Discriminated on `type`. Today the only supported variant is
|
|
1327
|
+
* `dateNavigation`, which renders F0's date navigator above the dashboard
|
|
1328
|
+
* grid. The `column` and `datasetId` are agent-side metadata used by the
|
|
1329
|
+
* compute SQL builder; they are stripped before reaching F0AnalyticsDashboard.
|
|
1260
1330
|
*/
|
|
1261
|
-
interface
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
|
|
1276
|
-
* Delivered at runtime with extended (pausing) audio description when no
|
|
1277
|
-
* `describedSrc` is provided. Localizable.
|
|
1278
|
-
*/
|
|
1279
|
-
descriptions?: Localized<string>;
|
|
1280
|
-
}
|
|
1281
|
-
interface F0VideoPlayerProps extends DataAttributes {
|
|
1282
|
-
/** Accessible name for this player region. Defaults to "Video player". */
|
|
1283
|
-
ariaLabel?: string;
|
|
1284
|
-
/**
|
|
1285
|
-
* Video source URL. Localizable — pass a per-locale list of dubbed renditions
|
|
1286
|
-
* to offer selectable audio languages; an "Audio" selector then appears,
|
|
1287
|
-
* independent of the subtitle/caption language.
|
|
1288
|
-
*/
|
|
1289
|
-
src: Localized<string>;
|
|
1290
|
-
/**
|
|
1291
|
-
* Initial language for localized content, matched against the provided
|
|
1292
|
-
* locales exactly or by primary subtag, then the viewer's browser language,
|
|
1293
|
-
* then the first provided. Applies to both the audio (`src`) and the text
|
|
1294
|
-
* (`content`) language selections. Only relevant when more than one language
|
|
1295
|
-
* is available.
|
|
1296
|
-
*/
|
|
1297
|
-
defaultLanguage?: string;
|
|
1298
|
-
/**
|
|
1299
|
-
* Image URL shown while the video loads and before playback starts (the
|
|
1300
|
-
* native `<video>` poster). Cleared by the browser once playback begins.
|
|
1301
|
-
*/
|
|
1302
|
-
poster?: string;
|
|
1303
|
-
/**
|
|
1304
|
-
* Marks the video as having no audio (video-only). Captions (WCAG 2.1
|
|
1305
|
-
* SC 1.2.2) don't apply to silent media, so this exempts the player from the
|
|
1306
|
-
* captions requirement — `data-video-captions` is set to `"no-audio"` instead
|
|
1307
|
-
* of `"missing"`. Note video-only content may still need a text/audio
|
|
1308
|
-
* alternative for its visual information (SC 1.2.1) — audio description still
|
|
1309
|
-
* works over a silent video (its description audio plays even though the video
|
|
1310
|
-
* itself is muted). Browsers can't reliably detect the absence of audio before
|
|
1311
|
-
* playback, so this is declared explicitly.
|
|
1312
|
-
* @default false
|
|
1313
|
-
*/
|
|
1314
|
-
silent?: boolean;
|
|
1315
|
-
/**
|
|
1316
|
-
* Structured content for the player. Currently carries `captions` (a WebVTT
|
|
1317
|
-
* URL or raw WebVTT string) shown over the video during playback and
|
|
1318
|
-
* toggled with the "CC" control. When `captions` is omitted, captions
|
|
1319
|
-
* embedded in the video file are used instead.
|
|
1320
|
-
*/
|
|
1321
|
-
content?: VideoPlayerContent;
|
|
1331
|
+
interface ChatDashboardNavigationFilterDefinition {
|
|
1332
|
+
type: "dateNavigation";
|
|
1333
|
+
label: string;
|
|
1334
|
+
column: string;
|
|
1335
|
+
datasetId: string;
|
|
1336
|
+
granularities: ChatDashboardDateNavigationGranularity[];
|
|
1337
|
+
defaultGranularity?: ChatDashboardDateNavigationGranularity;
|
|
1338
|
+
}
|
|
1339
|
+
interface ChatDashboardColumn {
|
|
1340
|
+
/** Column key — must match a key in each row object */
|
|
1341
|
+
id: string;
|
|
1342
|
+
/** Display header label */
|
|
1343
|
+
label: string;
|
|
1344
|
+
/** Optional fixed width in pixels */
|
|
1345
|
+
width?: number;
|
|
1322
1346
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* visible the whole time. Default `false`.
|
|
1347
|
+
* Optional header tooltip explaining what the column represents — formula
|
|
1348
|
+
* or aggregation if derived, source if direct. Forwarded to the underlying
|
|
1349
|
+
* table column's `info` prop. Omit when the label is self-explanatory.
|
|
1327
1350
|
*/
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1351
|
+
info?: string;
|
|
1352
|
+
}
|
|
1353
|
+
interface ChatDashboardItemBase {
|
|
1354
|
+
id: string;
|
|
1355
|
+
title: string;
|
|
1356
|
+
description?: string;
|
|
1357
|
+
/** Source attribution shown as a subtitle (e.g. "Based on 8 feedbacks from 3 evaluators") */
|
|
1358
|
+
sourceDescription?: string;
|
|
1333
1359
|
/**
|
|
1334
|
-
* Optional
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1360
|
+
* Optional markdown explanation of how this item's data was calculated.
|
|
1361
|
+
* Surfaced via the per-item dropdown's "Where does this data come from?"
|
|
1362
|
+
* entry, which opens a dialog rendering the markdown. Omit to hide the
|
|
1363
|
+
* entry — backwards compatible with persisted dashboards.
|
|
1337
1364
|
*/
|
|
1338
|
-
|
|
1339
|
-
label: string;
|
|
1340
|
-
onClick: () => void;
|
|
1341
|
-
};
|
|
1365
|
+
explanation?: string;
|
|
1342
1366
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
*
|
|
1367
|
+
* @deprecated Ignored by the renderer — items auto-size to equal-width
|
|
1368
|
+
* slots based on the per-row slot budget. Kept for backwards compatibility
|
|
1369
|
+
* with persisted layouts; safe to leave unset.
|
|
1345
1370
|
*/
|
|
1346
|
-
|
|
1347
|
-
/** Called on play, on pause and on a recurring heartbeat during playback. */
|
|
1348
|
-
onTrackAction?: () => void;
|
|
1371
|
+
colSpan?: number;
|
|
1349
1372
|
/**
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1373
|
+
* @deprecated Use `itemHeight` (pixels) instead. Kept for backwards
|
|
1374
|
+
* compatibility with persisted layouts: when `itemHeight` is unset, the
|
|
1375
|
+
* grid still reads `rowSpan * 48` as a fallback.
|
|
1352
1376
|
*/
|
|
1353
|
-
|
|
1377
|
+
rowSpan?: number;
|
|
1354
1378
|
/**
|
|
1355
|
-
*
|
|
1356
|
-
*
|
|
1379
|
+
* Item height in pixels. Takes precedence over `rowSpan` when set. The
|
|
1380
|
+
* row height in the grid is `max(itemHeight)` across all items in the row.
|
|
1381
|
+
* Persisted resizes write a pixel-accurate value here; agent-generated
|
|
1382
|
+
* dashboards should pick from a constrained set of values that match the
|
|
1383
|
+
* data shape (more rows / more categories → taller).
|
|
1357
1384
|
*/
|
|
1358
|
-
|
|
1385
|
+
itemHeight?: number;
|
|
1386
|
+
x?: number;
|
|
1387
|
+
y?: number;
|
|
1359
1388
|
}
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
* @experimental This is an experimental component, use it at your own risk.
|
|
1379
|
-
*
|
|
1380
|
-
* Video player built on a native `<video>` element with f0-styled controls
|
|
1381
|
-
* (play/pause, seekbar, volume, playback speed, fullscreen) plus keyboard
|
|
1382
|
-
* shortcuts. Analytics, watch-% milestones, completion and forward-seek
|
|
1383
|
-
* restriction are built in and enabled via props (`onTrackAction`,
|
|
1384
|
-
* `onMilestone`, `onComplete`, `restrictForwardSeek`).
|
|
1385
|
-
*/
|
|
1386
|
-
declare const F0VideoPlayer: WithDataTestIdReturnType<typeof F0VideoPlayerInternal>;
|
|
1387
|
-
//#endregion
|
|
1388
|
-
//#region src/elements/primitives/_primitives/F0Attachments/types.d.ts
|
|
1389
|
-
type AttachmentDocumentKind = F0DocumentKind;
|
|
1390
|
-
//#endregion
|
|
1391
|
-
//#region src/addons/ai/ai/F0AiFileAttachments/types.d.ts
|
|
1389
|
+
interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
1390
|
+
type: "chart";
|
|
1391
|
+
chart: ChatDashboardChartConfig;
|
|
1392
|
+
computation: ChartComputation | RadarComputation | PieComputation | GaugeComputation | HeatmapComputation | ScatterComputation;
|
|
1393
|
+
}
|
|
1394
|
+
interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
1395
|
+
type: "metric";
|
|
1396
|
+
format?: ChatDashboardMetricFormat;
|
|
1397
|
+
decimals?: number;
|
|
1398
|
+
computation: MetricComputation;
|
|
1399
|
+
}
|
|
1400
|
+
interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
1401
|
+
type: "collection";
|
|
1402
|
+
columns: ChatDashboardColumn[];
|
|
1403
|
+
computation: CollectionComputation;
|
|
1404
|
+
}
|
|
1405
|
+
type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
1392
1406
|
/**
|
|
1393
|
-
*
|
|
1394
|
-
*
|
|
1395
|
-
*
|
|
1407
|
+
* Complete dashboard configuration received via `displayDashboard`.
|
|
1408
|
+
* Contains fetchSpecs that describe how to obtain data server-side —
|
|
1409
|
+
* no raw data is included. Fully JSON-serializable.
|
|
1396
1410
|
*/
|
|
1397
|
-
interface
|
|
1398
|
-
|
|
1399
|
-
|
|
1411
|
+
interface ChatDashboardConfig {
|
|
1412
|
+
/** Dashboard title displayed in the canvas header and chat report card */
|
|
1413
|
+
title: string;
|
|
1400
1414
|
/**
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1415
|
+
* AI-generated 1–2 sentence summary of what the dashboard shows. Displayed
|
|
1416
|
+
* under the title in the canvas header. Optional at the type level so
|
|
1417
|
+
* legacy persisted dashboards (before the agent started emitting it) still
|
|
1418
|
+
* parse; the agent schema makes it required going forward.
|
|
1403
1419
|
*/
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
|
|
1420
|
+
description?: string;
|
|
1421
|
+
/** Filter definitions — keys become filter IDs */
|
|
1422
|
+
filters?: Record<string, ChatDashboardFilterDefinition>;
|
|
1407
1423
|
/**
|
|
1408
|
-
*
|
|
1409
|
-
*
|
|
1424
|
+
* Dashboard-level navigation filters (e.g. date navigator). Keys become
|
|
1425
|
+
* filter IDs. Rendered above the grid by F0AnalyticsDashboard's
|
|
1426
|
+
* `navigationFilters` slot.
|
|
1410
1427
|
*/
|
|
1411
|
-
|
|
1412
|
-
/**
|
|
1413
|
-
|
|
1414
|
-
/**
|
|
1415
|
-
|
|
1416
|
-
height?: number;
|
|
1428
|
+
navigationFilters?: Record<string, ChatDashboardNavigationFilterDefinition>;
|
|
1429
|
+
/** Ordered list of dashboard items with computation specs */
|
|
1430
|
+
items: ChatDashboardItem[];
|
|
1431
|
+
/** Fetch specs for server-side data retrieval, keyed by datasetId */
|
|
1432
|
+
fetchSpecs: Record<string, DashboardFetchSpec>;
|
|
1417
1433
|
}
|
|
1418
1434
|
/**
|
|
1419
|
-
*
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1422
|
-
* downloads them.
|
|
1423
|
-
*/
|
|
1424
|
-
type AiChatFileKind = "image" | "video" | "audio" | "document" | "file";
|
|
1425
|
-
/**
|
|
1426
|
-
* Makes a file URL loadable by the browser. Needed when files sit behind
|
|
1427
|
-
* authentication headers that `<img>`, video and the PDF reader can't send.
|
|
1428
|
-
*
|
|
1429
|
-
* - Return a `Blob`: F0 creates the object URL, shares it between the card,
|
|
1430
|
-
* the lightbox and the download, and revokes it when nothing uses it.
|
|
1431
|
-
* - Return a string: used as is (for example a signed URL).
|
|
1432
|
-
* - Return null or undefined: the original URL is used.
|
|
1435
|
+
* Creator + last-edited metadata for a saved dashboard. Returned by
|
|
1436
|
+
* `DashboardCanvasActions.getMetadata` so the header can render the author
|
|
1437
|
+
* avatar and the freshness signal only once a dashboard has been persisted.
|
|
1433
1438
|
*
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1436
|
-
*
|
|
1439
|
+
* `title` and `description` are also returned: once a dashboard has an id
|
|
1440
|
+
* the backend is the source of truth and may diverge from what's stored in
|
|
1441
|
+
* the chat history (e.g. someone renamed the dashboard from the Analytics
|
|
1442
|
+
* list page since this conversation was first opened). The header prefers
|
|
1443
|
+
* these values over the ones baked into `content` / `config`.
|
|
1437
1444
|
*/
|
|
1438
|
-
|
|
1439
|
-
signal: AbortSignal;
|
|
1440
|
-
}) => Promise<string | Blob | null | undefined> | string | Blob | null | undefined;
|
|
1441
|
-
interface AiChatFilePreviewConfig {
|
|
1445
|
+
interface DashboardMetadata {
|
|
1442
1446
|
/**
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
1447
|
+
* Latest persisted title. When present, the header displays this instead
|
|
1448
|
+
* of `content.title` so the chat-history snapshot never shadows the
|
|
1449
|
+
* authoritative backend copy.
|
|
1446
1450
|
*/
|
|
1447
|
-
|
|
1451
|
+
title?: string;
|
|
1448
1452
|
/**
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
* @default false
|
|
1453
|
+
* Latest persisted description. Same rationale as `title` — takes
|
|
1454
|
+
* precedence over `config.description` once the dashboard is saved.
|
|
1452
1455
|
*/
|
|
1453
|
-
|
|
1456
|
+
description?: string;
|
|
1457
|
+
creator: {
|
|
1458
|
+
firstName: string;
|
|
1459
|
+
lastName: string;
|
|
1460
|
+
/** Optional avatar image URL. Falls back to initials when omitted. */
|
|
1461
|
+
src?: string;
|
|
1462
|
+
};
|
|
1454
1463
|
/**
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1457
|
-
* an opaque-origin srcdoc frame inside this tab.
|
|
1464
|
+
* Last edited timestamp. Accepts `Date` or an ISO-8601 string so host apps
|
|
1465
|
+
* can forward backend payloads verbatim without pre-parsing.
|
|
1458
1466
|
*/
|
|
1459
|
-
|
|
1467
|
+
lastEdited: Date | string;
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* Callbacks for persisting dashboards externally (beyond chat history).
|
|
1471
|
+
*/
|
|
1472
|
+
interface DashboardCanvasActions {
|
|
1473
|
+
/** Update an existing saved dashboard */
|
|
1474
|
+
save: (id: string, category: string, config: ChatDashboardConfig) => Promise<void>;
|
|
1460
1475
|
/**
|
|
1461
|
-
*
|
|
1462
|
-
*
|
|
1463
|
-
*
|
|
1476
|
+
* Create a new saved dashboard. Returns the new dashboard's id and
|
|
1477
|
+
* category so subsequent edits can call `save` (which requires both).
|
|
1478
|
+
* Returning void / undefined leaves the canvas in its current state.
|
|
1464
1479
|
*/
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
path: string;
|
|
1478
|
-
url?: string;
|
|
1479
|
-
};
|
|
1480
|
+
create: (title: string, description: string, config: ChatDashboardConfig, category?: string) => Promise<{
|
|
1481
|
+
id: string;
|
|
1482
|
+
category: string;
|
|
1483
|
+
} | void>;
|
|
1484
|
+
/**
|
|
1485
|
+
* Fetch creator + last-edited metadata for a saved dashboard. The header
|
|
1486
|
+
* calls this lazily, only when the current dashboard has a
|
|
1487
|
+
* `savedDashboardId`. Returning `void` signals "no metadata available" —
|
|
1488
|
+
* the header will skip rendering the avatar and the last-edited row
|
|
1489
|
+
* instead of showing a placeholder.
|
|
1490
|
+
*/
|
|
1491
|
+
getMetadata?: (id: string) => Promise<DashboardMetadata | void>;
|
|
1480
1492
|
}
|
|
1481
1493
|
//#endregion
|
|
1482
1494
|
//#region src/elements/avatars/F0Avatar/F0Avatar.d.ts
|
|
@@ -5482,4 +5494,4 @@ declare function useI18n(): TranslationsType & {
|
|
|
5482
5494
|
};
|
|
5483
5495
|
declare const buildTranslations: (translations: TranslationsType) => TranslationsType;
|
|
5484
5496
|
//#endregion
|
|
5485
|
-
export { AiChatCredits as $,
|
|
5497
|
+
export { AiChatCredits as $, F0AvatarTeam as $i, F0Button as $n, CollectionComputation as $r, F0TagTeam as $t, Weekdays as A, WithDataTestIdProps as Aa, F0DocumentHtmlExecution as Ai, AvatarListSize as An, CanvasContent as Ar, CustomEntityRefCard as At, RenderableTurn as B, F0AvatarModuleProps as Bi, F0Link as Bn, ChatDashboardDateNavigationGranularity as Br, cardImageAspectRatios as Bt, FileItemSize as C, Props$2 as Ca, VideoPlayerContent as Ci, TooltipProps as Cn, F0PersonCardProps as Cr, WelcomeScreenSuggestionItem as Ct, TagCounterItem as D, F0IconProps as Da, F0PdfViewerAction as Di, ChartColorToken as Dn, AutofillTimesheetShift as Dr, SidePanelContextValue as Dt, TagCounter as E, F0Icon as Ea, F0PdfViewer as Ei, HourDistributionDataPoint as En, AutofillTimesheetCanvasContent as Er, SidePanelContent as Et, F0AiMessagesContainerProps as F, F0DocumentViewerToolbarPlacement as Fi, CardAvatarVariant as Fn, ChatDashboardChartConfig as Fr, F0Card as Ft, F0AiChatProps as G, ColorListAvatarVariant as Gi, DropdownItemLabel as Gn, ChatDashboardItem as Gr, CardAlertVariant as Gt, MarkdownTagRenderers as H, AvatarVariant$1 as Hi, DropdownContentVariant as Hn, ChatDashboardFunnelChartConfig as Hr, cardImageSizes as Ht, WelcomeScreenCta as I, F0PdfScale as Ii, AlertAvatarProps as In, ChatDashboardChartItem as Ir, F0CardProps as It, AiChatComposerActionItem as J, FlagAvatarVariant as Ji, DropdownItemSeparator as Jn, ChatDashboardMetricItem as Jr, ValueDisplayRendererDefinition as Jt, F0AiChatProvider as K, CompanyAvatarVariant as Ki, DropdownItemObject as Kn, ChatDashboardLineChartConfig as Kr, CardMetadata as Kt, FeedbackConfig as L, pdfScales as Li, F0AvatarAlert as Ln, ChatDashboardCollectionItem as Lr, CardImageAspectRatio as Lt, useAiChatTranslations as M, WithDataTestIdReturnType as Ma, F0DocumentKind as Mi, F0TagAlert as Mn, CanvasEntityDefinition as Mr, EntityRefs as Mt, useAiChat as N, withDataTestId as Na, F0DocumentViewerAction as Ni, Level as Nn, ChartComputation as Nr, EntityResolvers as Nt, F0TagRaw as O, IconType as Oa, F0PdfViewerProps as Oi, chartColorTokens as On, BulkResolveInconsistenciesCanvasContent as Or, SidePanelLayout as Ot, F0AiMessagesContainer as P, F0DocumentViewerProps as Pi, Props$1 as Pn, ChatDashboardBarChartConfig as Pr, EntityUrlBuilders as Pt, AiChatCreditWarning as Q, avatarVariants as Qi, LinkContextValue as Qn, ChatDashboardScatterChartConfig as Qr, TagVariant as Qt, UserReaction as R, DataAttributes as Ri, alertAvatarTypes as Rn, ChatDashboardColumn as Rr, CardImageFit as Rt, FileItemProps as S, NewColor as Sa, F0VideoPlayerProps as Si, TooltipGroupProps as Sn, F0PersonCardAction as Sr, WelcomeScreenSuggestion as St, F0TagList as T, DistributiveOmit as Ta, F0DocumentViewer as Ti, HourDistributionCellValue as Tn, AggregationType as Tr, aiTranslations as Tt, markdownRenderers as U, AvatarVariants as Ui, DropdownInternalProps as Un, ChatDashboardGaugeChartConfig as Ur, CardAlertAction as Ut, ThinkingProps as V, AvatarAction as Vi, F0LinkProps as Vn, ChatDashboardFilterDefinition as Vr, cardImageFits as Vt, F0AiChat as W, ColorAvatarVariant as Wi, DropdownItem as Wn, ChatDashboardHeatmapChartConfig as Wr, CardAlertProps as Wt, AiChatComposerActionSubmenu as X, PersonAvatarVariant as Xi, DropdownItemSwitch as Xn, ChatDashboardPieChartConfig as Xr, TagType as Xt, AiChatComposerActionSeparator as Y, IconAvatarVariant as Yi, DropdownItemSubmenu as Yn, ChatDashboardNavigationFilterDefinition as Yr, F0TagListProps as Yt, AiChatComposerActionToggle as Z, TeamAvatarVariant as Zi, NavigationItem as Zn, ChatDashboardRadarChartConfig as Zr, Tag as Zt, F0FileItem as _, BaseAvatarProps as _a, AiChatFilePreviewConfig as _i, F0ProgressSeriesSize as _n, Variant as _r, PendingContext as _t, F0CardHorizontal as a, F0AvatarFile as aa, DataDownloadDataset as ai, F0TagCompanyProps as an, EmojiImage as ar, AiChatTrackingOptions as at, FileAction as b, ModuleId as ba, AttachmentDocumentKind as bi, Tooltip as bn, PersonProfile as br, UploadedFile as bt, MobileDropdown as c, F0AvatarEmoji as ca, FormatPreset as ci, F0TagBalanceProps as cn, getEmojiLabel as cr, AiChatUsageLimits as ct, useFormCardValueFormatter as d, F0AvatarCompanyProps as da, MetricComputation as di, RelaxedNumericWithFormatter as dn, ExpenseProfile as dr, AppendToolCall as dt, F0AvatarTeamProps as ea, DashboardCanvasActions as ei, F0TagTeamProps as en, F0ButtonProps as er, AiChatDisclaimer as et, useSetFormCardValueFormatter as f, F0AvatarColorList as fa, PieComputation as fi, F0ProgressSeries as fn, VacancyProfile as fr, CreditsUsage as ft, F0FileAction as g, AvatarBadge as ga, AiChatFileKind as gi, F0ProgressSeriesProps as gn, StatusVariant as gr, F0ToolCall as gt, DetailsItemType as h, F0AvatarColorProps as ha, AiChatFile as hi, F0ProgressSeriesOptions as hn, F0TagStatusProps as hr, F0Message as ht, useI18n as i, CountryCode as ia, DataDownloadCanvasContent as ii, F0TagCompany as in, buttonVariants as ir, AiChatProviderProps as it, AiChatTranslationsProvider as j, WithDataTestIdPropsOf as ja, F0DocumentHtmlSandbox as ji, F0AvatarListProps as jn, CanvasContentBase as jr, CustomEntityRefConfig as jt, F0TagDot as k, DataTestIdWrapper as ka, F0PdfViewerToolbarPlacement as ki, BarSeriesStyle as kn, CanvasActions as kr, SidePanelViewDefinition as kt, FormCardValueFormatterEntry as l, F0AvatarEmojiProps as la, GaugeComputation as li, Numeric as ln, useEmojiConfetti as lr, AiChatUsageLimitsSection as lt, DetailsItemContent as m, F0AvatarColor as ma, ScatterComputation as mi, F0ProgressSeriesColor as mn, F0TagStatus as mr, F0AiChatWelcomeCard as mt, I18nProviderProps as n, F0AvatarIcon as na, DashboardFetchSpec as ni, F0TagPerson as nn, ButtonVariant as nr, AiChatFileAttachmentConfig as nt, F0CardHorizontalProps as o, F0AvatarFileProps as oa, FileCanvasContent as oi, F0TagBalance as on, EmojiImageProps as or, AiChatTranslations as ot, DetailsItem as p, F0AvatarColorListProps as pa, RadarComputation as pi, F0ProgressSeriesBar as pn, RequisitionProfile as pr, F0AIMessage as pt, AiChatComposerAction as q, FileAvatarVariant as qi, DropdownItemPanel as qn, ChatDashboardMetricFormat as qr, cardAlertVariants as qt, buildTranslations as r, F0AvatarIconProps as ra, DashboardMetadata as ri, F0TagPersonProps as rn, buttonSizes as rr, AiChatMode as rt, Dropdown as s, FileDef as sa, FormCanvasContent as si, BalanceStatus as sn, EmojiRenderMode as sr, AiChatTranslationsProviderProps as st, I18nProvider as t, F0AvatarPersonProps as ta, DashboardCanvasContent as ti, F0TagRawProps as tn, ButtonSize as tr, AiChatEmployeeCredits as tt, FormCardValueFormatterProvider as u, BaseAvatar as ua, HeatmapComputation as ui, NumericWithFormatter as un, ActionButtonVariant as ur, AppendMessage as ut, F0FileItemProps as v, Badge as va, AiChatFileUrlResolver as vi, f0ProgressSeriesColors as vn, JobPostingProfile as vr, PendingQuote as vt, f0FileItemSizes as w, tagDotColors as wa, Localized as wi, Shortcut as wn, F0Avatar as wr, WelcomeSuggestionClickEvent as wt, FileItem as x, modules as xa, F0VideoPlayer as xi, TooltipGroup as xn, F0PersonCard as xr, VisualizationMode as xt, F0FileItemSize as y, BadgeProps as ya, AiChatShowFilesItem as yi, f0ProgressSeriesSizes as yn, CandidateProfile as yr, TranscribeFn as yt, useToolCallId as z, F0AvatarModule as zi, CardSecondaryAction as zn, ChatDashboardConfig as zr, CardImageSize as zt };
|