@epam/ai-dial-chat-hooks 1.1.0-dev.299 → 1.1.0-dev.300
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/catalog-derivations.d.ts +27 -0
- package/catalog/catalog-derivations.d.ts.map +1 -0
- package/catalog/catalog-primary-action.d.ts +47 -0
- package/catalog/catalog-primary-action.d.ts.map +1 -0
- package/catalog/useCatalogItemDetails.d.ts +73 -0
- package/catalog/useCatalogItemDetails.d.ts.map +1 -0
- package/files/dial-file-manager-mapping.util.d.ts +1 -1
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
- package/files/dial-file-manager.types.d.ts +2 -5
- package/files/dial-file-manager.types.d.ts.map +1 -1
- package/files/file-manager-variant.d.ts +2 -20
- package/files/file-manager-variant.d.ts.map +1 -1
- package/files/resolve-dial-file-api-path.d.ts +1 -5
- package/files/resolve-dial-file-api-path.d.ts.map +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +2275 -2193
- package/package.json +14 -15
- package/skill/useSkillFilePreview.d.ts +38 -0
- package/skill/useSkillFilePreview.d.ts.map +1 -0
- package/files/file-path.d.ts +0 -3
- package/files/file-path.d.ts.map +0 -1
- package/files/upload-batch.types.d.ts +0 -22
- package/files/upload-batch.types.d.ts.map +0 -1
- package/files/useGridEditingScroll/useGridEditingScroll.d.ts +0 -27
- package/files/useGridEditingScroll/useGridEditingScroll.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-hooks",
|
|
3
3
|
"description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.300",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -23,22 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.6",
|
|
26
|
-
"@epam/ai-dial-attachment-canvas": "1.1.0-dev.
|
|
27
|
-
"@epam/ai-dial-attachment-input": "1.1.0-dev.
|
|
28
|
-
"@epam/ai-dial-catalog": "1.1.0-dev.
|
|
29
|
-
"@epam/ai-dial-chat-api-client": "1.1.0-dev.
|
|
30
|
-
"@epam/ai-dial-chat-overlay": "1.1.0-dev.
|
|
31
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
32
|
-
"@epam/ai-dial-deployment-creation-form": "1.1.0-dev.
|
|
33
|
-
"@epam/ai-dial-publish-panel": "1.1.0-dev.
|
|
34
|
-
"@epam/ai-dial-quotations": "1.1.0-dev.
|
|
26
|
+
"@epam/ai-dial-attachment-canvas": "1.1.0-dev.300",
|
|
27
|
+
"@epam/ai-dial-attachment-input": "1.1.0-dev.300",
|
|
28
|
+
"@epam/ai-dial-catalog": "1.1.0-dev.300",
|
|
29
|
+
"@epam/ai-dial-chat-api-client": "1.1.0-dev.300",
|
|
30
|
+
"@epam/ai-dial-chat-overlay": "1.1.0-dev.300",
|
|
31
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.300",
|
|
32
|
+
"@epam/ai-dial-deployment-creation-form": "1.1.0-dev.300",
|
|
33
|
+
"@epam/ai-dial-publish-panel": "1.1.0-dev.300",
|
|
34
|
+
"@epam/ai-dial-quotations": "1.1.0-dev.300",
|
|
35
35
|
"@epam/ai-dial-react-file-manager": "*",
|
|
36
|
-
"@epam/ai-dial-scheduled-tasks": "1.1.0-dev.
|
|
37
|
-
"@epam/ai-dial-share": "1.1.0-dev.
|
|
38
|
-
"@epam/ai-dial-skill-editor": "1.1.0-dev.
|
|
39
|
-
"@epam/ai-dial-source-panel": "1.1.0-dev.
|
|
36
|
+
"@epam/ai-dial-scheduled-tasks": "1.1.0-dev.300",
|
|
37
|
+
"@epam/ai-dial-share": "1.1.0-dev.300",
|
|
38
|
+
"@epam/ai-dial-skill-editor": "1.1.0-dev.300",
|
|
39
|
+
"@epam/ai-dial-source-panel": "1.1.0-dev.300",
|
|
40
40
|
"@epam/ai-dial-ui-kit": "*",
|
|
41
|
-
"ag-grid-community": "^35.3.0",
|
|
42
41
|
"fflate": "^0.8.3"
|
|
43
42
|
},
|
|
44
43
|
"repository": {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SkillFileContent } from './skill-file-preview';
|
|
2
|
+
/** Discriminant for the kind of error a `useSkillFilePreview` load can produce. */
|
|
3
|
+
export declare enum SkillPreviewErrorKind {
|
|
4
|
+
/** HTTP 403 — the caller lacks permission to read this file. */
|
|
5
|
+
Forbidden = "forbidden",
|
|
6
|
+
/** Any non-403 load failure. */
|
|
7
|
+
Generic = "generic"
|
|
8
|
+
}
|
|
9
|
+
/** Options accepted by `useSkillFilePreview`. */
|
|
10
|
+
export interface UseSkillFilePreviewOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Opaque id of the selected skill file. Changing this resets all state
|
|
13
|
+
* and starts a new load; stale resolutions from the previous id are discarded.
|
|
14
|
+
*/
|
|
15
|
+
fileId: string;
|
|
16
|
+
/**
|
|
17
|
+
* App-owned loader; resolves with the raw file bytes when the request
|
|
18
|
+
* succeeds. The hook never constructs a URL or imports a REST client.
|
|
19
|
+
*/
|
|
20
|
+
onLoadFile: (fileId: string) => Promise<SkillFileContent>;
|
|
21
|
+
}
|
|
22
|
+
/** State returned by `useSkillFilePreview`. */
|
|
23
|
+
export interface UseSkillFilePreviewResult {
|
|
24
|
+
/** `true` while the async load is in flight. */
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
/** Resolved file content, or `null` while loading or after an error. */
|
|
27
|
+
content: SkillFileContent | null;
|
|
28
|
+
/** Classified load error, or `null` while loading or after a success. */
|
|
29
|
+
error: SkillPreviewErrorKind | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Headless hook that manages the skill-file preview loading lifecycle.
|
|
33
|
+
* Starts a new load on mount and whenever `fileId` changes; classifies errors
|
|
34
|
+
* as `Forbidden` (HTTP 403) or `Generic`; discards settlements from superseded
|
|
35
|
+
* or unmounted loads.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useSkillFilePreview: ({ fileId, onLoadFile, }: UseSkillFilePreviewOptions) => UseSkillFilePreviewResult;
|
|
38
|
+
//# sourceMappingURL=useSkillFilePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillFilePreview.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillFilePreview.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,mFAAmF;AACnF,oBAAY,qBAAqB;IAC/B,gEAAgE;IAChE,SAAS,cAAc;IACvB,gCAAgC;IAChC,OAAO,YAAY;CACpB;AAED,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC3D;AAED,+CAA+C;AAC/C,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,yEAAyE;IACzE,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACrC;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,yBAGjC,0BAA0B,KAAG,yBAoC/B,CAAC"}
|
package/files/file-path.d.ts
DELETED
package/files/file-path.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-path.d.ts","sourceRoot":"","sources":["../../src/files/file-path.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OACgB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** Lifecycle status of a single file within an upload batch. */
|
|
2
|
-
export declare enum FileUploadStatus {
|
|
3
|
-
Queued = "queued",
|
|
4
|
-
Uploading = "uploading",
|
|
5
|
-
Completed = "completed",
|
|
6
|
-
Failed = "failed",
|
|
7
|
-
Cancelled = "cancelled"
|
|
8
|
-
}
|
|
9
|
-
/** Progress state for a single file within an upload batch. */
|
|
10
|
-
export interface FileUploadEntry {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
status: FileUploadStatus;
|
|
14
|
-
/** 0–100 while uploading when the transport reports byte progress. */
|
|
15
|
-
percent?: number;
|
|
16
|
-
}
|
|
17
|
-
/** State of an in-progress or just-settled upload batch, as returned by `useDialFileUploadBatch`. */
|
|
18
|
-
export interface FileUploadBatchState {
|
|
19
|
-
files: FileUploadEntry[];
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=upload-batch.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-batch.types.d.ts","sourceRoot":"","sources":["../../src/files/upload-batch.types.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qGAAqG;AACrG,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
|
|
2
|
-
import { GridApi, IRowNode } from 'ag-grid-community';
|
|
3
|
-
/** Options accepted by `useGridEditingScroll`. */
|
|
4
|
-
export interface UseGridEditingScrollOptions {
|
|
5
|
-
/** Picks the row to scroll to among the rows newly added since the last `rowDataUpdated`. Defaults to the first row flagged `isTemporary`, or the first new row. */
|
|
6
|
-
resolveTargetNode?: (newNodes: IRowNode<FileManagerGridRow>[]) => IRowNode<FileManagerGridRow> | null;
|
|
7
|
-
}
|
|
8
|
-
/** Values returned by `useGridEditingScroll`. */
|
|
9
|
-
export interface UseGridEditingScrollResult {
|
|
10
|
-
/** Pass to `DialFileManager`'s `onGridApiChange` prop. */
|
|
11
|
-
handleGridApiChange: (api: GridApi<FileManagerGridRow>) => void;
|
|
12
|
-
/** Re-seeds the known-row-id set without scrolling — call on a data-source change such as a tab switch. */
|
|
13
|
-
reset: () => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* `@epam/ai-dial-react-file-manager`'s `GridOptions` type does not forward raw AG Grid
|
|
17
|
-
* event callbacks (`onCellEditingStarted`/`onRowDataUpdated`), so this hook
|
|
18
|
-
* binds directly to the `GridApi` obtained via `DialFileManager`'s
|
|
19
|
-
* `onGridApiChange` prop and uses AG Grid's own `addEventListener` instead of
|
|
20
|
-
* a `gridOptions` fragment. Scrolls a newly inline-edited or newly-inserted
|
|
21
|
-
* row into view. `handleGridApiChange` takes the raw `GridApi` only to bind
|
|
22
|
-
* to `onGridApiChange` — the narrow AGENTS.md D9 exception for this hook —
|
|
23
|
-
* and never renders, themes, or otherwise exposes AG Grid beyond that one
|
|
24
|
-
* event-binding parameter.
|
|
25
|
-
*/
|
|
26
|
-
export declare const useGridEditingScroll: ({ resolveTargetNode, }?: UseGridEditingScrollOptions) => UseGridEditingScrollResult;
|
|
27
|
-
//# sourceMappingURL=useGridEditingScroll.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGridEditingScroll.d.ts","sourceRoot":"","sources":["../../../src/files/useGridEditingScroll/useGridEditingScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAEL,OAAO,EACP,QAAQ,EAET,MAAM,mBAAmB,CAAC;AAmC3B,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,oKAAoK;IACpK,iBAAiB,CAAC,EAAE,CAClB,QAAQ,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KACrC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC1C;AAOD,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC,0DAA0D;IAC1D,mBAAmB,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,2GAA2G;IAC3G,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,yBAElC,2BAAgC,KAAG,0BAiFrC,CAAC"}
|