frst-components 0.23.20 → 0.23.22
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/index.js +182 -127
- package/dist/public/customIcons/VoteCurrentIcon.d.ts +8 -0
- package/dist/public/customIcons/VoteCurrentIcon.d.ts.map +1 -0
- package/dist/public/customIcons/index.d.ts +1 -0
- package/dist/public/customIcons/index.d.ts.map +1 -1
- package/dist/src/components/FI/ThreadComments/utilitiesComponents/commentaryBoxReply/index.d.ts.map +1 -1
- package/dist/src/components/FI/ThreadComments/utilitiesComponents/inputReply/index.d.ts.map +1 -1
- package/dist/src/components/FI/ThreadComments/utilitiesComponents/inputReply/inputReply.styles.d.ts.map +1 -1
- package/dist/src/components/IJ/learningCycleCard/components/menu/index.d.ts.map +1 -1
- package/dist/src/components/IJ/learningCycleCard/components/menu/menuStyle.d.ts.map +1 -1
- package/dist/src/components/hypothesisComponent/hypothesisComponent.style.d.ts +3 -0
- package/dist/src/components/hypothesisComponent/hypothesisComponent.style.d.ts.map +1 -1
- package/dist/src/components/hypothesisComponent/index.d.ts +3 -1
- package/dist/src/components/hypothesisComponent/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/customIcons/VoteCurrentIcon.tsx +22 -0
- package/public/customIcons/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -3017,6 +3017,10 @@ const ExcludeVoteIcon = ({ style, width = '16', height = '17', stroke = '#444444
|
|
|
3017
3017
|
return (jsxRuntime.jsxs("svg", { style: style, width: width, height: height, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("path", { d: "M8.00065 14.9381C11.6825 14.9381 14.6673 11.9533 14.6673 8.2714C14.6673 4.5895 11.6825 1.60474 8.00065 1.60474C4.31875 1.60474 1.33398 4.5895 1.33398 8.2714C1.33398 11.9533 4.31875 14.9381 8.00065 14.9381Z", stroke: stroke, "stroke-width": "1.2", "stroke-linecap": "round", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M10.6673 5.60474L5.33398 10.9381", stroke: stroke, "stroke-width": "1.2", "stroke-linecap": "round", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M5.33398 5.60474L10.6673 10.9381", stroke: stroke, "stroke-width": "1.2", "stroke-linecap": "round", "stroke-linejoin": "round" })] }));
|
|
3018
3018
|
};
|
|
3019
3019
|
|
|
3020
|
+
const VoteCurrentIcon = ({ style, width = '16', height = '17', stroke = '#444444' }) => {
|
|
3021
|
+
return (jsxRuntime.jsxs("svg", { width: "20", height: "21", viewBox: "0 0 20 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("path", { d: "M3.33398 5.05884V8.906H6.97035", stroke: "#444444", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M16.6676 15.318V11.4708H13.0312", stroke: "#444444", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M15.1461 8.26484C14.8387 7.34587 14.3163 6.52425 13.6276 5.87666C12.939 5.22906 12.1064 4.77659 11.2077 4.56147C10.3091 4.34634 9.37353 4.37557 8.48841 4.64643C7.6033 4.9173 6.79747 5.42096 6.14611 6.11043L3.33398 8.90603M16.6673 11.4708L13.8552 14.2664C13.2038 14.9559 12.398 15.4595 11.5129 15.7304C10.6278 16.0013 9.69223 16.0305 8.79355 15.8154C7.89487 15.6003 7.06235 15.1478 6.37366 14.5002C5.68497 13.8526 5.16257 13.031 4.8552 12.112", stroke: "#444444", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })] }));
|
|
3022
|
+
};
|
|
3023
|
+
|
|
3020
3024
|
const fadeInRight = styled.keyframes `
|
|
3021
3025
|
0% {
|
|
3022
3026
|
opacity: 0;
|
|
@@ -3108,173 +3112,213 @@ const Toast = ({ type = 'success', message, onClose, showBySeconds = 5, styles }
|
|
|
3108
3112
|
};
|
|
3109
3113
|
|
|
3110
3114
|
const MainContainer = styled__default["default"].div `
|
|
3111
|
-
display: flex;
|
|
3112
|
-
align-items: center;
|
|
3113
|
-
justify-content: space-between;
|
|
3114
|
-
width:100%;
|
|
3115
|
-
color: #222222;
|
|
3115
|
+
display: flex;
|
|
3116
|
+
align-items: center;
|
|
3117
|
+
justify-content: space-between;
|
|
3118
|
+
width: 100%;
|
|
3119
|
+
color: #222222;
|
|
3116
3120
|
`;
|
|
3117
3121
|
const Container$m = styled__default["default"].div `
|
|
3118
|
-
width: 100%;
|
|
3119
|
-
display: flex;
|
|
3120
|
-
align-items: center;
|
|
3121
|
-
justify-content: space-between;
|
|
3122
|
-
font-family: PT Sans;
|
|
3123
|
-
font-size:14px;
|
|
3124
|
-
border-radius:8px;
|
|
3125
|
-
padding: 0 0 0 16px;
|
|
3126
|
-
min-height: 52px;
|
|
3122
|
+
width: 100%;
|
|
3123
|
+
display: flex;
|
|
3124
|
+
align-items: center;
|
|
3125
|
+
justify-content: space-between;
|
|
3126
|
+
font-family: PT Sans;
|
|
3127
|
+
font-size: 14px;
|
|
3128
|
+
border-radius: 8px;
|
|
3129
|
+
padding: 0 0 0 16px;
|
|
3130
|
+
min-height: 52px;
|
|
3127
3131
|
|
|
3128
|
-
${({ type }) => {
|
|
3132
|
+
${({ type }) => {
|
|
3129
3133
|
switch (type) {
|
|
3130
3134
|
case 'prioritize':
|
|
3131
|
-
return styled.css `
|
|
3135
|
+
return styled.css `
|
|
3136
|
+
background: #fdae15;
|
|
3137
|
+
`;
|
|
3132
3138
|
case 'raised':
|
|
3133
|
-
return styled.css `
|
|
3139
|
+
return styled.css `
|
|
3140
|
+
background: #f8d784;
|
|
3141
|
+
`;
|
|
3134
3142
|
case 'suggested':
|
|
3135
|
-
return styled.css `
|
|
3143
|
+
return styled.css `
|
|
3144
|
+
background: #cddaef;
|
|
3145
|
+
`;
|
|
3136
3146
|
default:
|
|
3137
3147
|
return '';
|
|
3138
3148
|
}
|
|
3139
3149
|
}}
|
|
3140
3150
|
`;
|
|
3141
3151
|
const Title$6 = styled__default["default"].span `
|
|
3142
|
-
font-weight:700;
|
|
3143
|
-
white-space: nowrap;
|
|
3152
|
+
font-weight: 700;
|
|
3153
|
+
white-space: nowrap;
|
|
3144
3154
|
`;
|
|
3145
3155
|
styled__default["default"].span `
|
|
3146
|
-
font-weight:700;
|
|
3156
|
+
font-weight: 700;
|
|
3147
3157
|
`;
|
|
3148
3158
|
const Separator = styled__default["default"].div `
|
|
3149
|
-
font-weight:bold;
|
|
3150
|
-
margin: 0 8px;
|
|
3159
|
+
font-weight: bold;
|
|
3160
|
+
margin: 0 8px;
|
|
3151
3161
|
`;
|
|
3152
3162
|
const Description$4 = styled__default["default"].span `
|
|
3153
|
-
font-weight:400;
|
|
3154
|
-
padding: 8px 0 8px;
|
|
3155
|
-
|
|
3163
|
+
font-weight: 400;
|
|
3164
|
+
padding: 8px 0 8px;
|
|
3156
3165
|
`;
|
|
3157
3166
|
const SplitContainer = styled__default["default"].div `
|
|
3158
|
-
display:flex;
|
|
3159
|
-
justify-content: flex-start;
|
|
3160
|
-
align-items:center;
|
|
3161
|
-
height: 100%;
|
|
3167
|
+
display: flex;
|
|
3168
|
+
justify-content: flex-start;
|
|
3169
|
+
align-items: center;
|
|
3170
|
+
height: 100%;
|
|
3162
3171
|
`;
|
|
3163
3172
|
styled__default["default"].div `
|
|
3164
|
-
display: flex;
|
|
3165
|
-
align-items: center;
|
|
3166
|
-
justify-content: flex-start;
|
|
3167
|
-
position: relative;
|
|
3173
|
+
display: flex;
|
|
3174
|
+
align-items: center;
|
|
3175
|
+
justify-content: flex-start;
|
|
3176
|
+
position: relative;
|
|
3168
3177
|
`;
|
|
3169
3178
|
styled__default["default"].div `
|
|
3170
|
-
|
|
3179
|
+
position: absolute;
|
|
3171
3180
|
`;
|
|
3172
3181
|
const VoteButtonContainer = styled__default["default"].span `
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3182
|
+
display: flex;
|
|
3183
|
+
align-items: center;
|
|
3184
|
+
justify-content: center;
|
|
3185
|
+
width: 150px;
|
|
3186
|
+
background: #f9cd5e;
|
|
3187
|
+
cursor: pointer;
|
|
3188
|
+
${({ height }) => height > 0 &&
|
|
3189
|
+
styled.css `
|
|
3190
|
+
height: ${height}px;
|
|
3181
3191
|
`}
|
|
3182
3192
|
|
|
3183
|
-
|
|
3193
|
+
${({ type }) => {
|
|
3184
3194
|
switch (type) {
|
|
3185
3195
|
case 'prioritize':
|
|
3186
|
-
return styled.css `
|
|
3196
|
+
return styled.css `
|
|
3197
|
+
background: #dc9100;
|
|
3198
|
+
`;
|
|
3187
3199
|
case 'raised':
|
|
3188
|
-
return styled.css `
|
|
3200
|
+
return styled.css `
|
|
3201
|
+
background: #f9cd5e;
|
|
3202
|
+
`;
|
|
3189
3203
|
case 'suggested':
|
|
3190
|
-
return styled.css `
|
|
3204
|
+
return styled.css `
|
|
3205
|
+
background: #a5c3f2;
|
|
3206
|
+
`;
|
|
3191
3207
|
default:
|
|
3192
3208
|
return '';
|
|
3193
3209
|
}
|
|
3194
3210
|
}}
|
|
3195
|
-
${({ modeDelete }) => modeDelete &&
|
|
3196
|
-
|
|
3211
|
+
${({ modeDelete }) => modeDelete &&
|
|
3212
|
+
styled.css `
|
|
3213
|
+
background: inherit;
|
|
3197
3214
|
`}
|
|
3198
3215
|
border-radius:0 8px 8px 0;
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3216
|
+
padding: 0 16px 0 16px;
|
|
3217
|
+
min-height: 52px;
|
|
3218
|
+
margin-left: 4px;
|
|
3203
3219
|
`;
|
|
3204
3220
|
const VoteCount = styled__default["default"].span `
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3221
|
+
display: flex;
|
|
3222
|
+
align-items: center;
|
|
3223
|
+
height: 100%;
|
|
3224
|
+
gap: 4px;
|
|
3225
|
+
white-space: nowrap;
|
|
3226
|
+
width: auto;
|
|
3211
3227
|
`;
|
|
3212
3228
|
const VoteButton = styled__default["default"].p `
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3229
|
+
display: flex;
|
|
3230
|
+
align-items: center;
|
|
3231
|
+
cursor: pointer;
|
|
3232
|
+
height: 100%;
|
|
3233
|
+
width: 100%;
|
|
3234
|
+
font-family: PT Sans;
|
|
3235
|
+
font-size: 14px;
|
|
3236
|
+
font-weight: 700;
|
|
3237
|
+
line-height: 18.12px;
|
|
3238
|
+
text-align: left;
|
|
3239
|
+
color: #444444;
|
|
3240
|
+
white-space: nowrap;
|
|
3241
|
+
width: auto;
|
|
3226
3242
|
`;
|
|
3227
3243
|
const VoteContent = styled__default["default"].div `
|
|
3244
|
+
display: flex;
|
|
3245
|
+
div {
|
|
3246
|
+
flex-direction: row-reverse;
|
|
3228
3247
|
display: flex;
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
display: flex;
|
|
3232
|
-
:nth-child(1n){
|
|
3233
|
-
margin-left: -8px;
|
|
3234
|
-
}
|
|
3248
|
+
:nth-child(1n) {
|
|
3249
|
+
margin-left: -8px;
|
|
3235
3250
|
}
|
|
3251
|
+
}
|
|
3236
3252
|
`;
|
|
3237
3253
|
const ImageContent$1 = styled__default["default"].div `
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3254
|
+
display: flex;
|
|
3255
|
+
align-items: center;
|
|
3256
|
+
justify-content: center;
|
|
3257
|
+
width: 32px;
|
|
3258
|
+
height: 32px;
|
|
3259
|
+
border-radius: 50%;
|
|
3260
|
+
overflow: hidden;
|
|
3261
|
+
border: solid 2.5px #fff;
|
|
3262
|
+
color: #ffffff;
|
|
3263
|
+
img {
|
|
3264
|
+
width: 100%;
|
|
3265
|
+
height: 100%;
|
|
3266
|
+
object-fit: cover;
|
|
3267
|
+
}
|
|
3252
3268
|
`;
|
|
3253
3269
|
const VoteListContainer = styled__default["default"].div `
|
|
3254
|
-
position: absolute;
|
|
3255
|
-
top: calc(100% + 1px);
|
|
3256
|
-
right: 0;
|
|
3257
|
-
width: 225px;
|
|
3258
|
-
max-height: 300px;
|
|
3259
|
-
overflow-y: auto;
|
|
3260
|
-
padding: 5px 0px;
|
|
3261
|
-
background-color: #fff;
|
|
3262
|
-
border: 1px solid #ccc;
|
|
3263
|
-
border-radius: 8px;
|
|
3264
|
-
z-index: 1999;
|
|
3265
|
-
display: ${({ showVotes }) => showVotes ? 'block' : 'none'};
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
box-shadow: 0px 15px 20px 0px #22222226;
|
|
3270
|
+
position: absolute;
|
|
3271
|
+
top: calc(100% + 1px);
|
|
3272
|
+
right: 0;
|
|
3273
|
+
width: 225px;
|
|
3274
|
+
max-height: 300px;
|
|
3275
|
+
overflow-y: auto;
|
|
3276
|
+
padding: 5px 0px;
|
|
3277
|
+
background-color: #fff;
|
|
3278
|
+
border: 1px solid #ccc;
|
|
3279
|
+
border-radius: 8px;
|
|
3280
|
+
z-index: 1999;
|
|
3281
|
+
display: ${({ showVotes }) => (showVotes ? 'block' : 'none')};
|
|
3282
|
+
&::-webkit-scrollbar {
|
|
3283
|
+
display: none;
|
|
3284
|
+
}
|
|
3285
|
+
box-shadow: 0px 15px 20px 0px #22222226;
|
|
3270
3286
|
`;
|
|
3271
3287
|
const VoteListItem = styled__default["default"].div `
|
|
3272
|
-
cursor: pointer;
|
|
3273
|
-
height: 36px;
|
|
3274
|
-
display: flex;
|
|
3275
|
-
align-items: center;
|
|
3276
|
-
gap: 10px;
|
|
3277
|
-
${({ lastVote }) => lastVote === false &&
|
|
3288
|
+
cursor: pointer;
|
|
3289
|
+
height: 36px;
|
|
3290
|
+
display: flex;
|
|
3291
|
+
align-items: center;
|
|
3292
|
+
gap: 10px;
|
|
3293
|
+
${({ lastVote }) => lastVote === false && 'border-bottom: solid 1px #ccc;'}
|
|
3294
|
+
`;
|
|
3295
|
+
styled__default["default"].div `
|
|
3296
|
+
width: 100%;
|
|
3297
|
+
h2{
|
|
3298
|
+
margin-bottom: 0.4rem;
|
|
3299
|
+
|
|
3300
|
+
}
|
|
3301
|
+
p{
|
|
3302
|
+
font-weight: 400;
|
|
3303
|
+
margin-bottom: 1rem;
|
|
3304
|
+
|
|
3305
|
+
}
|
|
3306
|
+
`;
|
|
3307
|
+
styled__default["default"].div `
|
|
3308
|
+
width: 100%;
|
|
3309
|
+
border: solid 0.2px #E0E0E0;
|
|
3310
|
+
margin-bottom: 1rem;
|
|
3311
|
+
|
|
3312
|
+
`;
|
|
3313
|
+
styled__default["default"].div `
|
|
3314
|
+
width: 100%;
|
|
3315
|
+
display: flex;
|
|
3316
|
+
flex-direction: row;
|
|
3317
|
+
justify-content: end;
|
|
3318
|
+
button{
|
|
3319
|
+
margin-left: 1rem;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3278
3322
|
`;
|
|
3279
3323
|
|
|
3280
3324
|
const container = styled__default["default"].div `
|
|
@@ -3350,7 +3394,7 @@ function Loading(props) {
|
|
|
3350
3394
|
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs(container, { textPosition: PositionTextLoad, style: { ...props.style }, children: [jsxRuntime.jsx(loader, { children: jsxRuntime.jsx(Load, { width: Size, height: Size, fill: Color !== '' && Color }) }), jsxRuntime.jsx(loadText, { style: { color: props.loadTextColor ? props.loadTextColor : 'white' }, children: LoadText })] }) }));
|
|
3351
3395
|
}
|
|
3352
3396
|
|
|
3353
|
-
const HypothesisComponent = ({ description, type, id, title, votes = [], onVote, canVote = false, canViewVote = false, userLoggedId, deleteVote, canViewListVotes, votesSingularText, votesPluralText, voteText, deleteVoteText, handleViewProfile, avatar, showAvatar, authorId, hasVoteGoal, loading }) => {
|
|
3397
|
+
const HypothesisComponent = ({ description, type, id, title, votes = [], onVote, canVote = false, canViewVote = false, userLoggedId, deleteVote, canViewListVotes, votesSingularText, votesPluralText, voteText, deleteVoteText, handleViewProfile, avatar, showAvatar, authorId, hasVoteGoal, loading, onChangeVote, changeVoteText }) => {
|
|
3354
3398
|
const [isHover, seIsHover] = React.useState(false);
|
|
3355
3399
|
const [hasVoteHypothesis, setHasVoteHypothesis] = React.useState(false);
|
|
3356
3400
|
const [showVotesList, setShowVotesList] = React.useState(false);
|
|
@@ -3393,37 +3437,48 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
|
|
|
3393
3437
|
const handleDeleteVote = async (voteId) => {
|
|
3394
3438
|
await deleteVote(voteId);
|
|
3395
3439
|
};
|
|
3440
|
+
const handleChangeVote = async (hyphoteseId) => {
|
|
3441
|
+
await onChangeVote(hyphoteseId);
|
|
3442
|
+
};
|
|
3396
3443
|
return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Container$m, { type: type, id: id, ref: ContainerRef, children: [jsxRuntime.jsxs(SplitContainer, { children: [showAvatar && (jsxRuntime.jsx(Avatar, { src: avatar, size: "24px", style: { marginRight: '8px', cursor: authorId ? 'pointer' : 'default' }, onClick: () => handleViewProfile(authorId) })), jsxRuntime.jsx(Title$6, { children: title }), jsxRuntime.jsx(Separator, { children: "|" }), jsxRuntime.jsx(Description$4, { children: description })] }), loading && (jsxRuntime.jsx(SplitContainer, { children: jsxRuntime.jsx(VoteButtonContainer, { type: type, modeDelete: isHover, height: heightContainer, style: { cursor: 'default' }, children: jsxRuntime.jsx(Loading, {}) }) })), !loading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!canVote && canViewVote && votes?.length > 0 && (jsxRuntime.jsxs("div", { style: { position: 'relative', height: '100%' }, children: [jsxRuntime.jsx(SplitContainer, { children: jsxRuntime.jsx(VoteButtonContainer, { ref: viewVotesRef, height: heightContainer, style: { cursor: canViewListVotes ? 'pointer' : 'default' }, type: type, onClick: canViewListVotes ? toggleVotes : null, children: jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [votes?.slice(0, 2)?.map((vote, index) => {
|
|
3397
3444
|
return (jsxRuntime.jsx(ImageContent$1, { style: { zIndex: 14 - index }, children: jsxRuntime.jsx("img", { src: vote?.user?.avatar || 'https://cdn-images.frstfalconi.cloud/path582.svg' }) }, vote?.id));
|
|
3398
3445
|
}), votes?.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { style: {
|
|
3399
3446
|
fontSize: votes?.length > 9 ? 10 : votes?.length > 99 ? 8 : 14
|
|
3400
|
-
}, children: ["+", votes?.length - 2] }) }))] }), votes?.length, " ", votes?.length > 1 ? votesPluralText : votesSingularText] }) }) }), jsxRuntime.jsx(VoteList, { hypothesisVotes: votes, showVotes: showVotesList, viewProfile: handleViewProfile })] })), canVote && hasVoteGoal && votes?.length > 0
|
|
3447
|
+
}, children: ["+", votes?.length - 2] }) }))] }), votes?.length, " ", votes?.length > 1 ? votesPluralText : votesSingularText] }) }) }), jsxRuntime.jsx(VoteList, { hypothesisVotes: votes, showVotes: showVotesList, viewProfile: handleViewProfile })] })), canVote && hasVoteGoal && votes?.length > 0 ? (jsxRuntime.jsx(SplitContainer, { onClick: () => hasVoteHypothesis && isHover
|
|
3401
3448
|
? handleDeleteVote(votes?.find((vote) => vote?.user_uuid === userLoggedId)?.id)
|
|
3402
|
-
:
|
|
3449
|
+
: handleChangeVote(id), children: jsxRuntime.jsx(VoteButtonContainer, { type: type, modeDelete: isHover, height: heightContainer, onMouseEnter: () => seIsHover(true), onMouseLeave: () => seIsHover(false), style: { cursor: 'pointer' }, children: isHover ? (jsxRuntime.jsx("div", { style: {
|
|
3403
3450
|
display: 'flex',
|
|
3404
3451
|
alignItems: 'center',
|
|
3405
3452
|
gap: '4px',
|
|
3406
3453
|
justifyContent: 'center'
|
|
3407
|
-
}, children: [jsxRuntime.jsx(ExcludeVoteIcon, { width: "24", height: "24" }), jsxRuntime.jsx(VoteButton, { children: deleteVoteText })] })) : (jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [votes?.slice(0, 2)?.map((vote, index) => {
|
|
3454
|
+
}, children: !hasVoteHypothesis ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(VoteCurrentIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: changeVoteText })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ExcludeVoteIcon, { width: "24", height: "24" }), jsxRuntime.jsx(VoteButton, { children: deleteVoteText })] })) })) : (jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [votes?.slice(0, 2)?.map((vote, index) => {
|
|
3408
3455
|
return (jsxRuntime.jsx(ImageContent$1, { style: { zIndex: 14 - index }, children: jsxRuntime.jsx("img", { src: vote?.user?.avatar || 'https://cdn-images.frstfalconi.cloud/path582.svg' }) }, vote?.id));
|
|
3409
|
-
}), votes.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { children: ["+", votes?.length - 2] }) }))] }), jsxRuntime.jsxs("p", { children: [votes?.length, " ", votes?.length > 1 ? votesPluralText : votesSingularText] })] }))
|
|
3456
|
+
}), votes.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { children: ["+", votes?.length - 2] }) }))] }), jsxRuntime.jsxs("p", { children: [votes?.length, " ", votes?.length > 1 ? votesPluralText : votesSingularText] })] })) }) })) : (canVote &&
|
|
3457
|
+
!hasVoteHypothesis && hasVoteGoal && (jsxRuntime.jsx(SplitContainer, { onClick: () => handleChangeVote(id), children: jsxRuntime.jsx(VoteButtonContainer, { type: type, modeDelete: isHover, height: heightContainer, onMouseEnter: () => seIsHover(true), onMouseLeave: () => seIsHover(false), children: jsxRuntime.jsxs("div", { style: {
|
|
3410
3458
|
display: 'flex',
|
|
3411
3459
|
alignItems: 'center',
|
|
3412
3460
|
justifyContent: 'center',
|
|
3413
3461
|
paddingLeft: '4px',
|
|
3414
3462
|
height: '100%'
|
|
3415
|
-
}, children: [jsxRuntime.jsx(
|
|
3463
|
+
}, children: [jsxRuntime.jsx(VoteCurrentIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: changeVoteText })] }) }) }))), canVote && !hasVoteGoal ? (jsxRuntime.jsx(SplitContainer, { onClick: () => handleVote(id), children: jsxRuntime.jsx(VoteButtonContainer, { type: type, modeDelete: isHover, height: heightContainer, onMouseEnter: () => seIsHover(true), onMouseLeave: () => seIsHover(false), children: jsxRuntime.jsxs("div", { style: {
|
|
3464
|
+
display: 'flex',
|
|
3465
|
+
alignItems: 'center',
|
|
3466
|
+
justifyContent: 'center',
|
|
3467
|
+
paddingLeft: '4px',
|
|
3468
|
+
height: '100%'
|
|
3469
|
+
}, children: [jsxRuntime.jsx(VoteIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: voteText })] }) }) })) : (canVote &&
|
|
3470
|
+
!hasVoteHypothesis &&
|
|
3471
|
+
!canViewVote && (jsxRuntime.jsx(SplitContainer, { onClick: () => handleChangeVote(id), children: jsxRuntime.jsx(VoteButtonContainer, { type: type, modeDelete: isHover, height: heightContainer, onMouseEnter: () => seIsHover(true), onMouseLeave: () => seIsHover(false), children: jsxRuntime.jsxs("div", { style: {
|
|
3472
|
+
display: 'flex',
|
|
3473
|
+
alignItems: 'center',
|
|
3474
|
+
justifyContent: 'center',
|
|
3475
|
+
paddingLeft: '4px',
|
|
3476
|
+
height: '100%'
|
|
3477
|
+
}, children: [jsxRuntime.jsx(VoteCurrentIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: changeVoteText })] }) }) })))] }))] }) }));
|
|
3416
3478
|
};
|
|
3417
3479
|
const VoteList = ({ hypothesisVotes, showVotes, viewProfile }) => {
|
|
3418
3480
|
const sortedVotes = [...hypothesisVotes].sort((a, b) => a.user.name.localeCompare(b.user.name));
|
|
3419
3481
|
return (jsxRuntime.jsx(VoteListContainer, { showVotes: showVotes, children: sortedVotes?.map((vote, index) => (jsxRuntime.jsxs(VoteListItem, { className: "VoteListItem", lastVote: hypothesisVotes?.length === index + 1, onClick: () => viewProfile(vote?.user?.uuid), children: [jsxRuntime.jsx(Avatar, { src: vote?.user?.avatar, size: '24px', alt: vote?.user?.name, style: { marginLeft: '6px', cursor: 'pointer' } }), jsxRuntime.jsx("p", { children: vote?.user?.name })] }, vote?.id))) }));
|
|
3420
|
-
};
|
|
3421
|
-
const ViewVotes = ({ hypothesisVotes, votesPluralText, votesSingularText }) => {
|
|
3422
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: hypothesisVotes?.length > 0 && (jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [hypothesisVotes?.slice(0, 2)?.map((vote, index) => {
|
|
3423
|
-
return (jsxRuntime.jsx(ImageContent$1, { style: { zIndex: 14 - index }, children: jsxRuntime.jsx("img", { src: vote?.user?.avatar || 'https://cdn-images.frstfalconi.cloud/path582.svg' }) }, vote?.id));
|
|
3424
|
-
}), hypothesisVotes?.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { style: {
|
|
3425
|
-
fontSize: hypothesisVotes?.length > 9 ? 10 : hypothesisVotes?.length > 99 ? 8 : 14
|
|
3426
|
-
}, children: ["+", hypothesisVotes?.length - 2] }) }))] }), hypothesisVotes?.length, " ", hypothesisVotes?.length > 1 ? votesPluralText : votesSingularText] })) }));
|
|
3427
3482
|
};
|
|
3428
3483
|
|
|
3429
3484
|
const ButtonGroupWrapper = styled__default["default"].div `
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare const VoteCurrentIcon: ({ style, width, height, stroke }: {
|
|
3
|
+
style?: CSSProperties | undefined;
|
|
4
|
+
width?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
stroke?: string;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=VoteCurrentIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoteCurrentIcon.d.ts","sourceRoot":"","sources":["../../../public/customIcons/VoteCurrentIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,eAAO,MAAM,eAAe;YAMlB,aAAa,GAAG,SAAS;YACzB,MAAM;aACL,MAAM;aACN,MAAM;iBAShB,CAAA"}
|
|
@@ -4,4 +4,5 @@ export { CircledCheck } from './CircledCheck';
|
|
|
4
4
|
export { CircledAlert } from './CircledAlert';
|
|
5
5
|
export { VoteIcon } from './VoteIcon';
|
|
6
6
|
export { ExcludeVoteIcon } from './ExcludeVoteIcon';
|
|
7
|
+
export { VoteCurrentIcon } from './VoteCurrentIcon';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../public/customIcons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../public/customIcons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/src/components/FI/ThreadComments/utilitiesComponents/commentaryBoxReply/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/FI/ThreadComments/utilitiesComponents/commentaryBoxReply/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAKtE,eAAO,MAAM,kBAAkB,scAgC5B,yBAAyB,gBAsH3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/FI/ThreadComments/utilitiesComponents/inputReply/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,UAAU,oMAapB,WAAW,gBAkGb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputReply.styles.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"inputReply.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/FI/ThreadComments/utilitiesComponents/inputReply/inputReply.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,oEAI1B,CAAA;AAED,eAAO,MAAM,SAAS,oEAGrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/IJ/learningCycleCard/components/menu/index.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE;;;CAAA,eAiFnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuStyle.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"menuStyle.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/IJ/learningCycleCard/components/menu/menuStyle.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oEAuBxB,CAAA"}
|
|
@@ -24,4 +24,7 @@ export declare const VoteListContainer: import("styled-components").StyledCompon
|
|
|
24
24
|
export declare const VoteListItem: import("styled-components").StyledComponent<"div", any, {
|
|
25
25
|
lastVote?: boolean;
|
|
26
26
|
}, never>;
|
|
27
|
+
export declare const ContainerModal: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
28
|
+
export declare const LineModal: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
29
|
+
export declare const ButtonModal: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
27
30
|
//# sourceMappingURL=hypothesisComponent.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hypothesisComponent.style.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/hypothesisComponent.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,oEAMzB,CAAA;AACD,eAAO,MAAM,SAAS;UAAsB,MAAM;
|
|
1
|
+
{"version":3,"file":"hypothesisComponent.style.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/hypothesisComponent.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,oEAMzB,CAAA;AACD,eAAO,MAAM,SAAS;UAAsB,MAAM;SA6BjD,CAAA;AAED,eAAO,MAAM,KAAK,qEAGjB,CAAA;AAED,eAAO,MAAM,KAAK,qEAEjB,CAAA;AAED,eAAO,MAAM,SAAS,oEAGrB,CAAA;AAED,eAAO,MAAM,WAAW,qEAGvB,CAAA;AACD,eAAO,MAAM,cAAc,oEAK1B,CAAA;AACD,eAAO,MAAM,oBAAoB,oEAKhC,CAAA;AAED,eAAO,MAAM,UAAU,oEAEtB,CAAA;AAED,eAAO,MAAM,mBAAmB;WAAwB,MAAM;iBAAe,OAAO;aAAW,MAAM;SAwCpG,CAAA;AACD,eAAO,MAAM,SAAS,qEAOrB,CAAA;AACD,eAAO,MAAM,UAAU,kEActB,CAAA;AACD,eAAO,MAAM,WAAW,oEASvB,CAAA;AACD,eAAO,MAAM,YAAY,oEAexB,CAAA;AAED,eAAO,MAAM,iBAAiB;gBAA4B,OAAO;SAiBhE,CAAA;AAED,eAAO,MAAM,YAAY;eAA2B,OAAO;SAO1D,CAAA;AAED,eAAO,MAAM,cAAc,oEAW1B,CAAA;AAED,eAAO,MAAM,SAAS,oEAKrB,CAAA;AACD,eAAO,MAAM,WAAW,oEASvB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Vote } from './types';
|
|
3
|
-
export declare const HypothesisComponent: ({ description, type, id, title, votes, onVote, canVote, canViewVote, userLoggedId, deleteVote, canViewListVotes, votesSingularText, votesPluralText, voteText, deleteVoteText, handleViewProfile, avatar, showAvatar, authorId, hasVoteGoal, loading }: {
|
|
3
|
+
export declare const HypothesisComponent: ({ description, type, id, title, votes, onVote, canVote, canViewVote, userLoggedId, deleteVote, canViewListVotes, votesSingularText, votesPluralText, voteText, deleteVoteText, handleViewProfile, avatar, showAvatar, authorId, hasVoteGoal, loading, onChangeVote, changeVoteText }: {
|
|
4
4
|
description: string;
|
|
5
5
|
type: string;
|
|
6
6
|
id: string;
|
|
@@ -22,5 +22,7 @@ export declare const HypothesisComponent: ({ description, type, id, title, votes
|
|
|
22
22
|
showAvatar?: boolean;
|
|
23
23
|
authorId?: string;
|
|
24
24
|
loading?: boolean;
|
|
25
|
+
onChangeVote?: (hypothesiId: string) => any;
|
|
26
|
+
changeVoteText?: string;
|
|
25
27
|
}) => JSX.Element;
|
|
26
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAK9B,eAAO,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAK9B,eAAO,MAAM,mBAAmB;iBAyBjB,MAAM;UACb,MAAM;QACR,MAAM;WACH,MAAM;WACN,IAAI,EAAE;kBACC,MAAM;2BACG,MAAM,KAAK,GAAG;0BACf,MAAM,KAAK,GAAG;iCACP,MAAM,KAAK,GAAG;cACjC,OAAO;uBACE,OAAO;kBACZ,OAAO;kBACP,OAAO;wBACD,MAAM;sBACR,MAAM;eACb,MAAM;qBACA,MAAM;aACd,MAAM;iBACF,OAAO;eACT,MAAM;cACP,OAAO;iCACY,MAAM,KAAK,GAAG;qBAC1B,MAAM;iBAgRxB,CAAA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { CSSProperties } from 'react'
|
|
3
|
+
|
|
4
|
+
export const VoteCurrentIcon = ({
|
|
5
|
+
style,
|
|
6
|
+
width = '16',
|
|
7
|
+
height = '17',
|
|
8
|
+
stroke = '#444444'
|
|
9
|
+
}: {
|
|
10
|
+
style?: CSSProperties | undefined
|
|
11
|
+
width?: string
|
|
12
|
+
height?: string
|
|
13
|
+
stroke?: string
|
|
14
|
+
}) => {
|
|
15
|
+
return (
|
|
16
|
+
<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path d="M3.33398 5.05884V8.906H6.97035" stroke="#444444" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
|
+
<path d="M16.6676 15.318V11.4708H13.0312" stroke="#444444" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
19
|
+
<path d="M15.1461 8.26484C14.8387 7.34587 14.3163 6.52425 13.6276 5.87666C12.939 5.22906 12.1064 4.77659 11.2077 4.56147C10.3091 4.34634 9.37353 4.37557 8.48841 4.64643C7.6033 4.9173 6.79747 5.42096 6.14611 6.11043L3.33398 8.90603M16.6673 11.4708L13.8552 14.2664C13.2038 14.9559 12.398 15.4595 11.5129 15.7304C10.6278 16.0013 9.69223 16.0305 8.79355 15.8154C7.89487 15.6003 7.06235 15.1478 6.37366 14.5002C5.68497 13.8526 5.16257 13.031 4.8552 12.112" stroke="#444444" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
20
|
+
</svg>
|
|
21
|
+
)
|
|
22
|
+
}
|