@altimateai/ui-components 0.0.1-beta.3 → 0.0.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.js +43 -114
- package/dist/Badge.js +1 -1
- package/dist/CoachForm.js +7125 -7242
- package/dist/DbtDocsRenderer.js +833 -2651
- package/dist/Tooltip.js +115 -0
- package/dist/chatbot/index.d.ts +7 -3
- package/dist/chatbot/index.js +100 -96
- package/dist/chatbotV2/index.d.ts +10 -2
- package/dist/flowchart-elk-definition-170a3958.js +1 -1
- package/dist/index.d.ts +28 -30
- package/dist/index.js +1 -1
- package/dist/index2.js +1 -5
- package/dist/lineage/index.d.ts +9 -3
- package/dist/lineage/index.js +2284 -2710
- package/dist/main.js +49 -184
- package/dist/mindmap-definition-44684416.js +1 -1
- package/dist/redux-toolkit.modern.js +1 -1
- package/dist/shadcn/index.d.ts +3 -4
- package/dist/shadcn/index.js +352 -382
- package/dist/storybook/Accordion.stories.tsx +5 -14
- package/dist/storybook/Alert.stories.tsx +3 -7
- package/dist/storybook/AlertDialog.stories.tsx +7 -12
- package/dist/storybook/Button.stories.tsx +7 -27
- package/dist/storybook/Card.stories.tsx +1 -8
- package/dist/storybook/Checkbox.stories.tsx +7 -16
- package/dist/storybook/Form.stories.tsx +3 -9
- package/dist/storybook/HoverCard.stories.tsx +7 -13
- package/dist/storybook/Label.stories.tsx +1 -1
- package/dist/storybook/Pagination.stories.tsx +1 -4
- package/dist/storybook/Popover.stories.tsx +1 -3
- package/dist/storybook/Progress.stories.tsx +2 -2
- package/dist/storybook/RadioGroup.stories.tsx +4 -7
- package/dist/storybook/ScrollArea.stories.tsx +11 -30
- package/dist/storybook/Select.stories.tsx +1 -1
- package/dist/storybook/Sheet.stories.tsx +1 -7
- package/dist/storybook/Sidebar.stories.tsx +4 -4
- package/dist/storybook/Slider.stories.tsx +2 -4
- package/dist/storybook/Switch.stories.tsx +4 -13
- package/dist/storybook/Textarea.stories.tsx +1 -1
- package/dist/storybook/Toast.stories.tsx +7 -11
- package/dist/storybook/Tooltip.stories.tsx +2 -7
- package/dist/{types-PVxbm0tZ.d.ts → types-FVWfXDNw.d.ts} +10 -5
- package/dist/v4.js +524 -514
- package/package.json +2 -2
- package/dist/Stack.js +0 -132
- /package/dist/{Stack.css → v4.css} +0 -0
package/dist/Tooltip.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { j as i } from "./index2.js";
|
|
2
|
+
import { createContext as h, Component as f, createElement as u, isValidElement as m, useState as p, useRef as g } from "react";
|
|
3
|
+
import { Tooltip as y } from "reactstrap";
|
|
4
|
+
var x = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function T(t) {
|
|
6
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7
|
+
}
|
|
8
|
+
const E = h(null), d = {
|
|
9
|
+
didCatch: !1,
|
|
10
|
+
error: null
|
|
11
|
+
};
|
|
12
|
+
class v extends f {
|
|
13
|
+
constructor(e) {
|
|
14
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = d;
|
|
15
|
+
}
|
|
16
|
+
static getDerivedStateFromError(e) {
|
|
17
|
+
return {
|
|
18
|
+
didCatch: !0,
|
|
19
|
+
error: e
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
resetErrorBoundary() {
|
|
23
|
+
const {
|
|
24
|
+
error: e
|
|
25
|
+
} = this.state;
|
|
26
|
+
if (e !== null) {
|
|
27
|
+
for (var o, n, r = arguments.length, a = new Array(r), s = 0; s < r; s++)
|
|
28
|
+
a[s] = arguments[s];
|
|
29
|
+
(o = (n = this.props).onReset) === null || o === void 0 || o.call(n, {
|
|
30
|
+
args: a,
|
|
31
|
+
reason: "imperative-api"
|
|
32
|
+
}), this.setState(d);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
componentDidCatch(e, o) {
|
|
36
|
+
var n, r;
|
|
37
|
+
(n = (r = this.props).onError) === null || n === void 0 || n.call(r, e, o);
|
|
38
|
+
}
|
|
39
|
+
componentDidUpdate(e, o) {
|
|
40
|
+
const {
|
|
41
|
+
didCatch: n
|
|
42
|
+
} = this.state, {
|
|
43
|
+
resetKeys: r
|
|
44
|
+
} = this.props;
|
|
45
|
+
if (n && o.error !== null && b(e.resetKeys, r)) {
|
|
46
|
+
var a, s;
|
|
47
|
+
(a = (s = this.props).onReset) === null || a === void 0 || a.call(s, {
|
|
48
|
+
next: r,
|
|
49
|
+
prev: e.resetKeys,
|
|
50
|
+
reason: "keys"
|
|
51
|
+
}), this.setState(d);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
const {
|
|
56
|
+
children: e,
|
|
57
|
+
fallbackRender: o,
|
|
58
|
+
FallbackComponent: n,
|
|
59
|
+
fallback: r
|
|
60
|
+
} = this.props, {
|
|
61
|
+
didCatch: a,
|
|
62
|
+
error: s
|
|
63
|
+
} = this.state;
|
|
64
|
+
let l = e;
|
|
65
|
+
if (a) {
|
|
66
|
+
const c = {
|
|
67
|
+
error: s,
|
|
68
|
+
resetErrorBoundary: this.resetErrorBoundary
|
|
69
|
+
};
|
|
70
|
+
if (typeof o == "function")
|
|
71
|
+
l = o(c);
|
|
72
|
+
else if (n)
|
|
73
|
+
l = u(n, c);
|
|
74
|
+
else if (r === null || m(r))
|
|
75
|
+
l = r;
|
|
76
|
+
else
|
|
77
|
+
throw s;
|
|
78
|
+
}
|
|
79
|
+
return u(E.Provider, {
|
|
80
|
+
value: {
|
|
81
|
+
didCatch: a,
|
|
82
|
+
error: s,
|
|
83
|
+
resetErrorBoundary: this.resetErrorBoundary
|
|
84
|
+
}
|
|
85
|
+
}, l);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function b() {
|
|
89
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
90
|
+
return t.length !== e.length || t.some((o, n) => !Object.is(o, e[n]));
|
|
91
|
+
}
|
|
92
|
+
const w = (t) => {
|
|
93
|
+
const [e, o] = p(!1), n = () => o(!e), r = g(
|
|
94
|
+
(t.id ?? `tooltip-${Math.random().toString(36).substring(3, 9)}`).replace(/\s/g, "-")
|
|
95
|
+
);
|
|
96
|
+
return /* @__PURE__ */ i.jsxs(v, { fallback: /* @__PURE__ */ i.jsx("span", { id: r.current, children: t.children }), children: [
|
|
97
|
+
/* @__PURE__ */ i.jsx("span", { id: r.current, children: t.children }),
|
|
98
|
+
t.title ? /* @__PURE__ */ i.jsx(
|
|
99
|
+
y,
|
|
100
|
+
{
|
|
101
|
+
isOpen: e,
|
|
102
|
+
target: r.current,
|
|
103
|
+
toggle: n,
|
|
104
|
+
className: t.className,
|
|
105
|
+
placement: "top",
|
|
106
|
+
children: t.title
|
|
107
|
+
}
|
|
108
|
+
) : null
|
|
109
|
+
] });
|
|
110
|
+
};
|
|
111
|
+
export {
|
|
112
|
+
w as T,
|
|
113
|
+
x as c,
|
|
114
|
+
T as g
|
|
115
|
+
};
|
package/dist/chatbot/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ChatMessage } from '@ant-design/pro-chat';
|
|
3
3
|
import { ProChatProps } from '@ant-design/pro-chat/es/ProChat/container';
|
|
4
|
-
import { T as TaskLabels } from '../types-
|
|
4
|
+
import { T as TaskLabels } from '../types-FVWfXDNw.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@reduxjs/toolkit';
|
|
7
7
|
import 'zod';
|
|
@@ -18,9 +18,13 @@ interface StatusInfoMessage {
|
|
|
18
18
|
id?: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
type ChatExtra = {
|
|
22
|
+
statusUpdates?: StatusInfoMessage[];
|
|
23
|
+
citations?: Citation[];
|
|
24
|
+
};
|
|
25
|
+
interface Props extends ProChatProps<ChatExtra> {
|
|
22
26
|
loading?: boolean;
|
|
23
|
-
onRequest: (messages: ChatMessage[], sessionId: string, onStatusUpdate: (info: StatusInfoMessage) => void) =>
|
|
27
|
+
onRequest: (messages: ChatMessage[], sessionId: string, onStatusUpdate: (info: StatusInfoMessage) => void) => Promise<Response | string>;
|
|
24
28
|
sessionId?: string;
|
|
25
29
|
onFollowupRequest?: (sessionId: string) => Promise<string[] | undefined>;
|
|
26
30
|
frontendUrl: string;
|
package/dist/chatbot/index.js
CHANGED
|
@@ -1,44 +1,52 @@
|
|
|
1
|
-
import { j as t, C as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useProChat as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { S as
|
|
6
|
-
import { u as V, M as P, v as Q } from "../v4.js";
|
|
1
|
+
import { j as t, C as I, a as T, b as D, D as $, R as N, U as B } from "../index2.js";
|
|
2
|
+
import { useState as S, useEffect as _, useRef as E } from "react";
|
|
3
|
+
import { useProChat as L, ProChat as A } from "@ant-design/pro-chat";
|
|
4
|
+
import { Button as b, Spinner as F, Card as k, CardTitle as O, Collapse as q, CardBody as z, List as H } from "reactstrap";
|
|
5
|
+
import { u as V, S as v, M as P, v as Q } from "../v4.js";
|
|
7
6
|
import { B as G } from "../Badge.js";
|
|
8
|
-
import '../index.css';const J = "_chatbot_1ti7a_1", K = "_chatTriggerLink_1ti7a_1", W = "_statusUpdates_1ti7a_51",
|
|
7
|
+
import '../index.css';const J = "_chatbot_1ti7a_1", K = "_chatTriggerLink_1ti7a_1", W = "_statusUpdates_1ti7a_51", U = {
|
|
9
8
|
chatbot: J,
|
|
10
9
|
chatTriggerLink: K,
|
|
11
10
|
statusUpdates: W
|
|
12
|
-
}, X = ({ text:
|
|
13
|
-
const { sendMessage: d } =
|
|
14
|
-
return /* @__PURE__ */ t.jsx(
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
}, X = ({ text: o }) => {
|
|
12
|
+
const { sendMessage: d } = L();
|
|
13
|
+
return /* @__PURE__ */ t.jsx(
|
|
14
|
+
b,
|
|
15
|
+
{
|
|
16
|
+
onClick: () => d(o),
|
|
17
|
+
color: "link",
|
|
18
|
+
className: U.chatTriggerLink,
|
|
19
|
+
children: o
|
|
20
|
+
},
|
|
21
|
+
o
|
|
22
|
+
);
|
|
23
|
+
}, Y = ({ onFollowupRequest: o, sessionId: d }) => {
|
|
24
|
+
const { data: a } = V({
|
|
17
25
|
// @ts-expect-error valid
|
|
18
|
-
queryFn: () =>
|
|
26
|
+
queryFn: () => o(d)
|
|
19
27
|
});
|
|
20
|
-
return
|
|
21
|
-
}, Z = ({ chat:
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
return a != null && a.length ? /* @__PURE__ */ t.jsx(v, { direction: "column", children: a.map((l) => /* @__PURE__ */ t.jsx(X, { text: l }, l)) }) : null;
|
|
29
|
+
}, Z = ({ chat: o }) => {
|
|
30
|
+
var j;
|
|
31
|
+
const { getChatLoadingId: d } = L(), [a, l] = S(!0), { originData: p } = o, x = d();
|
|
32
|
+
if (_(() => {
|
|
33
|
+
x || l(!1);
|
|
34
|
+
}, [x]), !((j = p == null ? void 0 : p.statusUpdates) != null && j.length))
|
|
27
35
|
return null;
|
|
28
|
-
const
|
|
36
|
+
const i = () => l((h) => !h), [C, ...m] = p.statusUpdates.filter(
|
|
29
37
|
(h) => h.type === "info"
|
|
30
|
-
),
|
|
31
|
-
return /* @__PURE__ */ t.jsxs(k, { className:
|
|
32
|
-
/* @__PURE__ */ t.jsxs(O, { color: "primary", onClick:
|
|
38
|
+
), y = o.loading ? /* @__PURE__ */ t.jsx(F, { size: "sm" }) : /* @__PURE__ */ t.jsx(I, {});
|
|
39
|
+
return /* @__PURE__ */ t.jsxs(k, { className: U.statusUpdates, children: [
|
|
40
|
+
/* @__PURE__ */ t.jsxs(O, { color: "primary", onClick: i, children: [
|
|
33
41
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
34
|
-
|
|
42
|
+
y,
|
|
35
43
|
" ",
|
|
36
|
-
|
|
44
|
+
C.message
|
|
37
45
|
] }),
|
|
38
|
-
|
|
46
|
+
a ? /* @__PURE__ */ t.jsx(D, {}) : /* @__PURE__ */ t.jsx(T, {})
|
|
39
47
|
] }),
|
|
40
|
-
|
|
41
|
-
/* @__PURE__ */ t.jsx(
|
|
48
|
+
m.length ? /* @__PURE__ */ t.jsx(q, { isOpen: a, children: /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsx(z, { children: /* @__PURE__ */ t.jsx(H, { className: "list-unstyled m-0", style: { lineHeight: 1.5 }, children: m.map((h) => /* @__PURE__ */ t.jsxs("li", { children: [
|
|
49
|
+
/* @__PURE__ */ t.jsx(I, {}),
|
|
42
50
|
" ",
|
|
43
51
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(P, { children: h.message.trim().replace(/```/g, "\n```") }) })
|
|
44
52
|
] }, h.id)) }) }) }) }) : null
|
|
@@ -46,72 +54,74 @@ import '../index.css';const J = "_chatbot_1ti7a_1", K = "_chatTriggerLink_1ti7a_
|
|
|
46
54
|
}, tt = "_citations_18435_1", et = {
|
|
47
55
|
citations: tt
|
|
48
56
|
}, st = ({
|
|
49
|
-
citations:
|
|
57
|
+
citations: o,
|
|
50
58
|
frontendUrl: d
|
|
51
|
-
}) =>
|
|
59
|
+
}) => o != null && o.length ? /* @__PURE__ */ t.jsxs(v, { className: et.citations, children: [
|
|
52
60
|
"Learnings applied:",
|
|
53
|
-
/* @__PURE__ */ t.jsx("ul", { style: { padding: 0, display: "flex", gap: 8, marginTop: -2 }, children:
|
|
61
|
+
/* @__PURE__ */ t.jsx("ul", { style: { padding: 0, display: "flex", gap: 8, marginTop: -2 }, children: o.map((a, l) => /* @__PURE__ */ t.jsx("li", { style: { listStyle: "none" }, children: /* @__PURE__ */ t.jsx(
|
|
54
62
|
G,
|
|
55
63
|
{
|
|
56
64
|
tag: "a",
|
|
57
|
-
href: `${d}/teammates/${
|
|
58
|
-
tooltip:
|
|
59
|
-
children:
|
|
65
|
+
href: `${d}/teammates/${a.taskLabel}?learning=${a.id}`,
|
|
66
|
+
tooltip: a.content,
|
|
67
|
+
children: l + 1
|
|
60
68
|
}
|
|
61
|
-
) },
|
|
62
|
-
] }) : null,
|
|
63
|
-
loading:
|
|
69
|
+
) }, a.id)) })
|
|
70
|
+
] }) : null, lt = ({
|
|
71
|
+
loading: o,
|
|
64
72
|
onRequest: d,
|
|
65
|
-
sessionId:
|
|
66
|
-
onFollowupRequest:
|
|
67
|
-
frontendUrl:
|
|
68
|
-
...
|
|
73
|
+
sessionId: a,
|
|
74
|
+
onFollowupRequest: l,
|
|
75
|
+
frontendUrl: p,
|
|
76
|
+
...x
|
|
69
77
|
}) => {
|
|
70
|
-
const i =
|
|
78
|
+
const i = E(), C = (e = 16) => {
|
|
71
79
|
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
72
80
|
return Array.from(
|
|
73
81
|
{ length: e },
|
|
74
82
|
() => s.charAt(Math.floor(Math.random() * s.length))
|
|
75
83
|
).join("");
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, [
|
|
80
|
-
const
|
|
81
|
-
var
|
|
82
|
-
const s = (
|
|
84
|
+
}, [m, y] = S(C());
|
|
85
|
+
_(() => {
|
|
86
|
+
a && y(a);
|
|
87
|
+
}, [a]);
|
|
88
|
+
const j = (e) => {
|
|
89
|
+
var r, n, c, g;
|
|
90
|
+
const s = (r = i.current) == null ? void 0 : r.getChatLoadingId();
|
|
83
91
|
if (console.log("onStatusUpdate", e, s), s) {
|
|
84
|
-
const u = (
|
|
85
|
-
|
|
86
|
-
s,
|
|
87
|
-
"content",
|
|
88
|
-
(u == null ? void 0 : u.content) + " "
|
|
89
|
-
);
|
|
92
|
+
const u = (n = i.current) == null ? void 0 : n.getChatById(s), f = u != null && u.extra ? { ...u.extra } : {}, M = e.id || Q();
|
|
93
|
+
f.statusUpdates = f.statusUpdates ? [{ ...e, id: M }, ...f.statusUpdates] : [{ ...e, id: M }], (c = i.current) == null || c.setMessageValue(s, "extra", f), (g = i.current) == null || g.setMessageValue(s, "content", (u == null ? void 0 : u.content) + " ");
|
|
90
94
|
}
|
|
91
|
-
},
|
|
95
|
+
}, h = async (e) => {
|
|
96
|
+
var s, r;
|
|
92
97
|
try {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
const n = e.filter((g) => g.role === "user"), c = n[n.length - 1];
|
|
99
|
+
if (!((s = c.content) != null && s.toString().trim())) {
|
|
100
|
+
(r = i.current) == null || r.deleteMessage(c.id);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
return await d(e, m, j);
|
|
104
|
+
} catch (n) {
|
|
105
|
+
return typeof n == "string" ? n : n.message;
|
|
96
106
|
}
|
|
97
|
-
},
|
|
107
|
+
}, w = () => {
|
|
98
108
|
setTimeout(() => {
|
|
99
|
-
var
|
|
100
|
-
const e = (
|
|
109
|
+
var r, n, c;
|
|
110
|
+
const e = (r = i.current) == null ? void 0 : r.getChats();
|
|
101
111
|
if (!(e != null && e.length))
|
|
102
112
|
return;
|
|
103
113
|
const s = e[e.length - 1];
|
|
104
|
-
(
|
|
114
|
+
(c = i.current) == null || c.setChat(s.id, {
|
|
105
115
|
...s,
|
|
106
|
-
content: (
|
|
116
|
+
content: (n = s.content) == null ? void 0 : n.replace(/\\\$/g, "$").replace(/\$/g, "\\$")
|
|
107
117
|
});
|
|
108
118
|
}, 100);
|
|
109
|
-
},
|
|
119
|
+
}, R = () => {
|
|
110
120
|
var s;
|
|
111
121
|
const e = (s = i.current) == null ? void 0 : s.getChats();
|
|
112
|
-
e == null || e.forEach((
|
|
113
|
-
var
|
|
114
|
-
return (
|
|
122
|
+
e == null || e.forEach((r) => {
|
|
123
|
+
var n;
|
|
124
|
+
return (n = i.current) == null ? void 0 : n.deleteMessage(r.id);
|
|
115
125
|
});
|
|
116
126
|
};
|
|
117
127
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -119,64 +129,58 @@ import '../index.css';const J = "_chatbot_1ti7a_1", K = "_chatTriggerLink_1ti7a_
|
|
|
119
129
|
{
|
|
120
130
|
actions: {
|
|
121
131
|
render: () => [
|
|
122
|
-
/* @__PURE__ */ t.jsxs(
|
|
132
|
+
/* @__PURE__ */ t.jsxs(b, { onClick: R, outline: !0, color: "primary", size: "sm", children: [
|
|
123
133
|
"Clear chat ",
|
|
124
|
-
/* @__PURE__ */ t.jsx(
|
|
125
|
-
] })
|
|
134
|
+
/* @__PURE__ */ t.jsx($, { className: "align-middle" })
|
|
135
|
+
] }, "clear-chat")
|
|
126
136
|
]
|
|
127
137
|
},
|
|
128
138
|
locale: "en-US",
|
|
129
|
-
request:
|
|
139
|
+
request: h,
|
|
130
140
|
appStyle: { height: "100%", width: "100%" },
|
|
131
141
|
assistantMeta: {
|
|
132
|
-
avatar:
|
|
142
|
+
avatar: N,
|
|
133
143
|
name: "Altimate"
|
|
134
144
|
},
|
|
135
145
|
helloMessage: "Hello, how are you??",
|
|
136
146
|
userMeta: {
|
|
137
|
-
avatar:
|
|
147
|
+
avatar: B,
|
|
138
148
|
name: "User"
|
|
139
149
|
},
|
|
140
|
-
loading:
|
|
141
|
-
className:
|
|
150
|
+
loading: o,
|
|
151
|
+
className: U.chatbot,
|
|
142
152
|
chatRef: i,
|
|
143
|
-
onChatEnd:
|
|
153
|
+
onChatEnd: w,
|
|
144
154
|
chatItemRenderConfig: {
|
|
145
155
|
contentRender: (e, s) => {
|
|
146
|
-
var
|
|
147
|
-
const
|
|
156
|
+
var n, c, g;
|
|
157
|
+
const r = (g = (c = (n = e.originData) == null ? void 0 : n.extra) == null ? void 0 : c.statusUpdates) == null ? void 0 : g.find((u) => u.type === "citations");
|
|
148
158
|
return /* @__PURE__ */ t.jsxs("div", { children: [
|
|
149
|
-
/* @__PURE__ */ t.jsx(Z, { chat: e }),
|
|
159
|
+
/* @__PURE__ */ t.jsx(Z, { chat: { ...e, originData: e.originData || {} } }),
|
|
150
160
|
s,
|
|
151
|
-
/* @__PURE__ */ t.jsx(st, { citations:
|
|
161
|
+
/* @__PURE__ */ t.jsx(st, { citations: r == null ? void 0 : r.citations, frontendUrl: p })
|
|
152
162
|
] });
|
|
153
163
|
},
|
|
154
|
-
render: (e, s,
|
|
155
|
-
var
|
|
156
|
-
const
|
|
164
|
+
render: (e, s, r) => {
|
|
165
|
+
var c;
|
|
166
|
+
const n = e.loading || !l || ((c = e.originData) == null ? void 0 : c.role) !== "assistant";
|
|
157
167
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Y,
|
|
161
|
-
{
|
|
162
|
-
onFollowupRequest: c,
|
|
163
|
-
sessionId: p
|
|
164
|
-
}
|
|
165
|
-
)
|
|
168
|
+
r,
|
|
169
|
+
n ? null : /* @__PURE__ */ t.jsx(Y, { onFollowupRequest: l, sessionId: m })
|
|
166
170
|
] });
|
|
167
171
|
}
|
|
168
172
|
},
|
|
169
173
|
markdownProps: {
|
|
170
174
|
components: {
|
|
171
|
-
pre: ({ node: e, className: s, children:
|
|
175
|
+
pre: ({ node: e, className: s, children: r, ...n }) => /* @__PURE__ */ t.jsx("pre", { ...n, className: s, children: r })
|
|
172
176
|
}
|
|
173
177
|
},
|
|
174
|
-
...
|
|
178
|
+
...x
|
|
175
179
|
}
|
|
176
180
|
);
|
|
177
181
|
};
|
|
178
182
|
export {
|
|
179
183
|
X as ChatTriggerLink,
|
|
180
|
-
|
|
184
|
+
lt as Chatbot,
|
|
181
185
|
st as Citations
|
|
182
186
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { FC } from 'react';
|
|
2
|
-
import { T as TaskLabels } from '../types-
|
|
2
|
+
import { T as TaskLabels } from '../types-FVWfXDNw.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import '@reduxjs/toolkit';
|
|
5
5
|
import 'zod';
|
|
@@ -38,6 +38,11 @@ interface FileUploadProps {
|
|
|
38
38
|
allowedFiles: string;
|
|
39
39
|
contextFieldKey: string;
|
|
40
40
|
}
|
|
41
|
+
interface ChatbotUrls {
|
|
42
|
+
origin?: string;
|
|
43
|
+
askPath?: string;
|
|
44
|
+
proceedPath?: string;
|
|
45
|
+
}
|
|
41
46
|
interface ChatbotProps {
|
|
42
47
|
helloMessage?: React.ReactNode;
|
|
43
48
|
assistantMeta?: AssistantMeta;
|
|
@@ -99,6 +104,7 @@ interface ChatState {
|
|
|
99
104
|
initialValidation?: (data: {
|
|
100
105
|
context: ChatSession["context"];
|
|
101
106
|
}) => Promise<void>;
|
|
107
|
+
urls?: ChatbotUrls;
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
declare const Chatbot: FC<ChatbotProps>;
|
|
@@ -107,6 +113,8 @@ declare const ChatProvider: React__default.FC<{
|
|
|
107
113
|
children: React__default.ReactNode;
|
|
108
114
|
taskLabel?: keyof typeof TaskLabels;
|
|
109
115
|
initialValidation?: ChatState["initialValidation"];
|
|
116
|
+
onError?: (error: unknown) => void;
|
|
117
|
+
urls?: ChatbotUrls;
|
|
110
118
|
}>;
|
|
111
119
|
|
|
112
120
|
interface ArtifactsProps {
|
|
@@ -173,4 +181,4 @@ interface StatusUpdatesProps {
|
|
|
173
181
|
}
|
|
174
182
|
declare const StatusUpdates: FC<StatusUpdatesProps>;
|
|
175
183
|
|
|
176
|
-
export { type AgentAction, type Artifact, Artifacts, type AssistantMeta, CancelGenerationButton, type ChatMessage, ChatProvider, type ChatResponse, type ChatSession, type ChatState, type ChatbotProps, Chatbot as ChatbotV2, CoachAI, ContextPanel, type Feedback, FeedbackButtons, type InteractionChoice, InteractionPrompt, type InteractionRequest, type InteractionType, LoadingIndicator, LoadingState, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates };
|
|
184
|
+
export { type AgentAction, type Artifact, Artifacts, type AssistantMeta, CancelGenerationButton, type ChatMessage, ChatProvider, type ChatResponse, type ChatSession, type ChatState, type ChatbotProps, type ChatbotUrls, Chatbot as ChatbotV2, CoachAI, ContextPanel, type Feedback, FeedbackButtons, type InteractionChoice, InteractionPrompt, type InteractionRequest, type InteractionType, LoadingIndicator, LoadingState, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as DH, q as wMe, r as gMe, l as K1, j as J1n, t as pMe, s as vMe, u as Y1n, v as mMe, w as kMe, x as Uee, y as yMe, z as Q1n, B as $H, D as jMe, E as EMe } from "./CoachForm.js";
|
|
2
2
|
import { s as bI } from "./redux-toolkit.modern.js";
|
|
3
|
-
import { c as Hee, g as CMe } from "./
|
|
3
|
+
import { c as Hee, g as CMe } from "./Tooltip.js";
|
|
4
4
|
var Wee = { exports: {} };
|
|
5
5
|
(function(Ae, It) {
|
|
6
6
|
(function(ot) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps, BadgeProps } from 'reactstrap';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-
|
|
5
|
-
export { f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, l as learningSchema } from './types-
|
|
4
|
+
import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-FVWfXDNw.js';
|
|
5
|
+
export { f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-FVWfXDNw.js';
|
|
6
6
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
7
7
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
8
8
|
import * as immer from 'immer';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
|
|
11
|
-
interface Props$
|
|
11
|
+
interface Props$9 extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
12
|
color?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const IconButton: (props: Props$
|
|
14
|
+
declare const IconButton: (props: Props$9) => JSX.Element;
|
|
15
15
|
|
|
16
|
-
interface Props$
|
|
16
|
+
interface Props$8 {
|
|
17
17
|
children: ReactNode;
|
|
18
18
|
title?: string | ReactNode;
|
|
19
19
|
id?: string;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
declare const Tooltip: (props: Props$
|
|
22
|
+
declare const Tooltip: (props: Props$8) => JSX.Element;
|
|
23
23
|
|
|
24
|
-
interface Props$
|
|
24
|
+
interface Props$7 extends ButtonProps {
|
|
25
25
|
loading: boolean;
|
|
26
26
|
}
|
|
27
|
-
declare const LoadingButton: ({ loading, ...rest }: Props$
|
|
27
|
+
declare const LoadingButton: ({ loading, ...rest }: Props$7) => JSX.Element;
|
|
28
28
|
|
|
29
|
-
interface Props$
|
|
29
|
+
interface Props$6 {
|
|
30
30
|
code: string;
|
|
31
31
|
language: "sql" | "yaml" | "markdown" | "json" | "javascript";
|
|
32
32
|
fileName?: string;
|
|
@@ -36,12 +36,12 @@ interface Props$7 {
|
|
|
36
36
|
className?: string;
|
|
37
37
|
titleActions?: ReactNode;
|
|
38
38
|
}
|
|
39
|
-
declare const CodeBlockComponent: ({ code, language, fileName, editorTheme, theme, showLineNumbers, className, titleActions, }: Props$
|
|
39
|
+
declare const CodeBlockComponent: ({ code, language, fileName, editorTheme, theme, showLineNumbers, className, titleActions, }: Props$6) => JSX.Element;
|
|
40
40
|
|
|
41
|
-
interface Props$
|
|
41
|
+
interface Props$5 extends BadgeProps {
|
|
42
42
|
tooltip: Parameters<typeof Tooltip>[0]["title"];
|
|
43
43
|
}
|
|
44
|
-
declare const Badge: ({ tooltip, ...props }: Props$
|
|
44
|
+
declare const Badge: ({ tooltip, ...props }: Props$5) => react_jsx_runtime.JSX.Element;
|
|
45
45
|
|
|
46
46
|
declare const ApiHelper: {
|
|
47
47
|
get: <T>(_url: string, _data?: Record<string, unknown>, _request?: RequestInit) => Promise<T>;
|
|
@@ -97,15 +97,15 @@ declare enum ConversationSources {
|
|
|
97
97
|
SAAS = "saas"
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
interface Props$
|
|
100
|
+
interface Props$4 {
|
|
101
101
|
shareId: number;
|
|
102
102
|
userId?: number;
|
|
103
103
|
conversationGroupId?: number;
|
|
104
104
|
source: ConversationSources;
|
|
105
105
|
}
|
|
106
|
-
declare const DbtDocs: ({ shareId, userId, conversationGroupId, source }: Props$
|
|
106
|
+
declare const DbtDocs: ({ shareId, userId, conversationGroupId, source }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
107
107
|
|
|
108
|
-
interface Props$
|
|
108
|
+
interface Props$3 {
|
|
109
109
|
comment: string;
|
|
110
110
|
setComment: (comment: string) => void;
|
|
111
111
|
loading: boolean;
|
|
@@ -114,9 +114,9 @@ interface Props$4 {
|
|
|
114
114
|
placeholder?: string;
|
|
115
115
|
onEnterKeypress?: () => void;
|
|
116
116
|
}
|
|
117
|
-
declare const ConversationInputForm: ({ comment, setComment, loading, users, currentUser, placeholder, onEnterKeypress, }: Props$
|
|
117
|
+
declare const ConversationInputForm: ({ comment, setComment, loading, users, currentUser, placeholder, onEnterKeypress, }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
118
118
|
|
|
119
|
-
interface Props$
|
|
119
|
+
interface Props$2 {
|
|
120
120
|
currentUser?: User;
|
|
121
121
|
conversationGroup?: ConversationGroup;
|
|
122
122
|
shareId?: DbtDocsShareDetails["share_id"];
|
|
@@ -127,9 +127,9 @@ interface Props$3 {
|
|
|
127
127
|
onReplyAdd: () => void;
|
|
128
128
|
source: ConversationSources;
|
|
129
129
|
}
|
|
130
|
-
declare const ConversationGroupProvider: ({ currentUser, conversationGroup, shareId, onSelect, isSelected, users, onResolve, onReplyAdd, source, }: Props$
|
|
130
|
+
declare const ConversationGroupProvider: ({ currentUser, conversationGroup, shareId, onSelect, isSelected, users, onResolve, onReplyAdd, source, }: Props$2) => JSX.Element | null;
|
|
131
131
|
|
|
132
|
-
declare const TeamMateProvider: ({ children
|
|
132
|
+
declare const TeamMateProvider: ({ children }: {
|
|
133
133
|
children: ReactNode;
|
|
134
134
|
}) => JSX.Element;
|
|
135
135
|
|
|
@@ -141,9 +141,7 @@ interface CoachFormProps {
|
|
|
141
141
|
}
|
|
142
142
|
declare const CoachForm: (props: CoachFormProps) => react_jsx_runtime.JSX.Element;
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
declare const CoachFormButton: ({}: Props$2) => react_jsx_runtime.JSX.Element;
|
|
144
|
+
declare const CoachFormButton: () => react_jsx_runtime.JSX.Element;
|
|
147
145
|
|
|
148
146
|
declare const useTeamMateContext: () => TeamMateContextProps;
|
|
149
147
|
|
|
@@ -159,14 +157,6 @@ interface Props$1 {
|
|
|
159
157
|
}
|
|
160
158
|
declare const LearningsPage: ({ filters, learning }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
161
159
|
|
|
162
|
-
declare const TeamMatesConfig: TeamMateConfig[];
|
|
163
|
-
|
|
164
|
-
interface Props {
|
|
165
|
-
onSelect: (selected: (typeof TeamMatesConfig)[0], action: TeamMateActionType) => Promise<boolean | undefined>;
|
|
166
|
-
client: keyof typeof TeamMateAvailability;
|
|
167
|
-
}
|
|
168
|
-
declare const TeamMates: ({ onSelect, client }: Props) => react_jsx_runtime.JSX.Element;
|
|
169
|
-
|
|
170
160
|
declare enum ProjectGovernorCheckTypes {
|
|
171
161
|
DOCUMENTATION = "documentation",
|
|
172
162
|
TESTS = "tests",
|
|
@@ -214,4 +204,12 @@ interface ProjectGovernorCheck extends z.infer<typeof ProjectGovernorCheckSchema
|
|
|
214
204
|
id: string;
|
|
215
205
|
}
|
|
216
206
|
|
|
207
|
+
declare const TeamMatesConfig: TeamMateConfig<ProjectGovernorCheckConfirmationResponse>[];
|
|
208
|
+
|
|
209
|
+
interface Props {
|
|
210
|
+
onSelect: (selected: (typeof TeamMatesConfig)[0], action: TeamMateActionType) => Promise<boolean | undefined>;
|
|
211
|
+
client: keyof typeof TeamMateAvailability;
|
|
212
|
+
}
|
|
213
|
+
declare const TeamMates: ({ onSelect, client }: Props) => react_jsx_runtime.JSX.Element;
|
|
214
|
+
|
|
217
215
|
export { ApiHelper, Badge, CoachForm, CoachFormButton, CodeBlockComponent as CodeBlock, type Conversation, type ConversationGroup, ConversationGroupProvider, ConversationInputForm, ConversationSources, DbtDocs, type DbtDocsShareDetails, IconButton, LearningsPage as Learnings, LoadingButton, ProjectGovernorAllowedFiles, type ProjectGovernorCheck, type ProjectGovernorCheckConfirmationResponse, type ProjectGovernorCheckFormValues, ProjectGovernorCheckSchema, ProjectGovernorCheckTypes, type ProjectGovernorCheckValidateResponse, TaskLabels, TeamMateActionType, TeamMateAvailability, TeamMateConfig, TeamMateContextProps, TeamMateProvider, TeamMateState, TeamMates, TeamMatesConfig, TeammateActions, Tooltip, useTeamMateContext };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as s, i as r, h as t, C as n, D as i, L as m, T as c, m as p, l as C, k as T } from "./main.js";
|
|
2
2
|
import "reactstrap";
|
|
3
3
|
import { A as v, C as h, I as u } from "./redux-toolkit.modern.js";
|
|
4
|
-
import { T as f } from "./
|
|
4
|
+
import { T as f } from "./Tooltip.js";
|
|
5
5
|
import { Z as x, T as A, J as B, V as M, a0 as P, a1 as k, $ as j, _ as y, W as F, X as G, Y as L, O as S } from "./CoachForm.js";
|
|
6
6
|
import { B as D } from "./Badge.js";
|
|
7
7
|
export {
|