@messenger-box/platform-browser 0.0.1-alpha.42 → 0.0.1-alpha.420
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +540 -27
- package/jest.config.js +23 -7
- package/lib/components/InboxMessage/InboxDetails/index.d.ts +2 -0
- package/lib/components/InboxMessage/InboxDetails/style.d.ts +1 -0
- package/lib/components/InboxMessage/InboxSidebar/index.d.ts +11 -0
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts +1 -0
- package/lib/components/InboxMessage/Messages/index.d.ts +2 -0
- package/lib/components/InboxMessage/Messages/styles.d.ts +80 -0
- package/lib/components/InboxMessage/MessagesList/index.d.ts +2 -0
- package/lib/components/InboxMessage/Popover/index.d.ts +2 -0
- package/lib/components/InboxMessage/Popover/style.d.ts +27 -0
- package/lib/components/InboxMessage/UserModalContent/index.d.ts +2 -0
- package/lib/components/InboxMessage/UserModalContent/style.d.ts +1 -0
- package/lib/components/InboxMessage/index.d.ts +2 -0
- package/lib/components/InboxMessage/mock.d.ts +19 -0
- package/lib/components/InboxMessage/style.d.ts +1 -0
- package/lib/components/channel_view/DirectChannelView.d.ts +3 -0
- package/lib/components/channel_view/PublicChannelView.d.ts +3 -0
- package/lib/components/dashboard/menu_header.d.ts +5 -0
- package/lib/components/dashboard/modals/direct_modal.d.ts +9 -0
- package/lib/components/dashboard/modals.d.ts +8 -0
- package/lib/components/messenger/index.d.ts +6 -1
- package/lib/components/messenger/messagesList/index.d.ts +6 -4
- package/lib/components/messenger/messagesList/style.d.ts +1 -221
- package/lib/components/messenger/more_action/index.d.ts +11 -0
- package/lib/components/messenger/more_action/style.d.ts +1 -0
- package/lib/components/overlay_trigger.d.ts +3 -3
- package/lib/components/post/channel_intro_message/channel_intro_message.d.ts +2 -1
- package/lib/components/post/channel_layout/channel_identifier_router/channel_identifier_router.d.ts +2 -1
- package/lib/components/post/channel_view/channel_view.d.ts +2 -1
- package/lib/components/post/create_post/create_post.d.ts +2 -1
- package/lib/components/post/failed_post_options/failed_post_options.d.ts +2 -1
- package/lib/components/post/index.d.ts +5 -1
- package/lib/components/post/markdown/markdown.d.ts +2 -1
- package/lib/components/post/post/post.d.ts +2 -1
- package/lib/components/post/post_aria_label_div.d.ts +3 -2
- package/lib/components/post/post_body/post_body.d.ts +2 -1
- package/lib/components/post/post_header/post_header.d.ts +2 -1
- package/lib/components/post/post_header/post_header_custom_status.d.ts +2 -1
- package/lib/components/post/post_header/style.d.ts +1 -40
- package/lib/components/post/post_info/post_info.d.ts +2 -1
- package/lib/components/post/post_list/index.d.ts +2 -1
- package/lib/components/post/post_list/post_list.d.ts +2 -1
- package/lib/components/post/post_list_row/post_list_row.d.ts +2 -1
- package/lib/components/post/post_list_virtualized/latest_post_reader.d.ts +2 -1
- package/lib/components/post/post_list_virtualized/post_list_virtualized.d.ts +2 -1
- package/lib/components/post/post_markdown/post_markdown.d.ts +2 -1
- package/lib/components/post/post_message_view/post_message_view.d.ts +2 -1
- package/lib/components/post/post_pre_header/post_pre_header.d.ts +3 -2
- package/lib/components/post/post_profile_picture/post_profile_picture.d.ts +2 -1
- package/lib/components/post/post_view.d.ts +2 -1
- package/lib/components/post/profile_picture/profile_picture.d.ts +2 -1
- package/lib/components/post/show_more/show_more.d.ts +2 -1
- package/lib/components/post/style.d.ts +1 -93
- package/lib/components/post/threading/channel_threads/thread_footer/thread_footer.d.ts +2 -1
- package/lib/components/post/threading/common/button/button.d.ts +3 -3
- package/lib/components/post/threading/common/follow_button/follow_button.d.ts +2 -2
- package/lib/components/post/tutorial/tutorial_tip/tutorial_tip.d.ts +3 -3
- package/lib/components/post/user_profile/user_profile.d.ts +1 -1
- package/lib/components/status_icon.d.ts +2 -1
- package/lib/components/status_icon_new.d.ts +2 -2
- package/lib/compute.d.ts +8 -2
- package/lib/containers/Inbox.d.ts +3 -0
- package/lib/containers/Messenger.d.ts +5 -1
- package/lib/index.js +3864 -581
- package/lib/index.js.map +1 -1
- package/lib/packages/types/emojis.d.ts +5 -5
- package/lib/packages/types/files.d.ts +5 -5
- package/lib/packages/types/posts.d.ts +13 -13
- package/lib/packages/types/reactions.d.ts +1 -1
- package/lib/packages/types/utilities.d.ts +13 -13
- package/lib/style.d.ts +1 -37
- package/lib/utils/index.d.ts +2 -0
- package/lib/widgets/badges/badge.d.ts +3 -3
- package/lib/widgets/badges/bot_badge.d.ts +1 -1
- package/lib/widgets/badges/guest_badge.d.ts +1 -1
- package/lib/widgets/badges/style.d.ts +1 -23
- package/lib/widgets/icons/emoji_icon.d.ts +1 -1
- package/lib/widgets/icons/flag_icon_filled.d.ts +1 -1
- package/lib/widgets/icons/mattermost_logo.d.ts +1 -1
- package/lib/widgets/icons/status_away_avatar_icon.d.ts +1 -1
- package/lib/widgets/icons/status_away_icon.d.ts +1 -1
- package/lib/widgets/icons/status_dnd_avatar_icon.d.ts +1 -1
- package/lib/widgets/icons/status_dnd_icon.d.ts +1 -1
- package/lib/widgets/icons/status_offline_avatar_icon.d.ts +1 -1
- package/lib/widgets/icons/status_offline_icon.d.ts +1 -1
- package/lib/widgets/icons/status_online_avatar_icon.d.ts +1 -1
- package/lib/widgets/icons/status_online_icon.d.ts +1 -1
- package/lib/widgets/overlay_trigger.d.ts +3 -3
- package/lib/widgets/shared_user_indicator.d.ts +1 -1
- package/lib/widgets/simple_tooltip/simple_tooltip.d.ts +3 -3
- package/lib/widgets/users/avatar/avatar.d.ts +4 -4
- package/lib/widgets/users/avatar/style.d.ts +1 -75
- package/lib/widgets/users/avatars/avatars.d.ts +2 -2
- package/package.json +61 -67
- package/src/components/InboxMessage/InboxDetails/index.tsx +23 -0
- package/src/components/InboxMessage/InboxDetails/style.ts +27 -0
- package/src/components/InboxMessage/InboxSidebar/index.tsx +86 -0
- package/src/components/InboxMessage/InboxSidebar/styles.ts +57 -0
- package/src/components/InboxMessage/Messages/index.tsx +159 -0
- package/src/components/InboxMessage/Messages/styles.ts +85 -0
- package/src/components/InboxMessage/MessagesList/index.tsx +93 -0
- package/src/components/InboxMessage/Popover/index.tsx +57 -0
- package/src/components/InboxMessage/Popover/style.ts +27 -0
- package/src/components/InboxMessage/UserModalContent/index.tsx +60 -0
- package/src/components/InboxMessage/UserModalContent/style.ts +98 -0
- package/src/components/InboxMessage/index.tsx +286 -0
- package/src/components/InboxMessage/mock.ts +53 -0
- package/src/components/InboxMessage/style.ts +189 -0
- package/src/components/channel_view/DirectChannelView.tsx +25 -0
- package/src/components/channel_view/PublicChannelView.tsx +24 -0
- package/src/components/dashboard/menu_header.tsx +49 -0
- package/src/components/dashboard/modals/direct_modal.tsx +46 -0
- package/src/components/dashboard/modals.tsx +93 -0
- package/src/components/messenger/avatar/index.tsx +2 -4
- package/src/components/messenger/avatar/style.ts +3 -3
- package/src/components/messenger/index.tsx +258 -94
- package/src/components/messenger/messagesList/index.tsx +673 -249
- package/src/components/messenger/messagesList/messageBox.tsx +2 -1
- package/src/components/messenger/messagesList/style.ts +240 -14
- package/src/components/messenger/more_action/index.tsx +68 -0
- package/src/components/messenger/more_action/style.ts +45 -0
- package/src/components/messenger/postMessage/postMessage.tsx +2 -3
- package/src/components/messenger/postMessage/style.ts +3 -3
- package/src/components/messenger/sidebarThreadList/index.tsx +11 -10
- package/src/components/messenger/style.ts +16 -16
- package/src/components/messenger/threadSidebar/index.tsx +5 -5
- package/src/components/messenger/threadSidebar/style.ts +7 -7
- package/src/components/messenger/types/message.ts +1 -0
- package/src/components/post/channel_intro_message/channel_intro_message.tsx +0 -1
- package/src/components/post/index.tsx +102 -25
- package/src/components/post/post/post.tsx +8 -1
- package/src/components/post/post_header/post_header_custom_status.tsx +1 -2
- package/src/components/post/post_header/style.ts +3 -6
- package/src/components/post/style.ts +22 -8
- package/src/components/post/tutorial/tutorial_tip/tutorial_tip.tsx +1 -0
- package/src/components/post/user_profile/user_profile.tsx +1 -0
- package/src/compute.tsx +58 -37
- package/src/containers/Dashboard.tsx +488 -1
- package/src/containers/Inbox.tsx +13 -0
- package/src/containers/Loading.tsx +1 -1
- package/src/containers/Messenger.tsx +9 -4
- package/src/module.ts +10 -7
- package/src/style.ts +382 -19
- package/src/utils/index.ts +22 -0
- package/src/widgets/badges/badge.tsx +1 -2
- package/src/widgets/badges/style.ts +3 -3
- package/src/widgets/icons/accordion_toggle_icon.tsx +1 -1
- package/src/widgets/icons/add_reaction_icon.tsx +1 -1
- package/src/widgets/icons/admin_eye_icon.tsx +1 -1
- package/src/widgets/icons/alert_icon.tsx +1 -1
- package/src/widgets/icons/archive_icon.tsx +1 -1
- package/src/widgets/icons/arrow_right_icon.tsx +1 -1
- package/src/widgets/icons/at_icon.tsx +1 -1
- package/src/widgets/icons/attachment_icon.tsx +1 -1
- package/src/widgets/icons/back_icon.tsx +1 -1
- package/src/widgets/icons/bot_icon.tsx +1 -1
- package/src/widgets/icons/camera_icon.tsx +1 -1
- package/src/widgets/icons/checkbox_checked_icon.tsx +1 -1
- package/src/widgets/icons/checkbox_partial_icon.tsx +1 -1
- package/src/widgets/icons/close_circle_icon.tsx +1 -1
- package/src/widgets/icons/close_circle_solid_icon.tsx +1 -1
- package/src/widgets/icons/close_icon.tsx +1 -1
- package/src/widgets/icons/dots_horizontal.tsx +1 -1
- package/src/widgets/icons/download_icon.tsx +1 -1
- package/src/widgets/icons/draft_icon.tsx +1 -1
- package/src/widgets/icons/ellipsis_h_icon.tsx +1 -1
- package/src/widgets/icons/email_icon.tsx +1 -1
- package/src/widgets/icons/fa_add_icon.tsx +1 -1
- package/src/widgets/icons/fa_back_icon.tsx +1 -1
- package/src/widgets/icons/fa_dropdown_icon.tsx +1 -1
- package/src/widgets/icons/fa_edit_icon.tsx +1 -1
- package/src/widgets/icons/fa_logout_icon.tsx +1 -1
- package/src/widgets/icons/fa_next_icon.tsx +1 -1
- package/src/widgets/icons/fa_previous_icon.tsx +1 -1
- package/src/widgets/icons/fa_reload_icon.tsx +1 -1
- package/src/widgets/icons/fa_remove_icon.tsx +1 -1
- package/src/widgets/icons/fa_search_icon.tsx +1 -1
- package/src/widgets/icons/fa_select_icon.tsx +1 -1
- package/src/widgets/icons/fa_success_icon.tsx +1 -1
- package/src/widgets/icons/fa_warning_icon.tsx +1 -1
- package/src/widgets/icons/flag_icon.tsx +1 -1
- package/src/widgets/icons/gfycat_icon.tsx +1 -1
- package/src/widgets/icons/gif_reactions_icon.tsx +1 -1
- package/src/widgets/icons/gif_search_clear_icon.tsx +1 -1
- package/src/widgets/icons/gif_search_icon.tsx +1 -1
- package/src/widgets/icons/gif_trending_icon.tsx +1 -1
- package/src/widgets/icons/globe_icon.tsx +1 -1
- package/src/widgets/icons/icons.stories.js +1 -1
- package/src/widgets/icons/info_icon.tsx +1 -1
- package/src/widgets/icons/info_small_icon.tsx +1 -1
- package/src/widgets/icons/invite_icon.tsx +1 -1
- package/src/widgets/icons/invite_members_icon.tsx +1 -1
- package/src/widgets/icons/link_icon.tsx +1 -1
- package/src/widgets/icons/lock_icon.tsx +1 -1
- package/src/widgets/icons/mail_icon.tsx +1 -1
- package/src/widgets/icons/mail_plus_icon.tsx +1 -1
- package/src/widgets/icons/member_icon.tsx +1 -1
- package/src/widgets/icons/mentions_icon.tsx +1 -1
- package/src/widgets/icons/menu_icon.tsx +1 -1
- package/src/widgets/icons/message_icon.tsx +1 -1
- package/src/widgets/icons/pin_icon.tsx +1 -1
- package/src/widgets/icons/plugin_channel_header_icon.tsx +1 -1
- package/src/widgets/icons/plugin_icon.tsx +1 -1
- package/src/widgets/icons/reply_icon.tsx +1 -1
- package/src/widgets/icons/scroll_to_bottom_icon.tsx +1 -1
- package/src/widgets/icons/search_icon.tsx +1 -1
- package/src/widgets/icons/shield_outline_icon.tsx +1 -1
- package/src/widgets/icons/unarchive_icon.tsx +1 -1
- package/src/widgets/icons/unread_below_icon.tsx +1 -1
- package/src/widgets/icons/user_guide_icon.tsx +1 -1
- package/src/widgets/shared_user_indicator.tsx +1 -0
- package/src/widgets/simple_tooltip/simple_tooltip.tsx +1 -0
- package/src/widgets/users/avatar/avatar.tsx +1 -2
- package/src/widgets/users/avatar/style.ts +3 -3
- package/src/widgets/users/avatars/avatars.tsx +1 -0
- package/tsconfig.json +2 -1
- package/webpack.config.js +1 -1
- package/lib/components/messenger/mock.d.ts +0 -50
- package/lib/components/messenger/postMessage/postMessage.d.ts +0 -1
- package/lib/components/messenger/postMessage/style.d.ts +0 -22
- package/lib/components/messenger/sidebarThreadList/index.d.ts +0 -7
- package/lib/components/messenger/threadSidebar/index.d.ts +0 -1
- package/lib/components/messenger/threadSidebar/style.d.ts +0 -62
- package/lib/components/messenger/types/message.d.ts +0 -14
- package/src/api.ts +0 -35
- package/src/components/Counter.tsx +0 -52
- package/src/containers/Clock.tsx +0 -0
- package/src/containers/Counter.tsx +0 -42
- package/src/containers/PersonList.tsx +0 -20
- package/src/containers/ServerCounter.tsx +0 -140
- package/src/graphql/index.ts +0 -3
- package/src/graphql/mutations/addCount.graphql +0 -5
- package/src/graphql/mutations/addPerson.graphql +0 -6
- package/src/graphql/mutations/index.ts +0 -2
- package/src/graphql/queries/count.graphql +0 -5
- package/src/graphql/queries/index.ts +0 -3
- package/src/graphql/queries/person.graphql +0 -22
- package/src/graphql/queries/persons.graphql +0 -6
- package/src/graphql/subscriptions/count.graphql +0 -5
- package/src/graphql/subscriptions/index.ts +0 -1
- package/src/redux/__mocks__/api.ts +0 -4
- package/src/redux/actions/__tests__/sampleActions.test.ts +0 -159
- package/src/redux/actions/index.ts +0 -1
- package/src/redux/actions/sampleActions.ts +0 -91
- package/src/redux/index.ts +0 -2
- package/src/redux/reducers/Store.ts +0 -10
- package/src/redux/reducers/__tests__/sampleReducers.test.ts +0 -39
- package/src/redux/reducers/index.ts +0 -7
- package/src/redux/reducers/sampleReducers.ts +0 -71
- /package/src/components/post/channel_layout/{channel_controller.test.jsx → channel_controller.test.tsx} +0 -0
- /package/src/components/post/channel_layout/{channel_controller.jsx → channel_controller.tsx} +0 -0
|
@@ -1,43 +1,120 @@
|
|
|
1
|
-
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {RiPushpinLine
|
|
8
|
-
import {BsAt } from 'react-icons/bs';
|
|
9
|
-
import {IoBookmarkOutline
|
|
2
|
+
import {PostView} from './post_view';
|
|
3
|
+
import {css} from '@emotion/css';
|
|
4
|
+
import {styleSheet2} from './style';
|
|
5
|
+
import {AiOutlineSearch, AiOutlineStar, AiOutlineQuestionCircle} from 'react-icons/ai';
|
|
6
|
+
import {RiPushpinLine} from 'react-icons/ri';
|
|
7
|
+
import {BsAt, BsChevronDown} from 'react-icons/bs';
|
|
8
|
+
import {IoBookmarkOutline} from 'react-icons/io5';
|
|
9
|
+
import {useEffect, useState} from "react";
|
|
10
|
+
import {Menu, Dropdown} from 'antd';
|
|
11
|
+
import {useDeleteChannelMutation} from '@messenger-box/platform-client';
|
|
12
|
+
import {useHistory} from "react-router-dom";
|
|
13
|
+
|
|
14
|
+
export const PostViewPage = ({channel, currentUsrId}) => {
|
|
15
|
+
const his = useHistory()
|
|
16
|
+
|
|
17
|
+
const [deleteChannel, deleteChannelResponse] = useDeleteChannelMutation({
|
|
18
|
+
// update: (cache, mutationResult) => {
|
|
19
|
+
// const normalizedId = cache.identify({ ChannelId, __typename: 'Channel' });
|
|
20
|
+
// cache.evict({ id: normalizedId });
|
|
21
|
+
// cache.gc();
|
|
22
|
+
// cache.modify({
|
|
23
|
+
// fields: {
|
|
24
|
+
// channels(existingChannels, {toReference}) {
|
|
25
|
+
// return [...existingChannels.filter(i => i !== mutationResult.data.deleteChannel)]
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
28
|
+
// })
|
|
29
|
+
// },
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const hendleDelete = async () => {
|
|
33
|
+
await deleteChannel({
|
|
34
|
+
variables: {
|
|
35
|
+
ChannelId: channel.id
|
|
36
|
+
},
|
|
37
|
+
update(cache) {
|
|
38
|
+
cache.modify({
|
|
39
|
+
fields: {
|
|
40
|
+
channels(existingChannels = [], {readField}) {
|
|
41
|
+
return existingChannels.filter(
|
|
42
|
+
postRef => channel.id !== readField('id', postRef)
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
his.push(`/o/${his.location.pathname.split('/')[2]}/dashboard`)
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const menu = (
|
|
53
|
+
<Menu>
|
|
54
|
+
<Menu.Item key="0">
|
|
55
|
+
<div style={{cursor: 'pointer'}} onClick={hendleDelete}>Delete Channel</div>
|
|
56
|
+
</Menu.Item>
|
|
57
|
+
{/*<Menu.Divider />*/}
|
|
58
|
+
</Menu>
|
|
59
|
+
);
|
|
10
60
|
|
|
11
|
-
export const PostViewPage = (pros) => {
|
|
12
|
-
const {css} = useFela();
|
|
13
61
|
return (
|
|
14
62
|
<div>
|
|
15
|
-
<div className={css(styleSheet2.customStyle
|
|
63
|
+
{channel ? <div className={css(styleSheet2.customStyle)}>
|
|
16
64
|
<div className="top-bar">
|
|
17
|
-
|
|
18
|
-
<div className="
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
65
|
+
{channel ?
|
|
66
|
+
<div className="top-left">
|
|
67
|
+
<div className="text-nav">
|
|
68
|
+
<button style={{border: '0px', background: 'white'}}>
|
|
69
|
+
<AiOutlineStar className="icon ml-0"/>
|
|
70
|
+
</button>
|
|
71
|
+
<h5>{
|
|
72
|
+
channel.type !== "DIRECT" ?
|
|
73
|
+
channel.title :
|
|
74
|
+
channel.displayName.split('_').length === 2 ?
|
|
75
|
+
channel.displayName.split('_')[0].split('-')[0] !== currentUsrId ?
|
|
76
|
+
channel.displayName.split('_')[0].split('-')[1] :
|
|
77
|
+
channel.displayName.split('_')[1].split('-')[1] : channel.displayName
|
|
78
|
+
}</h5>
|
|
79
|
+
<Dropdown overlay={menu} trigger={['click']} className='down_menu'>
|
|
80
|
+
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
|
|
81
|
+
<BsChevronDown className='down_menu'/>
|
|
82
|
+
</a>
|
|
83
|
+
</Dropdown>
|
|
84
|
+
</div>
|
|
85
|
+
<p>{channel.description ? channel.description : "Add a channel description"}<a> Edit
|
|
86
|
+
Description</a>
|
|
87
|
+
</p>
|
|
24
88
|
</div>
|
|
25
|
-
|
|
26
|
-
|
|
89
|
+
:
|
|
90
|
+
<div className="top-left">
|
|
91
|
+
<div className="text-nav">
|
|
92
|
+
<button style={{border: '0px', background: 'white'}}>
|
|
93
|
+
<AiOutlineStar className="icon ml-0"/>
|
|
94
|
+
</button>
|
|
95
|
+
<h5>surveybot</h5>
|
|
96
|
+
<span>BOT</span>
|
|
97
|
+
</div>
|
|
98
|
+
<p>Surveybot collects user feedback to improve Mattermost.<a href="#">Learn more.</a></p>
|
|
99
|
+
</div>
|
|
100
|
+
}
|
|
27
101
|
<div className="top-right">
|
|
28
|
-
<button style={{border:'0px', background:'white'}}><RiPushpinLine className='icon'/></button>
|
|
102
|
+
<button style={{border: '0px', background: 'white'}}><RiPushpinLine className='icon'/></button>
|
|
29
103
|
<div className="searchbar">
|
|
30
104
|
<AiOutlineSearch className='icon'/>
|
|
31
105
|
<input type='search' name="text" placeholder="search"/>
|
|
32
106
|
</div>
|
|
33
107
|
<div className="icons-nav">
|
|
34
|
-
<button style={{border:'0px', background:'white'}}><BsAt className='icon'/></button>
|
|
35
|
-
<button style={{border:'0px', background:'white'}}><IoBookmarkOutline className='icon-m'
|
|
36
|
-
|
|
108
|
+
<button style={{border: '0px', background: 'white'}}><BsAt className='icon'/></button>
|
|
109
|
+
<button style={{border: '0px', background: 'white'}}><IoBookmarkOutline className='icon-m'
|
|
110
|
+
color='gray'/>
|
|
111
|
+
</button>
|
|
112
|
+
<button style={{border: '0px', background: 'white'}}><AiOutlineQuestionCircle
|
|
113
|
+
className='icon'/></button>
|
|
37
114
|
</div>
|
|
38
115
|
</div>
|
|
39
116
|
</div>
|
|
40
|
-
</div>
|
|
117
|
+
</div> : ''}
|
|
41
118
|
</div>
|
|
42
119
|
);
|
|
43
120
|
};
|
|
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import PostContext from '../post_context';
|
|
3
3
|
import PostAriaLabelDiv from '../post_aria_label_div';
|
|
4
4
|
import { PostPreHeader } from '../post_pre_header/post_pre_header';
|
|
5
|
+
import { useSetting } from '@adminide-stack/platform-client';
|
|
5
6
|
import { PostHeader } from '../post_header/post_header';
|
|
6
7
|
import { PostProfilePicture } from '../post_profile_picture/post_profile_picture';
|
|
7
8
|
import * as PostUtils from '../../../utils/post_utils';
|
|
@@ -19,7 +20,9 @@ export const Post = (props) => {
|
|
|
19
20
|
const [fadeOutHighlight, setFadeOutHighlight] = useState(false);
|
|
20
21
|
const [isPinned, setIsPinned] = useState(true);
|
|
21
22
|
const [isFlagged, setIsFlagged] = useState(true);
|
|
22
|
-
|
|
23
|
+
// const externalResource = generateUri('posts' as any, { _id: src.id }, 'props');
|
|
24
|
+
// const { updateConfiguration, loading, } = useSetting({ configKey: 'isPinned', overrides: { externalResource: externalResource }})
|
|
25
|
+
// updateConfiguration({ updateKey: 'isPInned', value: 'false', target: ConfigureationTarget.Machine, updateOverrides: { externalResource }})
|
|
23
26
|
const post = {
|
|
24
27
|
edit_at: 0,
|
|
25
28
|
original_id: '',
|
|
@@ -261,3 +264,7 @@ export const Post = (props) => {
|
|
|
261
264
|
</PostContext.Provider>
|
|
262
265
|
);
|
|
263
266
|
};
|
|
267
|
+
function generateUri(arg0: any, arg1: { _id: any; }, arg2: string) {
|
|
268
|
+
throw new Error('Function not implemented.');
|
|
269
|
+
}
|
|
270
|
+
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
3
|
import EmojiIcon from '../../../widgets/icons/emoji_icon';
|
|
4
|
-
import {
|
|
4
|
+
import { css } from '@emotion/css';
|
|
5
5
|
import { styleSheet } from './style';
|
|
6
6
|
|
|
7
7
|
export const PostHeaderCustomStatus = (props) => {
|
|
8
|
-
const { css } = useFela();
|
|
9
8
|
const { userId, isSystemMessage, isBot } = props;
|
|
10
9
|
|
|
11
10
|
// const isCustomStatusSet = userCustomStatus && userCustomStatus.emoji;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { inherits } from 'util';
|
|
2
2
|
|
|
3
3
|
export const styleSheet = {
|
|
4
|
-
postHeaderStyle:
|
|
5
|
-
const { primaryColor } = theme;
|
|
6
|
-
return {
|
|
4
|
+
postHeaderStyle: {
|
|
7
5
|
display: 'inherit',
|
|
8
6
|
'& .post__header-set-custom-status': {
|
|
9
7
|
// display: 'none',
|
|
@@ -52,6 +50,5 @@ export const styleSheet = {
|
|
|
52
50
|
{
|
|
53
51
|
// color: var(--button-bg);
|
|
54
52
|
},
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
};
|
|
53
|
+
}
|
|
54
|
+
} as any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const styleSheet2 = {
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
3
3
|
|
|
4
|
-
customStyle:
|
|
4
|
+
customStyle: {
|
|
5
5
|
'& .top-bar': {
|
|
6
6
|
padding: '15px 15px',
|
|
7
7
|
display: 'flex',
|
|
@@ -27,7 +27,7 @@ export const styleSheet2 = {
|
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
'& .icon-popover': {
|
|
30
|
-
border: '1px solid red'
|
|
30
|
+
border: '1px solid red',
|
|
31
31
|
},
|
|
32
32
|
'& .top-right': {
|
|
33
33
|
width: '50%',
|
|
@@ -55,6 +55,11 @@ export const styleSheet2 = {
|
|
|
55
55
|
backgroundColor: 'lightgray',
|
|
56
56
|
marginLeft: '10px',
|
|
57
57
|
},
|
|
58
|
+
'& .down_menu': {
|
|
59
|
+
marginLeft: '5px',
|
|
60
|
+
color: '#808080',
|
|
61
|
+
cursor: 'pointer',
|
|
62
|
+
},
|
|
58
63
|
},
|
|
59
64
|
'& .main_avatar': {
|
|
60
65
|
backgroundColor: 'black',
|
|
@@ -87,12 +92,21 @@ export const styleSheet2 = {
|
|
|
87
92
|
outline: 'none',
|
|
88
93
|
},
|
|
89
94
|
},
|
|
90
|
-
|
|
91
95
|
padding: '0px 15px',
|
|
92
|
-
'& .icon-pencil-outline:before': { content: "'\\fc92'"},
|
|
93
|
-
|
|
96
|
+
'& .icon-pencil-outline:before': { content: "'\\fc92'" },
|
|
97
|
+
'& .di_chat_head': {
|
|
98
|
+
color: '#4b4a4e',
|
|
99
|
+
display: 'flex',
|
|
100
|
+
'> a': {
|
|
101
|
+
display: 'inline-block',
|
|
102
|
+
'> h5': {
|
|
103
|
+
display: 'inline-block',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
94
108
|
|
|
95
|
-
/* postStyles:
|
|
109
|
+
/* postStyles: {
|
|
96
110
|
display: 'inharit',
|
|
97
111
|
'& .d-flex': {
|
|
98
112
|
display: ['-webkit-box !important', '-ms-flexbox !important', 'flex !important'],
|
|
@@ -20083,5 +20097,5 @@ export const styleSheet2 = {
|
|
|
20083
20097
|
],
|
|
20084
20098
|
'& .LoadingBars.with-text .spinner': { marginRight: '5px' },
|
|
20085
20099
|
'& .LoadingSpinner.with-text .spinner': { marginRight: '5px' },
|
|
20086
|
-
}
|
|
20087
|
-
};
|
|
20100
|
+
}, */
|
|
20101
|
+
} as any;
|
package/src/compute.tsx
CHANGED
|
@@ -1,53 +1,74 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IMenuPosition } from '@common-stack/client-react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { DashboardFill } from '@adminide-stack/platform-browser';
|
|
6
|
-
import { IPreDefineAccountPermissions, ConfigurationTarget } from '@adminide-stack/core';
|
|
7
|
-
import { getFilteredRoutes } from './utils';
|
|
8
|
-
import { IntlProvider } from 'react-intl';
|
|
9
|
-
import {PostViewPage} from "./components/post";
|
|
10
|
-
import {useFela} from 'react-fela';
|
|
11
|
-
import {styleSheet} from './style';
|
|
12
|
-
|
|
3
|
+
import { MessageOutlined } from '@ant-design/icons';
|
|
4
|
+
import { getFilteredMenus, getFilteredRoutes } from './utils';
|
|
13
5
|
const Dashboard = React.lazy(() => import('./containers/Dashboard'));
|
|
14
6
|
const Messenger = React.lazy(() => import('./containers/Messenger'));
|
|
7
|
+
const Inbox = React.lazy(() => import('./containers/Inbox'))
|
|
8
|
+
const DirectChannelView = React.lazy(() => import('./components/channel_view/DirectChannelView'))
|
|
9
|
+
const PublicChannelView = React.lazy(() => import('./components/channel_view/PublicChannelView'))
|
|
15
10
|
|
|
16
|
-
export const DashboardProvider = () => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const {css} = useFela();
|
|
11
|
+
// export const DashboardProvider = () => {
|
|
12
|
+
// document.body.style.color = 'black'
|
|
13
|
+
// document.body.style.background = 'white'
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<PostViewPage/>
|
|
28
|
-
<Messenger/>
|
|
29
|
-
</IntlProvider>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</DashboardFill>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
15
|
+
// return (
|
|
16
|
+
// <DashboardFill>
|
|
17
|
+
// <Dashboard />
|
|
18
|
+
// </DashboardFill>
|
|
19
|
+
// );
|
|
20
|
+
// };
|
|
35
21
|
|
|
36
22
|
export const messengerPageStore: any[] = [
|
|
23
|
+
{
|
|
24
|
+
exact: false,
|
|
25
|
+
icon: <MessageOutlined/>,
|
|
26
|
+
key: 'dashboard',
|
|
27
|
+
component: Dashboard,
|
|
28
|
+
tab: 'Messenger',
|
|
29
|
+
position: IMenuPosition.MIDDLE,
|
|
30
|
+
name: 'Messenger',
|
|
31
|
+
path: '/o/:orgName/dashboard',
|
|
32
|
+
},
|
|
37
33
|
// {
|
|
38
34
|
// exact: false,
|
|
39
|
-
// icon: <
|
|
40
|
-
// key: '
|
|
41
|
-
// component:
|
|
35
|
+
// icon: <MessageOutlined />,
|
|
36
|
+
// key: 'messenger-chat',
|
|
37
|
+
// component: Dashboard,
|
|
38
|
+
// tab: 'Messenger',
|
|
42
39
|
// position: IMenuPosition.MIDDLE,
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
40
|
+
// name: 'Messenger',
|
|
41
|
+
// path: '/o/:orgName/dashboard',
|
|
42
|
+
// },
|
|
43
|
+
// {
|
|
44
|
+
// exact: false,
|
|
45
|
+
// icon: <WechatOutlined/>,
|
|
46
|
+
// key: 'inbox',
|
|
47
|
+
// component: Inbox,
|
|
48
|
+
// tab: 'Chat App',
|
|
49
|
+
// position: IMenuPosition.MIDDLE,
|
|
50
|
+
// name: 'Chat App',
|
|
51
|
+
// path: '/o/:orgName/inbox',
|
|
47
52
|
// },
|
|
48
53
|
];
|
|
49
54
|
|
|
50
|
-
const selectedRoutesAndMenus = ['dashboard'];
|
|
55
|
+
const selectedRoutesAndMenus = ['dashboard', 'inbox'];
|
|
56
|
+
// get menus
|
|
57
|
+
const filteredMenus = getFilteredMenus(messengerPageStore, selectedRoutesAndMenus);
|
|
51
58
|
|
|
59
|
+
// get routes
|
|
52
60
|
const filteredRoutes = getFilteredRoutes(messengerPageStore, selectedRoutesAndMenus);
|
|
53
|
-
|
|
61
|
+
|
|
62
|
+
export {filteredRoutes, filteredMenus};
|
|
63
|
+
export const dashboardRoutes = [
|
|
64
|
+
{
|
|
65
|
+
path: `/o/:orgName/dashboard/message/:channelName`,
|
|
66
|
+
exact: true,
|
|
67
|
+
component: DirectChannelView
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
path: `/o/:orgName/dashboard/channel/:channelName`,
|
|
71
|
+
exact: true,
|
|
72
|
+
component: PublicChannelView
|
|
73
|
+
}
|
|
74
|
+
];
|