@planningcenter/chat-react-native 3.1.0-rc.9 → 3.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.d.ts +9 -0
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -0
- package/build/components/conversation/attachments/attachment_card.js +35 -0
- package/build/components/conversation/attachments/attachment_card.js.map +1 -0
- package/build/components/conversation/attachments/audio_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/audio_attachment.js +84 -0
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -0
- package/build/components/conversation/attachments/constants.d.ts +3 -0
- package/build/components/conversation/attachments/constants.d.ts.map +1 -0
- package/build/components/conversation/attachments/constants.js +4 -0
- package/build/components/conversation/attachments/constants.js.map +1 -0
- package/build/components/conversation/attachments/download_attachment_button.d.ts +9 -0
- package/build/components/conversation/attachments/download_attachment_button.d.ts.map +1 -0
- package/build/components/conversation/attachments/download_attachment_button.js +29 -0
- package/build/components/conversation/attachments/download_attachment_button.js.map +1 -0
- package/build/components/conversation/attachments/expanded_link.d.ts +5 -0
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -0
- package/build/components/conversation/attachments/expanded_link.js +44 -0
- package/build/components/conversation/attachments/expanded_link.js.map +1 -0
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +7 -0
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/generic_file_attachment.js +63 -0
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/giphy_attachment.js +42 -0
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -0
- package/build/components/conversation/attachments/image_attachment.d.ts +5 -0
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/image_attachment.js +24 -0
- package/build/components/conversation/attachments/image_attachment.js.map +1 -0
- package/build/components/conversation/attachments/video_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/video_attachment.js +64 -0
- package/build/components/conversation/attachments/video_attachment.js.map +1 -0
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +13 -7
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +6 -0
- package/build/components/conversation/message_attachments.d.ts.map +1 -0
- package/build/components/conversation/message_attachments.js +52 -0
- package/build/components/conversation/message_attachments.js.map +1 -0
- package/build/components/conversation/message_markdown.d.ts +7 -0
- package/build/components/conversation/message_markdown.d.ts.map +1 -0
- package/build/components/conversation/message_markdown.js +38 -0
- package/build/components/conversation/message_markdown.js.map +1 -0
- package/build/components/conversations/conversation_preview.d.ts +9 -0
- package/build/components/conversations/conversation_preview.d.ts.map +1 -0
- package/build/components/conversations/conversation_preview.js +58 -0
- package/build/components/conversations/conversation_preview.js.map +1 -0
- package/build/components/conversations/conversations.d.ts +8 -0
- package/build/components/conversations/conversations.d.ts.map +1 -0
- package/build/components/conversations/conversations.js +40 -0
- package/build/components/conversations/conversations.js.map +1 -0
- package/build/components/conversations/unread_count_badge.d.ts +5 -0
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -0
- package/build/components/conversations/unread_count_badge.js +33 -0
- package/build/components/conversations/unread_count_badge.js.map +1 -0
- package/build/components/display/badge.d.ts +9 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +22 -10
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/button.d.ts +1 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.js +2 -2
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +10 -8
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/text.js +2 -8
- package/build/components/display/text.js.map +1 -1
- package/build/components/index.d.ts +1 -1
- package/build/components/index.d.ts.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/hooks/use_api.d.ts +6 -4
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +5 -2
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts +1 -2
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_conversation.d.ts +76 -0
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +47 -3
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_conversations.d.ts +2 -3
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +3 -29
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_groups.d.ts +214 -0
- package/build/hooks/use_groups.d.ts.map +1 -0
- package/build/hooks/use_groups.js +22 -0
- package/build/hooks/use_groups.js.map +1 -0
- package/build/hooks/use_groups_groups.d.ts +208 -0
- package/build/hooks/use_groups_groups.d.ts.map +1 -0
- package/build/hooks/use_groups_groups.js +18 -0
- package/build/hooks/use_groups_groups.js.map +1 -0
- package/build/hooks/use_services_team.d.ts +4 -0
- package/build/hooks/use_services_team.d.ts.map +1 -0
- package/build/hooks/use_services_team.js +22 -0
- package/build/hooks/use_services_team.js.map +1 -0
- package/build/hooks/use_suspense_api.d.ts +2 -1
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +2 -1
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +208 -0
- package/build/hooks/use_teams.d.ts.map +1 -0
- package/build/hooks/use_teams.js +22 -0
- package/build/hooks/use_teams.js.map +1 -0
- package/build/navigation/index.d.ts +4 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +5 -0
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +139 -59
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +3 -0
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/components/conversation_filters.js +173 -0
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -0
- package/build/screens/conversation_filters/components/rows.d.ts +31 -0
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -0
- package/build/screens/conversation_filters/components/rows.js +111 -0
- package/build/screens/conversation_filters/components/rows.js.map +1 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +23 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.js +51 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -0
- package/build/screens/conversation_filters/filter_types.d.ts +7 -0
- package/build/screens/conversation_filters/filter_types.d.ts.map +1 -0
- package/build/screens/conversation_filters/filter_types.js +8 -0
- package/build/screens/conversation_filters/filter_types.js.map +1 -0
- package/build/screens/conversation_filters/group_filters.d.ts +6 -0
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/group_filters.js +15 -0
- package/build/screens/conversation_filters/group_filters.js.map +1 -0
- package/build/screens/conversation_filters/hooks/filters.d.ts +415 -0
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/hooks/filters.js +41 -0
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -0
- package/build/screens/conversation_filters/screen_props.d.ts +13 -0
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -0
- package/build/screens/conversation_filters/screen_props.js +2 -0
- package/build/screens/conversation_filters/screen_props.js.map +1 -0
- package/build/screens/conversation_filters/team_filters.d.ts +6 -0
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/team_filters.js +15 -0
- package/build/screens/conversation_filters/team_filters.js.map +1 -0
- package/build/screens/conversation_filters_screen.d.ts +6 -0
- package/build/screens/conversation_filters_screen.d.ts.map +1 -0
- package/build/screens/conversation_filters_screen.js +125 -0
- package/build/screens/conversation_filters_screen.js.map +1 -0
- package/build/screens/conversation_screen.js +10 -4
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversations_screen.d.ts +4 -2
- package/build/screens/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations_screen.js +139 -11
- package/build/screens/conversations_screen.js.map +1 -1
- package/build/screens/create/conversation_select_recipients_screen.d.ts.map +1 -1
- package/build/screens/create/conversation_select_recipients_screen.js +3 -11
- package/build/screens/create/conversation_select_recipients_screen.js.map +1 -1
- package/build/types/resources/group_resource.d.ts +4 -2
- package/build/types/resources/group_resource.d.ts.map +1 -1
- package/build/types/resources/group_resource.js.map +1 -1
- package/build/types/resources/index.d.ts +1 -0
- package/build/types/resources/index.d.ts.map +1 -1
- package/build/types/resources/index.js +1 -0
- package/build/types/resources/index.js.map +1 -1
- package/build/types/resources/member_ability.d.ts +1 -0
- package/build/types/resources/member_ability.d.ts.map +1 -1
- package/build/types/resources/member_ability.js.map +1 -1
- package/build/types/resources/services/index.d.ts +2 -0
- package/build/types/resources/services/index.d.ts.map +1 -0
- package/build/types/resources/services/index.js +2 -0
- package/build/types/resources/services/index.js.map +1 -0
- package/build/types/resources/services/team_resource.d.ts +48 -0
- package/build/types/resources/services/team_resource.d.ts.map +1 -0
- package/build/types/resources/services/team_resource.js +7 -0
- package/build/types/resources/services/team_resource.js.map +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/native_adapters/audio.d.ts +13 -0
- package/build/utils/native_adapters/audio.d.ts.map +1 -0
- package/build/utils/native_adapters/audio.js +7 -0
- package/build/utils/native_adapters/audio.js.map +1 -0
- package/build/utils/native_adapters/configuration.d.ts +7 -1
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +17 -1
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/native_adapters/index.d.ts +2 -0
- package/build/utils/native_adapters/index.d.ts.map +1 -1
- package/build/utils/native_adapters/index.js +2 -0
- package/build/utils/native_adapters/index.js.map +1 -1
- package/build/utils/native_adapters/video.d.ts +25 -0
- package/build/utils/native_adapters/video.d.ts.map +1 -0
- package/build/utils/native_adapters/video.js +7 -0
- package/build/utils/native_adapters/video.js.map +1 -0
- package/build/utils/parse_simple_markdown.d.ts +7 -0
- package/build/utils/parse_simple_markdown.d.ts.map +1 -0
- package/build/utils/parse_simple_markdown.js +32 -0
- package/build/utils/parse_simple_markdown.js.map +1 -0
- package/build/utils/pluralize.d.ts +2 -0
- package/build/utils/pluralize.d.ts.map +1 -0
- package/build/utils/pluralize.js +10 -0
- package/build/utils/pluralize.js.map +1 -0
- package/build/utils/request/conversation.d.ts +10 -0
- package/build/utils/request/conversation.d.ts.map +1 -0
- package/build/utils/request/conversation.js +32 -0
- package/build/utils/request/conversation.js.map +1 -0
- package/build/utils/request/messages.d.ts +15 -0
- package/build/utils/request/messages.d.ts.map +1 -0
- package/build/utils/request/messages.js +22 -0
- package/build/utils/request/messages.js.map +1 -0
- package/build/utils/theme.d.ts +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/package.json +2 -2
- package/src/__tests__/utils/parse_simple_markdown.ts +93 -0
- package/src/__tests__/utils/pluralize.tsx +17 -0
- package/src/components/conversation/attachments/attachment_card.tsx +46 -0
- package/src/components/conversation/attachments/audio_attachment.tsx +102 -0
- package/src/components/conversation/attachments/constants.ts +5 -0
- package/src/components/conversation/attachments/download_attachment_button.tsx +46 -0
- package/src/components/conversation/attachments/expanded_link.tsx +54 -0
- package/src/components/conversation/attachments/generic_file_attachment.tsx +75 -0
- package/src/components/conversation/attachments/giphy_attachment.tsx +56 -0
- package/src/components/conversation/attachments/image_attachment.tsx +31 -0
- package/src/components/conversation/attachments/video_attachment.tsx +92 -0
- package/src/components/conversation/message.tsx +15 -6
- package/src/components/conversation/message_attachments.tsx +61 -0
- package/src/components/conversation/message_markdown.tsx +52 -0
- package/src/components/conversations/conversation_preview.tsx +84 -0
- package/src/components/conversations/conversations.tsx +79 -0
- package/src/components/conversations/unread_count_badge.tsx +38 -0
- package/src/components/display/badge.tsx +41 -10
- package/src/components/display/button.tsx +1 -1
- package/src/components/display/child_notice.tsx +2 -2
- package/src/components/display/icon.tsx +10 -8
- package/src/components/display/text.tsx +1 -7
- package/src/components/index.tsx +1 -1
- package/src/hooks/use_api.ts +11 -10
- package/src/hooks/use_api_client.ts +1 -1
- package/src/hooks/use_conversation.ts +51 -3
- package/src/hooks/use_conversation_jolt_events.ts +1 -1
- package/src/hooks/use_conversation_messages_jolt_events.ts +1 -1
- package/src/hooks/use_conversations.ts +3 -31
- package/src/hooks/use_groups.ts +31 -0
- package/src/hooks/use_groups_groups.ts +20 -0
- package/src/hooks/use_services_team.ts +30 -0
- package/src/hooks/use_suspense_api.ts +4 -4
- package/src/hooks/use_teams.ts +25 -0
- package/src/navigation/index.tsx +8 -0
- package/src/screens/conversation_details_screen.tsx +224 -111
- package/src/screens/conversation_filters/components/conversation_filters.tsx +233 -0
- package/src/screens/conversation_filters/components/rows.tsx +164 -0
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +65 -0
- package/src/screens/conversation_filters/filter_types.ts +6 -0
- package/src/screens/conversation_filters/group_filters.tsx +31 -0
- package/src/screens/conversation_filters/hooks/filters.ts +68 -0
- package/src/screens/conversation_filters/screen_props.ts +15 -0
- package/src/screens/conversation_filters/team_filters.tsx +31 -0
- package/src/screens/conversation_filters_screen.tsx +152 -0
- package/src/screens/conversation_screen.tsx +16 -4
- package/src/screens/conversations_screen.tsx +210 -13
- package/src/screens/create/conversation_select_recipients_screen.tsx +3 -11
- package/src/types/resources/group_resource.ts +5 -2
- package/src/types/resources/index.ts +1 -0
- package/src/types/resources/member_ability.ts +1 -0
- package/src/types/resources/services/index.ts +1 -0
- package/src/types/resources/services/team_resource.ts +60 -0
- package/src/utils/client/types.d.ts +2 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/native_adapters/audio.ts +15 -0
- package/src/utils/native_adapters/configuration.ts +24 -1
- package/src/utils/native_adapters/index.ts +2 -0
- package/src/utils/native_adapters/video.ts +30 -0
- package/src/utils/parse_simple_markdown.ts +40 -0
- package/src/utils/pluralize.ts +11 -0
- package/src/utils/request/conversation.ts +46 -0
- package/src/utils/request/messages.ts +21 -0
- package/src/utils/theme.ts +2 -2
- package/build/components/conversations.d.ts +0 -3
- package/build/components/conversations.d.ts.map +0 -1
- package/build/components/conversations.js +0 -100
- package/build/components/conversations.js.map +0 -1
- package/src/components/conversations.tsx +0 -144
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ResourceObject } from '../../api_primitives';
|
|
2
|
+
interface ServicesChatResource extends ResourceObject {
|
|
3
|
+
type: 'Chat';
|
|
4
|
+
}
|
|
5
|
+
export interface TeamResource extends ServicesChatResource {
|
|
6
|
+
teamsILead: TeamResponseItem[];
|
|
7
|
+
}
|
|
8
|
+
export interface TeamResponseItem {
|
|
9
|
+
name: string;
|
|
10
|
+
value: {
|
|
11
|
+
teamId: number;
|
|
12
|
+
serviceTypeId: number;
|
|
13
|
+
};
|
|
14
|
+
serviceTypeName: string;
|
|
15
|
+
teamName: string;
|
|
16
|
+
order: [number, string, string];
|
|
17
|
+
}
|
|
18
|
+
export interface TeamOptionResource extends ServicesChatResource {
|
|
19
|
+
teams: TeamOptionResponseItem[];
|
|
20
|
+
}
|
|
21
|
+
export interface TeamOptionResponseItem extends TeamResponseItem {
|
|
22
|
+
group: TeamOptionResponseItemGroupName;
|
|
23
|
+
}
|
|
24
|
+
export type TeamOptionResponseItemGroupName = 'teams_i_lead' | 'other_teams';
|
|
25
|
+
export interface PlansResource extends ServicesChatResource {
|
|
26
|
+
plans: PlansResponseItem[];
|
|
27
|
+
}
|
|
28
|
+
interface PlansResponseItem {
|
|
29
|
+
value: number;
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
32
|
+
export interface TeamPeopleResource extends ServicesChatResource {
|
|
33
|
+
people: PersonResponseItem[];
|
|
34
|
+
}
|
|
35
|
+
interface PersonResponseItem {
|
|
36
|
+
id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
avatar: string;
|
|
39
|
+
badges: {
|
|
40
|
+
title: string;
|
|
41
|
+
}[];
|
|
42
|
+
child: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface ServicesChatPayloadResource extends ServicesChatResource {
|
|
45
|
+
payload: string;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=team_resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/services/team_resource.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,UAAU,oBAAqB,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,YAAa,SAAQ,oBAAoB;IACxD,UAAU,EAAE,gBAAgB,EAAE,CAAA;CAC/B;AACD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,KAAK,EAAE,sBAAsB,EAAE,CAAA;CAChC;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D,KAAK,EAAE,+BAA+B,CAAA;CACvC;AAED,MAAM,MAAM,+BAA+B,GAAG,cAAc,GAAG,aAAa,CAAA;AAE5E,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,KAAK,EAAE,iBAAiB,EAAE,CAAA;CAC3B;AAED,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,MAAM,EAAE,kBAAkB,EAAE,CAAA;CAC7B;AAED,UAAU,kBAAkB;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC3B,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// All of our calls out to services go out to /chat, which isn't a typical pco-api vertex.
|
|
2
|
+
// They all have a shared type of 'Chat' which has the following array attributes:
|
|
3
|
+
// group_identifiers, people, plans, teams and, teams_i_lead.
|
|
4
|
+
// All of these have a type array, are only rendered on request, and are exclusively used for this form.
|
|
5
|
+
// There is also a payload which is a string, and is used to create a conversation in chat.
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=team_resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/services/team_resource.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,kFAAkF;AAClF,6DAA6D;AAC7D,wGAAwG;AACxG,2FAA2F","sourcesContent":["// All of our calls out to services go out to /chat, which isn't a typical pco-api vertex.\n// They all have a shared type of 'Chat' which has the following array attributes:\n// group_identifiers, people, plans, teams and, teams_i_lead.\n// All of these have a type array, are only rendered on request, and are exclusively used for this form.\n// There is also a payload which is a string, and is used to create a conversation in chat.\n\nimport { ResourceObject } from '../../api_primitives'\n\ninterface ServicesChatResource extends ResourceObject {\n type: 'Chat'\n}\n\nexport interface TeamResource extends ServicesChatResource {\n teamsILead: TeamResponseItem[]\n}\nexport interface TeamResponseItem {\n name: string\n value: {\n teamId: number\n serviceTypeId: number\n }\n serviceTypeName: string\n teamName: string\n order: [number, string, string] // [serviceTypeId, serviceTypeName, teamName]\n}\n\nexport interface TeamOptionResource extends ServicesChatResource {\n teams: TeamOptionResponseItem[]\n}\n\nexport interface TeamOptionResponseItem extends TeamResponseItem {\n group: TeamOptionResponseItemGroupName\n}\n\nexport type TeamOptionResponseItemGroupName = 'teams_i_lead' | 'other_teams'\n\nexport interface PlansResource extends ServicesChatResource {\n plans: PlansResponseItem[]\n}\n\ninterface PlansResponseItem {\n value: number\n name: string\n}\n\nexport interface TeamPeopleResource extends ServicesChatResource {\n people: PersonResponseItem[]\n}\n\ninterface PersonResponseItem {\n id: number\n name: string\n avatar: string\n badges: { title: string }[]\n child: boolean\n}\n\nexport interface ServicesChatPayloadResource extends ServicesChatResource {\n payload: string\n}\n"]}
|
package/build/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
|
package/build/utils/index.js
CHANGED
package/build/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA","sourcesContent":["export * from './session'\nexport * from './theme'\nexport * from './styles'\nexport * from './space'\nexport * from './client'\nexport * from './uri'\nexport * from './cache'\nexport * from './native_adapters'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA","sourcesContent":["export * from './session'\nexport * from './theme'\nexport * from './styles'\nexport * from './space'\nexport * from './client'\nexport * from './uri'\nexport * from './cache'\nexport * from './native_adapters'\nexport * from './pluralize'\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Audio {
|
|
2
|
+
play: () => void;
|
|
3
|
+
pause: () => void;
|
|
4
|
+
isPlaying: boolean;
|
|
5
|
+
duration: number;
|
|
6
|
+
position: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class AudioAdapter {
|
|
9
|
+
useAudio: (_: string) => Audio;
|
|
10
|
+
constructor(methods: AudioAdapter);
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=audio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/audio.ts"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,qBAAa,YAAY;IACvB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,KAAK,CAAA;gBAElB,OAAO,EAAE,YAAY;CAGlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/audio.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,YAAY;IACvB,QAAQ,CAAsB;IAE9B,YAAY,OAAqB;QAC/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAClC,CAAC;CACF","sourcesContent":["interface Audio {\n play: () => void\n pause: () => void\n isPlaying: boolean\n duration: number\n position: number\n}\n\nexport class AudioAdapter {\n useAudio: (_: string) => Audio\n\n constructor(methods: AudioAdapter) {\n this.useAudio = methods.useAudio\n }\n}\n"]}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import { AudioAdapter } from './audio';
|
|
1
2
|
import { ClipboardAdapter } from './clipboard';
|
|
3
|
+
import { VideoAdapter } from './video';
|
|
2
4
|
type ChatConfigurations = {
|
|
3
5
|
clipboard: ClipboardAdapter;
|
|
6
|
+
audio: AudioAdapter;
|
|
7
|
+
video: VideoAdapter;
|
|
4
8
|
};
|
|
5
9
|
export declare class ChatAdapters {
|
|
6
10
|
static configure(configurations: ChatConfigurations): void;
|
|
7
11
|
}
|
|
8
12
|
declare let Clipboard: ClipboardAdapter;
|
|
9
|
-
|
|
13
|
+
declare let Audio: AudioAdapter;
|
|
14
|
+
declare let Video: VideoAdapter;
|
|
15
|
+
export { Clipboard, Audio, Video };
|
|
10
16
|
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,qBAAa,YAAY;IACvB,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,kBAAkB;CAKpD;AAMD,QAAA,IAAI,SAAS,EAAE,gBAMb,CAAA;AAEF,QAAA,IAAI,KAAK,EAAE,YAKT,CAAA;AAEF,QAAA,IAAI,KAAK,EAAE,YAQT,CAAA;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { AudioAdapter } from './audio';
|
|
1
2
|
import { ClipboardAdapter } from './clipboard';
|
|
3
|
+
import { VideoAdapter } from './video';
|
|
2
4
|
export class ChatAdapters {
|
|
3
5
|
static configure(configurations) {
|
|
4
6
|
Clipboard = configurations.clipboard;
|
|
7
|
+
Audio = configurations.audio;
|
|
8
|
+
Video = configurations.video;
|
|
5
9
|
}
|
|
6
10
|
}
|
|
7
11
|
const methodMissing = () => {
|
|
@@ -14,5 +18,17 @@ let Clipboard = new ClipboardAdapter({
|
|
|
14
18
|
},
|
|
15
19
|
setStringAsync: async (_) => methodMissing(),
|
|
16
20
|
});
|
|
17
|
-
|
|
21
|
+
let Audio = new AudioAdapter({
|
|
22
|
+
useAudio: (_) => {
|
|
23
|
+
methodMissing();
|
|
24
|
+
return {};
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
let Video = new VideoAdapter({
|
|
28
|
+
Player: Object.assign(() => {
|
|
29
|
+
methodMissing();
|
|
30
|
+
return null;
|
|
31
|
+
}, { $$typeof: Symbol.for('react.forward_ref') }),
|
|
32
|
+
});
|
|
33
|
+
export { Clipboard, Audio, Video };
|
|
18
34
|
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAQtC,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,SAAS,CAAC,cAAkC;QACjD,SAAS,GAAG,cAAc,CAAC,SAAS,CAAA;QACpC,KAAK,GAAG,cAAc,CAAC,KAAK,CAAA;QAC5B,KAAK,GAAG,cAAc,CAAC,KAAK,CAAA;IAC9B,CAAC;CACF;AAED,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,OAAO,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAA;AACnF,CAAC,CAAA;AAED,IAAI,SAAS,GAAqB,IAAI,gBAAgB,CAAC;IACrD,cAAc,EAAE,KAAK,IAAI,EAAE;QACzB,aAAa,EAAE,CAAA;QACf,OAAO,EAAE,CAAA;IACX,CAAC;IACD,cAAc,EAAE,KAAK,EAAE,CAAS,EAAE,EAAE,CAAC,aAAa,EAAE;CACrD,CAAC,CAAA;AAEF,IAAI,KAAK,GAAiB,IAAI,YAAY,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAS,EAAE,EAAE;QACtB,aAAa,EAAE,CAAA;QACf,OAAO,EAAS,CAAA;IAClB,CAAC;CACF,CAAC,CAAA;AAEF,IAAI,KAAK,GAAiB,IAAI,YAAY,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,CACnB,GAAG,EAAE;QACH,aAAa,EAAE,CAAA;QACf,OAAO,IAAI,CAAA;IACb,CAAC,EACD,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAC9C;CACF,CAAC,CAAA;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA","sourcesContent":["import { AudioAdapter } from './audio'\nimport { ClipboardAdapter } from './clipboard'\nimport { VideoAdapter } from './video'\n\ntype ChatConfigurations = {\n clipboard: ClipboardAdapter\n audio: AudioAdapter\n video: VideoAdapter\n}\n\nexport class ChatAdapters {\n static configure(configurations: ChatConfigurations) {\n Clipboard = configurations.clipboard\n Audio = configurations.audio\n Video = configurations.video\n }\n}\n\nconst methodMissing = () => {\n console.warn('ChatAdapters.configure() must be called before using any adapters')\n}\n\nlet Clipboard: ClipboardAdapter = new ClipboardAdapter({\n getStringAsync: async () => {\n methodMissing()\n return ''\n },\n setStringAsync: async (_: string) => methodMissing(),\n})\n\nlet Audio: AudioAdapter = new AudioAdapter({\n useAudio: (_: string) => {\n methodMissing()\n return {} as any\n },\n})\n\nlet Video: VideoAdapter = new VideoAdapter({\n Player: Object.assign(\n () => {\n methodMissing()\n return null\n },\n { $$typeof: Symbol.for('react.forward_ref') }\n ),\n})\n\nexport { Clipboard, Audio, Video }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA","sourcesContent":["export * from './clipboard'\nexport * from './configuration'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA","sourcesContent":["export * from './clipboard'\nexport * from './configuration'\nexport * from './audio'\nexport * from './video'\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export interface VideoPlayerProps {
|
|
3
|
+
source: {
|
|
4
|
+
uri: string;
|
|
5
|
+
};
|
|
6
|
+
aspectRatio?: number;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
onFullscreenPlayerWillPresent?: () => void;
|
|
9
|
+
onFullscreenPlayerDidPresent?: () => void;
|
|
10
|
+
onFullscreenPlayerWillDismiss?: () => void;
|
|
11
|
+
onFullscreenPlayerDidDismiss?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface VideoPlayerHandle {
|
|
14
|
+
play: () => void;
|
|
15
|
+
pause: () => void;
|
|
16
|
+
presentFullscreenPlayer: () => void;
|
|
17
|
+
dismissFullscreen: () => void;
|
|
18
|
+
}
|
|
19
|
+
type VideoPlayer = React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<VideoPlayerHandle>>;
|
|
20
|
+
export declare class VideoAdapter {
|
|
21
|
+
Player: VideoPlayer;
|
|
22
|
+
constructor(methods: VideoAdapter);
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,6BAA6B,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1C,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAA;IACzC,6BAA6B,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1C,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,uBAAuB,EAAE,MAAM,IAAI,CAAA;IACnC,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED,KAAK,WAAW,GAAG,KAAK,CAAC,yBAAyB,CAChD,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAC1D,CAAA;AAED,qBAAa,YAAY;IACvB,MAAM,EAAE,WAAW,CAAA;gBAEP,OAAO,EAAE,YAAY;CAGlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/video.ts"],"names":[],"mappings":"AAuBA,MAAM,OAAO,YAAY;IACvB,MAAM,CAAa;IAEnB,YAAY,OAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC9B,CAAC;CACF","sourcesContent":["import { StyleProp, ViewStyle } from 'react-native'\n\nexport interface VideoPlayerProps {\n source: { uri: string }\n aspectRatio?: number\n style?: StyleProp<ViewStyle>\n onFullscreenPlayerWillPresent?: () => void\n onFullscreenPlayerDidPresent?: () => void\n onFullscreenPlayerWillDismiss?: () => void\n onFullscreenPlayerDidDismiss?: () => void\n}\n\nexport interface VideoPlayerHandle {\n play: () => void\n pause: () => void\n presentFullscreenPlayer: () => void\n dismissFullscreen: () => void\n}\n\ntype VideoPlayer = React.ForwardRefExoticComponent<\n VideoPlayerProps & React.RefAttributes<VideoPlayerHandle>\n>\n\nexport class VideoAdapter {\n Player: VideoPlayer\n\n constructor(methods: VideoAdapter) {\n this.Player = methods.Player\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse_simple_markdown.d.ts","sourceRoot":"","sources":["../../src/utils/parse_simple_markdown.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,gCAiC/B,CAAA;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;IACzC,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Supports bold, italic, and links
|
|
2
|
+
export const parseSimpleMarkdown = input => {
|
|
3
|
+
const parts = [];
|
|
4
|
+
const pattern = /(\*\*|__)(.+?)\1|(?<!\*)\*(.+?)\*|(?<!_)_(.+?)_|(https?:\/\/[^\s]+)/g;
|
|
5
|
+
let lastIndex = 0;
|
|
6
|
+
input.replace(pattern, (match, bold, boldText, italic1, italic2, url, offset) => {
|
|
7
|
+
if (offset > lastIndex) {
|
|
8
|
+
parts.push({ type: 'text', content: input.slice(lastIndex, offset) });
|
|
9
|
+
}
|
|
10
|
+
if (bold) {
|
|
11
|
+
parts.push({ type: 'bold', content: boldText });
|
|
12
|
+
}
|
|
13
|
+
else if (italic1 || italic2) {
|
|
14
|
+
parts.push({ type: 'italic', content: italic1 || italic2 });
|
|
15
|
+
}
|
|
16
|
+
else if (url) {
|
|
17
|
+
const urlMatch = url.match(/^(https?:\/\/[^\s]+)([.,;!?]+)$/);
|
|
18
|
+
const urlContent = urlMatch ? urlMatch[1] : url;
|
|
19
|
+
parts.push({ type: 'link', content: urlContent });
|
|
20
|
+
const punctuation = urlMatch ? urlMatch[2] : '';
|
|
21
|
+
if (punctuation) {
|
|
22
|
+
parts.push({ type: 'text', content: punctuation });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
lastIndex = offset + match.length;
|
|
26
|
+
});
|
|
27
|
+
if (lastIndex < input.length) {
|
|
28
|
+
parts.push({ type: 'text', content: input.slice(lastIndex) });
|
|
29
|
+
}
|
|
30
|
+
return parts;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=parse_simple_markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse_simple_markdown.js","sourceRoot":"","sources":["../../src/utils/parse_simple_markdown.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC,EAAE;IACzC,MAAM,KAAK,GAAmB,EAAE,CAAA;IAEhC,MAAM,OAAO,GAAG,sEAAsE,CAAA;IACtF,IAAI,SAAS,GAAG,CAAC,CAAA;IAEjB,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;QAC9E,IAAI,MAAM,GAAG,SAAS,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;QACvE,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;QACjD,CAAC;aAAM,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC,CAAA;QAC7D,CAAC;aAAM,IAAI,GAAG,EAAE,CAAC;YACf,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAA;YAC7D,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;YAC/C,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;YACjD,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;YAC/C,IAAI,WAAW,EAAE,CAAC;gBAChB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAA;YACpD,CAAC;QACH,CAAC;QAED,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["// Supports bold, italic, and links\nexport const parseSimpleMarkdown = input => {\n const parts: MarkdownPart[] = []\n\n const pattern = /(\\*\\*|__)(.+?)\\1|(?<!\\*)\\*(.+?)\\*|(?<!_)_(.+?)_|(https?:\\/\\/[^\\s]+)/g\n let lastIndex = 0\n\n input.replace(pattern, (match, bold, boldText, italic1, italic2, url, offset) => {\n if (offset > lastIndex) {\n parts.push({ type: 'text', content: input.slice(lastIndex, offset) })\n }\n\n if (bold) {\n parts.push({ type: 'bold', content: boldText })\n } else if (italic1 || italic2) {\n parts.push({ type: 'italic', content: italic1 || italic2 })\n } else if (url) {\n const urlMatch = url.match(/^(https?:\\/\\/[^\\s]+)([.,;!?]+)$/)\n const urlContent = urlMatch ? urlMatch[1] : url\n parts.push({ type: 'link', content: urlContent })\n const punctuation = urlMatch ? urlMatch[2] : ''\n if (punctuation) {\n parts.push({ type: 'text', content: punctuation })\n }\n }\n\n lastIndex = offset + match.length\n })\n\n if (lastIndex < input.length) {\n parts.push({ type: 'text', content: input.slice(lastIndex) })\n }\n\n return parts\n}\n\ninterface MarkdownPart {\n type: 'text' | 'bold' | 'italic' | 'link'\n content: string\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../../src/utils/pluralize.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,UAAO,UAQjF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const irregularInflections = { person: 'people' };
|
|
2
|
+
export function pluralize(count, singularWord, includeCount = true) {
|
|
3
|
+
const plural = count !== 1;
|
|
4
|
+
const pluralWord = irregularInflections[singularWord] || `${singularWord}s`;
|
|
5
|
+
return [
|
|
6
|
+
includeCount ? `${count.toLocaleString()} ` : '',
|
|
7
|
+
plural ? pluralWord : singularWord,
|
|
8
|
+
].join('');
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=pluralize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluralize.js","sourceRoot":"","sources":["../../src/utils/pluralize.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAA2B,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AAEzE,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,YAAoB,EAAE,YAAY,GAAG,IAAI;IAChF,MAAM,MAAM,GAAG,KAAK,KAAK,CAAC,CAAA;IAC1B,MAAM,UAAU,GAAG,oBAAoB,CAAC,YAAY,CAAC,IAAI,GAAG,YAAY,GAAG,CAAA;IAE3E,OAAO;QACL,YAAY,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;QAChD,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY;KACnC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACZ,CAAC","sourcesContent":["const irregularInflections: Record<string, string> = { person: 'people' }\n\nexport function pluralize(count: number, singularWord: string, includeCount = true) {\n const plural = count !== 1\n const pluralWord = irregularInflections[singularWord] || `${singularWord}s`\n\n return [\n includeCount ? `${count.toLocaleString()} ` : '',\n plural ? pluralWord : singularWord,\n ].join('')\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GetRequest } from '../client/types';
|
|
2
|
+
export interface ConversationRequestArgs {
|
|
3
|
+
filter: string;
|
|
4
|
+
gids: string;
|
|
5
|
+
group: string;
|
|
6
|
+
chat_group_graph_id?: string;
|
|
7
|
+
group_source_app_name?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getConversationsRequestArgs: ({ filter, gids, group, group_source_app_name, }?: Partial<ConversationRequestArgs>) => GetRequest;
|
|
10
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/utils/request/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED,eAAO,MAAM,2BAA2B,qDAKrC,OAAO,CAAC,uBAAuB,CAAC,KAAQ,UA8BzC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const getConversationsRequestArgs = ({ filter, gids, group, group_source_app_name, } = {}) => ({
|
|
2
|
+
url: '/me/conversations',
|
|
3
|
+
data: {
|
|
4
|
+
perPage: 20,
|
|
5
|
+
order: '-last_message',
|
|
6
|
+
filter,
|
|
7
|
+
group,
|
|
8
|
+
gids,
|
|
9
|
+
group_source_app_name,
|
|
10
|
+
fields: {
|
|
11
|
+
Conversation: [
|
|
12
|
+
'created_at',
|
|
13
|
+
'badges',
|
|
14
|
+
'groups',
|
|
15
|
+
'last_message_author_id',
|
|
16
|
+
'last_message_author_name',
|
|
17
|
+
'last_message_created_at',
|
|
18
|
+
'last_message_text_preview',
|
|
19
|
+
'preview_avatar_urls',
|
|
20
|
+
'member_ability',
|
|
21
|
+
'muted',
|
|
22
|
+
'replies_disabled',
|
|
23
|
+
'title',
|
|
24
|
+
'unread_count',
|
|
25
|
+
'updated_at',
|
|
26
|
+
],
|
|
27
|
+
ConversationBadge: ['app_name', 'pco_resource_type', 'text'],
|
|
28
|
+
},
|
|
29
|
+
include: ['badges'],
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=conversation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../../src/utils/request/conversation.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,MAAM,EACN,IAAI,EACJ,KAAK,EACL,qBAAqB,MACe,EAAE,EAAc,EAAE,CAAC,CAAC;IACxD,GAAG,EAAE,mBAAmB;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,eAAe;QACtB,MAAM;QACN,KAAK;QACL,IAAI;QACJ,qBAAqB;QACrB,MAAM,EAAE;YACN,YAAY,EAAE;gBACZ,YAAY;gBACZ,QAAQ;gBACR,QAAQ;gBACR,wBAAwB;gBACxB,0BAA0B;gBAC1B,yBAAyB;gBACzB,2BAA2B;gBAC3B,qBAAqB;gBACrB,gBAAgB;gBAChB,OAAO;gBACP,kBAAkB;gBAClB,OAAO;gBACP,cAAc;gBACd,YAAY;aACb;YACD,iBAAiB,EAAE,CAAC,UAAU,EAAE,mBAAmB,EAAE,MAAM,CAAC;SAC7D;QACD,OAAO,EAAE,CAAC,QAAQ,CAAC;KACpB;CACF,CAAC,CAAA","sourcesContent":["import { GetRequest } from '../client/types'\n\nexport interface ConversationRequestArgs {\n filter: string\n gids: string\n group: string\n chat_group_graph_id?: string\n group_source_app_name?: string\n}\n\nexport const getConversationsRequestArgs = ({\n filter,\n gids,\n group,\n group_source_app_name,\n}: Partial<ConversationRequestArgs> = {}): GetRequest => ({\n url: '/me/conversations',\n data: {\n perPage: 20,\n order: '-last_message',\n filter,\n group,\n gids,\n group_source_app_name,\n fields: {\n Conversation: [\n 'created_at',\n 'badges',\n 'groups',\n 'last_message_author_id',\n 'last_message_author_name',\n 'last_message_created_at',\n 'last_message_text_preview',\n 'preview_avatar_urls',\n 'member_ability',\n 'muted',\n 'replies_disabled',\n 'title',\n 'unread_count',\n 'updated_at',\n ],\n ConversationBadge: ['app_name', 'pco_resource_type', 'text'],\n },\n include: ['badges'],\n },\n})\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const getMessagesRequestArgs: ({ conversation_id }: {
|
|
2
|
+
conversation_id: number;
|
|
3
|
+
}) => {
|
|
4
|
+
url: string;
|
|
5
|
+
data: {
|
|
6
|
+
perPage: number;
|
|
7
|
+
fields: {
|
|
8
|
+
Message: string[];
|
|
9
|
+
Person: string[];
|
|
10
|
+
ReactionCount: string[];
|
|
11
|
+
};
|
|
12
|
+
include: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/utils/request/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,wBAAyB;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;CAoBrF,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const getMessagesRequestArgs = ({ conversation_id }) => ({
|
|
2
|
+
url: `/me/conversations/${conversation_id}/messages`,
|
|
3
|
+
data: {
|
|
4
|
+
perPage: 25,
|
|
5
|
+
fields: {
|
|
6
|
+
Message: [
|
|
7
|
+
'text',
|
|
8
|
+
'text_edited_at',
|
|
9
|
+
'mine',
|
|
10
|
+
'attachments',
|
|
11
|
+
'created_at',
|
|
12
|
+
'deleted_at',
|
|
13
|
+
'author',
|
|
14
|
+
'reaction_counts',
|
|
15
|
+
],
|
|
16
|
+
Person: ['name', 'avatar'],
|
|
17
|
+
ReactionCount: ['value', 'count', 'mine', 'message_id', 'author_ids'],
|
|
18
|
+
},
|
|
19
|
+
include: ['author', 'reaction_counts'],
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/utils/request/messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,eAAe,EAA+B,EAAE,EAAE,CAAC,CAAC;IAC3F,GAAG,EAAE,qBAAqB,eAAe,WAAW;IACpD,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE;QACX,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,MAAM;gBACN,gBAAgB;gBAChB,MAAM;gBACN,aAAa;gBACb,YAAY;gBACZ,YAAY;gBACZ,QAAQ;gBACR,iBAAiB;aAClB;YACD,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YAC1B,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC;SACtE;QACD,OAAO,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC;KACvC;CACF,CAAC,CAAA","sourcesContent":["export const getMessagesRequestArgs = ({ conversation_id }: { conversation_id: number }) => ({\n url: `/me/conversations/${conversation_id}/messages`,\n data: {\n perPage: 25,\n fields: {\n Message: [\n 'text',\n 'text_edited_at',\n 'mine',\n 'attachments',\n 'created_at',\n 'deleted_at',\n 'author',\n 'reaction_counts',\n ],\n Person: ['name', 'avatar'],\n ReactionCount: ['value', 'count', 'mine', 'message_id', 'author_ids'],\n },\n include: ['author', 'reaction_counts'],\n },\n})\n"]}
|
package/build/utils/theme.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface DefaultTheme {
|
|
|
22
22
|
button: {
|
|
23
23
|
borderRadius: number;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
showBadgeProductLogo: boolean;
|
|
26
26
|
}
|
|
27
27
|
export declare const defaultTheme: (colorScheme: ColorSchemeName) => ChatTheme;
|
|
28
28
|
export type TemporaryDefaultColorsType = Partial<ChatColors>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAE/E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,CAAC,OAAO,mBAAmB,CAAC,KAAK,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAA;CACvE;AAED;;;;;;;;;;;;;gDAagD;AAEhD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,UAAU,CAAA;IAClB,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAE/E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,CAAC,OAAO,mBAAmB,CAAC,KAAK,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAA;CACvE;AAED;;;;;;;;;;;;;gDAagD;AAEhD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,UAAU,CAAA;IAClB,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,oBAAoB,EAAE,OAAO,CAAA;CAC9B;AAED,eAAO,MAAM,YAAY,gBAAiB,eAAe,KAAG,SAe3D,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAE5D,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,sBAAsB,EAAE,MAAM,CAAA;CAC/B"}
|
package/build/utils/theme.js
CHANGED
|
@@ -11,7 +11,7 @@ export const defaultTheme = (colorScheme) => {
|
|
|
11
11
|
button: {
|
|
12
12
|
borderRadius: 40,
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
showBadgeProductLogo: true, // Overrides visibility of the product logo in `src/display/badge.tsx`
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
const colorsChatLight = {
|
package/build/utils/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AA8B/E,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,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AA8B/E,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+BD,MAAM,eAAe,GAAe;IAClC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,MAAM,CAAC,2BAA2B;IAC/C,eAAe,EAAE,SAAS;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,SAAS,EAAE,SAAS;IACpB,cAAc,EAAE,MAAM,CAAC,0BAA0B;IACjD,cAAc,EAAE,MAAM,CAAC,mBAAmB;IAC1C,oBAAoB,EAAE,MAAM,CAAC,wBAAwB;IACrD,iBAAiB,EAAE,MAAM,CAAC,6BAA6B;IACvD,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;IAChD,uBAAuB,EAAE,MAAM,CAAC,2BAA2B;IAC3D,iBAAiB,EAAE,MAAM,CAAC,6BAA6B;IACvD,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;IAChD,uBAAuB,EAAE,MAAM,CAAC,2BAA2B;IAC3D,eAAe,EAAE,MAAM,CAAC,2BAA2B;IACnD,eAAe,EAAE,MAAM,CAAC,oBAAoB;IAC5C,qBAAqB,EAAE,MAAM,CAAC,yBAAyB;IACvD,iBAAiB,EAAE,MAAM,CAAC,6BAA6B;IACvD,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;IAChD,uBAAuB,EAAE,MAAM,CAAC,2BAA2B;IAC3D,sBAAsB,EAAE,MAAM,CAAC,sBAAsB;CACtD,CAAA;AAED,MAAM,cAAc,GAAe;IACjC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,MAAM,CAAC,+BAA+B;IACnD,eAAe,EAAE,SAAS;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,MAAM,CAAC,8BAA8B;IACrD,cAAc,EAAE,MAAM,CAAC,uBAAuB;IAC9C,oBAAoB,EAAE,MAAM,CAAC,4BAA4B;IACzD,iBAAiB,EAAE,MAAM,CAAC,iCAAiC;IAC3D,iBAAiB,EAAE,MAAM,CAAC,0BAA0B;IACpD,uBAAuB,EAAE,MAAM,CAAC,+BAA+B;IAC/D,iBAAiB,EAAE,MAAM,CAAC,iCAAiC;IAC3D,iBAAiB,EAAE,MAAM,CAAC,0BAA0B;IACpD,uBAAuB,EAAE,MAAM,CAAC,+BAA+B;IAC/D,eAAe,EAAE,MAAM,CAAC,+BAA+B;IACvD,eAAe,EAAE,MAAM,CAAC,wBAAwB;IAChD,qBAAqB,EAAE,MAAM,CAAC,6BAA6B;IAC3D,iBAAiB,EAAE,MAAM,CAAC,iCAAiC;IAC3D,iBAAiB,EAAE,MAAM,CAAC,0BAA0B;IACpD,uBAAuB,EAAE,MAAM,CAAC,+BAA+B;IAC/D,sBAAsB,EAAE,MAAM,CAAC,0BAA0B;CAC1D,CAAA;AAED,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,cAAc;CACrB,CAAA","sourcesContent":["import { ColorSchemeName } from 'react-native'\nimport { tokens } from '../vendor/tapestry/tokens'\nimport { aliasTokensColorMap } from '../vendor/tapestry/alias_tokens_color_map'\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 switchTrackTrue: string | undefined\n switchTrackFalse: string | undefined\n switchThumbColor: string | undefined\n testColor: string\n statusInfoIcon: string\n statusInfoText: string\n statusInfoBackground: string\n statusSuccessIcon: string\n statusSuccessText: string\n statusSuccessBackground: string\n statusWarningIcon: string\n statusWarningText: string\n statusWarningBackground: string\n statusErrorIcon: string\n statusErrorText: string\n statusErrorBackground: string\n statusNeutralIcon: string\n statusNeutralText: string\n statusNeutralBackground: string\n borderColorStatusError: string\n}\n\nconst colorsChatLight: ChatColors = {\n name: 'light',\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefault,\n switchTrackTrue: undefined,\n switchTrackFalse: undefined,\n switchThumbColor: undefined,\n testColor: 'hotpink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimary,\n statusInfoText: tokens.textColorStatusInfo,\n statusInfoBackground: tokens.fillColorStatusInfoGhost,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimary,\n statusSuccessText: tokens.textColorStatusSuccess,\n statusSuccessBackground: tokens.fillColorStatusSuccessGhost,\n statusWarningIcon: tokens.iconColorStatusWarningPrimary,\n statusWarningText: tokens.textColorStatusWarning,\n statusWarningBackground: tokens.fillColorStatusWarningGhost,\n statusErrorIcon: tokens.iconColorStatusErrorPrimary,\n statusErrorText: tokens.textColorStatusError,\n statusErrorBackground: tokens.fillColorStatusErrorGhost,\n statusNeutralIcon: tokens.iconColorStatusNeutralPrimary,\n statusNeutralText: tokens.textColorStatusNeutral,\n statusNeutralBackground: tokens.fillColorStatusNeutralGhost,\n borderColorStatusError: tokens.borderColorStatusError,\n}\n\nconst colorsChatDark: ChatColors = {\n name: 'dark',\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefaultDark,\n switchTrackTrue: undefined,\n switchTrackFalse: undefined,\n switchThumbColor: undefined,\n testColor: 'pink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimaryDark,\n statusInfoText: tokens.textColorStatusInfoDark,\n statusInfoBackground: tokens.fillColorStatusInfoGhostDark,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimaryDark,\n statusSuccessText: tokens.textColorStatusSuccessDark,\n statusSuccessBackground: tokens.fillColorStatusSuccessGhostDark,\n statusWarningIcon: tokens.iconColorStatusWarningPrimaryDark,\n statusWarningText: tokens.textColorStatusWarningDark,\n statusWarningBackground: tokens.fillColorStatusWarningGhostDark,\n statusErrorIcon: tokens.iconColorStatusErrorPrimaryDark,\n statusErrorText: tokens.textColorStatusErrorDark,\n statusErrorBackground: tokens.fillColorStatusErrorGhostDark,\n statusNeutralIcon: tokens.iconColorStatusNeutralPrimaryDark,\n statusNeutralText: tokens.textColorStatusNeutralDark,\n statusNeutralBackground: tokens.fillColorStatusNeutralGhostDark,\n borderColorStatusError: tokens.borderColorStatusErrorDark,\n}\n\nconst chatThemeColorMap = {\n light: colorsChatLight,\n dark: colorsChatDark,\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-rc.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"prettier": "^3.4.2",
|
|
53
53
|
"typescript": "<5.6.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "3e9465af71440515a9af6d68b0c475e0dd283673"
|
|
56
56
|
}
|