diff --git a/packages/uiweb/CHANGELOG.md b/packages/uiweb/CHANGELOG.md index 7cdac7208..032942928 100644 --- a/packages/uiweb/CHANGELOG.md +++ b/packages/uiweb/CHANGELOG.md @@ -2,6 +2,31 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [1.1.1](https://github.com/ethereum-push-notification-service/push-sdk/compare/uiweb-1.1.0...uiweb-1.1.1) (2023-07-17) + + +### Bug Fixes + +* fixed build issues ([#550](https://github.com/ethereum-push-notification-service/push-sdk/issues/550)) ([0ce6e18](https://github.com/ethereum-push-notification-service/push-sdk/commit/0ce6e18a82901478fe3157788c716e5224f14bdb)) +* Merge branch 'main' into deployment ([2e2c904](https://github.com/ethereum-push-notification-service/push-sdk/commit/2e2c904040260726d5c5087aed6e33d0d722a0f4)) + + + +# [1.1.0](https://github.com/ethereum-push-notification-service/push-sdk/compare/uiweb-1.0.2...uiweb-1.1.0) (2023-07-14) + + +### Bug Fixes + +* fixed issue with build uiweb ([#541](https://github.com/ethereum-push-notification-service/push-sdk/issues/541)) ([3e00f81](https://github.com/ethereum-push-notification-service/push-sdk/commit/3e00f81af99de5bee468c3320062aec243708798)) + + +### Features + +* add video sdk methods ([#395](https://github.com/ethereum-push-notification-service/push-sdk/issues/395)) ([4b9dd69](https://github.com/ethereum-push-notification-service/push-sdk/commit/4b9dd691ac1fde6a91be0478b20780f6755fbb4f)), closes [#295](https://github.com/ethereum-push-notification-service/push-sdk/issues/295) [#309](https://github.com/ethereum-push-notification-service/push-sdk/issues/309) [#357](https://github.com/ethereum-push-notification-service/push-sdk/issues/357) [#295](https://github.com/ethereum-push-notification-service/push-sdk/issues/295) +* chat widget component ([#386](https://github.com/ethereum-push-notification-service/push-sdk/issues/386)) ([93a8fd8](https://github.com/ethereum-push-notification-service/push-sdk/commit/93a8fd8b41831ab61931336044a8f66cb9453edd)), closes [#460](https://github.com/ethereum-push-notification-service/push-sdk/issues/460) + + + ## [1.0.2](https://github.com/ethereum-push-notification-service/push-sdk/compare/uiweb-1.0.1...uiweb-1.0.2) (2023-05-13) diff --git a/packages/uiweb/package.json b/packages/uiweb/package.json index 6d0ba1a94..61a817332 100644 --- a/packages/uiweb/package.json +++ b/packages/uiweb/package.json @@ -1,6 +1,6 @@ { "name": "@pushprotocol/uiweb", - "version": "1.0.2", + "version": "1.1.1", "publishConfig": { "registry": "https://registry.npmjs.org/" }, diff --git a/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/ChatsFeedList.tsx b/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/ChatsFeedList.tsx index a20bd8fe4..4b13966ce 100644 --- a/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/ChatsFeedList.tsx +++ b/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/ChatsFeedList.tsx @@ -46,8 +46,9 @@ export const ChatsFeedList = () => { useEffect(() => { if ( !isInViewport1 || - loading || - Object.keys(chatsFeed).length < chatLimit + loading + // || + // Object.keys(chatsFeed).length < chatLimit ) { return; } diff --git a/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/RequestsFeedList.tsx b/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/RequestsFeedList.tsx index a399adc44..4b8481ac1 100644 --- a/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/RequestsFeedList.tsx +++ b/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/chatSidebar/RequestsFeedList.tsx @@ -38,8 +38,9 @@ export const RequestsFeedList = () => { useEffect(() => { if ( !isInViewport1 || - loading || - Object.keys(requestsFeed).length < requestLimit + loading + // || + // Object.keys(requestsFeed).length < requestLimit ) { return; } diff --git a/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/notificationSidebar/InboxNotificationFeedList.tsx b/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/notificationSidebar/InboxNotificationFeedList.tsx index a41dd478f..6ea24cf60 100644 --- a/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/notificationSidebar/InboxNotificationFeedList.tsx +++ b/packages/uiweb/src/lib/components/chatAndNotification/modal/sidebar/notificationSidebar/InboxNotificationFeedList.tsx @@ -90,6 +90,7 @@ export const InboxNotificationFeedList = () => { }, [fetchNotification, env, page, account]); useEffect(() => { + if ( !isInViewport1 || loading diff --git a/packages/uiweb/src/lib/components/notification/index.tsx b/packages/uiweb/src/lib/components/notification/index.tsx index 8046d74a2..bcec3907b 100644 --- a/packages/uiweb/src/lib/components/notification/index.tsx +++ b/packages/uiweb/src/lib/components/notification/index.tsx @@ -19,8 +19,9 @@ import { LinkIcon } from "../../icons/Link"; import { useDivOffsetWidth } from "../../hooks"; import type { INotificationItemTheme} from './theme'; -import { getCustomTheme, lightTheme } from './theme'; -export {lightTheme as notificationLightTheme,darkTheme as notificationDarkTheme,baseTheme as notificationBaseTheme,INotificationItemTheme} from './theme'; +import { getCustomTheme } from './theme'; +export {lightTheme as notificationLightTheme,darkTheme as notificationDarkTheme,baseTheme as notificationBaseTheme, type INotificationItemTheme} from './theme'; + // ================= Define types export type chainNameType = | 'ETH_TEST_GOERLI' diff --git a/packages/uiweb/src/lib/hooks/chat/useFetchRequests.ts b/packages/uiweb/src/lib/hooks/chat/useFetchRequests.ts index f0e730c27..40fb3aec7 100644 --- a/packages/uiweb/src/lib/hooks/chat/useFetchRequests.ts +++ b/packages/uiweb/src/lib/hooks/chat/useFetchRequests.ts @@ -36,7 +36,6 @@ const useFetchRequests = () => { //conversation to map from array const modifiedRequestsObj: ChatFeedsType= {}; - for (const request of requests) { if(!request?.groupInformation) modifiedRequestsObj[request.did.toLowerCase() ?? request.chatId] = request; diff --git a/packages/uiweb/src/lib/hooks/chat/useIsInViewport.ts b/packages/uiweb/src/lib/hooks/chat/useIsInViewport.ts index fe68ffaa1..ea083b356 100644 --- a/packages/uiweb/src/lib/hooks/chat/useIsInViewport.ts +++ b/packages/uiweb/src/lib/hooks/chat/useIsInViewport.ts @@ -7,7 +7,6 @@ export function useIsInViewport(element: any, rootMargin: any) { useEffect(() => { const observer = new IntersectionObserver( ([entry]) => { - setState(entry.isIntersecting); }, { rootMargin } diff --git a/packages/uiweb/src/lib/hooks/chatAndNotification/useChatNotificationSocket.ts b/packages/uiweb/src/lib/hooks/chatAndNotification/useChatNotificationSocket.ts index 5fcb9910e..4f6ad64c7 100644 --- a/packages/uiweb/src/lib/hooks/chatAndNotification/useChatNotificationSocket.ts +++ b/packages/uiweb/src/lib/hooks/chatAndNotification/useChatNotificationSocket.ts @@ -97,8 +97,15 @@ const useChatNotificationSocket = ({ pushChatNotificationSocket?.on(EVENTS.USER_FEEDS, (feedItem: any) => { const parseApiResponse = convertReponseToParsedArray([feedItem]); if (subscriptionStatus.get(parseApiResponse[0].channel)) { - setInboxNotifFeed(`notif${parseApiResponse[0].sid}`, parseApiResponse[0]); - } else setSpamNotifFeed(`notif${parseApiResponse[0].sid}`, parseApiResponse[0]); + setInboxNotifFeed( + `notif${parseApiResponse[0].sid}`, + parseApiResponse[0] + ); + } else + setSpamNotifFeed( + `notif${parseApiResponse[0].sid}`, + parseApiResponse[0] + ); setNotificationFeedSinceLastConnection(feedItem); }); @@ -110,7 +117,7 @@ const useChatNotificationSocket = ({ return; } const chatId = getChatId({ msg: chat, account }).toLowerCase(); - + if (!isPCAIP(chatId)) return; if ( chat.messageCategory === 'Request' && chat.messageContent === null && @@ -122,7 +129,6 @@ const useChatNotificationSocket = ({ if (user || Object.keys(user || {}).length) { let newOne: IFeeds = {} as IFeeds; newOne = chatsFeed[chatId]; -console.log(user) newOne['publicKey'] = user!.publicKey; setChatFeed(chatId, newOne); @@ -167,12 +173,15 @@ console.log(user) const fetchedChat: IFeeds = (await fetchChat({ recipientAddress: chatId, })) as IFeeds; - console.log(chatId) - if (Object.keys(fetchedChat || {}).length &&checkIfIntent({ chat: fetchedChat, account })) + console.log(chatId); + if ( + Object.keys(fetchedChat || {}).length && + checkIfIntent({ chat: fetchedChat, account }) + ) setRequestFeed(chatId, fetchedChat); else setChatFeed(chatId, fetchedChat); - console.log("in here") - console.log(msg) + console.log('in here'); + console.log(msg); setChat(chatId, { messages: Array.isArray(chats.get(chatId)?.messages) ? [...chats.get(chatId)!.messages, msg] diff --git a/packages/uiweb/tsconfig.json b/packages/uiweb/tsconfig.json index 9cf0d8e41..8205b2d5d 100644 --- a/packages/uiweb/tsconfig.json +++ b/packages/uiweb/tsconfig.json @@ -10,6 +10,7 @@ "noImplicitOverride": true, // "importsNotUsedAsValues": "error", "noPropertyAccessFromIndexSignature": true, + // "isolatedModules": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true },