@epam/ai-dial-chat-hooks 1.2.0-dev.20 → 1.2.0-dev.28
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/catalog/map-deployment-to-catalog-item.js +2 -2
- package/catalog.d.ts +2 -1
- package/conversation/useConversationStream/useConversationStream.js +5 -1
- package/conversation-overlay.d.ts +7 -0
- package/conversation-overlay.js +2 -0
- package/conversation.d.ts +0 -4
- package/conversation.js +22 -23
- package/file-manager-canvas.d.ts +370 -0
- package/file-manager-canvas.js +2 -0
- package/file-manager.d.ts +0 -327
- package/file-manager.js +14 -15
- package/files/attachment-canvas.js +29 -1
- package/index.d.ts +40 -1
- package/index.js +31 -31
- package/package.json +26 -16
package/file-manager.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Annotation } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
import { AnnotationGroup } from '@epam/ai-dial-quotations';
|
|
3
2
|
import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
|
|
4
3
|
import { Attachment } from '@epam/ai-dial-chat-shared';
|
|
5
4
|
import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
|
|
@@ -8,8 +7,6 @@ import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
|
8
7
|
import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
|
|
9
8
|
import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
|
|
10
9
|
import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
11
|
-
import { CustomVisualizer } from '@epam/ai-dial-chat-shared';
|
|
12
|
-
import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
|
|
13
10
|
import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
14
11
|
import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
|
|
15
12
|
import { DialCopiedItem } from '@epam/ai-dial-react-file-manager';
|
|
@@ -35,7 +32,6 @@ import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
|
35
32
|
import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
|
|
36
33
|
import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
|
|
37
34
|
import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
|
|
38
|
-
import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
|
|
39
35
|
import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
|
|
40
36
|
import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
41
37
|
import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
|
|
@@ -58,55 +54,6 @@ import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
|
|
|
58
54
|
/** Maps an annotation's source attachment to the display-only attachment model. */
|
|
59
55
|
export declare const annotationToDisplayAttachment: (annotation: Annotation) => DisplayAttachment | null;
|
|
60
56
|
|
|
61
|
-
/**
|
|
62
|
-
* Builds an `OoxmlCanvasContent` for a DOCX/PPTX/XLSX citation annotation,
|
|
63
|
-
* including highlights for every annotation sharing the clicked one's source
|
|
64
|
-
* document. Returns `null` when the annotation has no source attachment,
|
|
65
|
-
* the source is not a format `@silurus/ooxml` renders as DOCX/XLSX/PPTX (a
|
|
66
|
-
* CSV source returns `null` — citation highlighting targets Office documents
|
|
67
|
-
* only), or no URL resolves.
|
|
68
|
-
*/
|
|
69
|
-
export declare const annotationToOoxmlCanvasContent: (annotation: Annotation, annotations: Annotation[], resolvers: AttachmentCanvasUrlResolvers) => OoxmlCanvasContent | null;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Builds a `PdfCanvasContent` for a PDF citation annotation, including highlights
|
|
73
|
-
* for the clicked annotation's document within its citation group.
|
|
74
|
-
* Returns `null` if the annotation has no PDF source attachment.
|
|
75
|
-
*/
|
|
76
|
-
export declare const annotationToPdfCanvasContent: (annotation: Annotation, groups: AnnotationGroup[], resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* DIAL-file URL resolution injected by the host into every attachment-canvas
|
|
80
|
-
* content resolver below. Host-owned — encodes the app's own
|
|
81
|
-
* file-download endpoint.
|
|
82
|
-
*/
|
|
83
|
-
export declare interface AttachmentCanvasUrlResolvers {
|
|
84
|
-
/** Resolves a DIAL Core file id to a downloadable URL. */
|
|
85
|
-
resolveDialFileDownloadUrl: (fileId: string) => string | undefined;
|
|
86
|
-
/** Resolves the best downloadable DIAL-file URL from an attachment's `url` or `referenceUrl`. */
|
|
87
|
-
resolveDialUrl: (attachment: DisplayAttachment) => string | undefined;
|
|
88
|
-
/** Resolves a DIAL Core file id to a fetchable metadata URL (used for cache-freshness validation). */
|
|
89
|
-
resolveDialFileMetadataUrl: (fileId: string) => string | undefined;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** The type of content the canvas can display. */
|
|
93
|
-
declare enum AttachmentContentType {
|
|
94
|
-
PlainText = 'plain_text',
|
|
95
|
-
Image = 'image',
|
|
96
|
-
Audio = 'audio',
|
|
97
|
-
Markdown = 'markdown',
|
|
98
|
-
MarkdownTable = 'markdown_table',
|
|
99
|
-
Json = 'json',
|
|
100
|
-
Pdf = 'pdf',
|
|
101
|
-
Ooxml = 'ooxml',
|
|
102
|
-
Code = 'code',
|
|
103
|
-
Html = 'html',
|
|
104
|
-
Visualizer = 'visualizer',
|
|
105
|
-
McpApp = 'mcp_app',
|
|
106
|
-
Unsupported = 'unsupported',
|
|
107
|
-
Error = 'error',
|
|
108
|
-
}
|
|
109
|
-
|
|
110
57
|
/** Maps Chat API attachment DTOs to display-only attachment models. */
|
|
111
58
|
export declare const attachmentDtosToDisplayAttachments: (dtos: MessageAttachment[] | undefined, resolvers: AttachmentDisplayResolvers) => DisplayAttachment[];
|
|
112
59
|
|
|
@@ -115,14 +62,6 @@ export declare const attachmentDtosToDisplayAttachments: (dtos: MessageAttachmen
|
|
|
115
62
|
*/
|
|
116
63
|
export declare const attachmentDtoToDisplayAttachment: (dto: MessageAttachment, resolvers: AttachmentDisplayResolvers) => DisplayAttachment;
|
|
117
64
|
|
|
118
|
-
/** The kind of failure that produced an `ErrorCanvasContent`. */
|
|
119
|
-
declare enum AttachmentErrorType {
|
|
120
|
-
/** The file failed to load (network error or a non-`403` non-OK response). */
|
|
121
|
-
LoadFailed = 'load_failed',
|
|
122
|
-
/** The file request failed with HTTP `403` — the user lacks permission to access it. */
|
|
123
|
-
Forbidden = 'forbidden',
|
|
124
|
-
}
|
|
125
|
-
|
|
126
65
|
export declare const buildFromCache: (cache: Map<string, ListFilesItemDto[]>, listingPermissionsCache: Map<string, string[] | undefined>, apiPath: string, virtualBasePath: string, folderId: string) => DialFile[];
|
|
127
66
|
|
|
128
67
|
/**
|
|
@@ -136,19 +75,6 @@ export declare const buildFromCache: (cache: Map<string, ListFilesItemDto[]>, li
|
|
|
136
75
|
*/
|
|
137
76
|
export declare const buildSharedItemVirtualPath: (relativePath: string, rootLabel: string, isFolder: boolean) => string;
|
|
138
77
|
|
|
139
|
-
/** Clears all cached fetch results. Call this when leaving a conversation. */
|
|
140
|
-
export declare const clearAttachmentCache: () => void;
|
|
141
|
-
|
|
142
|
-
/** Content payload for syntax-highlighted source-code or text file attachments. */
|
|
143
|
-
declare interface CodeCanvasContent {
|
|
144
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
145
|
-
type: AttachmentContentType.Code;
|
|
146
|
-
/** The raw source text to display. */
|
|
147
|
-
text: string;
|
|
148
|
-
/** `react-syntax-highlighter` language identifier (e.g. `'typescript'`). `undefined` renders plain monospace. */
|
|
149
|
-
language?: string;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
78
|
export declare const COLUMNS_WITH_AUTHOR: FileManagerColumnKey[];
|
|
153
79
|
|
|
154
80
|
export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
|
|
@@ -335,18 +261,6 @@ export declare enum DownloadDestinationType {
|
|
|
335
261
|
Cancelled = "cancelled"
|
|
336
262
|
}
|
|
337
263
|
|
|
338
|
-
/** Content payload for attachments whose file failed to load or that the user cannot access. */
|
|
339
|
-
declare interface ErrorCanvasContent {
|
|
340
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
341
|
-
type: AttachmentContentType.Error;
|
|
342
|
-
/** The kind of failure that occurred. */
|
|
343
|
-
errorType: AttachmentErrorType;
|
|
344
|
-
/** Remote URL of the file, if known. Ignored for download purposes when `errorType` is `Forbidden`. */
|
|
345
|
-
url?: string;
|
|
346
|
-
/** Overrides the default `loadErrorLabel`/`forbiddenErrorLabel` message, for callers whose failed content isn't a generic "file" (e.g. an MCP App). */
|
|
347
|
-
label?: string;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
264
|
export declare const fetchByTab: (filesApi: DialFilesApi, tab: DialFileManagerTabs, bucket: string, folderPath: string, sharedRootMeta: Map<string, SharedRootMeta>) => Promise<{
|
|
351
265
|
items: ListFilesItemDto[];
|
|
352
266
|
permissions?: string[];
|
|
@@ -570,36 +484,10 @@ export declare const getUrlFileName: (url: string) => string;
|
|
|
570
484
|
|
|
571
485
|
export declare const getVirtualPathName: (virtualPath: string, fallback: string) => string;
|
|
572
486
|
|
|
573
|
-
/**
|
|
574
|
-
* Whether the attachment carries text `resolveAttachmentText` can resolve —
|
|
575
|
-
* inline data, a DIAL download URL, or a locally-picked file. Mirrors that
|
|
576
|
-
* function's source list, so a `null` resolver result can be read as "the text
|
|
577
|
-
* was fetched and rejected" rather than "there was no text to fetch".
|
|
578
|
-
*/
|
|
579
|
-
export declare const hasAttachmentTextSource: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => boolean;
|
|
580
|
-
|
|
581
487
|
export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
|
|
582
488
|
|
|
583
489
|
export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
|
|
584
490
|
|
|
585
|
-
/** Content payload for HTML file attachments or external HTML URL sources. */
|
|
586
|
-
declare interface HtmlCanvasContent {
|
|
587
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
588
|
-
type: AttachmentContentType.Html;
|
|
589
|
-
/** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Used for file attachments. */
|
|
590
|
-
srcdoc?: string;
|
|
591
|
-
/** External URL rendered via `src` in a sandboxed iframe. Used for external link sources. */
|
|
592
|
-
url?: string;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/** Content payload for image attachments. */
|
|
596
|
-
declare interface ImageCanvasContent {
|
|
597
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
598
|
-
type: AttachmentContentType.Image;
|
|
599
|
-
/** URL of the image to display (object URL or resolved download URL). */
|
|
600
|
-
url: string;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
491
|
/** Copy/Move/Duplicate are Browse/Full-only — the attach picker excludes them. */
|
|
604
492
|
export declare const isCopyMoveDuplicateAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
|
|
605
493
|
|
|
@@ -615,14 +503,6 @@ export declare const isExternalSourcePreviewable: (contentType: string, url: str
|
|
|
615
503
|
/** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
|
|
616
504
|
export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
|
|
617
505
|
|
|
618
|
-
/** Content payload for JSON file attachments. */
|
|
619
|
-
declare interface JsonCanvasContent {
|
|
620
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
621
|
-
type: AttachmentContentType.Json;
|
|
622
|
-
/** Already-parsed JSON value. The lib never calls JSON.parse. */
|
|
623
|
-
value: unknown;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
506
|
export declare const mapCorePermissions: (permissions?: string[]) => DialFile["permissions"] | undefined;
|
|
627
507
|
|
|
628
508
|
/**
|
|
@@ -636,14 +516,6 @@ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseD
|
|
|
636
516
|
|
|
637
517
|
export declare const mapSearchItem: (item: ListFilesItemDto, fallbackBucket: string, rootLabel: string) => DialFile;
|
|
638
518
|
|
|
639
|
-
/** Content payload for Markdown file attachments. */
|
|
640
|
-
declare interface MarkdownCanvasContent {
|
|
641
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
642
|
-
type: AttachmentContentType.Markdown;
|
|
643
|
-
/** Raw Markdown string to render. */
|
|
644
|
-
text: string;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
519
|
export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
|
|
648
520
|
|
|
649
521
|
/** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
|
|
@@ -661,104 +533,6 @@ export declare const mimeTypesToFileAccept: (types?: string[]) => string | undef
|
|
|
661
533
|
|
|
662
534
|
export declare const normalizeVirtualPath: (value: string) => string;
|
|
663
535
|
|
|
664
|
-
/** Content payload for OOXML document and CSV spreadsheet attachments. */
|
|
665
|
-
declare interface OoxmlCanvasContent {
|
|
666
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
667
|
-
type: AttachmentContentType.Ooxml;
|
|
668
|
-
/** Resolved download URL or object URL for the source file. */
|
|
669
|
-
url: string;
|
|
670
|
-
/** The document format used to select and configure the format-specific renderer. */
|
|
671
|
-
format: OoxmlFileType;
|
|
672
|
-
/** Cited locations to draw over the document. Omitted, never `[]`, when there is nothing to highlight. */
|
|
673
|
-
highlights?: OoxmlHighlight[];
|
|
674
|
-
/** Id of the highlight to navigate to and emphasise. Omitted when the clicked citation resolved to no location. */
|
|
675
|
-
selectedHighlightId?: string;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
/** A 1-based cell address, matching `@silurus/ooxml`'s own `CellAddress`. */
|
|
679
|
-
declare interface OoxmlCellAddress {
|
|
680
|
-
/** 1-based row number. */
|
|
681
|
-
row: number;
|
|
682
|
-
/** 1-based column number. */
|
|
683
|
-
col: number;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
/** A cited character range inside a DOCX story, addressed by story name and source-tree path. */
|
|
687
|
-
declare interface OoxmlDocxHighlightLocation {
|
|
688
|
-
/** Discriminates this location within `OoxmlHighlightLocation`. */
|
|
689
|
-
kind: OoxmlHighlightKind.DocxTextRange;
|
|
690
|
-
/** Name of the DOCX story the range lives in, as an opaque string (only `'body'` is confirmed upstream). */
|
|
691
|
-
story: string;
|
|
692
|
-
/** Source-tree element indices identifying the paragraph, matched element-wise. */
|
|
693
|
-
path: number[];
|
|
694
|
-
/** Inclusive start character offset within the story's matched text. */
|
|
695
|
-
start: number;
|
|
696
|
-
/** Exclusive end character offset, already converted from the wire's inclusive `end`. */
|
|
697
|
-
endExclusive: number;
|
|
698
|
-
/** The cited text, compared against the text resolved over `[start, endExclusive)`. */
|
|
699
|
-
text: string;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/** Supported document formats rendered by the installed `@silurus/ooxml` runtime. */
|
|
703
|
-
declare enum OoxmlFileType {
|
|
704
|
-
Docx = 'docx',
|
|
705
|
-
Xlsx = 'xlsx',
|
|
706
|
-
Pptx = 'pptx',
|
|
707
|
-
Csv = 'csv',
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
/** One citation's highlight: the locations it resolved to, under a stable id. */
|
|
711
|
-
declare interface OoxmlHighlight {
|
|
712
|
-
/** Stable id, used to mark exactly one highlight selected. */
|
|
713
|
-
id: string;
|
|
714
|
-
/** One or more locations — a single citation may carry several selectors. */
|
|
715
|
-
locations: OoxmlHighlightLocation[];
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
/** Discriminates the Office highlight location descriptors an `OoxmlCanvasContent` can carry. */
|
|
719
|
-
declare enum OoxmlHighlightKind {
|
|
720
|
-
/** A character range inside a DOCX story, addressed by story name and source-tree path. */
|
|
721
|
-
DocxTextRange = 'docxTextRange',
|
|
722
|
-
/** A character range inside a single PPTX shape on one slide. */
|
|
723
|
-
PptxTextRange = 'pptxTextRange',
|
|
724
|
-
/** One cell, or a contiguous same-row cell range, on a named XLSX sheet. */
|
|
725
|
-
XlsxCellRange = 'xlsxCellRange',
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
/** A cited location inside an Office document, in document coordinates. */
|
|
729
|
-
declare type OoxmlHighlightLocation =
|
|
730
|
-
| OoxmlDocxHighlightLocation
|
|
731
|
-
| OoxmlPptxHighlightLocation
|
|
732
|
-
| OoxmlXlsxHighlightLocation;
|
|
733
|
-
|
|
734
|
-
/** A cited character range inside a single shape on one PPTX slide. */
|
|
735
|
-
declare interface OoxmlPptxHighlightLocation {
|
|
736
|
-
/** Discriminates this location within `OoxmlHighlightLocation`. */
|
|
737
|
-
kind: OoxmlHighlightKind.PptxTextRange;
|
|
738
|
-
/** 1-based slide number. */
|
|
739
|
-
slide: number;
|
|
740
|
-
/** Shape identifier, compared as a string against the run's own `shapeId`. */
|
|
741
|
-
shapeId: string;
|
|
742
|
-
/** Inclusive start character offset within the shape's matched text. */
|
|
743
|
-
start: number;
|
|
744
|
-
/** Exclusive end character offset, already converted from the wire's inclusive `end`. */
|
|
745
|
-
endExclusive: number;
|
|
746
|
-
/** The cited text, compared against the text resolved over `[start, endExclusive)`. */
|
|
747
|
-
text: string;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/** A cited cell, or contiguous same-row cell range, on a named XLSX sheet. */
|
|
751
|
-
declare interface OoxmlXlsxHighlightLocation {
|
|
752
|
-
/** Discriminates this location within `OoxmlHighlightLocation`. */
|
|
753
|
-
kind: OoxmlHighlightKind.XlsxCellRange;
|
|
754
|
-
/** Sheet name, matched exactly against the workbook's own sheet names. */
|
|
755
|
-
sheet: string;
|
|
756
|
-
/** First cell of the range. 1-based, passed to the viewer unconverted. */
|
|
757
|
-
start: OoxmlCellAddress;
|
|
758
|
-
/** Last cell of the range, on the same row as `start`. Omitted for a single cell. */
|
|
759
|
-
end?: OoxmlCellAddress;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
536
|
/**
|
|
763
537
|
* Opens a cited/referenced attachment: triggers a browser download for
|
|
764
538
|
* DIAL-hosted files (`files/...` ids) via the injected `resolveDownloadUrl`,
|
|
@@ -774,28 +548,6 @@ export declare const parseNewFolderVirtualPath: (newFolderVirtualPath: string, r
|
|
|
774
548
|
|
|
775
549
|
export declare const PATH_SEPARATOR_REGEXP: RegExp;
|
|
776
550
|
|
|
777
|
-
/** Content payload for PDF file attachments. */
|
|
778
|
-
declare interface PdfCanvasContent {
|
|
779
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
780
|
-
type: AttachmentContentType.Pdf;
|
|
781
|
-
/** Resolved download URL or object URL for the PDF file. */
|
|
782
|
-
url: string;
|
|
783
|
-
/** Highlight regions to render over the PDF pages. */
|
|
784
|
-
highlights?: InputHighlightData[];
|
|
785
|
-
/** ID of the highlight to scroll to and select on initial load. */
|
|
786
|
-
selectedHighlightId?: string;
|
|
787
|
-
/** 1-based page to navigate to on initial load, independent of highlight geometry. */
|
|
788
|
-
page?: number;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
/** Content payload for plain-text attachments. */
|
|
792
|
-
declare interface PlainTextCanvasContent {
|
|
793
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
794
|
-
type: AttachmentContentType.PlainText;
|
|
795
|
-
/** The raw text to display. */
|
|
796
|
-
text: string;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
551
|
/** Builds the `copyFiles` DTOs (with their destination display name) for `onCopyFiles`. */
|
|
800
552
|
export declare const prepareCopyItems: (copiedItems: DialCopiedItem[], bucket: string, rootLabel: string) => PreparedCopyMoveItem<CopyItemDto>[];
|
|
801
553
|
|
|
@@ -821,21 +573,9 @@ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], buc
|
|
|
821
573
|
preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
|
|
822
574
|
};
|
|
823
575
|
|
|
824
|
-
/**
|
|
825
|
-
* Builds a `PdfCanvasContent` for a reference-only attachment whose
|
|
826
|
-
* `reference_url` points at a PDF file (optionally with a `#page=N`
|
|
827
|
-
* fragment), so it can be opened in the canvas and scrolled to the
|
|
828
|
-
* referenced page the same way a regular PDF citation is. Returns `null`
|
|
829
|
-
* when the attachment's `url` does not target a PDF.
|
|
830
|
-
*/
|
|
831
|
-
export declare const referenceAttachmentToPdfCanvasContent: (attachment: AttachmentResource, resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
|
|
832
|
-
|
|
833
576
|
/** Name reserved for the hidden marker file used to create empty folders. */
|
|
834
577
|
export declare const RESERVED_MARKER_NAME = ".dial_folder";
|
|
835
578
|
|
|
836
|
-
/** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
837
|
-
export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
|
|
838
|
-
|
|
839
579
|
/**
|
|
840
580
|
* Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
|
|
841
581
|
* Prefers DIAL resource ids when present; otherwise converts DialFile.path virtual paths.
|
|
@@ -870,37 +610,6 @@ declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
|
|
|
870
610
|
*/
|
|
871
611
|
export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
|
|
872
612
|
|
|
873
|
-
/**
|
|
874
|
-
* Resolves an HTML canvas content payload from a DisplayAttachment.
|
|
875
|
-
* Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
|
|
876
|
-
* Returns `null` if no source is available, or an `ErrorCanvasContent` on fetch failure.
|
|
877
|
-
* Rejects `srcdoc` payloads larger than 1 MiB to prevent browser truncation.
|
|
878
|
-
*/
|
|
879
|
-
export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* Resolves an image canvas content payload from a DisplayAttachment without
|
|
883
|
-
* fetching — returns a local blob URL or the BFF download URL directly so the
|
|
884
|
-
* browser cache can be shared with the conversation view's `<img>` element.
|
|
885
|
-
* A local `File` with bytes takes precedence over the DIAL download URL; a
|
|
886
|
-
* 0-byte `File` (the file-manager placeholder) does not. Error detection is
|
|
887
|
-
* delegated to `<img onError>` in the canvas renderer. Returns `null` if no
|
|
888
|
-
* URL source is available.
|
|
889
|
-
*/
|
|
890
|
-
export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* Resolves a JSON canvas content payload from a DisplayAttachment, or `null` if unavailable.
|
|
894
|
-
* Falls back to `PlainTextCanvasContent` when the fetched text is not valid JSON.
|
|
895
|
-
*/
|
|
896
|
-
export declare const resolveJsonCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<JsonCanvasContent | PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
897
|
-
|
|
898
|
-
/** Resolves a Markdown canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
899
|
-
export declare const resolveMarkdownCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<MarkdownCanvasContent | ErrorCanvasContent | null>;
|
|
900
|
-
|
|
901
|
-
/** Resolves an OOXML or CSV renderer payload from a DisplayAttachment, or `null` if unavailable. */
|
|
902
|
-
export declare const resolveOoxmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, format: OoxmlFileType) => Promise<OoxmlCanvasContent | ErrorCanvasContent | null>;
|
|
903
|
-
|
|
904
613
|
/**
|
|
905
614
|
* Resolves the effective bucket and path for a write operation on the Shared tab.
|
|
906
615
|
* For Shared tab items, the first segment of apiPath is the shared root folder name
|
|
@@ -911,30 +620,12 @@ export declare const resolveOwnerCoords: (apiPath: string, sharedRootMeta: Map<s
|
|
|
911
620
|
path: string;
|
|
912
621
|
};
|
|
913
622
|
|
|
914
|
-
/** Resolves a PDF canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
915
|
-
export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PdfCanvasContent | ErrorCanvasContent | null>;
|
|
916
|
-
|
|
917
623
|
/**
|
|
918
624
|
* Converts a DIAL file ID or full resource path to the relative bucket path
|
|
919
625
|
* expected by the files download API.
|
|
920
626
|
*/
|
|
921
627
|
export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
|
|
922
628
|
|
|
923
|
-
/** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
924
|
-
export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
|
|
928
|
-
* given registry entry and theme. Returns `null` when the payload cannot be
|
|
929
|
-
* fetched (caller should fall through to default content-type handling).
|
|
930
|
-
*
|
|
931
|
-
* Only JSON payloads are parsed into `data`. Non-JSON payloads (plain text,
|
|
932
|
-
* CSV, binary, …) resolve with `data: {}` — the visualizer still receives
|
|
933
|
-
* `mimeType` and `layout`, just no payload body. This is intentional: only
|
|
934
|
-
* JSON attachment content is forwarded to visualizers in this version.
|
|
935
|
-
*/
|
|
936
|
-
export declare const resolveVisualizerCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, entry: CustomVisualizer, themeId: string) => Promise<VisualizerCanvasContent | null>;
|
|
937
|
-
|
|
938
629
|
/**
|
|
939
630
|
* Sanitizes a filename for upload by replacing forbidden characters with `_`,
|
|
940
631
|
* trimming trailing dots/whitespace from the base name, and capping the result
|
|
@@ -1422,22 +1113,4 @@ export { UseGridEditingScrollResult }
|
|
|
1422
1113
|
*/
|
|
1423
1114
|
export declare const virtualPathToApiPath: (virtualPath: string, rootLabel: string) => string;
|
|
1424
1115
|
|
|
1425
|
-
/** Content payload for a custom-visualizer attachment rendered inside a sandboxed iframe. */
|
|
1426
|
-
declare interface VisualizerCanvasContent {
|
|
1427
|
-
/** Discriminates the content type to select the correct renderer. */
|
|
1428
|
-
type: AttachmentContentType.Visualizer;
|
|
1429
|
-
/** Iframe `src`, resolved from the matching registry entry's `url`. */
|
|
1430
|
-
url: string;
|
|
1431
|
-
/** The attachment's own MIME type (not the registry entry's raw, possibly comma-separated, `contentType`). */
|
|
1432
|
-
mimeType: string;
|
|
1433
|
-
/** Opaque attachment payload consumed by the visualizer. */
|
|
1434
|
-
data: unknown;
|
|
1435
|
-
/** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`). */
|
|
1436
|
-
layout: CustomVisualizerDataLayout;
|
|
1437
|
-
/** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
|
|
1438
|
-
visualizerName: string;
|
|
1439
|
-
/** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
|
|
1440
|
-
requestTimeout?: number;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
1116
|
export { }
|
package/file-manager.js
CHANGED
|
@@ -12,18 +12,17 @@ import { buildFromCache as H, fetchByTab as U, fetchForSearch as W, findFirstSuc
|
|
|
12
12
|
import { createFilesApiClient as Z } from "./files/create-files-api.js";
|
|
13
13
|
import { createUploadFileWithProgress as Q } from "./files/create-upload-file-with-progress.js";
|
|
14
14
|
import { openAnnotationAttachment as $ } from "./files/annotation.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
export { m as COLUMNS_WITHOUT_AUTHOR, h as COLUMNS_WITH_AUTHOR, g as CORE_PERMISSION_MAP, _ as DATE_OPTIONS, x as DialFileManagerActionProfile, S as DialFileManagerVariant, u as DialFilesApiUploadMode, Ce as DownloadDestinationType, d as FileManagerNotificationReason, f as FileNameValidationErrorReason, p as FileOperationKind, v as PATH_SEPARATOR_REGEXP, y as RESERVED_MARKER_NAME, b as UPLOAD_CONCURRENCY, _e as annotationToDisplayAttachment, ee as annotationToOoxmlCanvasContent, te as annotationToPdfCanvasContent, ve as attachmentDtoToDisplayAttachment, ye as attachmentDtosToDisplayAttachments, H as buildFromCache, w as buildSharedItemVirtualPath, ne as clearAttachmentCache, Z as createFilesApiClient, Q as createUploadFileWithProgress, C as deriveActionProfile, T as dialCorePathToRelative, be as dialFileToAttachment, xe as dialFilesToAttachments, Se as dialFolderPathToAttachment, U as fetchByTab, W as fetchForSearch, E as findDialFileByPath, G as findFirstSuccessfulCopyMoveItem, D as findFolderByVirtualPath, O as formatOperationFolderName, L as getParentFolderPath, me as getUrlFileName, k as getVirtualPathName, re as hasAttachmentTextSource, A as hasDialFileWritePermission, j as hasForbiddenNameSymbols, M as isCopyMoveDuplicateAllowed, r as isDialFileAcceptType, e as isDialFileId, he as isExternalSourcePreviewable, N as isShareActionsAllowed, K as mapCorePermissions, q as mapFileMetadataToDialFile, J as mapSearchItem, Y as mergeCreatedFolderIntoCache, i as mimeTypesToAttachmentExtensionLabels, a as mimeTypesToDialFileAcceptTypes, o as mimeTypesToFileAccept, P as normalizeVirtualPath, $ as openAnnotationAttachment, F as parseNewFolderVirtualPath, B as prepareCopyItems, we as prepareDownloadDestination, V as prepareMoveRenameItems, ie as referenceAttachmentToPdfCanvasContent, ae as resolveCodeCanvasContent, R as resolveDialFileApiPath, t as resolveDialFileBucketAndPath, ge as resolveExternalSourceContentType, oe as resolveHtmlCanvasContent, se as resolveImageCanvasContent, ce as resolveJsonCanvasContent, le as resolveMarkdownCanvasContent, ue as resolveOoxmlCanvasContent, I as resolveOwnerCoords, de as resolvePdfCanvasContent, n as resolveRelativeDialFilePath, fe as resolveTextCanvasContent, pe as resolveVisualizerCanvasContent, s as sanitizeFileName, c as splitFileNameExtension, l as trimFileNameToByteLimit, X as updateEntry, Te as useDialFileListing, Ae as useDialFileManager, je as useDialFileManagerTabConfig, Ee as useDialFileMetadata, De as useDialFileMutations, Oe as useDialFileSharing, ke as useDialFileUploadBatch, Me as useGridEditingScroll, z as virtualPathToApiPath };
|
|
15
|
+
import { getUrlFileName as ee, isExternalSourcePreviewable as te, resolveExternalSourceContentType as ne } from "./files/source-content.js";
|
|
16
|
+
import { annotationToDisplayAttachment as re, attachmentDtoToDisplayAttachment as ie, attachmentDtosToDisplayAttachments as ae } from "./files/attachment-dto-to-display.js";
|
|
17
|
+
import { dialFileToAttachment as oe, dialFilesToAttachments as se, dialFolderPathToAttachment as ce } from "./files/dial-file-to-attachment.js";
|
|
18
|
+
import { DownloadDestinationType as le } from "./files/download-destination.js";
|
|
19
|
+
import { prepareDownloadDestination as ue } from "./files/prepare-download-destination.js";
|
|
20
|
+
import { useDialFileListing as de } from "./files/useDialFileListing/useDialFileListing.js";
|
|
21
|
+
import { useDialFileMetadata as fe } from "./files/useDialFileMetadata/useDialFileMetadata.js";
|
|
22
|
+
import { useDialFileMutations as pe } from "./files/useDialFileMutations/useDialFileMutations.js";
|
|
23
|
+
import { useDialFileSharing as me } from "./files/useDialFileSharing/useDialFileSharing.js";
|
|
24
|
+
import { useDialFileUploadBatch as he } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
|
|
25
|
+
import { useDialFileManager as ge } from "./files/useDialFileManager/useDialFileManager.js";
|
|
26
|
+
import { useDialFileManagerTabConfig as _e } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
|
|
27
|
+
import { useGridEditingScroll as ve } from "@epam/ai-dial-chat-shared";
|
|
28
|
+
export { m as COLUMNS_WITHOUT_AUTHOR, h as COLUMNS_WITH_AUTHOR, g as CORE_PERMISSION_MAP, _ as DATE_OPTIONS, x as DialFileManagerActionProfile, S as DialFileManagerVariant, u as DialFilesApiUploadMode, le as DownloadDestinationType, d as FileManagerNotificationReason, f as FileNameValidationErrorReason, p as FileOperationKind, v as PATH_SEPARATOR_REGEXP, y as RESERVED_MARKER_NAME, b as UPLOAD_CONCURRENCY, re as annotationToDisplayAttachment, ie as attachmentDtoToDisplayAttachment, ae as attachmentDtosToDisplayAttachments, H as buildFromCache, w as buildSharedItemVirtualPath, Z as createFilesApiClient, Q as createUploadFileWithProgress, C as deriveActionProfile, T as dialCorePathToRelative, oe as dialFileToAttachment, se as dialFilesToAttachments, ce as dialFolderPathToAttachment, U as fetchByTab, W as fetchForSearch, E as findDialFileByPath, G as findFirstSuccessfulCopyMoveItem, D as findFolderByVirtualPath, O as formatOperationFolderName, L as getParentFolderPath, ee as getUrlFileName, k as getVirtualPathName, A as hasDialFileWritePermission, j as hasForbiddenNameSymbols, M as isCopyMoveDuplicateAllowed, r as isDialFileAcceptType, e as isDialFileId, te as isExternalSourcePreviewable, N as isShareActionsAllowed, K as mapCorePermissions, q as mapFileMetadataToDialFile, J as mapSearchItem, Y as mergeCreatedFolderIntoCache, i as mimeTypesToAttachmentExtensionLabels, a as mimeTypesToDialFileAcceptTypes, o as mimeTypesToFileAccept, P as normalizeVirtualPath, $ as openAnnotationAttachment, F as parseNewFolderVirtualPath, B as prepareCopyItems, ue as prepareDownloadDestination, V as prepareMoveRenameItems, R as resolveDialFileApiPath, t as resolveDialFileBucketAndPath, ne as resolveExternalSourceContentType, I as resolveOwnerCoords, n as resolveRelativeDialFilePath, s as sanitizeFileName, c as splitFileNameExtension, l as trimFileNameToByteLimit, X as updateEntry, de as useDialFileListing, ge as useDialFileManager, _e as useDialFileManagerTabConfig, fe as useDialFileMetadata, pe as useDialFileMutations, me as useDialFileSharing, he as useDialFileUploadBatch, ve as useGridEditingScroll, z as virtualPathToApiPath };
|
|
@@ -297,6 +297,34 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
297
297
|
visualizerName: r.title,
|
|
298
298
|
requestTimeout: r.requestTimeout
|
|
299
299
|
};
|
|
300
|
+
}, q = (e, n, r, i) => {
|
|
301
|
+
let a = {
|
|
302
|
+
width: r.width,
|
|
303
|
+
height: r.height,
|
|
304
|
+
mobileHeight: r.mobileHeight,
|
|
305
|
+
themeId: i
|
|
306
|
+
}, o = [], s = [];
|
|
307
|
+
return e.forEach((e) => {
|
|
308
|
+
let t = n(e);
|
|
309
|
+
t != null && (s.push(e), o.push({
|
|
310
|
+
url: t,
|
|
311
|
+
mimeType: e.contentType,
|
|
312
|
+
visualizerData: { layout: a }
|
|
313
|
+
}));
|
|
314
|
+
}), o.length === 0 ? {
|
|
315
|
+
content: null,
|
|
316
|
+
resolved: []
|
|
317
|
+
} : {
|
|
318
|
+
content: {
|
|
319
|
+
type: t.GroupedVisualizer,
|
|
320
|
+
url: r.url,
|
|
321
|
+
attachments: o,
|
|
322
|
+
layout: a,
|
|
323
|
+
visualizerName: r.title,
|
|
324
|
+
requestTimeout: r.requestTimeout
|
|
325
|
+
},
|
|
326
|
+
resolved: s
|
|
327
|
+
};
|
|
300
328
|
};
|
|
301
329
|
//#endregion
|
|
302
|
-
export { z as annotationToOoxmlCanvasContent, L as annotationToPdfCanvasContent, S as clearAttachmentCache, A as hasAttachmentTextSource, B as referenceAttachmentToPdfCanvasContent, F as resolveCodeCanvasContent, I as resolveHtmlCanvasContent, j as resolveImageCanvasContent, G as resolveJsonCanvasContent, N as resolveMarkdownCanvasContent, W as resolveOoxmlCanvasContent, U as resolvePdfCanvasContent, M as resolveTextCanvasContent, K as resolveVisualizerCanvasContent };
|
|
330
|
+
export { z as annotationToOoxmlCanvasContent, L as annotationToPdfCanvasContent, S as clearAttachmentCache, A as hasAttachmentTextSource, B as referenceAttachmentToPdfCanvasContent, F as resolveCodeCanvasContent, q as resolveGroupedVisualizerCanvasContent, I as resolveHtmlCanvasContent, j as resolveImageCanvasContent, G as resolveJsonCanvasContent, N as resolveMarkdownCanvasContent, W as resolveOoxmlCanvasContent, U as resolvePdfCanvasContent, M as resolveTextCanvasContent, K as resolveVisualizerCanvasContent };
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Annotation } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { AnnotationGroup } from '@epam/ai-dial-quotations';
|
|
3
|
+
import { ApplicationVisualizer } from '@epam/ai-dial-chat-shared';
|
|
3
4
|
import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
|
|
4
5
|
import { Attachment } from '@epam/ai-dial-chat-shared';
|
|
5
6
|
import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
|
|
@@ -69,6 +70,7 @@ import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
|
|
|
69
70
|
import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
|
|
70
71
|
import { FilterTab } from '@epam/ai-dial-chat-shared';
|
|
71
72
|
import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
|
|
73
|
+
import type { GroupedAttachmentItem } from '@epam/ai-dial-chat-shared';
|
|
72
74
|
import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
|
|
73
75
|
import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
|
|
74
76
|
import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -314,6 +316,7 @@ declare enum AttachmentContentType {
|
|
|
314
316
|
Code = 'code',
|
|
315
317
|
Html = 'html',
|
|
316
318
|
Visualizer = 'visualizer',
|
|
319
|
+
GroupedVisualizer = 'grouped_visualizer',
|
|
317
320
|
McpApp = 'mcp_app',
|
|
318
321
|
Unsupported = 'unsupported',
|
|
319
322
|
Error = 'error',
|
|
@@ -1838,6 +1841,30 @@ export declare interface GreetingTranslations {
|
|
|
1838
1841
|
nightNoName: string;
|
|
1839
1842
|
}
|
|
1840
1843
|
|
|
1844
|
+
/** Content payload for an application-scoped grouped visualizer: every attachment a message's visualizer claims, rendered together inside one sandboxed iframe. */
|
|
1845
|
+
declare interface GroupedVisualizerCanvasContent {
|
|
1846
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
1847
|
+
type: AttachmentContentType.GroupedVisualizer;
|
|
1848
|
+
/** Iframe `src`, resolved from the matching registry entry's `url`. */
|
|
1849
|
+
url: string;
|
|
1850
|
+
/** One item per claimed attachment, in the message's attachment order. Each `url` is absolute, resolved by the host. */
|
|
1851
|
+
attachments: GroupedAttachmentItem[];
|
|
1852
|
+
/** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`) shared by every item. */
|
|
1853
|
+
layout: CustomVisualizerDataLayout;
|
|
1854
|
+
/** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
|
|
1855
|
+
visualizerName: string;
|
|
1856
|
+
/** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
|
|
1857
|
+
requestTimeout?: number;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
/** Outcome of building a grouped visualizer payload. */
|
|
1861
|
+
export declare interface GroupedVisualizerResolution {
|
|
1862
|
+
/** The grouped payload, or `null` when no claimed attachment resolved to a URL. */
|
|
1863
|
+
content: GroupedVisualizerCanvasContent | null;
|
|
1864
|
+
/** The claimed attachments that reached `content.attachments`, in the input's order. The caller returns the rest to the ordinary attachment tray. */
|
|
1865
|
+
resolved: DisplayAttachment[];
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1841
1868
|
/** Whether at least one tool toggle in `value` is active. */
|
|
1842
1869
|
export declare const hasActiveToolConfig: (value: Record<string, boolean> | undefined) => boolean;
|
|
1843
1870
|
|
|
@@ -2938,7 +2965,8 @@ export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPromp
|
|
|
2938
2965
|
/** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
|
|
2939
2966
|
export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
|
|
2940
2967
|
|
|
2941
|
-
|
|
2968
|
+
/** Resolves a deployment's display folder, including organization applications without a folder path. */
|
|
2969
|
+
export declare const resolveDeploymentFolder: (deployment: Pick<DeploymentItemDto, "isMy" | "sharedWithMe" | "applicationFolder"> & Partial<Pick<DeploymentItemDto, "type">>, labels: DeploymentFolderLabels) => string[];
|
|
2942
2970
|
|
|
2943
2971
|
/**
|
|
2944
2972
|
* Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
|
|
@@ -2974,6 +3002,17 @@ export declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
|
|
|
2974
3002
|
*/
|
|
2975
3003
|
export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
|
|
2976
3004
|
|
|
3005
|
+
/**
|
|
3006
|
+
* Builds the grouped payload for an application-scoped visualizer from the
|
|
3007
|
+
* attachments its entry claims, reporting which of them `resolveAbsoluteUrl`
|
|
3008
|
+
* could produce a URL for. Unlike the single-attachment resolver this fetches
|
|
3009
|
+
* nothing: the grouped protocol hands the visualizer URLs and lets it read
|
|
3010
|
+
* them itself, so the URLs must be absolute — a host-relative path would
|
|
3011
|
+
* resolve against the iframe's own origin. Producing one is host knowledge,
|
|
3012
|
+
* which is why it arrives as a callback rather than being built here.
|
|
3013
|
+
*/
|
|
3014
|
+
export declare const resolveGroupedVisualizerCanvasContent: (attachments: DisplayAttachment[], resolveAbsoluteUrl: (attachment: DisplayAttachment) => string | undefined, entry: ApplicationVisualizer, themeId: string) => GroupedVisualizerResolution;
|
|
3015
|
+
|
|
2977
3016
|
/**
|
|
2978
3017
|
* Resolves an HTML canvas content payload from a DisplayAttachment.
|
|
2979
3018
|
* Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
|