rohit-chat-widget 1.0.34 → 1.0.35

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.
Files changed (292) hide show
  1. package/package.json +1 -1
  2. package/lib/components/ChatContainer/ChatContainer.d.ts +0 -10
  3. package/lib/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  4. package/lib/components/ChatContainer/ChatContainer.js +0 -9
  5. package/lib/components/ChatContainer/ChatContainer.js.map +0 -1
  6. package/lib/components/ChatContainer/index.d.ts +0 -2
  7. package/lib/components/ChatContainer/index.d.ts.map +0 -1
  8. package/lib/components/ChatContainer/index.js +0 -2
  9. package/lib/components/ChatContainer/index.js.map +0 -1
  10. package/lib/components/ChatHeader/ChatHeader.d.ts +0 -12
  11. package/lib/components/ChatHeader/ChatHeader.d.ts.map +0 -1
  12. package/lib/components/ChatHeader/ChatHeader.js +0 -25
  13. package/lib/components/ChatHeader/ChatHeader.js.map +0 -1
  14. package/lib/components/ChatHeader/index.d.ts +0 -2
  15. package/lib/components/ChatHeader/index.d.ts.map +0 -1
  16. package/lib/components/ChatHeader/index.js +0 -2
  17. package/lib/components/ChatHeader/index.js.map +0 -1
  18. package/lib/components/ChatWidget/ChatWidget.d.ts +0 -13
  19. package/lib/components/ChatWidget/ChatWidget.d.ts.map +0 -1
  20. package/lib/components/ChatWidget/ChatWidget.js +0 -69
  21. package/lib/components/ChatWidget/ChatWidget.js.map +0 -1
  22. package/lib/components/ChatWidget/index.d.ts +0 -2
  23. package/lib/components/ChatWidget/index.d.ts.map +0 -1
  24. package/lib/components/ChatWidget/index.js +0 -2
  25. package/lib/components/ChatWidget/index.js.map +0 -1
  26. package/lib/components/DropdownMenu/DropdownMenu.d.ts +0 -16
  27. package/lib/components/DropdownMenu/DropdownMenu.d.ts.map +0 -1
  28. package/lib/components/DropdownMenu/DropdownMenu.js +0 -78
  29. package/lib/components/DropdownMenu/DropdownMenu.js.map +0 -1
  30. package/lib/components/DropdownMenu/index.d.ts +0 -3
  31. package/lib/components/DropdownMenu/index.d.ts.map +0 -1
  32. package/lib/components/DropdownMenu/index.js +0 -2
  33. package/lib/components/DropdownMenu/index.js.map +0 -1
  34. package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +0 -21
  35. package/lib/components/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
  36. package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -40
  37. package/lib/components/ErrorBoundary/ErrorBoundary.js.map +0 -1
  38. package/lib/components/ErrorBoundary/index.d.ts +0 -2
  39. package/lib/components/ErrorBoundary/index.d.ts.map +0 -1
  40. package/lib/components/ErrorBoundary/index.js +0 -2
  41. package/lib/components/ErrorBoundary/index.js.map +0 -1
  42. package/lib/components/ErrorDisplay/ErrorDisplay.d.ts +0 -9
  43. package/lib/components/ErrorDisplay/ErrorDisplay.d.ts.map +0 -1
  44. package/lib/components/ErrorDisplay/ErrorDisplay.js +0 -11
  45. package/lib/components/ErrorDisplay/ErrorDisplay.js.map +0 -1
  46. package/lib/components/ErrorDisplay/index.d.ts +0 -3
  47. package/lib/components/ErrorDisplay/index.d.ts.map +0 -1
  48. package/lib/components/ErrorDisplay/index.js +0 -3
  49. package/lib/components/ErrorDisplay/index.js.map +0 -1
  50. package/lib/components/LoadingIndicator/LoadingIndicator.d.ts +0 -10
  51. package/lib/components/LoadingIndicator/LoadingIndicator.d.ts.map +0 -1
  52. package/lib/components/LoadingIndicator/LoadingIndicator.js +0 -10
  53. package/lib/components/LoadingIndicator/LoadingIndicator.js.map +0 -1
  54. package/lib/components/LoadingIndicator/index.d.ts +0 -2
  55. package/lib/components/LoadingIndicator/index.d.ts.map +0 -1
  56. package/lib/components/LoadingIndicator/index.js +0 -3
  57. package/lib/components/LoadingIndicator/index.js.map +0 -1
  58. package/lib/components/MenuButton/MenuButton.d.ts +0 -10
  59. package/lib/components/MenuButton/MenuButton.d.ts.map +0 -1
  60. package/lib/components/MenuButton/MenuButton.js +0 -7
  61. package/lib/components/MenuButton/MenuButton.js.map +0 -1
  62. package/lib/components/MenuButton/index.d.ts +0 -2
  63. package/lib/components/MenuButton/index.d.ts.map +0 -1
  64. package/lib/components/MenuButton/index.js +0 -2
  65. package/lib/components/MenuButton/index.js.map +0 -1
  66. package/lib/components/MenuItem/MenuItem.d.ts +0 -12
  67. package/lib/components/MenuItem/MenuItem.d.ts.map +0 -1
  68. package/lib/components/MenuItem/MenuItem.js +0 -12
  69. package/lib/components/MenuItem/MenuItem.js.map +0 -1
  70. package/lib/components/MenuItem/index.d.ts +0 -2
  71. package/lib/components/MenuItem/index.d.ts.map +0 -1
  72. package/lib/components/MenuItem/index.js +0 -2
  73. package/lib/components/MenuItem/index.js.map +0 -1
  74. package/lib/components/MessageBubble/MessageBubble.d.ts +0 -17
  75. package/lib/components/MessageBubble/MessageBubble.d.ts.map +0 -1
  76. package/lib/components/MessageBubble/MessageBubble.js +0 -111
  77. package/lib/components/MessageBubble/MessageBubble.js.map +0 -1
  78. package/lib/components/MessageBubble/index.d.ts +0 -2
  79. package/lib/components/MessageBubble/index.d.ts.map +0 -1
  80. package/lib/components/MessageBubble/index.js +0 -2
  81. package/lib/components/MessageBubble/index.js.map +0 -1
  82. package/lib/components/MessageInput/MessageInput.d.ts +0 -9
  83. package/lib/components/MessageInput/MessageInput.d.ts.map +0 -1
  84. package/lib/components/MessageInput/MessageInput.js +0 -161
  85. package/lib/components/MessageInput/MessageInput.js.map +0 -1
  86. package/lib/components/MessageInput/index.d.ts +0 -2
  87. package/lib/components/MessageInput/index.d.ts.map +0 -1
  88. package/lib/components/MessageInput/index.js +0 -2
  89. package/lib/components/MessageInput/index.js.map +0 -1
  90. package/lib/components/MessageList/MessageList.d.ts +0 -21
  91. package/lib/components/MessageList/MessageList.d.ts.map +0 -1
  92. package/lib/components/MessageList/MessageList.js +0 -61
  93. package/lib/components/MessageList/MessageList.js.map +0 -1
  94. package/lib/components/MessageList/index.d.ts +0 -2
  95. package/lib/components/MessageList/index.d.ts.map +0 -1
  96. package/lib/components/MessageList/index.js +0 -2
  97. package/lib/components/MessageList/index.js.map +0 -1
  98. package/lib/components/StatusIndicator/StatusIndicator.d.ts +0 -10
  99. package/lib/components/StatusIndicator/StatusIndicator.d.ts.map +0 -1
  100. package/lib/components/StatusIndicator/StatusIndicator.js +0 -19
  101. package/lib/components/StatusIndicator/StatusIndicator.js.map +0 -1
  102. package/lib/components/StatusIndicator/index.d.ts +0 -2
  103. package/lib/components/StatusIndicator/index.d.ts.map +0 -1
  104. package/lib/components/StatusIndicator/index.js +0 -2
  105. package/lib/components/StatusIndicator/index.js.map +0 -1
  106. package/lib/components/index.d.ts +0 -21
  107. package/lib/components/index.d.ts.map +0 -1
  108. package/lib/components/index.js +0 -13
  109. package/lib/components/index.js.map +0 -1
  110. package/lib/config/api.d.ts +0 -79
  111. package/lib/config/api.d.ts.map +0 -1
  112. package/lib/config/api.js +0 -10
  113. package/lib/config/api.js.map +0 -1
  114. package/lib/config/constants.d.ts +0 -5
  115. package/lib/config/constants.d.ts.map +0 -1
  116. package/lib/config/constants.js +0 -5
  117. package/lib/config/constants.js.map +0 -1
  118. package/lib/hooks/index.d.ts +0 -2
  119. package/lib/hooks/index.d.ts.map +0 -1
  120. package/lib/hooks/index.js +0 -2
  121. package/lib/hooks/index.js.map +0 -1
  122. package/lib/hooks/useChatInit.d.ts +0 -21
  123. package/lib/hooks/useChatInit.d.ts.map +0 -1
  124. package/lib/hooks/useChatInit.js +0 -66
  125. package/lib/hooks/useChatInit.js.map +0 -1
  126. package/lib/index.d.ts +0 -14
  127. package/lib/index.d.ts.map +0 -1
  128. package/lib/index.esm.js +0 -21241
  129. package/lib/index.esm.js.map +0 -1
  130. package/lib/index.js +0 -16
  131. package/lib/index.js.map +0 -1
  132. package/lib/services/acs/acsClient.d.ts +0 -29
  133. package/lib/services/acs/acsClient.d.ts.map +0 -1
  134. package/lib/services/acs/acsClient.js +0 -101
  135. package/lib/services/acs/acsClient.js.map +0 -1
  136. package/lib/services/acs/index.d.ts +0 -2
  137. package/lib/services/acs/index.d.ts.map +0 -1
  138. package/lib/services/acs/index.js +0 -2
  139. package/lib/services/acs/index.js.map +0 -1
  140. package/lib/services/api/backendApi.d.ts +0 -846
  141. package/lib/services/api/backendApi.d.ts.map +0 -1
  142. package/lib/services/api/backendApi.js +0 -71
  143. package/lib/services/api/backendApi.js.map +0 -1
  144. package/lib/services/api/index.d.ts +0 -3
  145. package/lib/services/api/index.d.ts.map +0 -1
  146. package/lib/services/api/index.js +0 -3
  147. package/lib/services/api/index.js.map +0 -1
  148. package/lib/services/chatService.d.ts +0 -51
  149. package/lib/services/chatService.d.ts.map +0 -1
  150. package/lib/services/chatService.js +0 -232
  151. package/lib/services/chatService.js.map +0 -1
  152. package/lib/services/index.d.ts +0 -4
  153. package/lib/services/index.d.ts.map +0 -1
  154. package/lib/services/index.js +0 -4
  155. package/lib/services/index.js.map +0 -1
  156. package/lib/src/components/ChatContainer/ChatContainer.d.ts +0 -10
  157. package/lib/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  158. package/lib/src/components/ChatContainer/index.d.ts +0 -2
  159. package/lib/src/components/ChatContainer/index.d.ts.map +0 -1
  160. package/lib/src/components/ChatHeader/ChatHeader.d.ts +0 -12
  161. package/lib/src/components/ChatHeader/ChatHeader.d.ts.map +0 -1
  162. package/lib/src/components/ChatHeader/index.d.ts +0 -2
  163. package/lib/src/components/ChatHeader/index.d.ts.map +0 -1
  164. package/lib/src/components/ChatWidget/ChatWidget.d.ts +0 -13
  165. package/lib/src/components/ChatWidget/ChatWidget.d.ts.map +0 -1
  166. package/lib/src/components/ChatWidget/index.d.ts +0 -2
  167. package/lib/src/components/ChatWidget/index.d.ts.map +0 -1
  168. package/lib/src/components/DropdownMenu/DropdownMenu.d.ts +0 -16
  169. package/lib/src/components/DropdownMenu/DropdownMenu.d.ts.map +0 -1
  170. package/lib/src/components/DropdownMenu/index.d.ts +0 -3
  171. package/lib/src/components/DropdownMenu/index.d.ts.map +0 -1
  172. package/lib/src/components/ErrorBoundary/ErrorBoundary.d.ts +0 -21
  173. package/lib/src/components/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
  174. package/lib/src/components/ErrorBoundary/index.d.ts +0 -2
  175. package/lib/src/components/ErrorBoundary/index.d.ts.map +0 -1
  176. package/lib/src/components/ErrorDisplay/ErrorDisplay.d.ts +0 -9
  177. package/lib/src/components/ErrorDisplay/ErrorDisplay.d.ts.map +0 -1
  178. package/lib/src/components/ErrorDisplay/index.d.ts +0 -3
  179. package/lib/src/components/ErrorDisplay/index.d.ts.map +0 -1
  180. package/lib/src/components/LoadingIndicator/LoadingIndicator.d.ts +0 -10
  181. package/lib/src/components/LoadingIndicator/LoadingIndicator.d.ts.map +0 -1
  182. package/lib/src/components/LoadingIndicator/index.d.ts +0 -2
  183. package/lib/src/components/LoadingIndicator/index.d.ts.map +0 -1
  184. package/lib/src/components/MenuButton/MenuButton.d.ts +0 -10
  185. package/lib/src/components/MenuButton/MenuButton.d.ts.map +0 -1
  186. package/lib/src/components/MenuButton/index.d.ts +0 -2
  187. package/lib/src/components/MenuButton/index.d.ts.map +0 -1
  188. package/lib/src/components/MenuItem/MenuItem.d.ts +0 -12
  189. package/lib/src/components/MenuItem/MenuItem.d.ts.map +0 -1
  190. package/lib/src/components/MenuItem/index.d.ts +0 -2
  191. package/lib/src/components/MenuItem/index.d.ts.map +0 -1
  192. package/lib/src/components/MessageBubble/MessageBubble.d.ts +0 -17
  193. package/lib/src/components/MessageBubble/MessageBubble.d.ts.map +0 -1
  194. package/lib/src/components/MessageBubble/index.d.ts +0 -2
  195. package/lib/src/components/MessageBubble/index.d.ts.map +0 -1
  196. package/lib/src/components/MessageInput/MessageInput.d.ts +0 -9
  197. package/lib/src/components/MessageInput/MessageInput.d.ts.map +0 -1
  198. package/lib/src/components/MessageInput/index.d.ts +0 -2
  199. package/lib/src/components/MessageInput/index.d.ts.map +0 -1
  200. package/lib/src/components/MessageList/MessageList.d.ts +0 -21
  201. package/lib/src/components/MessageList/MessageList.d.ts.map +0 -1
  202. package/lib/src/components/MessageList/index.d.ts +0 -2
  203. package/lib/src/components/MessageList/index.d.ts.map +0 -1
  204. package/lib/src/components/StatusIndicator/StatusIndicator.d.ts +0 -10
  205. package/lib/src/components/StatusIndicator/StatusIndicator.d.ts.map +0 -1
  206. package/lib/src/components/StatusIndicator/index.d.ts +0 -2
  207. package/lib/src/components/StatusIndicator/index.d.ts.map +0 -1
  208. package/lib/src/components/index.d.ts +0 -21
  209. package/lib/src/components/index.d.ts.map +0 -1
  210. package/lib/src/config/api.d.ts +0 -79
  211. package/lib/src/config/api.d.ts.map +0 -1
  212. package/lib/src/config/constants.d.ts +0 -5
  213. package/lib/src/config/constants.d.ts.map +0 -1
  214. package/lib/src/hooks/index.d.ts +0 -2
  215. package/lib/src/hooks/index.d.ts.map +0 -1
  216. package/lib/src/hooks/useChatInit.d.ts +0 -21
  217. package/lib/src/hooks/useChatInit.d.ts.map +0 -1
  218. package/lib/src/index.d.ts +0 -14
  219. package/lib/src/index.d.ts.map +0 -1
  220. package/lib/src/services/acs/acsClient.d.ts +0 -29
  221. package/lib/src/services/acs/acsClient.d.ts.map +0 -1
  222. package/lib/src/services/acs/index.d.ts +0 -2
  223. package/lib/src/services/acs/index.d.ts.map +0 -1
  224. package/lib/src/services/api/backendApi.d.ts +0 -846
  225. package/lib/src/services/api/backendApi.d.ts.map +0 -1
  226. package/lib/src/services/api/index.d.ts +0 -3
  227. package/lib/src/services/api/index.d.ts.map +0 -1
  228. package/lib/src/services/chatService.d.ts +0 -51
  229. package/lib/src/services/chatService.d.ts.map +0 -1
  230. package/lib/src/services/index.d.ts +0 -4
  231. package/lib/src/services/index.d.ts.map +0 -1
  232. package/lib/src/store/index.d.ts +0 -36
  233. package/lib/src/store/index.d.ts.map +0 -1
  234. package/lib/src/store/slices/index.d.ts +0 -5
  235. package/lib/src/store/slices/index.d.ts.map +0 -1
  236. package/lib/src/store/slices/messagesSlice.d.ts +0 -80
  237. package/lib/src/store/slices/messagesSlice.d.ts.map +0 -1
  238. package/lib/src/store/slices/threadSlice.d.ts +0 -42
  239. package/lib/src/store/slices/threadSlice.d.ts.map +0 -1
  240. package/lib/src/store/store.d.ts +0 -36
  241. package/lib/src/store/store.d.ts.map +0 -1
  242. package/lib/src/types/index.d.ts +0 -29
  243. package/lib/src/types/index.d.ts.map +0 -1
  244. package/lib/src/utils/dateUtils.d.ts +0 -13
  245. package/lib/src/utils/dateUtils.d.ts.map +0 -1
  246. package/lib/src/utils/index.d.ts +0 -4
  247. package/lib/src/utils/index.d.ts.map +0 -1
  248. package/lib/src/utils/styleManager.d.ts +0 -45
  249. package/lib/src/utils/styleManager.d.ts.map +0 -1
  250. package/lib/src/utils/validation.d.ts +0 -17
  251. package/lib/src/utils/validation.d.ts.map +0 -1
  252. package/lib/store/index.d.ts +0 -36
  253. package/lib/store/index.d.ts.map +0 -1
  254. package/lib/store/index.js +0 -9
  255. package/lib/store/index.js.map +0 -1
  256. package/lib/store/slices/index.d.ts +0 -5
  257. package/lib/store/slices/index.d.ts.map +0 -1
  258. package/lib/store/slices/index.js +0 -7
  259. package/lib/store/slices/index.js.map +0 -1
  260. package/lib/store/slices/messagesSlice.d.ts +0 -80
  261. package/lib/store/slices/messagesSlice.d.ts.map +0 -1
  262. package/lib/store/slices/messagesSlice.js +0 -88
  263. package/lib/store/slices/messagesSlice.js.map +0 -1
  264. package/lib/store/slices/threadSlice.d.ts +0 -42
  265. package/lib/store/slices/threadSlice.d.ts.map +0 -1
  266. package/lib/store/slices/threadSlice.js +0 -54
  267. package/lib/store/slices/threadSlice.js.map +0 -1
  268. package/lib/store/store.d.ts +0 -36
  269. package/lib/store/store.d.ts.map +0 -1
  270. package/lib/store/store.js +0 -17
  271. package/lib/store/store.js.map +0 -1
  272. package/lib/styles.css +0 -3770
  273. package/lib/types/index.d.ts +0 -29
  274. package/lib/types/index.d.ts.map +0 -1
  275. package/lib/types/index.js +0 -2
  276. package/lib/types/index.js.map +0 -1
  277. package/lib/utils/dateUtils.d.ts +0 -13
  278. package/lib/utils/dateUtils.d.ts.map +0 -1
  279. package/lib/utils/dateUtils.js +0 -33
  280. package/lib/utils/dateUtils.js.map +0 -1
  281. package/lib/utils/index.d.ts +0 -4
  282. package/lib/utils/index.d.ts.map +0 -1
  283. package/lib/utils/index.js +0 -5
  284. package/lib/utils/index.js.map +0 -1
  285. package/lib/utils/styleManager.d.ts +0 -45
  286. package/lib/utils/styleManager.d.ts.map +0 -1
  287. package/lib/utils/styleManager.js +0 -69
  288. package/lib/utils/styleManager.js.map +0 -1
  289. package/lib/utils/validation.d.ts +0 -17
  290. package/lib/utils/validation.d.ts.map +0 -1
  291. package/lib/utils/validation.js +0 -32
  292. package/lib/utils/validation.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rohit-chat-widget",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "A chat widget for SmarterEMR client applications.",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface ChatContainerProps {
