@servicetitan/titan-chat-ui-anvil2 5.2.3 → 5.2.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v5.2.4 (Fri Jan 09 2026)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - SPA-7821: File send error state [#81](https://github.com/servicetitan/titan-chatbot-client/pull/81) ([@AlexYarmolchuk](https://github.com/AlexYarmolchuk))
6
+
7
+ #### Authors: 1
8
+
9
+ - Alexandr Yarmolchuk ([@AlexYarmolchuk](https://github.com/AlexYarmolchuk))
10
+
11
+ ---
12
+
1
13
  # v5.1.0 (Tue Dec 02 2025)
2
14
 
3
15
  #### 🚀 Enhancement
@@ -1 +1 @@
1
- {"version":3,"file":"message-content-file.d.ts","sourceRoot":"","sources":["../../../src/components/message-content/message-content-file.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,oCAAoC,CAAC;AAE5F,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAErC,UAAU,wBAAwB;IAC9B,OAAO,EAAE,oBAAoB,CAAC;CACjC;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,wBAAwB,CAiB1D,CAAC"}
1
+ {"version":3,"file":"message-content-file.d.ts","sourceRoot":"","sources":["../../../src/components/message-content/message-content-file.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,oCAAoC,CAAC;AAE5F,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAErC,UAAU,wBAAwB;IAC9B,OAAO,EAAE,oBAAoB,CAAC;CACjC;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,wBAAwB,CAuB1D,CAAC"}
@@ -5,8 +5,10 @@ import { ChatMessageState } from '@servicetitan/titan-chat-ui-common';
5
5
  import { observer } from 'mobx-react';
6
6
  import { Fragment } from 'react';
7
7
  export const MessageContentFile = observer(({ message }) => {
8
+ var _a;
8
9
  const isDelivering = message.state === ChatMessageState.Delivering;
9
10
  const isDelivered = message.state === ChatMessageState.Delivered;
10
- return (_jsxs(Fragment, { children: [_jsxs(Flex, { direction: "row", gap: "2", alignItems: "center", children: [_jsx(Icon, { svg: IconFileAttach }), _jsx("span", { children: message.fileName })] }), (isDelivering || isDelivered) && (_jsx(Text, { variant: "body", size: "small", className: "ta-right", subdued: true, children: isDelivered ? 'File uploaded' : 'Please wait while uploading...' }))] }));
11
+ const isFailed = message.state === ChatMessageState.Failed;
12
+ return (_jsxs(Fragment, { children: [_jsxs(Flex, { direction: "row", gap: "2", alignItems: "center", children: [_jsx(Icon, { svg: IconFileAttach }), _jsx("span", { children: message.fileName })] }), isFailed && (_jsxs(Text, { variant: "body", size: "small", className: "ta-right c-red-500", children: ["File upload failed: ", (_a = message.error) !== null && _a !== void 0 ? _a : 'Unknown error'] })), (isDelivering || isDelivered) && (_jsx(Text, { variant: "body", size: "small", className: "ta-right", subdued: true, children: isDelivered ? 'File uploaded' : 'Please wait while uploading...' }))] }));
11
13
  });
12
14
  //# sourceMappingURL=message-content-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"message-content-file.js","sourceRoot":"","sources":["../../../src/components/message-content/message-content-file.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,cAAc,MAAM,kEAAkE,CAAC;AAC9F,OAAO,EAAwB,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMrC,MAAM,CAAC,MAAM,kBAAkB,GAAiC,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACrF,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,KAAK,gBAAgB,CAAC,UAAU,CAAC;IACnE,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,KAAK,gBAAgB,CAAC,SAAS,CAAC;IAEjE,OAAO,CACH,MAAC,QAAQ,eACL,MAAC,IAAI,IAAC,SAAS,EAAC,KAAK,EAAC,GAAG,EAAC,GAAG,EAAC,UAAU,EAAC,QAAQ,aAC7C,KAAC,IAAI,IAAC,GAAG,EAAE,cAAc,GAAI,EAC7B,yBAAO,OAAO,CAAC,QAAQ,GAAQ,IAC5B,EACN,CAAC,YAAY,IAAI,WAAW,CAAC,IAAI,CAC9B,KAAC,IAAI,IAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,OAAO,kBACzD,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gCAAgC,GAC9D,CACV,IACM,CACd,CAAC;AACN,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"message-content-file.js","sourceRoot":"","sources":["../../../src/components/message-content/message-content-file.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,cAAc,MAAM,kEAAkE,CAAC;AAC9F,OAAO,EAAwB,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMrC,MAAM,CAAC,MAAM,kBAAkB,GAAiC,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;;IACrF,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,KAAK,gBAAgB,CAAC,UAAU,CAAC;IACnE,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,KAAK,gBAAgB,CAAC,SAAS,CAAC;IACjE,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,KAAK,gBAAgB,CAAC,MAAM,CAAC;IAE3D,OAAO,CACH,MAAC,QAAQ,eACL,MAAC,IAAI,IAAC,SAAS,EAAC,KAAK,EAAC,GAAG,EAAC,GAAG,EAAC,UAAU,EAAC,QAAQ,aAC7C,KAAC,IAAI,IAAC,GAAG,EAAE,cAAc,GAAI,EAC7B,yBAAO,OAAO,CAAC,QAAQ,GAAQ,IAC5B,EACN,QAAQ,IAAI,CACT,MAAC,IAAI,IAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,oBAAoB,qCACvC,MAAA,OAAO,CAAC,KAAK,mCAAI,eAAe,IAClD,CACV,EACA,CAAC,YAAY,IAAI,WAAW,CAAC,IAAI,CAC9B,KAAC,IAAI,IAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,OAAO,kBACzD,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gCAAgC,GAC9D,CACV,IACM,CACd,CAAC;AACN,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/titan-chat-ui-anvil2",
3
- "version": "5.2.3",
3
+ "version": "5.2.4",
4
4
  "description": "Chat experience UI package (Anvil2 version)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "push:local": "yalc push"
18
18
  },
19
19
  "dependencies": {
20
- "@servicetitan/titan-chat-ui-common": "^5.2.3",
20
+ "@servicetitan/titan-chat-ui-common": "^5.2.4",
21
21
  "dompurify": "^3.2.6",
22
22
  "lodash": "4.17.21",
23
23
  "nanoid": "^5.1.5",
@@ -39,7 +39,7 @@
39
39
  "react-dom": ">=18"
40
40
  },
41
41
  "devDependencies": {
42
- "@servicetitan/cypress-shared": "^5.2.3",
42
+ "@servicetitan/cypress-shared": "^5.2.4",
43
43
  "cypress": "^15.2.0"
44
44
  },
45
45
  "keywords": [
@@ -52,5 +52,5 @@
52
52
  "cli": {
53
53
  "webpack": false
54
54
  },
55
- "gitHead": "e55c913f13784a374207c09c3f9e9c0b2cabf665"
55
+ "gitHead": "c13fa03567feead6d3908634db382ec4b9bd1790"
56
56
  }
@@ -11,6 +11,7 @@ interface IMessageContentFileProps {
11
11
  export const MessageContentFile: FC<IMessageContentFileProps> = observer(({ message }) => {
12
12
  const isDelivering = message.state === ChatMessageState.Delivering;
13
13
  const isDelivered = message.state === ChatMessageState.Delivered;
14
+ const isFailed = message.state === ChatMessageState.Failed;
14
15
 
15
16
  return (
16
17
  <Fragment>
@@ -18,6 +19,11 @@ export const MessageContentFile: FC<IMessageContentFileProps> = observer(({ mess
18
19
  <Icon svg={IconFileAttach} />
19
20
  <span>{message.fileName}</span>
20
21
  </Flex>
22
+ {isFailed && (
23
+ <Text variant="body" size="small" className="ta-right c-red-500">
24
+ File upload failed: {message.error ?? 'Unknown error'}
25
+ </Text>
26
+ )}
21
27
  {(isDelivering || isDelivered) && (
22
28
  <Text variant="body" size="small" className="ta-right" subdued>
23
29
  {isDelivered ? 'File uploaded' : 'Please wait while uploading...'}