@messenger-box/platform-browser 10.0.3-alpha.17 → 10.0.3-alpha.171
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/lib/components/InboxMessage/InboxDetails/index.d.ts +6 -1
- package/lib/components/InboxMessage/InboxDetails/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/InboxDetails/index.js +10 -11
- package/lib/components/InboxMessage/InboxDetails/index.js.map +1 -1
- package/lib/components/InboxMessage/InboxSidebar/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/InboxSidebar/index.js +23 -32
- package/lib/components/InboxMessage/InboxSidebar/index.js.map +1 -1
- package/lib/components/InboxMessage/Messages/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/Messages/index.js +42 -81
- package/lib/components/InboxMessage/Messages/index.js.map +1 -1
- package/lib/components/InboxMessage/MessagesList/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/MessagesList/index.js +53 -74
- package/lib/components/InboxMessage/MessagesList/index.js.map +1 -1
- package/lib/components/InboxMessage/Popover/index.d.ts +5 -1
- package/lib/components/InboxMessage/Popover/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/Popover/index.js +8 -35
- package/lib/components/InboxMessage/Popover/index.js.map +1 -1
- package/lib/components/InboxMessage/UserModalContent/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/UserModalContent/index.js +50 -47
- package/lib/components/InboxMessage/UserModalContent/index.js.map +1 -1
- package/lib/components/InboxMessage/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/index.js +38 -70
- package/lib/components/InboxMessage/index.js.map +1 -1
- package/lib/components/channel_view/DirectChannelView.js.map +1 -1
- package/lib/components/channel_view/PublicChannelView.js.map +1 -1
- package/lib/components/dashboard/menu_header.d.ts.map +1 -1
- package/lib/components/dashboard/menu_header.js +38 -24
- package/lib/components/dashboard/menu_header.js.map +1 -1
- package/lib/components/dashboard/modals/direct_modal.d.ts +10 -8
- package/lib/components/dashboard/modals/direct_modal.d.ts.map +1 -1
- package/lib/components/dashboard/modals/direct_modal.js +59 -39
- package/lib/components/dashboard/modals/direct_modal.js.map +1 -1
- package/lib/components/dashboard/modals.d.ts +18 -6
- package/lib/components/dashboard/modals.d.ts.map +1 -1
- package/lib/components/dashboard/modals.js +60 -101
- package/lib/components/dashboard/modals.js.map +1 -1
- package/lib/components/messenger/avatar/index.d.ts.map +1 -1
- package/lib/components/messenger/index.d.ts.map +1 -1
- package/lib/components/messenger/index.js +45 -82
- package/lib/components/messenger/index.js.map +1 -1
- package/lib/components/messenger/messagesList/index.d.ts.map +1 -1
- package/lib/components/messenger/messagesList/index.js +174 -454
- package/lib/components/messenger/messagesList/index.js.map +1 -1
- package/lib/components/messenger/messagesList/messageBox.d.ts +0 -1
- package/lib/components/messenger/messagesList/messageBox.d.ts.map +1 -1
- package/lib/components/messenger/more_action/index.d.ts.map +1 -1
- package/lib/components/messenger/postMessage/postMessage.d.ts +7 -2
- package/lib/components/messenger/postMessage/postMessage.d.ts.map +1 -1
- package/lib/components/messenger/sidebarThreadList/index.d.ts.map +1 -1
- package/lib/components/messenger/threadSidebar/index.d.ts.map +1 -1
- package/lib/components/messenger/types/message.d.ts +11 -11
- package/lib/components/messenger/types/message.d.ts.map +1 -1
- package/lib/components/post/channel_intro_message/channel_intro_message.d.ts.map +1 -1
- package/lib/components/post/channel_layout/channel_identifier_router/channel_identifier_router.d.ts.map +1 -1
- package/lib/components/post/channel_view/channel_view.d.ts.map +1 -1
- package/lib/components/post/create_post/create_post.d.ts +10 -1
- package/lib/components/post/create_post/create_post.d.ts.map +1 -1
- package/lib/components/post/failed_post_options/failed_post_options.d.ts.map +1 -1
- package/lib/components/post/index.d.ts +5 -3
- package/lib/components/post/index.d.ts.map +1 -1
- package/lib/components/post/index.js +63 -97
- package/lib/components/post/index.js.map +1 -1
- package/lib/components/post/markdown/markdown.d.ts.map +1 -1
- package/lib/components/post/post/post.d.ts.map +1 -1
- package/lib/components/post/post_body/post_body.d.ts.map +1 -1
- package/lib/components/post/post_body_additional_content/post_body_additional_content.d.ts.map +1 -1
- package/lib/components/post/post_header/post_header.d.ts.map +1 -1
- package/lib/components/post/post_header/post_header_custom_status.d.ts.map +1 -1
- package/lib/components/post/post_info/post_info.d.ts.map +1 -1
- package/lib/components/post/post_list/post_list.d.ts.map +1 -1
- package/lib/components/post/post_list_row/post_list_row.d.ts.map +1 -1
- package/lib/components/post/post_list_virtualized/post_list_virtualized.d.ts.map +1 -1
- package/lib/components/post/post_markdown/post_markdown.d.ts.map +1 -1
- package/lib/components/post/post_message_view/post_message_view.d.ts.map +1 -1
- package/lib/components/post/post_pre_header/post_pre_header.d.ts.map +1 -1
- package/lib/components/post/post_profile_picture/post_profile_picture.d.ts.map +1 -1
- package/lib/components/post/profile_picture/profile_picture.d.ts.map +1 -1
- package/lib/components/post/show_more/show_more.d.ts.map +1 -1
- package/lib/components/post/suggestion/suggestion_box.d.ts.map +1 -1
- package/lib/components/post/textbox/textbox.d.ts.map +1 -1
- package/lib/components/post/threading/channel_threads/thread_footer/thread_footer.d.ts.map +1 -1
- package/lib/components/post/tutorial/menu_tutorial_tip.d.ts.map +1 -1
- package/lib/components/post/tutorial/tutorial_tip/tutorial_tip.d.ts.map +1 -1
- package/lib/components/post_view/post_attachment_container/post_attachment_container.d.ts.map +1 -1
- package/lib/components/status_icon.d.ts.map +1 -1
- package/lib/compute.js.map +1 -1
- package/lib/containers/Dashboard.d.ts.map +1 -1
- package/lib/containers/Dashboard.js +110 -124
- package/lib/containers/Dashboard.js.map +1 -1
- package/lib/containers/DashboardWithLoader.d.ts.map +1 -1
- package/lib/containers/DashboardWithLoader.js +14 -5
- package/lib/containers/DashboardWithLoader.js.map +1 -1
- package/lib/containers/Inbox.js.map +1 -1
- package/lib/containers/Messenger.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/widgets/simple_tooltip/simple_tooltip.d.ts.map +1 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -135
- package/jest.config.js +0 -24
- package/lib/components/InboxMessage/InboxDetails/style.d.ts +0 -2
- package/lib/components/InboxMessage/InboxDetails/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/InboxDetails/style.js +0 -27
- package/lib/components/InboxMessage/InboxDetails/style.js.map +0 -1
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts +0 -2
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts.map +0 -1
- package/lib/components/InboxMessage/InboxSidebar/styles.js +0 -57
- package/lib/components/InboxMessage/InboxSidebar/styles.js.map +0 -1
- package/lib/components/InboxMessage/Messages/styles.d.ts +0 -81
- package/lib/components/InboxMessage/Messages/styles.d.ts.map +0 -1
- package/lib/components/InboxMessage/Messages/styles.js +0 -85
- package/lib/components/InboxMessage/Messages/styles.js.map +0 -1
- package/lib/components/InboxMessage/Popover/style.d.ts +0 -28
- package/lib/components/InboxMessage/Popover/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/Popover/style.js +0 -27
- package/lib/components/InboxMessage/Popover/style.js.map +0 -1
- package/lib/components/InboxMessage/UserModalContent/style.d.ts +0 -2
- package/lib/components/InboxMessage/UserModalContent/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/UserModalContent/style.js +0 -98
- package/lib/components/InboxMessage/UserModalContent/style.js.map +0 -1
- package/lib/components/InboxMessage/style.js +0 -189
- package/lib/components/InboxMessage/style.js.map +0 -1
- package/lib/components/messenger/avatar/style.d.ts +0 -2
- package/lib/components/messenger/avatar/style.d.ts.map +0 -1
- package/lib/components/messenger/messagesList/style.js +0 -446
- package/lib/components/messenger/messagesList/style.js.map +0 -1
- package/lib/components/messenger/more_action/index.js +0 -48
- package/lib/components/messenger/more_action/index.js.map +0 -1
- package/lib/components/messenger/more_action/style.d.ts +0 -2
- package/lib/components/messenger/more_action/style.d.ts.map +0 -1
- package/lib/components/messenger/more_action/style.js +0 -45
- package/lib/components/messenger/more_action/style.js.map +0 -1
- package/lib/components/post/style.js +0 -20101
- package/lib/components/post/style.js.map +0 -1
- package/lib/style.js +0 -400
- package/lib/style.js.map +0 -1
- package/rollup.config.mjs +0 -35
- package/src/cdm-locales/en/translations.json +0 -95
- package/src/cdm-locales/es/translations.json +0 -95
- package/src/components/InboxMessage/InboxDetails/index.tsx +0 -25
- package/src/components/InboxMessage/InboxDetails/style.ts +0 -27
- package/src/components/InboxMessage/InboxSidebar/index.tsx +0 -89
- package/src/components/InboxMessage/InboxSidebar/styles.ts +0 -57
- package/src/components/InboxMessage/Messages/index.tsx +0 -161
- package/src/components/InboxMessage/Messages/styles.ts +0 -85
- package/src/components/InboxMessage/MessagesList/index.tsx +0 -93
- package/src/components/InboxMessage/Popover/index.tsx +0 -60
- package/src/components/InboxMessage/Popover/style.ts +0 -27
- package/src/components/InboxMessage/UserModalContent/index.tsx +0 -63
- package/src/components/InboxMessage/UserModalContent/style.ts +0 -98
- package/src/components/InboxMessage/index.tsx +0 -289
- package/src/components/InboxMessage/mock.ts +0 -53
- package/src/components/InboxMessage/style.ts +0 -189
- package/src/components/NavBar.tsx +0 -10
- package/src/components/channel_view/DirectChannelView.tsx +0 -25
- package/src/components/channel_view/PublicChannelView.tsx +0 -25
- package/src/components/dashboard/menu_header.tsx +0 -62
- package/src/components/dashboard/modals/direct_modal.tsx +0 -54
- package/src/components/dashboard/modals.tsx +0 -121
- package/src/components/messenger/avatar/index.tsx +0 -39
- package/src/components/messenger/avatar/style.ts +0 -86
- package/src/components/messenger/index.tsx +0 -382
- package/src/components/messenger/messagesList/index.tsx +0 -764
- package/src/components/messenger/messagesList/messageBox.tsx +0 -66
- package/src/components/messenger/messagesList/style.ts +0 -448
- package/src/components/messenger/mock.ts +0 -77
- package/src/components/messenger/more_action/index.tsx +0 -79
- package/src/components/messenger/more_action/style.ts +0 -45
- package/src/components/messenger/postMessage/postMessage.tsx +0 -28
- package/src/components/messenger/postMessage/style.ts +0 -24
- package/src/components/messenger/sidebarThreadList/index.tsx +0 -201
- package/src/components/messenger/style.ts +0 -40
- package/src/components/messenger/threadSidebar/index.tsx +0 -129
- package/src/components/messenger/threadSidebar/style.ts +0 -65
- package/src/components/messenger/types/message.ts +0 -16
- package/src/components/messenger/utils/utils.ts +0 -5
- package/src/components/overlay_trigger.tsx +0 -59
- package/src/components/post/channel_intro_message/add_members_button.tsx +0 -152
- package/src/components/post/channel_intro_message/channel_intro_message.tsx +0 -53
- package/src/components/post/channel_intro_message/index.ts +0 -1
- package/src/components/post/channel_layout/center_channel/center_channel.test.tsx +0 -50
- package/src/components/post/channel_layout/center_channel/center_channel.tsx +0 -125
- package/src/components/post/channel_layout/center_channel/index.ts +0 -69
- package/src/components/post/channel_layout/channel_controller.test.tsx +0 -76
- package/src/components/post/channel_layout/channel_controller.tsx +0 -85
- package/src/components/post/channel_layout/channel_identifier_router/actions.test.ts +0 -243
- package/src/components/post/channel_layout/channel_identifier_router/actions.ts +0 -353
- package/src/components/post/channel_layout/channel_identifier_router/channel_identifier_router.test.tsx +0 -101
- package/src/components/post/channel_layout/channel_identifier_router/channel_identifier_router.tsx +0 -6
- package/src/components/post/channel_layout/channel_identifier_router/index.ts +0 -1
- package/src/components/post/channel_view/channel_view.test.tsx +0 -68
- package/src/components/post/channel_view/channel_view.tsx +0 -92
- package/src/components/post/channel_view/index.ts +0 -1
- package/src/components/post/create_post/create_post.test.jsx +0 -1335
- package/src/components/post/create_post/create_post.tsx +0 -225
- package/src/components/post/create_post/index.ts +0 -1
- package/src/components/post/failed_post_options/failed_post_options.tsx +0 -32
- package/src/components/post/failed_post_options/index.ts +0 -4
- package/src/components/post/index.tsx +0 -131
- package/src/components/post/markdown/index.ts +0 -1
- package/src/components/post/markdown/markdown.test.tsx +0 -62
- package/src/components/post/markdown/markdown.tsx +0 -38
- package/src/components/post/post/defaultpost.ts +0 -25
- package/src/components/post/post/post.tsx +0 -270
- package/src/components/post/post/style.ts +0 -0
- package/src/components/post/post_aria_label_div.tsx +0 -43
- package/src/components/post/post_body/post_body.tsx +0 -80
- package/src/components/post/post_body_additional_content/post_body_additional_content.tsx +0 -6
- package/src/components/post/post_context.tsx +0 -10
- package/src/components/post/post_header/index.ts +0 -38
- package/src/components/post/post_header/post_header.scss +0 -53
- package/src/components/post/post_header/post_header.tsx +0 -98
- package/src/components/post/post_header/post_header_custom_status.tsx +0 -49
- package/src/components/post/post_header/style.ts +0 -54
- package/src/components/post/post_info/post_info.tsx +0 -195
- package/src/components/post/post_list/index.tsx +0 -10
- package/src/components/post/post_list/post_list.tsx +0 -27
- package/src/components/post/post_list_row/index.ts +0 -42
- package/src/components/post/post_list_row/post_list_row.test.tsx +0 -176
- package/src/components/post/post_list_row/post_list_row.tsx +0 -130
- package/src/components/post/post_list_virtualized/latest_post_reader.tsx +0 -9
- package/src/components/post/post_list_virtualized/post_list_virtualized.tsx +0 -269
- package/src/components/post/post_markdown/index.test.js +0 -119
- package/src/components/post/post_markdown/index.ts +0 -1
- package/src/components/post/post_markdown/post_markdown.test.tsx +0 -178
- package/src/components/post/post_markdown/post_markdown.tsx +0 -58
- package/src/components/post/post_markdown/system_message_helpers.tsx +0 -420
- package/src/components/post/post_message_view/index.ts +0 -4
- package/src/components/post/post_message_view/post_message_view.test.tsx +0 -89
- package/src/components/post/post_message_view/post_message_view.tsx +0 -71
- package/src/components/post/post_pre_header/post_pre_header.tsx +0 -141
- package/src/components/post/post_profile_picture/post_profile_picture.tsx +0 -95
- package/src/components/post/post_view.tsx +0 -10
- package/src/components/post/profile_picture/profile_picture.tsx +0 -21
- package/src/components/post/show_more/index.ts +0 -1
- package/src/components/post/show_more/show_more.test.tsx +0 -102
- package/src/components/post/show_more/show_more.tsx +0 -97
- package/src/components/post/style.ts +0 -20101
- package/src/components/post/suggestion/suggestion_box.tsx +0 -5
- package/src/components/post/textbox/index.ts +0 -1
- package/src/components/post/textbox/textbox.tsx +0 -80
- package/src/components/post/textbox/textbox_links/index.ts +0 -24
- package/src/components/post/textbox/textbox_links/textbox_links.tsx +0 -143
- package/src/components/post/threading/channel_threads/thread_footer/index.ts +0 -4
- package/src/components/post/threading/channel_threads/thread_footer/thread_footer.scss +0 -72
- package/src/components/post/threading/channel_threads/thread_footer/thread_footer.tsx +0 -206
- package/src/components/post/threading/common/button/__snapshots__/button.test.tsx.snap +0 -68
- package/src/components/post/threading/common/button/button.scss +0 -148
- package/src/components/post/threading/common/button/button.test.tsx +0 -75
- package/src/components/post/threading/common/button/button.tsx +0 -51
- package/src/components/post/threading/common/button/index.ts +0 -4
- package/src/components/post/threading/common/follow_button/__snapshots__/follow_button.test.tsx.snap +0 -50
- package/src/components/post/threading/common/follow_button/follow_button.test.tsx +0 -56
- package/src/components/post/threading/common/follow_button/follow_button.tsx +0 -39
- package/src/components/post/threading/common/follow_button/index.ts +0 -4
- package/src/components/post/timestamp/__snapshots__/semantic_time.test.tsx.snap +0 -13
- package/src/components/post/timestamp/__snapshots__/timestamp.test.tsx.snap +0 -13
- package/src/components/post/timestamp/index.ts +0 -50
- package/src/components/post/timestamp/relative_ranges.tsx +0 -58
- package/src/components/post/timestamp/semantic_time.test.tsx +0 -47
- package/src/components/post/timestamp/semantic_time.tsx +0 -28
- package/src/components/post/timestamp/timestamp.stories.tsx +0 -190
- package/src/components/post/timestamp/timestamp.test.tsx +0 -309
- package/src/components/post/timestamp/timestamp.tsx +0 -441
- package/src/components/post/tutorial/menu_tutorial_tip.tsx +0 -63
- package/src/components/post/tutorial/tutorial_tip/index.ts +0 -0
- package/src/components/post/tutorial/tutorial_tip/tutorial_tip.test.tsx +0 -111
- package/src/components/post/tutorial/tutorial_tip/tutorial_tip.tsx +0 -224
- package/src/components/post/user_profile/index.tsx +0 -6
- package/src/components/post/user_profile/user_profile.tsx +0 -114
- package/src/components/post_view/__snapshots__/post_view.test.js.snap +0 -25
- package/src/components/post_view/channel_intro_message/add_members_button.scss +0 -72
- package/src/components/post_view/channel_intro_message/add_members_button.tsx +0 -152
- package/src/components/post_view/channel_intro_message/channel_intro_message.tsx +0 -549
- package/src/components/post_view/channel_intro_message/index.ts +0 -67
- package/src/components/post_view/combined_system_message/__snapshots__/combined_system_message.test.tsx.snap +0 -238
- package/src/components/post_view/combined_system_message/__snapshots__/last_users.test.tsx.snap +0 -74
- package/src/components/post_view/combined_system_message/combined_system_message.test.tsx +0 -167
- package/src/components/post_view/combined_system_message/combined_system_message.tsx +0 -380
- package/src/components/post_view/combined_system_message/index.ts +0 -46
- package/src/components/post_view/combined_system_message/last_users.test.tsx +0 -56
- package/src/components/post_view/combined_system_message/last_users.tsx +0 -135
- package/src/components/post_view/combined_user_activity_post/index.ts +0 -28
- package/src/components/post_view/comment_icon/index.ts +0 -31
- package/src/components/post_view/commented_on/__snapshots__/commented_on.test.tsx.snap +0 -276
- package/src/components/post_view/commented_on/commented_on.test.tsx +0 -184
- package/src/components/post_view/commented_on/commented_on.tsx +0 -92
- package/src/components/post_view/commented_on/index.ts +0 -37
- package/src/components/post_view/commented_on_files_message/__snapshots__/commented_on_files_message.test.jsx.snap +0 -24
- package/src/components/post_view/commented_on_files_message/commented_on_files_message.jsx +0 -47
- package/src/components/post_view/commented_on_files_message/commented_on_files_message.test.jsx +0 -53
- package/src/components/post_view/commented_on_files_message/index.js +0 -25
- package/src/components/post_view/date_separator/__snapshots__/date_separator.test.tsx.snap +0 -35
- package/src/components/post_view/date_separator/date_separator.test.tsx +0 -26
- package/src/components/post_view/date_separator/date_separator.tsx +0 -40
- package/src/components/post_view/date_separator/index.ts +0 -4
- package/src/components/post_view/embedded_bindings/button_binding/__snapshots__/button_binding.test.tsx.snap +0 -23
- package/src/components/post_view/embedded_bindings/button_binding/button_binding.test.tsx +0 -124
- package/src/components/post_view/embedded_bindings/button_binding/button_binding.tsx +0 -141
- package/src/components/post_view/embedded_bindings/button_binding/index.ts +0 -34
- package/src/components/post_view/embedded_bindings/embedded_binding/__snapshots__/embedded_binding.test.tsx.snap +0 -249
- package/src/components/post_view/embedded_bindings/embedded_binding/embedded_binding.test.tsx +0 -76
- package/src/components/post_view/embedded_bindings/embedded_binding/embedded_binding.tsx +0 -205
- package/src/components/post_view/embedded_bindings/embedded_binding/index.ts +0 -17
- package/src/components/post_view/embedded_bindings/embedded_bindings.tsx +0 -59
- package/src/components/post_view/embedded_bindings/select_binding/index.ts +0 -33
- package/src/components/post_view/embedded_bindings/select_binding/select_binding.test.tsx +0 -170
- package/src/components/post_view/embedded_bindings/select_binding/select_binding.tsx +0 -188
- package/src/components/post_view/failed_post_options/__snapshots__/failed_post_options.test.tsx.snap +0 -29
- package/src/components/post_view/failed_post_options/failed_post_options.test.tsx +0 -59
- package/src/components/post_view/failed_post_options/failed_post_options.tsx +0 -67
- package/src/components/post_view/failed_post_options/index.ts +0 -23
- package/src/components/post_view/floating_timestamp/__snapshots__/floating_timestamp.test.tsx.snap +0 -41
- package/src/components/post_view/floating_timestamp/floating_timestamp.test.tsx +0 -23
- package/src/components/post_view/floating_timestamp/floating_timestamp.tsx +0 -52
- package/src/components/post_view/floating_timestamp/index.ts +0 -35
- package/src/components/post_view/index.js +0 -61
- package/src/components/post_view/index.test.js +0 -37
- package/src/components/post_view/message_attachments/action_button/__snapshots__/action_button.test.tsx.snap +0 -26
- package/src/components/post_view/message_attachments/action_button/action_button.test.tsx +0 -113
- package/src/components/post_view/message_attachments/action_button/action_button.tsx +0 -80
- package/src/components/post_view/message_attachments/action_button/index.ts +0 -17
- package/src/components/post_view/message_attachments/action_menu/action_menu.test.tsx +0 -61
- package/src/components/post_view/message_attachments/action_menu/action_menu.tsx +0 -156
- package/src/components/post_view/message_attachments/action_menu/index.ts +0 -41
- package/src/components/post_view/message_attachments/message_attachment/__snapshots__/message_attachment.test.tsx.snap +0 -726
- package/src/components/post_view/message_attachments/message_attachment/index.ts +0 -32
- package/src/components/post_view/message_attachments/message_attachment/message_attachment.test.tsx +0 -234
- package/src/components/post_view/message_attachments/message_attachment/message_attachment.tsx +0 -544
- package/src/components/post_view/message_attachments/message_attachment_list.tsx +0 -64
- package/src/components/post_view/new_message_separator/__snapshots__/new_message_separator.test.tsx.snap +0 -16
- package/src/components/post_view/new_message_separator/new_message_separator.test.tsx +0 -16
- package/src/components/post_view/new_message_separator/new_message_separator.tsx +0 -31
- package/src/components/post_view/post/__snapshots__/post.test.js.snap +0 -337
- package/src/components/post_view/post/index.test.js +0 -61
- package/src/components/post_view/post/index.ts +0 -96
- package/src/components/post_view/post/post.jsx +0 -446
- package/src/components/post_view/post/post.test.js +0 -222
- package/src/components/post_view/post_add_channel_member/__snapshots__/post_add_channel_member.test.tsx.snap +0 -226
- package/src/components/post_view/post_add_channel_member/index.ts +0 -47
- package/src/components/post_view/post_add_channel_member/post_add_channel_member.test.tsx +0 -140
- package/src/components/post_view/post_add_channel_member/post_add_channel_member.tsx +0 -231
- package/src/components/post_view/post_aria_label_div.test.jsx +0 -106
- package/src/components/post_view/post_aria_label_div.tsx +0 -48
- package/src/components/post_view/post_attachment_container/__snapshots__/post_attachment_container.test.tsx.snap +0 -25
- package/src/components/post_view/post_attachment_container/post_attachment_container.test.tsx +0 -21
- package/src/components/post_view/post_attachment_container/post_attachment_container.tsx +0 -40
- package/src/components/post_view/post_attachment_opengraph/get_nearest_point.test.ts +0 -55
- package/src/components/post_view/post_attachment_opengraph/get_nearest_point.ts +0 -31
- package/src/components/post_view/post_attachment_opengraph/index.ts +0 -48
- package/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.test.tsx +0 -264
- package/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx +0 -262
- package/src/components/post_view/post_body/index.js +0 -36
- package/src/components/post_view/post_body/post_body.jsx +0 -235
- package/src/components/post_view/post_body_additional_content/__snapshots__/post_body_additional_content.test.tsx.snap +0 -295
- package/src/components/post_view/post_body_additional_content/index.ts +0 -36
- package/src/components/post_view/post_body_additional_content/post_body_additional_content.test.tsx +0 -425
- package/src/components/post_view/post_body_additional_content/post_body_additional_content.tsx +0 -194
- package/src/components/post_view/post_context.js +0 -14
- package/src/components/post_view/post_flag_icon/__snapshots__/post_flag_icon.test.js.snap +0 -81
- package/src/components/post_view/post_flag_icon/index.js +0 -20
- package/src/components/post_view/post_flag_icon/post_flag_icon.js +0 -125
- package/src/components/post_view/post_flag_icon/post_flag_icon.test.js +0 -39
- package/src/components/post_view/post_header/__snapshots__/post_header.test.tsx.snap +0 -196
- package/src/components/post_view/post_header/index.ts +0 -38
- package/src/components/post_view/post_header/post_header.scss +0 -53
- package/src/components/post_view/post_header/post_header.test.tsx +0 -68
- package/src/components/post_view/post_header/post_header.tsx +0 -202
- package/src/components/post_view/post_header/post_header_custom_status.tsx +0 -73
- package/src/components/post_view/post_image/index.js +0 -6
- package/src/components/post_view/post_image/post_image.jsx +0 -69
- package/src/components/post_view/post_info/__snapshots__/post_info.test.tsx.snap +0 -322
- package/src/components/post_view/post_info/index.ts +0 -66
- package/src/components/post_view/post_info/post_info.test.tsx +0 -170
- package/src/components/post_view/post_info/post_info.tsx +0 -403
- package/src/components/post_view/post_list/__snapshots__/post_list.test.jsx.snap +0 -71
- package/src/components/post_view/post_list/index.js +0 -105
- package/src/components/post_view/post_list/post_list.jsx +0 -324
- package/src/components/post_view/post_list/post_list.test.jsx +0 -274
- package/src/components/post_view/post_list_row/__snapshots__/post_list_row.test.tsx.snap +0 -108
- package/src/components/post_view/post_list_row/index.ts +0 -42
- package/src/components/post_view/post_list_row/post_list_row.test.tsx +0 -176
- package/src/components/post_view/post_list_row/post_list_row.tsx +0 -165
- package/src/components/post_view/post_list_virtualized/latest_post_reader.test.jsx +0 -80
- package/src/components/post_view/post_list_virtualized/latest_post_reader.tsx +0 -46
- package/src/components/post_view/post_list_virtualized/post_list_virtualized.jsx +0 -626
- package/src/components/post_view/post_list_virtualized/post_list_virtualized.test.jsx +0 -623
- package/src/components/post_view/post_message_preview/__snapshots__/post_message_preview.test.tsx.snap +0 -88
- package/src/components/post_view/post_message_preview/index.ts +0 -35
- package/src/components/post_view/post_message_preview/post_message_preview.test.tsx +0 -50
- package/src/components/post_view/post_message_preview/post_message_preview.tsx +0 -92
- package/src/components/post_view/post_message_view/__snapshots__/post_message_view.test.tsx.snap +0 -242
- package/src/components/post_view/post_message_view/index.ts +0 -27
- package/src/components/post_view/post_message_view/post_message_view.test.tsx +0 -89
- package/src/components/post_view/post_message_view/post_message_view.tsx +0 -192
- package/src/components/post_view/post_pre_header/__snapshots__/post_pre_header.test.tsx.snap +0 -209
- package/src/components/post_view/post_pre_header/index.js +0 -18
- package/src/components/post_view/post_pre_header/post_pre_header.test.tsx +0 -188
- package/src/components/post_view/post_pre_header/post_pre_header.tsx +0 -148
- package/src/components/post_view/post_reaction/__snapshots__/post_reaction.test.tsx.snap +0 -63
- package/src/components/post_view/post_reaction/index.ts +0 -21
- package/src/components/post_view/post_reaction/post_reaction.test.tsx +0 -39
- package/src/components/post_view/post_reaction/post_reaction.tsx +0 -124
- package/src/components/post_view/post_time/index.ts +0 -18
- package/src/components/post_view/post_time/post_time.tsx +0 -113
- package/src/components/post_view/post_view.jsx +0 -83
- package/src/components/post_view/post_view.test.js +0 -53
- package/src/components/post_view/reaction/__snapshots__/reaction.test.jsx.snap +0 -339
- package/src/components/post_view/reaction/index.ts +0 -120
- package/src/components/post_view/reaction/reaction.scss +0 -157
- package/src/components/post_view/reaction/reaction.test.jsx +0 -80
- package/src/components/post_view/reaction/reaction.tsx +0 -263
- package/src/components/post_view/reaction/reaction_tooltip/index.test.js +0 -56
- package/src/components/post_view/reaction/reaction_tooltip/index.ts +0 -67
- package/src/components/post_view/reaction/reaction_tooltip/reaction_tooltip.tsx +0 -140
- package/src/components/post_view/reaction_list/__snapshots__/reactions_list.test.jsx.snap +0 -95
- package/src/components/post_view/reaction_list/index.ts +0 -52
- package/src/components/post_view/reaction_list/reaction_list.tsx +0 -201
- package/src/components/post_view/reaction_list/reactions_list.test.jsx +0 -57
- package/src/components/post_view/scroll_to_bottom_arrows.jsx +0 -37
- package/src/components/post_view/show_more/__snapshots__/show_more.test.tsx.snap +0 -237
- package/src/components/post_view/show_more/index.ts +0 -23
- package/src/components/post_view/show_more/show_more.test.tsx +0 -102
- package/src/components/post_view/show_more/show_more.tsx +0 -196
- package/src/components/status_icon.tsx +0 -49
- package/src/components/status_icon_new.tsx +0 -35
- package/src/compute.ts +0 -74
- package/src/containers/Dashboard.tsx +0 -527
- package/src/containers/DashboardWithLoader.tsx +0 -38
- package/src/containers/Inbox.tsx +0 -13
- package/src/containers/Loading.tsx +0 -12
- package/src/containers/Messenger.tsx +0 -18
- package/src/containers/__tests__/ApolloProvider.test.tsx +0 -48
- package/src/containers/__tests__/Counter.test.tsx +0 -49
- package/src/containers/__tests__/PersonList.test.tsx +0 -43
- package/src/containers/__tests__/__snapshots__/Counter.test.tsx.snap +0 -299
- package/src/containers/__tests__/__snapshots__/PersonList.test.tsx.snap +0 -230
- package/src/containers/__tests__/redux.test.tsx +0 -86
- package/src/containers/__tests__/setup.ts +0 -18
- package/src/containers/__tests__/utils.ts +0 -5
- package/src/containers/index.ts +0 -4
- package/src/index.ts +0 -5
- package/src/inversify-containers/index.ts +0 -1
- package/src/inversify-containers/module.ts +0 -4
- package/src/module.ts +0 -21
- package/src/packages/constants/constants.ts +0 -1831
- package/src/packages/types/channels.ts +0 -194
- package/src/packages/types/emojis.ts +0 -41
- package/src/packages/types/files.ts +0 -43
- package/src/packages/types/posts.ts +0 -155
- package/src/packages/types/reactions.ts +0 -8
- package/src/packages/types/teams.ts +0 -105
- package/src/packages/types/utilities.ts +0 -30
- package/src/services/index.ts +0 -0
- package/src/style.ts +0 -401
- package/src/utils/constants.tsx +0 -1120
- package/src/utils/i18n.tsx +0 -15
- package/src/utils/index.ts +0 -34
- package/src/utils/post_list.ts +0 -54
- package/src/utils/post_utils.ts +0 -33
- package/src/utils/user_agent.tsx +0 -153
- package/src/utils/utils.tsx +0 -54
- package/src/widgets/badges/badge.scss +0 -21
- package/src/widgets/badges/badge.tsx +0 -30
- package/src/widgets/badges/bot_badge.tsx +0 -31
- package/src/widgets/badges/guest_badge.tsx +0 -31
- package/src/widgets/badges/style.ts +0 -24
- package/src/widgets/icons/accordion_toggle_icon.tsx +0 -59
- package/src/widgets/icons/add_reaction_icon.tsx +0 -23
- package/src/widgets/icons/admin_eye_icon.tsx +0 -30
- package/src/widgets/icons/alert_icon.tsx +0 -22
- package/src/widgets/icons/archive_icon.tsx +0 -23
- package/src/widgets/icons/arrow_right_icon.tsx +0 -23
- package/src/widgets/icons/at_icon.tsx +0 -22
- package/src/widgets/icons/attachment_icon.tsx +0 -38
- package/src/widgets/icons/back_icon.tsx +0 -22
- package/src/widgets/icons/bot_icon.tsx +0 -23
- package/src/widgets/icons/camera_icon.tsx +0 -41
- package/src/widgets/icons/checkbox_checked_icon.tsx +0 -62
- package/src/widgets/icons/checkbox_partial_icon.tsx +0 -62
- package/src/widgets/icons/close_circle_icon.tsx +0 -25
- package/src/widgets/icons/close_circle_solid_icon.tsx +0 -25
- package/src/widgets/icons/close_icon.tsx +0 -27
- package/src/widgets/icons/dots_horizontal.tsx +0 -22
- package/src/widgets/icons/download_icon.tsx +0 -46
- package/src/widgets/icons/draft_icon.tsx +0 -32
- package/src/widgets/icons/ellipsis_h_icon.tsx +0 -23
- package/src/widgets/icons/email_icon.tsx +0 -23
- package/src/widgets/icons/emoji_icon.tsx +0 -22
- package/src/widgets/icons/fa_add_icon.tsx +0 -15
- package/src/widgets/icons/fa_back_icon.tsx +0 -16
- package/src/widgets/icons/fa_dropdown_icon.tsx +0 -15
- package/src/widgets/icons/fa_edit_icon.tsx +0 -16
- package/src/widgets/icons/fa_logout_icon.tsx +0 -15
- package/src/widgets/icons/fa_next_icon.tsx +0 -28
- package/src/widgets/icons/fa_previous_icon.tsx +0 -28
- package/src/widgets/icons/fa_reload_icon.tsx +0 -16
- package/src/widgets/icons/fa_remove_icon.tsx +0 -16
- package/src/widgets/icons/fa_search_icon.tsx +0 -16
- package/src/widgets/icons/fa_select_icon.tsx +0 -16
- package/src/widgets/icons/fa_success_icon.tsx +0 -16
- package/src/widgets/icons/fa_warning_icon.tsx +0 -28
- package/src/widgets/icons/flag_icon.tsx +0 -22
- package/src/widgets/icons/flag_icon_filled.tsx +0 -41
- package/src/widgets/icons/gfycat_icon.tsx +0 -38
- package/src/widgets/icons/gif_reactions_icon.tsx +0 -52
- package/src/widgets/icons/gif_search_clear_icon.tsx +0 -27
- package/src/widgets/icons/gif_search_icon.tsx +0 -29
- package/src/widgets/icons/gif_trending_icon.tsx +0 -49
- package/src/widgets/icons/globe_icon.tsx +0 -22
- package/src/widgets/icons/icons.stories.js +0 -110
- package/src/widgets/icons/info_icon.tsx +0 -40
- package/src/widgets/icons/info_small_icon.tsx +0 -35
- package/src/widgets/icons/invite_icon.tsx +0 -22
- package/src/widgets/icons/invite_members_icon.tsx +0 -22
- package/src/widgets/icons/leave_team_icon.tsx +0 -30
- package/src/widgets/icons/link_icon.tsx +0 -23
- package/src/widgets/icons/lock_icon.tsx +0 -41
- package/src/widgets/icons/mail_icon.tsx +0 -22
- package/src/widgets/icons/mail_plus_icon.tsx +0 -22
- package/src/widgets/icons/mattermost_logo.tsx +0 -40
- package/src/widgets/icons/member_icon.tsx +0 -22
- package/src/widgets/icons/mentions_icon.tsx +0 -24
- package/src/widgets/icons/menu_icon.tsx +0 -42
- package/src/widgets/icons/message_icon.tsx +0 -42
- package/src/widgets/icons/pin_icon.tsx +0 -23
- package/src/widgets/icons/plugin_channel_header_icon.tsx +0 -23
- package/src/widgets/icons/plugin_icon.tsx +0 -44
- package/src/widgets/icons/reply_icon.tsx +0 -23
- package/src/widgets/icons/scroll_to_bottom_icon.tsx +0 -23
- package/src/widgets/icons/search_icon.tsx +0 -22
- package/src/widgets/icons/shield_outline_icon.tsx +0 -23
- package/src/widgets/icons/status_away_avatar_icon.tsx +0 -33
- package/src/widgets/icons/status_away_icon.tsx +0 -33
- package/src/widgets/icons/status_dnd_avatar_icon.tsx +0 -41
- package/src/widgets/icons/status_dnd_icon.tsx +0 -33
- package/src/widgets/icons/status_offline_avatar_icon.tsx +0 -45
- package/src/widgets/icons/status_offline_icon.tsx +0 -31
- package/src/widgets/icons/status_online_avatar_icon.tsx +0 -49
- package/src/widgets/icons/status_online_icon.tsx +0 -33
- package/src/widgets/icons/team_info_icon.tsx +0 -32
- package/src/widgets/icons/unarchive_icon.tsx +0 -22
- package/src/widgets/icons/unread_below_icon.tsx +0 -23
- package/src/widgets/icons/user_guide_icon.tsx +0 -26
- package/src/widgets/overlay_trigger.tsx +0 -59
- package/src/widgets/shared_user_indicator.tsx +0 -37
- package/src/widgets/simple_tooltip/index.ts +0 -7
- package/src/widgets/simple_tooltip/simple_tooltip.tsx +0 -63
- package/src/widgets/users/avatar/avatar.test.tsx +0 -34
- package/src/widgets/users/avatar/avatar.tsx +0 -38
- package/src/widgets/users/avatar/index.ts +0 -4
- package/src/widgets/users/avatar/style.ts +0 -79
- package/src/widgets/users/avatars/__snapshots__/avatars.test.tsx.snap +0 -1585
- package/src/widgets/users/avatars/avatars.scss +0 -64
- package/src/widgets/users/avatars/avatars.test.tsx +0 -184
- package/src/widgets/users/avatars/avatars.tsx +0 -146
- package/src/widgets/users/avatars/index.ts +0 -4
- package/src/widgets/users/users.stories.tsx +0 -37
- package/tsconfig.json +0 -14
- package/webpack.config.js +0 -58
|
@@ -1,527 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { styleSheet } from '../style';
|
|
3
|
-
import { IntlProvider } from 'react-intl';
|
|
4
|
-
import {
|
|
5
|
-
useAddChannelMutation,
|
|
6
|
-
useAddDirectChannelMutation,
|
|
7
|
-
useAddMemberToChannelMutation,
|
|
8
|
-
useSendMessagesMutation,
|
|
9
|
-
} from 'common/graphql';
|
|
10
|
-
import { MenuHeader } from '../components/dashboard/menu_header';
|
|
11
|
-
import { Modals } from '../components/dashboard/modals';
|
|
12
|
-
import { DirectModal } from '../components/dashboard/modals/direct_modal';
|
|
13
|
-
import { css } from '@emotion/css';
|
|
14
|
-
import { BsGlobe2 } from 'react-icons/bs';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { RiAdminFill } from 'react-icons/ri';
|
|
17
|
-
import { useEffect, useState } from 'react';
|
|
18
|
-
import { Avatar } from 'antd';
|
|
19
|
-
import { Comment } from '@ant-design/compatible';
|
|
20
|
-
import { indexOf } from 'lodash-es';
|
|
21
|
-
import { useSelector } from 'react-redux';
|
|
22
|
-
import { Routes, Route, Link, useNavigate, useLocation } from '@remix-run/react';
|
|
23
|
-
import { dashboardRoutes } from '../compute';
|
|
24
|
-
|
|
25
|
-
const Messenger = React.lazy(() => import('./Messenger'));
|
|
26
|
-
|
|
27
|
-
const Dashboard: React.FC = (props: any) => {
|
|
28
|
-
const [allUsers, usersToChat, currentUserRes, allChannels, getChannel] = props?.data;
|
|
29
|
-
const [channelInput, setChannelInput] = useState<any>({});
|
|
30
|
-
// const [channels, setChannels] = useState([]);
|
|
31
|
-
const [publicChannels, setPublicChannels] = useState([]);
|
|
32
|
-
const [directChannels, setDirectChannels] = useState([]);
|
|
33
|
-
const [clickedChannel, setClickedChannel] = useState<any>({});
|
|
34
|
-
const [currentUser, setCurrentUser] = useState<any>();
|
|
35
|
-
const [options, setOptions] = useState([]);
|
|
36
|
-
const [showDirectChl, setShowDirectChl] = useState(false);
|
|
37
|
-
const [selectedValues, setSelectedValues] = useState<any>([]);
|
|
38
|
-
const [directMoreModal, setDirectMoreModal] = useState<any>({ showDirectMore: false, modalPublicChannels: [] });
|
|
39
|
-
const [publicChlModal, setPublicChlModal] = useState<any>({ show: false });
|
|
40
|
-
const [classes, setClasses] = useState({
|
|
41
|
-
left_bar: 'left_bar',
|
|
42
|
-
root_div: 'root_div',
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const currentUserAuth0Id = useSelector((state: any) => state.user.authUserId);
|
|
46
|
-
|
|
47
|
-
const navigate = useNavigate();
|
|
48
|
-
const location = useLocation();
|
|
49
|
-
const { t } = useTranslation();
|
|
50
|
-
|
|
51
|
-
// const allUsers = useGetAllUsersQuery()
|
|
52
|
-
// const usersToChat = useUsersToChatQuery({ variables: { auth0Id: currentUserAuth0Id } })
|
|
53
|
-
// const currentUserRes = useCurrentUserQuery({ variables: { auth0Id: currentUserAuth0Id } })
|
|
54
|
-
const { data, loading, error, refetch } = getChannel;
|
|
55
|
-
// const allChannels = useGetAllChannelQuery()
|
|
56
|
-
const [addMemberToChannelMutationInput, addMemberToChannelMutationResponse] = useAddMemberToChannelMutation({
|
|
57
|
-
update: (cache, mutationResult) => {
|
|
58
|
-
cache.modify({
|
|
59
|
-
fields: {
|
|
60
|
-
channels(existingChannels, { toReference }) {
|
|
61
|
-
return [...existingChannels, mutationResult];
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const [sendMessagesMutationInput, sendMessagesMutationResponase] = useSendMessagesMutation({
|
|
69
|
-
update: (cache, mutationResult) => {
|
|
70
|
-
cache.modify({
|
|
71
|
-
fields: {
|
|
72
|
-
messages(existingMessages, { toReference }) {
|
|
73
|
-
return { ...existingMessages, data: toReference(mutationResult.data.sendMessage) };
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const [createDirectChannel, addedDirectChannel] = useAddDirectChannelMutation({
|
|
81
|
-
update: (cache, mutationResult) => {
|
|
82
|
-
navigate(
|
|
83
|
-
`/o/${location.pathname.split('/')[2]}/dashboard/message/${
|
|
84
|
-
mutationResult.data.createDirectChannel.displayName.split('_').length === 2
|
|
85
|
-
? mutationResult.data.createDirectChannel.displayName.split('_')[0].split('-')[0] !==
|
|
86
|
-
currentUser.id
|
|
87
|
-
? mutationResult.data.createDirectChannel.displayName.split('_')[0].split('-')[1]
|
|
88
|
-
: mutationResult.data.createDirectChannel.displayName.split('_')[1].split('-')[1]
|
|
89
|
-
: mutationResult.data.createDirectChannel.title
|
|
90
|
-
}`,
|
|
91
|
-
{
|
|
92
|
-
state: {
|
|
93
|
-
channel: mutationResult.data.createDirectChannel,
|
|
94
|
-
currentUser: currentUserRes.data.currentUser,
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
);
|
|
98
|
-
cache.modify({
|
|
99
|
-
fields: {
|
|
100
|
-
channels(existingChannels, { toReference }) {
|
|
101
|
-
return [...existingChannels, mutationResult];
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
const [createChannel, createdChannel] = useAddChannelMutation({
|
|
109
|
-
update: (cache, mutationResult) => {
|
|
110
|
-
navigate(
|
|
111
|
-
`/o/${location.pathname.split('/')[2]}/dashboard/channel/${mutationResult.data.createChannel.title}`,
|
|
112
|
-
{
|
|
113
|
-
state: {
|
|
114
|
-
channel: mutationResult.data.createChannel,
|
|
115
|
-
currentUser: currentUserRes.data.currentUser,
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
);
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
useEffect(() => {
|
|
123
|
-
if (!currentUserRes.loading) {
|
|
124
|
-
setCurrentUser(currentUserRes.data.currentUser);
|
|
125
|
-
}
|
|
126
|
-
}, [currentUserRes.data, currentUserRes.loading]);
|
|
127
|
-
|
|
128
|
-
const handleJoin = (channelId) => {
|
|
129
|
-
addMemberToChannelMutationInput({
|
|
130
|
-
variables: {
|
|
131
|
-
channelId: channelId,
|
|
132
|
-
memberId: currentUser.id,
|
|
133
|
-
},
|
|
134
|
-
}).then((response) => {
|
|
135
|
-
setClickedChannel(response.data.addMemberToChannel);
|
|
136
|
-
// setShowDirectMore(false)
|
|
137
|
-
setDirectMoreModal({ ...directMoreModal, showDirectMore: false });
|
|
138
|
-
sendMessagesMutationInput({
|
|
139
|
-
variables: {
|
|
140
|
-
channelId: channelId,
|
|
141
|
-
content: t('messenger_box_browser.username_joined_the_channel', { username: currentUser.username }),
|
|
142
|
-
files: [],
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
// refetch().then((value => {
|
|
147
|
-
// setChannels(value.data.channelsByUser)
|
|
148
|
-
// setChannelInput({})
|
|
149
|
-
// }))
|
|
150
|
-
// allChannels.refetch()
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
const handleGo = () => {
|
|
154
|
-
// console.log('------directModal------', directModal)
|
|
155
|
-
if (selectedValues) {
|
|
156
|
-
let uids = [];
|
|
157
|
-
let dName = currentUser.username + ',';
|
|
158
|
-
if (selectedValues.length > 1) {
|
|
159
|
-
selectedValues.forEach((i) => {
|
|
160
|
-
uids.push(i.value.uid);
|
|
161
|
-
dName += i.value.username;
|
|
162
|
-
if (indexOf(selectedValues, i) + 1 !== selectedValues.length) {
|
|
163
|
-
dName += ',';
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
} else {
|
|
167
|
-
uids.push(selectedValues[0].value.uid);
|
|
168
|
-
dName = `${selectedValues[0].value.uid}-${selectedValues[0].value.username}_${currentUser.id}-${currentUser.username}`;
|
|
169
|
-
}
|
|
170
|
-
createDirectChannel({
|
|
171
|
-
variables: {
|
|
172
|
-
receiver: uids,
|
|
173
|
-
displayName: dName,
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
handleClose('directChannel');
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
useEffect(() => {
|
|
181
|
-
if (!addedDirectChannel.loading && addedDirectChannel.data) {
|
|
182
|
-
setClickedChannel(addedDirectChannel.data.createDirectChannel);
|
|
183
|
-
setSelectedValues([]);
|
|
184
|
-
}
|
|
185
|
-
}, [addedDirectChannel.loading, addedDirectChannel.data]);
|
|
186
|
-
|
|
187
|
-
useEffect(() => {
|
|
188
|
-
if (!usersToChat.loading) {
|
|
189
|
-
let tempOpt = [];
|
|
190
|
-
usersToChat.data.usersToChat.map((usr) => {
|
|
191
|
-
tempOpt.push({
|
|
192
|
-
value: { username: `${usr.username}`, uid: `${usr.id}` },
|
|
193
|
-
label: (
|
|
194
|
-
<div style={{ cursor: 'pointer' }}>
|
|
195
|
-
<Comment
|
|
196
|
-
className="cmt_cls"
|
|
197
|
-
author={'@' + usr.username}
|
|
198
|
-
avatar={
|
|
199
|
-
<Avatar
|
|
200
|
-
style={{
|
|
201
|
-
backgroundColor: `#${Math.floor(Math.random() * 16777215).toString(16)}`,
|
|
202
|
-
}}
|
|
203
|
-
>
|
|
204
|
-
{usr.username
|
|
205
|
-
.match(/\b(\w)/g)
|
|
206
|
-
.join('')
|
|
207
|
-
.toUpperCase()}
|
|
208
|
-
</Avatar>
|
|
209
|
-
}
|
|
210
|
-
content={usr.email}
|
|
211
|
-
/>
|
|
212
|
-
</div>
|
|
213
|
-
),
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
setOptions(tempOpt);
|
|
217
|
-
}
|
|
218
|
-
}, [usersToChat.data, usersToChat.loading]);
|
|
219
|
-
|
|
220
|
-
const refetchCall = () => {
|
|
221
|
-
// setClickedChannel({})
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
useEffect(() => {
|
|
225
|
-
if (!loading) {
|
|
226
|
-
let diChal = [];
|
|
227
|
-
let fChannel = [];
|
|
228
|
-
let joinedChannel = [];
|
|
229
|
-
let modelChannel = [];
|
|
230
|
-
|
|
231
|
-
if (!currentUserRes.loading && !allChannels.loading) {
|
|
232
|
-
let uc = [];
|
|
233
|
-
data.channelsByUser.forEach((u) => uc.push(u.id));
|
|
234
|
-
let ac = [];
|
|
235
|
-
allChannels.data.channels.forEach((a) => ac.push(a.id));
|
|
236
|
-
diChal = ac.filter((t) => !uc.includes(t));
|
|
237
|
-
allChannels.data.channels.filter((dc) => {
|
|
238
|
-
if (diChal.includes(dc.id)) {
|
|
239
|
-
dc.members.forEach((m) => {
|
|
240
|
-
if (m.user === currentUser.id) {
|
|
241
|
-
fChannel.push(dc);
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
allChannels.data.channels.filter(async (chl) => {
|
|
247
|
-
if (chl.type !== 'DIRECT') {
|
|
248
|
-
let isMember = false;
|
|
249
|
-
await chl.members.forEach((c) => {
|
|
250
|
-
if (c.user === currentUser.id) {
|
|
251
|
-
joinedChannel.push(chl);
|
|
252
|
-
isMember = true;
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
if (isMember === false) {
|
|
256
|
-
modelChannel.push(chl);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
// setChannels([...data.channelsByUser, ...fChannel])
|
|
262
|
-
setPublicChannels(joinedChannel);
|
|
263
|
-
// setModalPublicChannels(modelChannel)
|
|
264
|
-
setDirectMoreModal({ ...directMoreModal, modalPublicChannels: modelChannel });
|
|
265
|
-
setDirectChannels([
|
|
266
|
-
...data.channelsByUser.filter((chl) => chl.type === 'DIRECT'),
|
|
267
|
-
...fChannel.filter((chl) => chl.type === 'DIRECT'),
|
|
268
|
-
]);
|
|
269
|
-
}
|
|
270
|
-
}, [loading, data, allChannels.loading, allChannels.data, currentUser, currentUserRes.loading]);
|
|
271
|
-
|
|
272
|
-
const handleCreate = () => {
|
|
273
|
-
createChannel({
|
|
274
|
-
variables: {
|
|
275
|
-
name: channelInput.name,
|
|
276
|
-
description: channelInput.description,
|
|
277
|
-
},
|
|
278
|
-
});
|
|
279
|
-
setPublicChlModal({ ...publicChlModal, show: false });
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
useEffect(() => {
|
|
283
|
-
if (!createdChannel.loading && createdChannel.data) {
|
|
284
|
-
setClickedChannel(createdChannel.data.createChannel);
|
|
285
|
-
}
|
|
286
|
-
}, [createdChannel.loading, createdChannel.data]);
|
|
287
|
-
|
|
288
|
-
const handleClose = (name) => {
|
|
289
|
-
if (name === 'publicChannel') {
|
|
290
|
-
setPublicChlModal({ ...publicChlModal, show: false });
|
|
291
|
-
} else if (name === 'directChannel') {
|
|
292
|
-
setShowDirectChl(false);
|
|
293
|
-
} else if (name === 'publicMore') {
|
|
294
|
-
setDirectMoreModal({ ...directMoreModal, showDirectMore: false });
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
const handleShow = (name, type?) => {
|
|
298
|
-
if (name === 'publicChannel') {
|
|
299
|
-
setPublicChlModal({ ...publicChlModal, show: true });
|
|
300
|
-
handleClose('publicMore');
|
|
301
|
-
} else if (name === 'directChannel') {
|
|
302
|
-
setShowDirectChl(true);
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
const handleChange = (e) => {
|
|
307
|
-
setChannelInput({ ...channelInput, [e.target.name]: e.target.value });
|
|
308
|
-
};
|
|
309
|
-
const handleChannelClick = (channel) => {
|
|
310
|
-
setClickedChannel(channel);
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
useEffect(() => {
|
|
314
|
-
if (!addedDirectChannel.loading && addedDirectChannel.data) {
|
|
315
|
-
setClickedChannel(addedDirectChannel.data.createDirectChannel);
|
|
316
|
-
}
|
|
317
|
-
}, [addedDirectChannel.loading, addedDirectChannel.data]);
|
|
318
|
-
|
|
319
|
-
const handleClass = () => {
|
|
320
|
-
const oldClasses = classes;
|
|
321
|
-
if (!oldClasses.left_bar.split(' ').includes('drawer_style')) {
|
|
322
|
-
setClasses({
|
|
323
|
-
left_bar: `${oldClasses.left_bar} drawer_style`,
|
|
324
|
-
root_div: `${oldClasses.root_div} clicked_class`,
|
|
325
|
-
});
|
|
326
|
-
} else {
|
|
327
|
-
setClasses({ left_bar: 'left_bar', root_div: 'root_div' });
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
const handleSelect = (selectedOption) => {
|
|
332
|
-
setSelectedValues(selectedOption);
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
useEffect(() => {
|
|
336
|
-
setDirectMoreModal({ ...directMoreModal, ...{ handleJoin: handleJoin, handleShow: handleShow } });
|
|
337
|
-
}, []);
|
|
338
|
-
|
|
339
|
-
return (
|
|
340
|
-
<div className={css(styleSheet.customStyle)}>
|
|
341
|
-
<div className={classes.root_div}>
|
|
342
|
-
<DirectModal
|
|
343
|
-
handleClose={handleClose}
|
|
344
|
-
handleGo={handleGo}
|
|
345
|
-
handleSelect={handleSelect}
|
|
346
|
-
selectedValues={selectedValues}
|
|
347
|
-
showDirectChl={showDirectChl}
|
|
348
|
-
options={options}
|
|
349
|
-
/>
|
|
350
|
-
<Modals
|
|
351
|
-
directMoreModal={directMoreModal}
|
|
352
|
-
publicChlModal={publicChlModal}
|
|
353
|
-
handleChange={handleChange}
|
|
354
|
-
handleClose={handleClose}
|
|
355
|
-
handleCreate={handleCreate}
|
|
356
|
-
/>
|
|
357
|
-
<MenuHeader clickedChannel={clickedChannel} handleClass={handleClass} />
|
|
358
|
-
<div
|
|
359
|
-
className="dashboard_window"
|
|
360
|
-
onClick={() => {
|
|
361
|
-
if (classes.root_div.split(' ').length > 1) {
|
|
362
|
-
handleClass();
|
|
363
|
-
}
|
|
364
|
-
}}
|
|
365
|
-
>
|
|
366
|
-
<div className={classes.left_bar}>
|
|
367
|
-
<div className="nav-pills__container">
|
|
368
|
-
<ul>
|
|
369
|
-
<li id="li1" className="sidebar-section__header">
|
|
370
|
-
<h4>
|
|
371
|
-
<span>{t('messenger_box_browser.PUBLIC_CHANNELS')}</span>
|
|
372
|
-
</h4>
|
|
373
|
-
<button
|
|
374
|
-
className="add-channel-btn"
|
|
375
|
-
onClick={() => handleShow('publicChannel', 'Public Channel')}
|
|
376
|
-
>
|
|
377
|
-
<span>+</span>
|
|
378
|
-
</button>
|
|
379
|
-
</li>
|
|
380
|
-
{/*{publicChannels.filter((item, index) => index < 3).map((chl, index) => {*/}
|
|
381
|
-
{publicChannels.map((chl, index) => {
|
|
382
|
-
return (
|
|
383
|
-
<Link
|
|
384
|
-
to={{
|
|
385
|
-
pathname: `/o/${location.pathname.split('/')[2]}/dashboard/channel/${
|
|
386
|
-
chl.title
|
|
387
|
-
}`,
|
|
388
|
-
}}
|
|
389
|
-
state={{ channel: chl, currentUser: currentUserRes.data.currentUser }}
|
|
390
|
-
>
|
|
391
|
-
<li className="">
|
|
392
|
-
<a className="sidebar-item" onClick={() => handleChannelClick(chl)}>
|
|
393
|
-
<span className="icon icon__globe">
|
|
394
|
-
<BsGlobe2 />
|
|
395
|
-
</span>
|
|
396
|
-
<span className="sidebar-item__name">
|
|
397
|
-
<span>{chl.title}</span>
|
|
398
|
-
</span>
|
|
399
|
-
</a>
|
|
400
|
-
</li>
|
|
401
|
-
</Link>
|
|
402
|
-
);
|
|
403
|
-
})}
|
|
404
|
-
<li>
|
|
405
|
-
<button
|
|
406
|
-
id="sidebarPublicChannelsMore"
|
|
407
|
-
className="nav-more"
|
|
408
|
-
onClick={() =>
|
|
409
|
-
setDirectMoreModal({
|
|
410
|
-
...directMoreModal,
|
|
411
|
-
showDirectMore: true,
|
|
412
|
-
})
|
|
413
|
-
}
|
|
414
|
-
>
|
|
415
|
-
<span>{t('messenger_box_browser.more')}</span>
|
|
416
|
-
</button>
|
|
417
|
-
</li>
|
|
418
|
-
</ul>
|
|
419
|
-
<ul>
|
|
420
|
-
<li className="sidebar-section__header">
|
|
421
|
-
<h4>
|
|
422
|
-
<span>{t('messenger_box_browser.PRIVATE_CHANNELS')}</span>
|
|
423
|
-
</h4>
|
|
424
|
-
<button className="add-channel-btn">
|
|
425
|
-
<span>+</span>
|
|
426
|
-
</button>
|
|
427
|
-
</li>
|
|
428
|
-
</ul>
|
|
429
|
-
<ul>
|
|
430
|
-
<li className="sidebar-section__header">
|
|
431
|
-
<h4>
|
|
432
|
-
<span>{t('messenger_box_browser.DIRECT_MESSAGES')}</span>
|
|
433
|
-
</h4>
|
|
434
|
-
<button className="add-channel-btn" onClick={() => handleShow('directChannel')}>
|
|
435
|
-
<span>+</span>
|
|
436
|
-
</button>
|
|
437
|
-
</li>
|
|
438
|
-
{directChannels.map((cnl) => {
|
|
439
|
-
return (
|
|
440
|
-
<Link
|
|
441
|
-
to={{
|
|
442
|
-
pathname: `/o/${location.pathname.split('/')[2]}/dashboard/message/${
|
|
443
|
-
cnl.displayName.split('_').length === 2
|
|
444
|
-
? cnl.displayName.split('_')[0].split('-')[0] !== currentUser.id
|
|
445
|
-
? cnl.displayName.split('_')[0].split('-')[1]
|
|
446
|
-
: cnl.displayName.split('_')[1].split('-')[1]
|
|
447
|
-
: cnl.title
|
|
448
|
-
}`,
|
|
449
|
-
}}
|
|
450
|
-
state={{
|
|
451
|
-
channel: cnl,
|
|
452
|
-
currentUser: currentUserRes.data.currentUser,
|
|
453
|
-
}}
|
|
454
|
-
>
|
|
455
|
-
{/*{cnl.displayName === 'surveybot' ?*/}
|
|
456
|
-
{/* <li className="active">*/}
|
|
457
|
-
{/* <a className="sidebar-item has-close"*/}
|
|
458
|
-
{/* onClick={() => handleChannelClick(cnl)}>*/}
|
|
459
|
-
{/* <span className="icon icon__globe"><FaRobot/></span>*/}
|
|
460
|
-
{/* <span*/}
|
|
461
|
-
{/* className="sidebar-item__name"><span>surveybot</span></span>*/}
|
|
462
|
-
{/* </a>*/}
|
|
463
|
-
{/* </li> :*/}
|
|
464
|
-
<li className="active">
|
|
465
|
-
<a
|
|
466
|
-
className="sidebar-item has-close"
|
|
467
|
-
onClick={() => handleChannelClick(cnl)}
|
|
468
|
-
>
|
|
469
|
-
{cnl.displayName.split(',').length > 1 ? (
|
|
470
|
-
<span className="num_style">
|
|
471
|
-
{cnl.displayName.split(',').length}
|
|
472
|
-
</span>
|
|
473
|
-
) : (
|
|
474
|
-
<span className="icon icon__globe" color="white">
|
|
475
|
-
<RiAdminFill />
|
|
476
|
-
</span>
|
|
477
|
-
)}
|
|
478
|
-
<span className="sidebar-item__name">
|
|
479
|
-
{/*<span>*/}
|
|
480
|
-
{cnl.displayName.split('_').length === 2
|
|
481
|
-
? cnl.displayName.split('_')[0].split('-')[0] !==
|
|
482
|
-
currentUser.id
|
|
483
|
-
? cnl.displayName.split('_')[0].split('-')[1]
|
|
484
|
-
: cnl.displayName.split('_')[1].split('-')[1]
|
|
485
|
-
: cnl.displayName}
|
|
486
|
-
{/*</span>*/}
|
|
487
|
-
</span>
|
|
488
|
-
</a>
|
|
489
|
-
</li>
|
|
490
|
-
|
|
491
|
-
{/*}*/}
|
|
492
|
-
</Link>
|
|
493
|
-
);
|
|
494
|
-
})}
|
|
495
|
-
</ul>
|
|
496
|
-
</div>
|
|
497
|
-
</div>
|
|
498
|
-
<div className="route_view">
|
|
499
|
-
<Routes>
|
|
500
|
-
{dashboardRoutes.map((route, index) => (
|
|
501
|
-
<Route key={index} path={route.path} children={<route.component />} />
|
|
502
|
-
))}
|
|
503
|
-
</Routes>
|
|
504
|
-
</div>
|
|
505
|
-
{/*Add channel Modal*/}
|
|
506
|
-
|
|
507
|
-
{/*{clickedChannel.id ? <div className="main_wraper">*/}
|
|
508
|
-
{/* <IntlProvider locale="en">*/}
|
|
509
|
-
{/* <div className='chat_head_mid'>*/}
|
|
510
|
-
{/* <PostViewPage channel={clickedChannel}*/}
|
|
511
|
-
{/* currentUsrId={currentUser.id}/>*/}
|
|
512
|
-
{/* </div>*/}
|
|
513
|
-
{/* <Messenger channel={clickedChannel} isRefetch={isRefetch}*/}
|
|
514
|
-
{/* currentUsrId={currentUser.id}/>*/}
|
|
515
|
-
{/* </IntlProvider>*/}
|
|
516
|
-
{/* </div>*/}
|
|
517
|
-
{/* : <h2 style={{display: 'flex', alignItems: 'center', margin: '0 auto', color: 'gray'}}>*/}
|
|
518
|
-
{/* Please select any channel*/}
|
|
519
|
-
{/* </h2>*/}
|
|
520
|
-
{/*}*/}
|
|
521
|
-
</div>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
);
|
|
525
|
-
};
|
|
526
|
-
|
|
527
|
-
export default Dashboard;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Await } from '@remix-run/react';
|
|
3
|
-
import { Spinner } from '@admin-layout/chakra-ui';
|
|
4
|
-
import { Alert } from '@chakra-ui/react';
|
|
5
|
-
import {
|
|
6
|
-
useGetChannelsByUserQuery,
|
|
7
|
-
useGetAllChannelQuery,
|
|
8
|
-
useUsersToChatQuery,
|
|
9
|
-
useCurrentUserQuery,
|
|
10
|
-
useGetAllUsersQuery,
|
|
11
|
-
} from 'common/graphql';
|
|
12
|
-
import { useSelector } from 'react-redux';
|
|
13
|
-
import Dashboard from './Dashboard';
|
|
14
|
-
|
|
15
|
-
const DashboardWithLoader = (props) => {
|
|
16
|
-
const currentUserAuth0Id = useSelector((state: any) => state.user.authUserId);
|
|
17
|
-
|
|
18
|
-
const allUsers = useGetAllUsersQuery({ variables: {}, fetchPolicy: 'cache-only' });
|
|
19
|
-
const usersToChat = useUsersToChatQuery({ variables: { auth0Id: currentUserAuth0Id }, fetchPolicy: 'cache-only' });
|
|
20
|
-
const currentUserRes = useCurrentUserQuery({
|
|
21
|
-
variables: { auth0Id: currentUserAuth0Id },
|
|
22
|
-
fetchPolicy: 'cache-only',
|
|
23
|
-
});
|
|
24
|
-
const getChannel = useGetChannelsByUserQuery({ variables: {}, fetchPolicy: 'cache-only' });
|
|
25
|
-
const allChannels = useGetAllChannelQuery({ variables: {}, fetchPolicy: 'cache-only' });
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<React.Suspense fallback={<Spinner></Spinner>}>
|
|
29
|
-
<Await
|
|
30
|
-
resolve={Promise.all([allUsers, usersToChat, currentUserRes, allChannels, getChannel])}
|
|
31
|
-
errorElement={<Alert>Error loading Dashboard page!</Alert>}
|
|
32
|
-
>
|
|
33
|
-
<Dashboard data={[allUsers, usersToChat, currentUserRes, allChannels, getChannel]} {...props} />
|
|
34
|
-
</Await>
|
|
35
|
-
</React.Suspense>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
export default DashboardWithLoader;
|
package/src/containers/Inbox.tsx
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PostViewPage } from './../components/post/index';
|
|
3
|
-
import InboxMessage from '../components/InboxMessage';
|
|
4
|
-
|
|
5
|
-
const Inbox= () => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<InboxMessage />
|
|
9
|
-
</>
|
|
10
|
-
);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default Inbox;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {PostViewPage} from './../components/post/index';
|
|
3
|
-
import {MessengerComponent} from './../components/messenger'
|
|
4
|
-
|
|
5
|
-
interface ChannelProps {
|
|
6
|
-
channel: any
|
|
7
|
-
currentUsrId: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Messenger: React.FC<ChannelProps> = ({channel, currentUsrId}) => {
|
|
11
|
-
return (
|
|
12
|
-
<>
|
|
13
|
-
{channel ? <MessengerComponent channel={channel} currentUsrId={currentUsrId}/> : ''}
|
|
14
|
-
</>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default Messenger;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// import * as React from 'react';
|
|
2
|
-
// import { shallow } from 'enzyme';
|
|
3
|
-
// import { createStore } from 'redux';
|
|
4
|
-
// import * as PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
|
-
// declare function require(name: string);
|
|
7
|
-
// import * as TestUtils from 'react-addons-test-utils';
|
|
8
|
-
|
|
9
|
-
// import ApolloClient from 'apollo-client';
|
|
10
|
-
// import { ApolloProvider } from 'react-apollo';
|
|
11
|
-
// import { InMemoryCache } from 'apollo-cache-inmemory';
|
|
12
|
-
// import { ApolloLink, Observable } from 'apollo-link';
|
|
13
|
-
// import { addTypenameToDocument } from 'apollo-utilities';
|
|
14
|
-
|
|
15
|
-
// interface ChildContext {
|
|
16
|
-
// store: Object;
|
|
17
|
-
// client: Object;
|
|
18
|
-
// }
|
|
19
|
-
|
|
20
|
-
// describe('<ApolloProvider /> Component', () => {
|
|
21
|
-
|
|
22
|
-
// class Child extends React.Component<any, { store: any, client: any }> {
|
|
23
|
-
// public static contextTypes: React.ValidationMap<any> = {
|
|
24
|
-
// client: PropTypes.object.isRequired,
|
|
25
|
-
// store: PropTypes.object.isRequired,
|
|
26
|
-
// };
|
|
27
|
-
|
|
28
|
-
// public context: ChildContext;
|
|
29
|
-
|
|
30
|
-
// public render() {
|
|
31
|
-
// return <div />;
|
|
32
|
-
// }
|
|
33
|
-
// }
|
|
34
|
-
|
|
35
|
-
// const cache = new InMemoryCache();
|
|
36
|
-
// const client = new ApolloClient();
|
|
37
|
-
// const store = createStore(() => ({}));
|
|
38
|
-
|
|
39
|
-
// it('should render children components', () => {
|
|
40
|
-
// const wrapper = shallow(
|
|
41
|
-
// <ApolloProvider store={store} client={client}>
|
|
42
|
-
// <div className="unique" />
|
|
43
|
-
// </ApolloProvider>,
|
|
44
|
-
// );
|
|
45
|
-
|
|
46
|
-
// expect(wrapper.contains(<div className="unique" />)).toBe(true);
|
|
47
|
-
// });
|
|
48
|
-
// });
|