@mgamadeus/ddd-agents 0.1.36 → 0.1.38
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/README.md +20 -0
- package/dist/chat.js +6 -6
- package/dist/chunks/{ConversationMessageInputComposerWidgets-CMJL6lua.js → ConversationMessageInputComposerWidgets-CI1GZIz7.js} +4 -4
- package/dist/chunks/{ConversationMessageInputComposerWidgets-CMJL6lua.js.map → ConversationMessageInputComposerWidgets-CI1GZIz7.js.map} +1 -1
- package/dist/chunks/{WebSearchResultsConversationWidget-DMAzB2yP.js → WebSearchResultsConversationWidget-qp4zrauN.js} +691 -187
- package/dist/chunks/WebSearchResultsConversationWidget-qp4zrauN.js.map +1 -0
- package/dist/chunks/{canvas-reducers-yUzQbRiW.js → canvas-reducers-f_ld2U0X.js} +2 -2
- package/dist/chunks/{canvas-reducers-yUzQbRiW.js.map → canvas-reducers-f_ld2U0X.js.map} +1 -1
- package/dist/chunks/{canvas-title-slot-context-B3hRpP4c.js → canvas-title-slot-context-CTMVP_js.js} +3 -3
- package/dist/chunks/{canvas-title-slot-context-B3hRpP4c.js.map → canvas-title-slot-context-CTMVP_js.js.map} +1 -1
- package/dist/chunks/{canvasBodies-ByvWqkGP.js → canvasBodies-DtjJM249.js} +3 -3
- package/dist/chunks/{canvasBodies-ByvWqkGP.js.map → canvasBodies-DtjJM249.js.map} +1 -1
- package/dist/chunks/{widget-name-resolver-qt2GgCFE.js → widget-name-resolver-COqzO2QW.js} +27 -17
- package/dist/chunks/widget-name-resolver-COqzO2QW.js.map +1 -0
- package/dist/client-testing.js +3 -3
- package/dist/files/i18n-keys.json +158 -0
- package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +59 -0
- package/dist/files/widgets/DriveFilesConversationWidget/drive-files.preview-fixtures.json +39 -0
- package/dist/image-render.js +7 -7
- package/dist/index.js +7 -6
- package/dist/kit.js +2 -2
- package/dist/preview.js +108 -101
- package/dist/preview.js.map +1 -1
- package/dist/renderer.js +43 -43
- package/dist/styles.css +150 -63
- package/dist/types/entries/index.d.ts +2 -0
- package/dist/types/entries/widgets.d.ts +3 -0
- package/dist/types/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.d.ts +8 -0
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-file-cards-source.d.ts +37 -0
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +88 -0
- package/dist/widgets.js +59 -99
- package/dist/widgets.js.map +1 -1
- package/package.json +3 -1
- package/public-api.json +24 -0
- package/dist/chunks/WebSearchResultsConversationWidget-DMAzB2yP.js.map +0 -1
- package/dist/chunks/widget-name-resolver-qt2GgCFE.js.map +0 -1
|
@@ -7,6 +7,9 @@ export { ClockConversationWidget } from "../widgets/ClockConversationWidget/Cloc
|
|
|
7
7
|
export { ConceptExplainerConversationWidget } from "../widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget";
|
|
8
8
|
export { ConversationSearchResultsConversationWidget } from "../widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget";
|
|
9
9
|
export { CurrencyConverterConversationWidget } from "../widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget";
|
|
10
|
+
export { DriveFilesConversationWidget } from "../widgets/DriveFilesConversationWidget/DriveFilesConversationWidget";
|
|
11
|
+
export { DRIVE_FILE_CARDS_SOURCE_MISSING, type DriveFileCardsSource, readDriveFileCardsSource, unregisterDriveFileCardsSource, } from "../widgets/DriveFilesConversationWidget/shared/drive-file-cards-source";
|
|
12
|
+
export { DRIVE_FILES_MAX_FILES, DRIVE_FILES_WIDGET_TYPE, type DriveFileCard, type DriveFileContent, type DriveFileFamily, type DriveFilesRequest, driveFileCardToOpen, driveFileFamilyOf, driveFileTypeLabelOf, formatDriveFileSize, isDriveFileCardExpired, nodeIdOfReference, parseDriveFilesPayload, safeDriveFileOpenLink, } from "../widgets/DriveFilesConversationWidget/shared/drive-files";
|
|
10
13
|
export { CustomVisualizationConversationWidget } from "../widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget";
|
|
11
14
|
export { CUSTOM_VISUALIZATION_SANDBOX_CONFIG, resolveCustomVisualizationFrameUrl, } from "../widgets/CustomVisualizationConversationWidget/shared/custom-visualization-sandbox-config";
|
|
12
15
|
export { EntityMentionConversationWidget } from "../widgets/EntityMentionConversationWidget/EntityMentionConversationWidget";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PayloadConversationWidgetProps } from "../../renderer/conversation-widget-props";
|
|
2
|
+
/**
|
|
3
|
+
* The file card widget `DriveFiles`: the files a block names, read under the viewer's rights through the host's
|
|
4
|
+
* `DriveFileCardsSource`, each with type, size, date, a thumbnail, open (an office file opens its PDF twin, else it
|
|
5
|
+
* only downloads), download and a link to its place in the host's drive screen. A block without a store or references
|
|
6
|
+
* renders nothing and reports it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DriveFilesConversationWidget: (props: PayloadConversationWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type DriveFileCard, type DriveFileContent, type DriveFilesRequest } from "./drive-files";
|
|
2
|
+
/**
|
|
3
|
+
* Where the `DriveFiles` cards read their data: the store's file cards under the viewer's rights and a short-lived URL
|
|
4
|
+
* of a file's content. The one seam between the widget and a store's backend (a cloud drive, a workspace); the host
|
|
5
|
+
* registers one with {@link registerDriveFileCardsSource} before the first chat.
|
|
6
|
+
*/
|
|
7
|
+
export interface DriveFileCardsSource {
|
|
8
|
+
/** The cards of one block, in the block's order; a reference the viewer may not read is left out. */
|
|
9
|
+
readFileCards: (request: DriveFilesRequest, signal: AbortSignal) => Promise<DriveFileCard[]>;
|
|
10
|
+
/**
|
|
11
|
+
* A URL of the card's content: `inline` to open it in a tab, `attachment` to download it. The widget asks again
|
|
12
|
+
* whenever it needs a URL; a card whose URLs expired (`urlsExpireAt`) makes the widget read the cards again after.
|
|
13
|
+
*/
|
|
14
|
+
readFileContent: (card: DriveFileCard, disposition: "inline" | "attachment") => Promise<DriveFileContent>;
|
|
15
|
+
/**
|
|
16
|
+
* The link to a card's place in the host's drive screen when the card carries no `openLink` of its own; `null`
|
|
17
|
+
* (or no builder) shows no such action.
|
|
18
|
+
*/
|
|
19
|
+
buildDriveScreenHref?: (card: DriveFileCard) => string | null;
|
|
20
|
+
}
|
|
21
|
+
/** The hydration error of a card read while no source is registered: the widget shows "not connected". */
|
|
22
|
+
export declare const DRIVE_FILE_CARDS_SOURCE_MISSING = "DRIVE_FILE_CARDS_SOURCE_MISSING";
|
|
23
|
+
/**
|
|
24
|
+
* Registers the store behind the `DriveFiles` cards. Call it once, outside React, before the first chat; a second call
|
|
25
|
+
* replaces the first.
|
|
26
|
+
*/
|
|
27
|
+
export declare const registerDriveFileCardsSource: (source: DriveFileCardsSource) => void;
|
|
28
|
+
/** The registered source, or `null` while no store is connected to this frontend. */
|
|
29
|
+
export declare const readDriveFileCardsSource: () => DriveFileCardsSource | null;
|
|
30
|
+
/** Takes the source off again (tests, a host that disconnects its store). */
|
|
31
|
+
export declare const unregisterDriveFileCardsSource: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* The package hydrator of the widget: reads through the registered source, fails with
|
|
34
|
+
* {@link DRIVE_FILE_CARDS_SOURCE_MISSING} without one. Registered when the widget registers, so a preview's fixture
|
|
35
|
+
* hydration answers it like any other hydrator.
|
|
36
|
+
*/
|
|
37
|
+
export declare const registerDriveFilesHydrator: () => void;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file card widget `DriveFiles` (`DriveFilesConversationWidget` of the backend): the block the agent writes with
|
|
3
|
+
* `showDriveFiles` names a drive store and file references only (`drive/812`, at most 20) plus an optional headline.
|
|
4
|
+
* The renderer reads the cards through the host's `DriveFileCardsSource` under the viewer's rights, so the block never
|
|
5
|
+
* carries a URL and a viewer without the right sees no file. Pure (no React), so the logic tests cover it.
|
|
6
|
+
*/
|
|
7
|
+
/** The wire name of the widget (`DriveFilesConversationWidget::WIDGET_TYPE`). */
|
|
8
|
+
export declare const DRIVE_FILES_WIDGET_TYPE = "DriveFiles";
|
|
9
|
+
/** The most files of one card (`DriveFilesConversationWidget::MAX_FILES`). */
|
|
10
|
+
export declare const DRIVE_FILES_MAX_FILES = 20;
|
|
11
|
+
/** What a `DriveFiles` block asks the store for. */
|
|
12
|
+
export interface DriveFilesRequest {
|
|
13
|
+
store: string;
|
|
14
|
+
/** Distinct references in the block's order, at most {@link DRIVE_FILES_MAX_FILES}. */
|
|
15
|
+
references: string[];
|
|
16
|
+
/** The headline above the cards, or `null` for the default one. */
|
|
17
|
+
title: string | null;
|
|
18
|
+
/** The block's self-hydration key (the agent space the card was written in); `null` when the block names none. */
|
|
19
|
+
widgetSelfHydrationKey: number | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One file or folder as the widget draws it: the facts a store's cards read answers, plus short-lived URLs. Date-times
|
|
23
|
+
* are offsetless UTC strings (`Y-m-d H:i:s`) or ISO strings.
|
|
24
|
+
*/
|
|
25
|
+
export interface DriveFileCard {
|
|
26
|
+
/** The store's reference (`drive/812`). */
|
|
27
|
+
reference: string;
|
|
28
|
+
name: string;
|
|
29
|
+
/** The path inside its store (`out/deck.pptx`); the PDF twin of an office file is found by it. */
|
|
30
|
+
path?: string | null;
|
|
31
|
+
isFolder?: boolean;
|
|
32
|
+
sizeBytes?: number | null;
|
|
33
|
+
contentType?: string | null;
|
|
34
|
+
modifiedAt?: string | null;
|
|
35
|
+
/** A folder's number of entries. */
|
|
36
|
+
childCount?: number | null;
|
|
37
|
+
/** A state the store reports (still being checked, blocked …), shown as a chip; `null` for a readable file. */
|
|
38
|
+
state?: string | null;
|
|
39
|
+
/** A short-lived thumbnail URL (images only). */
|
|
40
|
+
thumbnailUrl?: string | null;
|
|
41
|
+
/** When the card's URLs expire; a card without one counts as expired. */
|
|
42
|
+
urlsExpireAt?: string | null;
|
|
43
|
+
/** The store's link to the file's place in the host's drive screen (relative path or same-origin URL). */
|
|
44
|
+
openLink?: string | null;
|
|
45
|
+
/** The store's space of the file, for a host href builder. */
|
|
46
|
+
driveSpaceId?: number | null;
|
|
47
|
+
}
|
|
48
|
+
/** A short-lived URL of a card's content. */
|
|
49
|
+
export interface DriveFileContent {
|
|
50
|
+
url: string;
|
|
51
|
+
/** The file name a download is saved under; the card's name when omitted. */
|
|
52
|
+
fileName?: string | null;
|
|
53
|
+
}
|
|
54
|
+
/** The icon family of a card. */
|
|
55
|
+
export type DriveFileFamily = "PDF" | "SPREADSHEET" | "DOCUMENT" | "PRESENTATION" | "TEXT" | "IMAGE" | "VECTOR" | "VIDEO" | "ARCHIVE";
|
|
56
|
+
/**
|
|
57
|
+
* The request of one `DriveFiles` block, or `null` when it names no store or no reference. The self-hydration key is
|
|
58
|
+
* the block's attribute (`selfHydrationKeyAttribute`), else the payload's field of that name.
|
|
59
|
+
*/
|
|
60
|
+
export declare const parseDriveFilesPayload: (payload: string | undefined, selfHydrationKeyFieldName: string, selfHydrationKeyAttribute?: string | number) => DriveFilesRequest | null;
|
|
61
|
+
/** One hydration memory per block content: the store, the space and the references in their order. */
|
|
62
|
+
export declare const buildDriveFilesHydrationKey: (type: string, request: DriveFilesRequest) => string;
|
|
63
|
+
/** The node id inside a reference (`drive/812` → `812`), or `null` for a reference of another shape. */
|
|
64
|
+
export declare const nodeIdOfReference: (reference: string) => string | null;
|
|
65
|
+
/**
|
|
66
|
+
* The card's own link into the host's drive screen, when it is safe to follow inside the app: a path of this origin
|
|
67
|
+
* (`/admin/drive?…`, never protocol-relative `//…`) or an absolute http(s) URL of `origin`. `null` otherwise.
|
|
68
|
+
*/
|
|
69
|
+
export declare const safeDriveFileOpenLink: (link: string | null | undefined, origin: string | null) => string | null;
|
|
70
|
+
/** Milliseconds of an offsetless UTC `Y-m-d H:i:s` (or ISO) date-time, `null` for anything else. */
|
|
71
|
+
export declare const parseDriveDateTimeMs: (value: string | null | undefined) => number | null;
|
|
72
|
+
/**
|
|
73
|
+
* Whether the card's URLs (open, download, thumbnail) are expired at `nowMs`: `urlsExpireAt` is past or within
|
|
74
|
+
* {@link URL_EXPIRY_MARGIN_MS}. A card without an expiry carries no URL to trust and counts as expired.
|
|
75
|
+
*/
|
|
76
|
+
export declare const isDriveFileCardExpired: (card: Pick<DriveFileCard, "urlsExpireAt">, nowMs: number) => boolean;
|
|
77
|
+
/** The file family of a card (its icon and colour): by the content type, else by the extension; text otherwise. */
|
|
78
|
+
export declare const driveFileFamilyOf: (file: Pick<DriveFileCard, "name" | "contentType">) => DriveFileFamily;
|
|
79
|
+
/** The type a card names: the extension in capitals (`XLSX`), or `null` when the name has none. */
|
|
80
|
+
export declare const driveFileTypeLabelOf: (file: Pick<DriveFileCard, "name">) => string | null;
|
|
81
|
+
/**
|
|
82
|
+
* The card "open" shows in a new tab: the card itself when the browser can show it; for an office file (pptx, docx,
|
|
83
|
+
* xlsx …) its PDF twin among the block's cards (same folder, same name, `.pdf`: an agent hands a deck over as pptx and
|
|
84
|
+
* pdf); `null` when there is none, then the card only downloads (no blank tab that turns into a download).
|
|
85
|
+
*/
|
|
86
|
+
export declare const driveFileCardToOpen: <Card extends Pick<DriveFileCard, "name" | "path" | "contentType" | "isFolder">>(card: Card, cards: readonly Card[]) => Card | null;
|
|
87
|
+
/** A file size for people: bytes, KB, MB, GB in the locale's number format, one decimal from KB on (no trailing `,0`). */
|
|
88
|
+
export declare const formatDriveFileSize: (sizeBytes: number, locale?: string | null) => string;
|
package/dist/widgets.js
CHANGED
|
@@ -1,65 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx
|
|
5
|
-
import {
|
|
2
|
+
import { G as useIsEmailWidgetRender } from "./chunks/WebSearchResultsConversationWidget-qp4zrauN.js";
|
|
3
|
+
import { V, X, Y, Z, Y as Y2, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM } from "./chunks/WebSearchResultsConversationWidget-qp4zrauN.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { r as StatusChip, s as Text, F as classNames } from "./chunks/link-navigation-DH3f2g9a.js";
|
|
6
6
|
import { g, x } from "./chunks/link-navigation-DH3f2g9a.js";
|
|
7
7
|
import { useSyncExternalStore, useState, useEffect } from "react";
|
|
8
|
-
const row$1 = "agents_row_3Kb6Jj";
|
|
9
|
-
const withoutLeading = "agents_withoutLeading_7XTCP7";
|
|
10
|
-
const clickable = "agents_clickable_-T4Zgc";
|
|
11
|
-
const text = "agents_text_fJd93m";
|
|
12
|
-
const trailing = "agents_trailing_FOCyQL";
|
|
13
|
-
const styles$3 = {
|
|
14
|
-
row: row$1,
|
|
15
|
-
withoutLeading,
|
|
16
|
-
clickable,
|
|
17
|
-
text,
|
|
18
|
-
trailing
|
|
19
|
-
};
|
|
20
|
-
const WidgetListRow = (props) => {
|
|
21
|
-
const { title, meta, leading, trailing: trailing2, onClick, className, testId } = props;
|
|
22
|
-
const rowClassName = classNames(
|
|
23
|
-
styles$3.row,
|
|
24
|
-
leading === void 0 && styles$3.withoutLeading,
|
|
25
|
-
onClick && styles$3.clickable,
|
|
26
|
-
className
|
|
27
|
-
);
|
|
28
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
-
leading,
|
|
30
|
-
/* @__PURE__ */ jsxs("span", { className: styles$3.text, children: [
|
|
31
|
-
/* @__PURE__ */ jsx(Text, { role: "body", weight: "bold", translate: false, children: title }),
|
|
32
|
-
meta ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: meta }) : null
|
|
33
|
-
] }),
|
|
34
|
-
trailing2 ? /* @__PURE__ */ jsx("span", { className: styles$3.trailing, children: trailing2 }) : /* @__PURE__ */ jsx("span", {})
|
|
35
|
-
] });
|
|
36
|
-
if (onClick) {
|
|
37
|
-
return /* @__PURE__ */ jsx("button", { type: "button", className: rowClassName, onClick, "data-testid": testId, children: content });
|
|
38
|
-
}
|
|
39
|
-
return /* @__PURE__ */ jsx("div", { className: rowClassName, "data-testid": testId, children: content });
|
|
40
|
-
};
|
|
41
8
|
const WidgetStatusChip = (props) => /* @__PURE__ */ jsx(StatusChip, { ...props });
|
|
42
|
-
const rows = "agents_rows_ZeurFw";
|
|
43
|
-
const row = "agents_row_2esTMM";
|
|
44
|
-
const rowText = "agents_rowText_TlYKqo";
|
|
45
|
-
const styles$2 = {
|
|
46
|
-
rows,
|
|
47
|
-
row,
|
|
48
|
-
rowText
|
|
49
|
-
};
|
|
50
|
-
const WidgetSurfaceSkeleton = (props) => {
|
|
51
|
-
const { title, rowCount = 3, level = "elevated", testId } = props;
|
|
52
|
-
return /* @__PURE__ */ jsxs(WidgetSurface, { level, testId, children: [
|
|
53
|
-
title ? /* @__PURE__ */ jsx(Text, { role: "intro", weight: "bold", translate: false, children: title }) : null,
|
|
54
|
-
/* @__PURE__ */ jsx("div", { className: styles$2.rows, "aria-busy": "true", children: Array.from({ length: rowCount }, (unused, rowIndex) => /* @__PURE__ */ jsxs("div", { className: styles$2.row, children: [
|
|
55
|
-
/* @__PURE__ */ jsx(SkeletonCircle, { size: 32 }),
|
|
56
|
-
/* @__PURE__ */ jsxs("span", { className: styles$2.rowText, children: [
|
|
57
|
-
/* @__PURE__ */ jsx(SkeletonLine, { width: "60%", height: 12 }),
|
|
58
|
-
/* @__PURE__ */ jsx(SkeletonLine, { width: "35%", height: 10 })
|
|
59
|
-
] })
|
|
60
|
-
] }, rowIndex)) })
|
|
61
|
-
] });
|
|
62
|
-
};
|
|
63
9
|
const widgetLabel = "agents_widgetLabel_WecWAw";
|
|
64
10
|
const styles$1 = {
|
|
65
11
|
widgetLabel
|
|
@@ -130,55 +76,69 @@ const useElementVisible = (ref) => {
|
|
|
130
76
|
return intersecting && documentVisible;
|
|
131
77
|
};
|
|
132
78
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
79
|
+
V as CANVAS_VIABLE_MIN_WIDTH,
|
|
80
|
+
X as CUSTOM_VISUALIZATION_SANDBOX_CONFIG,
|
|
81
|
+
Y as CanvasLauncherWidget,
|
|
82
|
+
Z as CanvasViabilityContext,
|
|
83
|
+
Y2 as CanvasWidgetCard,
|
|
84
|
+
_ as CanvasWidgetSwitch,
|
|
139
85
|
WidgetFooter as CardFooter,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
86
|
+
$ as ClockConversationWidget,
|
|
87
|
+
a0 as ConceptExplainerConversationWidget,
|
|
88
|
+
a1 as ConversationSearchResultsConversationWidget,
|
|
89
|
+
a2 as CurrencyConverterConversationWidget,
|
|
90
|
+
a3 as CustomVisualizationConversationWidget,
|
|
91
|
+
a4 as DRIVE_FILES_MAX_FILES,
|
|
92
|
+
a5 as DRIVE_FILES_WIDGET_TYPE,
|
|
93
|
+
a6 as DRIVE_FILE_CARDS_SOURCE_MISSING,
|
|
145
94
|
a7 as DonePill,
|
|
146
|
-
a8 as
|
|
147
|
-
a9 as
|
|
95
|
+
a8 as DriveFilesConversationWidget,
|
|
96
|
+
a9 as ElementWidthCanvasViability,
|
|
97
|
+
aa as EntityMentionConversationWidget,
|
|
148
98
|
g as HeroValue,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
SkeletonCircle,
|
|
152
|
-
SkeletonLine,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
99
|
+
ab as MultiChoiceConversationWidget,
|
|
100
|
+
ac as QuickRepliesConversationWidget,
|
|
101
|
+
ad as SkeletonCircle,
|
|
102
|
+
ae as SkeletonLine,
|
|
103
|
+
af as SkeletonPill,
|
|
104
|
+
ag as SkeletonWidgetLabel,
|
|
105
|
+
ah as SuggestedActions,
|
|
106
|
+
ai as ToolTraceConversationWidget,
|
|
107
|
+
aj as WebSearchResultsConversationWidget,
|
|
158
108
|
WidgetFooter,
|
|
159
|
-
|
|
109
|
+
ak as WidgetKpiValue,
|
|
160
110
|
WidgetLabel,
|
|
161
|
-
WidgetListRow,
|
|
111
|
+
al as WidgetListRow,
|
|
162
112
|
WidgetStatusChip,
|
|
163
|
-
WidgetSurface,
|
|
164
|
-
WidgetSurfaceSkeleton,
|
|
113
|
+
am as WidgetSurface,
|
|
114
|
+
an as WidgetSurfaceSkeleton,
|
|
165
115
|
x as WidgetText,
|
|
166
|
-
|
|
167
|
-
|
|
116
|
+
ao as WritingDraftConversationWidget,
|
|
117
|
+
ap as canvasForMessageWidget,
|
|
168
118
|
createEntityUpdateChannel,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
119
|
+
aq as driveFileCardToOpen,
|
|
120
|
+
ar as driveFileFamilyOf,
|
|
121
|
+
as as driveFileTypeLabelOf,
|
|
122
|
+
at as formatConceptExplainerNumber,
|
|
123
|
+
au as formatDriveFileSize,
|
|
124
|
+
av as isDriveFileCardExpired,
|
|
125
|
+
aw as nodeIdOfReference,
|
|
126
|
+
ax as normalizeSearchHitExcerpt,
|
|
127
|
+
ay as parseDriveFilesPayload,
|
|
128
|
+
az as pickAllowed,
|
|
129
|
+
aA as pickAllowedValue,
|
|
130
|
+
aB as pickReviewExternalId,
|
|
131
|
+
aC as pickSafeAlias,
|
|
132
|
+
aD as pickSafeAliases,
|
|
133
|
+
aE as pickText,
|
|
134
|
+
aF as readCanvasViable,
|
|
135
|
+
aG as readConceptExplainerNumber,
|
|
136
|
+
aH as readConceptExplainerValue,
|
|
137
|
+
aI as readDriveFileCardsSource,
|
|
138
|
+
aJ as resolveCustomVisualizationFrameUrl,
|
|
139
|
+
aK as safeDriveFileOpenLink,
|
|
140
|
+
aL as unregisterDriveFileCardsSource,
|
|
141
|
+
aM as useCanvasViable,
|
|
182
142
|
useElementVisible
|
|
183
143
|
};
|
|
184
144
|
//# sourceMappingURL=widgets.js.map
|
package/dist/widgets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.js","sources":["../src/widgets/_shared/modern/WidgetListRow.tsx","../src/widgets/_shared/modern/WidgetStatusChip.tsx","../src/widgets/_shared/modern/WidgetSurfaceSkeleton.tsx","../src/widgets/_shared/WidgetLabel.tsx","../src/widgets/_shared/WidgetFooter.tsx","../src/widgets/_shared/entity-update-channel.ts","../src/widgets/_shared/use-element-visible.ts"],"sourcesContent":["import { Text } from \"../../../provider/components\";\nimport { classNames } from \"../../../provider/class-names\";\nimport type { ReactNode } from \"react\";\nimport styles from \"./WidgetListRow.module.scss\";\n\nexport interface WidgetListRowProps {\n /** Business content in the owner's language (no translation). */\n title: ReactNode;\n meta?: ReactNode;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Makes the row a native button (keyboard and screen reader included); never an onClick on a div. */\n onClick?: () => void;\n className?: string;\n testId?: string;\n}\n\n/** One row of a list inside a widget surface: title over muted meta, hairline-divided. */\nexport const WidgetListRow = (props: WidgetListRowProps) => {\n const { title, meta, leading, trailing, onClick, className, testId } = props;\n const rowClassName = classNames(\n styles.row,\n leading === undefined && styles.withoutLeading,\n onClick && styles.clickable,\n className,\n );\n const content = (\n <>\n {leading}\n <span className={styles.text}>\n <Text role=\"body\" weight=\"bold\" translate={false}>\n {title}\n </Text>\n {meta ? (\n <Text role=\"caption\" color=\"var(--agents-fg-light)\" translate={false}>\n {meta}\n </Text>\n ) : null}\n </span>\n {trailing ? <span className={styles.trailing}>{trailing}</span> : <span />}\n </>\n );\n if (onClick) {\n return (\n <button type=\"button\" className={rowClassName} onClick={onClick} data-testid={testId}>\n {content}\n </button>\n );\n }\n return (\n <div className={rowClassName} data-testid={testId}>\n {content}\n </div>\n );\n};\n","import { StatusChip, type AgentsStatusChipProps, type AgentsStatusChipTone } from \"../../../provider/components\";\n\nexport type WidgetStatusTone = AgentsStatusChipTone;\n\nexport type WidgetStatusChipProps = AgentsStatusChipProps;\n\n/**\n * The status chip of the chat widgets: the `StatusChip` component (in the app: the dashboard's status\n * pill), so the chat and the dashboard read the same.\n */\nexport const WidgetStatusChip = (props: WidgetStatusChipProps) => <StatusChip {...props} />;\n","import { Text } from \"../../../provider/components\";\nimport type { ReactNode } from \"react\";\nimport { SkeletonCircle, SkeletonLine } from \"../skeleton-primitives\";\nimport { WidgetSurface, type WidgetSurfaceLevel } from \"./WidgetSurface\";\nimport styles from \"./WidgetSurfaceSkeleton.module.scss\";\n\nexport interface WidgetSurfaceSkeletonProps {\n /** The widget's title — known before the data, so it is real text, never a skeleton. */\n title?: ReactNode;\n rowCount?: number;\n level?: WidgetSurfaceLevel;\n testId?: string;\n}\n\n/** The loading state shaped like the surface it stands for: the same surface, the title, then row-shaped blocks. */\nexport const WidgetSurfaceSkeleton = (props: WidgetSurfaceSkeletonProps) => {\n const { title, rowCount = 3, level = \"elevated\", testId } = props;\n return (\n <WidgetSurface level={level} testId={testId}>\n {title ? (\n <Text role=\"intro\" weight=\"bold\" translate={false}>\n {title}\n </Text>\n ) : null}\n <div className={styles.rows} aria-busy=\"true\">\n {Array.from({ length: rowCount }, (unused, rowIndex) => (\n <div key={rowIndex} className={styles.row}>\n <SkeletonCircle size={32} />\n <span className={styles.rowText}>\n <SkeletonLine width=\"60%\" height={12} />\n <SkeletonLine width=\"35%\" height={10} />\n </span>\n </div>\n ))}\n </div>\n </WidgetSurface>\n );\n};\n","import { Text, type AgentsTextReplacements } from \"../../provider/components\";\nimport React from \"react\";\nimport styles from \"./WidgetLabel.module.scss\";\n\ninterface WidgetLabelProps {\n children: React.ReactNode;\n replacements?: AgentsTextReplacements;\n}\n\nexport const WidgetLabel = (props: WidgetLabelProps) => {\n const { children, replacements } = props;\n return (\n <Text\n className={styles.widgetLabel}\n role=\"help\"\n weight=\"medium\"\n color={\"--agents-fg-light\"}\n replacements={replacements}\n >\n {children}\n </Text>\n );\n};\n","import { classNames } from \"../../provider/class-names\";\nimport React from \"react\";\nimport { useIsEmailWidgetRender } from \"../../renderer/ConversationWidgetRenderContext\";\nimport styles from \"./WidgetFooter.module.scss\";\n\nexport const WidgetFooter = (props: { children: React.ReactNode; actionOnly?: boolean; className?: string }) => {\n const { children, actionOnly = true, className } = props;\n const isEmailRender = useIsEmailWidgetRender();\n if (isEmailRender && actionOnly) return null;\n return <div className={classNames(styles.cardFooter, className)}>{children}</div>;\n};\n","import { useSyncExternalStore } from \"react\";\n\n/** One published update: a strictly increasing revision, so a consumer reacts to each publication exactly once. */\nexport interface EntityUpdate<TUpdate> {\n readonly revision: number;\n readonly update: TUpdate;\n}\n\n/**\n * A tiny shared channel between a canvas BODY and the inline widget that opened it: the body publishes\n * \"this entity changed\" / \"this entity was removed\", the inline list applies or refetches. Stands in for callbacks\n * captured into a rendered canvas node: a body mounted from the canvas model has no closure into the\n * widget instance, and the widget instance may have been windowed out meanwhile. Module state with\n * `useSyncExternalStore`.\n */\nexport const createEntityUpdateChannel = <TUpdate>() => {\n let latest: EntityUpdate<TUpdate> | null = null;\n const listeners = new Set<() => void>();\n const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n };\n const read = () => latest;\n return {\n publish: (update: TUpdate): void => {\n latest = { revision: (latest?.revision ?? 0) + 1, update };\n listeners.forEach((listener) => listener());\n },\n /** The latest publication (null before the first). Re-renders the consumer on every publication. */\n useLatestUpdate: (): EntityUpdate<TUpdate> | null => useSyncExternalStore(subscribe, read, read),\n };\n};\n","import { RefObject, useEffect, useState } from \"react\";\n\n/**\n * True while the element is in the viewport (IntersectionObserver) AND the document is visible — the widget polls only\n * when someone can see it. Environments without IntersectionObserver (jsdom) count as visible.\n */\nexport const useElementVisible = (ref: RefObject<HTMLElement | null>): boolean => {\n const [intersecting, setIntersecting] = useState<boolean>(true);\n const [documentVisible, setDocumentVisible] = useState<boolean>(\n typeof document === \"undefined\" || document.visibilityState !== \"hidden\",\n );\n\n useEffect(() => {\n const element = ref.current;\n if (!element || typeof IntersectionObserver === \"undefined\") return undefined;\n const observer = new IntersectionObserver((entries) => {\n setIntersecting(entries.some((entry) => entry.isIntersecting));\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref]);\n\n useEffect(() => {\n if (typeof document === \"undefined\") return undefined;\n const onChange = () => setDocumentVisible(document.visibilityState !== \"hidden\");\n document.addEventListener(\"visibilitychange\", onChange);\n return () => document.removeEventListener(\"visibilitychange\", onChange);\n }, []);\n\n return intersecting && documentVisible;\n};\n"],"names":["trailing","styles"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBO,MAAM,gBAAgB,CAAC,UAA8B;AAC1D,QAAM,EAAE,OAAO,MAAM,SAAS,UAAAA,WAAU,SAAS,WAAW,WAAW;AACvE,QAAM,eAAe;AAAA,IACnBC,SAAO;AAAA,IACP,YAAY,UAAaA,SAAO;AAAA,IAChC,WAAWA,SAAO;AAAA,IAClB;AAAA,EAAA;AAEF,QAAM,UACJ,qBAAA,UAAA,EACG,UAAA;AAAA,IAAA;AAAA,IACD,qBAAC,QAAA,EAAK,WAAWA,SAAO,MACtB,UAAA;AAAA,MAAA,oBAAC,QAAK,MAAK,QAAO,QAAO,QAAO,WAAW,OACxC,UAAA,MAAA,CACH;AAAA,MACC,OACC,oBAAC,MAAA,EAAK,MAAK,WAAU,OAAM,0BAAyB,WAAW,OAC5D,UAAA,KAAA,CACH,IACE;AAAA,IAAA,GACN;AAAA,IACCD,gCAAY,QAAA,EAAK,WAAWC,SAAO,UAAW,UAAAD,UAAA,CAAS,IAAU,oBAAC,QAAA,CAAA,CAAK;AAAA,EAAA,GAC1E;AAEF,MAAI,SAAS;AACX,WACE,oBAAC,YAAO,MAAK,UAAS,WAAW,cAAc,SAAk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oB,oBAAoB,QAAQ;AAAA,EACxE,GAAG,CAAA,CAAE;AAEL,SAAO,gBAAgB;AACzB;"}
|
|
1
|
+
{"version":3,"file":"widgets.js","sources":["../src/widgets/_shared/modern/WidgetStatusChip.tsx","../src/widgets/_shared/WidgetLabel.tsx","../src/widgets/_shared/WidgetFooter.tsx","../src/widgets/_shared/entity-update-channel.ts","../src/widgets/_shared/use-element-visible.ts"],"sourcesContent":["import { StatusChip, type AgentsStatusChipProps, type AgentsStatusChipTone } from \"../../../provider/components\";\n\nexport type WidgetStatusTone = AgentsStatusChipTone;\n\nexport type WidgetStatusChipProps = AgentsStatusChipProps;\n\n/**\n * The status chip of the chat widgets: the `StatusChip` component (in the app: the dashboard's status\n * pill), so the chat and the dashboard read the same.\n */\nexport const WidgetStatusChip = (props: WidgetStatusChipProps) => <StatusChip {...props} />;\n","import { Text, type AgentsTextReplacements } from \"../../provider/components\";\nimport React from \"react\";\nimport styles from \"./WidgetLabel.module.scss\";\n\ninterface WidgetLabelProps {\n children: React.ReactNode;\n replacements?: AgentsTextReplacements;\n}\n\nexport const WidgetLabel = (props: WidgetLabelProps) => {\n const { children, replacements } = props;\n return (\n <Text\n className={styles.widgetLabel}\n role=\"help\"\n weight=\"medium\"\n color={\"--agents-fg-light\"}\n replacements={replacements}\n >\n {children}\n </Text>\n );\n};\n","import { classNames } from \"../../provider/class-names\";\nimport React from \"react\";\nimport { useIsEmailWidgetRender } from \"../../renderer/ConversationWidgetRenderContext\";\nimport styles from \"./WidgetFooter.module.scss\";\n\nexport const WidgetFooter = (props: { children: React.ReactNode; actionOnly?: boolean; className?: string }) => {\n const { children, actionOnly = true, className } = props;\n const isEmailRender = useIsEmailWidgetRender();\n if (isEmailRender && actionOnly) return null;\n return <div className={classNames(styles.cardFooter, className)}>{children}</div>;\n};\n","import { useSyncExternalStore } from \"react\";\n\n/** One published update: a strictly increasing revision, so a consumer reacts to each publication exactly once. */\nexport interface EntityUpdate<TUpdate> {\n readonly revision: number;\n readonly update: TUpdate;\n}\n\n/**\n * A tiny shared channel between a canvas BODY and the inline widget that opened it: the body publishes\n * \"this entity changed\" / \"this entity was removed\", the inline list applies or refetches. Stands in for callbacks\n * captured into a rendered canvas node: a body mounted from the canvas model has no closure into the\n * widget instance, and the widget instance may have been windowed out meanwhile. Module state with\n * `useSyncExternalStore`.\n */\nexport const createEntityUpdateChannel = <TUpdate>() => {\n let latest: EntityUpdate<TUpdate> | null = null;\n const listeners = new Set<() => void>();\n const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n };\n const read = () => latest;\n return {\n publish: (update: TUpdate): void => {\n latest = { revision: (latest?.revision ?? 0) + 1, update };\n listeners.forEach((listener) => listener());\n },\n /** The latest publication (null before the first). Re-renders the consumer on every publication. */\n useLatestUpdate: (): EntityUpdate<TUpdate> | null => useSyncExternalStore(subscribe, read, read),\n };\n};\n","import { RefObject, useEffect, useState } from \"react\";\n\n/**\n * True while the element is in the viewport (IntersectionObserver) AND the document is visible — the widget polls only\n * when someone can see it. Environments without IntersectionObserver (jsdom) count as visible.\n */\nexport const useElementVisible = (ref: RefObject<HTMLElement | null>): boolean => {\n const [intersecting, setIntersecting] = useState<boolean>(true);\n const [documentVisible, setDocumentVisible] = useState<boolean>(\n typeof document === \"undefined\" || document.visibilityState !== \"hidden\",\n );\n\n useEffect(() => {\n const element = ref.current;\n if (!element || typeof IntersectionObserver === \"undefined\") return undefined;\n const observer = new IntersectionObserver((entries) => {\n setIntersecting(entries.some((entry) => entry.isIntersecting));\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref]);\n\n useEffect(() => {\n if (typeof document === \"undefined\") return undefined;\n const onChange = () => setDocumentVisible(document.visibilityState !== \"hidden\");\n document.addEventListener(\"visibilitychange\", onChange);\n return () => document.removeEventListener(\"visibilitychange\", onChange);\n }, []);\n\n return intersecting && documentVisible;\n};\n"],"names":["styles"],"mappings":";;;;;;;AAUO,MAAM,mBAAmB,CAAC,UAAiC,oB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,WAAW,IAAI,qBAAqB,CAAC,YAAY;AACrD,sBAAgB,QAAQ,KAAK,CAAC,UAAU,MAAM,cAAc,CAAC;AAAA,IAC/D,CAAC;AACD,aAAS,QAAQ,OAAO;AACxB,WAAO,MAAM,SAAS,WAAA;AAAA,EACxB,GAAG,CAAC,GAAG,CAAC;AAER,YAAU,MAAM;AACd,QAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,UAAM,WAAW,MAAM,mBAAmB,SAAS,oBAAoB,QAAQ;AAC/E,aAAS,iBAAiB,oBAAoB,QAAQ;AACtD,WAAO,MAAM,SAAS,oBAAoB,oBAAoB,QAAQ;AAAA,EACxE,GAAG,CAAA,CAAE;AAEL,SAAO,gBAAgB;AACzB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgamadeus/ddd-agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"description": "The web frontend of the ddd-agents module: the agent chat, the widget renderer and the composed-view kit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"./widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.md": "./dist/files/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.md",
|
|
85
85
|
"./widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.md": "./dist/files/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.md",
|
|
86
86
|
"./widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.md": "./dist/files/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.md",
|
|
87
|
+
"./widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md": "./dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md",
|
|
87
88
|
"./widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.md": "./dist/files/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.md",
|
|
88
89
|
"./widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.md": "./dist/files/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.md",
|
|
89
90
|
"./widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.md": "./dist/files/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.md",
|
|
@@ -130,6 +131,7 @@
|
|
|
130
131
|
"./widgets/ConversationSearchResultsConversationWidget/conversation-search-results.preview-fixtures.json": "./dist/files/widgets/ConversationSearchResultsConversationWidget/conversation-search-results.preview-fixtures.json",
|
|
131
132
|
"./widgets/CurrencyConverterConversationWidget/currency-converter.preview-fixtures.json": "./dist/files/widgets/CurrencyConverterConversationWidget/currency-converter.preview-fixtures.json",
|
|
132
133
|
"./widgets/CustomVisualizationConversationWidget/custom-visualization.preview-fixtures.json": "./dist/files/widgets/CustomVisualizationConversationWidget/custom-visualization.preview-fixtures.json",
|
|
134
|
+
"./widgets/DriveFilesConversationWidget/drive-files.preview-fixtures.json": "./dist/files/widgets/DriveFilesConversationWidget/drive-files.preview-fixtures.json",
|
|
133
135
|
"./widgets/EntityMentionConversationWidget/entity-mention.preview-fixtures.json": "./dist/files/widgets/EntityMentionConversationWidget/entity-mention.preview-fixtures.json",
|
|
134
136
|
"./widgets/MultiChoiceConversationWidget/multi-choice.preview-fixtures.json": "./dist/files/widgets/MultiChoiceConversationWidget/multi-choice.preview-fixtures.json",
|
|
135
137
|
"./widgets/QuickRepliesConversationWidget/quick-replies.preview-fixtures.json": "./dist/files/widgets/QuickRepliesConversationWidget/quick-replies.preview-fixtures.json",
|
package/public-api.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"registerComposedViewDataSourceFetcher",
|
|
66
66
|
"registerConceptExplainerTypes",
|
|
67
67
|
"registerConversationWidgets",
|
|
68
|
+
"registerDriveFileCardsSource",
|
|
68
69
|
"registerEntityDetailBodies",
|
|
69
70
|
"registerWidgetHydrator",
|
|
70
71
|
"reportRunningTurn",
|
|
@@ -155,6 +156,10 @@
|
|
|
155
156
|
"ComposedViewDataSourceFetcher",
|
|
156
157
|
"ConceptExplainerTypeDefinition",
|
|
157
158
|
"ConversationWidgetEntry",
|
|
159
|
+
"DriveFileCard",
|
|
160
|
+
"DriveFileCardsSource",
|
|
161
|
+
"DriveFileContent",
|
|
162
|
+
"DriveFilesRequest",
|
|
158
163
|
"EntityDetailBodyDefinition",
|
|
159
164
|
"HostColorSchemeSource"
|
|
160
165
|
]
|
|
@@ -366,7 +371,11 @@
|
|
|
366
371
|
"ConversationSearchResultsConversationWidget",
|
|
367
372
|
"CurrencyConverterConversationWidget",
|
|
368
373
|
"CustomVisualizationConversationWidget",
|
|
374
|
+
"DRIVE_FILES_MAX_FILES",
|
|
375
|
+
"DRIVE_FILES_WIDGET_TYPE",
|
|
376
|
+
"DRIVE_FILE_CARDS_SOURCE_MISSING",
|
|
369
377
|
"DonePill",
|
|
378
|
+
"DriveFilesConversationWidget",
|
|
370
379
|
"ElementWidthCanvasViability",
|
|
371
380
|
"EntityMentionConversationWidget",
|
|
372
381
|
"HeroValue",
|
|
@@ -390,8 +399,15 @@
|
|
|
390
399
|
"WritingDraftConversationWidget",
|
|
391
400
|
"canvasForMessageWidget",
|
|
392
401
|
"createEntityUpdateChannel",
|
|
402
|
+
"driveFileCardToOpen",
|
|
403
|
+
"driveFileFamilyOf",
|
|
404
|
+
"driveFileTypeLabelOf",
|
|
393
405
|
"formatConceptExplainerNumber",
|
|
406
|
+
"formatDriveFileSize",
|
|
407
|
+
"isDriveFileCardExpired",
|
|
408
|
+
"nodeIdOfReference",
|
|
394
409
|
"normalizeSearchHitExcerpt",
|
|
410
|
+
"parseDriveFilesPayload",
|
|
395
411
|
"pickAllowed",
|
|
396
412
|
"pickAllowedValue",
|
|
397
413
|
"pickReviewExternalId",
|
|
@@ -401,7 +417,10 @@
|
|
|
401
417
|
"readCanvasViable",
|
|
402
418
|
"readConceptExplainerNumber",
|
|
403
419
|
"readConceptExplainerValue",
|
|
420
|
+
"readDriveFileCardsSource",
|
|
404
421
|
"resolveCustomVisualizationFrameUrl",
|
|
422
|
+
"safeDriveFileOpenLink",
|
|
423
|
+
"unregisterDriveFileCardsSource",
|
|
405
424
|
"useCanvasViable",
|
|
406
425
|
"useElementVisible"
|
|
407
426
|
],
|
|
@@ -418,6 +437,11 @@
|
|
|
418
437
|
"ConceptExplainerValuesReading",
|
|
419
438
|
"ConceptExplainerVariant",
|
|
420
439
|
"ConceptExplainerVisualProps",
|
|
440
|
+
"DriveFileCard",
|
|
441
|
+
"DriveFileCardsSource",
|
|
442
|
+
"DriveFileContent",
|
|
443
|
+
"DriveFileFamily",
|
|
444
|
+
"DriveFilesRequest",
|
|
421
445
|
"EntityUpdate",
|
|
422
446
|
"WidgetKpiValueProps",
|
|
423
447
|
"WidgetListRowProps",
|