coinsperformance 0.0.5 → 0.0.7
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/dist/components/Molecules/ExperientialComponents/NewActivityBanner.d.ts +18 -0
- package/dist/components/Molecules/ExperientialComponents/NewActivityBanner.js +78 -0
- package/dist/components/Molecules/ExperientialComponents/NewActivityBanner.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/NewActivityCard.d.ts +25 -0
- package/dist/components/Molecules/ExperientialComponents/NewActivityCard.js +72 -0
- package/dist/components/Molecules/ExperientialComponents/NewActivityCard.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/NewAddPostCard.d.ts +9 -0
- package/dist/components/Molecules/ExperientialComponents/NewAddPostCard.js +29 -0
- package/dist/components/Molecules/ExperientialComponents/NewAddPostCard.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostCard.d.ts +27 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostCard.js +89 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostCard.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostInfo.d.ts +29 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostInfo.js +217 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostInfo.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostInfoStyles.d.ts +441 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostInfoStyles.js +416 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostInfoStyles.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostList.d.ts +51 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostList.js +79 -0
- package/dist/components/Molecules/ExperientialComponents/NewPostList.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/newActivityBannerStyles.d.ts +120 -0
- package/dist/components/Molecules/ExperientialComponents/newActivityBannerStyles.js +124 -0
- package/dist/components/Molecules/ExperientialComponents/newActivityBannerStyles.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/newActivityCardStyles.d.ts +86 -0
- package/dist/components/Molecules/ExperientialComponents/newActivityCardStyles.js +91 -0
- package/dist/components/Molecules/ExperientialComponents/newActivityCardStyles.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/newAddPostCardStyles.d.ts +107 -0
- package/dist/components/Molecules/ExperientialComponents/newAddPostCardStyles.js +110 -0
- package/dist/components/Molecules/ExperientialComponents/newAddPostCardStyles.js.map +1 -0
- package/dist/components/Molecules/ExperientialComponents/newPostCardStyles.d.ts +197 -0
- package/dist/components/Molecules/ExperientialComponents/newPostCardStyles.js +201 -0
- package/dist/components/Molecules/ExperientialComponents/newPostCardStyles.js.map +1 -0
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.d.ts +1 -1
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.js +3 -2
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.js.map +1 -1
- package/dist/components/Molecules/SLI/SLIChart.d.ts +4 -0
- package/dist/components/Molecules/SLI/SLIChart.js +237 -0
- package/dist/components/Molecules/SLI/SLIChart.js.map +1 -0
- package/dist/components/Molecules/SLI/data.d.ts +14 -0
- package/dist/components/Molecules/SLI/data.js +236 -0
- package/dist/components/Molecules/SLI/data.js.map +1 -0
- package/dist/components/Molecules/SLI/sliUtils.d.ts +44 -0
- package/dist/components/Molecules/SLI/sliUtils.js +55 -0
- package/dist/components/Molecules/SLI/sliUtils.js.map +1 -0
- package/dist/components/Organisms/NewActivityList/NewActivityList.d.ts +10 -0
- package/dist/components/Organisms/NewActivityList/NewActivityList.js +35 -0
- package/dist/components/Organisms/NewActivityList/NewActivityList.js.map +1 -0
- package/dist/components/Organisms/PostDetails/ImageGallery.d.ts +1 -1
- package/dist/components/Organisms/PostDetails/ImageGallery.js +15 -5
- package/dist/components/Organisms/PostDetails/ImageGallery.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/common-utils.d.ts +2 -0
- package/dist/utils/common-utils.js +151 -1
- package/dist/utils/common-utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NewPostInfoStyles = void 0;
|
|
4
|
+
exports.NewPostInfoStyles = {
|
|
5
|
+
mainContainer: {
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: { base: "column", lg: "row" },
|
|
8
|
+
width: "auto",
|
|
9
|
+
height: "80vh",
|
|
10
|
+
padding: "12px 12px 24px 12px",
|
|
11
|
+
alignItems: "stretch",
|
|
12
|
+
gap: "24px",
|
|
13
|
+
overflow: "auto",
|
|
14
|
+
},
|
|
15
|
+
leftSection: {
|
|
16
|
+
flex: { base: "none", lg: 1 },
|
|
17
|
+
minWidth: 0,
|
|
18
|
+
borderRadius: "8px",
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
},
|
|
23
|
+
rightSection: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
flex: { base: 1, lg: 1 },
|
|
27
|
+
minWidth: 0,
|
|
28
|
+
minHeight: { base: "60vh", lg: 0 },
|
|
29
|
+
alignItems: "flex-start",
|
|
30
|
+
},
|
|
31
|
+
rightSectionHeader: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
flexDirection: "column",
|
|
34
|
+
alignItems: "flex-start",
|
|
35
|
+
gap: "8px",
|
|
36
|
+
width: "100%",
|
|
37
|
+
flexShrink: 0,
|
|
38
|
+
},
|
|
39
|
+
rightSectionContent: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
alignItems: "flex-start",
|
|
43
|
+
gap: "8px",
|
|
44
|
+
width: "100%",
|
|
45
|
+
flex: 1,
|
|
46
|
+
overflowY: "auto",
|
|
47
|
+
minHeight: 0,
|
|
48
|
+
},
|
|
49
|
+
rightSectionBottom: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "column",
|
|
52
|
+
alignItems: "flex-start",
|
|
53
|
+
gap: "8px",
|
|
54
|
+
width: "100%",
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
marginTop: "auto",
|
|
57
|
+
paddingTop: "8px",
|
|
58
|
+
},
|
|
59
|
+
leftSectionBottom: {
|
|
60
|
+
flexShrink: 0,
|
|
61
|
+
marginTop: "auto",
|
|
62
|
+
paddingTop: "8px",
|
|
63
|
+
},
|
|
64
|
+
authorSection: {
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
gap: "8px",
|
|
67
|
+
},
|
|
68
|
+
authorImage: {
|
|
69
|
+
boxSize: "48px",
|
|
70
|
+
padding: "24px",
|
|
71
|
+
justifyContent: "center",
|
|
72
|
+
alignItems: "center",
|
|
73
|
+
borderRadius: "8px",
|
|
74
|
+
background: "#8877EA",
|
|
75
|
+
},
|
|
76
|
+
authorName: {
|
|
77
|
+
color: "#263238",
|
|
78
|
+
fontFamily: "Poppins",
|
|
79
|
+
fontSize: "16px",
|
|
80
|
+
fontStyle: "normal",
|
|
81
|
+
fontWeight: "600",
|
|
82
|
+
lineHeight: "28px",
|
|
83
|
+
},
|
|
84
|
+
subjectSection: {
|
|
85
|
+
alignItems: "flex-start",
|
|
86
|
+
gap: "4px",
|
|
87
|
+
},
|
|
88
|
+
subjectName: {
|
|
89
|
+
color: "#312961",
|
|
90
|
+
fontFamily: "Poppins",
|
|
91
|
+
fontSize: "14px",
|
|
92
|
+
fontStyle: "normal",
|
|
93
|
+
fontWeight: "700",
|
|
94
|
+
lineHeight: "28px",
|
|
95
|
+
},
|
|
96
|
+
topicName: {
|
|
97
|
+
color: "#263238",
|
|
98
|
+
fontFamily: "Poppins",
|
|
99
|
+
fontSize: "14px",
|
|
100
|
+
fontStyle: "normal",
|
|
101
|
+
fontWeight: "500",
|
|
102
|
+
lineHeight: "28px",
|
|
103
|
+
},
|
|
104
|
+
activityTitle: {
|
|
105
|
+
color: "#263238",
|
|
106
|
+
fontFamily: "Poppins",
|
|
107
|
+
fontSize: "16px",
|
|
108
|
+
fontStyle: "normal",
|
|
109
|
+
fontWeight: "600",
|
|
110
|
+
lineHeight: "28px",
|
|
111
|
+
},
|
|
112
|
+
tabsContainer: {
|
|
113
|
+
display: "flex",
|
|
114
|
+
width: "100%",
|
|
115
|
+
backgroundColor: "#f4f2ff",
|
|
116
|
+
borderRadius: { base: "6px", md: "8px" },
|
|
117
|
+
overflow: "hidden",
|
|
118
|
+
},
|
|
119
|
+
tab: {
|
|
120
|
+
flex: 1,
|
|
121
|
+
display: "flex",
|
|
122
|
+
alignItems: "center",
|
|
123
|
+
justifyContent: "center",
|
|
124
|
+
gap: { base: "8px", md: "10px", lg: "12px" },
|
|
125
|
+
padding: { base: "12px 16px", md: "14px 18px", lg: "15px 20px" },
|
|
126
|
+
cursor: "pointer",
|
|
127
|
+
transition: "all 0.3s ease",
|
|
128
|
+
},
|
|
129
|
+
activeTab: {
|
|
130
|
+
backgroundColor: "#5f4dc7",
|
|
131
|
+
color: "#ffffff",
|
|
132
|
+
},
|
|
133
|
+
inactiveTab: {
|
|
134
|
+
backgroundColor: "transparent",
|
|
135
|
+
color: "#8b7cb8",
|
|
136
|
+
},
|
|
137
|
+
tabIcon: {
|
|
138
|
+
fontSize: { base: "16px", md: "18px", lg: "20px" },
|
|
139
|
+
display: "flex",
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
justifyContent: "center",
|
|
142
|
+
},
|
|
143
|
+
tabText: {
|
|
144
|
+
fontFamily: "Poppins",
|
|
145
|
+
fontSize: { base: "14px", md: "16px", lg: "18px" },
|
|
146
|
+
fontWeight: "500",
|
|
147
|
+
lineHeight: { base: "20px", md: "24px", lg: "28px" },
|
|
148
|
+
},
|
|
149
|
+
postContent: {
|
|
150
|
+
color: "#666A6B",
|
|
151
|
+
fontFamily: "Poppins",
|
|
152
|
+
fontSize: "16px",
|
|
153
|
+
fontStyle: "normal",
|
|
154
|
+
fontWeight: "400",
|
|
155
|
+
lineHeight: "24px" /* 150% */,
|
|
156
|
+
letterSpacing: "0.16px",
|
|
157
|
+
},
|
|
158
|
+
attachmentHeading: {
|
|
159
|
+
color: "#312961",
|
|
160
|
+
fontFamily: "Poppins",
|
|
161
|
+
fontSize: "12px",
|
|
162
|
+
fontWeight: "700",
|
|
163
|
+
lineHeight: "28px",
|
|
164
|
+
},
|
|
165
|
+
emojiSection: {
|
|
166
|
+
width: "100%",
|
|
167
|
+
alignItems: "flex-end",
|
|
168
|
+
justifyContent: "flex-end",
|
|
169
|
+
gap: "24px",
|
|
170
|
+
},
|
|
171
|
+
emojiText: {
|
|
172
|
+
color: "#666A6B",
|
|
173
|
+
fontFamily: "Poppins",
|
|
174
|
+
fontSize: "12px",
|
|
175
|
+
fontWeight: "500",
|
|
176
|
+
lineHeight: "20px",
|
|
177
|
+
},
|
|
178
|
+
imageTilesContainer: {
|
|
179
|
+
display: "flex",
|
|
180
|
+
gap: "12px",
|
|
181
|
+
alignItems: "flex-start",
|
|
182
|
+
width: "100%",
|
|
183
|
+
},
|
|
184
|
+
imageTileFrame: {
|
|
185
|
+
width: "72px",
|
|
186
|
+
height: "56px",
|
|
187
|
+
borderRadius: "4px",
|
|
188
|
+
border: "2px solid #d8d1ff",
|
|
189
|
+
background: "#faf9fe",
|
|
190
|
+
boxShadow: "1px 2px 2px 0px rgba(0,0,0,0.25)",
|
|
191
|
+
position: "relative",
|
|
192
|
+
overflow: "hidden",
|
|
193
|
+
flexShrink: 0,
|
|
194
|
+
},
|
|
195
|
+
imageTileImage: {
|
|
196
|
+
width: "100%",
|
|
197
|
+
height: "100%",
|
|
198
|
+
objectFit: "cover",
|
|
199
|
+
borderRadius: "4px",
|
|
200
|
+
},
|
|
201
|
+
// Comments section styles
|
|
202
|
+
commentsContainer: {
|
|
203
|
+
mt: "24px",
|
|
204
|
+
display: "flex",
|
|
205
|
+
flexDirection: "column",
|
|
206
|
+
gap: "24px",
|
|
207
|
+
width: "100%",
|
|
208
|
+
// height: "222px",
|
|
209
|
+
overflowY: "auto",
|
|
210
|
+
},
|
|
211
|
+
commentItem: {
|
|
212
|
+
display: "flex",
|
|
213
|
+
gap: "12px",
|
|
214
|
+
alignItems: "flex-start",
|
|
215
|
+
width: "100%",
|
|
216
|
+
},
|
|
217
|
+
commentItemPinned: {
|
|
218
|
+
backgroundColor: "#e9e5ff",
|
|
219
|
+
padding: "8px 12px",
|
|
220
|
+
borderRadius: "8px",
|
|
221
|
+
},
|
|
222
|
+
commentItemSubjectTeacher: {
|
|
223
|
+
backgroundColor: "#f0f8ff",
|
|
224
|
+
padding: "8px 12px",
|
|
225
|
+
borderRadius: "8px",
|
|
226
|
+
border: "1px solid #d1e7ff",
|
|
227
|
+
},
|
|
228
|
+
commentAvatar: {
|
|
229
|
+
width: "30px",
|
|
230
|
+
height: "30px",
|
|
231
|
+
borderRadius: "32px",
|
|
232
|
+
backgroundColor: "#ccd1e8",
|
|
233
|
+
overflow: "hidden",
|
|
234
|
+
flexShrink: 0,
|
|
235
|
+
},
|
|
236
|
+
commentAvatarImage: {
|
|
237
|
+
width: "100%",
|
|
238
|
+
height: "100%",
|
|
239
|
+
objectFit: "cover",
|
|
240
|
+
},
|
|
241
|
+
commentContent: {
|
|
242
|
+
display: "flex",
|
|
243
|
+
flexDirection: "column",
|
|
244
|
+
gap: "2px",
|
|
245
|
+
flex: 1,
|
|
246
|
+
minWidth: 0,
|
|
247
|
+
},
|
|
248
|
+
commentHeader: {
|
|
249
|
+
display: "flex",
|
|
250
|
+
gap: "8px",
|
|
251
|
+
alignItems: "center",
|
|
252
|
+
},
|
|
253
|
+
commentAuthorName: {
|
|
254
|
+
color: "#263238",
|
|
255
|
+
fontFamily: "Poppins",
|
|
256
|
+
fontSize: "14px",
|
|
257
|
+
fontStyle: "normal",
|
|
258
|
+
fontWeight: "500",
|
|
259
|
+
lineHeight: "20px",
|
|
260
|
+
},
|
|
261
|
+
commentAuthorRole: {
|
|
262
|
+
display: "flex",
|
|
263
|
+
alignItems: "center",
|
|
264
|
+
gap: "4px",
|
|
265
|
+
},
|
|
266
|
+
commentRoleText: {
|
|
267
|
+
color: "#312961",
|
|
268
|
+
fontFamily: "Poppins",
|
|
269
|
+
fontSize: "14px",
|
|
270
|
+
fontStyle: "normal",
|
|
271
|
+
fontWeight: "700",
|
|
272
|
+
lineHeight: "20px",
|
|
273
|
+
},
|
|
274
|
+
commentText: {
|
|
275
|
+
color: "#666a6b",
|
|
276
|
+
fontFamily: "Poppins",
|
|
277
|
+
fontSize: "12px",
|
|
278
|
+
fontStyle: "normal",
|
|
279
|
+
fontWeight: "500",
|
|
280
|
+
lineHeight: "28px",
|
|
281
|
+
width: "350px",
|
|
282
|
+
},
|
|
283
|
+
commentMeta: {
|
|
284
|
+
display: "flex",
|
|
285
|
+
alignItems: "center",
|
|
286
|
+
gap: "8px",
|
|
287
|
+
},
|
|
288
|
+
commentTimestamp: {
|
|
289
|
+
color: "#919191",
|
|
290
|
+
fontFamily: "Poppins",
|
|
291
|
+
fontSize: "10px",
|
|
292
|
+
fontStyle: "normal",
|
|
293
|
+
fontWeight: "400",
|
|
294
|
+
lineHeight: "20px",
|
|
295
|
+
},
|
|
296
|
+
commentPin: {
|
|
297
|
+
width: "20.98px",
|
|
298
|
+
height: "20.98px",
|
|
299
|
+
display: "flex",
|
|
300
|
+
alignItems: "center",
|
|
301
|
+
justifyContent: "center",
|
|
302
|
+
transform: "rotate(23deg)",
|
|
303
|
+
flexShrink: 0,
|
|
304
|
+
},
|
|
305
|
+
commentsDivider: {
|
|
306
|
+
// height: "1px",
|
|
307
|
+
border: "1px dotted rgba(0,0,0,0.1)",
|
|
308
|
+
width: "100%",
|
|
309
|
+
},
|
|
310
|
+
// Comment input styles
|
|
311
|
+
commentInputContainer: {
|
|
312
|
+
display: "flex",
|
|
313
|
+
flexDirection: "column",
|
|
314
|
+
alignItems: "flex-start",
|
|
315
|
+
justifyContent: "flex-end",
|
|
316
|
+
paddingBottom: "15px",
|
|
317
|
+
width: "100%",
|
|
318
|
+
flexShrink: 0,
|
|
319
|
+
},
|
|
320
|
+
commentInputBox: {
|
|
321
|
+
backgroundColor: "#f4f2ff",
|
|
322
|
+
border: "1px solid rgba(0,0,0,0.2)",
|
|
323
|
+
borderRadius: "8px",
|
|
324
|
+
height: "49px",
|
|
325
|
+
width: "100%",
|
|
326
|
+
position: "relative",
|
|
327
|
+
display: "flex",
|
|
328
|
+
alignItems: "center",
|
|
329
|
+
padding: "0 12px",
|
|
330
|
+
gap: "12px",
|
|
331
|
+
},
|
|
332
|
+
commentInputField: {
|
|
333
|
+
backgroundColor: "transparent",
|
|
334
|
+
border: "none",
|
|
335
|
+
outline: "none",
|
|
336
|
+
flex: 1,
|
|
337
|
+
color: "black",
|
|
338
|
+
fontFamily: "Poppins",
|
|
339
|
+
fontSize: "18px",
|
|
340
|
+
fontStyle: "normal",
|
|
341
|
+
fontWeight: "500",
|
|
342
|
+
lineHeight: "28px",
|
|
343
|
+
"&::placeholder": {
|
|
344
|
+
color: "black",
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
commentEmojiButton: {
|
|
348
|
+
width: "24px",
|
|
349
|
+
height: "24px",
|
|
350
|
+
cursor: "pointer",
|
|
351
|
+
backgroundColor: "transparent",
|
|
352
|
+
border: "none",
|
|
353
|
+
display: "flex",
|
|
354
|
+
alignItems: "center",
|
|
355
|
+
justifyContent: "center",
|
|
356
|
+
},
|
|
357
|
+
commentSendButton: {
|
|
358
|
+
width: "32px",
|
|
359
|
+
height: "32px",
|
|
360
|
+
// backgroundColor: "#a0a0a0",
|
|
361
|
+
borderRadius: "4px",
|
|
362
|
+
cursor: "pointer",
|
|
363
|
+
border: "none",
|
|
364
|
+
display: "flex",
|
|
365
|
+
alignItems: "center",
|
|
366
|
+
justifyContent: "center",
|
|
367
|
+
},
|
|
368
|
+
// Comment suggestions styles
|
|
369
|
+
commentSuggestionsContainer: {
|
|
370
|
+
position: "absolute",
|
|
371
|
+
bottom: "calc(100% + 12px)",
|
|
372
|
+
left: "0",
|
|
373
|
+
right: "0",
|
|
374
|
+
backgroundColor: "#e9e5ff",
|
|
375
|
+
borderRadius: "8px",
|
|
376
|
+
padding: "20px 12px",
|
|
377
|
+
display: "flex",
|
|
378
|
+
flexDirection: "column",
|
|
379
|
+
gap: "13px",
|
|
380
|
+
boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.15)",
|
|
381
|
+
zIndex: 1000,
|
|
382
|
+
maxHeight: "200px",
|
|
383
|
+
overflowY: "auto",
|
|
384
|
+
},
|
|
385
|
+
commentSuggestionItem: {
|
|
386
|
+
backgroundColor: "rgba(0,0,0,0)",
|
|
387
|
+
cursor: "pointer",
|
|
388
|
+
display: "flex",
|
|
389
|
+
flexDirection: "column",
|
|
390
|
+
alignItems: "flex-start",
|
|
391
|
+
justifyContent: "center",
|
|
392
|
+
padding: "4px 8px",
|
|
393
|
+
borderRadius: "4px",
|
|
394
|
+
width: "100%",
|
|
395
|
+
transition: "background-color 0.2s ease",
|
|
396
|
+
"&:hover": {
|
|
397
|
+
backgroundColor: "rgba(255, 255, 255, 0.3)",
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
commentSuggestionText: {
|
|
401
|
+
fontFamily: "Poppins",
|
|
402
|
+
fontSize: "12px",
|
|
403
|
+
fontStyle: "normal",
|
|
404
|
+
fontWeight: "500",
|
|
405
|
+
lineHeight: "28px",
|
|
406
|
+
color: "black",
|
|
407
|
+
whiteSpace: "normal",
|
|
408
|
+
wordWrap: "break-word",
|
|
409
|
+
},
|
|
410
|
+
commentSuggestionDivider: {
|
|
411
|
+
height: "1px",
|
|
412
|
+
background: 'url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="1"><line x1="0" y1="0.5" x2="100" y2="0.5" stroke="%23999" stroke-dasharray="2,2" stroke-width="1"/></svg>\') repeat-x',
|
|
413
|
+
width: "100%",
|
|
414
|
+
},
|
|
415
|
+
};
|
|
416
|
+
//# sourceMappingURL=NewPostInfoStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewPostInfoStyles.js","sourceRoot":"","sources":["../../../../src/components/Molecules/ExperientialComponents/NewPostInfoStyles.tsx"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,aAAa,EAAE;QACb,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE;QAC5C,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,qBAAqB;QAC9B,UAAU,EAAE,SAAS;QACrB,GAAG,EAAE,MAAM;QACX,QAAQ,EAAE,MAAM;KACjB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE;QAC7B,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,KAAK;QACnB,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;KACxB;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;QACxB,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE;QAClC,UAAU,EAAE,YAAY;KACzB;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,YAAY;QACxB,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,CAAC;KACd;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE,MAAM;QACf,aAAa,E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EAAE,MAAM;QACX,SAAS,EAAE,kCAAkC;QAC7C,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,MAAM;KAClB;IACD,qBAAqB,EAAE;QACrB,eAAe,EAAE,eAAe;QAChC,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,YAAY;QACxB,cAAc,EAAE,QAAQ;QACxB,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,4BAA4B;QACxC,SAAS,EAAE;YACT,eAAe,EAAE,0BAA0B;SAC5C;KACF;IACD,qBAAqB,EAAE;QACrB,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,YAAY;KACvB;IACD,wBAAwB,EAAE;QACxB,MAAM,EAAE,KAAK;QACb,UAAU,EACR,kNAAkN;QACpN,KAAK,EAAE,MAAM;KACd;CACF,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
interface PostUserInfo {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
profileImage?: string;
|
|
5
|
+
_id?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PostAttachment {
|
|
8
|
+
id: string;
|
|
9
|
+
fileName: string;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
}
|
|
13
|
+
interface ActivityPost {
|
|
14
|
+
postId: string;
|
|
15
|
+
userInfo: PostUserInfo[];
|
|
16
|
+
attachments?: PostAttachment[];
|
|
17
|
+
postBody: string;
|
|
18
|
+
emojiCount?: number;
|
|
19
|
+
commentsCount?: number;
|
|
20
|
+
updatedAt?: string;
|
|
21
|
+
updatesCount?: number;
|
|
22
|
+
}
|
|
23
|
+
interface ActivityData {
|
|
24
|
+
allowCommentsAndInteractions?: boolean;
|
|
25
|
+
activityInfo?: {
|
|
26
|
+
isShareActivity?: boolean;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface ActivityPostsAdditionalInfo {
|
|
30
|
+
isUserQuit?: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface UserAdditionalDetails {
|
|
33
|
+
studentId?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface NewPostListProps {
|
|
36
|
+
hasUserPosted: boolean;
|
|
37
|
+
activityPosts?: ActivityPost[];
|
|
38
|
+
activityData?: ActivityData;
|
|
39
|
+
activityPostsAdditionalInfo?: ActivityPostsAdditionalInfo;
|
|
40
|
+
handleAddPost: () => void;
|
|
41
|
+
handleAttachmentClick: (attachment: PostAttachment) => void;
|
|
42
|
+
handleViewPost: (post: ActivityPost) => void;
|
|
43
|
+
characterIcon: string;
|
|
44
|
+
icons: Record<string, string>;
|
|
45
|
+
cardColors: string[];
|
|
46
|
+
handleEditClick?: (post: ActivityPost) => void;
|
|
47
|
+
userAdditionalDetails?: UserAdditionalDetails;
|
|
48
|
+
addPostDescription?: string;
|
|
49
|
+
}
|
|
50
|
+
declare const NewPostList: ({ hasUserPosted, activityPosts, activityData, activityPostsAdditionalInfo, handleAddPost, handleAttachmentClick, characterIcon, icons, cardColors, handleViewPost, handleEditClick, userAdditionalDetails, addPostDescription, }: NewPostListProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export default NewPostList;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("@chakra-ui/react");
|
|
8
|
+
const react_masonry_css_1 = __importDefault(require("react-masonry-css"));
|
|
9
|
+
const NewAddPostCard_1 = __importDefault(require("./NewAddPostCard"));
|
|
10
|
+
const NewPostCard_1 = __importDefault(require("./NewPostCard"));
|
|
11
|
+
const NewPostList = ({ hasUserPosted, activityPosts = [], activityData, activityPostsAdditionalInfo, handleAddPost, handleAttachmentClick, characterIcon, icons, cardColors, handleViewPost, handleEditClick, userAdditionalDetails, addPostDescription, }) => {
|
|
12
|
+
const breakpointColumnsObj = {
|
|
13
|
+
default: 5,
|
|
14
|
+
1400: 4,
|
|
15
|
+
900: 3,
|
|
16
|
+
500: 1,
|
|
17
|
+
};
|
|
18
|
+
// Helper function to get the first image attachment from post
|
|
19
|
+
const getFirstImageAttachment = (attachments) => {
|
|
20
|
+
if (!attachments || !Array.isArray(attachments))
|
|
21
|
+
return "";
|
|
22
|
+
const imageAttachment = attachments.find((att) => att.mimeType?.includes("image") ||
|
|
23
|
+
att.fileName?.toLowerCase().match(/\.(jpg|jpeg|png|gif|bmp|webp)$/));
|
|
24
|
+
return imageAttachment?.url || "";
|
|
25
|
+
};
|
|
26
|
+
// Helper function to determine if a post can be edited
|
|
27
|
+
const canEditPost = (post) => {
|
|
28
|
+
// Check if current user owns the post
|
|
29
|
+
const currentUserId = userAdditionalDetails?.studentId;
|
|
30
|
+
const postAuthorId = post.userInfo[0]?._id;
|
|
31
|
+
if (!currentUserId || !postAuthorId || currentUserId !== postAuthorId) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
// Check if post has been updated (updatesCount >= 1), if so, don't allow editing
|
|
35
|
+
if (post.updatesCount && post.updatesCount >= 2) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
// Check if post was updated within the last 2 hours
|
|
39
|
+
if (!post.updatedAt) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const updatedAt = new Date(post.updatedAt);
|
|
43
|
+
const currentTime = new Date();
|
|
44
|
+
const timeDifferenceInHours = (currentTime.getTime() - updatedAt.getTime()) / (1000 * 60 * 60);
|
|
45
|
+
return timeDifferenceInHours < 2;
|
|
46
|
+
};
|
|
47
|
+
// Generate random color for NewAddPostCard
|
|
48
|
+
const randomColor = cardColors[Math.floor(Math.random() * cardColors.length)];
|
|
49
|
+
// Create array of all items to render (NewAddPostCard + posts)
|
|
50
|
+
const allItems = [];
|
|
51
|
+
// Add NewAddPostCard if user hasn't posted
|
|
52
|
+
if (!hasUserPosted) {
|
|
53
|
+
allItems.push({
|
|
54
|
+
type: "addPost",
|
|
55
|
+
id: "add-post",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
// Add all activity posts
|
|
59
|
+
activityPosts.forEach((post, index) => {
|
|
60
|
+
allItems.push({
|
|
61
|
+
type: "post",
|
|
62
|
+
post,
|
|
63
|
+
index,
|
|
64
|
+
id: post.postId,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, { w: "100%", children: (0, jsx_runtime_1.jsx)(react_masonry_css_1.default, { breakpointCols: breakpointColumnsObj, className: "my-masonry-grid", columnClassName: "my-masonry-grid_column", style: { display: "flex", width: "auto", gap: "16px" }, "data-testid": "post-list-masonry", children: allItems.map((item) => ((0, jsx_runtime_1.jsx)(react_1.Box, { mb: "16px", sx: { backgroundClip: "padding-box" }, "data-testid": "post-list-card-container", children: item.type === "addPost" ? ((0, jsx_runtime_1.jsx)(NewAddPostCard_1.default, { characterIcon: characterIcon, onGetStartedClick: handleAddPost, backgroundColor: randomColor, addPostDescription: addPostDescription })) : ((0, jsx_runtime_1.jsx)(NewPostCard_1.default, { author: {
|
|
68
|
+
name: item.post.userInfo[0]?.firstName +
|
|
69
|
+
" " +
|
|
70
|
+
item.post.userInfo[0]?.lastName,
|
|
71
|
+
profileImage: item.post.userInfo[0]?.profileImage || "",
|
|
72
|
+
}, mainImage: getFirstImageAttachment(item.post.attachments), content: item.post.postBody, attachments: item.post.attachments, emojiCount: item.post.emojiCount, commentCount: item.post.commentsCount, onEditClick: () => handleEditClick && handleEditClick(item.post), allowEdit: canEditPost(item.post), icons: icons, onAttachmentClick: handleAttachmentClick, onCardClick: () => {
|
|
73
|
+
handleViewPost(item.post);
|
|
74
|
+
}, cardColor: cardColors[item.index % cardColors.length], allowCommentsandInteractions: activityData?.allowCommentsAndInteractions, showBlur: !hasUserPosted &&
|
|
75
|
+
!activityPostsAdditionalInfo?.isUserQuit &&
|
|
76
|
+
!activityData?.activityInfo?.isShareActivity })) }, item.id))) }) }));
|
|
77
|
+
};
|
|
78
|
+
exports.default = NewPostList;
|
|
79
|
+
//# sourceMappingURL=NewPostList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewPostList.js","sourceRoot":"","sources":["../../../../src/components/Molecules/ExperientialComponents/NewPostList.tsx"],"names":[],"mappings":";;;;;;AACA,4CAAuC;AACvC,0EAAwC;AACxC,sEAA8C;AAC9C,gEAAwC;AA2DxC,MAAM,WAAW,GAAG,CAAC,EACnB,aAAa,EACb,aAAa,GAAG,EAAE,EAClB,YAAY,EACZ,2BAA2B,EAC3B,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,KAAK,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,kBAAkB,GACD,EAAE,EAAE;IACrB,MAAM,oBAAoB,GAAG;QAC3B,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,CAAC;KACP,CAAC;IAEF,8DAA8D;IAC9D,MAAM,uBAAuB,GAAG,CAAC,WAA8B,EAAU,EAAE;QACzE,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;YAAE,OAAO,EAAE,CAAC;QAE3D,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CACtC,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,QAAQ,E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,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,IAAI,EAAE;qBACxD,EACD,SAAS,EAAE,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EACzD,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAC3B,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAClC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAChC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EACrC,WAAW,EAAE,GAAG,EAAE,CAChB,eAAe,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAE/C,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EACjC,KAAK,EAAE,KAAK,EACZ,iBAAiB,EAAE,qBAAqB,EACxC,WAAW,EAAE,GAAG,EAAE;wBAChB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,EACD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,EACrD,4BAA4B,EAC1B,YAAY,EAAE,4BAA4B,EAE5C,QAAQ,EACN,CAAC,aAAa;wBACd,CAAC,2BAA2B,EAAE,UAAU;wBACxC,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,GAE9C,CACH,IA7CI,IAAI,CAAC,EAAE,CA8CR,CACP,CAAC,GACM,GACR,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare const newActivityBannerStyles: {
|
|
2
|
+
mainContainer: {
|
|
3
|
+
display: string;
|
|
4
|
+
flexDirection: string;
|
|
5
|
+
width: string;
|
|
6
|
+
height: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
border: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
padding: string;
|
|
11
|
+
gap: string;
|
|
12
|
+
};
|
|
13
|
+
contentSection: {
|
|
14
|
+
display: string;
|
|
15
|
+
flexDirection: string;
|
|
16
|
+
gap: string;
|
|
17
|
+
padding: string;
|
|
18
|
+
width: string;
|
|
19
|
+
};
|
|
20
|
+
headerSection: {
|
|
21
|
+
display: string;
|
|
22
|
+
flexDirection: string;
|
|
23
|
+
gap: string;
|
|
24
|
+
alignItems: string;
|
|
25
|
+
};
|
|
26
|
+
subjectTopicRow: {
|
|
27
|
+
display: string;
|
|
28
|
+
gap: string;
|
|
29
|
+
alignItems: string;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
};
|
|
32
|
+
subjectName: {
|
|
33
|
+
fontFamily: string;
|
|
34
|
+
fontWeight: string;
|
|
35
|
+
fontSize: string;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
letterSpacing: number;
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
topicName: {
|
|
41
|
+
fontFamily: string;
|
|
42
|
+
fontWeight: string;
|
|
43
|
+
fontSize: string;
|
|
44
|
+
lineHeight: string;
|
|
45
|
+
letterSpacing: number;
|
|
46
|
+
color: string;
|
|
47
|
+
};
|
|
48
|
+
activityTitle: {
|
|
49
|
+
fontFamily: string;
|
|
50
|
+
fontWeight: string;
|
|
51
|
+
fontSize: string;
|
|
52
|
+
lineHeight: string;
|
|
53
|
+
letterSpacing: number;
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
description: {
|
|
57
|
+
fontFamily: string;
|
|
58
|
+
fontWeight: string;
|
|
59
|
+
fontSize: string;
|
|
60
|
+
lineHeight: string;
|
|
61
|
+
letterSpacing: number;
|
|
62
|
+
color: string;
|
|
63
|
+
width: string;
|
|
64
|
+
minWidth: string;
|
|
65
|
+
};
|
|
66
|
+
readMoreLink: {
|
|
67
|
+
fontFamily: string;
|
|
68
|
+
fontWeight: string;
|
|
69
|
+
fontSize: string;
|
|
70
|
+
lineHeight: string;
|
|
71
|
+
letterSpacing: number;
|
|
72
|
+
color: string;
|
|
73
|
+
cursor: string;
|
|
74
|
+
textDecoration: string;
|
|
75
|
+
};
|
|
76
|
+
attachmentHeading: {
|
|
77
|
+
color: string;
|
|
78
|
+
fontFamily: string;
|
|
79
|
+
fontSize: string;
|
|
80
|
+
fontWeight: string;
|
|
81
|
+
lineHeight: string;
|
|
82
|
+
};
|
|
83
|
+
attachmentContainer: {
|
|
84
|
+
display: string;
|
|
85
|
+
gap: string;
|
|
86
|
+
alignItems: string;
|
|
87
|
+
};
|
|
88
|
+
attachmentFrame: {
|
|
89
|
+
backgroundColor: string;
|
|
90
|
+
borderRadius: string;
|
|
91
|
+
padding: string;
|
|
92
|
+
display: string;
|
|
93
|
+
alignItems: string;
|
|
94
|
+
justifyContent: string;
|
|
95
|
+
cursor: string;
|
|
96
|
+
};
|
|
97
|
+
attachmentImageFrame: {
|
|
98
|
+
width: string;
|
|
99
|
+
height: string;
|
|
100
|
+
borderRadius: string;
|
|
101
|
+
overflow: string;
|
|
102
|
+
position: string;
|
|
103
|
+
};
|
|
104
|
+
attachmentIconFrame: {
|
|
105
|
+
width: string;
|
|
106
|
+
height: string;
|
|
107
|
+
display: string;
|
|
108
|
+
alignItems: string;
|
|
109
|
+
justifyContent: string;
|
|
110
|
+
};
|
|
111
|
+
attachmentIcon: {
|
|
112
|
+
width: string;
|
|
113
|
+
height: string;
|
|
114
|
+
};
|
|
115
|
+
attachmentImage: {
|
|
116
|
+
width: string;
|
|
117
|
+
height: string;
|
|
118
|
+
objectFit: string;
|
|
119
|
+
};
|
|
120
|
+
};
|