@cognizant-ai-lab/ui-common 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/components/AgentChat/ChatCommon/ChatCommon.d.ts +9 -3
- package/dist/components/AgentChat/ChatCommon/ChatCommon.js +89 -23
- package/dist/components/AgentChat/ChatCommon/ChatHistory.d.ts +7 -0
- package/dist/components/AgentChat/ChatCommon/ChatHistory.js +1 -1
- package/dist/components/AgentChat/ChatCommon/ControlButtons.d.ts +4 -2
- package/dist/components/AgentChat/ChatCommon/ControlButtons.js +8 -2
- package/dist/components/AgentChat/ChatCommon/ConversationTurn.d.ts +5 -5
- package/dist/components/AgentChat/ChatCommon/ConversationTurn.js +1 -0
- package/dist/components/AgentChat/Common/Utils.d.ts +4 -0
- package/dist/components/AgentChat/Common/Utils.js +5 -1
- package/dist/components/Common/Breadcrumbs.js +1 -1
- package/dist/components/Common/notification.d.ts +4 -4
- package/dist/components/MultiAgentAccelerator/{AgentFlow.d.ts → AgentFlow/AgentFlow.d.ts} +15 -5
- package/dist/components/MultiAgentAccelerator/{AgentFlow.js → AgentFlow/AgentFlow.js} +44 -35
- package/dist/components/MultiAgentAccelerator/{AgentNode.d.ts → AgentFlow/AgentNode.d.ts} +1 -1
- package/dist/components/MultiAgentAccelerator/{AgentNode.js → AgentFlow/AgentNode.js} +4 -4
- package/dist/components/MultiAgentAccelerator/{GraphLayouts.d.ts → AgentFlow/GraphLayouts.d.ts} +4 -4
- package/dist/components/MultiAgentAccelerator/{GraphLayouts.js → AgentFlow/GraphLayouts.js} +6 -35
- package/dist/components/MultiAgentAccelerator/AgentFlow/GraphStructure.d.ts +21 -0
- package/dist/components/MultiAgentAccelerator/AgentFlow/GraphStructure.js +27 -0
- package/dist/components/MultiAgentAccelerator/AgentFlow/PlasmaEdge.d.ts +7 -0
- package/dist/components/MultiAgentAccelerator/{PlasmaEdge.js → AgentFlow/PlasmaEdge.js} +13 -8
- package/dist/components/MultiAgentAccelerator/MultiAgentAccelerator.js +116 -78
- package/dist/components/MultiAgentAccelerator/Schema/SlyData.d.ts +17 -0
- package/dist/components/MultiAgentAccelerator/Schema/SlyData.js +23 -0
- package/dist/components/MultiAgentAccelerator/Sidebar/AgentNetworkTreeItem.js +9 -4
- package/dist/components/MultiAgentAccelerator/Sidebar/ImportNetworkModal.d.ts +67 -0
- package/dist/components/MultiAgentAccelerator/Sidebar/ImportNetworkModal.js +585 -0
- package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.d.ts +2 -0
- package/dist/components/MultiAgentAccelerator/Sidebar/Sidebar.js +19 -26
- package/dist/components/MultiAgentAccelerator/Sidebar/TreeBuilder.d.ts +2 -1
- package/dist/components/MultiAgentAccelerator/Sidebar/TreeBuilder.js +24 -4
- package/dist/components/MultiAgentAccelerator/TemporaryNetworks.d.ts +22 -0
- package/dist/components/MultiAgentAccelerator/TemporaryNetworks.js +74 -3
- package/dist/components/MultiAgentAccelerator/{ThoughtBubbleEdge.d.ts → ThoughtBubbles/ThoughtBubbleEdge.d.ts} +1 -1
- package/dist/components/MultiAgentAccelerator/{ThoughtBubbleOverlay.js → ThoughtBubbles/ThoughtBubbleOverlay.js} +1 -1
- package/dist/components/MultiAgentAccelerator/Tour/MainTourSteps.js +5 -0
- package/dist/components/MultiAgentAccelerator/const.d.ts +1 -0
- package/dist/components/MultiAgentAccelerator/const.js +2 -0
- package/dist/components/Settings/SettingsDialog.js +26 -10
- package/dist/controller/agent/Agent.d.ts +14 -6
- package/dist/controller/agent/Agent.js +18 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/state/Settings.d.ts +81 -4
- package/dist/state/Settings.js +87 -7
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/BrowserNavigation.js +2 -0
- package/dist/utils/File.d.ts +4 -1
- package/dist/utils/File.js +4 -9
- package/dist/utils/text.js +3 -7
- package/package.json +9 -10
- package/dist/components/MultiAgentAccelerator/PlasmaEdge.d.ts +0 -3
- /package/dist/components/MultiAgentAccelerator/{ThoughtBubbleEdge.js → ThoughtBubbles/ThoughtBubbleEdge.js} +0 -0
- /package/dist/components/MultiAgentAccelerator/{ThoughtBubbleOverlay.d.ts → ThoughtBubbles/ThoughtBubbleOverlay.d.ts} +0 -0
|
@@ -17,6 +17,8 @@ limitations under the License.
|
|
|
17
17
|
* Navigate to the specified URL by setting window.location.href
|
|
18
18
|
* @param url The URL to navigate to
|
|
19
19
|
*/
|
|
20
|
+
// See: https://github.com/jsdom/jsdom/issues/2112
|
|
21
|
+
/* istanbul ignore next -- JSDom doesn't support simulated navigation */
|
|
20
22
|
export const navigateToUrl = (url) => {
|
|
21
23
|
window.location.href = url;
|
|
22
24
|
};
|
package/dist/utils/File.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type MimeType = `${string}/${string}`;
|
|
1
2
|
/**
|
|
2
3
|
* // Sanitize filename for saving
|
|
3
4
|
* @param input Filename as string
|
|
@@ -32,5 +33,7 @@ export declare const getFileName: (path: string) => string;
|
|
|
32
33
|
* Downloads a file containing the supplied content with the specified filename
|
|
33
34
|
* @param messageContents The contents of the file to be downloaded
|
|
34
35
|
* @param fileName Local filename for the file to be downloaded
|
|
36
|
+
* @param mimeType Optional MIME type for the file to be downloaded, defaults to "application/octet-stream"
|
|
35
37
|
*/
|
|
36
|
-
export declare const downloadFile: (messageContents: string | Uint8Array, fileName: string) => void;
|
|
38
|
+
export declare const downloadFile: (messageContents: string | Uint8Array, fileName: string, mimeType?: MimeType) => void;
|
|
39
|
+
export {};
|
package/dist/utils/File.js
CHANGED
|
@@ -46,21 +46,16 @@ export const splitFilename = (filename) => {
|
|
|
46
46
|
* @param path The path to be parsed
|
|
47
47
|
* @return The filename part of the path only
|
|
48
48
|
*/
|
|
49
|
-
export const getFileName = (path) =>
|
|
50
|
-
// conflicts with ESLint newline-per-chained-call rule
|
|
51
|
-
// prettier-ignore
|
|
52
|
-
path.split("\\")
|
|
53
|
-
.pop()
|
|
54
|
-
.split("/")
|
|
55
|
-
.pop();
|
|
49
|
+
export const getFileName = (path) => path.split("\\").pop().split("/").pop();
|
|
56
50
|
/**
|
|
57
51
|
* Downloads a file containing the supplied content with the specified filename
|
|
58
52
|
* @param messageContents The contents of the file to be downloaded
|
|
59
53
|
* @param fileName Local filename for the file to be downloaded
|
|
54
|
+
* @param mimeType Optional MIME type for the file to be downloaded, defaults to "application/octet-stream"
|
|
60
55
|
*/
|
|
61
|
-
export const downloadFile = (messageContents, fileName) => {
|
|
56
|
+
export const downloadFile = (messageContents, fileName, mimeType = "application/octet-stream") => {
|
|
62
57
|
const downloadLink = document.createElement("a");
|
|
63
|
-
const blob = new Blob([messageContents]);
|
|
58
|
+
const blob = new Blob([messageContents], { type: mimeType });
|
|
64
59
|
// Apply the url and filename to the anchor tag
|
|
65
60
|
downloadLink.href = URL.createObjectURL(blob);
|
|
66
61
|
downloadLink.download = fileName;
|
package/dist/utils/text.js
CHANGED
|
@@ -41,9 +41,8 @@ export const extractId = (modelId, modelType) => {
|
|
|
41
41
|
if (!modelId || !modelType || !modelId.includes(modelType)) {
|
|
42
42
|
return "";
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return modelId.slice(`${modelType}-`.length) // remove the model type
|
|
44
|
+
return modelId
|
|
45
|
+
.slice(`${modelType}-`.length) // remove the model type
|
|
47
46
|
.split("-") // split by hyphens
|
|
48
47
|
.slice(0, -1) // remove the last element
|
|
49
48
|
.join("-"); // join with hyphens
|
|
@@ -55,8 +54,5 @@ export const extractId = (modelId, modelType) => {
|
|
|
55
54
|
* @returns Hashed string
|
|
56
55
|
*/
|
|
57
56
|
export const hashString = (input) => {
|
|
58
|
-
|
|
59
|
-
return createHash("md5")
|
|
60
|
-
.update(input)
|
|
61
|
-
.digest("hex");
|
|
57
|
+
return createHash("md5").update(input).digest("hex");
|
|
62
58
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognizant-ai-lab/ui-common",
|
|
3
3
|
"description": "A shared UI component library for Cognizant AI Labs projects",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.9.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "yarn clean && yarn generate && yarn run --top-level tsc --project tsconfig.build.json && fix-esm-import-path dist > /dev/null",
|
|
@@ -12,10 +12,6 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@dagrejs/dagre": "1.0.4",
|
|
14
14
|
"@langchain/core": "1.1.17",
|
|
15
|
-
"@mui/icons-material": "9.0.1",
|
|
16
|
-
"@mui/material": "9.0.1",
|
|
17
|
-
"@mui/system": "9.0.1",
|
|
18
|
-
"@mui/x-tree-view": "9.1.0",
|
|
19
15
|
"@xyflow/react": "12.10.1",
|
|
20
16
|
"http-status": "1.7.3",
|
|
21
17
|
"lodash-es": "4.18.1",
|
|
@@ -27,27 +23,30 @@
|
|
|
27
23
|
"rehype-slug": "6.0.0",
|
|
28
24
|
"remark-gfm": "4.0.1",
|
|
29
25
|
"uuid": "14.0.0",
|
|
26
|
+
"zod": "4.4.3",
|
|
30
27
|
"zustand": "4.5.7"
|
|
31
28
|
},
|
|
32
29
|
"devDependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
30
|
+
"@mui/icons-material": "9.0.1",
|
|
31
|
+
"@mui/material": "9.0.1",
|
|
32
|
+
"@mui/system": "9.1.2",
|
|
33
|
+
"@mui/x-tree-view": "9.1.0",
|
|
35
34
|
"@testing-library/dom": "10.4.1",
|
|
36
35
|
"@testing-library/react": "16.3.0",
|
|
37
36
|
"@testing-library/user-event": "14.6.1",
|
|
38
37
|
"@types/lodash-es": "4.17.12",
|
|
39
|
-
"@types/node": "
|
|
38
|
+
"@types/node": "26.1.1",
|
|
40
39
|
"@types/react": "19.2.14",
|
|
41
40
|
"@types/react-dom": "19.2.3",
|
|
42
41
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
43
|
-
"babel-jest": "30.4.0",
|
|
44
42
|
"fake-indexeddb": "6.2.5",
|
|
45
43
|
"fix-esm-import-path": "1.10.3",
|
|
46
44
|
"globals": "17.4.0",
|
|
47
45
|
"openapi-typescript": "7.8.0",
|
|
48
46
|
"react": "19.2.4",
|
|
49
47
|
"react-dom": "19.2.4",
|
|
50
|
-
"typescript": "5.9.3"
|
|
48
|
+
"typescript": "5.9.3",
|
|
49
|
+
"vitest": "4.1.10"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
52
|
"@emotion/react": "^11.14.0",
|
|
File without changes
|