@planningcenter/chat-react-native 3.33.0 → 3.33.1-rc.1
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/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +0 -2
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/badge.d.ts +1 -6
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +0 -8
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/button.d.ts +1 -5
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +0 -4
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +1 -5
- package/build/components/display/image_attachment_preview.d.ts.map +1 -1
- package/build/components/display/image_attachment_preview.js +0 -4
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/video_attachment_preview.d.ts.map +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +1 -1
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +3 -3
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts +20 -20
- package/build/hooks/services/use_team_plans.d.ts +1 -1
- package/build/hooks/use_api.d.ts +36 -36
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_at_font_scale_breakpoint.d.ts.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts +20 -20
- package/build/hooks/use_conversation.d.ts +4 -4
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation_avatar_update.d.ts.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_message.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +2 -2
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +18 -18
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_create_android_ripple_color.d.ts.map +1 -1
- package/build/hooks/use_font_scale.d.ts.map +1 -1
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.d.ts +32 -32
- package/build/hooks/use_organization.d.ts +3 -3
- package/build/hooks/use_people_person.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.js +6 -1
- package/build/hooks/use_product_analytics.js.map +1 -1
- package/build/hooks/use_report_message.d.ts.map +1 -1
- package/build/hooks/use_scalable_number_of_lines.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +6 -6
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_typing_indicators.d.ts.map +1 -1
- package/build/hooks/use_typing_status_cache.d.ts.map +1 -1
- package/build/navigation/index.d.ts +46 -46
- package/build/navigation/index.d.ts.map +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +20 -20
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +52 -52
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +0 -1
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +8 -8
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +3 -3
- package/build/screens/team_conversation_screen.d.ts.map +1 -1
- package/build/utils/assert_keys_are_numbers.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.d.ts +1 -1
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/page_mutations.d.ts +4 -4
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/request_helpers.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/utils.d.ts.map +1 -1
- package/build/utils/parse_simple_markdown.d.ts.map +1 -1
- package/build/utils/performance_tracking.js +1 -1
- package/build/utils/performance_tracking.js.map +1 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/get_chat_configuration.d.ts +1 -1
- package/build/utils/request/get_chat_configuration.d.ts.map +1 -1
- package/build/utils/request/get_features.d.ts +1 -1
- package/build/utils/request/get_features.d.ts.map +1 -1
- package/build/utils/request/get_message.d.ts +1 -1
- package/build/utils/request/get_message.d.ts.map +1 -1
- package/build/utils/request/get_messages.d.ts +1 -1
- package/build/utils/request/get_messages.d.ts.map +1 -1
- package/build/utils/response_error.d.ts.map +1 -1
- package/build/utils/session.d.ts.map +1 -1
- package/build/utils/session.js +1 -1
- package/build/utils/session.js.map +1 -1
- package/build/utils/session_manager.js +1 -1
- package/build/utils/session_manager.js.map +1 -1
- package/build/utils/system_messages.d.ts.map +1 -1
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +1 -1
- package/build/utils/theme.js.map +1 -1
- package/build/utils/uri.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/__tests__/utils/theme.ts +23 -0
- package/src/components/conversation/jump_to_bottom_button.tsx +0 -2
- package/src/components/display/badge.tsx +1 -7
- package/src/components/display/button.tsx +1 -6
- package/src/components/display/image_attachment_preview.tsx +1 -5
- package/src/contexts/session_context.tsx +1 -1
- package/src/hooks/use_product_analytics.ts +6 -1
- package/src/screens/conversation_notification_level_select_screen.tsx +1 -2
- package/src/utils/performance_tracking.ts +1 -1
- package/src/utils/session.ts +1 -1
- package/src/utils/session_manager.ts +1 -1
- package/src/utils/theme.ts +1 -1
|
@@ -10,7 +10,7 @@ export interface ChatTypeResource extends ResourceObject {
|
|
|
10
10
|
title: string;
|
|
11
11
|
}
|
|
12
12
|
export declare const useChatTypes: () => {
|
|
13
|
-
error: import("
|
|
13
|
+
error: import("../../..").FailedResponse | null;
|
|
14
14
|
status: "success" | "error";
|
|
15
15
|
isError: boolean;
|
|
16
16
|
isPending: false;
|
|
@@ -21,7 +21,7 @@ export declare const useChatTypes: () => {
|
|
|
21
21
|
dataUpdatedAt: number;
|
|
22
22
|
errorUpdatedAt: number;
|
|
23
23
|
failureCount: number;
|
|
24
|
-
failureReason: import("
|
|
24
|
+
failureReason: import("../../..").FailedResponse | null;
|
|
25
25
|
errorUpdateCount: number;
|
|
26
26
|
isFetched: boolean;
|
|
27
27
|
isFetchedAfterMount: boolean;
|
|
@@ -30,7 +30,7 @@ export declare const useChatTypes: () => {
|
|
|
30
30
|
isPaused: boolean;
|
|
31
31
|
isRefetching: boolean;
|
|
32
32
|
isStale: boolean;
|
|
33
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("
|
|
33
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("../../..").ApiResource<ChatTypeResource[]>, import("../../..").FailedResponse>>;
|
|
34
34
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
35
|
data: ChatTypeResource[];
|
|
36
36
|
links: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team_conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/team_conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAUzF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,CAAA;AAEvF,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"team_conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/team_conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAUzF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,CAAA;AAEvF,eAAO,MAAM,sBAAsB,GAAI,WAAW,2BAA2B,gCA2B5E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert_keys_are_numbers.d.ts","sourceRoot":"","sources":["../../src/utils/assert_keys_are_numbers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"assert_keys_are_numbers.d.ts","sourceRoot":"","sources":["../../src/utils/assert_keys_are_numbers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,MAAM,CAAC,GAAG,EAAE,MAAM,CAEpE,CAAA"}
|
|
@@ -6,6 +6,6 @@ export declare function updateCacheWithIndividualMessage(queryClient: QueryClien
|
|
|
6
6
|
export declare function updateCacheWithReaction(queryClient: QueryClient, queryKey: unknown[], event: JoltReactionEvent, currentPersonId: number): void;
|
|
7
7
|
export declare function isTemporaryMessageId(messageId?: string | null): boolean;
|
|
8
8
|
export declare function isNewMessage(message?: MessageResource): boolean;
|
|
9
|
-
export declare function getThreadedMessagesQueryKey(conversationId: number, replyRootId: string): import("../../hooks
|
|
9
|
+
export declare function getThreadedMessagesQueryKey(conversationId: number, replyRootId: string): import("../../hooks").RequestQueryKey;
|
|
10
10
|
export declare function mergeMessageUpdate(record: MessageResource, current?: MessageResource): MessageResource;
|
|
11
11
|
//# sourceMappingURL=messages_cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages_cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/messages_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAA8B,eAAe,EAAE,MAAM,aAAa,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAM3D,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,QAkC7C;AAID,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,eAAe,QAgBzB;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,EAAE,iBAAiB,EACxB,eAAe,EAAE,MAAM,QAuCxB;AAGD,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAEvE;AACD,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAE/D;AAED,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"messages_cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/messages_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAA8B,eAAe,EAAE,MAAM,aAAa,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAM3D,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,QAkC7C;AAID,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,eAAe,QAgBzB;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,EAAE,iBAAiB,EACxB,eAAe,EAAE,MAAM,QAuCxB;AAGD,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAEvE;AACD,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAE/D;AAED,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yCAMtF;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,eAAe,GACxB,eAAe,CAWjB"}
|
|
@@ -19,7 +19,7 @@ export declare function updateRecordInPagesData<T extends ResourceObject>({ data
|
|
|
19
19
|
pages: {
|
|
20
20
|
data: T[];
|
|
21
21
|
links: Record<string, string>;
|
|
22
|
-
meta: import("
|
|
22
|
+
meta: import("../..").CollectionMeta;
|
|
23
23
|
}[];
|
|
24
24
|
pageParams: any;
|
|
25
25
|
} | undefined;
|
|
@@ -38,7 +38,7 @@ export declare function updateOrCreateRecordInPagesData<T extends ResourceObject
|
|
|
38
38
|
pages: {
|
|
39
39
|
data: T[];
|
|
40
40
|
links: Record<string, string>;
|
|
41
|
-
meta: import("
|
|
41
|
+
meta: import("../..").CollectionMeta;
|
|
42
42
|
}[];
|
|
43
43
|
pageParams: any;
|
|
44
44
|
} | undefined;
|
|
@@ -56,7 +56,7 @@ export declare function updateAllRecordsInPagesData<T extends ResourceObject>({
|
|
|
56
56
|
pages: {
|
|
57
57
|
data: T[];
|
|
58
58
|
links: Record<string, string>;
|
|
59
|
-
meta: import("
|
|
59
|
+
meta: import("../..").CollectionMeta;
|
|
60
60
|
}[];
|
|
61
61
|
pageParams: any;
|
|
62
62
|
} | undefined;
|
|
@@ -89,7 +89,7 @@ export declare function deleteRecordInPagesData<T extends ResourceObject>({ data
|
|
|
89
89
|
pages: {
|
|
90
90
|
data: T[];
|
|
91
91
|
links: Record<string, string>;
|
|
92
|
-
meta: import("
|
|
92
|
+
meta: import("../..").CollectionMeta;
|
|
93
93
|
}[];
|
|
94
94
|
pageParams: any;
|
|
95
95
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AASxE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAE3F,MAAM,MAAM,sBAAsB,GAAG,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAA;AAExE,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAAa,MAAM;IACjB,OAAO,EAAE,MAAM,CAAK;IACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAK;IAC3C,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;gBAED,EAAE,OAAO,EAAE,cAAmB,EAAE,sBAAsB,EAAE,IAAI,EAAE,EAAE,UAAU;IAOhF,GAAG,CAAC,CAAC,SA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AAK,CAAC,CAAC,SAAS,aAAa,GAAG,WAAW,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;IAW5E,IAAI,CAAC,CAAC,SAAS,aAAa,GAAG,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;IAW1E,MAAM,CAAC,IAAI,EAAE,aAAa;IAShC,WAAW,GAAU,UAAU,QAAQ,oBAUtC;IAED,kBAAkB,GAAU,UAAU,QAAQ,KAAG,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAMhF;IAED,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,IAAI,OAAO;;;;MAOV;CACF;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request_helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/client/request_helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAExF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"request_helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/client/request_helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAExF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;I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,
|
|
1
|
+
{"version":3,"file":"transform_request_data.d.ts","sourceRoot":"","sources":["../../../src/utils/client/transform_request_data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGrC,eAAO,MAAM,oBAAoB,GAAI,kDAMlC,OAAO,CAAC,WAAW,CAAC;;CAOtB,CAAA;AAED,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,EAC1E,GAAG,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,CAAC,MAajC;AAED,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,EAAE,CAAA;CAClD,CAAA;AACD,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAE5D,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,WAAW,CAajE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/client/utils.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/client/utils.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,EAAE,0BAAyB,WAG7D,CAAA;AAqCD,QAAA,MAAM,eAAe,SAtBI,MAAM,KAAG,MAsBK,CAAA;AACvC,QAAA,MAAM,eAAe,SAvBI,MAAM,KAAG,MAuB2C,CAAA;AAE7E,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse_simple_markdown.d.ts","sourceRoot":"","sources":["../../src/utils/parse_simple_markdown.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"parse_simple_markdown.d.ts","sourceRoot":"","sources":["../../src/utils/parse_simple_markdown.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,mBAmChD,CAAA;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;IACzC,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performance_tracking.js","sourceRoot":"","sources":["../../src/utils/performance_tracking.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,UAAU,MAAM,0BAA0B,CAAA;AAEjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAA;AAa/C,MAAM,cAAc,GAAG,IAAI,GAAG,EAAgC,CAAA;AAE9D;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,aAAqB;IAChE,IAAI,CAAC,aAAa;QAAE,OAAM;IAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC5B,cAAc,CAAC,GAAG,CAAC,WAAW,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAA;IAC5E,cAAc,CAAC,GAAG,CAAC,gBAAgB,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAA;IACjF,mBAAmB,EAAE,CAAA;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAAC,EAC9C,SAAS,EACT,aAAa,GAId;IACC,IAAI,CAAC,aAAa;QAAE,OA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IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,4BAA4B;IAEjE,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,cAAc,CAAC,OAAO,EAAE,EAAE,CAAC;QACrD,IAAI,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,cAAc,EAAE,CAAC;YAC5C,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * Performance tracking utilities for client-side metrics (React Native)\n *\n * This module provides functionality to track performance metrics and send them\n * to Datadog via the backend API for aggregation.\n */\n\nimport { Platform } from 'react-native'\nimport DeviceInfo from 'react-native-device-info'\nimport { ApiClient } from '../hooks'\nconst appName = DeviceInfo.getApplicationName()\n\ninterface PerformanceMetric {\n name: string\n value: number\n unit: 'milliseconds' | 'seconds' | 'count'\n}\n\ninterface PendingMessageMetric {\n idempotentKey: string\n startTime: number\n}\n\nconst pendingMetrics = new Map<string, PendingMessageMetric>()\n\n/**\n * Start tracking message creation performance\n */\nexport function startMessageCreationTracking(idempotentKey: string): void {\n if (!idempotentKey) return\n const startTime = Date.now()\n pendingMetrics.set(`message:${idempotentKey}`, { idempotentKey, startTime })\n pendingMetrics.set(`conversation:${idempotentKey}`, { idempotentKey, startTime })\n cleanupStaleMetrics()\n}\n\n/**\n * Complete message creation tracking when the message.created event is received\n */\nexport function completeMessageCreationTracking({\n apiClient,\n idempotentKey,\n}: {\n apiClient: ApiClient\n idempotentKey: string\n}): void {\n if (!idempotentKey) return\n const duration = durationForIdempotentKey(`message:${idempotentKey}`)\n if (!duration) return\n sendPerformanceMetric(apiClient, {\n name: 'chat.message.creation.message_roundtrip_time',\n value: duration,\n unit: 'milliseconds',\n })\n}\n\n/**\n * Complete message creation tracking when the conversation.updated event is received\n */\nexport function completeMessageCreationConversationTracking({\n apiClient,\n idempotentKey,\n}: {\n apiClient: ApiClient\n idempotentKey: string\n}): void {\n if (!idempotentKey) return\n const duration = durationForIdempotentKey(`conversation:${idempotentKey}`)\n if (!duration) return\n sendPerformanceMetric(apiClient, {\n name: 'chat.message.creation.conversation_roundtrip_time',\n value: duration,\n unit: 'milliseconds',\n })\n}\n\nfunction durationForIdempotentKey(idempotentKey: string): number | undefined {\n const metric = pendingMetrics.get(idempotentKey)\n if (!metric) return undefined\n pendingMetrics.delete(idempotentKey)\n const endTime = Date.now()\n return endTime - metric.startTime\n}\n\n/**\n * Send performance metric to backend for Datadog submission\n */\nasync function sendPerformanceMetric(\n apiClient: ApiClient,\n metric: PerformanceMetric\n): Promise<void> {\n try {\n await apiClient.chat.post({\n url: `/me/metrics`,\n data: {\n data: {\n type: 'Metric',\n attributes: {\n metric: {\n name: metric.name,\n value: metric.value,\n unit: metric.unit,\n platform: Platform.OS,\n app: appName,\n },\n },\n },\n },\n })\n } catch (_e) {\n // Ignore errors\n }\n}\n\n/**\n * Clean up any stale metrics (older than 5 minutes)\n * This prevents memory leaks if messages fail to complete for any reason\n */\nfunction cleanupStaleMetrics(): void {\n const now = Date.now()\n const staleThreshold = 5 * 60 * 1000 // 5 minutes in milliseconds\n\n for (const [key, metric] of pendingMetrics.entries()) {\n if (now - metric.startTime > staleThreshold) {\n pendingMetrics.delete(key)\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/utils/request/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/utils/request/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED,eAAO,MAAM,2BAA2B,GAAI,wDAIzC,OAAO,CAAC,uBAAuB,CAAM,KAAG,UA2C1C,CAAA"}
|
|
@@ -6,5 +6,5 @@ export declare const getChatConfigurationRequestArgs: () => {
|
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
export declare const getChatConfigurationQueryKey: () => import("../../hooks
|
|
9
|
+
export declare const getChatConfigurationQueryKey: () => import("../../hooks").RequestQueryKey;
|
|
10
10
|
//# sourceMappingURL=get_chat_configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_chat_configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_chat_configuration.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B;;;;;;;CAe3C,CAAA;AAED,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"get_chat_configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_chat_configuration.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B;;;;;;;CAe3C,CAAA;AAED,eAAO,MAAM,4BAA4B,6CAGxC,CAAA"}
|
|
@@ -7,5 +7,5 @@ export declare const getFeaturesRequestArgs: () => {
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export declare const getFeaturesQueryKey: () => import("../../hooks
|
|
10
|
+
export declare const getFeaturesQueryKey: () => import("../../hooks").RequestQueryKey;
|
|
11
11
|
//# sourceMappingURL=get_features.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_features.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_features.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;;;;;;;CAYlC,CAAA;AAED,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"get_features.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_features.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;;;;;;;CAYlC,CAAA;AAED,eAAO,MAAM,mBAAmB,6CAG/B,CAAA"}
|
|
@@ -16,5 +16,5 @@ export declare const getMessageRequestArgs: ({ conversation_id, messageId, }: {
|
|
|
16
16
|
export declare const getMessageQueryKey: ({ conversation_id, messageId, }: {
|
|
17
17
|
conversation_id: number;
|
|
18
18
|
messageId: string;
|
|
19
|
-
}) => import("../../hooks
|
|
19
|
+
}) => import("../../hooks").RequestQueryKey;
|
|
20
20
|
//# sourceMappingURL=get_message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_message.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_message.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"get_message.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_message.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,GAAI,iCAGnC;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;CAClB;;;;;;;;;;;CAWA,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAGhC;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;CAClB,0CAGA,CAAA"}
|
|
@@ -17,5 +17,5 @@ export declare const getMessagesRequestArgs: ({ conversation_id, reply_root_id,
|
|
|
17
17
|
export declare const getMessagesQueryKey: ({ conversation_id, reply_root_id, }: {
|
|
18
18
|
conversation_id: number;
|
|
19
19
|
reply_root_id?: string | null;
|
|
20
|
-
}) => import("../../hooks
|
|
20
|
+
}) => import("../../hooks").RequestQueryKey;
|
|
21
21
|
//# sourceMappingURL=get_messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_messages.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_messages.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"get_messages.d.ts","sourceRoot":"","sources":["../../../src/utils/request/get_messages.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,GAAI,qCAGpC;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;;;;;;;;;;;;CAeA,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,qCAGjC;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B,0CAGA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response_error.d.ts","sourceRoot":"","sources":["../../src/utils/response_error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,qBAAa,aAAc,SAAQ,KAAK;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;IAChC,QAAQ,EAAE,cAAc,CAAA;gBAEZ,QAAQ,EAAE,cAAc;CAQrC;AAED,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"response_error.d.ts","sourceRoot":"","sources":["../../src/utils/response_error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,qBAAa,aAAc,SAAQ,KAAK;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;IAChC,QAAQ,EAAE,cAAc,CAAA;gBAEZ,QAAQ,EAAE,cAAc;CAQrC;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,mBAMhD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE3E,MAAM,MAAM,GAAG,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;AAC1D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,mBAAmB,CAAA;AACrD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AACjF,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,MAAM,EAAE,cAAc,CAAA;QACtB,YAAY,EAAE,oBAAoB,CAAA;KACnC,CAAA;CACF,CAAA;AACD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,YAAY,IAAI;IACjD,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,KAAK,CAAC,EAAE,CAAC,CAAA;IACT,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE3E,MAAM,MAAM,GAAG,GAAG,YAAY,GA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;YACvD,OAAO,0BAA0B,CAAA;QACnC,CAAC;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAA;QACxC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3B,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9E,CAAC;IAED,yDAAyD;IACzD,SAAS,CAAC,MAAsB;QAC9B,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IAC3B,CAAC;IAED,eAAe,CAAC,YAAkC;QAChD,IAAI,CAAC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IACvC,CAAC;IAED,MAAM,CAAC,OAAO,CAAyB,aAAqB;QAC1D,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;YACvC,OAAO,IAAI,OAAO,CAAI,KAAK,CAAC,CAAA;QAC9B,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,OAAO,EAAK,CAAA;QACzB,CAAC;IACH,CAAC;CACF","sourcesContent":["import { OAuthToken, OrganizationResource, PersonResource } from '../types'\n\nexport type ENV = 'production' | 'staging' | 'development'\nexport type OauthType = 'OAuth' | 'ChurchCenterOauth'\nexport type PartialToken = Pick<OAuthToken, 'access_token'> & Partial<OAuthToken>\nexport type SessionMeta = {\n [key: string]: {\n person: PersonResource\n organization: OrganizationResource\n }\n}\nexport type SessionProps<T extends PartialToken> = {\n env?: ENV\n token?: T\n type?: OauthType\n meta?: SessionMeta\n}\n\nexport const UNAUTHENTICATED_SESSION_ID = 'unauthenticated' as const\ntype SessionId = string | typeof UNAUTHENTICATED_SESSION_ID\n\n/**\n * Session class to track the environment and token\n * Not intended to make network requests or handle authentication\n */\nexport class Session<T extends PartialToken = PartialToken> {\n env: ENV\n token: T | undefined\n type: OauthType\n meta: Record<string, any>\n\n constructor(props?: SessionProps<T>) {\n const { env = 'production', token, type, meta } = props || {}\n this.env = env\n this.token = token\n this.type = type || 'OAuth'\n this.meta = meta || {}\n }\n\n get isAuthenticated() {\n return Boolean(this.token?.access_token)\n }\n\n get isChurchCenterToken() {\n return this.type === 'ChurchCenterOauth'\n }\n\n get id(): SessionId {\n if (!this.isAuthenticated || !this.token?.access_token) {\n return UNAUTHENTICATED_SESSION_ID\n }\n const tokenStr = this.token.access_token\n return tokenStr.slice(-8)\n }\n\n toString() {\n return JSON.stringify({ env: this.env, token: this.token, meta: this.meta })\n }\n\n // Convenience methods to set the person and organization\n setPerson(person: PersonResource) {\n this.meta.person = person\n }\n\n setOrganization(organization: OrganizationResource) {\n this.meta.organization = organization\n }\n\n static hydrate<T extends PartialToken>(sessionString: string) {\n try {\n const props = JSON.parse(sessionString)\n return new Session<T>(props)\n } catch (_error) {\n return new Session<T>()\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_manager.js","sourceRoot":"","sources":["../../src/utils/session_manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAO,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AAOpE,MAAM,OAAO,cAAc;IACzB,QAAQ,CAAwB;IAChC,gBAAgB,CAAQ;IAExB,YAAY,KAA2B;QACrC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,KAAK,IAAI,EAAE,CAAA;QAClD,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAA;QAC9B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,0BAA0B,CAAA;IACxE,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,oBAA4B;QACzC,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NAUTHENTICATED_SESSION_ID } from './session'\n\ntype SessionManagerProps = {\n sessions?: Record<string, string>\n currentSessionId?: string\n}\n\nexport class SessionManager {\n sessions: Record<string, string>\n currentSessionId: string\n\n constructor(props?: SessionManagerProps) {\n const { sessions, currentSessionId } = props || {}\n this.sessions = sessions || {}\n this.currentSessionId = currentSessionId || UNAUTHENTICATED_SESSION_ID\n }\n\n static hydrate(sessionManagerString: string) {\n try {\n const props = JSON.parse(sessionManagerString)\n return new SessionManager(props)\n } catch (_error) {\n return new SessionManager()\n }\n }\n\n get currentSession() {\n return Session.hydrate<OAuthToken>(\n this.sessions[this.currentSessionId] || new Session<OAuthToken>({}).toString()\n )\n }\n\n setEnv(env: ENV) {\n // Get the current session (handles case where it doesn't exist)\n const session = this.currentSession\n session.env = env\n // Store the session with its ID\n this.upsertSession(session)\n }\n\n toString() {\n return JSON.stringify({ sessions: this.sessions, currentSessionId: this.currentSessionId })\n }\n\n removeSession(sessionId: string) {\n // if unauthenticated, this is a no-op\n this.sessions = omit(this.sessions, sessionId)\n if (this.currentSessionId === sessionId) {\n this.currentSessionId = UNAUTHENTICATED_SESSION_ID\n }\n }\n\n switchSession(sessionId: string) {\n const sessionPresent = this.sessions[sessionId]\n if (!sessionPresent) {\n throw new Error(`Session ${sessionId} not found`)\n }\n this.currentSessionId = sessionId\n }\n\n upsertSession(session: Session) {\n this.sessions[session.id] = session.toString()\n this.currentSessionId = session.id\n }\n\n updateCurrentToken(token: OAuthToken) {\n const session = this.currentSession\n this.removeSession(session.id)\n session.token = token\n this.upsertSession(session)\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system_messages.d.ts","sourceRoot":"","sources":["../../src/utils/system_messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,QAAA,MAAM,oBAAoB,0BAA2B,CAAA;AAErD,KAAK,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,WAAW,EAAE,iBAAiB,CAAA;IAC9B,eAAe,EAAE;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3E,uBAAuB,EAAE,MAAM,EAAE,CAAA;CAClC;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"system_messages.d.ts","sourceRoot":"","sources":["../../src/utils/system_messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,QAAA,MAAM,oBAAoB,0BAA2B,CAAA;AAErD,KAAK,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,WAAW,EAAE,iBAAiB,CAAA;IAC9B,eAAe,EAAE;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3E,uBAAuB,EAAE,MAAM,EAAE,CAAA;CAClC;AAED,eAAO,MAAM,eAAe,GAAI,SAAS,eAAe,KAAG,OAAO,IAAI,qBAG7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAiB,MAAM,cAAc,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAG/E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,CAAC,OAAO,mBAAmB,CAAC,KAAK,GAAG,OA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,MAAM,GAAG,SAAS,CAAA;IAC3C,6BAA6B,EAAE,MAAM,CAAA;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,iBAAiB,EAAE,MAAM,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,iBAAiB,EAAE,MAAM,CAAA;IACzB,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,MAAM,CAAA;IACzB,eAAe,EAAE,MAAM,CAAA;IACvB,yBAAyB,EAAE,MAAM,CAAA;IACjC,yBAAyB,EAAE,MAAM,CAAA;IACjC,+BAA+B,EAAE,MAAM,CAAA;IACvC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,sBAAsB,EAAE,MAAM,CAAA;IAC9B,4BAA4B,EAAE,MAAM,CAAA;IACpC,yBAAyB,EAAE,MAAM,CAAA;IACjC,yBAAyB,EAAE,MAAM,CAAA;IACjC,+BAA+B,EAAE,MAAM,CAAA;IACvC,uBAAuB,EAAE,MAAM,CAAA;IAC/B,uBAAuB,EAAE,MAAM,CAAA;IAC/B,6BAA6B,EAAE,MAAM,CAAA;IACrC,yBAAyB,EAAE,MAAM,CAAA;IACjC,yBAAyB,EAAE,MAAM,CAAA;IACjC,+BAA+B,EAAE,MAAM,CAAA;CACxC"}
|
package/build/utils/theme.js
CHANGED
|
@@ -2,7 +2,7 @@ import { PlatformColor } from 'react-native';
|
|
|
2
2
|
import { aliasTokensColorMap } from '../vendor/tapestry/alias_tokens_color_map';
|
|
3
3
|
import { tokens } from '../vendor/tapestry/tokens';
|
|
4
4
|
export const defaultTheme = (colorScheme) => {
|
|
5
|
-
const scheme = colorScheme
|
|
5
|
+
const scheme = colorScheme === 'dark' ? 'dark' : 'light';
|
|
6
6
|
const defaultColors = {
|
|
7
7
|
...chatThemeColorMap[scheme],
|
|
8
8
|
...aliasTokensColorMap[scheme],
|
package/build/utils/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,aAAa,EAAE,MAAM,cAAc,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AA8BlD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,WAA4B,EAAa,EAAE;IACtE,MAAM,MAAM,GAAG,WAAW,IAAI,OAAO,CAAA;IAErC,MAAM,aAAa,GAAG;QACpB,GAAG,iBAAiB,CAAC,MAAM,CAAC;QAC5B,GAAG,mBAAmB,CAAC,MAAM,CAAC;KAC/B,CAAA;IAED,OAAO;QACL,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE;YACN,YAAY,EAAE,EAAE;SACjB;QACD,oBAAoB,EAAE,IAAI,EAAE,sEAAsE;KACnG,CAAA;AACH,CAAC,CAAA;AA+CD,MAAM,eAAe,GAAe;IAClC,IAAI,EAAE,OAAO;IACb,iCAAiC,EAAE,MAAM,CAAC,2BAA2B;IACrE,6BAA6B,EAAE,aAAa,CAAC,MAAM,CAAC;IACpD,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,MAAM,CAAC,2BAA2B;IAC/C,uBAAuB,EAAE,SAAS;IAClC,6BAA6B,EAAE,MAAM,CAAC,oBAAoB;IAC1D,SAAS,EAAE,SAAS;IACpB,cAAc,EAAE,MAAM,CAAC,0BAA0B;IAC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,EAAE,MAAM,CAAC,iCAAiC;IACnE,yBAAyB,EAAE,MAAM,CAAC,0BAA0B;IAC5D,+BAA+B,EAAE,MAAM,CAAC,+BAA+B;IACvE,uBAAuB,EAAE,MAAM,CAAC,+BAA+B;IAC/D,uBAAuB,EAAE,MAAM,CAAC,wBAAwB;IACxD,6BAA6B,EAAE,MAAM,CAAC,6BAA6B;IACnE,yBAAyB,EAAE,MAAM,CAAC,iCAAiC;IACnE,yBAAyB,EAAE,MAAM,CAAC,0BAA0B;IAC5D,+BAA+B,EAAE,MAAM,CAAC,+BAA+B;CACxE,CAAA;AAED,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,cAAc;CACrB,CAAA","sourcesContent":["import { ColorSchemeName, ColorValue, OpaqueColorValue, PlatformColor } from 'react-native'\nimport { aliasTokensColorMap } from '../vendor/tapestry/alias_tokens_color_map'\nimport { tokens } from '../vendor/tapestry/tokens'\n\nexport interface ChatTheme extends DefaultTheme {\n colors: DefaultTheme['colors'] &\n (typeof aliasTokensColorMap.light | typeof aliasTokensColorMap.dark)\n}\n\n/** =============================================\n NOTE: The specific values for `colors` and the `productBadge` are temporary examples that can be replaced once we start building out UI. This line's comment can be removed at that time too.\n\n The default theme is intended to support two types of customizations:\n 1. Specific color properties for a chat component (eg. `primaryButtonBackgroundColor`)\n 2. Any styles for a specific component. (Use only one level of nesting.)\n ```\n primaryButton: {\n borderRadius: number\n container: ViewStyle\n text: TextStyle\n }\n ```\n============================================= */\n\nexport interface DefaultTheme {\n colors: ChatColors\n button: {\n borderRadius: number\n }\n showBadgeProductLogo: boolean\n}\n\nexport const defaultTheme = (colorScheme: ColorSchemeName): ChatTheme => {\n const scheme = colorScheme || 'light'\n\n const defaultColors = {\n ...chatThemeColorMap[scheme],\n ...aliasTokensColorMap[scheme],\n }\n\n return {\n colors: defaultColors,\n button: {\n borderRadius: 40,\n },\n showBadgeProductLogo: true, // Overrides visibility of the product logo in `src/display/badge.tsx`\n }\n}\n\nexport type TemporaryDefaultColorsType = Partial<ChatColors>\n\ninterface ChatColors {\n name: string\n buttonStart: string | undefined\n buttonEnd: string | undefined\n interaction: string\n androidModalHeaderButtonTextColor: ColorValue | string | undefined\n iOSModalHeaderButtonTextColor: OpaqueColorValue | string | undefined\n androidSwitchThumbColor: string | undefined\n conversationActionsBackground: string\n testColor: string\n statusSuccessIcon: string\n statusSuccessText: string\n statusSuccessBorder: string\n statusSuccessFill: string\n statusInfoIcon: string\n statusInfoText: string\n statusInfoBorder: string\n statusInfoFill: string\n statusWarningIcon: string\n statusWarningText: string\n statusWarningBorder: string\n statusWarningFill: string\n statusErrorIcon: string\n statusErrorText: string\n statusErrorBorder: string\n statusErrorFill: string\n statusSuccessComposedIcon: string\n statusSuccessComposedText: string\n statusSuccessComposedBackground: string\n statusInfoComposedIcon: string\n statusInfoComposedText: string\n statusInfoComposedBackground: string\n statusWarningComposedIcon: string\n statusWarningComposedText: string\n statusWarningComposedBackground: string\n statusErrorComposedIcon: string\n statusErrorComposedText: string\n statusErrorComposedBackground: string\n statusNeutralComposedIcon: string\n statusNeutralComposedText: string\n statusNeutralComposedBackground: string\n}\n\nconst colorsChatLight: ChatColors = {\n name: 'light',\n androidModalHeaderButtonTextColor: tokens.fillColorInteractionDefault,\n iOSModalHeaderButtonTextColor: PlatformColor('link'),\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefault,\n androidSwitchThumbColor: undefined,\n conversationActionsBackground: tokens.colorNeutral100White,\n testColor: 'hotpink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimary,\n statusInfoText: tokens.textColorStatusInfo,\n statusInfoBorder: tokens.borderColorStatusInfo,\n statusInfoFill: tokens.fillColorStatusInfoSolid,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimary,\n statusSuccessText: tokens.textColorStatusSuccess,\n statusSuccessBorder: tokens.borderColorStatusSuccess,\n statusSuccessFill: tokens.fillColorStatusSuccessSolid,\n statusWarningIcon: tokens.iconColorStatusWarningPrimary,\n statusWarningText: tokens.textColorStatusWarning,\n statusWarningBorder: tokens.borderColorStatusWarning,\n statusWarningFill: tokens.fillColorStatusWarningSolid,\n statusErrorIcon: tokens.iconColorStatusErrorPrimary,\n statusErrorText: tokens.textColorStatusError,\n statusErrorBorder: tokens.borderColorStatusError,\n statusErrorFill: tokens.fillColorStatusErrorSolid,\n statusInfoComposedIcon: tokens.iconColorStatusInfoPrimary,\n statusInfoComposedText: tokens.textColorStatusInfo,\n statusInfoComposedBackground: tokens.fillColorStatusInfoGhost,\n statusSuccessComposedIcon: tokens.iconColorStatusSuccessPrimary,\n statusSuccessComposedText: tokens.textColorStatusSuccess,\n statusSuccessComposedBackground: tokens.fillColorStatusSuccessGhost,\n statusWarningComposedIcon: tokens.iconColorStatusWarningPrimary,\n statusWarningComposedText: tokens.textColorStatusWarning,\n statusWarningComposedBackground: tokens.fillColorStatusWarningGhost,\n statusErrorComposedIcon: tokens.iconColorStatusErrorPrimary,\n statusErrorComposedText: tokens.textColorStatusError,\n statusErrorComposedBackground: tokens.fillColorStatusErrorGhost,\n statusNeutralComposedIcon: tokens.iconColorStatusNeutralPrimary,\n statusNeutralComposedText: tokens.textColorStatusNeutral,\n statusNeutralComposedBackground: tokens.fillColorStatusNeutralGhost,\n}\n\nconst colorsChatDark: ChatColors = {\n name: 'dark',\n androidModalHeaderButtonTextColor: tokens.fillColorInteractionDefaultDark,\n iOSModalHeaderButtonTextColor: PlatformColor('link'),\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefaultDark,\n androidSwitchThumbColor: undefined,\n conversationActionsBackground: tokens.colorNeutral7,\n testColor: 'pink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimaryDark,\n statusInfoText: tokens.textColorStatusInfoDark,\n statusInfoBorder: tokens.borderColorStatusInfoDark,\n statusInfoFill: tokens.fillColorStatusInfoSolidDark,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimaryDark,\n statusSuccessText: tokens.textColorStatusSuccessDark,\n statusSuccessBorder: tokens.borderColorStatusSuccessDark,\n statusSuccessFill: tokens.fillColorStatusSuccessSolidDark,\n statusWarningIcon: tokens.iconColorStatusWarningPrimaryDark,\n statusWarningText: tokens.textColorStatusWarningDark,\n statusWarningBorder: tokens.borderColorStatusWarningDark,\n statusWarningFill: tokens.fillColorStatusWarningSolidDark,\n statusErrorIcon: tokens.iconColorStatusErrorPrimaryDark,\n statusErrorText: tokens.textColorStatusErrorDark,\n statusErrorBorder: tokens.borderColorStatusErrorDark,\n statusErrorFill: tokens.fillColorStatusErrorSolidDark,\n\n // Note: CCA inverts composed status colors in dark mode\n statusInfoComposedIcon: tokens.iconColorStatusInfoPrimaryDark,\n statusInfoComposedText: tokens.textColorStatusInfoDark,\n statusInfoComposedBackground: tokens.fillColorStatusInfoGhostDark,\n statusSuccessComposedIcon: tokens.iconColorStatusSuccessPrimaryDark,\n statusSuccessComposedText: tokens.textColorStatusSuccessDark,\n statusSuccessComposedBackground: tokens.fillColorStatusSuccessGhostDark,\n statusWarningComposedIcon: tokens.iconColorStatusWarningPrimaryDark,\n statusWarningComposedText: tokens.textColorStatusWarningDark,\n statusWarningComposedBackground: tokens.fillColorStatusWarningGhostDark,\n statusErrorComposedIcon: tokens.iconColorStatusErrorPrimaryDark,\n statusErrorComposedText: tokens.textColorStatusErrorDark,\n statusErrorComposedBackground: tokens.fillColorStatusErrorGhostDark,\n statusNeutralComposedIcon: tokens.iconColorStatusNeutralPrimaryDark,\n statusNeutralComposedText: tokens.textColorStatusNeutralDark,\n statusNeutralComposedBackground: tokens.fillColorStatusNeutralGhostDark,\n}\n\nconst chatThemeColorMap = {\n light: colorsChatLight,\n dark: colorsChatDark,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,aAAa,EAAE,MAAM,cAAc,CAAA;AAC3F,OAAO,EAAE,mBAAmB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AAED,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,cAAc;CACrB,CAAA","sourcesContent":["import { ColorSchemeName, ColorValue, OpaqueColorValue, PlatformColor } from 'react-native'\nimport { aliasTokensColorMap } from '../vendor/tapestry/alias_tokens_color_map'\nimport { tokens } from '../vendor/tapestry/tokens'\n\nexport interface ChatTheme extends DefaultTheme {\n colors: DefaultTheme['colors'] &\n (typeof aliasTokensColorMap.light | typeof aliasTokensColorMap.dark)\n}\n\n/** =============================================\n NOTE: The specific values for `colors` and the `productBadge` are temporary examples that can be replaced once we start building out UI. This line's comment can be removed at that time too.\n\n The default theme is intended to support two types of customizations:\n 1. Specific color properties for a chat component (eg. `primaryButtonBackgroundColor`)\n 2. Any styles for a specific component. (Use only one level of nesting.)\n ```\n primaryButton: {\n borderRadius: number\n container: ViewStyle\n text: TextStyle\n }\n ```\n============================================= */\n\nexport interface DefaultTheme {\n colors: ChatColors\n button: {\n borderRadius: number\n }\n showBadgeProductLogo: boolean\n}\n\nexport const defaultTheme = (colorScheme: ColorSchemeName): ChatTheme => {\n const scheme: 'light' | 'dark' = colorScheme === 'dark' ? 'dark' : 'light'\n\n const defaultColors = {\n ...chatThemeColorMap[scheme],\n ...aliasTokensColorMap[scheme],\n }\n\n return {\n colors: defaultColors,\n button: {\n borderRadius: 40,\n },\n showBadgeProductLogo: true, // Overrides visibility of the product logo in `src/display/badge.tsx`\n }\n}\n\nexport type TemporaryDefaultColorsType = Partial<ChatColors>\n\ninterface ChatColors {\n name: string\n buttonStart: string | undefined\n buttonEnd: string | undefined\n interaction: string\n androidModalHeaderButtonTextColor: ColorValue | string | undefined\n iOSModalHeaderButtonTextColor: OpaqueColorValue | string | undefined\n androidSwitchThumbColor: string | undefined\n conversationActionsBackground: string\n testColor: string\n statusSuccessIcon: string\n statusSuccessText: string\n statusSuccessBorder: string\n statusSuccessFill: string\n statusInfoIcon: string\n statusInfoText: string\n statusInfoBorder: string\n statusInfoFill: string\n statusWarningIcon: string\n statusWarningText: string\n statusWarningBorder: string\n statusWarningFill: string\n statusErrorIcon: string\n statusErrorText: string\n statusErrorBorder: string\n statusErrorFill: string\n statusSuccessComposedIcon: string\n statusSuccessComposedText: string\n statusSuccessComposedBackground: string\n statusInfoComposedIcon: string\n statusInfoComposedText: string\n statusInfoComposedBackground: string\n statusWarningComposedIcon: string\n statusWarningComposedText: string\n statusWarningComposedBackground: string\n statusErrorComposedIcon: string\n statusErrorComposedText: string\n statusErrorComposedBackground: string\n statusNeutralComposedIcon: string\n statusNeutralComposedText: string\n statusNeutralComposedBackground: string\n}\n\nconst colorsChatLight: ChatColors = {\n name: 'light',\n androidModalHeaderButtonTextColor: tokens.fillColorInteractionDefault,\n iOSModalHeaderButtonTextColor: PlatformColor('link'),\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefault,\n androidSwitchThumbColor: undefined,\n conversationActionsBackground: tokens.colorNeutral100White,\n testColor: 'hotpink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimary,\n statusInfoText: tokens.textColorStatusInfo,\n statusInfoBorder: tokens.borderColorStatusInfo,\n statusInfoFill: tokens.fillColorStatusInfoSolid,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimary,\n statusSuccessText: tokens.textColorStatusSuccess,\n statusSuccessBorder: tokens.borderColorStatusSuccess,\n statusSuccessFill: tokens.fillColorStatusSuccessSolid,\n statusWarningIcon: tokens.iconColorStatusWarningPrimary,\n statusWarningText: tokens.textColorStatusWarning,\n statusWarningBorder: tokens.borderColorStatusWarning,\n statusWarningFill: tokens.fillColorStatusWarningSolid,\n statusErrorIcon: tokens.iconColorStatusErrorPrimary,\n statusErrorText: tokens.textColorStatusError,\n statusErrorBorder: tokens.borderColorStatusError,\n statusErrorFill: tokens.fillColorStatusErrorSolid,\n statusInfoComposedIcon: tokens.iconColorStatusInfoPrimary,\n statusInfoComposedText: tokens.textColorStatusInfo,\n statusInfoComposedBackground: tokens.fillColorStatusInfoGhost,\n statusSuccessComposedIcon: tokens.iconColorStatusSuccessPrimary,\n statusSuccessComposedText: tokens.textColorStatusSuccess,\n statusSuccessComposedBackground: tokens.fillColorStatusSuccessGhost,\n statusWarningComposedIcon: tokens.iconColorStatusWarningPrimary,\n statusWarningComposedText: tokens.textColorStatusWarning,\n statusWarningComposedBackground: tokens.fillColorStatusWarningGhost,\n statusErrorComposedIcon: tokens.iconColorStatusErrorPrimary,\n statusErrorComposedText: tokens.textColorStatusError,\n statusErrorComposedBackground: tokens.fillColorStatusErrorGhost,\n statusNeutralComposedIcon: tokens.iconColorStatusNeutralPrimary,\n statusNeutralComposedText: tokens.textColorStatusNeutral,\n statusNeutralComposedBackground: tokens.fillColorStatusNeutralGhost,\n}\n\nconst colorsChatDark: ChatColors = {\n name: 'dark',\n androidModalHeaderButtonTextColor: tokens.fillColorInteractionDefaultDark,\n iOSModalHeaderButtonTextColor: PlatformColor('link'),\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefaultDark,\n androidSwitchThumbColor: undefined,\n conversationActionsBackground: tokens.colorNeutral7,\n testColor: 'pink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimaryDark,\n statusInfoText: tokens.textColorStatusInfoDark,\n statusInfoBorder: tokens.borderColorStatusInfoDark,\n statusInfoFill: tokens.fillColorStatusInfoSolidDark,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimaryDark,\n statusSuccessText: tokens.textColorStatusSuccessDark,\n statusSuccessBorder: tokens.borderColorStatusSuccessDark,\n statusSuccessFill: tokens.fillColorStatusSuccessSolidDark,\n statusWarningIcon: tokens.iconColorStatusWarningPrimaryDark,\n statusWarningText: tokens.textColorStatusWarningDark,\n statusWarningBorder: tokens.borderColorStatusWarningDark,\n statusWarningFill: tokens.fillColorStatusWarningSolidDark,\n statusErrorIcon: tokens.iconColorStatusErrorPrimaryDark,\n statusErrorText: tokens.textColorStatusErrorDark,\n statusErrorBorder: tokens.borderColorStatusErrorDark,\n statusErrorFill: tokens.fillColorStatusErrorSolidDark,\n\n // Note: CCA inverts composed status colors in dark mode\n statusInfoComposedIcon: tokens.iconColorStatusInfoPrimaryDark,\n statusInfoComposedText: tokens.textColorStatusInfoDark,\n statusInfoComposedBackground: tokens.fillColorStatusInfoGhostDark,\n statusSuccessComposedIcon: tokens.iconColorStatusSuccessPrimaryDark,\n statusSuccessComposedText: tokens.textColorStatusSuccessDark,\n statusSuccessComposedBackground: tokens.fillColorStatusSuccessGhostDark,\n statusWarningComposedIcon: tokens.iconColorStatusWarningPrimaryDark,\n statusWarningComposedText: tokens.textColorStatusWarningDark,\n statusWarningComposedBackground: tokens.fillColorStatusWarningGhostDark,\n statusErrorComposedIcon: tokens.iconColorStatusErrorPrimaryDark,\n statusErrorComposedText: tokens.textColorStatusErrorDark,\n statusErrorComposedBackground: tokens.fillColorStatusErrorGhostDark,\n statusNeutralComposedIcon: tokens.iconColorStatusNeutralPrimaryDark,\n statusNeutralComposedText: tokens.textColorStatusNeutralDark,\n statusNeutralComposedBackground: tokens.fillColorStatusNeutralGhostDark,\n}\n\nconst chatThemeColorMap = {\n light: colorsChatLight,\n dark: colorsChatDark,\n}\n"]}
|
package/build/utils/uri.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/utils/uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,KAAK,KAAK,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAC9C,qBAAa,GAAG;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAmB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAA;gBAEA,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;IAMtF,IAAI,MAAM,WAET;IAED,IAAI,IAAI,WAEP;IAED,IAAI,SAAS,0CAOZ;IAED,IAAI,MAAM,IAAI,KAAK,GAAG,sBAAsB,GAAG,cAAc,CAM5D;IAED,IAAI,GAAG,mBAON;IAED,IAAI,cAAc,YAEjB;IAED,IAAI,GAAG,4BAEN;IAED,IAAI,OAAO,WAEV;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,OAAO;;;MAKV;IAED,MAAM,
|
|
1
|
+
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/utils/uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,KAAK,KAAK,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAC9C,qBAAa,GAAG;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAmB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAA;gBAEA,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;IAMtF,IAAI,MAAM,WAET;IAED,IAAI,IAAI,WAEP;IAED,IAAI,SAAS,0CAOZ;IAED,IAAI,MAAM,IAAI,KAAK,GAAG,sBAAsB,GAAG,cAAc,CAM5D;IAED,IAAI,GAAG,mBAON;IAED,IAAI,cAAc,YAEjB;IAED,IAAI,GAAG,4BAEN;IAED,IAAI,OAAO,WAEV;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,OAAO;;;MAKV;IAED,MAAM,GAAI,MAAM,MAAM,YAIrB;IAED,GAAG,GAAI,MAAM,MAAM,YAIlB;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "3.33.
|
|
3
|
+
"version": "3.33.1-rc.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -46,24 +46,24 @@
|
|
|
46
46
|
"react-native-device-info": "*",
|
|
47
47
|
"react-native-gesture-handler": "*",
|
|
48
48
|
"react-native-linear-gradient": "^2.8.3",
|
|
49
|
-
"react-native-reanimated": "
|
|
49
|
+
"react-native-reanimated": ">=3.0.0",
|
|
50
50
|
"react-native-safe-area-context": ">=4.0.0",
|
|
51
51
|
"react-native-svg": "*"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@react-native/eslint-config": "
|
|
54
|
+
"@react-native/eslint-config": "~0.83.0",
|
|
55
55
|
"@testing-library/react-hooks": "^8.0.1",
|
|
56
56
|
"@types/jest": "^29.5.14",
|
|
57
57
|
"@typescript-eslint/parser": "^8.32.0",
|
|
58
58
|
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
59
|
-
"expo-module-scripts": "^
|
|
59
|
+
"expo-module-scripts": "^55.0.0",
|
|
60
60
|
"fast-text-encoding": "^1.0.6",
|
|
61
61
|
"jest": "^29.7.0",
|
|
62
62
|
"jest-fetch-mock": "^3.0.3",
|
|
63
63
|
"msw": "^2.7.3",
|
|
64
64
|
"prettier": "^3.4.2",
|
|
65
65
|
"react-native-url-polyfill": "^2.0.0",
|
|
66
|
-
"typescript": "
|
|
66
|
+
"typescript": "~5.9.2"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "4a0f71ee558823b4f9cd414d33683e99b4ea9e94"
|
|
69
69
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defaultTheme } from '../../utils/theme'
|
|
2
|
+
import { aliasTokensColorMap } from '../../vendor/tapestry/alias_tokens_color_map'
|
|
3
|
+
|
|
4
|
+
describe('defaultTheme', () => {
|
|
5
|
+
test('returns the dark color palette when colorScheme is "dark"', () => {
|
|
6
|
+
expect(defaultTheme('dark').colors).toMatchObject(aliasTokensColorMap.dark)
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test('returns the light color palette when colorScheme is "light"', () => {
|
|
10
|
+
expect(defaultTheme('light').colors).toMatchObject(aliasTokensColorMap.light)
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
test('falls back to the light palette when colorScheme is null', () => {
|
|
14
|
+
expect(defaultTheme(null).colors).toMatchObject(aliasTokensColorMap.light)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
test('falls back to the light palette for React Native 0.83\'s "unspecified" variant', () => {
|
|
18
|
+
// RN 0.83 added "unspecified" to ColorSchemeName. Anything that is not
|
|
19
|
+
// literally "dark" should fall through to the light palette so we never
|
|
20
|
+
// render an unstyled or misthemed UI.
|
|
21
|
+
expect(defaultTheme('unspecified').colors).toMatchObject(aliasTokensColorMap.light)
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -27,8 +27,6 @@ export const JumpToBottomButton = ({ onPress, visible }: JumpToBottomButtonProps
|
|
|
27
27
|
damping: 16,
|
|
28
28
|
stiffness: 170,
|
|
29
29
|
overshootClamping: false,
|
|
30
|
-
restDisplacementThreshold: 0.2,
|
|
31
|
-
restSpeedThreshold: 2,
|
|
32
30
|
reduceMotion: ReduceMotion.System,
|
|
33
31
|
})
|
|
34
32
|
}, [visible, progress])
|
|
@@ -13,13 +13,7 @@ import { useStatusColorAppearanceMap, type StatusAppearanceUnion } from './utils
|
|
|
13
13
|
// ====== Constants ================
|
|
14
14
|
// =================================
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
default: 'default',
|
|
18
|
-
meta: 'meta',
|
|
19
|
-
metaSubtle: 'metaSubtle',
|
|
20
|
-
} as const
|
|
21
|
-
|
|
22
|
-
type VariantUnion = (typeof VARIANTS)[keyof typeof VARIANTS]
|
|
16
|
+
type VariantUnion = 'default' | 'meta' | 'metaSubtle'
|
|
23
17
|
|
|
24
18
|
type VariantStyles = Record<
|
|
25
19
|
VariantUnion,
|
|
@@ -32,12 +32,7 @@ type SizeStyle = Record<
|
|
|
32
32
|
}
|
|
33
33
|
>
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
fill: 'fill',
|
|
37
|
-
outline: 'outline',
|
|
38
|
-
} as const
|
|
39
|
-
|
|
40
|
-
type VariantUnion = (typeof VARIANTS)[keyof typeof VARIANTS]
|
|
35
|
+
type VariantUnion = 'fill' | 'outline'
|
|
41
36
|
type VariantColors = Record<
|
|
42
37
|
VariantUnion,
|
|
43
38
|
{
|
|
@@ -5,11 +5,7 @@ import { Icon } from './icon'
|
|
|
5
5
|
import { IconButton } from './icon_button'
|
|
6
6
|
import { Image } from './image'
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
sm: 'sm',
|
|
10
|
-
md: 'md',
|
|
11
|
-
} as const
|
|
12
|
-
type ImageSizeUnion = (typeof SIZES)[keyof typeof SIZES]
|
|
8
|
+
type ImageSizeUnion = 'sm' | 'md'
|
|
13
9
|
|
|
14
10
|
interface ImageAttachmentPreviewProps {
|
|
15
11
|
fileName: string
|
|
@@ -178,7 +178,7 @@ export function SessionContextProvider({
|
|
|
178
178
|
const updatedManager = SessionManager.hydrate(managerString)
|
|
179
179
|
try {
|
|
180
180
|
updatedManager.switchSession(sessionId)
|
|
181
|
-
} catch (
|
|
181
|
+
} catch (_error) {
|
|
182
182
|
Alert.alert('Error', 'Session is not authenticated')
|
|
183
183
|
}
|
|
184
184
|
await setManagerString(updatedManager.toString())
|
|
@@ -38,7 +38,12 @@ function sendEvents(events: AnalyticsEvent[], config: ProductAnalyticsConfig): P
|
|
|
38
38
|
body: payload,
|
|
39
39
|
})
|
|
40
40
|
})
|
|
41
|
-
)
|
|
41
|
+
).catch(error => {
|
|
42
|
+
if (__DEV__) {
|
|
43
|
+
console.warn('Product Analytics request failed:', error)
|
|
44
|
+
}
|
|
45
|
+
return [] as Response[]
|
|
46
|
+
})
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
const useProductAnalytics = () => {
|
|
@@ -27,7 +27,6 @@ export function ConversationNotificationLevelSelectScreen({
|
|
|
27
27
|
const { data: conversation } = useConversation({ conversation_id })
|
|
28
28
|
const { mutate: updateNotificationLevel } = useConversationMembershipUpdate({ conversation_id })
|
|
29
29
|
|
|
30
|
-
const notificationLevel = conversation.conversationMembership?.notificationLevel
|
|
31
30
|
const notificationLevelOptions =
|
|
32
31
|
conversation.conversationMembership?.notificationLevelOptions ?? []
|
|
33
32
|
|
|
@@ -36,7 +35,7 @@ export function ConversationNotificationLevelSelectScreen({
|
|
|
36
35
|
const muted = value === 'nothing'
|
|
37
36
|
updateNotificationLevel({
|
|
38
37
|
muted,
|
|
39
|
-
notificationLevel: value
|
|
38
|
+
notificationLevel: value,
|
|
40
39
|
})
|
|
41
40
|
}
|
|
42
41
|
navigation.goBack()
|
package/src/utils/session.ts
CHANGED