@pega/cosmos-react-social 2.0.0-dev.10.0 → 2.0.0-dev.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Chat/Chat.js +3 -9
- package/lib/components/Chat/Chat.js.map +1 -1
- package/lib/components/Chat/ChatComposer.js +6 -16
- package/lib/components/Chat/ChatComposer.js.map +1 -1
- package/lib/components/Chat/ChatHeader.js +1 -3
- package/lib/components/Chat/ChatHeader.js.map +1 -1
- package/lib/components/Chat/ChatTranscript.d.ts.map +1 -1
- package/lib/components/Chat/ChatTranscript.js +2 -3
- package/lib/components/Chat/ChatTranscript.js.map +1 -1
- package/lib/components/Chat/Message.js +11 -23
- package/lib/components/Chat/Message.js.map +1 -1
- package/lib/components/Chat/MessageList.js +3 -6
- package/lib/components/Chat/MessageList.js.map +1 -1
- package/lib/components/Chat/RepeatingView.js +2 -4
- package/lib/components/Chat/RepeatingView.js.map +1 -1
- package/lib/components/Chat/SuggestedReplyPicker.js +4 -11
- package/lib/components/Chat/SuggestedReplyPicker.js.map +1 -1
- package/lib/components/Chat/TranscriptMessage.js +2 -6
- package/lib/components/Chat/TranscriptMessage.js.map +1 -1
- package/lib/components/Email/Email.js +18 -40
- package/lib/components/Email/Email.js.map +1 -1
- package/lib/components/Email/Email.types.d.ts +28 -15
- package/lib/components/Email/Email.types.d.ts.map +1 -1
- package/lib/components/Email/Email.types.js.map +1 -1
- package/lib/components/Email/EmailComposer.d.ts +4 -5
- package/lib/components/Email/EmailComposer.d.ts.map +1 -1
- package/lib/components/Email/EmailComposer.js +134 -39
- package/lib/components/Email/EmailComposer.js.map +1 -1
- package/lib/components/Email/EmailConversation.js +3 -13
- package/lib/components/Email/EmailConversation.js.map +1 -1
- package/lib/components/Email/EmailEntity.js +1 -2
- package/lib/components/Email/EmailEntity.js.map +1 -1
- package/lib/components/Email/EmailShell.js +6 -11
- package/lib/components/Email/EmailShell.js.map +1 -1
- package/lib/components/Email/EmailSummaryItem.js +3 -7
- package/lib/components/Email/EmailSummaryItem.js.map +1 -1
- package/lib/components/Email/EmailSummaryList.js +5 -10
- package/lib/components/Email/EmailSummaryList.js.map +1 -1
- package/lib/components/Feed/Feed.js +5 -10
- package/lib/components/Feed/Feed.js.map +1 -1
- package/lib/components/Feed/FeedButton.d.ts.map +1 -1
- package/lib/components/Feed/FeedButton.js.map +1 -1
- package/lib/components/Feed/FeedContent.js +1 -2
- package/lib/components/Feed/FeedContent.js.map +1 -1
- package/lib/components/Feed/FeedModalList.js +2 -4
- package/lib/components/Feed/FeedModalList.js.map +1 -1
- package/lib/components/Feed/FeedNewPost.d.ts.map +1 -1
- package/lib/components/Feed/FeedNewPost.js +14 -27
- package/lib/components/Feed/FeedNewPost.js.map +1 -1
- package/lib/components/Feed/FeedNewPostTypeMenu.d.ts.map +1 -1
- package/lib/components/Feed/FeedNewPostTypeMenu.js +21 -44
- package/lib/components/Feed/FeedNewPostTypeMenu.js.map +1 -1
- package/lib/components/Feed/FeedPost.js +21 -47
- package/lib/components/Feed/FeedPost.js.map +1 -1
- package/lib/components/Feed/FeedReply.js +17 -31
- package/lib/components/Feed/FeedReply.js.map +1 -1
- package/lib/components/Feed/FeedReplyInput.js +14 -25
- package/lib/components/Feed/FeedReplyInput.js.map +1 -1
- package/lib/components/Feed/FeedRichText.js +5 -5
- package/lib/components/Feed/FeedRichText.js.map +1 -1
- package/lib/components/Feed/mocks/Feed.mocks.d.ts +33 -0
- package/lib/components/Feed/mocks/Feed.mocks.d.ts.map +1 -0
- package/lib/components/Feed/mocks/Feed.mocks.js +278 -0
- package/lib/components/Feed/mocks/Feed.mocks.js.map +1 -0
- package/lib/components/HashtagButton/HashtagButton.js +1 -3
- package/lib/components/HashtagButton/HashtagButton.js.map +1 -1
- package/lib/components/MentionButton/MentionButton.d.ts.map +1 -1
- package/lib/components/MentionButton/MentionButton.js +2 -5
- package/lib/components/MentionButton/MentionButton.js.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const userMentions: {
|
|
2
|
+
id: string;
|
|
3
|
+
primary: string;
|
|
4
|
+
secondary: string[];
|
|
5
|
+
fields: ({
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
} | {
|
|
9
|
+
name: string;
|
|
10
|
+
value: JSX.Element;
|
|
11
|
+
})[];
|
|
12
|
+
visual: JSX.Element;
|
|
13
|
+
}[];
|
|
14
|
+
export declare const caseMentions: {
|
|
15
|
+
id: string;
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string[];
|
|
18
|
+
visual: JSX.Element;
|
|
19
|
+
}[];
|
|
20
|
+
export declare const generatedLikes: {
|
|
21
|
+
primary: string;
|
|
22
|
+
secondary: string[];
|
|
23
|
+
visual: JSX.Element;
|
|
24
|
+
id: string;
|
|
25
|
+
}[];
|
|
26
|
+
export declare const availableRecipients: {
|
|
27
|
+
primary: string;
|
|
28
|
+
secondary: string[];
|
|
29
|
+
visual: JSX.Element;
|
|
30
|
+
value: string;
|
|
31
|
+
id: string;
|
|
32
|
+
}[];
|
|
33
|
+
//# sourceMappingURL=Feed.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feed.mocks.d.ts","sourceRoot":"","sources":["../../../../src/components/Feed/mocks/Feed.mocks.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;GAyHxB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;GA+BxB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;GA6D1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;GAyD/B,CAAC"}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar, EmailDisplay, PhoneDisplay } from '@pega/cosmos-react-core';
|
|
3
|
+
// cspell: disable
|
|
4
|
+
export const userMentions = [
|
|
5
|
+
{
|
|
6
|
+
id: 'turnc',
|
|
7
|
+
primary: 'Cindy Turner',
|
|
8
|
+
secondary: ['Lead Engineer'],
|
|
9
|
+
fields: [
|
|
10
|
+
{
|
|
11
|
+
name: 'Project',
|
|
12
|
+
value: 'Cosmos Demo'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'Phone number',
|
|
16
|
+
value: _jsx(PhoneDisplay, { value: '(111) 111-1111' }, void 0)
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Email',
|
|
20
|
+
value: _jsx(EmailDisplay, { value: 'turnc@pega.com' }, void 0)
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Reports to',
|
|
24
|
+
value: 'Helen Bush'
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Cindy Turner' }, void 0)
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'deans',
|
|
31
|
+
primary: 'Seth DeAngelo',
|
|
32
|
+
secondary: ['Senior Software Engineer', 'Backend Developer'],
|
|
33
|
+
fields: [
|
|
34
|
+
{
|
|
35
|
+
name: 'Project',
|
|
36
|
+
value: 'Cosmos Demo'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Phone number',
|
|
40
|
+
value: _jsx(PhoneDisplay, { value: '(222) 222-2222' }, void 0)
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Email',
|
|
44
|
+
value: _jsx(EmailDisplay, { value: 'deans@pega.com' }, void 0)
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Reports to',
|
|
48
|
+
value: 'Helen Bush'
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Seth DeAngelo' }, void 0)
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'moorj',
|
|
55
|
+
primary: 'Janet Moore',
|
|
56
|
+
secondary: ['Backend Developer'],
|
|
57
|
+
fields: [
|
|
58
|
+
{
|
|
59
|
+
name: 'Project',
|
|
60
|
+
value: 'Cosmos Demo'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Phone number',
|
|
64
|
+
value: _jsx(PhoneDisplay, { value: '(333) 333-3333' }, void 0)
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Email',
|
|
68
|
+
value: _jsx(EmailDisplay, { value: 'moorj@pega.com' }, void 0)
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Reports to',
|
|
72
|
+
value: 'Helen Bush'
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Janet Moore' }, void 0)
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 'thomd',
|
|
79
|
+
primary: 'Dean Thomas',
|
|
80
|
+
secondary: ['Designer'],
|
|
81
|
+
fields: [
|
|
82
|
+
{
|
|
83
|
+
name: 'Project',
|
|
84
|
+
value: 'Cosmos Demo'
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Phone number',
|
|
88
|
+
value: _jsx(PhoneDisplay, { value: '(444) 444-4444' }, void 0)
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Email',
|
|
92
|
+
value: _jsx(EmailDisplay, { value: 'thomd@pega.com' }, void 0)
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Reports to',
|
|
96
|
+
value: 'Bob Hathoway'
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Dean Thomas' }, void 0)
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'hathb',
|
|
103
|
+
primary: 'Bob Hathoway',
|
|
104
|
+
secondary: ['Lead Designer', 'Product Owner'],
|
|
105
|
+
fields: [
|
|
106
|
+
{
|
|
107
|
+
name: 'Project',
|
|
108
|
+
value: 'Cosmos Demo'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'Phone number',
|
|
112
|
+
value: _jsx(PhoneDisplay, { value: '(555) 555-5555' }, void 0)
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'Email',
|
|
116
|
+
value: _jsx(EmailDisplay, { value: 'hathb@pega.com' }, void 0)
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Reports to',
|
|
120
|
+
value: ''
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Bob Hathoway' }, void 0)
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
export const caseMentions = [
|
|
127
|
+
{
|
|
128
|
+
id: 'c-001',
|
|
129
|
+
primary: 'Complete user sign up form',
|
|
130
|
+
secondary: ['US-111111'],
|
|
131
|
+
visual: _jsx(Avatar, { size: 'l', name: 'c-001', icon: 'case' }, void 0)
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'c-002',
|
|
135
|
+
primary: 'Button missing on home page',
|
|
136
|
+
secondary: ['BUG-222222'],
|
|
137
|
+
visual: _jsx(Avatar, { size: 'l', name: 'c-002', icon: 'case' }, void 0)
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'c-003',
|
|
141
|
+
primary: 'Set up transaction broker',
|
|
142
|
+
secondary: ['US-333333'],
|
|
143
|
+
visual: _jsx(Avatar, { size: 'l', name: 'c-03', icon: 'case' }, void 0)
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'c-004',
|
|
147
|
+
primary: 'Check in with security team',
|
|
148
|
+
secondary: ['TASK-444444'],
|
|
149
|
+
visual: _jsx(Avatar, { size: 'l', name: 'c-004', icon: 'case' }, void 0)
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'c-005',
|
|
153
|
+
primary: 'Error occurs upon submitting form',
|
|
154
|
+
secondary: ['BUG-555555'],
|
|
155
|
+
visual: _jsx(Avatar, { size: 'l', name: 'c-005', icon: 'case' }, void 0)
|
|
156
|
+
}
|
|
157
|
+
];
|
|
158
|
+
export const generatedLikes = [
|
|
159
|
+
{
|
|
160
|
+
primary: 'Cindy Turner',
|
|
161
|
+
secondary: ['Lead Engineer'],
|
|
162
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Cindy Turner' }, void 0),
|
|
163
|
+
id: 'turnc'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
primary: 'Helen Bush',
|
|
167
|
+
secondary: ['Product Manager', 'Product Owner'],
|
|
168
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Helen Bush' }, void 0),
|
|
169
|
+
id: 'bushh'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
primary: 'Randy Paul',
|
|
173
|
+
secondary: ['Frontend Developer', 'Backend Developer'],
|
|
174
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Randy Paul' }, void 0),
|
|
175
|
+
id: 'paulr'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
primary: 'Janet Moore',
|
|
179
|
+
secondary: ['Backend Developer'],
|
|
180
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Janet Moore' }, void 0),
|
|
181
|
+
id: 'moorj'
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
primary: 'Kate Mirin',
|
|
185
|
+
secondary: ['Quality Engineer'],
|
|
186
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Kate Mirin' }, void 0),
|
|
187
|
+
id: 'mirik'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
primary: 'Bob Hathoway',
|
|
191
|
+
secondary: ['Lead Designer', 'Product Owner'],
|
|
192
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Bob Hathoway' }, void 0),
|
|
193
|
+
id: 'hathb'
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
primary: 'Seth DeAngelo',
|
|
197
|
+
secondary: ['Senior Software Engineer', 'Backend Developer'],
|
|
198
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Seth DeAngelo' }, void 0),
|
|
199
|
+
id: 'deans'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
primary: 'Dean Thomas',
|
|
203
|
+
secondary: ['Designer'],
|
|
204
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Dean Thomas' }, void 0),
|
|
205
|
+
id: 'thomd'
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
primary: 'Louie Santos',
|
|
209
|
+
secondary: ['Marketing Specialist'],
|
|
210
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Louie Santos' }, void 0),
|
|
211
|
+
id: 'santl'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
primary: 'Margaret Foster',
|
|
215
|
+
secondary: ['Architect', 'Designer'],
|
|
216
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Margaret Foster' }, void 0),
|
|
217
|
+
id: 'fostm'
|
|
218
|
+
}
|
|
219
|
+
];
|
|
220
|
+
export const availableRecipients = [
|
|
221
|
+
{
|
|
222
|
+
primary: 'Cindy Turner',
|
|
223
|
+
secondary: ['Lead Engineer'],
|
|
224
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Cindy Turner' }, void 0),
|
|
225
|
+
value: 'turnc',
|
|
226
|
+
id: 'turnc'
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
primary: 'Helen Bush',
|
|
230
|
+
secondary: ['Product Manager', 'Product Owner'],
|
|
231
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Helen Bush' }, void 0),
|
|
232
|
+
value: 'bushh',
|
|
233
|
+
id: 'bushh'
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
primary: 'Randy Paul',
|
|
237
|
+
secondary: ['Frontend Developer', 'Backend Developer'],
|
|
238
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Randy Paul' }, void 0),
|
|
239
|
+
value: 'paulr',
|
|
240
|
+
id: 'paulr'
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
primary: 'Janet Moore',
|
|
244
|
+
secondary: ['Backend Developer'],
|
|
245
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Janet Moore' }, void 0),
|
|
246
|
+
value: 'moorj',
|
|
247
|
+
id: 'moorj'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
primary: 'Kate Mirin',
|
|
251
|
+
secondary: ['Quality Engineer'],
|
|
252
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Kate Mirin' }, void 0),
|
|
253
|
+
value: 'mirik',
|
|
254
|
+
id: 'mirik'
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
primary: 'Bob Hathoway',
|
|
258
|
+
secondary: ['Lead Designer', 'Product Owner'],
|
|
259
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Bob Hathoway' }, void 0),
|
|
260
|
+
value: 'hathb',
|
|
261
|
+
id: 'hathb'
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
primary: 'Seth DeAngelo',
|
|
265
|
+
secondary: ['Senior Software Engineer', 'Backend Developer'],
|
|
266
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Seth DeAngelo' }, void 0),
|
|
267
|
+
value: 'deans',
|
|
268
|
+
id: 'deans'
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
primary: 'Dean Thomas',
|
|
272
|
+
secondary: ['Designer'],
|
|
273
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Dean Thomas' }, void 0),
|
|
274
|
+
value: 'thomd',
|
|
275
|
+
id: 'thomd'
|
|
276
|
+
}
|
|
277
|
+
];
|
|
278
|
+
//# sourceMappingURL=Feed.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feed.mocks.js","sourceRoot":"","sources":["../../../../src/components/Feed/mocks/Feed.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,E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AC9C,KAAK,EAAE,OAAO;QACd,EAAE,EAAE,OAAO;KACZ;CACF,CAAC","sourcesContent":["import { Avatar, EmailDisplay, PhoneDisplay } from '@pega/cosmos-react-core';\n\n// cspell: disable\nexport const userMentions = [\n {\n id: 'turnc',\n primary: 'Cindy Turner',\n secondary: ['Lead Engineer'],\n fields: [\n {\n name: 'Project',\n value: 'Cosmos Demo'\n },\n {\n name: 'Phone number',\n value: <PhoneDisplay value='(111) 111-1111' />\n },\n {\n name: 'Email',\n value: <EmailDisplay value='turnc@pega.com' />\n },\n {\n name: 'Reports to',\n value: 'Helen Bush'\n }\n ],\n visual: <Avatar size='l' name='Cindy Turner' />\n },\n {\n id: 'deans',\n primary: 'Seth DeAngelo',\n secondary: ['Senior Software Engineer', 'Backend Developer'],\n fields: [\n {\n name: 'Project',\n value: 'Cosmos Demo'\n },\n {\n name: 'Phone number',\n value: <PhoneDisplay value='(222) 222-2222' />\n },\n {\n name: 'Email',\n value: <EmailDisplay value='deans@pega.com' />\n },\n {\n name: 'Reports to',\n value: 'Helen Bush'\n }\n ],\n visual: <Avatar size='l' name='Seth DeAngelo' />\n },\n {\n id: 'moorj',\n primary: 'Janet Moore',\n secondary: ['Backend Developer'],\n fields: [\n {\n name: 'Project',\n value: 'Cosmos Demo'\n },\n {\n name: 'Phone number',\n value: <PhoneDisplay value='(333) 333-3333' />\n },\n {\n name: 'Email',\n value: <EmailDisplay value='moorj@pega.com' />\n },\n {\n name: 'Reports to',\n value: 'Helen Bush'\n }\n ],\n visual: <Avatar size='l' name='Janet Moore' />\n },\n {\n id: 'thomd',\n primary: 'Dean Thomas',\n secondary: ['Designer'],\n fields: [\n {\n name: 'Project',\n value: 'Cosmos Demo'\n },\n {\n name: 'Phone number',\n value: <PhoneDisplay value='(444) 444-4444' />\n },\n {\n name: 'Email',\n value: <EmailDisplay value='thomd@pega.com' />\n },\n {\n name: 'Reports to',\n value: 'Bob Hathoway'\n }\n ],\n visual: <Avatar size='l' name='Dean Thomas' />\n },\n {\n id: 'hathb',\n primary: 'Bob Hathoway',\n secondary: ['Lead Designer', 'Product Owner'],\n fields: [\n {\n name: 'Project',\n value: 'Cosmos Demo'\n },\n {\n name: 'Phone number',\n value: <PhoneDisplay value='(555) 555-5555' />\n },\n {\n name: 'Email',\n value: <EmailDisplay value='hathb@pega.com' />\n },\n {\n name: 'Reports to',\n value: ''\n }\n ],\n visual: <Avatar size='l' name='Bob Hathoway' />\n }\n];\n\nexport const caseMentions = [\n {\n id: 'c-001',\n primary: 'Complete user sign up form',\n secondary: ['US-111111'],\n visual: <Avatar size='l' name='c-001' icon='case' />\n },\n {\n id: 'c-002',\n primary: 'Button missing on home page',\n secondary: ['BUG-222222'],\n visual: <Avatar size='l' name='c-002' icon='case' />\n },\n {\n id: 'c-003',\n primary: 'Set up transaction broker',\n secondary: ['US-333333'],\n visual: <Avatar size='l' name='c-03' icon='case' />\n },\n {\n id: 'c-004',\n primary: 'Check in with security team',\n secondary: ['TASK-444444'],\n visual: <Avatar size='l' name='c-004' icon='case' />\n },\n {\n id: 'c-005',\n primary: 'Error occurs upon submitting form',\n secondary: ['BUG-555555'],\n visual: <Avatar size='l' name='c-005' icon='case' />\n }\n];\n\nexport const generatedLikes = [\n {\n primary: 'Cindy Turner',\n secondary: ['Lead Engineer'],\n visual: <Avatar size='l' name='Cindy Turner' />,\n id: 'turnc'\n },\n {\n primary: 'Helen Bush',\n secondary: ['Product Manager', 'Product Owner'],\n visual: <Avatar size='l' name='Helen Bush' />,\n id: 'bushh'\n },\n {\n primary: 'Randy Paul',\n secondary: ['Frontend Developer', 'Backend Developer'],\n visual: <Avatar size='l' name='Randy Paul' />,\n id: 'paulr'\n },\n {\n primary: 'Janet Moore',\n secondary: ['Backend Developer'],\n visual: <Avatar size='l' name='Janet Moore' />,\n id: 'moorj'\n },\n {\n primary: 'Kate Mirin',\n secondary: ['Quality Engineer'],\n visual: <Avatar size='l' name='Kate Mirin' />,\n id: 'mirik'\n },\n {\n primary: 'Bob Hathoway',\n secondary: ['Lead Designer', 'Product Owner'],\n visual: <Avatar size='l' name='Bob Hathoway' />,\n id: 'hathb'\n },\n {\n primary: 'Seth DeAngelo',\n secondary: ['Senior Software Engineer', 'Backend Developer'],\n visual: <Avatar size='l' name='Seth DeAngelo' />,\n id: 'deans'\n },\n {\n primary: 'Dean Thomas',\n secondary: ['Designer'],\n visual: <Avatar size='l' name='Dean Thomas' />,\n id: 'thomd'\n },\n {\n primary: 'Louie Santos',\n secondary: ['Marketing Specialist'],\n visual: <Avatar size='l' name='Louie Santos' />,\n id: 'santl'\n },\n {\n primary: 'Margaret Foster',\n secondary: ['Architect', 'Designer'],\n visual: <Avatar size='l' name='Margaret Foster' />,\n id: 'fostm'\n }\n];\n\nexport const availableRecipients = [\n {\n primary: 'Cindy Turner',\n secondary: ['Lead Engineer'],\n visual: <Avatar size='l' name='Cindy Turner' />,\n value: 'turnc',\n id: 'turnc'\n },\n {\n primary: 'Helen Bush',\n secondary: ['Product Manager', 'Product Owner'],\n visual: <Avatar size='l' name='Helen Bush' />,\n value: 'bushh',\n id: 'bushh'\n },\n {\n primary: 'Randy Paul',\n secondary: ['Frontend Developer', 'Backend Developer'],\n visual: <Avatar size='l' name='Randy Paul' />,\n value: 'paulr',\n id: 'paulr'\n },\n {\n primary: 'Janet Moore',\n secondary: ['Backend Developer'],\n visual: <Avatar size='l' name='Janet Moore' />,\n value: 'moorj',\n id: 'moorj'\n },\n {\n primary: 'Kate Mirin',\n secondary: ['Quality Engineer'],\n visual: <Avatar size='l' name='Kate Mirin' />,\n value: 'mirik',\n id: 'mirik'\n },\n {\n primary: 'Bob Hathoway',\n secondary: ['Lead Designer', 'Product Owner'],\n visual: <Avatar size='l' name='Bob Hathoway' />,\n value: 'hathb',\n id: 'hathb'\n },\n {\n primary: 'Seth DeAngelo',\n secondary: ['Senior Software Engineer', 'Backend Developer'],\n visual: <Avatar size='l' name='Seth DeAngelo' />,\n value: 'deans',\n id: 'deans'\n },\n {\n primary: 'Dean Thomas',\n secondary: ['Designer'],\n visual: <Avatar size='l' name='Dean Thomas' />,\n value: 'thomd',\n id: 'thomd'\n }\n];\n"]}
|
|
@@ -20,9 +20,7 @@ const HashtagButton = forwardRef(({ children, tag: tagProp = '', ...restProps },
|
|
|
20
20
|
else {
|
|
21
21
|
tag = tagProp;
|
|
22
22
|
}
|
|
23
|
-
return (_jsxs(_Fragment, { children: [leadingChar && _jsx("span", { children: leadingChar }, void 0),
|
|
24
|
-
_jsx(StyledTag, Object.assign({}, restProps, { ref: ref, onClick: () => onTagClick === null || onTagClick === void 0 ? void 0 : onTagClick(tag) }, { children: isValidElement(children) ? children : tag }), void 0),
|
|
25
|
-
trailingChar && _jsx("span", { children: trailingChar }, void 0)] }, void 0));
|
|
23
|
+
return (_jsxs(_Fragment, { children: [leadingChar && _jsx("span", { children: leadingChar }, void 0), _jsx(StyledTag, Object.assign({}, restProps, { ref: ref, onClick: () => onTagClick?.(tag) }, { children: isValidElement(children) ? children : tag }), void 0), trailingChar && _jsx("span", { children: trailingChar }, void 0)] }, void 0));
|
|
26
24
|
});
|
|
27
25
|
export const HashtagButtonConfig = {
|
|
28
26
|
type: 'tag',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashtagButton.js","sourceRoot":"","sources":["../../../src/components/HashtagButton/HashtagButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAEV,cAAc,EAId,UAAU,EACX,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,GAAG,EAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;;CAE5B,CAAC;AAEF,MAAM,aAAa,GAAyD,UAAU,CACpF,CACE,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,SAAS,EAAuC,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,GAAG,EAAE,CAAC;IACrB,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,IAAI,GAAG,GAAG,EAAE,CAAC;IAEb,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QAC7B,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,yBAAO,QAAQ,CAAC,CAAC,CAAC,WAAQ,CAAC;QAExD,CAAC,WAAW,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;KAC3B;SAAM;QACL,GAAG,GAAG,OAAO,CAAC;KACf;IAED,OAAO,CACL,8BACG,WAAW,IAAI,yBAAO,WAAW,WAAQ,EAC1C,KAAC,SAAS,oBAAK,SAAS,IAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,gBACjE,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,YAChC,EACX,YAAY,IAAI,yBAAO,YAAY,WAAQ,YAC3C,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,qCAAqC;IACnD,SAAS,EAAE,aAAa;CACzB,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n isValidElement,\n PropsWithoutRef,\n ReactElement,\n Ref,\n useContext\n} from 'react';\nimport styled from 'styled-components';\n\nimport { Tag, ForwardProps } from '@pega/cosmos-react-core';\n\nimport { FeedContext } from '../Feed/Feed.context';\n\ninterface HashtagButtonProps {\n /** Text for the button, or a regex match containing all necessary props. */\n children: RegExpExecArray | ReactElement;\n /** The tag value. */\n tag?: string;\n}\n\nconst StyledTag = styled(Tag)`\n cursor: pointer;\n`;\n\nconst HashtagButton: FunctionComponent<HashtagButtonProps & ForwardProps> = forwardRef(\n (\n { children, tag: tagProp = '', ...restProps }: PropsWithoutRef<HashtagButtonProps>,\n ref: Ref<HTMLButtonElement>\n ) => {\n const { onTagClick } = useContext(FeedContext);\n\n let leadingChar = '';\n let trailingChar = '';\n let tag = '';\n\n if (!isValidElement(children)) {\n if (!children.groups) return <span>{children[0]}</span>;\n\n [leadingChar, trailingChar] = children[0].split(children.groups.match);\n tag = children.groups.tag;\n } else {\n tag = tagProp;\n }\n\n return (\n <>\n {leadingChar && <span>{leadingChar}</span>}\n <StyledTag {...restProps} ref={ref} onClick={() => onTagClick?.(tag)}>\n {isValidElement(children) ? children : tag}\n </StyledTag>\n {trailingChar && <span>{trailingChar}</span>}\n </>\n );\n }\n);\n\nexport const HashtagButtonConfig = {\n type: 'tag',\n regexPattern: /(?:^|)(?<match>#(?<tag>[^ :]+\\w):)/g,\n component: HashtagButton\n};\n\nexport default HashtagButton;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionButton.d.ts","sourceRoot":"","sources":["../../../src/components/MentionButton/MentionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAGjB,YAAY,EAKb,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,YAAY,EAIb,MAAM,yBAAyB,CAAC;AAIjC,UAAU,kBAAkB;IAC1B,4EAA4E;IAC5E,QAAQ,EAAE,eAAe,GAAG,YAAY,CAAC;IACzC,8BAA8B;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAUD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"MentionButton.d.ts","sourceRoot":"","sources":["../../../src/components/MentionButton/MentionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAGjB,YAAY,EAKb,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,YAAY,EAIb,MAAM,yBAAyB,CAAC;AAIjC,UAAU,kBAAkB;IAC1B,4EAA4E;IAC5E,QAAQ,EAAE,eAAe,GAAG,YAAY,CAAC;IACzC,8BAA8B;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAUD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAqEvE,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -38,7 +38,7 @@ const MentionButton = forwardRef(({ children, id: idProp = '', text: textProp =
|
|
|
38
38
|
type = typeProp;
|
|
39
39
|
}
|
|
40
40
|
const handleClick = () => {
|
|
41
|
-
const comp = onMentionClick
|
|
41
|
+
const comp = onMentionClick?.({
|
|
42
42
|
id,
|
|
43
43
|
text,
|
|
44
44
|
type
|
|
@@ -47,10 +47,7 @@ const MentionButton = forwardRef(({ children, id: idProp = '', text: textProp =
|
|
|
47
47
|
setShowPopover(true);
|
|
48
48
|
setMentionContent(comp);
|
|
49
49
|
};
|
|
50
|
-
return (_jsxs(_Fragment, { children: [leadingChar && _jsx("span", { children: leadingChar }, void 0),
|
|
51
|
-
_jsx(StyledButton, Object.assign({}, restProps, { ref: mentionRef, variant: 'link', onClick: handleClick }, { children: isValidElement(children) ? children : text }), void 0),
|
|
52
|
-
trailingChar && _jsx("span", { children: trailingChar }, void 0),
|
|
53
|
-
_jsx(Popover, Object.assign({ ref: popoverRef, show: showPopover, target: mentionRef.current, placement: 'bottom-start', arrow: true, portal: true }, { children: mentionContent }), void 0)] }, void 0));
|
|
50
|
+
return (_jsxs(_Fragment, { children: [leadingChar && _jsx("span", { children: leadingChar }, void 0), _jsx(StyledButton, Object.assign({}, restProps, { ref: mentionRef, variant: 'link', onClick: handleClick }, { children: isValidElement(children) ? children : text }), void 0), trailingChar && _jsx("span", { children: trailingChar }, void 0), _jsx(Popover, Object.assign({ ref: popoverRef, show: showPopover, target: mentionRef.current, placement: 'bottom-start', arrow: true }, { children: mentionContent }), void 0)] }, void 0));
|
|
54
51
|
});
|
|
55
52
|
export const MentionButtonConfig = {
|
|
56
53
|
type: 'mention',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionButton.js","sourceRoot":"","sources":["../../../src/components/MentionButton/MentionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAEV,cAAc,EAId,UAAU,EACV,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,MAAM,EAEN,OAAO,EACP,kBAAkB,EAClB,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAanD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;;;;;CAMlC,CAAC;AAEF,MAAM,aAAa,GAAyD,UAAU,CACpF,CACE,EACE,QAAQ,EACR,EAAE,EAAE,MAAM,GAAG,EAAE,EACf,IAAI,EAAE,QAAQ,GAAG,EAAE,EACnB,IAAI,EAAE,QAAQ,GAAG,EAAE,EACnB,GAAG,SAAS,EACwB,EACtC,GAA2B,EAC3B,EAAE;IACF,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACnD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,EAA2B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AM,mBAAmB,GAAG;IACjC,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,sEAAsE;IACpF,SAAS,EAAE,aAAa;CACzB,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n isValidElement,\n PropsWithoutRef,\n ReactElement,\n Ref,\n useContext,\n useRef,\n useState\n} from 'react';\nimport styled from 'styled-components';\n\nimport {\n Button,\n ForwardProps,\n Popover,\n useConsolidatedRef,\n useOuterEvent\n} from '@pega/cosmos-react-core';\n\nimport { FeedContext } from '../Feed/Feed.context';\n\ninterface MentionButtonProps {\n /** Text for the button, or a regex match containing all necessary props. */\n children: RegExpExecArray | ReactElement;\n /** The id of the mention. */\n id?: string;\n /** The text of the mention button. */\n text?: string;\n /** Designates the type of the mention for proper handling on click. */\n type?: string;\n}\n\nconst StyledButton = styled(Button)`\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: none;\n text-decoration: underline;\n }\n`;\n\nconst MentionButton: FunctionComponent<MentionButtonProps & ForwardProps> = forwardRef(\n (\n {\n children,\n id: idProp = '',\n text: textProp = '',\n type: typeProp = '',\n ...restProps\n }: PropsWithoutRef<MentionButtonProps>,\n ref: Ref<HTMLButtonElement>\n ) => {\n const { onMentionClick } = useContext(FeedContext);\n const [showPopover, setShowPopover] = useState(false);\n const [mentionContent, setMentionContent] = useState<JSX.Element | undefined>();\n const mentionRef = useConsolidatedRef(ref);\n const popoverRef = useRef(null);\n\n useOuterEvent(['click', 'focusin'], [mentionRef, popoverRef], () => {\n setShowPopover(false);\n });\n\n let leadingChar = '';\n let trailingChar = '';\n let id = '';\n let text = '';\n let type = '';\n\n if (!isValidElement(children)) {\n if (!children.groups) return <span>{children[0]}</span>;\n\n [leadingChar, trailingChar] = children[0].split(children.groups.match);\n id = children.groups.id;\n text = children.groups.text;\n type = children.groups.type;\n } else {\n id = idProp;\n text = textProp;\n type = typeProp;\n }\n\n const handleClick = () => {\n const comp = onMentionClick?.({\n id,\n text,\n type\n });\n if (comp) setShowPopover(true);\n setMentionContent(comp);\n };\n\n return (\n <>\n {leadingChar && <span>{leadingChar}</span>}\n <StyledButton {...restProps} ref={mentionRef} variant='link' onClick={handleClick}>\n {isValidElement(children) ? children : text}\n </StyledButton>\n {trailingChar && <span>{trailingChar}</span>}\n <Popover\n ref={popoverRef}\n show={showPopover}\n target={mentionRef.current}\n placement='bottom-start'\n arrow\n >\n {mentionContent}\n </Popover>\n </>\n );\n }\n);\n\nexport const MentionButtonConfig = {\n type: 'mention',\n regexPattern: /(?:^|)(?<match>@(?<id>[^ :]+\\w):(?<text>[^:]+\\w):(?<type>[^:]+\\w):)/g,\n component: MentionButton\n};\n\nexport default MentionButton;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-social",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.13.0",
|
|
4
4
|
"author": "Pegasystems",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -20,25 +20,25 @@
|
|
|
20
20
|
"build": "tsc -b"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pega/cosmos-react-core": "2.0.0-dev.
|
|
24
|
-
"@pega/cosmos-react-rte": "2.0.0-dev.
|
|
25
|
-
"@pega/cosmos-react-work": "2.0.0-dev.
|
|
23
|
+
"@pega/cosmos-react-core": "2.0.0-dev.13.0",
|
|
24
|
+
"@pega/cosmos-react-rte": "2.0.0-dev.13.0",
|
|
25
|
+
"@pega/cosmos-react-work": "2.0.0-dev.13.0",
|
|
26
26
|
"polished": "^4.1.0",
|
|
27
27
|
"react": "^16.14.0 || ^17.0.0",
|
|
28
28
|
"react-dom": "^16.14.0 || ^17.0.0",
|
|
29
29
|
"styled-components": "^5.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@storybook/addon-a11y": "^6.3.
|
|
33
|
-
"@storybook/addon-actions": "^6.3.
|
|
34
|
-
"@storybook/addon-knobs": "^6.3.
|
|
35
|
-
"@storybook/addon-storysource": "^6.3.
|
|
36
|
-
"@storybook/addon-toolbars": "^6.3.
|
|
37
|
-
"@storybook/addons": "^6.3.
|
|
38
|
-
"@storybook/react": "^6.3.
|
|
39
|
-
"@storybook/theming": "^6.3.
|
|
32
|
+
"@storybook/addon-a11y": "^6.3.8",
|
|
33
|
+
"@storybook/addon-actions": "^6.3.8",
|
|
34
|
+
"@storybook/addon-knobs": "^6.3.1",
|
|
35
|
+
"@storybook/addon-storysource": "^6.3.8",
|
|
36
|
+
"@storybook/addon-toolbars": "^6.3.8",
|
|
37
|
+
"@storybook/addons": "^6.3.8",
|
|
38
|
+
"@storybook/react": "^6.3.8",
|
|
39
|
+
"@storybook/theming": "^6.3.8",
|
|
40
40
|
"enzyme": "^3.11.0",
|
|
41
41
|
"enzyme-adapter-react-16": "^1.15.5",
|
|
42
|
-
"typescript": "~4.
|
|
42
|
+
"typescript": "~4.4.2"
|
|
43
43
|
}
|
|
44
44
|
}
|