@messenger-box/platform-mobile 10.0.3-alpha.46 → 10.0.3-alpha.47
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 +4 -0
- package/lib/queries/inboxQueries.js +3 -4
- package/lib/queries/inboxQueries.js.map +1 -1
- package/lib/screens/inbox/DialogThreads.js +5 -2
- package/lib/screens/inbox/DialogThreads.js.map +1 -1
- package/lib/screens/inbox/config/config.js +2 -2
- package/lib/screens/inbox/config/config.js.map +1 -1
- package/lib/screens/inbox/containers/ConversationView.js +26 -8
- package/lib/screens/inbox/containers/ConversationView.js.map +1 -1
- package/lib/screens/inbox/containers/Dialogs.js +9 -18
- package/lib/screens/inbox/containers/Dialogs.js.map +1 -1
- package/package.json +4 -4
- package/src/queries/inboxQueries.ts +7 -6
- package/src/screens/inbox/DialogThreads.tsx +2 -1
- package/src/screens/inbox/config/config.ts +2 -2
- package/src/screens/inbox/containers/ConversationView.tsx +25 -7
- package/src/screens/inbox/containers/Dialogs.tsx +25 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.0.3-alpha.47](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.46...v10.0.3-alpha.47) (2025-05-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @messenger-box/platform-mobile
|
|
9
|
+
|
|
6
10
|
## [10.0.3-alpha.46](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.45...v10.0.3-alpha.46) (2025-05-19)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @messenger-box/platform-mobile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useViewChannelDetailQuery,useThreadMessagesQuery,OnThreadCreatedUpdatedDocument,useSendThreadMessageMutation,OnChatMessageAddedDocument,MessagesDocument,useOnThreadCreatedUpdatedSubscription,useCreatePostThreadMutation,useSendExpoNotificationOnPostMutation,useGetPostThreadLazyQuery,useAddDirectChannelMutation,useSendMessagesMutation,useMessagesQuery,useOnChatMessageAddedSubscription,
|
|
1
|
+
import {useViewChannelDetailQuery,useThreadMessagesQuery,OnThreadCreatedUpdatedDocument,useSendThreadMessageMutation,OnChatMessageAddedDocument,MessagesDocument,useOnThreadCreatedUpdatedSubscription,useCreatePostThreadMutation,useSendExpoNotificationOnPostMutation,useGetPostThreadLazyQuery,useAddDirectChannelMutation,useSendMessagesMutation,useMessagesQuery,useOnChatMessageAddedSubscription,useGetChannelsByUserQuery}from'common/graphql';export{useMessagesQuery,useThreadMessagesQuery}from'common/graphql';import'react';var __defProp = Object.defineProperty;
|
|
2
2
|
var __defProps = Object.defineProperties;
|
|
3
3
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -18,9 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
const useChannelsQuery = (options = {}) => {
|
|
21
|
-
return
|
|
22
|
-
fetchPolicy: "cache-and-network"
|
|
23
|
-
nextFetchPolicy: "network-only"
|
|
21
|
+
return useGetChannelsByUserQuery(__spreadProps(__spreadValues({}, options), {
|
|
22
|
+
fetchPolicy: "cache-and-network"
|
|
24
23
|
}));
|
|
25
24
|
};
|
|
26
25
|
const useChannelDetailQuery = (channelId, options = {}) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inboxQueries.js","sources":["../../src/queries/inboxQueries.ts"],"sourcesContent":["// Imports from common/graphql\nimport {\n useGetChannelsByUserWithServiceChannelsQuery,\n OnChatMessageAddedDocument,\n OnThreadCreatedUpdatedDocument,\n useViewChannelDetailQuery,\n useThreadMessagesQuery,\n useSupportServiceChannelsQuery,\n useSendThreadMessageMutation,\n useMessagesQuery,\n useSendMessagesMutation,\n useAddDirectChannelMutation,\n MessagesDocument,\n useSendExpoNotificationOnPostMutation,\n useOnThreadCreatedUpdatedSubscription,\n useOnChatMessageAddedSubscription,\n useOnThreadChatMessageAddedSubscription,\n useCreatePostThreadMutation,\n useGetPostThreadLazyQuery,\n} from 'common/graphql';\nimport { useCallback } from 'react';\n\n// ====== CHANNEL QUERIES ======\n\n/**\n * Hook for fetching channels by user including service channels\n * @param options - Query options\n * @returns Query result with data, loading state, refetch and fetchMore functions\n */\nexport const useChannelsQuery = (options: any = {}) => {\n return useGetChannelsByUserWithServiceChannelsQuery({\n ...options,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'network-only',\n });\n};\n\n/**\n * Hook for fetching service channels\n * @param options - Query options\n * @returns Query result with data, loading state and refetch function\n */\nexport const useServiceChannelsQuery = (options: any = {}) => {\n return useSupportServiceChannelsQuery({\n ...options,\n fetchPolicy: 'cache-and-network',\n });\n};\n\n/**\n * Hook for fetching channel details\n * @param channelId - ID of the channel to fetch\n * @param options - Additional query options\n * @returns Query result with channel details\n */\nexport const useChannelDetailQuery = (channelId: string, options: any = {}) => {\n return useViewChannelDetailQuery({\n variables: { channelId },\n ...options,\n });\n};\n\n// ====== THREAD QUERIES ======\n\n/**\n * Direct export of the thread messages query hook\n */\nexport { useThreadMessagesQuery };\n\n/**\n * Direct export of the messages query hook\n */\nexport { useMessagesQuery };\n\n/**\n * Hook for fetching thread messages with default options\n * @param variables - Query variables including channelId, role, and limit\n * @param options - Additional query options\n * @returns Query result with thread messages data\n */\nexport const useThreadMessagesQueryWithOptions = (variables: any, options: any = {}) => {\n return useThreadMessagesQuery({\n variables,\n fetchPolicy: 'cache-and-network',\n refetchWritePolicy: 'overwrite',\n nextFetchPolicy: 'network-only',\n ...options,\n });\n};\n\n// ====== MESSAGE QUERIES ======\n\n/**\n * Hook for fetching channel messages\n * @param variables - Query variables including channelId, parentId, and pagination params\n * @param options - Additional query options\n * @returns Query result for messages\n */\nexport const useChannelMessagesQuery = (variables: any = {}, options: any = {}) => {\n return useMessagesQuery({\n variables,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'cache-first',\n refetchWritePolicy: 'merge',\n ...options,\n });\n};\n\n/**\n * Hook for sending messages in a channel\n * @returns Mutation function and result\n */\nexport const useSendChannelMessage = () => {\n return useSendMessagesMutation();\n};\n\n/**\n * Hook for adding a direct channel\n * @returns Mutation function and result\n */\nexport const useAddDirectChannel = () => {\n return useAddDirectChannelMutation();\n};\n\n/**\n * Messages document for queries\n */\nexport const MESSAGES_DOCUMENT = MessagesDocument;\n\n// ====== MUTATIONS ======\n\n/**\n * Hook for sending thread messages\n * @returns Mutation function and result\n */\nexport const useSendThreadMessage = () => {\n return useSendThreadMessageMutation();\n};\n\n/**\n * Hook for sending expo notifications\n * @returns Mutation function and result\n */\nexport const useSendExpoNotification = () => {\n return useSendExpoNotificationOnPostMutation();\n};\n\n/**\n * Hook for creating a post thread\n * @param options - Mutation options\n * @returns Mutation function and result\n */\nexport const useCreatePostThread = (options: any = {}) => {\n return useCreatePostThreadMutation(options);\n};\n\n// ====== SUBSCRIPTION DOCUMENTS ======\n\n/**\n * Document for chat message added subscription\n */\nexport const CHAT_MESSAGE_ADDED = OnChatMessageAddedDocument;\n\n/**\n * Document for thread created/updated subscription\n */\nexport const THREAD_CREATED_UPDATED = OnThreadCreatedUpdatedDocument;\n\n/**\n * Hook for subscribing to thread creation and updates\n * @returns Subscription result for thread creation/update events\n */\nexport const useThreadCreatedUpdatedSubscription = (options: any = {}) => {\n return useOnThreadCreatedUpdatedSubscription({\n ...options,\n });\n};\n\n/**\n * Hook for subscribing to chat message additions\n * @param options - Subscription options including variables like channelId\n * @returns Subscription result for new chat messages\n */\nexport const useChatMessageAddedSubscription = (options: any = {}) => {\n return useOnChatMessageAddedSubscription({\n ...options,\n });\n};\n\n/**\n * Hook for subscribing to thread chat message additions\n * @param options - Subscription options including variables like channelId and threadId\n * @returns Subscription result for new thread chat messages\n */\nexport const useThreadChatMessageAddedSubscription = (options: any = {}) => {\n return useOnThreadChatMessageAddedSubscription({\n ...options,\n });\n};\n\n// ====== LAZY QUERIES ======\n\n/**\n * Hook for lazily fetching a post thread\n * @param options - Lazy query options\n * @returns Lazy query function and result\n */\nexport const useGetPostThreadLazy = (options: any = {}) => {\n return useGetPostThreadLazyQuery({\n fetchPolicy: 'cache-and-network',\n ...options,\n });\n};\n\n// ====== CUSTOM QUERY HOOKS ======\n\n/**\n * Custom hook that combines channels and provides refresh functionality\n */\nexport const useInboxChannels = () => {\n const queryResult = useChannelsQuery();\n\n const refresh = useCallback(() => {\n return queryResult.refetch();\n }, [queryResult.refetch]);\n\n const loadMore = useCallback(\n (page: number) => {\n if (queryResult.loading || !queryResult.data) return;\n\n return queryResult.fetchMore({\n variables: { page },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n\n return {\n ...fetchMoreResult,\n channelsByUser: [...(prev.channelsByUser || []), ...(fetchMoreResult.channelsByUser || [])],\n supportServiceChannels: [\n ...(prev.supportServiceChannels || []),\n ...(fetchMoreResult.supportServiceChannels || []),\n ],\n };\n },\n });\n },\n [queryResult.fetchMore, queryResult.loading, queryResult.data],\n );\n\n return {\n ...queryResult,\n refresh,\n loadMore,\n };\n};\n\n/**\n * Custom hook for thread message operations\n */\nexport const useThreadOperations = (channelId: string, options: any = {}) => {\n const queryResult = useThreadMessagesQueryWithOptions({ channelId, ...options.variables }, options.queryOptions);\n\n const [sendMessage, sendMessageResult] = useSendThreadMessage();\n\n const refresh = useCallback(() => {\n return queryResult.refetch();\n }, [queryResult.refetch]);\n\n const fetchMoreMessages = useCallback(\n (variables: any) => {\n return queryResult.fetchMore({\n variables,\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult?.threadMessages?.data) return prev;\n\n return {\n ...prev,\n threadMessages: {\n ...prev.threadMessages,\n data: [...fetchMoreResult.threadMessages.data, ...(prev.threadMessages?.data || [])],\n },\n };\n },\n });\n },\n [queryResult.fetchMore],\n );\n\n return {\n data: queryResult.data,\n loading: queryResult.loading,\n error: queryResult.error,\n refresh,\n fetchMoreMessages,\n sendMessage,\n sendMessageResult,\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAWO,MAAM,gBAAmB,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACrD,EAAO,OAAA,4CAAA,CAA6C,iCAC/C,OAD+C,CAAA,EAAA;AAAA,IAElD,WAAa,EAAA,mBAAA;AAAA,IACb,eAAiB,EAAA;AAAA,GAClB,CAAA,CAAA;AACH;AAoBO,MAAM,qBAAwB,GAAA,CAAC,SAAmB,EAAA,OAAA,GAAe,EAAO,KAAA;AAC7E,EAAA,OAAO,yBAA0B,CAAA,cAAA,CAAA;AAAA,IAC/B,SAAW,EAAA;AAAA,MACT;AAAA;AACF,GAAA,EACG,OACJ,CAAA,CAAA;AACH;AAoBO,MAAM,iCAAoC,GAAA,CAAC,SAAgB,EAAA,OAAA,GAAe,EAAO,KAAA;AACtF,EAAA,OAAO,sBAAuB,CAAA,cAAA,CAAA;AAAA,IAC5B,SAAA;AAAA,IACA,WAAa,EAAA,mBAAA;AAAA,IACb,kBAAoB,EAAA,WAAA;AAAA,IACpB,eAAiB,EAAA;AAAA,GAAA,EACd,OACJ,CAAA,CAAA;AACH;AAUO,MAAM,0BAA0B,CAAC,SAAA,GAAiB,EAAI,EAAA,OAAA,GAAe,EAAO,KAAA;AACjF,EAAA,OAAO,gBAAiB,CAAA,cAAA,CAAA;AAAA,IACtB,SAAA;AAAA,IACA,WAAa,EAAA,mBAAA;AAAA,IACb,eAAiB,EAAA,aAAA;AAAA,IACjB,kBAAoB,EAAA;AAAA,GAAA,EACjB,OACJ,CAAA,CAAA;AACH;AAMO,MAAM,wBAAwB,MAAM;AACzC,EAAA,OAAO,uBAAwB,EAAA;AACjC;AAMO,MAAM,sBAAsB,MAAM;AACvC,EAAA,OAAO,2BAA4B,EAAA;AACrC;AAKO,MAAM,iBAAoB,GAAA;AAQ1B,MAAM,uBAAuB,MAAM;AACxC,EAAA,OAAO,4BAA6B,EAAA;AACtC;AAMO,MAAM,0BAA0B,MAAM;AAC3C,EAAA,OAAO,qCAAsC,EAAA;AAC/C;AAOO,MAAM,mBAAsB,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACxD,EAAA,OAAO,4BAA4B,OAAO,CAAA;AAC5C;AAOO,MAAM,kBAAqB,GAAA;AAK3B,MAAM,sBAAyB,GAAA;AAM/B,MAAM,mCAAsC,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACxE,EAAO,OAAA,qCAAA,CAAsC,mBACxC,OACJ,CAAA,CAAA;AACH;AAOO,MAAM,+BAAkC,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACpE,EAAO,OAAA,iCAAA,CAAkC,mBACpC,OACJ,CAAA,CAAA;AACH;AAoBO,MAAM,oBAAuB,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACzD,EAAA,OAAO,yBAA0B,CAAA,cAAA,CAAA;AAAA,IAC/B,WAAa,EAAA;AAAA,GAAA,EACV,OACJ,CAAA,CAAA;AACH"}
|
|
1
|
+
{"version":3,"file":"inboxQueries.js","sources":["../../src/queries/inboxQueries.ts"],"sourcesContent":["// Imports from common/graphql\nimport {\n useGetChannelsByUserWithServiceChannelsQuery,\n useGetChannelsByUserQuery,\n OnChatMessageAddedDocument,\n OnThreadCreatedUpdatedDocument,\n useViewChannelDetailQuery,\n useThreadMessagesQuery,\n useSupportServiceChannelsQuery,\n useSendThreadMessageMutation,\n useMessagesQuery,\n useSendMessagesMutation,\n useAddDirectChannelMutation,\n MessagesDocument,\n useSendExpoNotificationOnPostMutation,\n useOnThreadCreatedUpdatedSubscription,\n useOnChatMessageAddedSubscription,\n useOnThreadChatMessageAddedSubscription,\n useCreatePostThreadMutation,\n useGetPostThreadLazyQuery,\n} from 'common/graphql';\nimport { useCallback } from 'react';\n\n// ====== CHANNEL QUERIES ======\n\n/**\n * Hook for fetching channels by user including service channels\n * @param options - Query options\n * @returns Query result with data, loading state, refetch and fetchMore functions\n */\nexport const useChannelsQuery = (options: any = {}) => {\n return useGetChannelsByUserQuery({\n ...options,\n fetchPolicy: 'cache-and-network',\n //nextFetchPolicy: 'network-only',\n });\n};\n\n/**\n * Hook for fetching service channels\n * @param options - Query options\n * @returns Query result with data, loading state and refetch function\n */\nexport const useServiceChannelsQuery = (options: any = {}) => {\n return useSupportServiceChannelsQuery({\n ...options,\n fetchPolicy: 'cache-and-network',\n });\n};\n\n/**\n * Hook for fetching channel details\n * @param channelId - ID of the channel to fetch\n * @param options - Additional query options\n * @returns Query result with channel details\n */\nexport const useChannelDetailQuery = (channelId: string, options: any = {}) => {\n return useViewChannelDetailQuery({\n variables: { channelId },\n ...options,\n });\n};\n\n// ====== THREAD QUERIES ======\n\n/**\n * Direct export of the thread messages query hook\n */\nexport { useThreadMessagesQuery };\n\n/**\n * Direct export of the messages query hook\n */\nexport { useMessagesQuery };\n\n/**\n * Hook for fetching thread messages with default options\n * @param variables - Query variables including channelId, role, and limit\n * @param options - Additional query options\n * @returns Query result with thread messages data\n */\nexport const useThreadMessagesQueryWithOptions = (variables: any, options: any = {}) => {\n return useThreadMessagesQuery({\n variables,\n fetchPolicy: 'cache-and-network',\n refetchWritePolicy: 'overwrite',\n nextFetchPolicy: 'network-only',\n ...options,\n });\n};\n\n// ====== MESSAGE QUERIES ======\n\n/**\n * Hook for fetching channel messages\n * @param variables - Query variables including channelId, parentId, and pagination params\n * @param options - Additional query options\n * @returns Query result for messages\n */\nexport const useChannelMessagesQuery = (variables: any = {}, options: any = {}) => {\n return useMessagesQuery({\n variables,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'cache-first',\n refetchWritePolicy: 'merge',\n ...options,\n });\n};\n\n/**\n * Hook for sending messages in a channel\n * @returns Mutation function and result\n */\nexport const useSendChannelMessage = () => {\n return useSendMessagesMutation();\n};\n\n/**\n * Hook for adding a direct channel\n * @returns Mutation function and result\n */\nexport const useAddDirectChannel = () => {\n return useAddDirectChannelMutation();\n};\n\n/**\n * Messages document for queries\n */\nexport const MESSAGES_DOCUMENT = MessagesDocument;\n\n// ====== MUTATIONS ======\n\n/**\n * Hook for sending thread messages\n * @returns Mutation function and result\n */\nexport const useSendThreadMessage = () => {\n return useSendThreadMessageMutation();\n};\n\n/**\n * Hook for sending expo notifications\n * @returns Mutation function and result\n */\nexport const useSendExpoNotification = () => {\n return useSendExpoNotificationOnPostMutation();\n};\n\n/**\n * Hook for creating a post thread\n * @param options - Mutation options\n * @returns Mutation function and result\n */\nexport const useCreatePostThread = (options: any = {}) => {\n return useCreatePostThreadMutation(options);\n};\n\n// ====== SUBSCRIPTION DOCUMENTS ======\n\n/**\n * Document for chat message added subscription\n */\nexport const CHAT_MESSAGE_ADDED = OnChatMessageAddedDocument;\n\n/**\n * Document for thread created/updated subscription\n */\nexport const THREAD_CREATED_UPDATED = OnThreadCreatedUpdatedDocument;\n\n/**\n * Hook for subscribing to thread creation and updates\n * @returns Subscription result for thread creation/update events\n */\nexport const useThreadCreatedUpdatedSubscription = (options: any = {}) => {\n return useOnThreadCreatedUpdatedSubscription({\n ...options,\n });\n};\n\n/**\n * Hook for subscribing to chat message additions\n * @param options - Subscription options including variables like channelId\n * @returns Subscription result for new chat messages\n */\nexport const useChatMessageAddedSubscription = (options: any = {}) => {\n return useOnChatMessageAddedSubscription({\n ...options,\n });\n};\n\n/**\n * Hook for subscribing to thread chat message additions\n * @param options - Subscription options including variables like channelId and threadId\n * @returns Subscription result for new thread chat messages\n */\nexport const useThreadChatMessageAddedSubscription = (options: any = {}) => {\n return useOnThreadChatMessageAddedSubscription({\n ...options,\n });\n};\n\n// ====== LAZY QUERIES ======\n\n/**\n * Hook for lazily fetching a post thread\n * @param options - Lazy query options\n * @returns Lazy query function and result\n */\nexport const useGetPostThreadLazy = (options: any = {}) => {\n return useGetPostThreadLazyQuery({\n fetchPolicy: 'cache-and-network',\n ...options,\n });\n};\n\n// ====== CUSTOM QUERY HOOKS ======\n\n/**\n * Custom hook that combines channels and provides refresh functionality\n */\nexport const useInboxChannels = () => {\n const queryResult = useChannelsQuery();\n\n const refresh = useCallback(() => {\n return queryResult.refetch();\n }, [queryResult.refetch]);\n\n const loadMore = useCallback(\n (page: number) => {\n if (queryResult.loading || !queryResult.data) return;\n\n return queryResult.fetchMore({\n variables: { page },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n\n return {\n ...fetchMoreResult,\n channelsByUser: [...(prev.channelsByUser || []), ...(fetchMoreResult.channelsByUser || [])],\n // supportServiceChannels: [\n // ...(prev.supportServiceChannels || []),\n // ...(fetchMoreResult.supportServiceChannels || []),\n // ],\n };\n },\n });\n },\n [queryResult.fetchMore, queryResult.loading, queryResult.data],\n );\n\n return {\n ...queryResult,\n refresh,\n loadMore,\n };\n};\n\n/**\n * Custom hook for thread message operations\n */\nexport const useThreadOperations = (channelId: string, options: any = {}) => {\n const queryResult = useThreadMessagesQueryWithOptions({ channelId, ...options.variables }, options.queryOptions);\n\n const [sendMessage, sendMessageResult] = useSendThreadMessage();\n\n const refresh = useCallback(() => {\n return queryResult.refetch();\n }, [queryResult.refetch]);\n\n const fetchMoreMessages = useCallback(\n (variables: any) => {\n return queryResult.fetchMore({\n variables,\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult?.threadMessages?.data) return prev;\n\n return {\n ...prev,\n threadMessages: {\n ...prev.threadMessages,\n data: [...fetchMoreResult.threadMessages.data, ...(prev.threadMessages?.data || [])],\n },\n };\n },\n });\n },\n [queryResult.fetchMore],\n );\n\n return {\n data: queryResult.data,\n loading: queryResult.loading,\n error: queryResult.error,\n refresh,\n fetchMoreMessages,\n sendMessage,\n sendMessageResult,\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAWO,MAAM,gBAAmB,GAAA,CAAC,OAAe,GAAA,EAAO,K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C5C;AAOO,MAAM,kBAAqB,GAAA;AAK3B,MAAM,sBAAyB,GAAA;AAM/B,MAAM,mCAAsC,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACxE,EAAO,OAAA,qCAAA,CAAsC,mBACxC,OACJ,CAAA,CAAA;AACH;AAOO,MAAM,+BAAkC,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACpE,EAAO,OAAA,iCAAA,CAAkC,mBACpC,OACJ,CAAA,CAAA;AACH;AAoBO,MAAM,oBAAuB,GAAA,CAAC,OAAe,GAAA,EAAO,KAAA;AACzD,EAAA,OAAO,yBAA0B,CAAA,cAAA,CAAA;AAAA,IAC/B,WAAa,EAAA;AAAA,GAAA,EACV,OACJ,CAAA,CAAA;AACH"}
|
|
@@ -6,6 +6,7 @@ function DialogThreads({
|
|
|
6
6
|
postParentId,
|
|
7
7
|
role
|
|
8
8
|
}) {
|
|
9
|
+
var _a;
|
|
9
10
|
const [state, send] = useSafeDialogThreadsMachine();
|
|
10
11
|
const {
|
|
11
12
|
context,
|
|
@@ -35,6 +36,8 @@ function DialogThreads({
|
|
|
35
36
|
repliesLimit2: 5
|
|
36
37
|
}
|
|
37
38
|
});
|
|
39
|
+
console.log("threadsData", (_a = threadsData == null ? void 0 : threadsData.threadMessages) == null ? void 0 : _a.totalCount);
|
|
40
|
+
console.log("channelid", channelId);
|
|
38
41
|
React.useEffect(() => {
|
|
39
42
|
send({
|
|
40
43
|
type: Actions.INITIALIZE,
|
|
@@ -56,12 +59,12 @@ function DialogThreads({
|
|
|
56
59
|
}
|
|
57
60
|
}, [channelData]);
|
|
58
61
|
React.useEffect(() => {
|
|
59
|
-
var
|
|
62
|
+
var _a2;
|
|
60
63
|
if (threadsData) {
|
|
61
64
|
send({
|
|
62
65
|
type: Actions.SET_THREADS,
|
|
63
66
|
data: {
|
|
64
|
-
threadData: ((
|
|
67
|
+
threadData: ((_a2 = threadsData == null ? void 0 : threadsData.threadMessages) == null ? void 0 : _a2.data) || []
|
|
65
68
|
}
|
|
66
69
|
});
|
|
67
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogThreads.js","sources":["../../../src/screens/inbox/DialogThreads.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Box, Spinner, Text } from '@admin-layout/gluestack-ui-mobile';\nimport { ThreadConversationView } from './containers/ThreadConversationView';\nimport { ThreadsView } from './containers/ThreadsView';\nimport { useChannelDetailQuery, useThreadMessagesQueryWithOptions } from '../../queries/inboxQueries';\nimport { useFocusEffect } from '@react-navigation/native';\nimport { useSelector } from 'react-redux';\nimport { config } from './config';\nimport colors from 'tailwindcss/colors';\nimport { useSafeDialogThreadsMachine } from './hooks/useSafeDialogThreadsMachine';\nimport { Actions, BaseState } from './workflow/dialog-threads-xstate';\nconst { MESSAGES_PER_PAGE } = config;\n\nexport function DialogThreads({ channelId, postParentId, role }) {\n // Use the XState machine for state management\n const [state, send] = useSafeDialogThreadsMachine();\n const { context, value } = state;\n const { channelsDetail, loading, error } = context;\n\n // Fetch channel details\n const {\n data: channelData,\n loading: channelLoading,\n refetch: channelRefetch,\n } = useChannelDetailQuery(channelId?.toString(), {});\n\n // Fetch thread messages\n const {\n data: threadsData,\n loading: threadLoading,\n error: threadsError,\n refetch: threadsRefetch,\n subscribeToMore: threadsSubscribeToMore,\n } = useThreadMessagesQueryWithOptions({\n variables: {\n channelId: channelId?.toString(),\n role: role?.toString(),\n limit: MESSAGES_PER_PAGE,\n repliesLimit2: 5,\n },\n });\n
|
|
1
|
+
{"version":3,"file":"DialogThreads.js","sources":["../../../src/screens/inbox/DialogThreads.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Box, Spinner, Text } from '@admin-layout/gluestack-ui-mobile';\nimport { ThreadConversationView } from './containers/ThreadConversationView';\nimport { ThreadsView } from './containers/ThreadsView';\nimport { useChannelDetailQuery, useThreadMessagesQueryWithOptions } from '../../queries/inboxQueries';\nimport { useFocusEffect } from '@react-navigation/native';\nimport { useSelector } from 'react-redux';\nimport { config } from './config';\nimport colors from 'tailwindcss/colors';\nimport { useSafeDialogThreadsMachine } from './hooks/useSafeDialogThreadsMachine';\nimport { Actions, BaseState } from './workflow/dialog-threads-xstate';\nconst { MESSAGES_PER_PAGE } = config;\n\nexport function DialogThreads({ channelId, postParentId, role }) {\n // Use the XState machine for state management\n const [state, send] = useSafeDialogThreadsMachine();\n const { context, value } = state;\n const { channelsDetail, loading, error } = context;\n\n // Fetch channel details\n const {\n data: channelData,\n loading: channelLoading,\n refetch: channelRefetch,\n } = useChannelDetailQuery(channelId?.toString(), {});\n\n // Fetch thread messages\n const {\n data: threadsData,\n loading: threadLoading,\n error: threadsError,\n refetch: threadsRefetch,\n subscribeToMore: threadsSubscribeToMore,\n } = useThreadMessagesQueryWithOptions({\n variables: {\n channelId: channelId?.toString(),\n role: role?.toString(),\n limit: MESSAGES_PER_PAGE,\n repliesLimit2: 5,\n },\n });\n console.log('threadsData', threadsData?.threadMessages?.totalCount);\n console.log('channelid', channelId);\n // Initialize the machine with props\n React.useEffect(() => {\n send({\n type: Actions.INITIALIZE,\n data: { channelId, postParentId, role },\n });\n }, [channelId, postParentId, role]);\n\n // Update channel detail in state when data changes\n React.useEffect(() => {\n if (channelData?.viewChannelDetail) {\n send({\n type: Actions.SET_CHANNEL_DETAIL,\n data: { channelsDetail: channelData.viewChannelDetail },\n });\n }\n }, [channelData]);\n\n // Update thread data in state when data changes\n React.useEffect(() => {\n if (threadsData) {\n send({\n type: Actions.SET_THREADS,\n data: { threadData: threadsData?.threadMessages?.data || [] },\n });\n }\n }, [threadsData]);\n\n // Handle errors\n React.useEffect(() => {\n if (threadsError) {\n send({\n type: Actions.ERROR,\n data: { error: threadsError },\n });\n }\n }, [threadsError]);\n\n const refetchChannelDetail = React.useCallback(\n (id: string) => {\n return channelRefetch({ id: id?.toString() });\n },\n [channelId],\n );\n\n useFocusEffect(\n React.useCallback(() => {\n // Do something when the screen is focused\n if (channelId) refetchChannelDetail(channelId);\n return () => {};\n }, []),\n );\n\n return (\n <>\n {state.matches(BaseState.LoadingChannel) || channelLoading ? (\n <Spinner color={colors.blue[500]} />\n ) : (\n <>\n <Box className=\"flex-1 bg-gray-200 dark:border-gray-500 dark:bg-gray-500\">\n <ThreadsView\n data={threadsData}\n loading={threadLoading || state.matches(BaseState.LoadingThreads)}\n refetch={threadsRefetch}\n subscribeToMore={threadsSubscribeToMore}\n error={error || threadsError}\n channelId={channelId}\n role={role}\n channelsDetail={channelsDetail}\n refetchChannelDetail={refetchChannelDetail}\n />\n </Box>\n </>\n )}\n </>\n );\n}\n\nexport default DialogThreads;\n"],"names":["_a"],"mappings":"4gBAWA,MAAM;AAAA,EACJ;AACF,CAAI,GAAA,MAAA;AACG,SAAS,aAAc,CAAA;AAAA,EAC5B,SAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAG,EAAA;AAlBH,EAAA,IAAA,EAAA;AAoBE,EAAA,MAAM,CAAC,KAAA,EAAO,IAAI,CAAA,GAAI,2BAA4B,EAAA;AAClD,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA;AAAA,GACE,GAAA,KAAA;AACJ,EAAM,MAAA;AAAA,IACJ,cAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACE,GAAA,OAAA;AAGJ,EAAM,MAAA;AAAA,IACJ,IAAM,EAAA,WAAA;AAAA,IACN,OAAS,EAAA,cAAA;AAAA,IACT,OAAS,EAAA;AAAA,GACP,GAAA,qBAAA,CAAsB,SAAW,IAAA,IAAA,GAAA,MAAA,GAAA,SAAA,CAAA,QAAA,EAAA,EAAY,EAAE,CAAA;AAGnD,EAAM,MAAA;AAAA,IACJ,IAAM,EAAA,WAAA;AAAA,IACN,OAAS,EAAA,aAAA;AAAA,IACT,KAAO,EAAA,YAAA;AAAA,IACP,OAAS,EAAA,cAAA;AAAA,IACT,eAAiB,EAAA;AAAA,MACf,iCAAkC,CAAA;AAAA,IACpC,SAAW,EAAA;AAAA,MACT,WAAW,SAAW,IAAA,I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C,oBAA4C,EAAA,CACrT,CACJ,CACR,CAAA;AACR"}
|
|
@@ -22,9 +22,9 @@ import {cleanEnv,str,num}from'envalid';const config = cleanEnv(process["APP_ENV"
|
|
|
22
22
|
default: "#0084ff"
|
|
23
23
|
}),
|
|
24
24
|
CALL_TO_ACTION_BUTTON_BORDERCOLOR: str({
|
|
25
|
-
default: "#
|
|
25
|
+
default: "#000"
|
|
26
26
|
}),
|
|
27
27
|
CALL_TO_ACTION_TEXT_COLOR: str({
|
|
28
|
-
default: "#
|
|
28
|
+
default: "#000"
|
|
29
29
|
})
|
|
30
30
|
});export{config};//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../../src/screens/inbox/config/config.ts"],"sourcesContent":["import { cleanEnv, num, str } from 'envalid';\n\nexport const config = cleanEnv(process['APP_ENV'] || process.env, {\n MESSAGES_PER_PAGE: num({ devDefault: 20, default: 20 }),\n FILES_PER_MESSAGE: num({ default: 10 }),\n INBOX_MESSEGE_PATH: str({ default: 'MainStack.Message' }),\n // THREAD_MESSEGE_PATH: str({ default: 'MainStack.Thread' }),\n // THREADS_PATH: str({ default: 'MainStack.ThreadMessage' }),\n THREAD_MESSEGE_PATH: str({ default: 'MainStack.ThreadMessage' }),\n THREADS_PATH: str({ default: 'MainStack.Thread' }),\n CALL_TO_ACTION_PATH: str({ default: 'MainStack.GuestReservationRequestDetail' }),\n CALL_TO_ACTION_BOX_BGCOLOR: str({ default: '#0084ff' }),\n CALL_TO_ACTION_BUTTON_BORDERCOLOR: str({ default: '#
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../../src/screens/inbox/config/config.ts"],"sourcesContent":["import { cleanEnv, num, str } from 'envalid';\n\nexport const config = cleanEnv(process['APP_ENV'] || process.env, {\n MESSAGES_PER_PAGE: num({ devDefault: 20, default: 20 }),\n FILES_PER_MESSAGE: num({ default: 10 }),\n INBOX_MESSEGE_PATH: str({ default: 'MainStack.Message' }),\n // THREAD_MESSEGE_PATH: str({ default: 'MainStack.Thread' }),\n // THREADS_PATH: str({ default: 'MainStack.ThreadMessage' }),\n THREAD_MESSEGE_PATH: str({ default: 'MainStack.ThreadMessage' }),\n THREADS_PATH: str({ default: 'MainStack.Thread' }),\n CALL_TO_ACTION_PATH: str({ default: 'MainStack.GuestReservationRequestDetail' }),\n CALL_TO_ACTION_BOX_BGCOLOR: str({ default: '#0084ff' }),\n CALL_TO_ACTION_BUTTON_BORDERCOLOR: str({ default: '#000' }),\n CALL_TO_ACTION_TEXT_COLOR: str({ default: '#000' }),\n});\n"],"names":[],"mappings":"uCACO,MAAM,MAAS,GAAA,QAAA,CAAS,OAAQ,CAAA,SAAA,CAAA,IAAc,QAAQ,GAAK,EAAA;AAAA,EAChE,mBAAmB,GAAI,CAAA;AAAA,IACrB,UAAY,EAAA,EAAA;AAAA,IACZ,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,mBAAmB,GAAI,CAAA;AAAA,IACrB,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,oBAAoB,GAAI,CAAA;AAAA,IACtB,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EAGD,qBAAqB,GAAI,CAAA;AAAA,IACvB,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,cAAc,GAAI,CAAA;AAAA,IAChB,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,qBAAqB,GAAI,CAAA;AAAA,IACvB,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,4BAA4B,GAAI,CAAA;AAAA,IAC9B,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,mCAAmC,GAAI,CAAA;AAAA,IACrC,OAAS,EAAA;AAAA,GACV,CAAA;AAAA,EACD,2BAA2B,GAAI,CAAA;AAAA,IAC7B,OAAS,EAAA;AAAA,GACV;AACH,CAAC"}
|
|
@@ -258,7 +258,12 @@ const ConversationViewComponent = (_a) => {
|
|
|
258
258
|
},
|
|
259
259
|
propsConfiguration: {
|
|
260
260
|
__typename: "MachineConfiguration",
|
|
261
|
-
|
|
261
|
+
id: null,
|
|
262
|
+
resource: "",
|
|
263
|
+
contents: null,
|
|
264
|
+
keys: null,
|
|
265
|
+
target: null,
|
|
266
|
+
overrides: null
|
|
262
267
|
},
|
|
263
268
|
props: {},
|
|
264
269
|
files: {
|
|
@@ -487,7 +492,12 @@ const ConversationViewComponent = (_a) => {
|
|
|
487
492
|
},
|
|
488
493
|
propsConfiguration: {
|
|
489
494
|
__typename: "MachineConfiguration",
|
|
490
|
-
|
|
495
|
+
id: null,
|
|
496
|
+
resource: "",
|
|
497
|
+
contents: null,
|
|
498
|
+
keys: null,
|
|
499
|
+
target: null,
|
|
500
|
+
overrides: null
|
|
491
501
|
},
|
|
492
502
|
props: {},
|
|
493
503
|
files: {
|
|
@@ -719,7 +729,12 @@ const ConversationViewComponent = (_a) => {
|
|
|
719
729
|
},
|
|
720
730
|
propsConfiguration: {
|
|
721
731
|
__typename: "MachineConfiguration",
|
|
722
|
-
|
|
732
|
+
id: null,
|
|
733
|
+
resource: "",
|
|
734
|
+
contents: null,
|
|
735
|
+
keys: null,
|
|
736
|
+
target: null,
|
|
737
|
+
overrides: null
|
|
723
738
|
},
|
|
724
739
|
props: {},
|
|
725
740
|
files: {
|
|
@@ -996,13 +1011,16 @@ const ConversationViewComponent = (_a) => {
|
|
|
996
1011
|
reservationId: actionId
|
|
997
1012
|
};
|
|
998
1013
|
}
|
|
999
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (attachment == null ? void 0 : attachment.callToAction) && action ? /* @__PURE__ */ React__default.createElement(Box, { className: `bg-[${CALL_TO_ACTION_BOX_BGCOLOR}] rounded-[15] pb-2` }, /* @__PURE__ */ React__default.createElement(
|
|
1014
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (attachment == null ? void 0 : attachment.callToAction) && action ? /* @__PURE__ */ React__default.createElement(Box, { className: `bg-[${CALL_TO_ACTION_BOX_BGCOLOR}] rounded-[15] pb-2` }, /* @__PURE__ */ React__default.createElement(MessageText, __spreadProps(__spreadValues({}, props), { containerStyle: {
|
|
1000
1015
|
left: {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
paddingHorizontal: 2
|
|
1016
|
+
paddingLeft: 0,
|
|
1017
|
+
marginLeft: 0
|
|
1004
1018
|
}
|
|
1005
|
-
}
|
|
1019
|
+
}, textStyle: {
|
|
1020
|
+
left: {
|
|
1021
|
+
marginLeft: 0
|
|
1022
|
+
}
|
|
1023
|
+
} })), /* @__PURE__ */ React__default.createElement(Button, { variant: "outline", size: "sm", className: `border-[${CALL_TO_ACTION_BUTTON_BORDERCOLOR}] my-2 rounded-full `, onPress: () => action && params2 && navigation.navigate(action, params2) }, /* @__PURE__ */ React__default.createElement(ButtonText, { className: `color-[${CALL_TO_ACTION_TEXT_COLOR}]` }, attachment.callToAction.title))) : /* @__PURE__ */ React__default.createElement(TouchableHighlight, { underlayColor: "#c0c0c0", style: {
|
|
1006
1024
|
width: "100%"
|
|
1007
1025
|
}, onPress: () => {
|
|
1008
1026
|
if (currentMessage == null ? void 0 : currentMessage.isShowThreadMessage)
|