3
- isLoading?: boolean;
4
- className?: string;
5
- showDateSeparator?: boolean;
6
- welcomeMessage?: string;
7
- }
8
- export declare const ChatContainer: React.FC<ChatContainerProps>;
9
- export default ChatContainer;
10
- //# sourceMappingURL=ChatContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatContainer.d.ts","sourceRoot":"","sources":["../../../src/components/ChatContainer/ChatContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqBtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import styles from './ChatContainer.module.scss';
3
- import { MessageList } from '../MessageList';
4
- import { MessageInput } from '../MessageInput';
5
- export const ChatContainer = ({ isLoading = false, className }) => {
6
- return (_jsxs("div", { className: `${styles.chatContainer} ${className || ''}`, children: [_jsx("div", { className: styles.messagesSection, children: _jsx(MessageList, { isLoading: isLoading }) }), _jsx("div", { className: styles.disclaimer, role: "note", "aria-live": "polite", children: "This is a private channel with your doctor for clinical questions. For billing/shipping/account issues, please reach out to support." }), _jsx("div", { className: styles.chatInputWrapper, children: _jsx(MessageInput, { disabled: false }) })] }));
7
- };
8
- export default ChatContainer;
9
- //# sourceMappingURL=ChatContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatContainer.js","sourceRoot":"","sources":["../../../src/components/ChatContainer/ChatContainer.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAS/C,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,SAAS,GAAG,KAAK,EACjB,SAAS,EACV,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,aAAa,IAAI,SAAS,IAAI,EAAE,EAAE,aAC1D,cAAK,SAAS,EAAE,MAAM,CAAC,eAAe,YACpC,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,GAAI,GACjC,EAGN,cAAK,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAC,MAAM,eAAW,QAAQ,qJAE3D,EAGN,cAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,YACrC,KAAC,YAAY,IAAC,QAAQ,EAAE,KAAK,GAAI,GAC7B,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatContainer } from './ChatContainer';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChatContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatContainer } from './ChatContainer';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ChatContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { MenuItemConfig } from '../DropdownMenu';
3
- export interface ChatHeaderProps {
4
- title?: string;
5
- className?: string;
6
- onRefresh?: () => void;
7
- menuItems?: MenuItemConfig[];
8
- showMenu?: boolean;
9
- }
10
- export declare const ChatHeader: React.FC<ChatHeaderProps>;
11
- export default ChatHeader;
12
- //# sourceMappingURL=ChatHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ChatHeader/ChatHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkGhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import styles from './ChatHeader.module.scss';
4
- import { DropdownMenu } from '../DropdownMenu';
5
- import { useSelector } from 'react-redux';
6
- import { selectThread } from '@/store/slices/threadSlice';
7
- export const ChatHeader = ({ title = 'Provider', className, onRefresh, menuItems = [], showMenu = false, }) => {
8
- const [isMenuOpen, setIsMenuOpen] = useState(false);
9
- const thread = useSelector(selectThread);
10
- const headerTitle = 'Medical Chat';
11
- const toggleMenu = () => {
12
- setIsMenuOpen(!isMenuOpen);
13
- };
14
- const handleMenuButtonClick = (event) => {
15
- event.stopPropagation();
16
- event.preventDefault();
17
- toggleMenu();
18
- };
19
- const closeMenu = () => {
20
- setIsMenuOpen(false);
21
- };
22
- return (_jsx("div", { className: `${styles.chatHeader} chat-header ${className || ''}`, children: _jsxs("div", { className: styles.headerContent, children: [_jsxs("div", { className: styles.leftSection, children: [_jsx("svg", { width: "26", height: "26", viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M5 10.9998H6C6.92047 10.9998 7.66667 11.746 7.66667 12.6665V17.3332C7.66667 18.2536 6.92047 18.9998 6 18.9998H5C2.79086 18.9998 1 17.209 1 14.9998C1 12.7907 2.79086 10.9998 5 10.9998ZM5 10.9998V9.6665C5 5.24823 8.58172 1.6665 13 1.6665C17.4183 1.6665 21 5.24823 21 9.6665V10.9998M21 10.9998H20C19.0795 10.9998 18.3333 11.746 18.3333 12.6665V17.3332C18.3333 18.2536 19.0795 18.9998 20 18.9998H21M21 10.9998C23.2091 10.9998 25 12.7907 25 14.9998C25 17.209 23.2091 18.9998 21 18.9998M21 18.9998L20.1716 22.3133C19.8749 23.5004 18.8082 24.3332 17.5846 24.3332H14.3333", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), _jsx("h3", { className: styles.title, children: headerTitle })] }), _jsxs("div", { className: styles.headerActions, children: [_jsx("button", { className: styles.actionButton, "aria-label": "Refresh", onClick: onRefresh, children: _jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { clipPath: "url(#clip0_55864_4683)", children: _jsx("path", { d: "M8 0C6.03034 0.00140425 4.13075 0.731081 2.66667 2.04867V0.666667C2.66667 0.489856 2.59643 0.320286 2.4714 0.195262C2.34638 0.0702379 2.17681 0 2 0C1.82319 0 1.65362 0.0702379 1.5286 0.195262C1.40357 0.320286 1.33333 0.489856 1.33333 0.666667V2.66667C1.33333 3.1971 1.54405 3.70581 1.91912 4.08088C2.29419 4.45595 2.8029 4.66667 3.33333 4.66667H5.33333C5.51015 4.66667 5.67971 4.59643 5.80474 4.47141C5.92976 4.34638 6 4.17681 6 4C6 3.82319 5.92976 3.65362 5.80474 3.5286C5.67971 3.40357 5.51015 3.33333 5.33333 3.33333H3.33333C3.31085 3.33 3.28859 3.32533 3.26667 3.31933C4.35301 2.22522 5.78542 1.54205 7.31938 1.38644C8.85333 1.23084 10.3938 1.61244 11.6777 2.46611C12.9616 3.31978 13.9095 4.5926 14.3595 6.0673C14.8094 7.54201 14.7337 9.12717 14.1451 10.5522C13.5564 11.9773 12.4915 13.1539 11.132 13.8812C9.77246 14.6085 8.20266 14.8414 6.69054 14.5401C5.17843 14.2389 3.81772 13.4222 2.8407 12.2295C1.86368 11.0367 1.33091 9.54183 1.33333 8C1.33333 7.82319 1.2631 7.65362 1.13807 7.5286C1.01305 7.40357 0.843478 7.33333 0.666667 7.33333C0.489856 7.33333 0.320286 7.40357 0.195262 7.5286C0.0702379 7.65362 0 7.82319 0 8C0 9.58225 0.469192 11.129 1.34824 12.4446C2.22729 13.7602 3.47672 14.7855 4.93853 15.391C6.40034 15.9965 8.00887 16.155 9.56072 15.8463C11.1126 15.5376 12.538 14.7757 13.6569 13.6569C14.7757 12.538 15.5376 11.1126 15.8463 9.56072C16.155 8.00887 15.9965 6.40034 15.391 4.93853C14.7855 3.47672 13.7602 2.22729 12.4446 1.34824C11.129 0.469192 9.58225 0 8 0V0Z", fill: "currentColor" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_55864_4683", children: _jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }) }), showMenu && (_jsxs("div", { className: styles.menuButtonContainer, onClick: (e) => e.stopPropagation(), children: [_jsx("button", { className: styles.actionButton, "aria-label": "Menu", onClick: handleMenuButtonClick, type: "button", children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", children: _jsx("path", { d: "M12 13a1 1 0 100-2 1 1 0 000 2zM12 7a1 1 0 100-2 1 1 0 000 2zM12 19a1 1 0 100-2 1 1 0 000 2z" }) }) }), _jsx(DropdownMenu, { isOpen: isMenuOpen, onClose: closeMenu, menuItems: menuItems, position: "bottom-right" })] }))] })] }) }));
23
- };
24
- export default ChatHeader;
25
- //# sourceMappingURL=ChatHeader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatHeader.js","sourceRoot":"","sources":["../../../src/components/ChatHeader/ChatHeader.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAU1D,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,GAAG,UAAU,EAClB,SAAS,EACT,SAAS,EACT,SAAS,GAAG,EAAE,EACd,QAAQ,GAAG,KAAK,GACjB,EAAE,EAAE;IACH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,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,CAAC,EAAC,28CAA28C,EAC78C,IAAI,EAAC,cAAc,GACnB,GACA,EACJ,yBACE,mBAAU,EAAE,EAAC,kBAAkB,YAC7B,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,GAAG,GACnC,GACN,IACH,GACC,EACR,QAAQ,IAAI,CACX,eAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,aAC7E,iBACE,SAAS,EAAE,MAAM,CAAC,YAAY,gBACnB,MAAM,EACjB,OAAO,EAAE,qBAAqB,EAC9B,IAAI,EAAC,QAAQ,YAEb,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,YACjE,eAAM,CAAC,EAAC,8FAA8F,GAAG,GACrG,GACC,EACT,KAAC,YAAY,IACX,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAC,cAAc,GACvB,IACE,CACP,IACG,IACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatHeader } from './ChatHeader';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChatHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatHeader } from './ChatHeader';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ChatHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { InitiateChatRequest } from '../../config/api';
3
- import { MenuItemConfig } from '../DropdownMenu';
4
- export interface ChatWidgetProps {
5
- initParams: InitiateChatRequest;
6
- primaryColor: string;
7
- secondaryColor: string;
8
- menuItems: MenuItemConfig[];
9
- showMenu: boolean;
10
- }
11
- export declare const ChatWidget: React.FC<ChatWidgetProps>;
12
- export default ChatWidget;
13
- //# sourceMappingURL=ChatWidget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatWidget.d.ts","sourceRoot":"","sources":["../../../src/components/ChatWidget/ChatWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,WAAW,eAAe;IAE9B,UAAU,EAAE,mBAAmB,CAAC;IAGhC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IAGvB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACnB;AA2ED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4BhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,69 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect } from 'react';
3
- import { Provider, ReactReduxContext } from 'react-redux';
4
- import { store } from '../../store';
5
- import { updateApiConfig } from '../../services/api/backendApi';
6
- import styles from './ChatWidget.module.scss';
7
- import { ChatContainer } from '../ChatContainer';
8
- import { ChatHeader } from '../ChatHeader';
9
- import { useChatInit } from '../../hooks';
10
- import { ErrorBoundary } from '../ErrorBoundary';
11
- import { ErrorDisplay } from '../ErrorDisplay';
12
- const InnerChatWidget = ({ initParams, primaryColor, secondaryColor, menuItems, showMenu }) => {
13
- const { isInitializing, error, initializeChat } = useChatInit();
14
- // Apply primary color to CSS custom properties
15
- useEffect(() => {
16
- if (primaryColor) {
17
- document.documentElement.style.setProperty('--chat-primary-color', primaryColor);
18
- }
19
- if (secondaryColor) {
20
- document.documentElement.style.setProperty('--chat-secondary-color', secondaryColor);
21
- }
22
- }, [primaryColor, secondaryColor]);
23
- useEffect(() => {
24
- const initialize = async () => {
25
- if (!initParams || !initParams.baseUrl || !initParams.apiKey) {
26
- return;
27
- }
28
- try {
29
- const result = await initializeChat(initParams);
30
- if (!result.success && result.error) {
31
- console.error('Chat initialization failed:', result.error);
32
- }
33
- }
34
- catch (error) {
35
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
36
- console.error('Error during chat initialization:', errorMessage);
37
- }
38
- };
39
- initialize();
40
- }, [initParams]);
41
- const handleRefresh = () => {
42
- // Check if we have valid API credentials before making any API calls
43
- if (!initParams.baseUrl || !initParams.apiKey) {
44
- return;
45
- }
46
- // Clear existing messages before reinitializing
47
- initializeChat(initParams);
48
- };
49
- // If there's an initialization error, show error UI directly
50
- if (error) {
51
- return (_jsx(ErrorDisplay, { primaryColor: primaryColor, message: "We're having trouble loading this page. Please try again. If the issue persists, contact support.", onRetry: handleRefresh }));
52
- }
53
- return (_jsx("div", { className: styles.chatWidget, children: _jsxs("div", { className: styles.chatWindow, children: [_jsx(ChatHeader, { className: styles.header, onRefresh: handleRefresh, menuItems: menuItems, showMenu: showMenu }), _jsx(ChatContainer, { isLoading: isInitializing })] }) }));
54
- };
55
- export const ChatWidget = (props) => {
56
- // Ensure API config is set synchronously so any initialization that runs
57
- // during mount has the correct headers available. Calling this during
58
- // render is safe because it only updates a module-level config object.
59
- if (props.initParams && props.initParams.baseUrl && props.initParams.apiKey) {
60
- updateApiConfig(props.initParams.baseUrl, props.initParams.apiKey);
61
- }
62
- return (_jsx(ReactReduxContext.Consumer, { children: (context) =>
63
- // If the host app provides a Redux store via context, give that store
64
- // reference to the chatService so service actions dispatch to the
65
- // host store and selectors in components will update correctly.
66
- context && context.store ? (_jsx(ErrorBoundary, { primaryColor: props.primaryColor, children: _jsx(InnerChatWidget, { ...props }) })) : (_jsx(Provider, { store: store, children: _jsx(ErrorBoundary, { primaryColor: props.primaryColor, children: _jsx(InnerChatWidget, { ...props }) }) })) }));
67
- };
68
- export default ChatWidget;
69
- //# sourceMappingURL=ChatWidget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatWidget.js","sourceRoot":"","sources":["../../../src/components/ChatWidget/ChatWidget.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,eAAe,GAA8B,CAAC,EAClD,UAAU,EACV,YAAY,EACZ,cAAc,EACd,SAAS,EACT,QAAQ,EACT,EAAE,EAAE;IAEH,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,EAAE,CAAC;IAEhE,+CAA+C;IAC/C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,EAAE,CAAC;YACjB,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,sBAAsB,EAAE,YAAY,CAAC,CAAC;QACnF,CAAC;QACD,IAAI,cAAc,EAAE,CAAC;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-1,2 +0,0 @@
1
- export { ChatWidget } from './ChatWidget';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChatWidget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatWidget } from './ChatWidget';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ChatWidget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- export interface MenuItemConfig {
3
- label: string;
4
- action: () => void;
5
- icon?: React.ReactNode;
6
- }
7
- export interface DropdownMenuProps {
8
- isOpen: boolean;
9
- onClose: () => void;
10
- menuItems: MenuItemConfig[];
11
- className?: string;
12
- position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
13
- }
14
- export declare const DropdownMenu: React.FC<DropdownMenuProps>;
15
- export default DropdownMenu;
16
- //# sourceMappingURL=DropdownMenu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;CACtE;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA6GpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,78 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useRef } from 'react';
3
- import { MenuItem } from '../MenuItem';
4
- import styles from './DropdownMenu.module.scss';
5
- export const DropdownMenu = ({ isOpen, onClose, menuItems, className, position = 'bottom-right' }) => {
6
- const menuRef = useRef(null);
7
- useEffect(() => {
8
- const handleClickOutside = (event) => {
9
- if (menuRef.current && !menuRef.current.contains(event.target)) {
10
- // Check if the click target is the menu button or within the menu button container
11
- const target = event.target;
12
- const menuButton = target.closest('[aria-label="Menu"]');
13
- const menuButtonContainer = target.closest('[class*="menuButtonContainer"]');
14
- if (menuButton || menuButtonContainer) {
15
- return;
16
- }
17
- onClose();
18
- }
19
- };
20
- const handleEscape = (event) => {
21
- if (event.key === 'Escape') {
22
- onClose();
23
- }
24
- };
25
- // Position adjustment to stay within container
26
- const adjustPosition = () => {
27
- if (menuRef.current) {
28
- const menu = menuRef.current;
29
- const chatContainer = menu.closest('[class*="chatWidget"]') || menu.closest('[class*="chatWindow"]');
30
- if (chatContainer) {
31
- const menuRect = menu.getBoundingClientRect();
32
- const containerRect = chatContainer.getBoundingClientRect();
33
- // Reset any previous adjustments
34
- menu.style.transform = '';
35
- menu.style.left = '';
36
- menu.style.right = '';
37
- // Check if menu overflows the right edge of container
38
- if (menuRect.right > containerRect.right) {
39
- const overflow = menuRect.right - containerRect.right;
40
- menu.style.transform = `translateX(-${overflow + 12}px)`;
41
- }
42
- // Check if menu overflows the left edge of container
43
- if (menuRect.left < containerRect.left) {
44
- const overflow = containerRect.left - menuRect.left;
45
- menu.style.transform = `translateX(${overflow + 12}px)`;
46
- }
47
- }
48
- }
49
- };
50
- if (isOpen) {
51
- document.addEventListener('mousedown', handleClickOutside);
52
- document.addEventListener('keydown', handleEscape);
53
- // Focus first menu item for keyboard navigation
54
- setTimeout(() => {
55
- if (menuRef.current) {
56
- const firstMenuItem = menuRef.current.querySelector('button:not(:disabled)');
57
- if (firstMenuItem) {
58
- firstMenuItem.focus();
59
- }
60
- adjustPosition();
61
- }
62
- }, 0);
63
- }
64
- return () => {
65
- document.removeEventListener('mousedown', handleClickOutside);
66
- document.removeEventListener('keydown', handleEscape);
67
- };
68
- }, [isOpen, onClose]);
69
- const handleMenuItemClick = (action) => {
70
- action();
71
- onClose();
72
- };
73
- if (!isOpen)
74
- return null;
75
- return (_jsx("div", { ref: menuRef, className: `${styles.dropdownMenu} ${styles[position]} ${className || ''}`, role: "menu", "aria-orientation": "vertical", children: _jsx("div", { className: styles.menuContent, children: menuItems.map((item, index) => (_jsx(MenuItem, { label: item.label, onClick: () => handleMenuItemClick(item.action), icon: item.icon }, index))) }) }));
76
- };
77
- export default DropdownMenu;
78
- //# sourceMappingURL=DropdownMenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAgBhD,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,MAAM,EACN,OAAO,EACP,SAAS,EACT,SAAS,EACT,QAAQ,GAAG,cAAc,EAC1B,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE7C,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,kBAAkB,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC/C,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK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AAE,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,cACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAS,IAAI,EAAE,EAAE,EAC1E,IAAI,EAAC,MAAM,sBACM,UAAU,YAE3B,cAAK,SAAS,EAAE,MAAM,CAAC,WAAW,YAC/B,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,KAAC,QAAQ,IAEP,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,EAC/C,IAAI,EAAE,IAAI,CAAC,IAAI,IAHV,KAAK,CAIV,CACH,CAAC,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,3 +0,0 @@
1
- export { DropdownMenu } from './DropdownMenu';
2
- export type { MenuItemConfig } from './DropdownMenu';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { DropdownMenu } from './DropdownMenu';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DropdownMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,21 +0,0 @@
1
- import React, { Component, ErrorInfo, ReactNode } from 'react';
2
- interface Props {
3
- children: ReactNode;
4
- fallback?: ReactNode;
5
- onError?: (error: Error, errorInfo: ErrorInfo) => void;
6
- primaryColor?: string;
7
- }
8
- interface State {
9
- hasError: boolean;
10
- error?: Error;
11
- }
12
- export declare class ErrorBoundary extends Component<Props, State> {
13
- constructor(props: Props);
14
- static getDerivedStateFromError(error: Error): State;
15
- componentDidUpdate(prevProps: Props): void;
16
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
17
- handleRetry: () => void;
18
- render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
19
- }
20
- export default ErrorBoundary;
21
- //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/D,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC5C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAIpD,kBAAkB,CAAC,SAAS,EAAE,KAAK;IAOnC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAKpD,WAAW,aAET;IAEF,MAAM;CAgDP;AAED,eAAe,aAAa,CAAC"}
@@ -1,40 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Component } from 'react';
3
- import styles from './ErrorBoundary.module.scss';
4
- export class ErrorBoundary extends Component {
5
- constructor(props) {
6
- super(props);
7
- this.handleRetry = () => {
8
- this.setState({ hasError: false, error: undefined });
9
- };
10
- this.state = { hasError: false };
11
- }
12
- static getDerivedStateFromError(error) {
13
- return { hasError: true, error };
14
- }
15
- componentDidUpdate(prevProps) {
16
- // Reset error state if children change (indicates a retry/refresh)
17
- if (prevProps.children !== this.props.children && this.state.hasError) {
18
- this.setState({ hasError: false, error: undefined });
19
- }
20
- }
21
- componentDidCatch(error, errorInfo) {
22
- console.error('Chat Widget Error:', error, errorInfo);
23
- this.props.onError?.(error, errorInfo);
24
- }
25
- render() {
26
- if (this.state.hasError) {
27
- if (this.props.fallback) {
28
- return this.props.fallback;
29
- }
30
- return (_jsx("div", { className: styles.errorBoundary, children: _jsxs("div", { className: styles.errorContainer, children: [_jsx("div", { className: styles.errorIcon, style: {
31
- backgroundColor: this.props.primaryColor || 'var(--chat-primary-color, #FA5B4C)'
32
- }, children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 42 42", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M21 3.5C17.5388 3.5 14.1554 4.52636 11.2775 6.44928C8.39967 8.37221 6.15665 11.1053 4.83212 14.303C3.50758 17.5007 3.16102 21.0194 3.83627 24.4141C4.51151 27.8087 6.17822 30.9269 8.62564 33.3744C11.0731 35.8218 14.1913 37.4885 17.5859 38.1637C20.9806 38.839 24.4993 38.4924 27.697 37.1679C30.8947 35.8433 33.6278 33.6003 35.5507 30.7225C37.4736 27.8446 38.5 24.4612 38.5 21C38.4949 16.3603 36.6495 11.912 33.3687 8.63126C30.088 5.35048 25.6397 3.5051 21 3.5ZM21 29.75C20.6539 29.75 20.3155 29.6474 20.0278 29.4551C19.74 29.2628 19.5157 28.9895 19.3832 28.6697C19.2508 28.3499 19.2161 27.9981 19.2836 27.6586C19.3512 27.3191 19.5178 27.0073 19.7626 26.7626C20.0073 26.5178 20.3191 26.3511 20.6586 26.2836C20.9981 26.2161 21.3499 26.2508 21.6697 26.3832C21.9895 26.5157 22.2628 26.74 22.4551 27.0277C22.6474 27.3155 22.75 27.6539 22.75 28C22.75 28.4641 22.5656 28.9092 22.2374 29.2374C21.9093 29.5656 21.4641 29.75 21 29.75ZM22.75 22.75C22.75 23.2141 22.5656 23.6592 22.2374 23.9874C21.9093 24.3156 21.4641 24.5 21 24.5C20.5359 24.5 20.0908 24.3156 19.7626 23.9874C19.4344 23.6592 19.25 23.2141 19.25 22.75V14C19.25 13.5359 19.4344 13.0907 19.7626 12.7626C20.0908 12.4344 20.5359 12.25 21 12.25C21.4641 12.25 21.9093 12.4344 22.2374 12.7626C22.5656 13.0907 22.75 13.5359 22.75 14V22.75Z", fill: "white" }) }) }), _jsx("h3", { className: styles.errorTitle, children: "Oops! An error occurred" }), _jsx("p", { className: styles.errorMessage, children: "We're having trouble loading this page. Please try again. If the issue persists, contact support." }), _jsxs("button", { className: styles.retryButton, onClick: this.handleRetry, style: {
33
- backgroundColor: this.props.primaryColor || 'var(--chat-primary-color, #FA5B4C)'
34
- }, children: [_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0C6.03034 0.00140425 4.13075 0.731081 2.66667 2.04867V0.666667C2.66667 0.489856 2.59643 0.320286 2.4714 0.195262C2.34638 0.0702379 2.17681 0 2 0C1.82319 0 1.65362 0.0702379 1.5286 0.195262C1.40357 0.320286 1.33333 0.489856 1.33333 0.666667V2.66667C1.33333 3.1971 1.54405 3.70581 1.91912 4.08088C2.29419 4.45595 2.8029 4.66667 3.33333 4.66667H5.33333C5.51015 4.66667 5.67971 4.59643 5.80474 4.47141C5.92976 4.34638 6 4.17681 6 4C6 3.82319 5.92976 3.65362 5.80474 3.5286C5.67971 3.40357 5.51015 3.33333 5.33333 3.33333H3.33333C3.31085 3.33 3.28859 3.32533 3.26667 3.31933C4.35301 2.22522 5.78542 1.54205 7.31938 1.38644C8.85333 1.23084 10.3938 1.61244 11.6777 2.46611C12.9616 3.31978 13.9095 4.5926 14.3595 6.0673C14.8094 7.54201 14.7337 9.12717 14.1451 10.5522C13.5564 11.9773 12.4915 13.1539 11.132 13.8812C9.77246 14.6085 8.20266 14.8414 6.69054 14.5401C5.17843 14.2389 3.81772 13.4222 2.8407 12.2295C1.86368 11.0367 1.33091 9.54183 1.33333 8C1.33333 7.82319 1.2631 7.65362 1.13807 7.5286C1.01305 7.40357 0.843478 7.33333 0.666667 7.33333C0.489856 7.33333 0.320286 7.40357 0.195262 7.5286C0.0702379 7.65362 0 7.82319 0 8C0 9.58225 0.469192 11.129 1.34824 12.4446C2.22729 13.7602 3.47672 14.7855 4.93853 15.391C6.40034 15.9965 8.00887 16.155 9.56072 15.8463C11.1126 15.5376 12.538 14.7757 13.6569 13.6569C14.7757 12.538 15.5376 11.1126 15.8463 9.56072C16.155 8.00887 15.9965 6.40034 15.391 4.93853C14.7855 3.47672 13.7602 2.22729 12.4446 1.34824C11.129 0.469192 9.58225 0 8 0V0Z", fill: "white" }) }), "Try Again"] })] }) }));
35
- }
36
- return this.props.children;
37
- }
38
- }
39
- export default ErrorBoundary;
40
- //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAwB,MAAM,OAAO,CAAC;AAC/D,OAAO,MAAM,MAAM,6BAA6B,CAAC;AAcjD,MAAM,OAAO,aAAc,SAAQ,SAAuB;IACxD,Y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AI,CAAC,KAAK,CAAC,YAAY,IAAI,oCAAoC;6BACjF,YAED,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YAC5F,eACE,CAAC,EAAC,swCAAswC,EACxwC,IAAI,EAAC,OAAO,GACZ,GACE,GACF,EACN,aAAI,SAAS,EAAE,MAAM,CAAC,UAAU,wCAA8B,EAC9D,YAAG,SAAS,EAAE,MAAM,CAAC,YAAY,kHAE7B,EACJ,kBACE,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE;gCACL,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,oCAAoC;6BACjF,aAED,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YAC5F,eACE,CAAC,EAAC,28CAA28C,EAC78C,IAAI,EAAC,OAAO,GACZ,GACE,iBAEC,IACL,GACF,CACP,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AAED,eAAe,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ErrorBoundary } from './ErrorBoundary';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBoundary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ErrorBoundary } from './ErrorBoundary';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ErrorBoundary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface ErrorDisplayProps {
3
- primaryColor?: string;
4
- message?: string;
5
- onRetry?: () => void;
6
- }
7
- export declare const ErrorDisplay: React.FC<ErrorDisplayProps>;
8
- export default ErrorDisplay;
9
- //# sourceMappingURL=ErrorDisplay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorDisplay/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2CpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import styles from './ErrorDisplay.module.scss';
3
- export const ErrorDisplay = ({ primaryColor, message = "We're having trouble loading this page. Please try again.", onRetry }) => {
4
- return (_jsx("div", { className: styles.errorDisplay, children: _jsxs("div", { className: styles.errorContainer, children: [_jsx("div", { className: styles.errorIcon, style: {
5
- backgroundColor: primaryColor || 'var(--chat-primary-color, #FA5B4C)'
6
- }, children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 42 42", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M21 3.5C17.5388 3.5 14.1554 4.52636 11.2775 6.44928C8.39967 8.37221 6.15665 11.1053 4.83212 14.303C3.50758 17.5007 3.16102 21.0194 3.83627 24.4141C4.51151 27.8087 6.17822 30.9269 8.62564 33.3744C11.0731 35.8218 14.1913 37.4885 17.5859 38.1637C20.9806 38.839 24.4993 38.4924 27.697 37.1679C30.8947 35.8433 33.6278 33.6003 35.5507 30.7225C37.4736 27.8446 38.5 24.4612 38.5 21C38.4949 16.3603 36.6495 11.912 33.3687 8.63126C30.088 5.35048 25.6397 3.5051 21 3.5ZM21 29.75C20.6539 29.75 20.3155 29.6474 20.0278 29.4551C19.74 29.2628 19.5157 28.9895 19.3832 28.6697C19.2508 28.3499 19.2161 27.9981 19.2836 27.6586C19.3512 27.3191 19.5178 27.0073 19.7626 26.7626C20.0073 26.5178 20.3191 26.3511 20.6586 26.2836C20.9981 26.2161 21.3499 26.2508 21.6697 26.3832C21.9895 26.5157 22.2628 26.74 22.4551 27.0277C22.6474 27.3155 22.75 27.6539 22.75 28C22.75 28.4641 22.5656 28.9092 22.2374 29.2374C21.9093 29.5656 21.4641 29.75 21 29.75ZM22.75 22.75C22.75 23.2141 22.5656 23.6592 22.2374 23.9874C21.9093 24.3156 21.4641 24.5 21 24.5C20.5359 24.5 20.0908 24.3156 19.7626 23.9874C19.4344 23.6592 19.25 23.2141 19.25 22.75V14C19.25 13.5359 19.4344 13.0907 19.7626 12.7626C20.0908 12.4344 20.5359 12.25 21 12.25C21.4641 12.25 21.9093 12.4344 22.2374 12.7626C22.5656 13.0907 22.75 13.5359 22.75 14V22.75Z", fill: "white" }) }) }), _jsx("h3", { className: styles.errorTitle, children: "Oops! An error occurred" }), _jsx("p", { className: styles.errorMessage, children: message }), onRetry && (_jsxs("button", { className: styles.retryButton, onClick: onRetry, style: {
7
- backgroundColor: primaryColor || 'var(--chat-primary-color, #FA5B4C)'
8
- }, children: [_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0C6.03034 0.00140425 4.13075 0.731081 2.66667 2.04867V0.666667C2.66667 0.489856 2.59643 0.320286 2.4714 0.195262C2.34638 0.0702379 2.17681 0 2 0C1.82319 0 1.65362 0.0702379 1.5286 0.195262C1.40357 0.320286 1.33333 0.489856 1.33333 0.666667V2.66667C1.33333 3.1971 1.54405 3.70581 1.91912 4.08088C2.29419 4.45595 2.8029 4.66667 3.33333 4.66667H5.33333C5.51015 4.66667 5.67971 4.59643 5.80474 4.47141C5.92976 4.34638 6 4.17681 6 4C6 3.82319 5.92976 3.65362 5.80474 3.5286C5.67971 3.40357 5.51015 3.33333 5.33333 3.33333H3.33333C3.31085 3.33 3.28859 3.32533 3.26667 3.31933C4.35301 2.22522 5.78542 1.54205 7.31938 1.38644C8.85333 1.23084 10.3938 1.61244 11.6777 2.46611C12.9616 3.31978 13.9095 4.5926 14.3595 6.0673C14.8094 7.54201 14.7337 9.12717 14.1451 10.5522C13.5564 11.9773 12.4915 13.1539 11.132 13.8812C9.77246 14.6085 8.20266 14.8414 6.69054 14.5401C5.17843 14.2389 3.81772 13.4222 2.8407 12.2295C1.86368 11.0367 1.33091 9.54183 1.33333 8C1.33333 7.82319 1.2631 7.65362 1.13807 7.5286C1.01305 7.40357 0.843478 7.33333 0.666667 7.33333C0.489856 7.33333 0.320286 7.40357 0.195262 7.5286C0.0702379 7.65362 0 7.82319 0 8C0 9.58225 0.469192 11.129 1.34824 12.4446C2.22729 13.7602 3.47672 14.7855 4.93853 15.391C6.40034 15.9965 8.00887 16.155 9.56072 15.8463C11.1126 15.5376 12.538 14.7757 13.6569 13.6569C14.7757 12.538 15.5376 11.1126 15.8463 9.56072C16.155 8.00887 15.9965 6.40034 15.391 4.93853C14.7855 3.47672 13.7602 2.22729 12.4446 1.34824C11.129 0.469192 9.58225 0 8 0V0Z", fill: "white" }) }), "Try Again"] }))] }) }));
9
- };
10
- export default ErrorDisplay;
11
- //# sourceMappingURL=ErrorDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../../src/components/ErrorDisplay/ErrorDisplay.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAQhD,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,YAAY,EACZ,OAAO,GAAG,2DAA2D,EACrE,OAAO,EACR,EAAE,EAAE;IACH,OAAO,CACL,cAAK,SAAS,EAAE,MAAM,CAAC,YAAY,YACjC,eAAK,SAAS,EAAE,MAAM,CAAC,cAAc,aACnC,cACE,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,KAAK,EAAE;wBACL,eAAe,EAAE,YAAY,IAAI,oCAAoC;qBACtE,YAED,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YAC5F,eACE,CAAC,EAAC,swCAAswC,EACxwC,IAAI,EAAC,OAAO,GACZ,GACE,GACF,EACN,aAAI,SAAS,EAAE,MAAM,CAAC,UAAU,wCAA8B,EAC9D,YAAG,SAAS,EAAE,MAAM,CAAC,YAAY,YAAG,OAAO,GAAK,EAC/C,OAAO,IAAI,CACV,kBACE,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;wBACL,eAAe,EAAE,YAAY,IAAI,oCAAoC;qBACtE,aAED,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YAC5F,eACE,CAAC,EAAC,28CAA28C,EAC78C,IAAI,EAAC,OAAO,GACZ,GACE,iBAEC,CACV,IACG,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,3 +0,0 @@
1
- export { ErrorDisplay } from './ErrorDisplay';
2
- export { default } from './ErrorDisplay';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorDisplay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,3 +0,0 @@
1
- export { ErrorDisplay } from './ErrorDisplay';
2
- export { default } from './ErrorDisplay';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ErrorDisplay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface LoadingIndicatorProps {
3
- text?: string;
4
- size?: 'small' | 'medium' | 'large';
5
- type?: 'dots' | 'spinner' | 'typing';
6
- className?: string;
7
- }
8
- export declare const LoadingIndicator: React.FC<LoadingIndicatorProps>;
9
- export default LoadingIndicator;
10
- //# sourceMappingURL=LoadingIndicator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingIndicator/LoadingIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmB5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import styles from './LoadingIndicator.module.scss';
3
- export const LoadingIndicator = ({ text = 'Typing...', size = 'medium', type = 'typing', className }) => {
4
- const renderIndicator = () => {
5
- return (_jsx("div", { className: styles.spinnerIndicator, children: _jsx("div", { className: styles.spinner }) }));
6
- };
7
- return (_jsx("div", { className: `${styles.loadingIndicator} ${styles[size]} ${className || ''}`, children: renderIndicator() }));
8
- };
9
- export default LoadingIndicator;
10
- //# sourceMappingURL=LoadingIndicator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingIndicator.js","sourceRoot":"","sources":["../../../src/components/LoadingIndicator/LoadingIndicator.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,gCAAgC,CAAC;AASpD,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,IAAI,GAAG,WAAW,EAClB,IAAI,GAAG,QAAQ,EACf,IAAI,GAAG,QAAQ,EACf,SAAS,EACV,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,GAAG,EAAE;QACvB,OAAO,CACL,cAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,YACrC,cAAK,SAAS,EAAE,MAAM,CAAC,OAAO,GAAQ,GAClC,CACP,CAAC;IACR,CAAC,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,SAAS,IAAI,EAAE,EAAE,YAC5E,eAAe,EAAE,GACd,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { LoadingIndicator } from './LoadingIndicator';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingIndicator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,3 +0,0 @@
1
- export { LoadingIndicator } from './LoadingIndicator';
2
- // export type { LoadingIndicatorProps } from './LoadingIndicator';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LoadingIndicator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,mEAAmE"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface MenuButtonProps {
3
- onClick: () => void;
4
- isOpen?: boolean;
5
- className?: string;
6
- disabled?: boolean;
7
- }
8
- export declare const MenuButton: React.FC<MenuButtonProps>;
9
- export default MenuButton;
10
- //# sourceMappingURL=MenuButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuBhD,CAAC;AAEF,eAAe,UAAU,CAAC"}