@weavy/uikit-react 23.3.0 → 24.0.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.
- package/changelog.md +31 -0
- package/dist/types/blocks/WyChat.d.ts +1 -8
- package/dist/types/blocks/WyComments.d.ts +3 -0
- package/dist/types/blocks/WyFiles.d.ts +1 -9
- package/dist/types/blocks/WyMessenger.d.ts +1 -9
- package/dist/types/blocks/WyNotificationToasts.d.ts +7 -0
- package/dist/types/blocks/WyNotifications.d.ts +7 -0
- package/dist/types/blocks/WyPosts.d.ts +1 -8
- package/dist/types/blocks/index.d.ts +3 -0
- package/dist/types/components/WyAttachment.d.ts +2 -4
- package/dist/types/components/WyBlobUpload.d.ts +3 -0
- package/dist/types/components/WyButton.d.ts +2 -1
- package/dist/types/components/WyCloudFiles.d.ts +1 -1
- package/dist/types/components/WyComment.d.ts +2 -2
- package/dist/types/components/WyConversation.d.ts +9 -3
- package/dist/types/components/WyConversationList.d.ts +1 -1
- package/dist/types/components/WyEmbed.d.ts +1 -1
- package/dist/types/components/WyFilesAppbar.d.ts +1 -1
- package/dist/types/components/WyFilesList.d.ts +2 -4
- package/dist/types/components/WyImageGrid.d.ts +2 -4
- package/dist/types/components/WyMessage.d.ts +3 -2
- package/dist/types/components/WyNotification.d.ts +6 -0
- package/dist/types/components/WyOverlay.d.ts +2 -2
- package/dist/types/components/WyPoll.d.ts +2 -2
- package/dist/types/components/WyPost.d.ts +1 -1
- package/dist/types/components/WyPreview.d.ts +1 -1
- package/dist/types/components/WyReactions.d.ts +1 -1
- package/dist/types/components/WySheet.d.ts +2 -2
- package/dist/types/components/WyToast.d.ts +13 -0
- package/dist/types/components/index.d.ts +2 -1
- package/dist/weavy.es5.esm.js +1 -1
- package/dist/weavy.es5.umd.cjs +1 -1
- package/dist/weavy.esm.js +29026 -28323
- package/dist/weavy.umd.cjs +1756 -1490
- package/lib/blocks/WyChat.tsx +1 -20
- package/lib/blocks/WyComments.tsx +12 -0
- package/lib/blocks/WyFiles.tsx +1 -19
- package/lib/blocks/WyMessenger.tsx +1 -25
- package/lib/blocks/WyNotificationToasts.tsx +18 -0
- package/lib/blocks/WyNotifications.tsx +18 -0
- package/lib/blocks/WyPosts.tsx +1 -20
- package/lib/blocks/index.ts +3 -0
- package/lib/components/WyAttachment.tsx +2 -6
- package/lib/components/WyBlobUpload.tsx +11 -0
- package/lib/components/WyButton.tsx +7 -1
- package/lib/components/WyComment.tsx +4 -4
- package/lib/components/WyConversation.tsx +20 -0
- package/lib/components/WyFilesList.tsx +2 -5
- package/lib/components/WyImageGrid.tsx +2 -6
- package/lib/components/WyMessage.tsx +8 -1
- package/lib/components/WyNotification.tsx +33 -0
- package/lib/components/WyOverlay.tsx +1 -1
- package/lib/components/WySheet.tsx +1 -1
- package/lib/components/WyToast.tsx +31 -0
- package/lib/components/index.ts +2 -1
- package/lib/hooks/useWeavy.ts +3 -0
- package/package.json +15 -19
- package/dist/types/components/WyPortal.d.ts +0 -3
- package/lib/components/WyPortal.tsx +0 -10
package/lib/blocks/WyChat.tsx
CHANGED
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { createComponent } from "@lit/react";
|
|
5
5
|
import { WyChat as WyChatWC } from "@weavy/uikit-web";
|
|
6
|
-
import {
|
|
7
|
-
RealtimeAppEventType,
|
|
8
|
-
RealtimeMessageEventType,
|
|
9
|
-
RealtimeReactionEventType,
|
|
10
|
-
} from "@weavy/uikit-web/dist/types/types/realtime.types";
|
|
11
6
|
|
|
12
7
|
// Creates a React component from a Lit component
|
|
13
8
|
export const WyChat = createComponent({
|
|
14
9
|
react: React,
|
|
15
10
|
tagName: "wy-chat",
|
|
16
11
|
elementClass: WyChatWC,
|
|
17
|
-
events: {
|
|
18
|
-
onWyMessageCreated: "wy:message_created" as EventName<
|
|
19
|
-
CustomEvent<RealtimeMessageEventType>
|
|
20
|
-
>,
|
|
21
|
-
onWyReactionAdded: "wy:reaction_added" as EventName<
|
|
22
|
-
CustomEvent<RealtimeReactionEventType>
|
|
23
|
-
>,
|
|
24
|
-
onWyReactionRemoved: "wy:reaction_removed" as EventName<
|
|
25
|
-
CustomEvent<RealtimeReactionEventType>
|
|
26
|
-
>,
|
|
27
|
-
onWyAppUpdated: "wy:app_updated" as EventName<
|
|
28
|
-
CustomEvent<RealtimeAppEventType>
|
|
29
|
-
>,
|
|
30
|
-
},
|
|
31
12
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { createComponent } from "@lit/react";
|
|
5
|
+
import { WyComments as WyCommentsWC } from "@weavy/uikit-web";
|
|
6
|
+
|
|
7
|
+
// Creates a React component from a Lit component
|
|
8
|
+
export const WyComments = createComponent({
|
|
9
|
+
react: React,
|
|
10
|
+
tagName: "wy-comments",
|
|
11
|
+
elementClass: WyCommentsWC,
|
|
12
|
+
});
|
package/lib/blocks/WyFiles.tsx
CHANGED
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { createComponent } from "@lit/react";
|
|
5
5
|
import { WyFiles as WyFilesWC } from "@weavy/uikit-web";
|
|
6
|
-
import { RealtimeFileEventType } from "@weavy/uikit-web/dist/types/types/realtime.types";
|
|
7
6
|
|
|
8
7
|
// Creates a React component from a Lit component
|
|
9
8
|
export const WyFiles = createComponent({
|
|
10
9
|
react: React,
|
|
11
10
|
tagName: "wy-files",
|
|
12
11
|
elementClass: WyFilesWC,
|
|
13
|
-
events: {
|
|
14
|
-
onWyFileCreated: "wy:file_created" as EventName<
|
|
15
|
-
CustomEvent<RealtimeFileEventType>
|
|
16
|
-
>,
|
|
17
|
-
onWyFileUpdated: "wy:file_updated" as EventName<
|
|
18
|
-
CustomEvent<RealtimeFileEventType>
|
|
19
|
-
>,
|
|
20
|
-
onWyFileTrashed: "wy:file_trashed" as EventName<
|
|
21
|
-
CustomEvent<RealtimeFileEventType>
|
|
22
|
-
>,
|
|
23
|
-
onWyFileRestored: "wy:file_restored" as EventName<
|
|
24
|
-
CustomEvent<RealtimeFileEventType>
|
|
25
|
-
>,
|
|
26
|
-
onWyFileDeleted: "wy:file_deleted" as EventName<
|
|
27
|
-
CustomEvent<RealtimeFileEventType>
|
|
28
|
-
>,
|
|
29
|
-
},
|
|
30
12
|
});
|
|
@@ -1,36 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { createComponent } from "@lit/react";
|
|
5
5
|
import { WyMessenger as WyMessengerWC } from "@weavy/uikit-web";
|
|
6
|
-
import {
|
|
7
|
-
RealtimeAppEventType,
|
|
8
|
-
RealtimeConversationDeliveredEventType,
|
|
9
|
-
RealtimeConversationMarkedEventType,
|
|
10
|
-
RealtimeMemberEventType,
|
|
11
|
-
RealtimeMessageEventType,
|
|
12
|
-
} from "@weavy/uikit-web/dist/types/types/realtime.types";
|
|
13
6
|
|
|
14
7
|
// Creates a React component from a Lit component
|
|
15
8
|
export const WyMessenger = createComponent({
|
|
16
9
|
react: React,
|
|
17
10
|
tagName: "wy-messenger",
|
|
18
11
|
elementClass: WyMessengerWC,
|
|
19
|
-
events: {
|
|
20
|
-
onWyMessageCreated: "wy:message_created" as EventName<
|
|
21
|
-
CustomEvent<RealtimeMessageEventType>
|
|
22
|
-
>,
|
|
23
|
-
onWyAppCreated: "wy:app_created" as EventName<
|
|
24
|
-
CustomEvent<RealtimeAppEventType>
|
|
25
|
-
>,
|
|
26
|
-
onWyConversationMarked: "wy:conversation_marked" as EventName<
|
|
27
|
-
CustomEvent<RealtimeConversationMarkedEventType>
|
|
28
|
-
>,
|
|
29
|
-
onWyConversationDelivered: "wy:conversation_delivered" as EventName<
|
|
30
|
-
CustomEvent<RealtimeConversationDeliveredEventType>
|
|
31
|
-
>,
|
|
32
|
-
onWyMemberAdded: "wy:member_added" as EventName<
|
|
33
|
-
CustomEvent<RealtimeMemberEventType>
|
|
34
|
-
>,
|
|
35
|
-
},
|
|
36
12
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { EventName, createComponent } from "@lit/react";
|
|
5
|
+
import { WyNotificationToasts as WyNotificationToastsWC } from "@weavy/uikit-web";
|
|
6
|
+
import { WyLinkEventType } from "@weavy/uikit-web/dist/types/types/notifications.types";
|
|
7
|
+
|
|
8
|
+
// Creates a React component from a Lit component
|
|
9
|
+
export const WyNotificationToasts = createComponent({
|
|
10
|
+
react: React,
|
|
11
|
+
tagName: "wy-notification-toasts",
|
|
12
|
+
elementClass: WyNotificationToastsWC,
|
|
13
|
+
events: {
|
|
14
|
+
onWyLink: "wy:link" as EventName<
|
|
15
|
+
WyLinkEventType
|
|
16
|
+
>,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { EventName, createComponent } from "@lit/react";
|
|
5
|
+
import { WyNotifications as WyNotificationsWC } from "@weavy/uikit-web";
|
|
6
|
+
import { WyLinkEventType } from "@weavy/uikit-web/dist/types/types/notifications.types";
|
|
7
|
+
|
|
8
|
+
// Creates a React component from a Lit component
|
|
9
|
+
export const WyNotifications = createComponent({
|
|
10
|
+
react: React,
|
|
11
|
+
tagName: "wy-notifications",
|
|
12
|
+
elementClass: WyNotificationsWC,
|
|
13
|
+
events: {
|
|
14
|
+
onWyLink: "wy:link" as EventName<
|
|
15
|
+
WyLinkEventType
|
|
16
|
+
>,
|
|
17
|
+
},
|
|
18
|
+
});
|
package/lib/blocks/WyPosts.tsx
CHANGED
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { createComponent } from "@lit/react";
|
|
5
5
|
import { WyPosts as WyPostsWC } from "@weavy/uikit-web";
|
|
6
|
-
import {
|
|
7
|
-
RealtimeCommentEventType,
|
|
8
|
-
RealtimePostEventType,
|
|
9
|
-
RealtimeReactionEventType,
|
|
10
|
-
} from "@weavy/uikit-web/dist/types/types/realtime.types";
|
|
11
6
|
|
|
12
7
|
// Creates a React component from a Lit component
|
|
13
8
|
export const WyPosts = createComponent({
|
|
14
9
|
react: React,
|
|
15
10
|
tagName: "wy-posts",
|
|
16
11
|
elementClass: WyPostsWC,
|
|
17
|
-
events: {
|
|
18
|
-
onWyPostCreated: "wy:post_created" as EventName<
|
|
19
|
-
CustomEvent<RealtimePostEventType>
|
|
20
|
-
>,
|
|
21
|
-
onWyCommentCreated: "wy:comment_created" as EventName<
|
|
22
|
-
CustomEvent<RealtimeCommentEventType>
|
|
23
|
-
>,
|
|
24
|
-
onWyReactionAdded: "wy:reaction_added" as EventName<
|
|
25
|
-
CustomEvent<RealtimeReactionEventType>
|
|
26
|
-
>,
|
|
27
|
-
onWyReactionRemoved: "wy:reaction_removed" as EventName<
|
|
28
|
-
CustomEvent<RealtimeReactionEventType>
|
|
29
|
-
>,
|
|
30
|
-
},
|
|
31
12
|
});
|
package/lib/blocks/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
WyAttachment as WyAttachmentWC,
|
|
5
5
|
WyAttachmentsList as WyAttachmentsListWC,
|
|
6
6
|
} from "@weavy/uikit-web";
|
|
7
|
-
import {
|
|
7
|
+
import { FileOpenEventType } from "@weavy/uikit-web/dist/types/types/files.types";
|
|
8
8
|
|
|
9
9
|
// Creates a React component from a Lit component
|
|
10
10
|
export const WyAttachment = createComponent({
|
|
@@ -18,10 +18,6 @@ export const WyAttachmentsList = createComponent({
|
|
|
18
18
|
tagName: "wy-attachments-list",
|
|
19
19
|
elementClass: WyAttachmentsListWC,
|
|
20
20
|
events: {
|
|
21
|
-
onFileOpen: "file-open" as EventName<
|
|
22
|
-
CustomEvent<{
|
|
23
|
-
file: FileType;
|
|
24
|
-
}>
|
|
25
|
-
>,
|
|
21
|
+
onFileOpen: "file-open" as EventName<FileOpenEventType>,
|
|
26
22
|
},
|
|
27
23
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { WyBlobUpload as WyBlobUploadWC } from "@weavy/uikit-web"
|
|
4
|
+
|
|
5
|
+
// Creates a React component from a Lit component
|
|
6
|
+
export const WyBlobUpload = createComponent({
|
|
7
|
+
react: React,
|
|
8
|
+
tagName: "wy-blob-upload",
|
|
9
|
+
elementClass: WyBlobUploadWC,
|
|
10
|
+
});
|
|
11
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { createComponent } from "@lit/react";
|
|
3
|
-
import { WyButton as WyButtonWC } from "@weavy/uikit-web"
|
|
3
|
+
import { WyButton as WyButtonWC, WyButtons as WyButtonsWC } from "@weavy/uikit-web"
|
|
4
4
|
|
|
5
5
|
// Creates a React component from a Lit component
|
|
6
6
|
export const WyButton = createComponent({
|
|
@@ -9,3 +9,9 @@ export const WyButton = createComponent({
|
|
|
9
9
|
elementClass: WyButtonWC,
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
+
export const WyButtons = createComponent({
|
|
13
|
+
react: React,
|
|
14
|
+
tagName: "wy-buttons",
|
|
15
|
+
elementClass: WyButtonsWC,
|
|
16
|
+
});
|
|
17
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { EventName, createComponent } from "@lit/react";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
WyCommentList as WyCommentListWC,
|
|
5
5
|
WyComment as WyCommentWC,
|
|
6
6
|
WyCommentView as WyCommentViewWC,
|
|
7
7
|
WyCommentEdit as WyCommentEditWC,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
import { PollOptionType } from "@weavy/uikit-web/dist/types/types/polls.types";
|
|
12
12
|
|
|
13
13
|
// Creates a React component from a Lit component
|
|
14
|
-
export const
|
|
14
|
+
export const WyCommentList = createComponent({
|
|
15
15
|
react: React,
|
|
16
|
-
tagName: "wy-
|
|
17
|
-
elementClass:
|
|
16
|
+
tagName: "wy-comment-list",
|
|
17
|
+
elementClass: WyCommentListWC,
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
export const WyComment = createComponent({
|
|
@@ -2,6 +2,8 @@ import React from "react";
|
|
|
2
2
|
import { EventName, createComponent } from "@lit/react";
|
|
3
3
|
import {
|
|
4
4
|
WyConversation as WyConversationWC,
|
|
5
|
+
WyConversationExtended as WyConversationExtendedWC,
|
|
6
|
+
WyConversationAppbar as WyConversationAppbarWC,
|
|
5
7
|
WyConversationNew as WyConversationNewWC,
|
|
6
8
|
} from "@weavy/uikit-web"
|
|
7
9
|
|
|
@@ -15,6 +17,24 @@ export const WyConversation = createComponent({
|
|
|
15
17
|
}
|
|
16
18
|
});
|
|
17
19
|
|
|
20
|
+
export const WyConversationExtended = createComponent({
|
|
21
|
+
react: React,
|
|
22
|
+
tagName: "wy-conversation-extended",
|
|
23
|
+
elementClass: WyConversationExtendedWC,
|
|
24
|
+
events: {
|
|
25
|
+
onReleaseFocus: "release-focus" as EventName<CustomEvent>
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const WyConversationAppbar = createComponent({
|
|
30
|
+
react: React,
|
|
31
|
+
tagName: "wy-conversation-appbar",
|
|
32
|
+
elementClass: WyConversationAppbarWC,
|
|
33
|
+
events: {
|
|
34
|
+
onReleaseFocus: "release-focus" as EventName<CustomEvent>
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
18
38
|
export const WyConversationNew = createComponent({
|
|
19
39
|
react: React,
|
|
20
40
|
tagName: "wy-conversation-new",
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { EventName, createComponent } from "@lit/react";
|
|
3
3
|
import { WyFilesList as WyFilesListWC } from "@weavy/uikit-web";
|
|
4
4
|
import {
|
|
5
|
+
FileOpenEventType,
|
|
5
6
|
FileOrderType,
|
|
6
7
|
FileType,
|
|
7
8
|
} from "@weavy/uikit-web/dist/types/types/files.types";
|
|
@@ -12,11 +13,7 @@ export const WyFilesList = createComponent({
|
|
|
12
13
|
tagName: "wy-files-list",
|
|
13
14
|
elementClass: WyFilesListWC,
|
|
14
15
|
events: {
|
|
15
|
-
onFileOpen: "file-open" as EventName<
|
|
16
|
-
CustomEvent<{
|
|
17
|
-
file: FileType;
|
|
18
|
-
}>
|
|
19
|
-
>,
|
|
16
|
+
onFileOpen: "file-open" as EventName<FileOpenEventType>,
|
|
20
17
|
onOrder: "order" as EventName<
|
|
21
18
|
CustomEvent<{
|
|
22
19
|
order: FileOrderType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { EventName, createComponent } from "@lit/react";
|
|
3
3
|
import { WyImageGrid as WyImageGridWC } from "@weavy/uikit-web";
|
|
4
|
-
import {
|
|
4
|
+
import { FileOpenEventType } from "@weavy/uikit-web/dist/types/types/files.types";
|
|
5
5
|
|
|
6
6
|
// Creates a React component from a Lit component
|
|
7
7
|
export const WyImageGrid = createComponent({
|
|
@@ -9,10 +9,6 @@ export const WyImageGrid = createComponent({
|
|
|
9
9
|
tagName: "wy-image-grid",
|
|
10
10
|
elementClass: WyImageGridWC,
|
|
11
11
|
events: {
|
|
12
|
-
onFileOpen: "file-open" as EventName<
|
|
13
|
-
CustomEvent<{
|
|
14
|
-
file: FileType;
|
|
15
|
-
}>
|
|
16
|
-
>,
|
|
12
|
+
onFileOpen: "file-open" as EventName<FileOpenEventType>,
|
|
17
13
|
},
|
|
18
14
|
});
|
|
@@ -3,7 +3,8 @@ import { EventName, createComponent } from "@lit/react";
|
|
|
3
3
|
import {
|
|
4
4
|
WyMessage as WyMessageWC,
|
|
5
5
|
WyMessages as WyMessagesWC,
|
|
6
|
-
WyMessageEditor as WyMessageEditorWC
|
|
6
|
+
WyMessageEditor as WyMessageEditorWC,
|
|
7
|
+
WyMessageTyping as WyMessageTypingWC
|
|
7
8
|
} from "@weavy/uikit-web";
|
|
8
9
|
import { PollOptionType } from "@weavy/uikit-web/dist/types/types/polls.types";
|
|
9
10
|
|
|
@@ -40,3 +41,9 @@ export const WyMessageEditor = createComponent({
|
|
|
40
41
|
>,
|
|
41
42
|
},
|
|
42
43
|
});
|
|
44
|
+
|
|
45
|
+
export const WyMessageTyping = createComponent({
|
|
46
|
+
react: React,
|
|
47
|
+
tagName: "wy-message-typing",
|
|
48
|
+
elementClass: WyMessageTypingWC,
|
|
49
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import {
|
|
4
|
+
WyNotificationBadge as WyNotificationBadgeWC,
|
|
5
|
+
WyNotificationButtonList as WyNotificationButtonListWC,
|
|
6
|
+
WyNotificationList as WyNotificationListWC,
|
|
7
|
+
WyNotificationListItem as WyNotificationListItemWC,
|
|
8
|
+
} from "@weavy/uikit-web";
|
|
9
|
+
|
|
10
|
+
// Creates a React component from a Lit component
|
|
11
|
+
export const WyNotificationBadge = createComponent({
|
|
12
|
+
react: React,
|
|
13
|
+
tagName: "wy-notification-badge",
|
|
14
|
+
elementClass: WyNotificationBadgeWC
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const WyNotificationButtonList = createComponent({
|
|
18
|
+
react: React,
|
|
19
|
+
tagName: "wy-notification-button-list",
|
|
20
|
+
elementClass: WyNotificationButtonListWC
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const WyNotificationList = createComponent({
|
|
24
|
+
react: React,
|
|
25
|
+
tagName: "wy-notification-list",
|
|
26
|
+
elementClass: WyNotificationListWC
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const WyNotificationListitem = createComponent({
|
|
30
|
+
react: React,
|
|
31
|
+
tagName: "wy-notification-list-item",
|
|
32
|
+
elementClass: WyNotificationListItemWC
|
|
33
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent, EventName } from "@lit/react";
|
|
3
|
+
import {
|
|
4
|
+
WyToasts as WyToastsWC,
|
|
5
|
+
WyToast as WyToastWC,
|
|
6
|
+
} from "@weavy/uikit-web";
|
|
7
|
+
|
|
8
|
+
// Creates a React component from a Lit component
|
|
9
|
+
export const WyToasts = createComponent({
|
|
10
|
+
react: React,
|
|
11
|
+
tagName: "wy-toasts",
|
|
12
|
+
elementClass: WyToastsWC,
|
|
13
|
+
events: {
|
|
14
|
+
onHide: "hide" as EventName<CustomEvent>,
|
|
15
|
+
onReleaseFocus: "release-focus" as EventName<CustomEvent>,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const WyToast = createComponent({
|
|
20
|
+
react: React,
|
|
21
|
+
tagName: "wy-toast",
|
|
22
|
+
elementClass: WyToastWC,
|
|
23
|
+
events: {
|
|
24
|
+
onHide: "closed" as EventName<
|
|
25
|
+
CustomEvent<{
|
|
26
|
+
silent: boolean;
|
|
27
|
+
}>
|
|
28
|
+
>,
|
|
29
|
+
onReleaseFocus: "release-focus" as EventName<CustomEvent>,
|
|
30
|
+
},
|
|
31
|
+
});
|
package/lib/components/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./WyAttachment";
|
|
2
2
|
export * from "./WyAvatar";
|
|
3
3
|
export * from "./WyBadge";
|
|
4
|
+
export * from "./WyBlobUpload";
|
|
4
5
|
export * from "./WyButton";
|
|
5
6
|
export * from "./WyCloudFiles";
|
|
6
7
|
export * from "./WyComment";
|
|
@@ -19,10 +20,10 @@ export * from "./WyIcon";
|
|
|
19
20
|
export * from "./WyImageGrid";
|
|
20
21
|
export * from "./WyMeetingCard";
|
|
21
22
|
export * from "./WyMessage";
|
|
23
|
+
export * from "./WyNotification";
|
|
22
24
|
export * from "./WyOverlay";
|
|
23
25
|
export * from "./WyPdfViewer";
|
|
24
26
|
export * from "./WyPoll";
|
|
25
|
-
export * from "./WyPortal";
|
|
26
27
|
export * from "./WyPost";
|
|
27
28
|
export * from "./WyPresence";
|
|
28
29
|
export * from "./WyPreview";
|
package/lib/hooks/useWeavy.ts
CHANGED
|
@@ -7,6 +7,9 @@ import { WeavyOptions } from "@weavy/uikit-web/dist/types/types/weavy.types";
|
|
|
7
7
|
export function useWeavy(options: WeavyOptions) {
|
|
8
8
|
const [weavy, setWeavy] = useState<WeavyContext>();
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Any option that is an instance/object needs to be memoized or converted.
|
|
12
|
+
*/
|
|
10
13
|
const cacheSafeOptions: WeavyOptions = {
|
|
11
14
|
...options,
|
|
12
15
|
cloudFilePickerUrl: options.cloudFilePickerUrl?.toString(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weavy/uikit-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"author": "Weavy",
|
|
5
5
|
"description": "React components UI-kit for Weavy",
|
|
6
6
|
"homepage": "https://github.com/weavy/weavy-uikit-react",
|
|
@@ -36,37 +36,33 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@lit/react": "^1.0.5",
|
|
39
|
-
"@weavy/uikit-web": "^
|
|
39
|
+
"@weavy/uikit-web": "^24.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"react": "
|
|
43
|
-
"react-dom": "
|
|
42
|
+
"react": ">=16",
|
|
43
|
+
"react-dom": ">=16"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@babel/preset-env": "^7.24.
|
|
47
|
-
"@babel/preset-react": "^7.24.
|
|
46
|
+
"@babel/preset-env": "^7.24.7",
|
|
47
|
+
"@babel/preset-react": "^7.24.7",
|
|
48
48
|
"@rollup/plugin-babel": "^6.0.4",
|
|
49
49
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
50
|
-
"@types/node": "^20.
|
|
50
|
+
"@types/node": "^20.14.10",
|
|
51
51
|
"@types/react": "^18.3.3",
|
|
52
52
|
"@types/react-dom": "^18.3.0",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
54
|
-
"@typescript-eslint/parser": "^7.
|
|
55
|
-
"@vitejs/plugin-react": "^4.3.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
54
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
55
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
56
56
|
"dotenv": "^16.3.2",
|
|
57
57
|
"eslint": "^8.55.0",
|
|
58
58
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
59
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
59
|
+
"eslint-plugin-react-refresh": "^0.4.8",
|
|
60
60
|
"npm-run-all": "^4.1.5",
|
|
61
|
-
"rimraf": "^
|
|
61
|
+
"rimraf": "^6.0.0",
|
|
62
62
|
"rollup-preserve-directives": "^1.1.1",
|
|
63
|
-
"sass": "^1.77.
|
|
64
|
-
"typescript": "^5.
|
|
65
|
-
"vite": "^5.
|
|
63
|
+
"sass": "^1.77.7",
|
|
64
|
+
"typescript": "^5.5.3",
|
|
65
|
+
"vite": "^5.3.3",
|
|
66
66
|
"vite-plugin-dts": "^3.9.1"
|
|
67
|
-
},
|
|
68
|
-
"engines": {
|
|
69
|
-
"node": ">=20.10.0",
|
|
70
|
-
"npm": ">=10.2.3"
|
|
71
67
|
}
|
|
72
68
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { createComponent } from "@lit/react";
|
|
3
|
-
import { WyPortal as WyPortalWC } from "@weavy/uikit-web";
|
|
4
|
-
|
|
5
|
-
// Creates a React component from a Lit component
|
|
6
|
-
export const WyPortal = createComponent({
|
|
7
|
-
react: React,
|
|
8
|
-
tagName: "wy-portal",
|
|
9
|
-
elementClass: WyPortalWC,
|
|
10
|
-
});
|