udp-react-enterprise-component-library 25.16.2-beta.8 → 25.16.2-beta.9
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/{ChatBotProvider-CJm7axqc.js → ChatBotProvider-E-wyZLY_.js} +9 -21
- package/dist/ChatBotProvider-E-wyZLY_.js.map +1 -0
- package/dist/{ChatContainer-DD6TNut3.js → ChatContainer-Dnm64tul.js} +7 -5
- package/dist/{ChatContainer-DD6TNut3.js.map → ChatContainer-Dnm64tul.js.map} +1 -1
- package/dist/{ChatUDP-CVk9nPhb.js → ChatUDP-USJunrhX.js} +2 -2
- package/dist/{ChatUDP-CVk9nPhb.js.map → ChatUDP-USJunrhX.js.map} +1 -1
- package/dist/{Shell-D1jno7Hq.js → Shell-DzTnenAf.js} +2 -2
- package/dist/{Shell-D1jno7Hq.js.map → Shell-DzTnenAf.js.map} +1 -1
- package/dist/{UdpPages-CeRpWBf8.js → UdpPages-BlEKkXVL.js} +2 -2
- package/dist/{UdpPages-CeRpWBf8.js.map → UdpPages-BlEKkXVL.js.map} +1 -1
- package/dist/chatBot/index.js +1 -1
- package/dist/index.js +5 -5
- package/dist/shell/index.js +2 -2
- package/dist/types/src/chatBot/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/utilities/chatBot/ChatBotProvider.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/udp/pages/ChatUDP/index.js +2 -2
- package/dist/udp/pages/UdpPages/index.js +3 -3
- package/dist/udp/pages/index.js +3 -3
- package/dist/utilities/chatBot/index.js +1 -1
- package/export-map.json +1 -1
- package/package.json +1 -1
- package/dist/ChatBotProvider-CJm7axqc.js.map +0 -1
|
@@ -10,26 +10,15 @@ var MessageStatus = /* @__PURE__ */ function(MessageStatus$1) {
|
|
|
10
10
|
return MessageStatus$1;
|
|
11
11
|
}(MessageStatus || {});
|
|
12
12
|
const ChatBotProvider = ({ children }) => {
|
|
13
|
-
|
|
13
|
+
(/* @__PURE__ */ new Date()).toLocaleString([], {
|
|
14
14
|
hour: "2-digit",
|
|
15
15
|
minute: "2-digit",
|
|
16
16
|
hour12: true
|
|
17
17
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
name: "AI Assistant"
|
|
21
|
-
};
|
|
22
|
-
const messageText = "Welcome! How can I help you search our Product Documentation?";
|
|
23
|
-
const [messageHistory, setMessageHistory] = useState([{
|
|
24
|
-
createdAt: defaultCreatedAt,
|
|
25
|
-
createdBy: defaultCreatedBy,
|
|
26
|
-
messageContent: messageText,
|
|
27
|
-
messageStatus: MessageStatus.Sent,
|
|
28
|
-
outgoing: false,
|
|
29
|
-
messageText
|
|
30
|
-
}]);
|
|
18
|
+
MessageStatus.Sent;
|
|
19
|
+
const [messageHistory, setMessageHistory] = useState([]);
|
|
31
20
|
const user = useUser();
|
|
32
|
-
const createMessage = (messageContent, createdBy, messageText
|
|
21
|
+
const createMessage = (messageContent, createdBy, messageText) => {
|
|
33
22
|
return {
|
|
34
23
|
createdAt: (/* @__PURE__ */ new Date()).toLocaleString([], {
|
|
35
24
|
hour: "2-digit",
|
|
@@ -38,18 +27,17 @@ const ChatBotProvider = ({ children }) => {
|
|
|
38
27
|
}),
|
|
39
28
|
createdBy,
|
|
40
29
|
messageContent,
|
|
41
|
-
messageText
|
|
30
|
+
messageText,
|
|
42
31
|
messageStatus: MessageStatus.Sent,
|
|
43
32
|
outgoing: createdBy.id === user?.id
|
|
44
33
|
};
|
|
45
34
|
};
|
|
46
|
-
const addMessage = (messageContent, createdBy, messageText
|
|
47
|
-
const newMessage = createMessage(messageContent, createdBy, messageText
|
|
35
|
+
const addMessage = (messageContent, createdBy, messageText) => {
|
|
36
|
+
const newMessage = createMessage(messageContent, createdBy, messageText);
|
|
48
37
|
setMessageHistory((prevState) => [...prevState, newMessage]);
|
|
49
38
|
};
|
|
50
39
|
const removeMessageHistory = (messageContent, createdBy) => {
|
|
51
|
-
|
|
52
|
-
setMessageHistory(() => [newMessage]);
|
|
40
|
+
setMessageHistory(() => []);
|
|
53
41
|
};
|
|
54
42
|
const removeLoadingMessage = () => {
|
|
55
43
|
setMessageHistory((prevState) => prevState.filter((message) => !message.createdBy.loading));
|
|
@@ -64,4 +52,4 @@ const ChatBotProvider = ({ children }) => {
|
|
|
64
52
|
|
|
65
53
|
//#endregion
|
|
66
54
|
export { ChatBotProvider as t };
|
|
67
|
-
//# sourceMappingURL=ChatBotProvider-
|
|
55
|
+
//# sourceMappingURL=ChatBotProvider-E-wyZLY_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatBotProvider-E-wyZLY_.js","names":[],"sources":["../src/utilities/chatBot/ChatBotProvider.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useUser } from '../auth/useUser';\nimport { ChatBotContext } from './ChatBotContext';\n\ninterface Message {\n createdAt: string | undefined;\n createdBy: { name: string; loading: boolean };\n messageContent: string | JSX.Element | undefined;\n messageStatus: MessageStatus | undefined;\n outgoing: boolean | undefined;\n messageText: string | undefined;\n}\n\nenum MessageStatus {\n Sent = 0,\n Delivered = 1,\n Error = -1\n}\n\n\nexport const ChatBotProvider = ({ children }) => {\n const defaultCreatedAt = new Date().toLocaleString([], { hour: '2-digit', minute: '2-digit', hour12: true });\n const defaultCreatedBy = {loading: false, name: 'AI Assistant' };\n const messageText = 'Welcome! How can I help you search our Product Documentation?';\n const welcomeMessage: Message = {\n createdAt: defaultCreatedAt,\n createdBy: defaultCreatedBy,\n messageContent: messageText,\n messageStatus: MessageStatus.Sent,\n outgoing: false,\n messageText\n };\n\n const [messageHistory, setMessageHistory] = useState<Message[]>([]);\n const user = useUser();\n\n const createMessage = (messageContent: string | JSX.Element, createdBy, messageText) => {\n const newMessage: Message = {\n createdAt: new Date().toLocaleString([], { hour: '2-digit', minute: '2-digit', hour12: true }),\n createdBy,\n messageContent,\n messageText,\n messageStatus: MessageStatus.Sent,\n outgoing: createdBy.id === user?.id,\n };\n\n return newMessage\n }\n\n const addMessage = (messageContent: string | JSX.Element, createdBy, messageText) => {\n const newMessage = createMessage(messageContent, createdBy, messageText)\n setMessageHistory((prevState) => [...prevState, newMessage]);\n };\n\n const removeMessageHistory = (messageContent: string | JSX.Element, createdBy) => {\n setMessageHistory(() => []);\n };\n\n const removeLoadingMessage = () => {\n setMessageHistory((prevState) =>\n prevState.filter((message) => !message.createdBy.loading)\n );\n };\n\n return (\n <ChatBotContext.Provider\n value={{\n messageHistory,\n addMessage,\n removeMessageHistory,\n removeLoadingMessage,\n }}\n >\n {children}\n </ChatBotContext.Provider>\n );\n};\n"],"mappings":";;;;;AAaA,IAAK,0DAAL;AACE;AACA;AACA;;EAHG;AAOL,MAAa,mBAAmB,EAAE,eAAe;AACtB,sBAAI,MAAM,EAAC,eAAe,EAAE,EAAE;EAAE,MAAM;EAAW,QAAQ;EAAW,QAAQ;EAAM,CAAC;AAG5E,CAIf,cAAc;CAK/B,MAAM,CAAC,gBAAgB,qBAAqB,SAAoB,EAAE,CAAC;CACnE,MAAM,OAAO,SAAS;CAEtB,MAAM,iBAAiB,gBAAsC,WAAW,gBAAgB;AAUtF,SAT4B;GAC1B,4BAAW,IAAI,MAAM,EAAC,eAAe,EAAE,EAAE;IAAE,MAAM;IAAW,QAAQ;IAAW,QAAQ;IAAM,CAAC;GAC9F;GACA;GACA;GACA,eAAe,cAAc;GAC7B,UAAU,UAAU,OAAO,MAAM;GAClC;;CAKH,MAAM,cAAc,gBAAsC,WAAW,gBAAgB;EACnF,MAAM,aAAa,cAAc,gBAAgB,WAAW,YAAY;AACxE,qBAAmB,cAAc,CAAC,GAAG,WAAW,WAAW,CAAC;;CAG9D,MAAM,wBAAwB,gBAAsC,cAAc;AAChF,0BAAwB,EAAE,CAAC;;CAG7B,MAAM,6BAA6B;AACjC,qBAAmB,cACjB,UAAU,QAAQ,YAAY,CAAC,QAAQ,UAAU,QAAQ,CAC1D;;AAGH,QACE,oCAAC,eAAe,YACd,OAAO;EACL;EACA;EACA;EACA;EACD,IAEA,SACuB"}
|
|
@@ -168,10 +168,11 @@ const ChatContainer = (props) => {
|
|
|
168
168
|
max_tokens: 4096,
|
|
169
169
|
temperature: .5,
|
|
170
170
|
n: 1,
|
|
171
|
+
presence_penalty: 0,
|
|
171
172
|
messages: [
|
|
172
173
|
{
|
|
173
174
|
role: "system",
|
|
174
|
-
content: "You are an assistant helping a user
|
|
175
|
+
content: "You are an assistant helping a user using existing knowledge supplemented by additional data."
|
|
175
176
|
},
|
|
176
177
|
...messageHistory.map((item) => ({
|
|
177
178
|
role: item.createdBy.name === "AI Assistant" ? "assistant" : item.createdBy.name === "You" ? "user" : item.createdBy.name,
|
|
@@ -186,16 +187,17 @@ const ChatContainer = (props) => {
|
|
|
186
187
|
type: "azure_search",
|
|
187
188
|
parameters: {
|
|
188
189
|
endpoint: aiSearchUrl,
|
|
189
|
-
|
|
190
|
+
semantic_configuration: aiSearchIndexName,
|
|
191
|
+
query_type: "semantic",
|
|
190
192
|
in_scope: false,
|
|
191
|
-
role_information: "You are an AI search assistant having access to wiki documentation data, please be help the user answer any questions to the best of your ability, or provide any search results in relevant documentation when answers are not directly available.",
|
|
192
193
|
strictness: 1,
|
|
193
194
|
top_n_documents: 5,
|
|
194
195
|
authentication: {
|
|
195
196
|
type: "api_key",
|
|
196
197
|
key: aiSearchKey
|
|
197
198
|
},
|
|
198
|
-
index_name: aiSearchIndexName
|
|
199
|
+
index_name: aiSearchIndexName,
|
|
200
|
+
filter: `Products/any(p: p eq '${productId}')`
|
|
199
201
|
}
|
|
200
202
|
}]
|
|
201
203
|
}
|
|
@@ -249,4 +251,4 @@ const ChatContainer = (props) => {
|
|
|
249
251
|
|
|
250
252
|
//#endregion
|
|
251
253
|
export { ChatMessage as n, ChatContainer as t };
|
|
252
|
-
//# sourceMappingURL=ChatContainer-
|
|
254
|
+
//# sourceMappingURL=ChatContainer-Dnm64tul.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainer-DD6TNut3.js","names":["useStyles","makeStyles","newMessageContent","addMessage"],"sources":["../src/chatBot/ChatMessage.jsx","../src/chatBot/ChatContainer.jsx"],"sourcesContent":["import React from 'react';\nimport { makeStyles } from '@material-ui/core';\nimport { Card, CardContent, Typography } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n borderRadius: 5,\n background: (props) => (props.message.outgoing ? '#cdecfa' : '#e1e2e3'),\n width: '85%',\n padding: '3px',\n alignSelf: (props) => props.message.outgoing && 'flex-end',\n flexShrink: 0, \n boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)'\n },\n userName: {\n fontWeight: 'bold'\n },\n timestamp: {\n color: '#A9A9A9',\n margin: '0 0 0 5px',\n },\n}));\n\nexport const ChatMessage = (props) => {\n const classes = useStyles(props);\n const { message } = props;\n\n return (\n <Card className={classes.root}>\n <CardContent>\n <div style={{display:'flex', flexDirection:'row'}}>\n <Typography noWrap variant='caption' className={classes.userName}>\n {message.createdBy.name}\n </Typography>\n {!message.createdBy.loading && (\n <Typography noWrap variant='caption' className={classes.timestamp}>\n {message.createdAt}\n </Typography>\n )}\n </div>\n <div style={{wordWrap: 'break-word'}}>\n <Typography variant='body2' style={{whiteSpace: 'pre-line'}}>\n {message.messageContent}\n </Typography>\n </div>\n </CardContent>\n </Card>\n );\n};\n\n","import React, { useState, useEffect, useRef, useCallback } from 'react';\nimport { AmbientTextField } from '../UI/inputs/textField/AmbientTextField';\nimport { FluentButton } from '../UI/inputs/buttons/FluentButton';\nimport { useUser } from '../utilities/auth/useUser';\nimport { ChatMessage } from './ChatMessage';\nimport { Link, Typography } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { apiMutate } from '../utilities/useAxiosMutate';\nimport { useChatBot } from '../utilities/chatBot/useChatBot';\nimport { useTranslation } from 'react-i18next';\nimport { useSnackbar } from 'notistack';\nimport { ConfigService } from '../configService';\n\nconst useStyles = makeStyles((theme) => ({\n loadingContainer: {\n display: 'inline-block',\n fontSize: '2em', // Adjust the font size to make the whole section bigger\n },\n pulseEllipsis: {\n display: 'inline-block',\n animation: '$pulse 1.5s infinite',\n '&:nth-of-type(2)': {\n animationDelay: '0.5s',\n },\n '&:nth-of-type(3)': {\n animationDelay: '1s',\n },\n },\n '@keyframes pulse': {\n '0%': {\n transform: 'scale(1)',\n opacity: 0.6,\n },\n '50%': {\n transform: 'scale(1.2)',\n opacity: 1,\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.6,\n },\n },\n}));\n\n\nexport const ChatContainer = (props) => {\n const classes = useStyles();\n const { messageHistory, addMessage, removeMessageHistory, removeLoadingMessage } = useChatBot()\n const user = useUser();\n const [newMessageContent, setNewMessageContent] = useState('');\n const messageEndRef = useRef(null);\n const productId = ConfigService.config.UNITY_PRODUCT_ID;\n const aiSearchUrl = ConfigService.config.AI_SEARCH_URL;\n const aiSearchIndexName = ConfigService.config.AI_SEARCH_INDEX_NAME;\n const aiSearchKey = ConfigService.config.AI_SEARCH_KEY;\n const udpAiApiBase = ConfigService.config.UDPAI_API_BASE;\n const { enqueueSnackbar } = useSnackbar();\n const { t } = useTranslation();\n\n const handleSendMessage = async () => {\n addMessage(newMessageContent, { ...user, name: 'You' }, newMessageContent);\n setNewMessageContent('');\n addLoadingMessage();\n\n try {\n await sendMessage(newMessageContent, addMessage);\n removeLoadingMessage();\n } catch (error) {\n console.error('Error sending message:', error);\n }\n };\n\n const handleNewSession = async () => {\n try {\n await removeMessageHistory();\n enqueueSnackbar(t(`Chat Session Cleared`), {\n variant: 'success',\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'center',\n }\n });\n } catch (error) {\n console.error('Error create new chat session:', error);\n }\n }\n\n const addLoadingMessage = () => {\n const messageContent = (\n <div className={classes.loadingContainer}>\n <span className={classes.pulseEllipsis}>.</span>\n <span className={classes.pulseEllipsis}>.</span>\n <span className={classes.pulseEllipsis}>.</span>\n </div>\n );\n addMessage(messageContent, { name: 'AI Assistant', loading: true }, \"\");\n };\n\n\n useEffect(() => {\n messageEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n }, [messageHistory]);\n\n\n const formatCitations = (citations) => {\n return (\n <div>\n <ol>\n {citations.map((citation) => {\n return (\n <li>\n <Link href={citation.url} target='_blank' rel='noopener'>\n <Typography variant='body2' style={{ whiteSpace: 'pre-line' }}>\n {citation.title}\n </Typography>\n </Link>\n </li>\n );\n })}\n </ol>\n </div>\n );\n };\n\n const parseAiResponse = (response, addMessage) => {\n try {\n const gptResponseMessage = response.data.LLMResponse.choices[0].message;\n const messageText = gptResponseMessage.content;\n const citations = gptResponseMessage.context.citations;\n const showCitations = messageText.toString().includes('[doc');\n const textContent = messageText.toString().replaceAll('[doc', '[');\n\n const responseMessage = (\n <div>\n <div style={{ wordWrap: 'break-word' }}>\n <Typography variant='body2' style={{ whiteSpace: 'pre-line' }}>\n {textContent}\n </Typography>\n </div>\n {citations.length > 0 && showCitations && (\n <div>\n <br />\n <Typography variant='body2' style={{ whiteSpace: 'pre-line' }}>\n Refer to the XWiki documents for more info:\n </Typography>\n {formatCitations(citations)}\n </div>\n )}\n </div>\n );\n addMessage(responseMessage, { name: 'AI Assistant' }, textContent);\n } catch (e) {\n const errorMessage = \"Sorry, an error has occurred.\"\n addMessage(errorMessage, { name: 'AI Assistant' }, errorMessage);\n }\n\n };\n\n const executeQuery = useCallback(\n async (data, aiModelId) =>\n apiMutate(\n udpAiApiBase,\n `aiservice/llm`,\n {\n method: 'post',\n headers: {\n currentProductId: productId, //temporary bypass -> //currentProductId: '1'\n }\n },\n data\n ),\n [productId, udpAiApiBase]\n );\n\n\n\n const sendMessage = async (newMessageContent, addMessage) => {\n const messageHistoryTextArray = messageHistory\n .map(item => ({\n role: item.createdBy.name === 'AI Assistant' ? 'assistant' : item.createdBy.name === 'You' ? 'user' : item.createdBy.name,\n content: item.messageText\n }));\n\n const body = {\n modelName: 'gpt-4o',\n useCache: 'false',\n payload: {\n max_tokens: 4096,\n temperature: 0.5,\n n: 1,\n messages: [\n {\n role: 'system',\n content:\n 'You are an assistant helping a user to search through documentation.'\n },\n ...messageHistoryTextArray,\n {\n role: 'user',\n content: newMessageContent\n }\n ],\n data_sources: [\n {\n type: 'azure_search',\n parameters: {\n endpoint: aiSearchUrl,\n //semantic_configuration: \"XWiki\",\n //query_type: \"semantic\",\n fields_mapping: {},\n in_scope: false,\n role_information: \"You are an AI search assistant having access to wiki documentation data, please be help the user answer any questions to the best of your ability, or provide any search results in relevant documentation when answers are not directly available.\",\n strictness: 1,\n top_n_documents: 5,\n authentication: {\n type: 'api_key',\n key: aiSearchKey\n },\n index_name: aiSearchIndexName,\n //filter: `Products/any(p: p eq '${productId}')`\n }\n }\n ]\n }\n };\n\n const aiResponse = await executeQuery({ data: body });\n parseAiResponse(aiResponse, addMessage);\n }\n\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', height: '100%'}}>\n <FluentButton id='udpRecord-ChatContainer-NewSession' onClick={handleNewSession}>Clear Chat</FluentButton>\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '10px',\n padding: '3px',\n height: '100%',\n overflowY: 'auto',\n flexGrow: 1\n }}\n >\n {messageHistory.map((message, index) => (\n <ChatMessage key={index} message={message} />\n ))}\n <div ref={messageEndRef} />\n </div>\n <div style={{ display: 'flex', flexDirection: 'column', marginTop: '5px', position: 'sticky', bottom: 0, padding: '3px', zIndex: 1, background: 'white' }}>\n <div style={{ flexGrow: 1 }}>\n <AmbientTextField\n id='udpRecord-ChatContainer-Enter'\n multiline\n value={newMessageContent}\n onChange={(e) => setNewMessageContent(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n }}\n />\n </div>\n <FluentButton\n id='udpRecord-ChatContainer-Send'\n onClick={handleSendMessage}\n autoFocus\n variant='outlined'\n >\n Send\n </FluentButton>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAIA,MAAMA,cAAY,YAAY,WA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AAK;MACf,EAAE;KAgBC;MACE,MAAM;MACN,SAASC;MACV;KACF;IACD,cAAc,CACZ;KACE,MAAM;KACN,YAAY;MACV,UAAU;MAGV,gBAAgB,EAAE;MAClB,UAAU;MACV,kBAAkB;MAClB,YAAY;MACZ,iBAAiB;MACjB,gBAAgB;OACd,MAAM;OACN,KAAK;OACN;MACD,YAAY;MAEb;KACF,CACF;IACF;GACF,EAEmD,CAAC,EACzBC,aAAW;;AAIzC,QACE,oCAAC,SAAI,OAAO;EAAE,SAAS;EAAQ,eAAe;EAAU,QAAQ;EAAO,IACrE,oCAAC;EAAa,IAAG;EAAqC,SAAS;IAAkB,aAAyB,EAC1G,oCAAC,SACC,OAAO;EACL,SAAS;EACT,eAAe;EACf,KAAK;EACL,SAAS;EACT,QAAQ;EACR,WAAW;EACX,UAAU;EACX,IAEA,eAAe,KAAK,SAAS,UAC5B,oCAAC;EAAY,KAAK;EAAgB;GAAW,CAC7C,EACF,oCAAC,SAAI,KAAK,gBAAiB,CACvB,EACN,oCAAC,SAAI,OAAO;EAAE,SAAS;EAAQ,eAAe;EAAU,WAAW;EAAO,UAAU;EAAU,QAAQ;EAAG,SAAS;EAAO,QAAQ;EAAG,YAAY;EAAS,IACvJ,oCAAC,SAAI,OAAO,EAAE,UAAU,GAAG,IACzB,oCAAC;EACC,IAAG;EACH;EACA,OAAO;EACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;EACrD,YAAY,MAAM;AAChB,OAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;AACpC,MAAE,gBAAgB;AAClB,uBAAmB;;;GAGvB,CACE,EACN,oCAAC;EACC,IAAG;EACH,SAAS;EACT;EACA,SAAQ;IACT,OAEc,CACX,CACF"}
|
|
1
|
+
{"version":3,"file":"ChatContainer-Dnm64tul.js","names":["useStyles","makeStyles","newMessageContent","addMessage"],"sources":["../src/chatBot/ChatMessage.jsx","../src/chatBot/ChatContainer.jsx"],"sourcesContent":["import React from 'react';\nimport { makeStyles } from '@material-ui/core';\nimport { Card, CardContent, Typography } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n borderRadius: 5,\n background: (props) => (props.message.outgoing ? '#cdecfa' : '#e1e2e3'),\n width: '85%',\n padding: '3px',\n alignSelf: (props) => props.message.outgoing && 'flex-end',\n flexShrink: 0, \n boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)'\n },\n userName: {\n fontWeight: 'bold'\n },\n timestamp: {\n color: '#A9A9A9',\n margin: '0 0 0 5px',\n },\n}));\n\nexport const ChatMessage = (props) => {\n const classes = useStyles(props);\n const { message } = props;\n\n return (\n <Card className={classes.root}>\n <CardContent>\n <div style={{display:'flex', flexDirection:'row'}}>\n <Typography noWrap variant='caption' className={classes.userName}>\n {message.createdBy.name}\n </Typography>\n {!message.createdBy.loading && (\n <Typography noWrap variant='caption' className={classes.timestamp}>\n {message.createdAt}\n </Typography>\n )}\n </div>\n <div style={{wordWrap: 'break-word'}}>\n <Typography variant='body2' style={{whiteSpace: 'pre-line'}}>\n {message.messageContent}\n </Typography>\n </div>\n </CardContent>\n </Card>\n );\n};\n\n","import React, { useState, useEffect, useRef, useCallback } from 'react';\nimport { AmbientTextField } from '../UI/inputs/textField/AmbientTextField';\nimport { FluentButton } from '../UI/inputs/buttons/FluentButton';\nimport { useUser } from '../utilities/auth/useUser';\nimport { ChatMessage } from './ChatMessage';\nimport { Link, Typography } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { apiMutate } from '../utilities/useAxiosMutate';\nimport { useChatBot } from '../utilities/chatBot/useChatBot';\nimport { useTranslation } from 'react-i18next';\nimport { useSnackbar } from 'notistack';\nimport { ConfigService } from '../configService';\n\nconst useStyles = makeStyles((theme) => ({\n loadingContainer: {\n display: 'inline-block',\n fontSize: '2em', // Adjust the font size to make the whole section bigger\n },\n pulseEllipsis: {\n display: 'inline-block',\n animation: '$pulse 1.5s infinite',\n '&:nth-of-type(2)': {\n animationDelay: '0.5s',\n },\n '&:nth-of-type(3)': {\n animationDelay: '1s',\n },\n },\n '@keyframes pulse': {\n '0%': {\n transform: 'scale(1)',\n opacity: 0.6,\n },\n '50%': {\n transform: 'scale(1.2)',\n opacity: 1,\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.6,\n },\n },\n}));\n\n\nexport const ChatContainer = (props) => {\n const classes = useStyles();\n const { messageHistory, addMessage, removeMessageHistory, removeLoadingMessage } = useChatBot()\n const user = useUser();\n const [newMessageContent, setNewMessageContent] = useState('');\n const messageEndRef = useRef(null);\n const productId = ConfigService.config.UNITY_PRODUCT_ID;\n const aiSearchUrl = ConfigService.config.AI_SEARCH_URL;\n const aiSearchIndexName = ConfigService.config.AI_SEARCH_INDEX_NAME;\n const aiSearchKey = ConfigService.config.AI_SEARCH_KEY;\n const udpAiApiBase = ConfigService.config.UDPAI_API_BASE;\n const { enqueueSnackbar } = useSnackbar();\n const { t } = useTranslation();\n\n const handleSendMessage = async () => {\n addMessage(newMessageContent, { ...user, name: 'You' }, newMessageContent);\n setNewMessageContent('');\n addLoadingMessage();\n\n try {\n await sendMessage(newMessageContent, addMessage);\n removeLoadingMessage();\n } catch (error) {\n console.error('Error sending message:', error);\n }\n };\n\n const handleNewSession = async () => {\n try {\n await removeMessageHistory();\n enqueueSnackbar(t(`Chat Session Cleared`), {\n variant: 'success',\n anchorOrigin: {\n vertical: 'top',\n horizontal: 'center',\n }\n });\n } catch (error) {\n console.error('Error create new chat session:', error);\n }\n }\n\n const addLoadingMessage = () => {\n const messageContent = (\n <div className={classes.loadingContainer}>\n <span className={classes.pulseEllipsis}>.</span>\n <span className={classes.pulseEllipsis}>.</span>\n <span className={classes.pulseEllipsis}>.</span>\n </div>\n );\n addMessage(messageContent, { name: 'AI Assistant', loading: true }, \"\");\n };\n\n\n useEffect(() => {\n messageEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n }, [messageHistory]);\n\n\n const formatCitations = (citations) => {\n return (\n <div>\n <ol>\n {citations.map((citation) => {\n return (\n <li>\n <Link href={citation.url} target='_blank' rel='noopener'>\n <Typography variant='body2' style={{ whiteSpace: 'pre-line' }}>\n {citation.title}\n </Typography>\n </Link>\n </li>\n );\n })}\n </ol>\n </div>\n );\n };\n\n const parseAiResponse = (response, addMessage) => {\n try {\n const gptResponseMessage = response.data.LLMResponse.choices[0].message;\n const messageText = gptResponseMessage.content;\n const citations = gptResponseMessage.context.citations;\n const showCitations = messageText.toString().includes('[doc');\n const textContent = messageText.toString().replaceAll('[doc', '[');\n\n const responseMessage = (\n <div>\n <div style={{ wordWrap: 'break-word' }}>\n <Typography variant='body2' style={{ whiteSpace: 'pre-line' }}>\n {textContent}\n </Typography>\n </div>\n {citations.length > 0 && showCitations && (\n <div>\n <br />\n <Typography variant='body2' style={{ whiteSpace: 'pre-line' }}>\n Refer to the XWiki documents for more info:\n </Typography>\n {formatCitations(citations)}\n </div>\n )}\n </div>\n );\n addMessage(responseMessage, { name: 'AI Assistant' }, textContent);\n } catch (e) {\n const errorMessage = \"Sorry, an error has occurred.\"\n addMessage(errorMessage, { name: 'AI Assistant' }, errorMessage);\n }\n\n };\n\n const executeQuery = useCallback(\n async (data, aiModelId) =>\n apiMutate(\n udpAiApiBase,\n `aiservice/llm`,\n {\n method: 'post',\n headers: {\n currentProductId: productId, //temporary bypass -> //currentProductId: '1'\n }\n },\n data\n ),\n [productId, udpAiApiBase]\n );\n\n\n\n const sendMessage = async (newMessageContent, addMessage) => {\n const messageHistoryTextArray = messageHistory\n .map(item => ({\n role: item.createdBy.name === 'AI Assistant' ? 'assistant' : item.createdBy.name === 'You' ? 'user' : item.createdBy.name,\n content: item.messageText\n }));\n\n const body = {\n modelName: 'gpt-4o',\n useCache: 'false',\n payload: {\n max_tokens: 4096,\n temperature: 0.5,\n n: 1,\n presence_penalty: 0,\n messages: [\n {\n role: 'system',\n content:\n 'You are an assistant helping a user using existing knowledge supplemented by additional data.'\n },\n ...messageHistoryTextArray,\n {\n role: 'user',\n content: newMessageContent\n }\n ],\n data_sources: [\n {\n type: 'azure_search',\n parameters: {\n endpoint: aiSearchUrl,\n // set sematic configuration name to match index name\n semantic_configuration: aiSearchIndexName,\n query_type: \"semantic\",\n in_scope: false,\n //role_information: \"You are an AI search assistant having access to wiki documentation data. Please be helpful to the user answer any questions to the best of your ability.\",\n strictness: 1,\n top_n_documents: 5,\n authentication: {\n type: 'api_key',\n key: aiSearchKey\n },\n index_name: aiSearchIndexName,\n filter: `Products/any(p: p eq '${productId}')`\n }\n }\n ]\n }\n };\n\n const aiResponse = await executeQuery({ data: body });\n parseAiResponse(aiResponse, addMessage);\n }\n\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', height: '100%'}}>\n <FluentButton id='udpRecord-ChatContainer-NewSession' onClick={handleNewSession}>Clear Chat</FluentButton>\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '10px',\n padding: '3px',\n height: '100%',\n overflowY: 'auto',\n flexGrow: 1\n }}\n >\n {messageHistory.map((message, index) => (\n <ChatMessage key={index} message={message} />\n ))}\n <div ref={messageEndRef} />\n </div>\n <div style={{ display: 'flex', flexDirection: 'column', marginTop: '5px', position: 'sticky', bottom: 0, padding: '3px', zIndex: 1, background: 'white' }}>\n <div style={{ flexGrow: 1 }}>\n <AmbientTextField\n id='udpRecord-ChatContainer-Enter'\n multiline\n value={newMessageContent}\n onChange={(e) => setNewMessageContent(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSendMessage();\n }\n }}\n />\n </div>\n <FluentButton\n id='udpRecord-ChatContainer-Send'\n onClick={handleSendMessage}\n autoFocus\n variant='outlined'\n >\n Send\n </FluentButton>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAIA,MAAMA,cAAY,YAAY,WAAW;CACvC,MAAM;EACJ,cAAc;EACd,aAAa,UAAW,MAAM,QAAQ,WAAW,YAAY;EAC7D,OAAO;EACP,SAAS;EACT,YAAY,UAAU,MAAM,QAAQ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wBAAwB;MACxB,YAAY;MACZ,UAAU;MAEV,YAAY;MACZ,iBAAiB;MACjB,gBAAgB;OACd,MAAM;OACN,KAAK;OACN;MACD,YAAY;MACZ,QAAQ,yBAAyB,UAAU;MAC5C;KACF,CACF;IACF;GACF,EAEmD,CAAC,EACzBC,aAAW;;AAIzC,QACE,oCAAC,SAAI,OAAO;EAAE,SAAS;EAAQ,eAAe;EAAU,QAAQ;EAAO,IACrE,oCAAC;EAAa,IAAG;EAAqC,SAAS;IAAkB,aAAyB,EAC1G,oCAAC,SACC,OAAO;EACL,SAAS;EACT,eAAe;EACf,KAAK;EACL,SAAS;EACT,QAAQ;EACR,WAAW;EACX,UAAU;EACX,IAEA,eAAe,KAAK,SAAS,UAC5B,oCAAC;EAAY,KAAK;EAAgB;GAAW,CAC7C,EACF,oCAAC,SAAI,KAAK,gBAAiB,CACvB,EACN,oCAAC,SAAI,OAAO;EAAE,SAAS;EAAQ,eAAe;EAAU,WAAW;EAAO,UAAU;EAAU,QAAQ;EAAG,SAAS;EAAO,QAAQ;EAAG,YAAY;EAAS,IACvJ,oCAAC,SAAI,OAAO,EAAE,UAAU,GAAG,IACzB,oCAAC;EACC,IAAG;EACH;EACA,OAAO;EACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;EACrD,YAAY,MAAM;AAChB,OAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;AACpC,MAAE,gBAAgB;AAClB,uBAAmB;;;GAGvB,CACE,EACN,oCAAC;EACC,IAAG;EACH,SAAS;EACT;EACA,SAAQ;IACT,OAEc,CACX,CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __export } from "./chunk-Bp6m_JJh.js";
|
|
2
|
-
import { t as ChatContainer } from "./ChatContainer-
|
|
2
|
+
import { t as ChatContainer } from "./ChatContainer-Dnm64tul.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/udp/pages/ChatUDP/ChatUDP.jsx
|
|
@@ -14,4 +14,4 @@ var ChatUDP_exports = /* @__PURE__ */ __export({ default: () => ChatUDP_default
|
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ChatUDP_default as n, ChatUDP_exports as t };
|
|
17
|
-
//# sourceMappingURL=ChatUDP-
|
|
17
|
+
//# sourceMappingURL=ChatUDP-USJunrhX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatUDP-
|
|
1
|
+
{"version":3,"file":"ChatUDP-USJunrhX.js","names":[],"sources":["../src/udp/pages/ChatUDP/ChatUDP.jsx","../src/udp/pages/ChatUDP/index.ts"],"sourcesContent":["import React from 'react';\nimport { ChatContainer } from '../../../chatBot/ChatContainer';\n\nconst ChatUDP = () => {\n return (\n <ChatContainer />\n );\n};\n\nexport default ChatUDP;\n","export { default } from './ChatUDP';\nexport * from './ChatUDP';\n"],"mappings":";;;;;AAGA,MAAM,gBAAgB;AACpB,QACE,oCAAC,oBAAiB;;AAItB,sBAAe"}
|
|
@@ -9,7 +9,7 @@ import { t as UtilityBar } from "./UtilityBar-CFZSv0NA.js";
|
|
|
9
9
|
import { t as FUIAppSwitcher_default } from "./FUIAppSwitcher-I94rugM_.js";
|
|
10
10
|
import { t as getMenuItemsRecursively } from "./menuUtilities-CSvVMMpu.js";
|
|
11
11
|
import { t as ActionProvider } from "./ActionProvider-Bac2QDAs.js";
|
|
12
|
-
import { t as ChatBotProvider } from "./ChatBotProvider-
|
|
12
|
+
import { t as ChatBotProvider } from "./ChatBotProvider-E-wyZLY_.js";
|
|
13
13
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
14
14
|
import { Drawer, makeStyles, useMediaQuery, useTheme } from "@material-ui/core";
|
|
15
15
|
import clsx from "clsx";
|
|
@@ -266,4 +266,4 @@ Shell.propTypes = {
|
|
|
266
266
|
|
|
267
267
|
//#endregion
|
|
268
268
|
export { Shell as t };
|
|
269
|
-
//# sourceMappingURL=Shell-
|
|
269
|
+
//# sourceMappingURL=Shell-DzTnenAf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shell-D1jno7Hq.js","names":["menus","SiteHeader","NavigationSidebar","FUIAppSwitcher"],"sources":["../src/shell/Shell.jsx"],"sourcesContent":["import React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport { makeStyles, Drawer, useMediaQuery, useTheme } from '@material-ui/core';\nimport NavigationSidebar from './ui/NavigationSidebar';\nimport SiteHeader from './ui/SiteHeader';\nimport { UtilityBar } from '../UI/utilityDisplay/UtilityBar';\nimport { useTranslation } from 'react-i18next';\nimport FUIAppSwitcher from './ui/appSwitcher/FUIAppSwitcher';\nimport { getMenuItemsRecursively } from '../utilities/menus/menuUtilities';\nimport clsx from 'clsx';\nimport { UtilitySideBar } from '../UI/utilityDisplay/UtilitySideBar';\nimport PropTypes from 'prop-types';\nimport { useUser } from '../utilities/auth/useUser';\nimport { ActionProvider } from '../utilities/provider/ActionProvider';\nimport { PageActionWrapper } from '../actions/PageActionWrapper';\nimport { useInquiryStore } from '../stores/inquiryStore';\nimport {\n useSetInitialShellVisibility,\n useShellStore\n} from '../stores/shellStore';\n\nimport { useBuildEnvironment, APP_RIBBON_SPACE } from './ui/useBuildEnvironment';\nimport { ChatBotProvider } from '../utilities/chatBot/ChatBotProvider';\n//import { usePreloadPages } from '../hooks/usePreloadPages';\n\n// load the page container module so its loaded when we need it\nvoid import('../page/PageContainer');\nconst MenuTypeEnums = {\n Left_Menu: 1,\n Application_Menu: 2,\n Builders_Menu: 3,\n Favorites_Menu: 4\n};\n\nconst useStyles = makeStyles(\n (theme) => ({\n '@global': {\n html: {\n minHeight: '100%'\n },\n 'html, body, #root': {\n display: 'flex',\n flexDirection: 'column'\n },\n 'body, #root': {\n flex: 1\n }\n },\n root: {\n flex: 1,\n minHeight: '100vh',\n display: 'grid',\n gridTemplateAreas: ['sidebar header', 'sidebar content']\n .map((line) => `\"${line}\"`)\n .join(' '),\n gridTemplateColumns: 'auto 1fr',\n gridTemplateRows: 'auto 1fr'\n },\n header: {\n gridArea: 'header'\n },\n sidebar: {\n gridArea: 'sidebar'\n },\n content: {\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n zIndex: 1,\n height: ({ appRibbonSpace }) => `calc(100vh - ${56 + appRibbonSpace}px)`,\n overflowY: 'auto'\n },\n paper: {\n width: '100%',\n [theme.breakpoints.up('sm')]: {\n width: (props) => props.drawerWidth || 520\n }\n }\n }),\n { name: 'Layout' }\n);\n\n/**\n * Core site layout common to all pages\n */\nexport const Shell = (props) => {\n\n const buildEnv = useBuildEnvironment();\n const classes = useStyles({\n ...props,\n ribbonSpace: buildEnv ? APP_RIBBON_SPACE : 0\n });\n const {\n children,\n userAvatar,\n appContent,\n leftMenu,\n appSelectorMenus,\n siteName,\n className,\n navRoot,\n hideToggle,\n useMockData,\n mockMenus,\n user: passedInUser,\n unityUrl,\n expander,\n sidebarTitle,\n navMenuHoverOn = true,\n secondExtended,\n toggleOne,\n toggleTwo,\n closePrimary,\n closeSecondary,\n panelExpanded,\n panelExpandedSecondary,\n setPanelExpanded = false,\n setPanelExpandedSecondary = false,\n breadCrumbAltLabelList = [],\n currentLocation,\n utilitySidebarResizable,\n utilitySidebarToggleOverride,\n onUtilitySidebarToggleExpandClick,\n hideLayout = false,\n getAccessToken,\n switcherData,\n selectedItem,\n switcherWidth,\n languages,\n utilityBarHasTabsOpen,\n projectSwitcherColor,\n getWidget,\n isValidWidget,\n appSwitcherHeader,\n hamburgerMenuAccessRole\n } = props;\n const contextUser = useUser();\n const user = passedInUser ?? contextUser;\n const { setGetWidget, setIsValidWidget, shellHidden } = useShellStore();\n const [appSwitcherMobile, setAppSwitcherMobile] = useState(false);\n const [appSwitcherDesktop, setAppSwitcherDesktop] = useState(false);\n const { i18n } = useTranslation();\n const inquiryTitle = useInquiryStore((state) => state.title);\n useSetInitialShellVisibility();\n\n //usePreloadPages();\n\n useEffect(() => {\n setGetWidget(getWidget);\n return () => setGetWidget(null);\n }, [getWidget, setGetWidget]);\n\n useEffect(() => {\n setIsValidWidget(isValidWidget);\n return () => setIsValidWidget(null);\n }, [isValidWidget, setIsValidWidget]);\n\n const getMenuItems = useCallback(\n (menuTypeId, menus) => {\n if (!menus && !useMockData) {\n return [];\n }\n const menusToFilter = useMockData ? mockMenus : menus;\n\n const foundMenus = menusToFilter.filter(\n (menu) => menu.menuTypeId === menuTypeId && menu.active\n );\n\n if (foundMenus) {\n return foundMenus.reduce((menuItemInstanceStructureViews, menu) => {\n return [\n ...menuItemInstanceStructureViews,\n ...menu.menuItemInstanceStructureViews\n ];\n }, []);\n } else {\n return [];\n }\n },\n [useMockData, mockMenus]\n );\n\n const menus = useMemo(() => {\n const menuItems = getMenuItems(1, leftMenu);\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, leftMenu, getAccessToken]);\n\n const theme = useTheme();\n const mobile = useMediaQuery(theme.breakpoints.up('sm'));\n\n const handleAppSwitcher = (type, bool) => {\n if (type === 'mobile') {\n setAppSwitcherMobile(bool);\n } else {\n setAppSwitcherDesktop(bool);\n }\n };\n\n const builderMenu = useMemo(() => {\n const menuItems = getMenuItems(\n MenuTypeEnums.Builders_Menu,\n appSelectorMenus\n );\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, appSelectorMenus, getAccessToken]);\n\n const favoriteMenu = useMemo(() => {\n const menuItems = getMenuItems(\n MenuTypeEnums.Favorites_Menu,\n appSelectorMenus\n );\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, appSelectorMenus, getAccessToken]);\n\n const appMenu = useMemo(() => {\n const menuItems = getMenuItems(\n MenuTypeEnums.Application_Menu,\n appSelectorMenus\n );\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, appSelectorMenus, getAccessToken]);\n\n const hideAppMenu = useMemo(\n () =>\n !appSelectorMenus ||\n (hamburgerMenuAccessRole &&\n !user?.roleNames.includes(hamburgerMenuAccessRole)),\n [user, appSelectorMenus, hamburgerMenuAccessRole]\n );\n\n useEffect(() => {\n i18n.changeLanguage('en-US');\n }, [i18n]);\n\n if (hideLayout) {\n return <div>{children}</div>;\n }\n\n return (\n <ChatBotProvider>\n <ActionProvider>\n <div className={classes.root}>\n {!shellHidden && (\n <SiteHeader\n className={classes.header}\n siteName={siteName}\n appContent={appContent}\n userAvatar={userAvatar}\n breadCrumbRoot={navRoot}\n setAppSwitcherOpen={(type, bool) => handleAppSwitcher(type, bool)}\n breadCrumbAltLabelList={breadCrumbAltLabelList}\n currentLocation={currentLocation}\n switcherData={switcherData}\n selectedItem={selectedItem}\n switcherWidth={switcherWidth}\n hideAppLaunch={hideAppMenu}\n languages={languages}\n backgroundColor={projectSwitcherColor}\n />\n )}\n\n <div style={{ display: 'flex' }} className={classes.sidebar}>\n {!shellHidden && mobile && (\n <NavigationSidebar\n className={classes.sidebar}\n data={menus}\n navMenuHoverOn={navMenuHoverOn}\n user={user}\n useGlobalState={true}\n />\n )}\n {expander && (\n <div>\n <UtilitySideBar\n title={inquiryTitle || sidebarTitle}\n resizable={utilitySidebarResizable}\n utilitySidebarToggleOverride={utilitySidebarToggleOverride}\n onUtilitySidebarToggleExpandClick={\n onUtilitySidebarToggleExpandClick\n }\n sidebarHidden={shellHidden}\n {...props}\n />\n </div>\n )}\n </div>\n\n <div className={classes.content}>\n <UtilityBar\n className={clsx(className)}\n gutters={false}\n hideToggle={hideToggle}\n expander={expander}\n secondExtended={secondExtended}\n toggleOne={toggleOne}\n toggleTwo={toggleTwo}\n closePrimary={closePrimary}\n closeSecondary={closeSecondary}\n expanded={panelExpanded}\n expandedSecondary={panelExpandedSecondary}\n setExpanded={setPanelExpanded}\n setExpandedSecondary={setPanelExpandedSecondary}\n />\n <PageActionWrapper>{children}</PageActionWrapper>\n </div>\n <Drawer\n variant='temporary'\n anchor='left'\n open={appSwitcherDesktop}\n classes={\n !mobile ? {} : !appSelectorMenus ? {} : { paper: classes.paper }\n }\n onClose={() => handleAppSwitcher('desktop', false)}\n >\n {mobile && appSelectorMenus && (\n <FUIAppSwitcher\n onClose={() => handleAppSwitcher('desktop', false)}\n favoriteMenu={favoriteMenu}\n builderMenu={builderMenu}\n appMenu={appMenu}\n unityUrl={unityUrl}\n user={user}\n header={appSwitcherHeader}\n />\n )}\n {(!mobile || (mobile && !appSelectorMenus)) && (\n <NavigationSidebar\n toggle={false}\n className={classes.sidebar}\n data={menus}\n navMenuHoverOn={navMenuHoverOn}\n user={user}\n useGlobalState={true}\n />\n )}\n </Drawer>\n\n <Drawer\n variant='temporary'\n anchor='right'\n open={appSwitcherMobile}\n classes={{ paper: classes.paper }}\n onClose={() => handleAppSwitcher('mobile', false)}\n >\n <FUIAppSwitcher\n onClose={() => handleAppSwitcher('mobile', false)}\n favoriteMenu={favoriteMenu}\n builderMenu={builderMenu}\n appMenu={appMenu}\n unityUrl={unityUrl}\n user={user}\n header={appSwitcherHeader}\n />\n </Drawer>\n </div>\n </ActionProvider>\n </ChatBotProvider>\n );\n};\n\nShell.propTypes = {\n /**\n * The newest propTypes have been added but older ones are missing @todo: add missing propTypes for Shell.\n */\n\n /**\n * The array used to map for label and functions to list items.\n */\n switcherData: PropTypes.array,\n /**\n * The active label displayed.\n */\n selectedItem: PropTypes.string,\n /**\n * Provides a method set the selector width. Default is 100.\n */\n switcherWidth: PropTypes.number,\n /**\n * Children nodes\n */\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired,\n\n /**\n * Name of site\n */\n siteName: PropTypes.string,\n\n /**\n * Component to render for the user Avatar\n */\n userAvatar: PropTypes.element,\n\n appContent: PropTypes.element,\n\n leftMenu: PropTypes.array,\n\n appSelectorMenus: PropTypes.array,\n\n className: PropTypes.object,\n\n navRoot: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.node]),\n\n /**\n * Should the shell use mock data\n */\n useMockData: PropTypes.bool,\n\n mockMenus: PropTypes.array,\n\n unityUrl: PropTypes.string,\n\n expander: PropTypes.bool,\n\n sidebarTitle: PropTypes.string,\n\n navMenuHoverOn: PropTypes.bool,\n\n toggleOne: PropTypes.bool,\n\n toggleTwo: PropTypes.bool,\n\n closePrimary: PropTypes.bool,\n\n closeSecondary: PropTypes.bool,\n\n panelExpanded: PropTypes.bool,\n\n panelExpandedSecondary: PropTypes.bool,\n\n setPanelExpanded: PropTypes.func,\n\n setPanelExpandedSecondary: PropTypes.func,\n\n breadCrumbAltLabelList: PropTypes.array,\n\n currentLocation: PropTypes.object,\n\n utilitySidebarResizable: PropTypes.bool,\n\n utilitySidebarToggleOverride: PropTypes.bool,\n\n onUtilitySidebarToggleExpandClick: PropTypes.func,\n\n hideLayout: PropTypes.bool,\n\n languages: PropTypes.arrayOf(PropTypes.object),\n\n utilityBarHasTabsOpen: PropTypes.bool,\n /**\n * Passes the background color on the project switcher (default: theme secondary)\n */\n projectSwitcherColor: PropTypes.string,\n getWidget: PropTypes.func,\n isValidWidget: PropTypes.func,\n currentTenant: PropTypes.object,\n hamburgerMenuAccessRole: PropTypes.string\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBK,OAAO;AACZ,MAAM,gBAAgB;CACpB,WAAW;CACX,kBAAkB;CAClB,eAAe;CACf,gBAAgB;CACjB;AAED,MAAM,YAAY,YACf,WAAW;CACV,WAAW;EACT,MAAM,EACJ,WAAW,QACZ;EACD,qBAAqB;GACnB,SAAS;GACT,eAAe;GAChB;EACD,eAAe,EACb,MAAM,GACP;EACF;CACD,MAAM;EACJ,MAAM;EACN,WAAW;EACX,SAAS;EACT,mBAAmB,CAAC,kBAAkB,kBAAkB,CACrD,KAAK,SAAS,IAAI,KAAK,GAAG,CAC1B,KAAK,IAAI;EACZ,qBAAqB;EACrB,kBAAkB;EACnB;CACD,QAAQ,EACN,UAAU,UACX;CACD,SAAS,EACP,UAAU,WACX;CACD,SAAS;EACP,UAAU;EACV,SAAS;EACT,eAAe;EACf,UAAU;EAC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c,UAAU;CAIxB,cAAc,UAAU;CAIxB,eAAe,UAAU;CAIzB,UAAU,UAAU,UAAU,CAC5B,UAAU,QAAQ,UAAU,KAAK,EACjC,UAAU,KACX,CAAC,CAAC;CAKH,UAAU,UAAU;CAKpB,YAAY,UAAU;CAEtB,YAAY,UAAU;CAEtB,UAAU,UAAU;CAEpB,kBAAkB,UAAU;CAE5B,WAAW,UAAU;CAErB,SAAS,UAAU,UAAU;EAAC,UAAU;EAAQ,UAAU;EAAS,UAAU;EAAK,CAAC;CAKnF,aAAa,UAAU;CAEvB,WAAW,UAAU;CAErB,UAAU,UAAU;CAEpB,UAAU,UAAU;CAEpB,cAAc,UAAU;CAExB,gBAAgB,UAAU;CAE1B,WAAW,UAAU;CAErB,WAAW,UAAU;CAErB,cAAc,UAAU;CAExB,gBAAgB,UAAU;CAE1B,eAAe,UAAU;CAEzB,wBAAwB,UAAU;CAElC,kBAAkB,UAAU;CAE5B,2BAA2B,UAAU;CAErC,wBAAwB,UAAU;CAElC,iBAAiB,UAAU;CAE3B,yBAAyB,UAAU;CAEnC,8BAA8B,UAAU;CAExC,mCAAmC,UAAU;CAE7C,YAAY,UAAU;CAEtB,WAAW,UAAU,QAAQ,UAAU,OAAO;CAE9C,uBAAuB,UAAU;CAIjC,sBAAsB,UAAU;CAChC,WAAW,UAAU;CACrB,eAAe,UAAU;CACzB,eAAe,UAAU;CACzB,yBAAyB,UAAU;CACpC"}
|
|
1
|
+
{"version":3,"file":"Shell-DzTnenAf.js","names":["menus","SiteHeader","NavigationSidebar","FUIAppSwitcher"],"sources":["../src/shell/Shell.jsx"],"sourcesContent":["import React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport { makeStyles, Drawer, useMediaQuery, useTheme } from '@material-ui/core';\nimport NavigationSidebar from './ui/NavigationSidebar';\nimport SiteHeader from './ui/SiteHeader';\nimport { UtilityBar } from '../UI/utilityDisplay/UtilityBar';\nimport { useTranslation } from 'react-i18next';\nimport FUIAppSwitcher from './ui/appSwitcher/FUIAppSwitcher';\nimport { getMenuItemsRecursively } from '../utilities/menus/menuUtilities';\nimport clsx from 'clsx';\nimport { UtilitySideBar } from '../UI/utilityDisplay/UtilitySideBar';\nimport PropTypes from 'prop-types';\nimport { useUser } from '../utilities/auth/useUser';\nimport { ActionProvider } from '../utilities/provider/ActionProvider';\nimport { PageActionWrapper } from '../actions/PageActionWrapper';\nimport { useInquiryStore } from '../stores/inquiryStore';\nimport {\n useSetInitialShellVisibility,\n useShellStore\n} from '../stores/shellStore';\n\nimport { useBuildEnvironment, APP_RIBBON_SPACE } from './ui/useBuildEnvironment';\nimport { ChatBotProvider } from '../utilities/chatBot/ChatBotProvider';\n//import { usePreloadPages } from '../hooks/usePreloadPages';\n\n// load the page container module so its loaded when we need it\nvoid import('../page/PageContainer');\nconst MenuTypeEnums = {\n Left_Menu: 1,\n Application_Menu: 2,\n Builders_Menu: 3,\n Favorites_Menu: 4\n};\n\nconst useStyles = makeStyles(\n (theme) => ({\n '@global': {\n html: {\n minHeight: '100%'\n },\n 'html, body, #root': {\n display: 'flex',\n flexDirection: 'column'\n },\n 'body, #root': {\n flex: 1\n }\n },\n root: {\n flex: 1,\n minHeight: '100vh',\n display: 'grid',\n gridTemplateAreas: ['sidebar header', 'sidebar content']\n .map((line) => `\"${line}\"`)\n .join(' '),\n gridTemplateColumns: 'auto 1fr',\n gridTemplateRows: 'auto 1fr'\n },\n header: {\n gridArea: 'header'\n },\n sidebar: {\n gridArea: 'sidebar'\n },\n content: {\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n zIndex: 1,\n height: ({ appRibbonSpace }) => `calc(100vh - ${56 + appRibbonSpace}px)`,\n overflowY: 'auto'\n },\n paper: {\n width: '100%',\n [theme.breakpoints.up('sm')]: {\n width: (props) => props.drawerWidth || 520\n }\n }\n }),\n { name: 'Layout' }\n);\n\n/**\n * Core site layout common to all pages\n */\nexport const Shell = (props) => {\n\n const buildEnv = useBuildEnvironment();\n const classes = useStyles({\n ...props,\n ribbonSpace: buildEnv ? APP_RIBBON_SPACE : 0\n });\n const {\n children,\n userAvatar,\n appContent,\n leftMenu,\n appSelectorMenus,\n siteName,\n className,\n navRoot,\n hideToggle,\n useMockData,\n mockMenus,\n user: passedInUser,\n unityUrl,\n expander,\n sidebarTitle,\n navMenuHoverOn = true,\n secondExtended,\n toggleOne,\n toggleTwo,\n closePrimary,\n closeSecondary,\n panelExpanded,\n panelExpandedSecondary,\n setPanelExpanded = false,\n setPanelExpandedSecondary = false,\n breadCrumbAltLabelList = [],\n currentLocation,\n utilitySidebarResizable,\n utilitySidebarToggleOverride,\n onUtilitySidebarToggleExpandClick,\n hideLayout = false,\n getAccessToken,\n switcherData,\n selectedItem,\n switcherWidth,\n languages,\n utilityBarHasTabsOpen,\n projectSwitcherColor,\n getWidget,\n isValidWidget,\n appSwitcherHeader,\n hamburgerMenuAccessRole\n } = props;\n const contextUser = useUser();\n const user = passedInUser ?? contextUser;\n const { setGetWidget, setIsValidWidget, shellHidden } = useShellStore();\n const [appSwitcherMobile, setAppSwitcherMobile] = useState(false);\n const [appSwitcherDesktop, setAppSwitcherDesktop] = useState(false);\n const { i18n } = useTranslation();\n const inquiryTitle = useInquiryStore((state) => state.title);\n useSetInitialShellVisibility();\n\n //usePreloadPages();\n\n useEffect(() => {\n setGetWidget(getWidget);\n return () => setGetWidget(null);\n }, [getWidget, setGetWidget]);\n\n useEffect(() => {\n setIsValidWidget(isValidWidget);\n return () => setIsValidWidget(null);\n }, [isValidWidget, setIsValidWidget]);\n\n const getMenuItems = useCallback(\n (menuTypeId, menus) => {\n if (!menus && !useMockData) {\n return [];\n }\n const menusToFilter = useMockData ? mockMenus : menus;\n\n const foundMenus = menusToFilter.filter(\n (menu) => menu.menuTypeId === menuTypeId && menu.active\n );\n\n if (foundMenus) {\n return foundMenus.reduce((menuItemInstanceStructureViews, menu) => {\n return [\n ...menuItemInstanceStructureViews,\n ...menu.menuItemInstanceStructureViews\n ];\n }, []);\n } else {\n return [];\n }\n },\n [useMockData, mockMenus]\n );\n\n const menus = useMemo(() => {\n const menuItems = getMenuItems(1, leftMenu);\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, leftMenu, getAccessToken]);\n\n const theme = useTheme();\n const mobile = useMediaQuery(theme.breakpoints.up('sm'));\n\n const handleAppSwitcher = (type, bool) => {\n if (type === 'mobile') {\n setAppSwitcherMobile(bool);\n } else {\n setAppSwitcherDesktop(bool);\n }\n };\n\n const builderMenu = useMemo(() => {\n const menuItems = getMenuItems(\n MenuTypeEnums.Builders_Menu,\n appSelectorMenus\n );\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, appSelectorMenus, getAccessToken]);\n\n const favoriteMenu = useMemo(() => {\n const menuItems = getMenuItems(\n MenuTypeEnums.Favorites_Menu,\n appSelectorMenus\n );\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, appSelectorMenus, getAccessToken]);\n\n const appMenu = useMemo(() => {\n const menuItems = getMenuItems(\n MenuTypeEnums.Application_Menu,\n appSelectorMenus\n );\n return getMenuItemsRecursively(menuItems, true, user, getAccessToken);\n }, [getMenuItems, user, appSelectorMenus, getAccessToken]);\n\n const hideAppMenu = useMemo(\n () =>\n !appSelectorMenus ||\n (hamburgerMenuAccessRole &&\n !user?.roleNames.includes(hamburgerMenuAccessRole)),\n [user, appSelectorMenus, hamburgerMenuAccessRole]\n );\n\n useEffect(() => {\n i18n.changeLanguage('en-US');\n }, [i18n]);\n\n if (hideLayout) {\n return <div>{children}</div>;\n }\n\n return (\n <ChatBotProvider>\n <ActionProvider>\n <div className={classes.root}>\n {!shellHidden && (\n <SiteHeader\n className={classes.header}\n siteName={siteName}\n appContent={appContent}\n userAvatar={userAvatar}\n breadCrumbRoot={navRoot}\n setAppSwitcherOpen={(type, bool) => handleAppSwitcher(type, bool)}\n breadCrumbAltLabelList={breadCrumbAltLabelList}\n currentLocation={currentLocation}\n switcherData={switcherData}\n selectedItem={selectedItem}\n switcherWidth={switcherWidth}\n hideAppLaunch={hideAppMenu}\n languages={languages}\n backgroundColor={projectSwitcherColor}\n />\n )}\n\n <div style={{ display: 'flex' }} className={classes.sidebar}>\n {!shellHidden && mobile && (\n <NavigationSidebar\n className={classes.sidebar}\n data={menus}\n navMenuHoverOn={navMenuHoverOn}\n user={user}\n useGlobalState={true}\n />\n )}\n {expander && (\n <div>\n <UtilitySideBar\n title={inquiryTitle || sidebarTitle}\n resizable={utilitySidebarResizable}\n utilitySidebarToggleOverride={utilitySidebarToggleOverride}\n onUtilitySidebarToggleExpandClick={\n onUtilitySidebarToggleExpandClick\n }\n sidebarHidden={shellHidden}\n {...props}\n />\n </div>\n )}\n </div>\n\n <div className={classes.content}>\n <UtilityBar\n className={clsx(className)}\n gutters={false}\n hideToggle={hideToggle}\n expander={expander}\n secondExtended={secondExtended}\n toggleOne={toggleOne}\n toggleTwo={toggleTwo}\n closePrimary={closePrimary}\n closeSecondary={closeSecondary}\n expanded={panelExpanded}\n expandedSecondary={panelExpandedSecondary}\n setExpanded={setPanelExpanded}\n setExpandedSecondary={setPanelExpandedSecondary}\n />\n <PageActionWrapper>{children}</PageActionWrapper>\n </div>\n <Drawer\n variant='temporary'\n anchor='left'\n open={appSwitcherDesktop}\n classes={\n !mobile ? {} : !appSelectorMenus ? {} : { paper: classes.paper }\n }\n onClose={() => handleAppSwitcher('desktop', false)}\n >\n {mobile && appSelectorMenus && (\n <FUIAppSwitcher\n onClose={() => handleAppSwitcher('desktop', false)}\n favoriteMenu={favoriteMenu}\n builderMenu={builderMenu}\n appMenu={appMenu}\n unityUrl={unityUrl}\n user={user}\n header={appSwitcherHeader}\n />\n )}\n {(!mobile || (mobile && !appSelectorMenus)) && (\n <NavigationSidebar\n toggle={false}\n className={classes.sidebar}\n data={menus}\n navMenuHoverOn={navMenuHoverOn}\n user={user}\n useGlobalState={true}\n />\n )}\n </Drawer>\n\n <Drawer\n variant='temporary'\n anchor='right'\n open={appSwitcherMobile}\n classes={{ paper: classes.paper }}\n onClose={() => handleAppSwitcher('mobile', false)}\n >\n <FUIAppSwitcher\n onClose={() => handleAppSwitcher('mobile', false)}\n favoriteMenu={favoriteMenu}\n builderMenu={builderMenu}\n appMenu={appMenu}\n unityUrl={unityUrl}\n user={user}\n header={appSwitcherHeader}\n />\n </Drawer>\n </div>\n </ActionProvider>\n </ChatBotProvider>\n );\n};\n\nShell.propTypes = {\n /**\n * The newest propTypes have been added but older ones are missing @todo: add missing propTypes for Shell.\n */\n\n /**\n * The array used to map for label and functions to list items.\n */\n switcherData: PropTypes.array,\n /**\n * The active label displayed.\n */\n selectedItem: PropTypes.string,\n /**\n * Provides a method set the selector width. Default is 100.\n */\n switcherWidth: PropTypes.number,\n /**\n * Children nodes\n */\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired,\n\n /**\n * Name of site\n */\n siteName: PropTypes.string,\n\n /**\n * Component to render for the user Avatar\n */\n userAvatar: PropTypes.element,\n\n appContent: PropTypes.element,\n\n leftMenu: PropTypes.array,\n\n appSelectorMenus: PropTypes.array,\n\n className: PropTypes.object,\n\n navRoot: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.node]),\n\n /**\n * Should the shell use mock data\n */\n useMockData: PropTypes.bool,\n\n mockMenus: PropTypes.array,\n\n unityUrl: PropTypes.string,\n\n expander: PropTypes.bool,\n\n sidebarTitle: PropTypes.string,\n\n navMenuHoverOn: PropTypes.bool,\n\n toggleOne: PropTypes.bool,\n\n toggleTwo: PropTypes.bool,\n\n closePrimary: PropTypes.bool,\n\n closeSecondary: PropTypes.bool,\n\n panelExpanded: PropTypes.bool,\n\n panelExpandedSecondary: PropTypes.bool,\n\n setPanelExpanded: PropTypes.func,\n\n setPanelExpandedSecondary: PropTypes.func,\n\n breadCrumbAltLabelList: PropTypes.array,\n\n currentLocation: PropTypes.object,\n\n utilitySidebarResizable: PropTypes.bool,\n\n utilitySidebarToggleOverride: PropTypes.bool,\n\n onUtilitySidebarToggleExpandClick: PropTypes.func,\n\n hideLayout: PropTypes.bool,\n\n languages: PropTypes.arrayOf(PropTypes.object),\n\n utilityBarHasTabsOpen: PropTypes.bool,\n /**\n * Passes the background color on the project switcher (default: theme secondary)\n */\n projectSwitcherColor: PropTypes.string,\n getWidget: PropTypes.func,\n isValidWidget: PropTypes.func,\n currentTenant: PropTypes.object,\n hamburgerMenuAccessRole: PropTypes.string\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBK,OAAO;AACZ,MAAM,gBAAgB;CACpB,WAAW;CACX,kBAAkB;CAClB,eAAe;CACf,gBAAgB;CACjB;AAED,MAAM,YAAY,YACf,WAAW;CACV,WAAW;EACT,MAAM,EACJ,WAAW,QACZ;EACD,qBAAqB;GACnB,SAAS;GACT,eAAe;GAChB;EACD,eAAe,EACb,MAAM,GACP;EACF;CACD,MAAM;EACJ,MAAM;EACN,WAAW;EACX,SAAS;EACT,mBAAmB,CAAC,kBAAkB,kBAAkB,CACrD,KAAK,SAAS,IAAI,KAAK,GAAG,CAC1B,KAAK,IAAI;EACZ,qBAAqB;EACrB,kBAAkB;EACnB;CACD,QAAQ,EACN,UAAU,UACX;CACD,SAAS,EACP,UAAU,WACX;CACD,SAAS;EACP,UAAU;EACV,SAAS;EACT,eAAe;EACf,UAAU;EACV,QAAQ;EACR,SAAS,EAAE,qBAAqB,gBAAgB,KAAK,eAAe;EACpE,WAAW;EACZ;CACD,OAAO;EACL,OAAO;GACN,MAAM,YAAY,GAAG,KAAK,GAAG,EAC5B,QAAQ,UAAU,MAAM,eAAe,KACxC;EACF;CACF,GACD,EAAE,MAAM,UAAU,CACnB;;;;AAKD,MAAa,SAAS,UAAU;CAE9B,MAAM,WAAW,qBAAqB;CACtC,MAAM,UAAU,UAAU;EACxB,GAAG;EACH,aAAa,WAAW,mBAAmB;EAC5C,CAAC;CACF,MAAM,EACJ,UACA,YACA,YACA,UACA,kBACA,UACA,WACA,SAC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U,UAAU;CAEpB,cAAc,UAAU;CAExB,gBAAgB,UAAU;CAE1B,WAAW,UAAU;CAErB,WAAW,UAAU;CAErB,cAAc,UAAU;CAExB,gBAAgB,UAAU;CAE1B,eAAe,UAAU;CAEzB,wBAAwB,UAAU;CAElC,kBAAkB,UAAU;CAE5B,2BAA2B,UAAU;CAErC,wBAAwB,UAAU;CAElC,iBAAiB,UAAU;CAE3B,yBAAyB,UAAU;CAEnC,8BAA8B,UAAU;CAExC,mCAAmC,UAAU;CAE7C,YAAY,UAAU;CAEtB,WAAW,UAAU,QAAQ,UAAU,OAAO;CAE9C,uBAAuB,UAAU;CAIjC,sBAAsB,UAAU;CAChC,WAAW,UAAU;CACrB,eAAe,UAAU;CACzB,eAAe,UAAU;CACzB,yBAAyB,UAAU;CACpC"}
|
|
@@ -8,7 +8,7 @@ import { t as DonutChartWidget_exports } from "./DonutChartWidget-CBM8bo3h.js";
|
|
|
8
8
|
import { t as SparklineWidget_exports } from "./SparklineWidget-DdJ6Rinv.js";
|
|
9
9
|
import { t as ProgressBarWidget_exports } from "./ProgressBarWidget-CUktVIcb.js";
|
|
10
10
|
import { t as RecentlyLoadedNodesWidget_exports } from "./RecentlyLoadedNodesWidget-vHtjq17z.js";
|
|
11
|
-
import { t as ChatUDP_exports } from "./ChatUDP-
|
|
11
|
+
import { t as ChatUDP_exports } from "./ChatUDP-USJunrhX.js";
|
|
12
12
|
import { t as UdpDataBrowserPage_exports } from "./UdpDataBrowserPage-BBxxBXIO.js";
|
|
13
13
|
import { t as UdpRemindersPage_exports } from "./UdpRemindersPage-DtBkTiTU.js";
|
|
14
14
|
import { t as RemindersWidget_exports } from "./RemindersWidget-N9edSHxN.js";
|
|
@@ -45,4 +45,4 @@ const UdpPages = {
|
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
47
|
export { UdpPages as t };
|
|
48
|
-
//# sourceMappingURL=UdpPages-
|
|
48
|
+
//# sourceMappingURL=UdpPages-BlEKkXVL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UdpPages-
|
|
1
|
+
{"version":3,"file":"UdpPages-BlEKkXVL.js","names":[],"sources":["../src/udp/pages/UdpPages/index.ts"],"sourcesContent":["import * as UdpNotesPage from '../UdpNotesPage';\nimport * as UdpVerticalManagementPage from '../UdpVerticalManagementPage';\nimport * as UdpGridPanelManagementPage from '../UdpGridPanelManagementPage';\nimport * as UdpMaintenanceEnginePage from '../UdpMaintenanceEnginePage';\nimport * as UdpInquiryMaintenanceEnginePage from '../UdpInquiryMaintenanceEnginePage';\nimport * as UdpReportsPage from '../UdpReportsPage';\nimport * as DonutChartWidget from '../../../UI/widgets/library/DonutChartWidget';\nimport * as SparklineWidget from '../../../UI/widgets/library/SparklineWidget';\nimport * as ProgressBarWidget from '../../../UI/widgets/library/ProgressBarWidget';\nimport * as RecentlyLoadedNodesWidget from '../../../UI/widgets/library/RecentlyLoadedNodesWidget';\nimport * as ChatUDP from '../ChatUDP';\nimport * as UdpDataBrowserPage from '../UdpDataBrowserPage';\nimport * as UdpRemindersPage from '../UdpRemindersPage';\nimport * as RemindersWidget from '../../../UI/widgets/library/RemindersWidget';\nimport * as UdpPublicForm from '../UdpPublicForm'\nimport * as UdpPrivateForm from '../UdpPrivateForm'\nimport * as UdpFormsListPage from '../UdpFormsListPage';\nimport * as UdpFormsBuilderPage from '../UdpFormsBuilderPage';\nimport * as UdpImportFromFileMappingPage from '../UdpImportFromFileMappingPage'\nimport * as UdpAuditEventsPage from '../UdpAuditEvents'\n\nexport const UdpPages = {\n UdpNotesPage,\n UdpVerticalManagementPage,\n UdpGridPanelManagementPage,\n UdpMaintenanceEnginePage,\n UdpInquiryMaintenanceEnginePage,\n UdpReportsPage,\n DonutChartWidget,\n SparklineWidget,\n ProgressBarWidget,\n RecentlyLoadedNodesWidget,\n ChatUDP,\n UdpDataBrowserPage,\n UdpRemindersPage,\n RemindersWidget,\n UdpPublicForm,\n UdpPrivateForm,\n UdpFormsBuilderPage,\n UdpFormsListPage,\n UdpImportFromFileMappingPage,\n UdpAuditEventsPage\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
package/dist/chatBot/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import "../axiosInterceptors-6Czv1PA5.js";
|
|
|
7
7
|
import "../useUser-wpHGo6jU.js";
|
|
8
8
|
import "../useAxiosMutate-q_ZpG98Z.js";
|
|
9
9
|
import "../AmbientTextField-BBZcLilt.js";
|
|
10
|
-
import { n as ChatMessage, t as ChatContainer } from "../ChatContainer-
|
|
10
|
+
import { n as ChatMessage, t as ChatContainer } from "../ChatContainer-Dnm64tul.js";
|
|
11
11
|
import "../ChatBotContext-CgEZrG-E.js";
|
|
12
12
|
import "../useChatBot-DsJZ4f0O.js";
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -86,7 +86,7 @@ import { t as ActionSplitScreen } from "./ActionSplitScreen-sKnNHSHa.js";
|
|
|
86
86
|
import { t as usePromotedMethodEntity } from "./usePromotedMethodEntity-wRBkHT3x.js";
|
|
87
87
|
import { t as fluentLibraryIcons } from "./LibraryData-D8Uai7Yd.js";
|
|
88
88
|
import { t as AmbientTextField } from "./AmbientTextField-BBZcLilt.js";
|
|
89
|
-
import { n as ChatMessage, t as ChatContainer } from "./ChatContainer-
|
|
89
|
+
import { n as ChatMessage, t as ChatContainer } from "./ChatContainer-Dnm64tul.js";
|
|
90
90
|
import "./ChatBotContext-CgEZrG-E.js";
|
|
91
91
|
import "./useChatBot-DsJZ4f0O.js";
|
|
92
92
|
import { r as mttFunctions_exports } from "./mttFunctions-Du5Q0h5k.js";
|
|
@@ -218,8 +218,8 @@ import { n as useCurrentPageReturnTo, r as useIsAuthed, t as useAuthedUser } fro
|
|
|
218
218
|
import { t as useDefaultFormValues } from "./useDefaultFormValues-BVsgZOlc.js";
|
|
219
219
|
import "./ActionLoadingContext-D83iHFWE.js";
|
|
220
220
|
import { t as ActionProvider } from "./ActionProvider-Bac2QDAs.js";
|
|
221
|
-
import "./ChatBotProvider-
|
|
222
|
-
import { t as Shell } from "./Shell-
|
|
221
|
+
import "./ChatBotProvider-E-wyZLY_.js";
|
|
222
|
+
import { t as Shell } from "./Shell-DzTnenAf.js";
|
|
223
223
|
import "./useGravatar-RvImWAyu.js";
|
|
224
224
|
import { a as storePath, i as storeInitialPath, n as getStoredPath, r as storeCurrentPath, t as clearStoredPath } from "./LocalRedirectUrlStorage-Dl3UyONi.js";
|
|
225
225
|
import { n as getStoredExternalPath, r as storeExternalPath, t as clearStoredExternalPath } from "./ExternalRedirectUrlStorage-NwBaYWri.js";
|
|
@@ -252,7 +252,7 @@ import "./FluentStatNumber-CstF4Dvf.js";
|
|
|
252
252
|
import "./FluentSecondaryStatNumber-Ch9WRWeJ.js";
|
|
253
253
|
import { t as ProgressBarWidget_exports } from "./ProgressBarWidget-CUktVIcb.js";
|
|
254
254
|
import { t as RecentlyLoadedNodesWidget_exports } from "./RecentlyLoadedNodesWidget-vHtjq17z.js";
|
|
255
|
-
import "./ChatUDP-
|
|
255
|
+
import "./ChatUDP-USJunrhX.js";
|
|
256
256
|
import "./DataBrowserContainer-BwvAr8yV.js";
|
|
257
257
|
import "./UdpDataBrowserPage-BBxxBXIO.js";
|
|
258
258
|
import "./UdpRemindersPage-DtBkTiTU.js";
|
|
@@ -286,7 +286,7 @@ import { t as ClientSideUdpGrid } from "./ClientSideUdpGrid-C7iZDuF9.js";
|
|
|
286
286
|
import "./virtualActions-BK1pw7Ae.js";
|
|
287
287
|
import "./useUpdateSearchParams-DWecP-nS.js";
|
|
288
288
|
import "./UdpAuditEvents-Bs2sbwF7.js";
|
|
289
|
-
import { t as UdpPages } from "./UdpPages-
|
|
289
|
+
import { t as UdpPages } from "./UdpPages-BlEKkXVL.js";
|
|
290
290
|
import { t as AlertContainer } from "./AlertContainer-BwUF4KSm.js";
|
|
291
291
|
import { t as Accordion } from "./Accordion-DclqHg60.js";
|
|
292
292
|
import { t as Sticky } from "./Sticky-CgByT8D7.js";
|
package/dist/shell/index.js
CHANGED
|
@@ -110,8 +110,8 @@ import "../useAuthedUser-CN4neRNZ.js";
|
|
|
110
110
|
import "../useDefaultFormValues-BVsgZOlc.js";
|
|
111
111
|
import "../ActionLoadingContext-D83iHFWE.js";
|
|
112
112
|
import "../ActionProvider-Bac2QDAs.js";
|
|
113
|
-
import "../ChatBotProvider-
|
|
114
|
-
import { t as Shell } from "../Shell-
|
|
113
|
+
import "../ChatBotProvider-E-wyZLY_.js";
|
|
114
|
+
import { t as Shell } from "../Shell-DzTnenAf.js";
|
|
115
115
|
import "../useGravatar-RvImWAyu.js";
|
|
116
116
|
import "../LocalRedirectUrlStorage-Dl3UyONi.js";
|
|
117
117
|
import "../ExternalRedirectUrlStorage-NwBaYWri.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainer.d.ts","sourceRoot":"","sources":["../../../../src/chatBot/ChatContainer.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AA6CxE,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"ChatContainer.d.ts","sourceRoot":"","sources":["../../../../src/chatBot/ChatContainer.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AA6CxE,eAAO,MAAM,aAAa,mCAwOzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotProvider.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/chatBot/ChatBotProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,eAAO,MAAM,eAAe;;
|
|
1
|
+
{"version":3,"file":"ChatBotProvider.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/chatBot/ChatBotProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,eAAO,MAAM,eAAe;;uBAwD3B,CAAC"}
|