@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
package/src/components/post_view/message_attachments/message_attachment/message_attachment.tsx
DELETED
|
@@ -1,544 +0,0 @@
|
|
|
1
|
-
// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
|
-
// // See LICENSE.txt for license information.
|
|
3
|
-
// /* eslint-disable react/no-string-refs */
|
|
4
|
-
|
|
5
|
-
// import React, {CSSProperties} from 'react';
|
|
6
|
-
// import truncate from 'lodash/truncate';
|
|
7
|
-
|
|
8
|
-
// import {ActionResult} from 'mattermost-redux/types/actions';
|
|
9
|
-
// import {PostAction, PostActionOption} from 'mattermost-redux/types/integration_actions';
|
|
10
|
-
// import {MessageAttachment as MessageAttachmentType, MessageAttachmentField} from 'mattermost-redux/types/message_attachments';
|
|
11
|
-
// import {Dictionary} from 'mattermost-redux/types/utilities';
|
|
12
|
-
// import {PostImage} from 'mattermost-redux/types/posts';
|
|
13
|
-
|
|
14
|
-
// import {isUrlSafe} from 'utils/url';
|
|
15
|
-
// import {Constants} from 'utils/constants';
|
|
16
|
-
// import * as Utils from 'utils/utils';
|
|
17
|
-
// import LinkOnlyRenderer from 'utils/markdown/link_only_renderer';
|
|
18
|
-
// import {TextFormattingOptions} from 'utils/text_formatting';
|
|
19
|
-
|
|
20
|
-
// import ExternalImage from 'components/external_image';
|
|
21
|
-
// import Markdown from 'components/markdown';
|
|
22
|
-
// import ShowMore from 'components/post_view/show_more';
|
|
23
|
-
// import SizeAwareImage from 'components/size_aware_image';
|
|
24
|
-
|
|
25
|
-
// import ActionButton from '../action_button';
|
|
26
|
-
// import ActionMenu from '../action_menu';
|
|
27
|
-
|
|
28
|
-
// import {trackEvent} from 'actions/telemetry_actions';
|
|
29
|
-
|
|
30
|
-
// type Props = {
|
|
31
|
-
|
|
32
|
-
// /**
|
|
33
|
-
// * The post id
|
|
34
|
-
// */
|
|
35
|
-
// postId: string;
|
|
36
|
-
|
|
37
|
-
// /**
|
|
38
|
-
// * The attachment to render
|
|
39
|
-
// */
|
|
40
|
-
// attachment: MessageAttachmentType;
|
|
41
|
-
|
|
42
|
-
// /**
|
|
43
|
-
// * Options specific to text formatting
|
|
44
|
-
// */
|
|
45
|
-
// options?: Partial<TextFormattingOptions>;
|
|
46
|
-
|
|
47
|
-
// /**
|
|
48
|
-
// * images object for dimensions
|
|
49
|
-
// */
|
|
50
|
-
// imagesMetadata?: Dictionary<PostImage>;
|
|
51
|
-
|
|
52
|
-
// actions: {
|
|
53
|
-
// doPostActionWithCookie: (postId: string, actionId: string, actionCookie: string, selectedOption?: string) => Promise<ActionResult>;
|
|
54
|
-
// };
|
|
55
|
-
|
|
56
|
-
// currentRelativeTeamUrl: string;
|
|
57
|
-
// }
|
|
58
|
-
|
|
59
|
-
// type State = {
|
|
60
|
-
// checkOverflow: number;
|
|
61
|
-
// actionExecuting: boolean;
|
|
62
|
-
// actionExecutingMessage: string | null;
|
|
63
|
-
// }
|
|
64
|
-
|
|
65
|
-
// export default class MessageAttachment extends React.PureComponent<Props, State> {
|
|
66
|
-
// private mounted = false;
|
|
67
|
-
// private imageProps = {};
|
|
68
|
-
|
|
69
|
-
// constructor(props: Props) {
|
|
70
|
-
// super(props);
|
|
71
|
-
|
|
72
|
-
// this.state = {
|
|
73
|
-
// checkOverflow: 0,
|
|
74
|
-
// actionExecuting: false,
|
|
75
|
-
// actionExecutingMessage: null,
|
|
76
|
-
// };
|
|
77
|
-
|
|
78
|
-
// this.imageProps = {
|
|
79
|
-
// onImageLoaded: this.handleHeightReceived,
|
|
80
|
-
// onImageHeightChanged: this.checkPostOverflow,
|
|
81
|
-
// };
|
|
82
|
-
// }
|
|
83
|
-
|
|
84
|
-
// componentDidMount() {
|
|
85
|
-
// this.mounted = true;
|
|
86
|
-
// }
|
|
87
|
-
|
|
88
|
-
// componentWillUnmount() {
|
|
89
|
-
// this.mounted = false;
|
|
90
|
-
// }
|
|
91
|
-
|
|
92
|
-
// handleHeightReceivedForThumbUrl = ({height}: {height: number}) => {
|
|
93
|
-
// const {attachment} = this.props;
|
|
94
|
-
// if (!this.props.imagesMetadata || (this.props.imagesMetadata && !this.props.imagesMetadata[attachment.thumb_url])) {
|
|
95
|
-
// this.handleHeightReceived(height);
|
|
96
|
-
// }
|
|
97
|
-
// }
|
|
98
|
-
|
|
99
|
-
// handleHeightReceivedForImageUrl = ({height}: {height: number}) => {
|
|
100
|
-
// const {attachment} = this.props;
|
|
101
|
-
// if (!this.props.imagesMetadata || (this.props.imagesMetadata && !this.props.imagesMetadata[attachment.image_url])) {
|
|
102
|
-
// this.handleHeightReceived(height);
|
|
103
|
-
// }
|
|
104
|
-
// }
|
|
105
|
-
|
|
106
|
-
// handleHeightReceived = (height: number) => {
|
|
107
|
-
// if (!this.mounted) {
|
|
108
|
-
// return;
|
|
109
|
-
// }
|
|
110
|
-
|
|
111
|
-
// if (height > 0) {
|
|
112
|
-
// this.checkPostOverflow();
|
|
113
|
-
// }
|
|
114
|
-
// };
|
|
115
|
-
|
|
116
|
-
// checkPostOverflow = () => {
|
|
117
|
-
// // Increment checkOverflow to indicate change in height
|
|
118
|
-
// // and recompute textContainer height at ShowMore component
|
|
119
|
-
// // and see whether overflow text of show more/less is necessary or not.
|
|
120
|
-
// this.setState((prevState) => {
|
|
121
|
-
// return {checkOverflow: prevState.checkOverflow + 1};
|
|
122
|
-
// });
|
|
123
|
-
// }
|
|
124
|
-
|
|
125
|
-
// renderPostActions = () => {
|
|
126
|
-
// const actions = this.props.attachment.actions;
|
|
127
|
-
// if (!actions || !actions.length) {
|
|
128
|
-
// return '';
|
|
129
|
-
// }
|
|
130
|
-
|
|
131
|
-
// const content = [] as JSX.Element[];
|
|
132
|
-
|
|
133
|
-
// actions.forEach((action: PostAction) => {
|
|
134
|
-
// if (!action.id || !action.name) {
|
|
135
|
-
// return;
|
|
136
|
-
// }
|
|
137
|
-
|
|
138
|
-
// switch (action.type) {
|
|
139
|
-
// case 'select':
|
|
140
|
-
// content.push(
|
|
141
|
-
// <ActionMenu
|
|
142
|
-
// key={action.id}
|
|
143
|
-
// postId={this.props.postId}
|
|
144
|
-
// action={action}
|
|
145
|
-
// disabled={action.disabled}
|
|
146
|
-
// />,
|
|
147
|
-
// );
|
|
148
|
-
// break;
|
|
149
|
-
// case 'button':
|
|
150
|
-
// default:
|
|
151
|
-
// content.push(
|
|
152
|
-
// <ActionButton
|
|
153
|
-
// key={action.id}
|
|
154
|
-
// action={action}
|
|
155
|
-
// disabled={action.disabled}
|
|
156
|
-
// handleAction={this.handleAction}
|
|
157
|
-
// actionExecuting={this.state.actionExecuting}
|
|
158
|
-
// actionExecutingMessage={this.state.actionExecutingMessage || undefined}
|
|
159
|
-
// />,
|
|
160
|
-
// );
|
|
161
|
-
// break;
|
|
162
|
-
// }
|
|
163
|
-
// });
|
|
164
|
-
|
|
165
|
-
// return (
|
|
166
|
-
// <div
|
|
167
|
-
// className='attachment-actions'
|
|
168
|
-
// >
|
|
169
|
-
// {content}
|
|
170
|
-
// </div>
|
|
171
|
-
// );
|
|
172
|
-
// };
|
|
173
|
-
|
|
174
|
-
// handleAction = (e: React.MouseEvent, actionOptions?: PostActionOption[]) => {
|
|
175
|
-
// e.preventDefault();
|
|
176
|
-
|
|
177
|
-
// const actionExecutingMessage = this.getActionOption(actionOptions, 'ActionExecutingMessage');
|
|
178
|
-
// if (actionExecutingMessage) {
|
|
179
|
-
// this.setState({actionExecuting: true, actionExecutingMessage: actionExecutingMessage.value});
|
|
180
|
-
// }
|
|
181
|
-
|
|
182
|
-
// const trackOption = this.getActionOption(actionOptions, 'TrackEventId');
|
|
183
|
-
// if (trackOption) {
|
|
184
|
-
// trackEvent('admin', 'click_warn_metric_bot_id', {metric: trackOption.value});
|
|
185
|
-
// }
|
|
186
|
-
|
|
187
|
-
// const actionId = e.currentTarget.getAttribute('data-action-id') || '';
|
|
188
|
-
// const actionCookie = e.currentTarget.getAttribute('data-action-cookie') || '';
|
|
189
|
-
|
|
190
|
-
// this.props.actions.doPostActionWithCookie(this.props.postId, actionId, actionCookie).then(() => {
|
|
191
|
-
// this.handleCustomActions(actionOptions);
|
|
192
|
-
// if (actionExecutingMessage) {
|
|
193
|
-
// this.setState({actionExecuting: false, actionExecutingMessage: null});
|
|
194
|
-
// }
|
|
195
|
-
// });
|
|
196
|
-
// };
|
|
197
|
-
|
|
198
|
-
// handleCustomActions = (actionOptions?: PostActionOption[]) => {
|
|
199
|
-
// const extUrlOption = this.getActionOption(actionOptions, 'WarnMetricMailtoUrl');
|
|
200
|
-
// if (extUrlOption) {
|
|
201
|
-
// const mailtoPayload = JSON.parse(extUrlOption.value);
|
|
202
|
-
// window.location.href = 'mailto:' + mailtoPayload.mail_recipient + '?cc=' + mailtoPayload.mail_cc + '&subject=' + encodeURIComponent(mailtoPayload.mail_subject) + '&body=' + encodeURIComponent(mailtoPayload.mail_body);
|
|
203
|
-
// }
|
|
204
|
-
// }
|
|
205
|
-
|
|
206
|
-
// getActionOption = (actionOptions: PostActionOption[] | undefined, optionName: string) => {
|
|
207
|
-
// let opt = null;
|
|
208
|
-
// if (actionOptions) {
|
|
209
|
-
// opt = actionOptions.find((option) => option.text === optionName);
|
|
210
|
-
// }
|
|
211
|
-
// return opt;
|
|
212
|
-
// }
|
|
213
|
-
|
|
214
|
-
// getFieldsTable = () => {
|
|
215
|
-
// const fields = this.props.attachment.fields;
|
|
216
|
-
// if (!fields || !fields.length) {
|
|
217
|
-
// return '';
|
|
218
|
-
// }
|
|
219
|
-
|
|
220
|
-
// const fieldTables = [];
|
|
221
|
-
|
|
222
|
-
// let headerCols = [] as JSX.Element[];
|
|
223
|
-
// let bodyCols = [] as JSX.Element[];
|
|
224
|
-
// let rowPos = 0;
|
|
225
|
-
// let lastWasLong = false;
|
|
226
|
-
// let nrTables = 0;
|
|
227
|
-
// const markdown = {markdown: false, mentionHighlight: false};
|
|
228
|
-
|
|
229
|
-
// fields.forEach((field: MessageAttachmentField, i: number) => {
|
|
230
|
-
// if (rowPos === 2 || !(field.short === true) || lastWasLong) {
|
|
231
|
-
// fieldTables.push(
|
|
232
|
-
// <table
|
|
233
|
-
// className='attachment-fields'
|
|
234
|
-
// key={'attachment__table__' + nrTables}
|
|
235
|
-
// >
|
|
236
|
-
// <thead>
|
|
237
|
-
// <tr>
|
|
238
|
-
// {headerCols}
|
|
239
|
-
// </tr>
|
|
240
|
-
// </thead>
|
|
241
|
-
// <tbody>
|
|
242
|
-
// <tr>
|
|
243
|
-
// {bodyCols}
|
|
244
|
-
// </tr>
|
|
245
|
-
// </tbody>
|
|
246
|
-
// </table>,
|
|
247
|
-
// );
|
|
248
|
-
// headerCols = [];
|
|
249
|
-
// bodyCols = [];
|
|
250
|
-
// rowPos = 0;
|
|
251
|
-
// nrTables += 1;
|
|
252
|
-
// lastWasLong = false;
|
|
253
|
-
// }
|
|
254
|
-
// headerCols.push(
|
|
255
|
-
// <th
|
|
256
|
-
// className='attachment-field__caption'
|
|
257
|
-
// key={'attachment__field-caption-' + i + '__' + nrTables}
|
|
258
|
-
// >
|
|
259
|
-
// <Markdown
|
|
260
|
-
// message={field.title}
|
|
261
|
-
// options={markdown}
|
|
262
|
-
// postId={this.props.postId}
|
|
263
|
-
// />
|
|
264
|
-
// </th>,
|
|
265
|
-
// );
|
|
266
|
-
|
|
267
|
-
// bodyCols.push(
|
|
268
|
-
// <td
|
|
269
|
-
// className='attachment-field'
|
|
270
|
-
// key={'attachment__field-' + i + '__' + nrTables}
|
|
271
|
-
// >
|
|
272
|
-
// <Markdown
|
|
273
|
-
// message={String(field.value)}
|
|
274
|
-
// postId={this.props.postId}
|
|
275
|
-
// />
|
|
276
|
-
// </td>,
|
|
277
|
-
// );
|
|
278
|
-
// rowPos += 1;
|
|
279
|
-
// lastWasLong = !(field.short === true);
|
|
280
|
-
// });
|
|
281
|
-
// if (headerCols.length > 0) { // Flush last fields
|
|
282
|
-
// fieldTables.push(
|
|
283
|
-
// <table
|
|
284
|
-
// className='attachment-fields'
|
|
285
|
-
// key={'attachment__table__' + nrTables}
|
|
286
|
-
// >
|
|
287
|
-
// <thead>
|
|
288
|
-
// <tr>
|
|
289
|
-
// {headerCols}
|
|
290
|
-
// </tr>
|
|
291
|
-
// </thead>
|
|
292
|
-
// <tbody>
|
|
293
|
-
// <tr>
|
|
294
|
-
// {bodyCols}
|
|
295
|
-
// </tr>
|
|
296
|
-
// </tbody>
|
|
297
|
-
// </table>,
|
|
298
|
-
// );
|
|
299
|
-
// }
|
|
300
|
-
// return (
|
|
301
|
-
// <div>
|
|
302
|
-
// {fieldTables}
|
|
303
|
-
// </div>
|
|
304
|
-
// );
|
|
305
|
-
// };
|
|
306
|
-
|
|
307
|
-
// handleFormattedTextClick = (e: React.MouseEvent) => Utils.handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);
|
|
308
|
-
|
|
309
|
-
// render() {
|
|
310
|
-
// const {attachment, options} = this.props;
|
|
311
|
-
// let preTextClass = '';
|
|
312
|
-
|
|
313
|
-
// let preText;
|
|
314
|
-
// if (attachment.pretext) {
|
|
315
|
-
// preTextClass = 'attachment--pretext';
|
|
316
|
-
// preText = (
|
|
317
|
-
// <div className='attachment__thumb-pretext'>
|
|
318
|
-
// <Markdown
|
|
319
|
-
// message={attachment.pretext}
|
|
320
|
-
// postId={this.props.postId}
|
|
321
|
-
// />
|
|
322
|
-
// </div>
|
|
323
|
-
// );
|
|
324
|
-
// }
|
|
325
|
-
|
|
326
|
-
// let author = [] as JSX.Element[];
|
|
327
|
-
// if (attachment.author_name || attachment.author_icon) {
|
|
328
|
-
// if (attachment.author_icon) {
|
|
329
|
-
// author.push(
|
|
330
|
-
// <ExternalImage
|
|
331
|
-
// key={'attachment__author-icon'}
|
|
332
|
-
// src={attachment.author_icon}
|
|
333
|
-
// imageMetadata={this.props.imagesMetadata && this.props.imagesMetadata[attachment.author_icon]}
|
|
334
|
-
// >
|
|
335
|
-
// {(iconUrl) => (
|
|
336
|
-
// <img
|
|
337
|
-
// alt={'attachment author icon'}
|
|
338
|
-
// className='attachment__author-icon'
|
|
339
|
-
// src={iconUrl}
|
|
340
|
-
// height='14'
|
|
341
|
-
// width='14'
|
|
342
|
-
// />
|
|
343
|
-
// )}
|
|
344
|
-
// </ExternalImage>,
|
|
345
|
-
// );
|
|
346
|
-
// }
|
|
347
|
-
// if (attachment.author_name) {
|
|
348
|
-
// author.push(
|
|
349
|
-
// <span
|
|
350
|
-
// className='attachment__author-name'
|
|
351
|
-
// key={'attachment__author-name'}
|
|
352
|
-
// >
|
|
353
|
-
// {attachment.author_name}
|
|
354
|
-
// </span>,
|
|
355
|
-
// );
|
|
356
|
-
// }
|
|
357
|
-
// }
|
|
358
|
-
// if (attachment.author_link && isUrlSafe(attachment.author_link)) {
|
|
359
|
-
// author = [(
|
|
360
|
-
// <a
|
|
361
|
-
// href={attachment.author_link}
|
|
362
|
-
// target='_blank'
|
|
363
|
-
// rel='noopener noreferrer'
|
|
364
|
-
// key={'attachment__author-name'}
|
|
365
|
-
// >
|
|
366
|
-
// {author}
|
|
367
|
-
// </a>
|
|
368
|
-
// )];
|
|
369
|
-
// }
|
|
370
|
-
|
|
371
|
-
// let title;
|
|
372
|
-
// if (attachment.title) {
|
|
373
|
-
// if (attachment.title_link && isUrlSafe(attachment.title_link)) {
|
|
374
|
-
// title = (
|
|
375
|
-
// <h1 className='attachment__title'>
|
|
376
|
-
// <a
|
|
377
|
-
// className='attachment__title-link'
|
|
378
|
-
// href={attachment.title_link}
|
|
379
|
-
// target='_blank'
|
|
380
|
-
// rel='noopener noreferrer'
|
|
381
|
-
// >
|
|
382
|
-
// {attachment.title}
|
|
383
|
-
// </a>
|
|
384
|
-
// </h1>
|
|
385
|
-
// );
|
|
386
|
-
// } else {
|
|
387
|
-
// title = (
|
|
388
|
-
// <h1 className='attachment__title'>
|
|
389
|
-
// <Markdown
|
|
390
|
-
// message={attachment.title}
|
|
391
|
-
// options={{
|
|
392
|
-
// mentionHighlight: false,
|
|
393
|
-
// renderer: new LinkOnlyRenderer(),
|
|
394
|
-
// autolinkedUrlSchemes: [],
|
|
395
|
-
// }}
|
|
396
|
-
// postId={this.props.postId}
|
|
397
|
-
// />
|
|
398
|
-
// </h1>
|
|
399
|
-
// );
|
|
400
|
-
// }
|
|
401
|
-
// }
|
|
402
|
-
|
|
403
|
-
// let attachmentText;
|
|
404
|
-
// if (attachment.text) {
|
|
405
|
-
// attachmentText = (
|
|
406
|
-
// <ShowMore
|
|
407
|
-
// checkOverflow={this.state.checkOverflow}
|
|
408
|
-
// isAttachmentText={true}
|
|
409
|
-
// text={attachment.text}
|
|
410
|
-
// maxHeight={200}
|
|
411
|
-
// >
|
|
412
|
-
// <Markdown
|
|
413
|
-
// message={attachment.text || ''}
|
|
414
|
-
// options={options}
|
|
415
|
-
// postId={this.props.postId}
|
|
416
|
-
// imageProps={this.imageProps}
|
|
417
|
-
// />
|
|
418
|
-
// </ShowMore>
|
|
419
|
-
// );
|
|
420
|
-
// }
|
|
421
|
-
|
|
422
|
-
// let image;
|
|
423
|
-
// if (attachment.image_url) {
|
|
424
|
-
// const imageMetadata = this.props.imagesMetadata && this.props.imagesMetadata[attachment.image_url];
|
|
425
|
-
|
|
426
|
-
// image = (
|
|
427
|
-
// <div className='attachment__image-container'>
|
|
428
|
-
// <ExternalImage
|
|
429
|
-
// src={attachment.image_url}
|
|
430
|
-
// imageMetadata={imageMetadata}
|
|
431
|
-
// >
|
|
432
|
-
// {(imageUrl) => (
|
|
433
|
-
// <SizeAwareImage
|
|
434
|
-
// className='attachment__image'
|
|
435
|
-
// onImageLoaded={this.handleHeightReceivedForImageUrl}
|
|
436
|
-
// src={imageUrl}
|
|
437
|
-
// dimensions={imageMetadata}
|
|
438
|
-
// />
|
|
439
|
-
// )}
|
|
440
|
-
// </ExternalImage>
|
|
441
|
-
// </div>
|
|
442
|
-
// );
|
|
443
|
-
// }
|
|
444
|
-
|
|
445
|
-
// let footer;
|
|
446
|
-
// if (attachment.footer) {
|
|
447
|
-
// let footerIcon;
|
|
448
|
-
// if (attachment.footer_icon) {
|
|
449
|
-
// const footerIconMetadata = this.props.imagesMetadata && this.props.imagesMetadata[attachment.footer_icon];
|
|
450
|
-
|
|
451
|
-
// footerIcon = (
|
|
452
|
-
// <ExternalImage
|
|
453
|
-
// src={attachment.footer_icon}
|
|
454
|
-
// imageMetadata={footerIconMetadata}
|
|
455
|
-
// >
|
|
456
|
-
// {(footerIconUrl) => (
|
|
457
|
-
// <img
|
|
458
|
-
// alt={'attachment footer icon'}
|
|
459
|
-
// className='attachment__footer-icon'
|
|
460
|
-
// src={footerIconUrl}
|
|
461
|
-
// height='16'
|
|
462
|
-
// width='16'
|
|
463
|
-
// />
|
|
464
|
-
// )}
|
|
465
|
-
// </ExternalImage>
|
|
466
|
-
// );
|
|
467
|
-
// }
|
|
468
|
-
|
|
469
|
-
// footer = (
|
|
470
|
-
// <div className='attachment__footer-container'>
|
|
471
|
-
// {footerIcon}
|
|
472
|
-
// <span>{truncate(attachment.footer, {length: Constants.MAX_ATTACHMENT_FOOTER_LENGTH, omission: '…'})}</span>
|
|
473
|
-
// </div>
|
|
474
|
-
// );
|
|
475
|
-
// }
|
|
476
|
-
|
|
477
|
-
// let thumb;
|
|
478
|
-
// if (attachment.thumb_url) {
|
|
479
|
-
// const thumbMetadata = this.props.imagesMetadata && this.props.imagesMetadata[attachment.thumb_url];
|
|
480
|
-
|
|
481
|
-
// thumb = (
|
|
482
|
-
// <div className='attachment__thumb-container'>
|
|
483
|
-
// <ExternalImage
|
|
484
|
-
// src={attachment.thumb_url}
|
|
485
|
-
// imageMetadata={thumbMetadata}
|
|
486
|
-
// >
|
|
487
|
-
// {(thumbUrl) => (
|
|
488
|
-
// <SizeAwareImage
|
|
489
|
-
// onImageLoaded={this.handleHeightReceivedForThumbUrl}
|
|
490
|
-
// src={thumbUrl}
|
|
491
|
-
// dimensions={thumbMetadata}
|
|
492
|
-
// />
|
|
493
|
-
// )}
|
|
494
|
-
// </ExternalImage>
|
|
495
|
-
// </div>
|
|
496
|
-
// );
|
|
497
|
-
// }
|
|
498
|
-
|
|
499
|
-
// const fields = this.getFieldsTable();
|
|
500
|
-
// const actions = this.renderPostActions();
|
|
501
|
-
|
|
502
|
-
// let useBorderStyle;
|
|
503
|
-
// if (attachment.color && attachment.color[0] === '#') {
|
|
504
|
-
// useBorderStyle = {borderLeftColor: attachment.color};
|
|
505
|
-
// }
|
|
506
|
-
|
|
507
|
-
// return (
|
|
508
|
-
// <div
|
|
509
|
-
// className={'attachment ' + preTextClass}
|
|
510
|
-
// ref='attachment'
|
|
511
|
-
// onClick={this.handleFormattedTextClick}
|
|
512
|
-
// >
|
|
513
|
-
// {preText}
|
|
514
|
-
// <div className='attachment__content'>
|
|
515
|
-
// <div
|
|
516
|
-
// className={useBorderStyle ? 'clearfix attachment__container' : 'clearfix attachment__container attachment__container--' + attachment.color}
|
|
517
|
-
// style={useBorderStyle}
|
|
518
|
-
// >
|
|
519
|
-
// {author}
|
|
520
|
-
// {title}
|
|
521
|
-
// <div>
|
|
522
|
-
// <div
|
|
523
|
-
// className={thumb ? 'attachment__body' : 'attachment__body attachment__body--no_thumb'}
|
|
524
|
-
// >
|
|
525
|
-
// {attachmentText}
|
|
526
|
-
// {image}
|
|
527
|
-
// {fields}
|
|
528
|
-
// {footer}
|
|
529
|
-
// {actions}
|
|
530
|
-
// </div>
|
|
531
|
-
// {thumb}
|
|
532
|
-
// <div style={style.footer}/>
|
|
533
|
-
// </div>
|
|
534
|
-
// </div>
|
|
535
|
-
// </div>
|
|
536
|
-
// </div>
|
|
537
|
-
// );
|
|
538
|
-
// }
|
|
539
|
-
// }
|
|
540
|
-
|
|
541
|
-
// const style = {
|
|
542
|
-
// footer: {clear: 'both'} as CSSProperties,
|
|
543
|
-
// };
|
|
544
|
-
// /* eslint-enable react/no-string-refs */
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
|
-
// // See LICENSE.txt for license information.
|
|
3
|
-
// import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
// import {MessageAttachment as MessageAttachmentType} from 'mattermost-redux/types/message_attachments';
|
|
6
|
-
// import {PostImage} from 'mattermost-redux/types/posts';
|
|
7
|
-
// import {Dictionary} from 'mattermost-redux/types/utilities';
|
|
8
|
-
|
|
9
|
-
// import {TextFormattingOptions} from 'utils/text_formatting';
|
|
10
|
-
|
|
11
|
-
// import MessageAttachment from './message_attachment';
|
|
12
|
-
|
|
13
|
-
// type Props = {
|
|
14
|
-
|
|
15
|
-
// /**
|
|
16
|
-
// * The post id
|
|
17
|
-
// */
|
|
18
|
-
// postId: string;
|
|
19
|
-
|
|
20
|
-
// /**
|
|
21
|
-
// * Array of attachments to render
|
|
22
|
-
// */
|
|
23
|
-
// attachments: MessageAttachmentType[];
|
|
24
|
-
|
|
25
|
-
// /**
|
|
26
|
-
// * Options specific to text formatting
|
|
27
|
-
// */
|
|
28
|
-
// options?: Partial<TextFormattingOptions>;
|
|
29
|
-
|
|
30
|
-
// /**
|
|
31
|
-
// * Images object used for creating placeholders to prevent scroll popup
|
|
32
|
-
// */
|
|
33
|
-
// imagesMetadata?: Dictionary<PostImage>;
|
|
34
|
-
// }
|
|
35
|
-
|
|
36
|
-
// export default class MessageAttachmentList extends React.PureComponent<Props> {
|
|
37
|
-
// static defaultProps = {
|
|
38
|
-
// imagesMetadata: {},
|
|
39
|
-
// }
|
|
40
|
-
|
|
41
|
-
// render() {
|
|
42
|
-
// const content = [] as JSX.Element[];
|
|
43
|
-
// this.props.attachments.forEach((attachment, i) => {
|
|
44
|
-
// content.push(
|
|
45
|
-
// <MessageAttachment
|
|
46
|
-
// attachment={attachment}
|
|
47
|
-
// postId={this.props.postId}
|
|
48
|
-
// key={'att_' + i}
|
|
49
|
-
// options={this.props.options}
|
|
50
|
-
// imagesMetadata={this.props.imagesMetadata}
|
|
51
|
-
// />,
|
|
52
|
-
// );
|
|
53
|
-
// });
|
|
54
|
-
|
|
55
|
-
// return (
|
|
56
|
-
// <div
|
|
57
|
-
// id={`messageAttachmentList_${this.props.postId}`}
|
|
58
|
-
// className='attachment__list'
|
|
59
|
-
// >
|
|
60
|
-
// {content}
|
|
61
|
-
// </div>
|
|
62
|
-
// );
|
|
63
|
-
// }
|
|
64
|
-
// }
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`components/post_view/new_message_separator should render new_message_separator 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="new-separator"
|
|
6
|
-
>
|
|
7
|
-
<NotificationSeparator
|
|
8
|
-
id="1234"
|
|
9
|
-
>
|
|
10
|
-
<MemoizedFormattedMessage
|
|
11
|
-
defaultMessage="New Messages"
|
|
12
|
-
id="posts_view.newMsg"
|
|
13
|
-
/>
|
|
14
|
-
</NotificationSeparator>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
|
-
// // See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
// import {shallow} from 'enzyme';
|
|
5
|
-
// import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
// import NewMessageSeparator from './new_message_separator';
|
|
8
|
-
|
|
9
|
-
// describe('components/post_view/new_message_separator', () => {
|
|
10
|
-
// test('should render new_message_separator', () => {
|
|
11
|
-
// const wrapper = shallow(
|
|
12
|
-
// <NewMessageSeparator separatorId='1234'/>,
|
|
13
|
-
// );
|
|
14
|
-
// expect(wrapper).toMatchSnapshot();
|
|
15
|
-
// });
|
|
16
|
-
// });
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
|
-
// // See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
// import * as React from 'react';
|
|
5
|
-
// import {FormattedMessage} from 'react-intl';
|
|
6
|
-
|
|
7
|
-
// import NotificationSeparator from 'components/widgets/separator/notification-separator';
|
|
8
|
-
|
|
9
|
-
// type Props = {
|
|
10
|
-
// separatorId: string;
|
|
11
|
-
// wrapperRef?: React.RefObject<HTMLDivElement>;
|
|
12
|
-
// }
|
|
13
|
-
|
|
14
|
-
// export default class NewMessageSeparator extends React.PureComponent<Props> {
|
|
15
|
-
// render(): JSX.Element {
|
|
16
|
-
// return (
|
|
17
|
-
// <div
|
|
18
|
-
// ref={this.props.wrapperRef}
|
|
19
|
-
// className='new-separator'
|
|
20
|
-
// >
|
|
21
|
-
// <NotificationSeparator id={this.props.separatorId}>
|
|
22
|
-
// <FormattedMessage
|
|
23
|
-
// id='posts_view.newMsg'
|
|
24
|
-
// defaultMessage='New Messages'
|
|
25
|
-
// />
|
|
26
|
-
|
|
27
|
-
// </NotificationSeparator>
|
|
28
|
-
// </div>
|
|
29
|
-
// );
|
|
30
|
-
// }
|
|
31
|
-
// }
|