@weavy/uikit-react 11.0.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +6 -5
  2. package/changelog.md +19 -0
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/types/client/WeavyClient.d.ts +1 -1
  6. package/dist/cjs/types/contexts/MessengerContext.d.ts +1 -2
  7. package/dist/cjs/types/hooks/useUser.d.ts +2 -1
  8. package/dist/cjs/types/types/Messenger.d.ts +0 -1
  9. package/dist/cjs/types/types/types.d.ts +10 -6
  10. package/dist/cjs/types/utils/styles.d.ts +2 -2
  11. package/dist/esm/index.js +2 -2
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/types/client/WeavyClient.d.ts +1 -1
  14. package/dist/esm/types/contexts/MessengerContext.d.ts +1 -2
  15. package/dist/esm/types/hooks/useUser.d.ts +2 -1
  16. package/dist/esm/types/types/Messenger.d.ts +0 -1
  17. package/dist/esm/types/types/types.d.ts +10 -6
  18. package/dist/esm/types/utils/styles.d.ts +2 -2
  19. package/dist/index.d.ts +2 -3
  20. package/package.json +1 -1
  21. package/src/client/WeavyClient.ts +3 -3
  22. package/src/components/Chat.tsx +8 -11
  23. package/src/components/Conversation.tsx +2 -2
  24. package/src/components/ConversationListItem.tsx +2 -2
  25. package/src/components/FileBrowser.tsx +1 -1
  26. package/src/components/Messages.tsx +14 -13
  27. package/src/components/Messenger.tsx +4 -4
  28. package/src/components/Reactions.tsx +2 -1
  29. package/src/components/SearchUsers.tsx +2 -2
  30. package/src/components/Typing.tsx +4 -4
  31. package/src/contexts/MessengerContext.tsx +4 -12
  32. package/src/contexts/WeavyContext.tsx +8 -1
  33. package/src/hooks/useBadge.ts +1 -1
  34. package/src/hooks/useChat.ts +1 -1
  35. package/src/hooks/useConversation.ts +1 -1
  36. package/src/hooks/useConversations.ts +1 -1
  37. package/src/hooks/useFileUploader.ts +5 -1
  38. package/src/hooks/useMembers.ts +1 -1
  39. package/src/hooks/useMessages.ts +1 -1
  40. package/src/hooks/useMutateChat.ts +1 -1
  41. package/src/hooks/useMutateConversation.ts +1 -1
  42. package/src/hooks/useMutateConversationName.ts +1 -1
  43. package/src/hooks/useMutateDeleteReaction.ts +1 -1
  44. package/src/hooks/useMutateExternalBlobs.ts +1 -1
  45. package/src/hooks/useMutateMeeting.ts +1 -1
  46. package/src/hooks/useMutateMembers.ts +1 -1
  47. package/src/hooks/useMutateMessage.ts +2 -1
  48. package/src/hooks/useMutatePinned.ts +1 -1
  49. package/src/hooks/useMutateReaction.ts +1 -1
  50. package/src/hooks/useMutateRead.ts +1 -1
  51. package/src/hooks/useMutateRemoveMembers.ts +1 -1
  52. package/src/hooks/useMutateTyping.ts +1 -1
  53. package/src/hooks/usePresence.ts +4 -0
  54. package/src/hooks/useSearchUsers.ts +1 -1
  55. package/src/hooks/useUser.ts +4 -3
  56. package/src/index.ts +2 -2
  57. package/src/types/Messenger.ts +1 -1
  58. package/src/types/types.ts +12 -9
  59. package/src/utils/scrollbarDetection.js +50 -0
  60. package/src/utils/styles.ts +21 -6
package/README.md CHANGED
@@ -49,6 +49,8 @@ export default function App() {
49
49
 
50
50
  In your app.tsx or wherever you would like to add the Weavy Messenger:
51
51
 
52
+ > If you registered for a free account on <a href="https://get.weavy.io">get.weavy.io</a>, you can use the demo/test JWT token generated for you and use it in the `getToken` below and just return it as a string. But in a real application, this is typically fetched from a backend enpoint or similar that returns a valid JWT for your currently signed in user.
53
+
52
54
  ```js
53
55
  import React from 'react';
54
56
  import { WeavyClient, WeavyProvider, Messenger } from '@weavy/uikit-react';
@@ -81,17 +83,16 @@ export default App;
81
83
  ```
82
84
 
83
85
 
84
- ## Add the stylesheets
86
+ ## Add the stylesheet
85
87
 
86
88
  In your index.tsx (or index.js if you are not using TypeScript) file, add the following
87
89
 
88
90
 
89
91
  ```js
90
92
  // ---------------------------------------------------------
91
- // add the following two lines of code
93
+ // add the following line of code
92
94
  // ---------------------------------------------------------
93
- import "@weavy/themes/dist/weavy-reboot.css";
94
- import "@weavy/themes/dist/weavy-default-messenger.css";
95
+ import "@weavy/themes/dist/weavy-default.css";
95
96
  // ---------------------------------------------------------
96
97
 
97
98
  const container = document.getElementById('root');
@@ -107,4 +108,4 @@ Start your React app. You should see the Weavy Messenger component rendering a C
107
108
 
108
109
  ## Documentation
109
110
 
110
- To learn more about all the different components that you can use and how to setup the authentication flow, head over to our [Documentation site](https://https://www.weavy.com/docs/frontend)
111
+ To learn more about all the different components that you can use and how to setup the authentication flow, head over to our [Documentation site](https://weavy.com/docs/frontend/uikit-react)
package/changelog.md CHANGED
@@ -1,7 +1,26 @@
1
+ # Weavy 11.2.0 (2022-07-06)
2
+
3
+ * Moved uikit-react options from MessengerProvider to WeavyProvider.
4
+ * Fixed uikit-react cloud file picker overlay incorrect position.
5
+ * Overlay scrollbars for uikit-react.
6
+
7
+ # Weavy 11.1.0 (2022-06-21)
8
+
9
+ * Removed the need for reboot stylesheet in uikit-react.
10
+ * Updated documentation.
11
+ * Changed name of url parameter for WeavyClient() in uikit-react.
12
+ * Fixed some styling in uikit-react and Weavy.Dropin.
13
+ * Fixed a bug in uikit-react when switching between conversations and the wrong page of messages was displayed
14
+
15
+ # Weavy 11.0.1 (2022-06-13)
16
+
17
+ * Added database compatibility level check for SQL Azure.
18
+
1
19
  # Weavy 11.0.0 (2022-06-13)
2
20
 
3
21
  * Added Weavy REST API.
4
22
  * Added Weavy UI-kit for React.
23
+ * Moved CSS stylesheets to @weavy/themes package.
5
24
 
6
25
  # Weavy 10.1.1 (2022-05-30)
7
26